Definitions.php 14 KB

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