Definitions.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  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. 'blurhash' => [
  371. 'since' => '30.0.0',
  372. 'required' => false,
  373. 'description' => 'The blurhash of the image',
  374. 'example' => 'LEHV9uae2yk8pyo0adR*.7kCMdnj',
  375. ],
  376. ],
  377. ],
  378. 'forms-form' => [
  379. 'author' => 'Nextcloud',
  380. 'app' => 'forms',
  381. 'since' => '21.0.1',
  382. 'parameters' => [
  383. 'id' => [
  384. 'since' => '21.0.1',
  385. 'required' => true,
  386. 'description' => 'The form-hash of the form',
  387. 'example' => 'q72GGqbfbLBC6xNB',
  388. ],
  389. 'name' => [
  390. 'since' => '21.0.1',
  391. 'required' => true,
  392. 'description' => 'The title of the form',
  393. 'example' => 'Nice Form',
  394. ],
  395. 'link' => [
  396. 'since' => '21.0.1',
  397. 'required' => true,
  398. 'description' => 'The full URL to the board',
  399. 'example' => 'http://localhost/index.php/apps/forms/q72GGqbfbLBC6xNB',
  400. ],
  401. ],
  402. ],
  403. 'guest' => [
  404. 'author' => 'Nextcloud',
  405. 'app' => 'spreed',
  406. 'since' => '17.0.0',
  407. 'parameters' => [
  408. 'id' => [
  409. 'since' => '17.0.0',
  410. 'required' => true,
  411. 'description' => 'The id used to identify the guest user',
  412. 'example' => '42',
  413. ],
  414. 'name' => [
  415. 'since' => '17.0.0',
  416. 'required' => true,
  417. 'description' => 'Potential displayname of the guest user',
  418. 'example' => 'Foobar Cats',
  419. ],
  420. ],
  421. ],
  422. 'highlight' => [
  423. 'author' => 'Nextcloud',
  424. 'app' => 'core',
  425. 'since' => '13.0.0',
  426. 'parameters' => [
  427. 'id' => [
  428. 'since' => '13.0.0',
  429. 'required' => true,
  430. 'description' => 'The id used to identify the highlighted object on the instance',
  431. 'example' => '42',
  432. ],
  433. 'name' => [
  434. 'since' => '13.0.0',
  435. 'required' => true,
  436. 'description' => 'The string that should be highlighted.',
  437. 'example' => 'Hello World',
  438. ],
  439. 'link' => [
  440. 'since' => '13.0.0',
  441. 'required' => false,
  442. 'description' => 'The full URL that should be opened when clicking the highlighted text.',
  443. 'example' => 'http://localhost/index.php/f/42',
  444. ],
  445. ],
  446. ],
  447. 'geo-location' => [
  448. 'author' => 'Nextcloud',
  449. 'app' => 'core',
  450. 'since' => '22.0.0',
  451. 'parameters' => [
  452. 'id' => [
  453. 'since' => '22.0.0',
  454. 'required' => true,
  455. 'description' => 'The geo URI (https://en.wikipedia.org/wiki/Geo_URI_scheme) to identify the location',
  456. 'example' => 'geo:52.5450511,13.3741463',
  457. ],
  458. 'name' => [
  459. 'since' => '22.0.0',
  460. 'required' => true,
  461. 'description' => 'A description of the location',
  462. 'example' => 'Nextcloud Berlin Office',
  463. ],
  464. 'latitude' => [
  465. 'since' => '22.0.0',
  466. 'required' => true,
  467. 'description' => 'The latitude of the location MUST be the same as in the id',
  468. 'example' => '52.5450511',
  469. ],
  470. 'longitude' => [
  471. 'since' => '22.0.0',
  472. 'required' => true,
  473. 'description' => 'The longitude of the location MUST be the same as in the id',
  474. 'example' => '13.3741463',
  475. ],
  476. ],
  477. ],
  478. 'open-graph' => [
  479. 'author' => 'Maxence Lange',
  480. 'app' => 'mood',
  481. 'since' => '12.0.0',
  482. 'parameters' => [
  483. 'id' => [
  484. 'since' => '12.0.0',
  485. 'required' => true,
  486. 'description' => 'The id used to identify the open graph data on the instance',
  487. 'example' => '42',
  488. ],
  489. 'name' => [
  490. 'since' => '12.0.0',
  491. 'required' => true,
  492. 'description' => 'The open graph title of the website',
  493. 'example' => 'This is a website',
  494. ],
  495. 'description' => [
  496. 'since' => '12.0.0',
  497. 'required' => false,
  498. 'description' => 'The open graph description from the website',
  499. 'example' => 'This is the description of the website',
  500. ],
  501. 'thumb' => [
  502. 'since' => '12.0.0',
  503. 'required' => false,
  504. 'description' => 'The full URL of the open graph thumbnail',
  505. 'example' => 'http://localhost/index.php/apps/mood/data/image?url=https%3A%2F%2Fthumb.example.com%2Fimage.png',
  506. ],
  507. 'website' => [
  508. 'since' => '12.0.0',
  509. 'required' => false,
  510. 'description' => 'The name of the described website',
  511. 'example' => 'Nextcloud - App Store',
  512. ],
  513. 'link' => [
  514. 'since' => '12.0.0',
  515. 'required' => false,
  516. 'description' => 'The full link to the website',
  517. 'example' => 'https://apps.nextcloud.com/apps/mood',
  518. ],
  519. ],
  520. ],
  521. 'pending-federated-share' => [
  522. 'author' => 'Nextcloud',
  523. 'app' => 'dav',
  524. 'since' => '11.0.0',
  525. 'parameters' => [
  526. 'id' => [
  527. 'since' => '11.0.0',
  528. 'required' => true,
  529. 'description' => 'The id used to identify the federated share on the instance',
  530. 'example' => '42',
  531. ],
  532. 'name' => [
  533. 'since' => '11.0.0',
  534. 'required' => true,
  535. 'description' => 'The name of the shared item which should be used in the visual representation',
  536. 'example' => 'file.txt',
  537. ],
  538. ],
  539. ],
  540. 'systemtag' => [
  541. 'author' => 'Nextcloud',
  542. 'app' => 'core',
  543. 'since' => '11.0.0',
  544. 'parameters' => [
  545. 'id' => [
  546. 'since' => '11.0.0',
  547. 'required' => true,
  548. 'description' => 'The id used to identify the systemtag on the instance',
  549. 'example' => '23',
  550. ],
  551. 'name' => [
  552. 'since' => '11.0.0',
  553. 'required' => true,
  554. 'description' => 'The display name of the systemtag which should be used in the visual representation',
  555. 'example' => 'Project 1',
  556. ],
  557. 'visibility' => [
  558. 'since' => '11.0.0',
  559. 'required' => true,
  560. 'description' => 'If the user can see the systemtag',
  561. 'example' => '1',
  562. ],
  563. 'assignable' => [
  564. 'since' => '11.0.0',
  565. 'required' => true,
  566. 'description' => 'If the user can assign the systemtag',
  567. 'example' => '0',
  568. ],
  569. ],
  570. ],
  571. 'talk-attachment' => [
  572. 'author' => 'Nextcloud',
  573. 'app' => 'talk',
  574. 'since' => '18.0.0',
  575. 'parameters' => [
  576. 'id' => [
  577. 'since' => '18.0.0',
  578. 'required' => true,
  579. 'description' => 'The id used to identify the attachment on the instance',
  580. 'example' => '12345',
  581. ],
  582. 'name' => [
  583. 'since' => '18.0.0',
  584. 'required' => true,
  585. 'description' => 'The name of the attachment',
  586. 'example' => 'John Doe',
  587. ],
  588. 'conversation' => [
  589. 'since' => '18.0.0',
  590. 'required' => true,
  591. 'description' => 'The token of the conversation',
  592. 'example' => 'a1b2c3d4',
  593. ],
  594. 'mimetype' => [
  595. 'since' => '18.0.0',
  596. 'required' => false,
  597. 'description' => 'The mimetype of the file/folder to allow clients to show a placeholder',
  598. 'example' => 'text/plain',
  599. ],
  600. 'preview-available' => [
  601. 'since' => '18.0.0',
  602. 'required' => false,
  603. 'description' => 'Whether or not a preview is available. If `no` the mimetype icon should be used',
  604. 'example' => 'yes',
  605. ],
  606. ],
  607. ],
  608. 'talk-poll' => [
  609. 'author' => 'Nextcloud',
  610. 'app' => 'talk',
  611. 'since' => '25.0.0',
  612. 'parameters' => [
  613. 'id' => [
  614. 'since' => '25.0.0',
  615. 'required' => true,
  616. 'description' => 'The id used to identify the poll on the instance',
  617. 'example' => '12345',
  618. ],
  619. 'name' => [
  620. 'since' => '25.0.0',
  621. 'required' => true,
  622. 'description' => 'The poll question',
  623. 'example' => 'What is the question?',
  624. ],
  625. ],
  626. ],
  627. 'user' => [
  628. 'author' => 'Nextcloud',
  629. 'app' => 'core',
  630. 'since' => '11.0.0',
  631. 'parameters' => [
  632. 'id' => [
  633. 'since' => '11.0.0',
  634. 'required' => true,
  635. 'description' => 'The id used to identify the user on the instance',
  636. 'example' => 'johndoe',
  637. ],
  638. 'name' => [
  639. 'since' => '11.0.0',
  640. 'required' => true,
  641. 'description' => 'The display name of the user which should be used in the visual representation',
  642. 'example' => 'John Doe',
  643. ],
  644. 'server' => [
  645. 'since' => '11.0.0',
  646. 'required' => false,
  647. 'description' => 'The URL of the instance the user lives on',
  648. 'example' => 'localhost',
  649. ],
  650. ],
  651. ],
  652. 'user-group' => [
  653. 'author' => 'Nextcloud',
  654. 'app' => 'core',
  655. 'since' => '11.0.0',
  656. 'parameters' => [
  657. 'id' => [
  658. 'since' => '11.0.0',
  659. 'required' => true,
  660. 'description' => 'The id used to identify the group on the instance',
  661. 'example' => 'supportteam',
  662. ],
  663. 'name' => [
  664. 'since' => '11.0.0',
  665. 'required' => true,
  666. 'description' => 'The display name of the group which should be used in the visual representation',
  667. 'example' => 'Support Team',
  668. ],
  669. ],
  670. ],
  671. ];
  672. /**
  673. * @param string $type
  674. * @return array
  675. * @throws InvalidObjectExeption
  676. * @since 11.0.0
  677. */
  678. public function getDefinition($type) {
  679. if (isset($this->definitions[$type])) {
  680. return $this->definitions[$type];
  681. }
  682. throw new InvalidObjectExeption('Object type is undefined');
  683. }
  684. }