From cd12b3c5a1ac3a4e9ef90a32b59e2205d8eda5c4 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Wed, 6 Nov 2024 11:11:10 -0300 Subject: [PATCH] chore: update api documentation Signed-off-by: Vitor Mattos --- openapi-full.json | 194 ++++++++++++++++++++++++++++++ openapi.json | 194 ++++++++++++++++++++++++++++++ src/types/openapi/openapi-full.ts | 92 ++++++++++++++ src/types/openapi/openapi.ts | 92 ++++++++++++++ 4 files changed, 572 insertions(+) diff --git a/openapi-full.json b/openapi-full.json index fad3f76592..8badd571ae 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -3769,6 +3769,24 @@ "nullable": true } }, + { + "name": "sortBy", + "in": "query", + "description": "Name of the column to sort by", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sortDirection", + "in": "query", + "description": "Ascending or descending order", + "schema": { + "type": "string", + "nullable": true + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -4198,6 +4216,182 @@ } } }, + "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": { + "delete": { + "operationId": "file-delete-all-request-signature-using-file-id", + "summary": "Delete File", + "description": "This will delete the file and all data", + "tags": [ + "file" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "fileId", + "in": "path", + "description": "Node id of a Nextcloud file", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "422": { + "description": "Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "action", + "errors" + ], + "properties": { + "action": { + "type": "integer", + "format": "int64" + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { "post": { "operationId": "file_element-post", diff --git a/openapi.json b/openapi.json index fde54c2766..0f582fc3b0 100644 --- a/openapi.json +++ b/openapi.json @@ -3673,6 +3673,24 @@ "nullable": true } }, + { + "name": "sortBy", + "in": "query", + "description": "Name of the column to sort by", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sortDirection", + "in": "query", + "description": "Ascending or descending order", + "schema": { + "type": "string", + "nullable": true + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -4102,6 +4120,182 @@ } } }, + "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": { + "delete": { + "operationId": "file-delete-all-request-signature-using-file-id", + "summary": "Delete File", + "description": "This will delete the file and all data", + "tags": [ + "file" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "fileId", + "in": "path", + "description": "Node id of a Nextcloud file", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "422": { + "description": "Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "action", + "errors" + ], + "properties": { + "action": { + "type": "integer", + "format": "int64" + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { "post": { "operationId": "file_element-post", diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 769b00c353..febe0d49d5 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -592,6 +592,26 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete File + * @description This will delete the file and all data + */ + delete: operations["file-delete-all-request-signature-using-file-id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { parameters: { query?: never; @@ -2502,6 +2522,10 @@ export interface operations { start?: number | null; /** @description End date of signature request (UNIX timestamp) */ end?: number | null; + /** @description Name of the column to sort by */ + sortBy?: string | null; + /** @description Ascending or descending order */ + sortDirection?: string | null; }; header: { /** @description Required to be true for the API request to pass */ @@ -2686,6 +2710,74 @@ export interface operations { }; }; }; + "file-delete-all-request-signature-using-file-id": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + /** @description Node id of a Nextcloud file */ + fileId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + message: string; + }; + }; + }; + }; + }; + /** @description Failed */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + message: string; + }; + }; + }; + }; + }; + /** @description Failed */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** Format: int64 */ + action: number; + errors: string[]; + }; + }; + }; + }; + }; + }; + }; "file_element-post": { parameters: { query?: never; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 256118bfd9..0822e40042 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -592,6 +592,26 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete File + * @description This will delete the file and all data + */ + delete: operations["file-delete-all-request-signature-using-file-id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { parameters: { query?: never; @@ -2356,6 +2376,10 @@ export interface operations { start?: number | null; /** @description End date of signature request (UNIX timestamp) */ end?: number | null; + /** @description Name of the column to sort by */ + sortBy?: string | null; + /** @description Ascending or descending order */ + sortDirection?: string | null; }; header: { /** @description Required to be true for the API request to pass */ @@ -2540,6 +2564,74 @@ export interface operations { }; }; }; + "file-delete-all-request-signature-using-file-id": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + /** @description Node id of a Nextcloud file */ + fileId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + message: string; + }; + }; + }; + }; + }; + /** @description Failed */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + message: string; + }; + }; + }; + }; + }; + /** @description Failed */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** Format: int64 */ + action: number; + errors: string[]; + }; + }; + }; + }; + }; + }; + }; "file_element-post": { parameters: { query?: never;