You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

245 lines
6.3 KiB

  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core;
  8. /**
  9. * @psalm-type CoreLoginFlowV2Credentials = array{
  10. * server: string,
  11. * loginName: string,
  12. * appPassword: string,
  13. * }
  14. *
  15. * @psalm-type CoreLoginFlowV2 = array{
  16. * poll: array{
  17. * token: string,
  18. * endpoint: string,
  19. * },
  20. * login: string,
  21. * }
  22. *
  23. * @psalm-type CoreNavigationEntry = array{
  24. * id: string,
  25. * order?: int,
  26. * href: string,
  27. * icon: string,
  28. * type: string,
  29. * name: string,
  30. * app?: string,
  31. * default?: bool,
  32. * active: bool,
  33. * classes: string,
  34. * unread: int,
  35. * }
  36. *
  37. * @psalm-type CoreContactsAction = array{
  38. * title: string,
  39. * icon: string,
  40. * hyperlink: string,
  41. * appId: string,
  42. * }
  43. *
  44. * @psalm-type CoreOpenGraphObject = array{
  45. * id: string,
  46. * name: string,
  47. * description: ?string,
  48. * thumb: ?string,
  49. * link: string,
  50. * }
  51. *
  52. * @psalm-type CoreResource = array{
  53. * richObjectType: string,
  54. * richObject: array<string, ?mixed>,
  55. * openGraphObject: CoreOpenGraphObject,
  56. * accessible: bool,
  57. * }
  58. *
  59. * @psalm-type CoreCollection = array{
  60. * id: int,
  61. * name: string,
  62. * resources: list<CoreResource>,
  63. * }
  64. *
  65. * @psalm-type CoreReference = array{
  66. * richObjectType: string,
  67. * richObject: array<string, ?mixed>,
  68. * openGraphObject: CoreOpenGraphObject,
  69. * accessible: bool,
  70. * }
  71. *
  72. * @psalm-type CoreReferenceProvider = array{
  73. * id: string,
  74. * title: string,
  75. * icon_url: string,
  76. * order: int,
  77. * search_providers_ids: ?list<string>,
  78. * }
  79. *
  80. * @psalm-type CoreUnifiedSearchProvider = array{
  81. * id: string,
  82. * appId: string,
  83. * name: string,
  84. * icon: string,
  85. * order: int,
  86. * isExternalProvider: bool,
  87. * triggers: list<string>,
  88. * filters: array<string, string>,
  89. * inAppSearch: bool,
  90. * }
  91. *
  92. * @psalm-type CoreUnifiedSearchResultEntry = array{
  93. * thumbnailUrl: string,
  94. * title: string,
  95. * subline: string,
  96. * resourceUrl: string,
  97. * icon: string,
  98. * rounded: bool,
  99. * attributes: list<string>,
  100. * }
  101. *
  102. * @psalm-type CoreUnifiedSearchResult = array{
  103. * name: string,
  104. * isPaginated: bool,
  105. * entries: list<CoreUnifiedSearchResultEntry>,
  106. * cursor: int|string|null,
  107. * }
  108. *
  109. * @psalm-type CoreAutocompleteResult = array{
  110. * id: string,
  111. * label: string,
  112. * icon: string,
  113. * source: string,
  114. * status: array{
  115. * status: string,
  116. * message: ?string,
  117. * icon: ?string,
  118. * clearAt: ?int,
  119. * }|string,
  120. * subline: string,
  121. * shareWithDisplayNameUnique: string,
  122. * }
  123. *
  124. * @psalm-type CoreTextProcessingTask = array{
  125. * id: ?int,
  126. * type: string,
  127. * status: 0|1|2|3|4,
  128. * userId: ?string,
  129. * appId: string,
  130. * input: string,
  131. * output: ?string,
  132. * identifier: string,
  133. * completionExpectedAt: ?int
  134. * }
  135. *
  136. * @psalm-type CoreTextToImageTask = array{
  137. * id: ?int,
  138. * status: 0|1|2|3|4,
  139. * userId: ?string,
  140. * appId: string,
  141. * input: string,
  142. * identifier: ?string,
  143. * numberOfImages: int,
  144. * completionExpectedAt: ?int,
  145. * }
  146. *
  147. * @psalm-type CoreTeam = array{
  148. * teamId: string,
  149. * displayName: string,
  150. * link: ?string,
  151. * }
  152. *
  153. * @psalm-type CoreTeamResource = array{
  154. * id: string,
  155. * label: string,
  156. * url: string,
  157. * iconSvg: ?string,
  158. * iconURL: ?string,
  159. * iconEmoji: ?string,
  160. * provider: array{
  161. * id: string,
  162. * name: string,
  163. * icon: string,
  164. * },
  165. * }
  166. *
  167. * @psalm-type CoreTeamWithResources = CoreTeam&array{
  168. * resources: list<CoreTeamResource>,
  169. * }
  170. *
  171. * @psalm-type CoreTaskProcessingShape = array{
  172. * name: string,
  173. * description: string,
  174. * type: "Number"|"Text"|"Audio"|"Image"|"Video"|"File"|"Enum"|"ListOfNumbers"|"ListOfTexts"|"ListOfImages"|"ListOfAudios"|"ListOfVideos"|"ListOfFiles",
  175. * }
  176. *
  177. * @psalm-type CoreTaskProcessingTaskType = array{
  178. * name: string,
  179. * description: string,
  180. * inputShape: array<string, CoreTaskProcessingShape>,
  181. * inputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
  182. * inputShapeDefaults: array<string, numeric|string>,
  183. * optionalInputShape: array<string, CoreTaskProcessingShape>,
  184. * optionalInputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
  185. * optionalInputShapeDefaults: array<string, numeric|string>,
  186. * outputShape: array<string, CoreTaskProcessingShape>,
  187. * outputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
  188. * optionalOutputShape: array<string, CoreTaskProcessingShape>,
  189. * optionalOutputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
  190. * }
  191. *
  192. * @psalm-type CoreTaskProcessingIO = array<string, numeric|list<numeric>|string|list<string>>
  193. *
  194. * @psalm-type CoreTaskProcessingTask = array{
  195. * id: int,
  196. * lastUpdated: int,
  197. * type: string,
  198. * status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN',
  199. * userId: ?string,
  200. * appId: string,
  201. * input: CoreTaskProcessingIO,
  202. * output: null|CoreTaskProcessingIO,
  203. * customId: ?string,
  204. * completionExpectedAt: ?int,
  205. * progress: ?float,
  206. * scheduledAt: ?int,
  207. * startedAt: ?int,
  208. * endedAt: ?int,
  209. * allowCleanup: bool,
  210. * }
  211. *
  212. * @psalm-type CoreProfileAction = array{
  213. * id: string,
  214. * icon: string,
  215. * title: string,
  216. * target: ?string,
  217. * }
  218. *
  219. * @psalm-type CoreProfileFields = array{
  220. * userId: string,
  221. * address?: string|null,
  222. * biography?: string|null,
  223. * displayname?: string|null,
  224. * headline?: string|null,
  225. * isUserAvatarVisible?: bool,
  226. * organisation?: string|null,
  227. * pronouns?: string|null,
  228. * role?: string|null,
  229. * actions: list<CoreProfileAction>,
  230. * }
  231. *
  232. * @psalm-type CoreProfileData = CoreProfileFields&array{
  233. * // Timezone identifier like Europe/Berlin or America/North_Dakota/Beulah
  234. * timezone: string,
  235. * // Offset in seconds, negative when behind UTC, positive otherwise
  236. * timezoneOffset: int,
  237. * }
  238. *
  239. */
  240. class ResponseDefinitions {
  241. }