You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1475 lines
62 KiB

  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "user_status",
  5. "version": "0.0.1",
  6. "description": "User status",
  7. "license": {
  8. "name": "agpl"
  9. }
  10. },
  11. "components": {
  12. "securitySchemes": {
  13. "basic_auth": {
  14. "type": "http",
  15. "scheme": "basic"
  16. },
  17. "bearer_auth": {
  18. "type": "http",
  19. "scheme": "bearer"
  20. }
  21. },
  22. "schemas": {
  23. "Capabilities": {
  24. "type": "object",
  25. "required": [
  26. "user_status"
  27. ],
  28. "properties": {
  29. "user_status": {
  30. "type": "object",
  31. "required": [
  32. "enabled",
  33. "restore",
  34. "supports_emoji",
  35. "supports_busy"
  36. ],
  37. "properties": {
  38. "enabled": {
  39. "type": "boolean"
  40. },
  41. "restore": {
  42. "type": "boolean"
  43. },
  44. "supports_emoji": {
  45. "type": "boolean"
  46. },
  47. "supports_busy": {
  48. "type": "boolean"
  49. }
  50. }
  51. }
  52. }
  53. },
  54. "ClearAt": {
  55. "type": "object",
  56. "required": [
  57. "type",
  58. "time"
  59. ],
  60. "properties": {
  61. "type": {
  62. "type": "string",
  63. "enum": [
  64. "period",
  65. "end-of"
  66. ]
  67. },
  68. "time": {
  69. "anyOf": [
  70. {
  71. "type": "integer",
  72. "format": "int64"
  73. },
  74. {
  75. "$ref": "#/components/schemas/ClearAtTimeType"
  76. }
  77. ]
  78. }
  79. }
  80. },
  81. "ClearAtTimeType": {
  82. "type": "string",
  83. "enum": [
  84. "day",
  85. "week"
  86. ]
  87. },
  88. "OCSMeta": {
  89. "type": "object",
  90. "required": [
  91. "status",
  92. "statuscode"
  93. ],
  94. "properties": {
  95. "status": {
  96. "type": "string"
  97. },
  98. "statuscode": {
  99. "type": "integer"
  100. },
  101. "message": {
  102. "type": "string"
  103. },
  104. "totalitems": {
  105. "type": "string"
  106. },
  107. "itemsperpage": {
  108. "type": "string"
  109. }
  110. }
  111. },
  112. "Predefined": {
  113. "type": "object",
  114. "required": [
  115. "id",
  116. "icon",
  117. "message",
  118. "clearAt"
  119. ],
  120. "properties": {
  121. "id": {
  122. "type": "string"
  123. },
  124. "icon": {
  125. "type": "string"
  126. },
  127. "message": {
  128. "type": "string"
  129. },
  130. "clearAt": {
  131. "nullable": true,
  132. "allOf": [
  133. {
  134. "$ref": "#/components/schemas/ClearAt"
  135. }
  136. ]
  137. }
  138. }
  139. },
  140. "Private": {
  141. "allOf": [
  142. {
  143. "$ref": "#/components/schemas/Public"
  144. },
  145. {
  146. "type": "object",
  147. "required": [
  148. "messageId",
  149. "messageIsPredefined",
  150. "statusIsUserDefined"
  151. ],
  152. "properties": {
  153. "messageId": {
  154. "type": "string",
  155. "nullable": true
  156. },
  157. "messageIsPredefined": {
  158. "type": "boolean"
  159. },
  160. "statusIsUserDefined": {
  161. "type": "boolean"
  162. }
  163. }
  164. }
  165. ]
  166. },
  167. "Public": {
  168. "type": "object",
  169. "required": [
  170. "userId",
  171. "message",
  172. "icon",
  173. "clearAt",
  174. "status"
  175. ],
  176. "properties": {
  177. "userId": {
  178. "type": "string"
  179. },
  180. "message": {
  181. "type": "string",
  182. "nullable": true
  183. },
  184. "icon": {
  185. "type": "string",
  186. "nullable": true
  187. },
  188. "clearAt": {
  189. "type": "integer",
  190. "format": "int64",
  191. "nullable": true
  192. },
  193. "status": {
  194. "$ref": "#/components/schemas/Type"
  195. }
  196. }
  197. },
  198. "Type": {
  199. "type": "string",
  200. "enum": [
  201. "online",
  202. "away",
  203. "dnd",
  204. "busy",
  205. "offline",
  206. "invisible"
  207. ]
  208. }
  209. }
  210. },
  211. "paths": {
  212. "/ocs/v2.php/apps/user_status/api/v1/heartbeat": {
  213. "put": {
  214. "operationId": "heartbeat-heartbeat",
  215. "summary": "Keep the status alive",
  216. "tags": [
  217. "heartbeat"
  218. ],
  219. "security": [
  220. {
  221. "bearer_auth": []
  222. },
  223. {
  224. "basic_auth": []
  225. }
  226. ],
  227. "requestBody": {
  228. "required": true,
  229. "content": {
  230. "application/json": {
  231. "schema": {
  232. "type": "object",
  233. "required": [
  234. "status"
  235. ],
  236. "properties": {
  237. "status": {
  238. "type": "string",
  239. "description": "Only online, away"
  240. }
  241. }
  242. }
  243. }
  244. }
  245. },
  246. "parameters": [
  247. {
  248. "name": "OCS-APIRequest",
  249. "in": "header",
  250. "description": "Required to be true for the API request to pass",
  251. "required": true,
  252. "schema": {
  253. "type": "boolean",
  254. "default": true
  255. }
  256. }
  257. ],
  258. "responses": {
  259. "200": {
  260. "description": "Status successfully updated",
  261. "content": {
  262. "application/json": {
  263. "schema": {
  264. "type": "object",
  265. "required": [
  266. "ocs"
  267. ],
  268. "properties": {
  269. "ocs": {
  270. "type": "object",
  271. "required": [
  272. "meta",
  273. "data"
  274. ],
  275. "properties": {
  276. "meta": {
  277. "$ref": "#/components/schemas/OCSMeta"
  278. },
  279. "data": {
  280. "$ref": "#/components/schemas/Private"
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. },
  289. "400": {
  290. "description": "Invalid status to update",
  291. "content": {
  292. "application/json": {
  293. "schema": {
  294. "type": "object",
  295. "required": [
  296. "ocs"
  297. ],
  298. "properties": {
  299. "ocs": {
  300. "type": "object",
  301. "required": [
  302. "meta",
  303. "data"
  304. ],
  305. "properties": {
  306. "meta": {
  307. "$ref": "#/components/schemas/OCSMeta"
  308. },
  309. "data": {}
  310. }
  311. }
  312. }
  313. }
  314. }
  315. }
  316. },
  317. "500": {
  318. "description": "",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "type": "object",
  323. "required": [
  324. "ocs"
  325. ],
  326. "properties": {
  327. "ocs": {
  328. "type": "object",
  329. "required": [
  330. "meta",
  331. "data"
  332. ],
  333. "properties": {
  334. "meta": {
  335. "$ref": "#/components/schemas/OCSMeta"
  336. },
  337. "data": {}
  338. }
  339. }
  340. }
  341. }
  342. }
  343. }
  344. },
  345. "204": {
  346. "description": "User has no status to keep alive"
  347. },
  348. "401": {
  349. "description": "Current user is not logged in",
  350. "content": {
  351. "application/json": {
  352. "schema": {
  353. "type": "object",
  354. "required": [
  355. "ocs"
  356. ],
  357. "properties": {
  358. "ocs": {
  359. "type": "object",
  360. "required": [
  361. "meta",
  362. "data"
  363. ],
  364. "properties": {
  365. "meta": {
  366. "$ref": "#/components/schemas/OCSMeta"
  367. },
  368. "data": {}
  369. }
  370. }
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. },
  379. "/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": {
  380. "get": {
  381. "operationId": "predefined_status-find-all",
  382. "summary": "Get all predefined messages",
  383. "tags": [
  384. "predefined_status"
  385. ],
  386. "security": [
  387. {
  388. "bearer_auth": []
  389. },
  390. {
  391. "basic_auth": []
  392. }
  393. ],
  394. "parameters": [
  395. {
  396. "name": "OCS-APIRequest",
  397. "in": "header",
  398. "description": "Required to be true for the API request to pass",
  399. "required": true,
  400. "schema": {
  401. "type": "boolean",
  402. "default": true
  403. }
  404. }
  405. ],
  406. "responses": {
  407. "200": {
  408. "description": "Predefined statuses returned",
  409. "content": {
  410. "application/json": {
  411. "schema": {
  412. "type": "object",
  413. "required": [
  414. "ocs"
  415. ],
  416. "properties": {
  417. "ocs": {
  418. "type": "object",
  419. "required": [
  420. "meta",
  421. "data"
  422. ],
  423. "properties": {
  424. "meta": {
  425. "$ref": "#/components/schemas/OCSMeta"
  426. },
  427. "data": {
  428. "type": "array",
  429. "items": {
  430. "$ref": "#/components/schemas/Predefined"
  431. }
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. },
  440. "401": {
  441. "description": "Current user is not logged in",
  442. "content": {
  443. "application/json": {
  444. "schema": {
  445. "type": "object",
  446. "required": [
  447. "ocs"
  448. ],
  449. "properties": {
  450. "ocs": {
  451. "type": "object",
  452. "required": [
  453. "meta",
  454. "data"
  455. ],
  456. "properties": {
  457. "meta": {
  458. "$ref": "#/components/schemas/OCSMeta"
  459. },
  460. "data": {}
  461. }
  462. }
  463. }
  464. }
  465. }
  466. }
  467. }
  468. }
  469. }
  470. },
  471. "/ocs/v2.php/apps/user_status/api/v1/statuses": {
  472. "get": {
  473. "operationId": "statuses-find-all",
  474. "summary": "Find statuses of users",
  475. "tags": [
  476. "statuses"
  477. ],
  478. "security": [
  479. {
  480. "bearer_auth": []
  481. },
  482. {
  483. "basic_auth": []
  484. }
  485. ],
  486. "parameters": [
  487. {
  488. "name": "limit",
  489. "in": "query",
  490. "description": "Maximum number of statuses to find",
  491. "schema": {
  492. "type": "integer",
  493. "format": "int64",
  494. "nullable": true,
  495. "default": null
  496. }
  497. },
  498. {
  499. "name": "offset",
  500. "in": "query",
  501. "description": "Offset for finding statuses",
  502. "schema": {
  503. "type": "integer",
  504. "format": "int64",
  505. "nullable": true,
  506. "default": null,
  507. "minimum": 0
  508. }
  509. },
  510. {
  511. "name": "OCS-APIRequest",
  512. "in": "header",
  513. "description": "Required to be true for the API request to pass",
  514. "required": true,
  515. "schema": {
  516. "type": "boolean",
  517. "default": true
  518. }
  519. }
  520. ],
  521. "responses": {
  522. "200": {
  523. "description": "Statuses returned",
  524. "content": {
  525. "application/json": {
  526. "schema": {
  527. "type": "object",
  528. "required": [
  529. "ocs"
  530. ],
  531. "properties": {
  532. "ocs": {
  533. "type": "object",
  534. "required": [
  535. "meta",
  536. "data"
  537. ],
  538. "properties": {
  539. "meta": {
  540. "$ref": "#/components/schemas/OCSMeta"
  541. },
  542. "data": {
  543. "type": "array",
  544. "items": {
  545. "$ref": "#/components/schemas/Public"
  546. }
  547. }
  548. }
  549. }
  550. }
  551. }
  552. }
  553. }
  554. },
  555. "401": {
  556. "description": "Current user is not logged in",
  557. "content": {
  558. "application/json": {
  559. "schema": {
  560. "type": "object",
  561. "required": [
  562. "ocs"
  563. ],
  564. "properties": {
  565. "ocs": {
  566. "type": "object",
  567. "required": [
  568. "meta",
  569. "data"
  570. ],
  571. "properties": {
  572. "meta": {
  573. "$ref": "#/components/schemas/OCSMeta"
  574. },
  575. "data": {}
  576. }
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. }
  584. }
  585. },
  586. "/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": {
  587. "get": {
  588. "operationId": "statuses-find",
  589. "summary": "Find the status of a user",
  590. "tags": [
  591. "statuses"
  592. ],
  593. "security": [
  594. {
  595. "bearer_auth": []
  596. },
  597. {
  598. "basic_auth": []
  599. }
  600. ],
  601. "parameters": [
  602. {
  603. "name": "userId",
  604. "in": "path",
  605. "description": "ID of the user",
  606. "required": true,
  607. "schema": {
  608. "type": "string"
  609. }
  610. },
  611. {
  612. "name": "OCS-APIRequest",
  613. "in": "header",
  614. "description": "Required to be true for the API request to pass",
  615. "required": true,
  616. "schema": {
  617. "type": "boolean",
  618. "default": true
  619. }
  620. }
  621. ],
  622. "responses": {
  623. "200": {
  624. "description": "Status returned",
  625. "content": {
  626. "application/json": {
  627. "schema": {
  628. "type": "object",
  629. "required": [
  630. "ocs"
  631. ],
  632. "properties": {
  633. "ocs": {
  634. "type": "object",
  635. "required": [
  636. "meta",
  637. "data"
  638. ],
  639. "properties": {
  640. "meta": {
  641. "$ref": "#/components/schemas/OCSMeta"
  642. },
  643. "data": {
  644. "$ref": "#/components/schemas/Public"
  645. }
  646. }
  647. }
  648. }
  649. }
  650. }
  651. }
  652. },
  653. "404": {
  654. "description": "The user was not found",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "type": "object",
  659. "required": [
  660. "ocs"
  661. ],
  662. "properties": {
  663. "ocs": {
  664. "type": "object",
  665. "required": [
  666. "meta",
  667. "data"
  668. ],
  669. "properties": {
  670. "meta": {
  671. "$ref": "#/components/schemas/OCSMeta"
  672. },
  673. "data": {}
  674. }
  675. }
  676. }
  677. }
  678. }
  679. }
  680. },
  681. "401": {
  682. "description": "Current user is not logged in",
  683. "content": {
  684. "application/json": {
  685. "schema": {
  686. "type": "object",
  687. "required": [
  688. "ocs"
  689. ],
  690. "properties": {
  691. "ocs": {
  692. "type": "object",
  693. "required": [
  694. "meta",
  695. "data"
  696. ],
  697. "properties": {
  698. "meta": {
  699. "$ref": "#/components/schemas/OCSMeta"
  700. },
  701. "data": {}
  702. }
  703. }
  704. }
  705. }
  706. }
  707. }
  708. }
  709. }
  710. }
  711. },
  712. "/ocs/v2.php/apps/user_status/api/v1/user_status": {
  713. "get": {
  714. "operationId": "user_status-get-status",
  715. "summary": "Get the status of the current user",
  716. "tags": [
  717. "user_status"
  718. ],
  719. "security": [
  720. {
  721. "bearer_auth": []
  722. },
  723. {
  724. "basic_auth": []
  725. }
  726. ],
  727. "parameters": [
  728. {
  729. "name": "OCS-APIRequest",
  730. "in": "header",
  731. "description": "Required to be true for the API request to pass",
  732. "required": true,
  733. "schema": {
  734. "type": "boolean",
  735. "default": true
  736. }
  737. }
  738. ],
  739. "responses": {
  740. "200": {
  741. "description": "The status was found successfully",
  742. "content": {
  743. "application/json": {
  744. "schema": {
  745. "type": "object",
  746. "required": [
  747. "ocs"
  748. ],
  749. "properties": {
  750. "ocs": {
  751. "type": "object",
  752. "required": [
  753. "meta",
  754. "data"
  755. ],
  756. "properties": {
  757. "meta": {
  758. "$ref": "#/components/schemas/OCSMeta"
  759. },
  760. "data": {
  761. "$ref": "#/components/schemas/Private"
  762. }
  763. }
  764. }
  765. }
  766. }
  767. }
  768. }
  769. },
  770. "404": {
  771. "description": "The user was not found",
  772. "content": {
  773. "application/json": {
  774. "schema": {
  775. "type": "object",
  776. "required": [
  777. "ocs"
  778. ],
  779. "properties": {
  780. "ocs": {
  781. "type": "object",
  782. "required": [
  783. "meta",
  784. "data"
  785. ],
  786. "properties": {
  787. "meta": {
  788. "$ref": "#/components/schemas/OCSMeta"
  789. },
  790. "data": {}
  791. }
  792. }
  793. }
  794. }
  795. }
  796. }
  797. },
  798. "401": {
  799. "description": "Current user is not logged in",
  800. "content": {
  801. "application/json": {
  802. "schema": {
  803. "type": "object",
  804. "required": [
  805. "ocs"
  806. ],
  807. "properties": {
  808. "ocs": {
  809. "type": "object",
  810. "required": [
  811. "meta",
  812. "data"
  813. ],
  814. "properties": {
  815. "meta": {
  816. "$ref": "#/components/schemas/OCSMeta"
  817. },
  818. "data": {}
  819. }
  820. }
  821. }
  822. }
  823. }
  824. }
  825. }
  826. }
  827. }
  828. },
  829. "/ocs/v2.php/apps/user_status/api/v1/user_status/status": {
  830. "put": {
  831. "operationId": "user_status-set-status",
  832. "summary": "Update the status type of the current user",
  833. "tags": [
  834. "user_status"
  835. ],
  836. "security": [
  837. {
  838. "bearer_auth": []
  839. },
  840. {
  841. "basic_auth": []
  842. }
  843. ],
  844. "requestBody": {
  845. "required": true,
  846. "content": {
  847. "application/json": {
  848. "schema": {
  849. "type": "object",
  850. "required": [
  851. "statusType"
  852. ],
  853. "properties": {
  854. "statusType": {
  855. "type": "string",
  856. "description": "The new status type"
  857. }
  858. }
  859. }
  860. }
  861. }
  862. },
  863. "parameters": [
  864. {
  865. "name": "OCS-APIRequest",
  866. "in": "header",
  867. "description": "Required to be true for the API request to pass",
  868. "required": true,
  869. "schema": {
  870. "type": "boolean",
  871. "default": true
  872. }
  873. }
  874. ],
  875. "responses": {
  876. "200": {
  877. "description": "The status was updated successfully",
  878. "content": {
  879. "application/json": {
  880. "schema": {
  881. "type": "object",
  882. "required": [
  883. "ocs"
  884. ],
  885. "properties": {
  886. "ocs": {
  887. "type": "object",
  888. "required": [
  889. "meta",
  890. "data"
  891. ],
  892. "properties": {
  893. "meta": {
  894. "$ref": "#/components/schemas/OCSMeta"
  895. },
  896. "data": {
  897. "$ref": "#/components/schemas/Private"
  898. }
  899. }
  900. }
  901. }
  902. }
  903. }
  904. }
  905. },
  906. "400": {
  907. "description": "The status type is invalid",
  908. "content": {
  909. "application/json": {
  910. "schema": {
  911. "type": "object",
  912. "required": [
  913. "ocs"
  914. ],
  915. "properties": {
  916. "ocs": {
  917. "type": "object",
  918. "required": [
  919. "meta",
  920. "data"
  921. ],
  922. "properties": {
  923. "meta": {
  924. "$ref": "#/components/schemas/OCSMeta"
  925. },
  926. "data": {}
  927. }
  928. }
  929. }
  930. }
  931. }
  932. }
  933. },
  934. "401": {
  935. "description": "Current user is not logged in",
  936. "content": {
  937. "application/json": {
  938. "schema": {
  939. "type": "object",
  940. "required": [
  941. "ocs"
  942. ],
  943. "properties": {
  944. "ocs": {
  945. "type": "object",
  946. "required": [
  947. "meta",
  948. "data"
  949. ],
  950. "properties": {
  951. "meta": {
  952. "$ref": "#/components/schemas/OCSMeta"
  953. },
  954. "data": {}
  955. }
  956. }
  957. }
  958. }
  959. }
  960. }
  961. }
  962. }
  963. }
  964. },
  965. "/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": {
  966. "put": {
  967. "operationId": "user_status-set-predefined-message",
  968. "summary": "Set the message to a predefined message for the current user",
  969. "tags": [
  970. "user_status"
  971. ],
  972. "security": [
  973. {
  974. "bearer_auth": []
  975. },
  976. {
  977. "basic_auth": []
  978. }
  979. ],
  980. "requestBody": {
  981. "required": true,
  982. "content": {
  983. "application/json": {
  984. "schema": {
  985. "type": "object",
  986. "required": [
  987. "messageId"
  988. ],
  989. "properties": {
  990. "messageId": {
  991. "type": "string",
  992. "description": "ID of the predefined message"
  993. },
  994. "clearAt": {
  995. "type": "integer",
  996. "format": "int64",
  997. "nullable": true,
  998. "description": "When the message should be cleared"
  999. }
  1000. }
  1001. }
  1002. }
  1003. }
  1004. },
  1005. "parameters": [
  1006. {
  1007. "name": "OCS-APIRequest",
  1008. "in": "header",
  1009. "description": "Required to be true for the API request to pass",
  1010. "required": true,
  1011. "schema": {
  1012. "type": "boolean",
  1013. "default": true
  1014. }
  1015. }
  1016. ],
  1017. "responses": {
  1018. "200": {
  1019. "description": "The message was updated successfully",
  1020. "content": {
  1021. "application/json": {
  1022. "schema": {
  1023. "type": "object",
  1024. "required": [
  1025. "ocs"
  1026. ],
  1027. "properties": {
  1028. "ocs": {
  1029. "type": "object",
  1030. "required": [
  1031. "meta",
  1032. "data"
  1033. ],
  1034. "properties": {
  1035. "meta": {
  1036. "$ref": "#/components/schemas/OCSMeta"
  1037. },
  1038. "data": {
  1039. "$ref": "#/components/schemas/Private"
  1040. }
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. },
  1048. "400": {
  1049. "description": "The clearAt or message-id is invalid",
  1050. "content": {
  1051. "application/json": {
  1052. "schema": {
  1053. "type": "object",
  1054. "required": [
  1055. "ocs"
  1056. ],
  1057. "properties": {
  1058. "ocs": {
  1059. "type": "object",
  1060. "required": [
  1061. "meta",
  1062. "data"
  1063. ],
  1064. "properties": {
  1065. "meta": {
  1066. "$ref": "#/components/schemas/OCSMeta"
  1067. },
  1068. "data": {}
  1069. }
  1070. }
  1071. }
  1072. }
  1073. }
  1074. }
  1075. },
  1076. "401": {
  1077. "description": "Current user is not logged in",
  1078. "content": {
  1079. "application/json": {
  1080. "schema": {
  1081. "type": "object",
  1082. "required": [
  1083. "ocs"
  1084. ],
  1085. "properties": {
  1086. "ocs": {
  1087. "type": "object",
  1088. "required": [
  1089. "meta",
  1090. "data"
  1091. ],
  1092. "properties": {
  1093. "meta": {
  1094. "$ref": "#/components/schemas/OCSMeta"
  1095. },
  1096. "data": {}
  1097. }
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. }
  1104. }
  1105. }
  1106. },
  1107. "/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": {
  1108. "put": {
  1109. "operationId": "user_status-set-custom-message",
  1110. "summary": "Set the message to a custom message for the current user",
  1111. "tags": [
  1112. "user_status"
  1113. ],
  1114. "security": [
  1115. {
  1116. "bearer_auth": []
  1117. },
  1118. {
  1119. "basic_auth": []
  1120. }
  1121. ],
  1122. "requestBody": {
  1123. "required": false,
  1124. "content": {
  1125. "application/json": {
  1126. "schema": {
  1127. "type": "object",
  1128. "properties": {
  1129. "statusIcon": {
  1130. "type": "string",
  1131. "nullable": true,
  1132. "description": "Icon of the status"
  1133. },
  1134. "message": {
  1135. "type": "string",
  1136. "nullable": true,
  1137. "description": "Message of the status"
  1138. },
  1139. "clearAt": {
  1140. "type": "integer",
  1141. "format": "int64",
  1142. "nullable": true,
  1143. "description": "When the message should be cleared"
  1144. }
  1145. }
  1146. }
  1147. }
  1148. }
  1149. },
  1150. "parameters": [
  1151. {
  1152. "name": "OCS-APIRequest",
  1153. "in": "header",
  1154. "description": "Required to be true for the API request to pass",
  1155. "required": true,
  1156. "schema": {
  1157. "type": "boolean",
  1158. "default": true
  1159. }
  1160. }
  1161. ],
  1162. "responses": {
  1163. "200": {
  1164. "description": "The message was updated successfully",
  1165. "content": {
  1166. "application/json": {
  1167. "schema": {
  1168. "type": "object",
  1169. "required": [
  1170. "ocs"
  1171. ],
  1172. "properties": {
  1173. "ocs": {
  1174. "type": "object",
  1175. "required": [
  1176. "meta",
  1177. "data"
  1178. ],
  1179. "properties": {
  1180. "meta": {
  1181. "$ref": "#/components/schemas/OCSMeta"
  1182. },
  1183. "data": {
  1184. "$ref": "#/components/schemas/Private"
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. }
  1191. }
  1192. },
  1193. "400": {
  1194. "description": "The clearAt or icon is invalid or the message is too long",
  1195. "content": {
  1196. "application/json": {
  1197. "schema": {
  1198. "type": "object",
  1199. "required": [
  1200. "ocs"
  1201. ],
  1202. "properties": {
  1203. "ocs": {
  1204. "type": "object",
  1205. "required": [
  1206. "meta",
  1207. "data"
  1208. ],
  1209. "properties": {
  1210. "meta": {
  1211. "$ref": "#/components/schemas/OCSMeta"
  1212. },
  1213. "data": {}
  1214. }
  1215. }
  1216. }
  1217. }
  1218. }
  1219. }
  1220. },
  1221. "404": {
  1222. "description": "No status for the current user",
  1223. "content": {
  1224. "application/json": {
  1225. "schema": {
  1226. "type": "object",
  1227. "required": [
  1228. "ocs"
  1229. ],
  1230. "properties": {
  1231. "ocs": {
  1232. "type": "object",
  1233. "required": [
  1234. "meta",
  1235. "data"
  1236. ],
  1237. "properties": {
  1238. "meta": {
  1239. "$ref": "#/components/schemas/OCSMeta"
  1240. },
  1241. "data": {}
  1242. }
  1243. }
  1244. }
  1245. }
  1246. }
  1247. }
  1248. },
  1249. "401": {
  1250. "description": "Current user is not logged in",
  1251. "content": {
  1252. "application/json": {
  1253. "schema": {
  1254. "type": "object",
  1255. "required": [
  1256. "ocs"
  1257. ],
  1258. "properties": {
  1259. "ocs": {
  1260. "type": "object",
  1261. "required": [
  1262. "meta",
  1263. "data"
  1264. ],
  1265. "properties": {
  1266. "meta": {
  1267. "$ref": "#/components/schemas/OCSMeta"
  1268. },
  1269. "data": {}
  1270. }
  1271. }
  1272. }
  1273. }
  1274. }
  1275. }
  1276. }
  1277. }
  1278. }
  1279. },
  1280. "/ocs/v2.php/apps/user_status/api/v1/user_status/message": {
  1281. "delete": {
  1282. "operationId": "user_status-clear-message",
  1283. "summary": "Clear the message of the current user",
  1284. "tags": [
  1285. "user_status"
  1286. ],
  1287. "security": [
  1288. {
  1289. "bearer_auth": []
  1290. },
  1291. {
  1292. "basic_auth": []
  1293. }
  1294. ],
  1295. "parameters": [
  1296. {
  1297. "name": "OCS-APIRequest",
  1298. "in": "header",
  1299. "description": "Required to be true for the API request to pass",
  1300. "required": true,
  1301. "schema": {
  1302. "type": "boolean",
  1303. "default": true
  1304. }
  1305. }
  1306. ],
  1307. "responses": {
  1308. "200": {
  1309. "description": "Message cleared successfully",
  1310. "content": {
  1311. "application/json": {
  1312. "schema": {
  1313. "type": "object",
  1314. "required": [
  1315. "ocs"
  1316. ],
  1317. "properties": {
  1318. "ocs": {
  1319. "type": "object",
  1320. "required": [
  1321. "meta",
  1322. "data"
  1323. ],
  1324. "properties": {
  1325. "meta": {
  1326. "$ref": "#/components/schemas/OCSMeta"
  1327. },
  1328. "data": {}
  1329. }
  1330. }
  1331. }
  1332. }
  1333. }
  1334. }
  1335. },
  1336. "401": {
  1337. "description": "Current user is not logged in",
  1338. "content": {
  1339. "application/json": {
  1340. "schema": {
  1341. "type": "object",
  1342. "required": [
  1343. "ocs"
  1344. ],
  1345. "properties": {
  1346. "ocs": {
  1347. "type": "object",
  1348. "required": [
  1349. "meta",
  1350. "data"
  1351. ],
  1352. "properties": {
  1353. "meta": {
  1354. "$ref": "#/components/schemas/OCSMeta"
  1355. },
  1356. "data": {}
  1357. }
  1358. }
  1359. }
  1360. }
  1361. }
  1362. }
  1363. }
  1364. }
  1365. }
  1366. },
  1367. "/ocs/v2.php/apps/user_status/api/v1/user_status/revert/{messageId}": {
  1368. "delete": {
  1369. "operationId": "user_status-revert-status",
  1370. "summary": "Revert the status to the previous status",
  1371. "tags": [
  1372. "user_status"
  1373. ],
  1374. "security": [
  1375. {
  1376. "bearer_auth": []
  1377. },
  1378. {
  1379. "basic_auth": []
  1380. }
  1381. ],
  1382. "parameters": [
  1383. {
  1384. "name": "messageId",
  1385. "in": "path",
  1386. "description": "ID of the message to delete",
  1387. "required": true,
  1388. "schema": {
  1389. "type": "string"
  1390. }
  1391. },
  1392. {
  1393. "name": "OCS-APIRequest",
  1394. "in": "header",
  1395. "description": "Required to be true for the API request to pass",
  1396. "required": true,
  1397. "schema": {
  1398. "type": "boolean",
  1399. "default": true
  1400. }
  1401. }
  1402. ],
  1403. "responses": {
  1404. "200": {
  1405. "description": "Status reverted",
  1406. "content": {
  1407. "application/json": {
  1408. "schema": {
  1409. "type": "object",
  1410. "required": [
  1411. "ocs"
  1412. ],
  1413. "properties": {
  1414. "ocs": {
  1415. "type": "object",
  1416. "required": [
  1417. "meta",
  1418. "data"
  1419. ],
  1420. "properties": {
  1421. "meta": {
  1422. "$ref": "#/components/schemas/OCSMeta"
  1423. },
  1424. "data": {
  1425. "anyOf": [
  1426. {
  1427. "$ref": "#/components/schemas/Private"
  1428. },
  1429. {
  1430. "type": "array",
  1431. "maxItems": 0
  1432. }
  1433. ]
  1434. }
  1435. }
  1436. }
  1437. }
  1438. }
  1439. }
  1440. }
  1441. },
  1442. "401": {
  1443. "description": "Current user is not logged in",
  1444. "content": {
  1445. "application/json": {
  1446. "schema": {
  1447. "type": "object",
  1448. "required": [
  1449. "ocs"
  1450. ],
  1451. "properties": {
  1452. "ocs": {
  1453. "type": "object",
  1454. "required": [
  1455. "meta",
  1456. "data"
  1457. ],
  1458. "properties": {
  1459. "meta": {
  1460. "$ref": "#/components/schemas/OCSMeta"
  1461. },
  1462. "data": {}
  1463. }
  1464. }
  1465. }
  1466. }
  1467. }
  1468. }
  1469. }
  1470. }
  1471. }
  1472. }
  1473. },
  1474. "tags": []
  1475. }