A framework for building convergent cross-platform Nextcloud clients using Flutter.
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.

616 lines
13 KiB

3 years ago
{
"openapi": "3.1.0",
3 years ago
"info": {
"title": "User status",
"version": "1.6.0",
3 years ago
"description": "User status",
"license": {
"name": "agpl",
"identifier": "AGPL-3.0"
3 years ago
}
},
"servers": [
{
"url": "https://{hostname}:{port}",
3 years ago
"variables": {
"hostname": {
"default": "localhost"
},
"port": {
"default": "8080"
}
}
}
],
"security": [
{
"basic_auth": []
}
],
"tags": [],
3 years ago
"components": {
"schemas": {
"OCSMeta": {
"type": "object",
"required": [
"status",
"statuscode"
],
"properties": {
"status": {
"type": "string"
},
"statuscode": {
"type": "integer"
},
"message": {
"type": "string"
},
"totalitems": {
"type": "string"
},
"itemsperpage": {
"type": "string"
}
}
3 years ago
},
"EmptyOCS": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "array"
}
}
}
}
},
"PredefinedStatuses": {
3 years ago
"type": "object",
"required": [
"ocs"
],
3 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
3 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PredefinedStatus"
3 years ago
}
}
}
}
}
},
"PredefinedStatus": {
3 years ago
"type": "object",
"required": [
"id",
"icon",
"message",
"clearAt"
],
3 years ago
"properties": {
"id": {
"type": "string"
},
"icon": {
"type": "string"
},
"message": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/ClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
3 years ago
}
}
},
"ClearAt": {
3 years ago
"type": "object",
"required": [
"type",
"time"
],
3 years ago
"properties": {
"type": {
"type": "string",
"enum": [
"period",
"end-of"
]
3 years ago
},
"time": {
"oneOf": [
{
"type": "string",
"enum": [
"day",
"week"
]
},
{
"type": "integer",
"description": "Time offset in seconds"
}
]
3 years ago
}
}
},
"Type": {
3 years ago
"type": "string",
"enum": [
"online",
"offline",
"dnd",
"away",
"invisible"
]
},
"GetStatus": {
3 years ago
"type": "object",
"required": [
"ocs"
],
3 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
3 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/Status"
}
]
3 years ago
}
}
}
}
},
"GetPublicStatuses": {
3 years ago
"type": "object",
"required": [
"ocs"
],
3 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
3 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PublicStatus"
3 years ago
}
}
}
}
}
},
"GetPublicStatus": {
3 years ago
"type": "object",
"required": [
"ocs"
],
3 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
3 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/PublicStatus"
}
]
3 years ago
}
}
}
}
},
"Status": {
3 years ago
"type": "object",
"required": [
"userId",
"messageIsPredefined",
"clearAt",
"status",
"statusIsUserDefined"
],
3 years ago
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"messageId": {
"type": "string"
},
"messageIsPredefined": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/ClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
3 years ago
},
"status": {
"$ref": "#/components/schemas/Type"
3 years ago
},
"statusIsUserDefined": {
"type": "boolean"
}
}
},
"PublicStatus": {
3 years ago
"type": "object",
"required": [
"userId",
"clearAt",
"status"
],
3 years ago
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"icon": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/ClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
3 years ago
},
"status": {
"$ref": "#/components/schemas/Type"
3 years ago
}
}
},
"Heartbeat": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"$ref": "#/components/schemas/Status"
}
}
}
}
3 years ago
}
},
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
}
3 years ago
}
},
"paths": {
"/ocs/v2.php/apps/user_status/api/v1/statuses": {
3 years ago
"get": {
"operationId": "get-public-statuses",
"tags": [
"user_status"
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPublicStatuses"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": {
3 years ago
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"operationId": "get-public-status",
"tags": [
"user_status"
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPublicStatus"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status": {
3 years ago
"get": {
"operationId": "get-status",
"tags": [
"user_status"
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStatus"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/status": {
3 years ago
"put": {
"operationId": "set-status",
"tags": [
"user_status"
],
"parameters": [
{
"name": "statusType",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/Type"
3 years ago
}
}
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStatus"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": {
3 years ago
"put": {
"operationId": "set-predefined-message",
"tags": [
"user_status"
],
"parameters": [
{
"name": "messageId",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "clearAt",
"in": "query",
"required": false,
"schema": {
"type": "integer"
3 years ago
}
}
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStatus"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": {
3 years ago
"put": {
"operationId": "set-custom-message",
"tags": [
"user_status"
],
"parameters": [
{
"name": "statusIcon",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "message",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "clearAt",
"in": "query",
"required": false,
"schema": {
"type": "integer"
3 years ago
}
}
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStatus"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message": {
3 years ago
"delete": {
"operationId": "clear-message",
"tags": [
"user_status"
],
3 years ago
"responses": {
"200": {
"description": ""
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": {
3 years ago
"get": {
"operationId": "get-predefined-statuses",
"tags": [
"user_status"
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PredefinedStatuses"
3 years ago
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/heartbeat": {
3 years ago
"put": {
"operationId": "heartbeat",
"tags": [
"user_status"
],
"parameters": [
{
"name": "status",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/Type"
3 years ago
}
}
],
3 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Heartbeat"
}
}
}
3 years ago
}
}
}
}
}
}