1
0

routes.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OCA\Files\AppInfo;
  9. return [
  10. 'routes' => [
  11. [
  12. 'name' => 'view#index',
  13. 'url' => '/',
  14. 'verb' => 'GET',
  15. ],
  16. [
  17. 'name' => 'View#showFile',
  18. 'url' => '/f/{fileid}',
  19. 'verb' => 'GET',
  20. 'root' => '',
  21. ],
  22. [
  23. 'name' => 'Api#getThumbnail',
  24. 'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
  25. 'verb' => 'GET',
  26. 'requirements' => ['file' => '.+']
  27. ],
  28. [
  29. 'name' => 'Api#updateFileTags',
  30. 'url' => '/api/v1/files/{path}',
  31. 'verb' => 'POST',
  32. 'requirements' => ['path' => '.+'],
  33. ],
  34. [
  35. 'name' => 'Api#getRecentFiles',
  36. 'url' => '/api/v1/recent/',
  37. 'verb' => 'GET'
  38. ],
  39. [
  40. 'name' => 'Api#getStorageStats',
  41. 'url' => '/api/v1/stats',
  42. 'verb' => 'GET'
  43. ],
  44. [
  45. 'name' => 'Api#setViewConfig',
  46. 'url' => '/api/v1/views/{view}/{key}',
  47. 'verb' => 'PUT'
  48. ],
  49. [
  50. 'name' => 'Api#setViewConfig',
  51. 'url' => '/api/v1/views',
  52. 'verb' => 'PUT'
  53. ],
  54. [
  55. 'name' => 'Api#getViewConfigs',
  56. 'url' => '/api/v1/views',
  57. 'verb' => 'GET'
  58. ],
  59. [
  60. 'name' => 'Api#setConfig',
  61. 'url' => '/api/v1/config/{key}',
  62. 'verb' => 'PUT'
  63. ],
  64. [
  65. 'name' => 'Api#getConfigs',
  66. 'url' => '/api/v1/configs',
  67. 'verb' => 'GET'
  68. ],
  69. [
  70. 'name' => 'Api#showHiddenFiles',
  71. 'url' => '/api/v1/showhidden',
  72. 'verb' => 'POST'
  73. ],
  74. [
  75. 'name' => 'Api#cropImagePreviews',
  76. 'url' => '/api/v1/cropimagepreviews',
  77. 'verb' => 'POST'
  78. ],
  79. [
  80. 'name' => 'Api#showGridView',
  81. 'url' => '/api/v1/showgridview',
  82. 'verb' => 'POST'
  83. ],
  84. [
  85. 'name' => 'Api#getGridView',
  86. 'url' => '/api/v1/showgridview',
  87. 'verb' => 'GET'
  88. ],
  89. [
  90. 'name' => 'DirectEditingView#edit',
  91. 'url' => '/directEditing/{token}',
  92. 'verb' => 'GET'
  93. ],
  94. [
  95. 'name' => 'Api#serviceWorker',
  96. 'url' => '/preview-service-worker.js',
  97. 'verb' => 'GET'
  98. ],
  99. [
  100. 'name' => 'view#indexView',
  101. 'url' => '/{view}',
  102. 'verb' => 'GET',
  103. ],
  104. [
  105. 'name' => 'view#indexViewFileid',
  106. 'url' => '/{view}/{fileid}',
  107. 'verb' => 'GET',
  108. ],
  109. ],
  110. 'ocs' => [
  111. [
  112. 'name' => 'DirectEditing#info',
  113. 'url' => '/api/v1/directEditing',
  114. 'verb' => 'GET'
  115. ],
  116. [
  117. 'name' => 'DirectEditing#templates',
  118. 'url' => '/api/v1/directEditing/templates/{editorId}/{creatorId}',
  119. 'verb' => 'GET'
  120. ],
  121. [
  122. 'name' => 'DirectEditing#open',
  123. 'url' => '/api/v1/directEditing/open',
  124. 'verb' => 'POST'
  125. ],
  126. [
  127. 'name' => 'DirectEditing#create',
  128. 'url' => '/api/v1/directEditing/create',
  129. 'verb' => 'POST'
  130. ],
  131. [
  132. 'name' => 'Template#list',
  133. 'url' => '/api/v1/templates',
  134. 'verb' => 'GET'
  135. ],
  136. [
  137. 'name' => 'Template#create',
  138. 'url' => '/api/v1/templates/create',
  139. 'verb' => 'POST'
  140. ],
  141. [
  142. 'name' => 'Template#path',
  143. 'url' => '/api/v1/templates/path',
  144. 'verb' => 'POST'
  145. ],
  146. [
  147. 'name' => 'TransferOwnership#transfer',
  148. 'url' => '/api/v1/transferownership',
  149. 'verb' => 'POST',
  150. ],
  151. [
  152. 'name' => 'TransferOwnership#accept',
  153. 'url' => '/api/v1/transferownership/{id}',
  154. 'verb' => 'POST',
  155. ],
  156. [
  157. 'name' => 'TransferOwnership#reject',
  158. 'url' => '/api/v1/transferownership/{id}',
  159. 'verb' => 'DELETE',
  160. ],
  161. [
  162. /** @see OpenLocalEditorController::create() */
  163. 'name' => 'OpenLocalEditor#create',
  164. 'url' => '/api/v1/openlocaleditor',
  165. 'verb' => 'POST',
  166. ],
  167. [
  168. /** @see OpenLocalEditorController::validate() */
  169. 'name' => 'OpenLocalEditor#validate',
  170. 'url' => '/api/v1/openlocaleditor/{token}',
  171. 'verb' => 'POST',
  172. ],
  173. ]
  174. ];