ResponseDefinitions.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. * id: string,
  39. * item_mtime: int,
  40. * item_permissions?: int,
  41. * item_size: float|int,
  42. * item_source: int,
  43. * item_type: 'file'|'folder',
  44. * label: string,
  45. * mail_send: 0|1,
  46. * mimetype: string,
  47. * note: string,
  48. * parent: null,
  49. * password?: null|string,
  50. * password_expiration_time?: ?string,
  51. * path: ?string,
  52. * permissions: int,
  53. * send_password_by_talk?: bool,
  54. * share_type: int,
  55. * share_with?: null|string,
  56. * share_with_avatar?: string,
  57. * share_with_displayname?: string,
  58. * share_with_displayname_unique?: ?string,
  59. * share_with_link?: string,
  60. * status?: array{clearAt: int|null, icon: ?string, message: ?string, status: string},
  61. * stime: int,
  62. * storage: int,
  63. * storage_id: string,
  64. * token: ?string,
  65. * uid_file_owner: string,
  66. * uid_owner: string,
  67. * url?: string,
  68. * }
  69. *
  70. * @psalm-type Files_SharingDeletedShare = array{
  71. * id: string,
  72. * share_type: int,
  73. * uid_owner: string,
  74. * displayname_owner: string,
  75. * permissions: int,
  76. * stime: int,
  77. * uid_file_owner: string,
  78. * displayname_file_owner: string,
  79. * path: string,
  80. * item_type: string,
  81. * mimetype: string,
  82. * storage: int,
  83. * item_source: int,
  84. * file_source: int,
  85. * file_parent: int,
  86. * file_target: int,
  87. * expiration: string|null,
  88. * share_with: string|null,
  89. * share_with_displayname: string|null,
  90. * share_with_link: string|null,
  91. * }
  92. *
  93. * @psalm-type Files_SharingRemoteShare = array{
  94. * accepted: bool,
  95. * file_id: int|null,
  96. * id: int,
  97. * mimetype: string|null,
  98. * mountpoint: string,
  99. * mtime: int|null,
  100. * name: string,
  101. * owner: string,
  102. * parent: int|null,
  103. * permissions: int|null,
  104. * remote: string,
  105. * remote_id: string,
  106. * share_token: string,
  107. * share_type: int,
  108. * type: string|null,
  109. * user: string,
  110. * }
  111. *
  112. * @psalm-type Files_SharingSharee = array{
  113. * count: int|null,
  114. * label: string,
  115. * }
  116. *
  117. * @psalm-type Files_SharingShareeValue = array{
  118. * shareType: int,
  119. * shareWith: string,
  120. * }
  121. *
  122. * @psalm-type Files_SharingShareeUser = Files_SharingSharee&array{
  123. * subline: string,
  124. * icon: string,
  125. * shareWithDisplayNameUnique: string,
  126. * status: array{
  127. * status: string,
  128. * message: string,
  129. * icon: string,
  130. * clearAt: int|null,
  131. * },
  132. * value: Files_SharingShareeValue,
  133. * }
  134. *
  135. * @psalm-type Files_SharingShareeRemoteGroup = Files_SharingSharee&array{
  136. * guid: string,
  137. * name: string,
  138. * value: Files_SharingShareeValue&array{
  139. * server: string,
  140. * }
  141. * }
  142. *
  143. * @psalm-type Files_SharingLookup = array{
  144. * value: string,
  145. * verified: int,
  146. * }
  147. *
  148. * @psalm-type Files_SharingShareeLookup = Files_SharingSharee&array{
  149. * extra: array{
  150. * federationId: string,
  151. * name: Files_SharingLookup|null,
  152. * email: Files_SharingLookup|null,
  153. * address: Files_SharingLookup|null,
  154. * website: Files_SharingLookup|null,
  155. * twitter: Files_SharingLookup|null,
  156. * phone: Files_SharingLookup|null,
  157. * twitter_signature: Files_SharingLookup|null,
  158. * website_signature: Files_SharingLookup|null,
  159. * userid: Files_SharingLookup|null,
  160. * },
  161. * value: Files_SharingShareeValue&array{
  162. * globalScale: bool,
  163. * }
  164. * }
  165. *
  166. * @psalm-type Files_SharingShareeEmail = Files_SharingSharee&array{
  167. * uuid: string,
  168. * name: string,
  169. * type: string,
  170. * shareWithDisplayNameUnique: string,
  171. * value: Files_SharingShareeValue,
  172. * }
  173. *
  174. * @psalm-type Files_SharingShareeRemote = Files_SharingSharee&array{
  175. * uuid: string,
  176. * name: string,
  177. * type: string,
  178. * value: Files_SharingShareeValue&array{
  179. * server: string,
  180. * }
  181. * }
  182. *
  183. * @psalm-type Files_SharingShareeCircle = Files_SharingSharee&array{
  184. * shareWithDescription: string,
  185. * value: Files_SharingShareeValue&array{
  186. * circle: string,
  187. * }
  188. * }
  189. *
  190. * @psalm-type Files_SharingShareesSearchResult = array{
  191. * exact: array{
  192. * circles: Files_SharingShareeCircle[],
  193. * emails: Files_SharingShareeEmail[],
  194. * groups: Files_SharingSharee[],
  195. * remote_groups: Files_SharingShareeRemoteGroup[],
  196. * remotes: Files_SharingShareeRemote[],
  197. * rooms: Files_SharingSharee[],
  198. * users: Files_SharingShareeUser[],
  199. * },
  200. * circles: Files_SharingShareeCircle[],
  201. * emails: Files_SharingShareeEmail[],
  202. * groups: Files_SharingSharee[],
  203. * lookup: Files_SharingShareeLookup[],
  204. * remote_groups: Files_SharingShareeRemoteGroup[],
  205. * remotes: Files_SharingShareeRemote[],
  206. * rooms: Files_SharingSharee[],
  207. * users: Files_SharingShareeUser[],
  208. * lookupEnabled: bool,
  209. * }
  210. *
  211. * @psalm-type Files_SharingShareesRecommendedResult = array{
  212. * exact: array{
  213. * emails: Files_SharingShareeEmail[],
  214. * groups: Files_SharingSharee[],
  215. * remote_groups: Files_SharingShareeRemoteGroup[],
  216. * remotes: Files_SharingShareeRemote[],
  217. * users: Files_SharingShareeUser[],
  218. * },
  219. * emails: Files_SharingShareeEmail[],
  220. * groups: Files_SharingSharee[],
  221. * remote_groups: Files_SharingShareeRemoteGroup[],
  222. * remotes: Files_SharingShareeRemote[],
  223. * users: Files_SharingShareeUser[],
  224. * }
  225. *
  226. * @psalm-type Files_SharingShareInfo = array{
  227. * id: int,
  228. * parentId: int,
  229. * mtime: int,
  230. * name: string,
  231. * permissions: int,
  232. * mimetype: string,
  233. * size: int|float,
  234. * type: string,
  235. * etag: string,
  236. * children?: array<string, mixed>[],
  237. * }
  238. */
  239. class ResponseDefinitions {
  240. }