ResponseDefinitions.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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\Core;
  25. /**
  26. * @psalm-type CoreLoginFlowV2Credentials = array{
  27. * server: string,
  28. * loginName: string,
  29. * appPassword: string,
  30. * }
  31. *
  32. * @psalm-type CoreLoginFlowV2 = array{
  33. * poll: array{
  34. * token: string,
  35. * endpoint: string,
  36. * },
  37. * login: string,
  38. * }
  39. *
  40. * @psalm-type CoreNavigationEntry = array{
  41. * id: string,
  42. * order: int|string,
  43. * href: string,
  44. * icon: string,
  45. * type: string,
  46. * name: string,
  47. * active: bool,
  48. * classes: string,
  49. * unread: int,
  50. * }
  51. *
  52. * @psalm-type CoreContactsAction = array{
  53. * title: string,
  54. * icon: string,
  55. * hyperlink: string,
  56. * appId: string,
  57. * }
  58. *
  59. * @psalm-type CoreOpenGraphObject = array{
  60. * id: string,
  61. * name: string,
  62. * description: ?string,
  63. * thumb: ?string,
  64. * link: string,
  65. * }
  66. *
  67. * @psalm-type CoreResource = array{
  68. * richObjectType: string,
  69. * richObject: array<string, mixed>,
  70. * openGraphObject: CoreOpenGraphObject,
  71. * accessible: bool,
  72. * }
  73. *
  74. * @psalm-type CoreCollection = array{
  75. * id: int,
  76. * name: string,
  77. * resources: CoreResource[],
  78. * }
  79. *
  80. * @psalm-type CoreReference = array{
  81. * richObjectType: string,
  82. * richObject: array<string, mixed>,
  83. * openGraphObject: CoreOpenGraphObject,
  84. * accessible: bool,
  85. * }
  86. *
  87. * @psalm-type CoreReferenceProvider = array{
  88. * id: string,
  89. * title: string,
  90. * icon_url: string,
  91. * order: int,
  92. * search_providers_ids: ?string[]
  93. * }
  94. *
  95. * @psalm-type CoreUnifiedSearchProvider = array{
  96. * id: string,
  97. * appId: string,
  98. * name: string,
  99. * icon: string,
  100. * order: int,
  101. * triggers: string[],
  102. * filters: array<string, string>,
  103. * inAppSearch: bool,
  104. * }
  105. *
  106. * @psalm-type CoreUnifiedSearchResultEntry = array{
  107. * thumbnailUrl: string,
  108. * title: string,
  109. * subline: string,
  110. * resourceUrl: string,
  111. * icon: string,
  112. * rounded: bool,
  113. * attributes: string[],
  114. * }
  115. *
  116. * @psalm-type CoreUnifiedSearchResult = array{
  117. * name: string,
  118. * isPaginated: bool,
  119. * entries: CoreUnifiedSearchResultEntry[],
  120. * cursor: int|string|null,
  121. * }
  122. *
  123. * @psalm-type CoreAutocompleteResult = array{
  124. * id: string,
  125. * label: string,
  126. * icon: string,
  127. * source: string,
  128. * status: array{
  129. * status: string,
  130. * message: ?string,
  131. * icon: ?string,
  132. * clearAt: ?int,
  133. * }|string,
  134. * subline: string,
  135. * shareWithDisplayNameUnique: string,
  136. * }
  137. *
  138. * @psalm-type CoreTextProcessingTask = array{
  139. * id: ?int,
  140. * type: string,
  141. * status: 0|1|2|3|4,
  142. * userId: ?string,
  143. * appId: string,
  144. * input: string,
  145. * output: ?string,
  146. * identifier: string,
  147. * completionExpectedAt: ?int
  148. * }
  149. *
  150. * @psalm-type CoreTextToImageTask = array{
  151. * id: ?int,
  152. * status: 0|1|2|3|4,
  153. * userId: ?string,
  154. * appId: string,
  155. * input: string,
  156. * identifier: ?string,
  157. * numberOfImages: int,
  158. * completionExpectedAt: ?int,
  159. * }
  160. *
  161. * @psalm-type CoreTeam = array{
  162. * id: string,
  163. * name: string,
  164. * icon: string,
  165. * }
  166. *
  167. * @psalm-type CoreTeamResource = array{
  168. * id: int,
  169. * label: string,
  170. * url: string,
  171. * iconSvg: ?string,
  172. * iconURL: ?string,
  173. * iconEmoji: ?string,
  174. * }
  175. *
  176. * @psalm-type CoreTaskProcessingShape = array{
  177. * name: string,
  178. * description: string,
  179. * type: "Number"|"Text"|"Audio"|"Image"|"Video"|"File"|"ListOfNumbers"|"ListOfTexts"|"ListOfImages"|"ListOfAudios"|"ListOfVideos"|"ListOfFiles",
  180. * mandatory: bool,
  181. * }
  182. *
  183. * @psalm-type CoreTaskProcessingTaskType = array{
  184. * name: string,
  185. * description: string,
  186. * inputShape: CoreTaskProcessingShape[],
  187. * outputShape: CoreTaskProcessingShape[],
  188. * }
  189. *
  190. * @psalm-type CoreTaskProcessingIO = array<string, numeric|list<numeric>|string|list<string>>
  191. *
  192. * @psalm-type CoreTaskProcessingTask = array{
  193. * id: int,
  194. * lastUpdated: int,
  195. * type: string,
  196. * status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN',
  197. * userId: ?string,
  198. * appId: string,
  199. * input: CoreTaskProcessingIO,
  200. * output: null|CoreTaskProcessingIO,
  201. * customId: ?string,
  202. * completionExpectedAt: ?int,
  203. * progress: ?float
  204. * }
  205. *
  206. */
  207. class ResponseDefinitions {
  208. }