ResponseDefinitions.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2023 Kate Döen <kate.doeen@nextcloud.com>
  5. *
  6. * @author Kate Döen <kate.doeen@nextcloud.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\Files_Sharing;
  25. /**
  26. * @psalm-type Files_SharingShare = array{
  27. * attributes: ?string,
  28. * can_delete: bool,
  29. * can_edit: bool,
  30. * displayname_file_owner: string,
  31. * displayname_owner: string,
  32. * expiration: ?string,
  33. * file_parent: int,
  34. * file_source: int,
  35. * file_target: string,
  36. * has_preview: bool,
  37. * hide_download: 0|1,
  38. * is-mount-root: bool,
  39. * id: string,
  40. * item_mtime: int,
  41. * item_permissions?: int,
  42. * item_size: float|int,
  43. * item_source: int,
  44. * item_type: 'file'|'folder',
  45. * label: string,
  46. * mail_send: 0|1,
  47. * mimetype: string,
  48. * mount-type: string,
  49. * note: string,
  50. * parent: null,
  51. * password?: null|string,
  52. * password_expiration_time?: ?string,
  53. * path: ?string,
  54. * permissions: int,
  55. * send_password_by_talk?: bool,
  56. * share_type: int,
  57. * share_with?: null|string,
  58. * share_with_avatar?: string,
  59. * share_with_displayname?: string,
  60. * share_with_displayname_unique?: ?string,
  61. * share_with_link?: string,
  62. * status?: array{clearAt: int|null, icon: ?string, message: ?string, status: string},
  63. * stime: int,
  64. * storage: int,
  65. * storage_id: string,
  66. * token: ?string,
  67. * uid_file_owner: string,
  68. * uid_owner: string,
  69. * url?: string,
  70. * }
  71. *
  72. * @psalm-type Files_SharingDeletedShare = array{
  73. * id: string,
  74. * share_type: int,
  75. * uid_owner: string,
  76. * displayname_owner: string,
  77. * permissions: int,
  78. * stime: int,
  79. * uid_file_owner: string,
  80. * displayname_file_owner: string,
  81. * path: string,
  82. * item_type: string,
  83. * mimetype: string,
  84. * storage: int,
  85. * item_source: int,
  86. * file_source: int,
  87. * file_parent: int,
  88. * file_target: int,
  89. * expiration: string|null,
  90. * share_with: string|null,
  91. * share_with_displayname: string|null,
  92. * share_with_link: string|null,
  93. * }
  94. *
  95. * @psalm-type Files_SharingRemoteShare = array{
  96. * accepted: bool,
  97. * file_id: int|null,
  98. * id: int,
  99. * mimetype: string|null,
  100. * mountpoint: string,
  101. * mtime: int|null,
  102. * name: string,
  103. * owner: string,
  104. * parent: int|null,
  105. * permissions: int|null,
  106. * remote: string,
  107. * remote_id: string,
  108. * share_token: string,
  109. * share_type: int,
  110. * type: string|null,
  111. * user: string,
  112. * }
  113. *
  114. * @psalm-type Files_SharingSharee = array{
  115. * count: int|null,
  116. * label: string,
  117. * }
  118. *
  119. * @psalm-type Files_SharingShareeValue = array{
  120. * shareType: int,
  121. * shareWith: string,
  122. * }
  123. *
  124. * @psalm-type Files_SharingShareeUser = Files_SharingSharee&array{
  125. * subline: string,
  126. * icon: string,
  127. * shareWithDisplayNameUnique: string,
  128. * status: array{
  129. * status: string,
  130. * message: string,
  131. * icon: string,
  132. * clearAt: int|null,
  133. * },
  134. * value: Files_SharingShareeValue,
  135. * }
  136. *
  137. * @psalm-type Files_SharingShareeRemoteGroup = Files_SharingSharee&array{
  138. * guid: string,
  139. * name: string,
  140. * value: Files_SharingShareeValue&array{
  141. * server: string,
  142. * }
  143. * }
  144. *
  145. * @psalm-type Files_SharingLookup = array{
  146. * value: string,
  147. * verified: int,
  148. * }
  149. *
  150. * @psalm-type Files_SharingShareeLookup = Files_SharingSharee&array{
  151. * extra: array{
  152. * federationId: string,
  153. * name: Files_SharingLookup|null,
  154. * email: Files_SharingLookup|null,
  155. * address: Files_SharingLookup|null,
  156. * website: Files_SharingLookup|null,
  157. * twitter: Files_SharingLookup|null,
  158. * phone: Files_SharingLookup|null,
  159. * twitter_signature: Files_SharingLookup|null,
  160. * website_signature: Files_SharingLookup|null,
  161. * userid: Files_SharingLookup|null,
  162. * },
  163. * value: Files_SharingShareeValue&array{
  164. * globalScale: bool,
  165. * }
  166. * }
  167. *
  168. * @psalm-type Files_SharingShareeEmail = Files_SharingSharee&array{
  169. * uuid: string,
  170. * name: string,
  171. * type: string,
  172. * shareWithDisplayNameUnique: string,
  173. * value: Files_SharingShareeValue,
  174. * }
  175. *
  176. * @psalm-type Files_SharingShareeRemote = Files_SharingSharee&array{
  177. * uuid: string,
  178. * name: string,
  179. * type: string,
  180. * value: Files_SharingShareeValue&array{
  181. * server: string,
  182. * }
  183. * }
  184. *
  185. * @psalm-type Files_SharingShareeCircle = Files_SharingSharee&array{
  186. * shareWithDescription: string,
  187. * value: Files_SharingShareeValue&array{
  188. * circle: string,
  189. * }
  190. * }
  191. *
  192. * @psalm-type Files_SharingShareesSearchResult = array{
  193. * exact: array{
  194. * circles: Files_SharingShareeCircle[],
  195. * emails: Files_SharingShareeEmail[],
  196. * groups: Files_SharingSharee[],
  197. * remote_groups: Files_SharingShareeRemoteGroup[],
  198. * remotes: Files_SharingShareeRemote[],
  199. * rooms: Files_SharingSharee[],
  200. * users: Files_SharingShareeUser[],
  201. * },
  202. * circles: Files_SharingShareeCircle[],
  203. * emails: Files_SharingShareeEmail[],
  204. * groups: Files_SharingSharee[],
  205. * lookup: Files_SharingShareeLookup[],
  206. * remote_groups: Files_SharingShareeRemoteGroup[],
  207. * remotes: Files_SharingShareeRemote[],
  208. * rooms: Files_SharingSharee[],
  209. * users: Files_SharingShareeUser[],
  210. * lookupEnabled: bool,
  211. * }
  212. *
  213. * @psalm-type Files_SharingShareesRecommendedResult = array{
  214. * exact: array{
  215. * emails: Files_SharingShareeEmail[],
  216. * groups: Files_SharingSharee[],
  217. * remote_groups: Files_SharingShareeRemoteGroup[],
  218. * remotes: Files_SharingShareeRemote[],
  219. * users: Files_SharingShareeUser[],
  220. * },
  221. * emails: Files_SharingShareeEmail[],
  222. * groups: Files_SharingSharee[],
  223. * remote_groups: Files_SharingShareeRemoteGroup[],
  224. * remotes: Files_SharingShareeRemote[],
  225. * users: Files_SharingShareeUser[],
  226. * }
  227. *
  228. * @psalm-type Files_SharingShareInfo = array{
  229. * id: int,
  230. * parentId: int,
  231. * mtime: int,
  232. * name: string,
  233. * permissions: int,
  234. * mimetype: string,
  235. * size: int|float,
  236. * type: string,
  237. * etag: string,
  238. * children?: array<string, mixed>[],
  239. * }
  240. */
  241. class ResponseDefinitions {
  242. }