Definitions.php 18 KB

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