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.

574 lines
13 KiB

2 years ago
{
"openapi": "3.1.0",
2 years ago
"info": {
"title": "User status",
"version": "1.5.0",
2 years ago
"description": "User status",
"license": {
"name": "agpl",
"identifier": " AGPL-3.0"
2 years ago
}
},
"servers": [
{
"url": "https://{hostname}:{port}",
2 years ago
"variables": {
"hostname": {
"default": "localhost"
},
"port": {
"default": "8080"
}
}
}
],
"security": [
{
"basic_auth": []
}
],
"tags": [
{
"name": "user_status"
}
],
2 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"
}
}
2 years ago
},
"UserStatusPredefinedStatuses": {
"type": "object",
"required": [
"ocs"
],
2 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
2 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserStatusPredefinedStatus"
}
}
}
}
}
},
"UserStatusPredefinedStatus": {
"type": "object",
"required": [
"id",
"icon",
"message",
"clearAt"
],
2 years ago
"properties": {
"id": {
"type": "string"
},
"icon": {
"type": "string"
},
"message": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
2 years ago
}
}
},
"UserStatusClearAt": {
"type": "object",
"required": [
"type",
"time"
],
2 years ago
"properties": {
"type": {
"type": "string",
"enum": [
"period",
"end-of"
]
2 years ago
},
"time": {
"oneOf": [
{
"type": "string",
"enum": [
"day",
"week"
]
},
{
"type": "integer",
"description": "Time offset in seconds"
}
]
2 years ago
}
}
},
"UserStatusType": {
2 years ago
"type": "string",
"enum": [
"online",
"offline",
"dnd",
"away",
"invisible"
]
},
"UserStatusGetUserStatus": {
"type": "object",
"required": [
"ocs"
],
2 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
2 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/UserStatus"
}
]
2 years ago
}
}
}
}
},
"UserStatusFindAllStatuses": {
"type": "object",
"required": [
"ocs"
],
2 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
2 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserStatusPublicUserStatus"
}
}
}
}
}
},
"UserStatusFindStatus": {
"type": "object",
"required": [
"ocs"
],
2 years ago
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
2 years ago
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/UserStatusPublicUserStatus"
}
]
2 years ago
}
}
}
}
},
"UserStatus": {
"type": "object",
"required": [
"userId",
"messageIsPredefined",
"clearAt",
"status",
"statusIsUserDefined"
],
2 years ago
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"messageId": {
"type": "string"
},
"messageIsPredefined": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
2 years ago
},
"status": {
"$ref": "#/components/schemas/UserStatusType"
2 years ago
},
"statusIsUserDefined": {
"type": "boolean"
}
}
},
"UserStatusPublicUserStatus": {
"type": "object",
"required": [
"userId",
"clearAt",
"status"
],
2 years ago
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"icon": {
"type": "string"
},
"clearAt": {
"anyOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},
{
"type": "integer",
"description": "Time as unix timestamp"
}
]
2 years ago
},
"status": {
"$ref": "#/components/schemas/UserStatusType"
2 years ago
}
}
}
},
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
}
2 years ago
}
},
"paths": {
"/ocs/v2.php/apps/user_status/api/v1/statuses": {
2 years ago
"get": {
"operationId": "find-all-statuses",
"tags": [
"user_status"
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusFindAllStatuses"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": {
2 years ago
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"operationId": "find-status",
"tags": [
"user_status"
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusFindStatus"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status": {
2 years ago
"get": {
"operationId": "get-status",
"tags": [
"user_status"
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusGetUserStatus"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/status": {
2 years ago
"put": {
"operationId": "set-status",
"tags": [
"user_status"
],
"parameters": [
{
"name": "statusType",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/UserStatusType"
2 years ago
}
}
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusGetUserStatus"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": {
2 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"
2 years ago
}
}
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusGetUserStatus"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": {
2 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"
2 years ago
}
}
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusGetUserStatus"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/user_status/message": {
2 years ago
"delete": {
"operationId": "clear-message",
"tags": [
"user_status"
],
2 years ago
"responses": {
"200": {
"description": ""
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": {
2 years ago
"get": {
"operationId": "find-all-predefined-statuses",
"tags": [
"user_status"
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatusPredefinedStatuses"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/user_status/api/v1/heartbeat": {
2 years ago
"put": {
"operationId": "heartbeat",
"tags": [
"user_status"
],
"parameters": [
{
"name": "status",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/UserStatusType"
2 years ago
}
}
],
2 years ago
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserStatus"
}
}
}
2 years ago
}
}
}
}
}
}