1
0

Definitions.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\RichObjectStrings;
  7. /**
  8. * Class Definitions
  9. *
  10. * @since 11.0.0
  11. */
  12. class Definitions {
  13. /**
  14. * @var array
  15. * @since 11.0.0
  16. */
  17. public $definitions = [
  18. 'addressbook' => [
  19. 'author' => 'Nextcloud',
  20. 'app' => 'dav',
  21. 'since' => '11.0.0',
  22. 'parameters' => [
  23. 'id' => [
  24. 'since' => '11.0.0',
  25. 'required' => true,
  26. 'description' => 'The id used to identify the addressbook on the instance',
  27. 'example' => '42',
  28. ],
  29. 'name' => [
  30. 'since' => '11.0.0',
  31. 'required' => true,
  32. 'description' => 'The display name of the addressbook which should be used in the visual representation',
  33. 'example' => 'Contacts',
  34. ],
  35. ],
  36. ],
  37. 'addressbook-contact' => [
  38. 'author' => 'Nextcloud',
  39. 'app' => 'dav',
  40. 'since' => '11.0.0',
  41. 'parameters' => [
  42. 'id' => [
  43. 'since' => '11.0.0',
  44. 'required' => true,
  45. 'description' => 'The id used to identify the contact on the instance',
  46. 'example' => '42',
  47. ],
  48. 'name' => [
  49. 'since' => '11.0.0',
  50. 'required' => true,
  51. 'description' => 'The display name of the contact which should be used in the visual representation',
  52. 'example' => 'John Doe',
  53. ],
  54. ],
  55. ],
  56. 'announcement' => [
  57. 'author' => 'Joas Schilling',
  58. 'app' => 'announcementcenter',
  59. 'since' => '11.0.0',
  60. 'parameters' => [
  61. 'id' => [
  62. 'since' => '11.0.0',
  63. 'required' => true,
  64. 'description' => 'The id used to identify the announcement on the instance',
  65. 'example' => '42',
  66. ],
  67. 'name' => [
  68. 'since' => '11.0.0',
  69. 'required' => true,
  70. 'description' => 'The announcement subject which should be used in the visual representation',
  71. 'example' => 'file.txt',
  72. ],
  73. 'link' => [
  74. 'since' => '11.0.0',
  75. 'required' => false,
  76. 'description' => 'The full URL to the file',
  77. 'example' => 'http://localhost/index.php/apps/announcements/#23',
  78. ],
  79. ],
  80. ],
  81. 'app' => [
  82. 'author' => 'Nextcloud',
  83. 'app' => 'updatenotification',
  84. 'since' => '11.0.0',
  85. 'parameters' => [
  86. 'id' => [
  87. 'since' => '11.0.0',
  88. 'required' => true,
  89. 'description' => 'The app id',
  90. 'example' => 'updatenotification',
  91. ],
  92. 'name' => [
  93. 'since' => '11.0.0',
  94. 'required' => true,
  95. 'description' => 'The name of the app which should be used in the visual representation',
  96. 'example' => 'Update notification',
  97. ],
  98. ],
  99. ],
  100. 'calendar' => [
  101. 'author' => 'Nextcloud',
  102. 'app' => 'dav',
  103. 'since' => '11.0.0',
  104. 'parameters' => [
  105. 'id' => [
  106. 'since' => '11.0.0',
  107. 'required' => true,
  108. 'description' => 'The id used to identify the calendar on the instance',
  109. 'example' => '42',
  110. ],
  111. 'name' => [
  112. 'since' => '11.0.0',
  113. 'required' => true,
  114. 'description' => 'The display name of the calendar which should be used in the visual representation',
  115. 'example' => 'Personal',
  116. ],
  117. ],
  118. ],
  119. 'calendar-event' => [
  120. 'author' => 'Nextcloud',
  121. 'app' => 'dav',
  122. 'since' => '11.0.0',
  123. 'parameters' => [
  124. 'id' => [
  125. 'since' => '11.0.0',
  126. 'required' => true,
  127. 'description' => 'The id used to identify the event on the instance',
  128. 'example' => '42',
  129. ],
  130. 'name' => [
  131. 'since' => '11.0.0',
  132. 'required' => true,
  133. 'description' => 'The display name of the event which should be used in the visual representation',
  134. 'example' => 'Workout',
  135. ],
  136. 'link' => [
  137. 'since' => '19.0.0',
  138. 'required' => false,
  139. 'description' => 'A link to the page displaying the calendar',
  140. 'example' => 'http://localhost/index.php/apps/calendar/dayGridMonth/2020-01-20/edit/sidebar/base64string/1579046400'
  141. ]
  142. ],
  143. ],
  144. 'call' => [
  145. 'author' => 'Nextcloud',
  146. 'app' => 'spreed',
  147. 'since' => '11.0.2',
  148. 'parameters' => [
  149. 'id' => [
  150. 'since' => '11.0.2',
  151. 'required' => true,
  152. 'description' => 'The id used to identify the call on the instance',
  153. 'example' => '42',
  154. ],
  155. 'name' => [
  156. 'since' => '11.0.2',
  157. 'required' => true,
  158. 'description' => 'The display name of the call which should be used in the visual representation',
  159. 'example' => 'Company call',
  160. ],
  161. 'call-type' => [
  162. 'since' => '11.0.2',
  163. 'required' => true,
  164. 'description' => 'The type of the call: one2one, group or public',
  165. 'example' => 'one2one',
  166. ],
  167. 'link' => [
  168. 'since' => '19.0.0',
  169. 'required' => false,
  170. 'description' => 'The link to the conversation',
  171. 'example' => 'https://localhost/index.php/call/R4nd0mToken',
  172. ],
  173. 'icon-url' => [
  174. 'since' => '27.0.0',
  175. 'required' => false,
  176. 'description' => 'The icon url to use as avatar',
  177. 'example' => 'https://localhost/ocs/v2.php/apps/spreed/api/v1/room/R4nd0mToken/avatar'
  178. ],
  179. 'message-id' => [
  180. 'since' => '27.0.0',
  181. 'required' => false,
  182. 'description' => 'The id of a message that was referred to',
  183. 'example' => '12345',
  184. ],
  185. ],
  186. ],
  187. 'circle' => [
  188. 'author' => 'Maxence Lange',
  189. 'app' => 'circles',
  190. 'since' => '12.0.0',
  191. 'parameters' => [
  192. 'id' => [
  193. 'since' => '12.0.0',
  194. 'required' => true,
  195. 'description' => 'The id used to identify the circle on the instance',
  196. 'example' => '42',
  197. ],
  198. 'name' => [
  199. 'since' => '12.0.0',
  200. 'required' => true,
  201. 'description' => 'The display name of the circle which should be used in the visual representation',
  202. 'example' => 'My friends',
  203. ],
  204. 'link' => [
  205. 'since' => '12.0.0',
  206. 'required' => true,
  207. 'description' => 'The full URL to the circle',
  208. 'example' => 'http://localhost/index.php/apps/circles/#42',
  209. ],
  210. ],
  211. ],
  212. 'deck-board' => [
  213. 'author' => 'Nextcloud',
  214. 'app' => 'deck',
  215. 'since' => '21.0.0',
  216. 'parameters' => [
  217. 'id' => [
  218. 'since' => '21.0.0',
  219. 'required' => true,
  220. 'description' => 'The id used to identify the board on the instance',
  221. 'example' => '1',
  222. ],
  223. 'name' => [
  224. 'since' => '21.0.0',
  225. 'required' => true,
  226. 'description' => 'The display name of the deck board',
  227. 'example' => 'Personal',
  228. ],
  229. 'link' => [
  230. 'since' => '21.0.0',
  231. 'required' => true,
  232. 'description' => 'The full URL to the board',
  233. 'example' => 'http://localhost/index.php/apps/deck/#/board/1',
  234. ],
  235. ],
  236. ],
  237. 'deck-card' => [
  238. 'author' => 'Nextcloud',
  239. 'app' => 'deck',
  240. 'since' => '21.0.0',
  241. 'parameters' => [
  242. 'id' => [
  243. 'since' => '21.0.0',
  244. 'required' => true,
  245. 'description' => 'The id used to identify the card on the instance',
  246. 'example' => '1',
  247. ],
  248. 'name' => [
  249. 'since' => '21.0.0',
  250. 'required' => true,
  251. 'description' => 'The title of the deck card',
  252. 'example' => 'Foo Bar',
  253. ],
  254. 'boardname' => [
  255. 'since' => '21.0.0',
  256. 'required' => true,
  257. 'description' => 'The display name of board which contains the card',
  258. 'example' => 'Personal',
  259. ],
  260. 'stackname' => [
  261. 'since' => '21.0.0',
  262. 'required' => true,
  263. 'description' => 'The display name of the stack which contains the card in the board',
  264. 'example' => 'To do',
  265. ],
  266. 'link' => [
  267. 'since' => '21.0.0',
  268. 'required' => true,
  269. 'description' => 'The full URL to the card directly',
  270. 'example' => 'https://nextcloud21.local/index.php/apps/deck/#/board/1/card/1',
  271. ],
  272. ],
  273. ],
  274. 'email' => [
  275. 'author' => 'Nextcloud',
  276. 'app' => 'sharebymail',
  277. 'since' => '11.0.0',
  278. 'parameters' => [
  279. 'id' => [
  280. 'since' => '11.0.0',
  281. 'required' => true,
  282. 'description' => 'The mail-address used to identify the event on the instance',
  283. 'example' => 'test@localhost',
  284. ],
  285. 'name' => [
  286. 'since' => '11.0.0',
  287. 'required' => true,
  288. 'description' => 'The display name of a matching contact or the email (fallback) which should be used in the visual representation',
  289. 'example' => 'Foo Bar',
  290. ],
  291. ],
  292. ],
  293. 'file' => [
  294. 'author' => 'Nextcloud',
  295. 'app' => 'dav',
  296. 'since' => '11.0.0',
  297. 'parameters' => [
  298. 'id' => [
  299. 'since' => '11.0.0',
  300. 'required' => true,
  301. 'description' => 'The id used to identify the file on the instance',
  302. 'example' => '42',
  303. ],
  304. 'name' => [
  305. 'since' => '11.0.0',
  306. 'required' => true,
  307. 'description' => 'The file name which should be used in the visual representation',
  308. 'example' => 'file.txt',
  309. ],
  310. 'size' => [
  311. 'since' => '21.0.0',
  312. 'required' => false,
  313. 'description' => 'The file size in bytes',
  314. 'example' => '3145728',
  315. ],
  316. 'path' => [
  317. 'since' => '11.0.0',
  318. 'required' => true,
  319. 'description' => 'The full path of the file for the user, should not start with a slash',
  320. 'example' => 'path/to/file.txt',
  321. ],
  322. 'link' => [
  323. 'since' => '11.0.0',
  324. 'required' => false,
  325. 'description' => 'The full URL to the file',
  326. 'example' => 'http://localhost/index.php/f/42',
  327. ],
  328. 'mimetype' => [
  329. 'since' => '16.0.0',
  330. 'required' => false,
  331. 'description' => 'The mimetype of the file/folder to allow clients to show a placeholder',
  332. 'example' => 'text/plain',
  333. ],
  334. 'preview-available' => [
  335. 'since' => '16.0.0',
  336. 'required' => false,
  337. 'description' => 'Whether or not a preview is available. If `no` the mimetype icon should be used',
  338. 'example' => 'yes',
  339. ],
  340. 'mtime' => [
  341. 'since' => '25.0.0',
  342. 'required' => false,
  343. 'description' => 'The mtime of the file/folder as unix timestamp',
  344. 'example' => '1661854213',
  345. ],
  346. 'etag' => [
  347. 'since' => '25.0.0',
  348. 'required' => false,
  349. 'description' => 'The ETag of the file/folder',
  350. 'example' => 'abcdefghi',
  351. ],
  352. 'permissions' => [
  353. 'since' => '25.0.0',
  354. 'required' => false,
  355. 'description' => 'The permissions on the file/folder',
  356. 'example' => '3',
  357. ],
  358. 'width' => [
  359. 'since' => '29.0.0',
  360. 'required' => false,
  361. 'description' => 'The width in pixels if the file is an image',
  362. 'example' => '1920',
  363. ],
  364. 'height' => [
  365. 'since' => '29.0.0',
  366. 'required' => false,
  367. 'description' => 'The height in pixels if the file is an image',
  368. 'example' => '1080',
  369. ],
  370. ],
  371. ],
  372. 'forms-form' => [
  373. 'author' => 'Nextcloud',
  374. 'app' => 'forms',
  375. 'since' => '21.0.1',
  376. 'parameters' => [
  377. 'id' => [
  378. 'since' => '21.0.1',
  379. 'required' => true,
  380. 'description' => 'The form-hash of the form',
  381. 'example' => 'q72GGqbfbLBC6xNB',
  382. ],
  383. 'name' => [
  384. 'since' => '21.0.1',
  385. 'required' => true,
  386. 'description' => 'The title of the form',
  387. 'example' => 'Nice Form',
  388. ],
  389. 'link' => [
  390. 'since' => '21.0.1',
  391. 'required' => true,
  392. 'description' => 'The full URL to the board',
  393. 'example' => 'http://localhost/index.php/apps/forms/q72GGqbfbLBC6xNB',
  394. ],
  395. ],
  396. ],
  397. 'guest' => [
  398. 'author' => 'Nextcloud',
  399. 'app' => 'spreed',
  400. 'since' => '17.0.0',
  401. 'parameters' => [
  402. 'id' => [
  403. 'since' => '17.0.0',
  404. 'required' => true,
  405. 'description' => 'The id used to identify the guest user',
  406. 'example' => '42',
  407. ],
  408. 'name' => [
  409. 'since' => '17.0.0',
  410. 'required' => true,
  411. 'description' => 'Potential displayname of the guest user',
  412. 'example' => 'Foobar Cats',
  413. ],
  414. ],
  415. ],
  416. 'highlight' => [
  417. 'author' => 'Nextcloud',
  418. 'app' => 'core',
  419. 'since' => '13.0.0',
  420. 'parameters' => [
  421. 'id' => [
  422. 'since' => '13.0.0',
  423. 'required' => true,
  424. 'description' => 'The id used to identify the highlighted object on the instance',
  425. 'example' => '42',
  426. ],
  427. 'name' => [
  428. 'since' => '13.0.0',
  429. 'required' => true,
  430. 'description' => 'The string that should be highlighted.',
  431. 'example' => 'Hello World',
  432. ],
  433. 'link' => [
  434. 'since' => '13.0.0',
  435. 'required' => false,
  436. 'description' => 'The full URL that should be opened when clicking the highlighted text.',
  437. 'example' => 'http://localhost/index.php/f/42',
  438. ],
  439. ],
  440. ],
  441. 'geo-location' => [
  442. 'author' => 'Nextcloud',
  443. 'app' => 'core',
  444. 'since' => '22.0.0',
  445. 'parameters' => [
  446. 'id' => [
  447. 'since' => '22.0.0',
  448. 'required' => true,
  449. 'description' => 'The geo URI (https://en.wikipedia.org/wiki/Geo_URI_scheme) to identify the location',
  450. 'example' => 'geo:52.5450511,13.3741463',
  451. ],
  452. 'name' => [
  453. 'since' => '22.0.0',
  454. 'required' => true,
  455. 'description' => 'A description of the location',
  456. 'example' => 'Nextcloud Berlin Office',
  457. ],
  458. 'latitude' => [
  459. 'since' => '22.0.0',
  460. 'required' => true,
  461. 'description' => 'The latitude of the location MUST be the same as in the id',
  462. 'example' => '52.5450511',
  463. ],
  464. 'longitude' => [
  465. 'since' => '22.0.0',
  466. 'required' => true,
  467. 'description' => 'The longitude of the location MUST be the same as in the id',
  468. 'example' => '13.3741463',
  469. ],
  470. ],
  471. ],
  472. 'open-graph' => [
  473. 'author' => 'Maxence Lange',
  474. 'app' => 'mood',
  475. 'since' => '12.0.0',
  476. 'parameters' => [
  477. 'id' => [
  478. 'since' => '12.0.0',
  479. 'required' => true,
  480. 'description' => 'The id used to identify the open graph data on the instance',
  481. 'example' => '42',
  482. ],
  483. 'name' => [
  484. 'since' => '12.0.0',
  485. 'required' => true,
  486. 'description' => 'The open graph title of the website',
  487. 'example' => 'This is a website',
  488. ],
  489. 'description' => [
  490. 'since' => '12.0.0',
  491. 'required' => false,
  492. 'description' => 'The open graph description from the website',
  493. 'example' => 'This is the description of the website',
  494. ],
  495. 'thumb' => [
  496. 'since' => '12.0.0',
  497. 'required' => false,
  498. 'description' => 'The full URL of the open graph thumbnail',
  499. 'example' => 'http://localhost/index.php/apps/mood/data/image?url=https%3A%2F%2Fthumb.example.com%2Fimage.png',
  500. ],
  501. 'website' => [
  502. 'since' => '12.0.0',
  503. 'required' => false,
  504. 'description' => 'The name of the described website',
  505. 'example' => 'Nextcloud - App Store',
  506. ],
  507. 'link' => [
  508. 'since' => '12.0.0',
  509. 'required' => false,
  510. 'description' => 'The full link to the website',
  511. 'example' => 'https://apps.nextcloud.com/apps/mood',
  512. ],
  513. ],
  514. ],
  515. 'pending-federated-share' => [
  516. 'author' => 'Nextcloud',
  517. 'app' => 'dav',
  518. 'since' => '11.0.0',
  519. 'parameters' => [
  520. 'id' => [
  521. 'since' => '11.0.0',
  522. 'required' => true,
  523. 'description' => 'The id used to identify the federated share on the instance',
  524. 'example' => '42',
  525. ],
  526. 'name' => [
  527. 'since' => '11.0.0',
  528. 'required' => true,
  529. 'description' => 'The name of the shared item which should be used in the visual representation',
  530. 'example' => 'file.txt',
  531. ],
  532. ],
  533. ],
  534. 'systemtag' => [
  535. 'author' => 'Nextcloud',
  536. 'app' => 'core',
  537. 'since' => '11.0.0',
  538. 'parameters' => [
  539. 'id' => [
  540. 'since' => '11.0.0',
  541. 'required' => true,
  542. 'description' => 'The id used to identify the systemtag on the instance',
  543. 'example' => '23',
  544. ],
  545. 'name' => [
  546. 'since' => '11.0.0',
  547. 'required' => true,
  548. 'description' => 'The display name of the systemtag which should be used in the visual representation',
  549. 'example' => 'Project 1',
  550. ],
  551. 'visibility' => [
  552. 'since' => '11.0.0',
  553. 'required' => true,
  554. 'description' => 'If the user can see the systemtag',
  555. 'example' => '1',
  556. ],
  557. 'assignable' => [
  558. 'since' => '11.0.0',
  559. 'required' => true,
  560. 'description' => 'If the user can assign the systemtag',
  561. 'example' => '0',
  562. ],
  563. ],
  564. ],
  565. 'talk-attachment' => [
  566. 'author' => 'Nextcloud',
  567. 'app' => 'talk',
  568. 'since' => '18.0.0',
  569. 'parameters' => [
  570. 'id' => [
  571. 'since' => '18.0.0',
  572. 'required' => true,
  573. 'description' => 'The id used to identify the attachment on the instance',
  574. 'example' => '12345',
  575. ],
  576. 'name' => [
  577. 'since' => '18.0.0',
  578. 'required' => true,
  579. 'description' => 'The name of the attachment',
  580. 'example' => 'John Doe',
  581. ],
  582. 'conversation' => [
  583. 'since' => '18.0.0',
  584. 'required' => true,
  585. 'description' => 'The token of the conversation',
  586. 'example' => 'a1b2c3d4',
  587. ],
  588. 'mimetype' => [
  589. 'since' => '18.0.0',
  590. 'required' => false,
  591. 'description' => 'The mimetype of the file/folder to allow clients to show a placeholder',
  592. 'example' => 'text/plain',
  593. ],
  594. 'preview-available' => [
  595. 'since' => '18.0.0',
  596. 'required' => false,
  597. 'description' => 'Whether or not a preview is available. If `no` the mimetype icon should be used',
  598. 'example' => 'yes',
  599. ],
  600. ],
  601. ],
  602. 'talk-poll' => [
  603. 'author' => 'Nextcloud',
  604. 'app' => 'talk',
  605. 'since' => '25.0.0',
  606. 'parameters' => [
  607. 'id' => [
  608. 'since' => '25.0.0',
  609. 'required' => true,
  610. 'description' => 'The id used to identify the poll on the instance',
  611. 'example' => '12345',
  612. ],
  613. 'name' => [
  614. 'since' => '25.0.0',
  615. 'required' => true,
  616. 'description' => 'The poll question',
  617. 'example' => 'What is the question?',
  618. ],
  619. ],
  620. ],
  621. 'user' => [
  622. 'author' => 'Nextcloud',
  623. 'app' => 'core',
  624. 'since' => '11.0.0',
  625. 'parameters' => [
  626. 'id' => [
  627. 'since' => '11.0.0',
  628. 'required' => true,
  629. 'description' => 'The id used to identify the user on the instance',
  630. 'example' => 'johndoe',
  631. ],
  632. 'name' => [
  633. 'since' => '11.0.0',
  634. 'required' => true,
  635. 'description' => 'The display name of the user which should be used in the visual representation',
  636. 'example' => 'John Doe',
  637. ],
  638. 'server' => [
  639. 'since' => '11.0.0',
  640. 'required' => false,
  641. 'description' => 'The URL of the instance the user lives on',
  642. 'example' => 'localhost',
  643. ],
  644. ],
  645. ],
  646. 'user-group' => [
  647. 'author' => 'Nextcloud',
  648. 'app' => 'core',
  649. 'since' => '11.0.0',
  650. 'parameters' => [
  651. 'id' => [
  652. 'since' => '11.0.0',
  653. 'required' => true,
  654. 'description' => 'The id used to identify the group on the instance',
  655. 'example' => 'supportteam',
  656. ],
  657. 'name' => [
  658. 'since' => '11.0.0',
  659. 'required' => true,
  660. 'description' => 'The display name of the group which should be used in the visual representation',
  661. 'example' => 'Support Team',
  662. ],
  663. ],
  664. ],
  665. ];
  666. /**
  667. * @param string $type
  668. * @return array
  669. * @throws InvalidObjectExeption
  670. * @since 11.0.0
  671. */
  672. public function getDefinition($type) {
  673. if (isset($this->definitions[$type])) {
  674. return $this->definitions[$type];
  675. }
  676. throw new InvalidObjectExeption('Object type is undefined');
  677. }
  678. }