Definitions.php 14 KB

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