From 829f391c6c62d192341203fedd47dc4afd05619c Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Fri, 28 Jun 2024 05:14:03 +0100 Subject: [PATCH] fix: update OpenAPI Signed-off-by: Cleopatra Enjeck M [skip ci] --- openapi.json | 3611 ++++++++++++++++------------------ src/types/openapi/openapi.ts | 1272 +++++++----- 2 files changed, 2490 insertions(+), 2393 deletions(-) diff --git a/openapi.json b/openapi.json index 057118379..5f647d8c1 100644 --- a/openapi.json +++ b/openapi.json @@ -134,15 +134,15 @@ }, "numberDefault": { "type": "number", - "format": "float" + "format": "double" }, "numberMin": { "type": "number", - "format": "float" + "format": "double" }, "numberMax": { "type": "number", - "format": "float" + "format": "double" }, "numberDecimals": { "type": "integer", @@ -662,7 +662,7 @@ ] }, "value": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -672,7 +672,7 @@ }, { "type": "number", - "format": "float" + "format": "double" } ] } @@ -728,7 +728,7 @@ "paths": { "/index.php/apps/tables/api/1/tables": { "get": { - "operationId": "api1-list", + "operationId": "api1-index", "summary": "Returns all Tables", "tags": [ "api1" @@ -783,35 +783,35 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "Title of the table", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "emoji", - "in": "query", - "description": "Emoji for the table", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "template", - "in": "query", - "description": "Template to use if wanted", - "schema": { - "type": "string", - "default": "custom" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "Title of the table" + }, + "emoji": { + "type": "string", + "nullable": true, + "description": "Emoji for the table" + }, + "template": { + "type": "string", + "default": "custom", + "description": "Template to use if wanted" + } + } + } } } - ], + }, "responses": { "200": { "description": "Tables returned", @@ -856,38 +856,34 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "New table title", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "emoji", - "in": "query", - "description": "New table emoji", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "archived", - "in": "query", - "description": "Whether the table is archived", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true, + "description": "New table title" + }, + "emoji": { + "type": "string", + "nullable": true, + "description": "New table emoji" + }, + "archived": { + "type": "boolean", + "default": false, + "description": "Whether the table is archived" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -1149,7 +1145,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/views": { "get": { - "operationId": "api1-list-views", + "operationId": "api1-index-views", "summary": "Get all views for a table", "tags": [ "api1" @@ -1252,25 +1248,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "Title for the view", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "emoji", - "in": "query", - "description": "Emoji for the view", - "schema": { - "type": "string", - "nullable": true + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "Title for the view" + }, + "emoji": { + "type": "string", + "nullable": true, + "description": "Emoji for the view" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -1452,152 +1454,162 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "data", - "in": "query", - "description": "key-value pairs", - "required": true, - "schema": { - "oneOf": [ - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "title", - "emoji", - "description" - ] - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "columns" - ] - }, - "value": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "sort" - ] - }, - "value": { - "type": "object", - "required": [ - "columnId", - "mode" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "mode": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "key-value pairs", + "anyOf": [ + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "title", + "emoji", + "description" + ] + }, + "value": { + "type": "string" + } } - } - } - } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "filter" - ] - }, - "value": { - "type": "object", - "required": [ - "columnId", - "operator", - "value" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "operator": { - "type": "string", - "enum": [ - "begins-with", - "ends-with", - "contains", - "is-equal", - "is-greater-than", - "is-greater-than-or-equal", - "is-lower-than", - "is-lower-than-or-equal", - "is-empty" - ] - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "columns" + ] + }, + "value": { + "type": "array", + "items": { "type": "integer", "format": "int64" - }, - { - "type": "number", - "format": "float" } - ] + } + } + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "sort" + ] + }, + "value": { + "type": "object", + "required": [ + "columnId", + "mode" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "mode": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + } + } + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "filter" + ] + }, + "value": { + "type": "object", + "required": [ + "columnId", + "operator", + "value" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "operator": { + "type": "string", + "enum": [ + "begins-with", + "ends-with", + "contains", + "is-equal", + "is-greater-than", + "is-greater-than-or-equal", + "is-lower-than", + "is-lower-than-or-equal", + "is-empty" + ] + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + } + ] + } + } + } } } - } + ] } } - ] + } } - }, + } + }, + "parameters": [ { "name": "viewId", "in": "path", @@ -1941,29 +1953,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "permissionType", - "in": "query", - "description": "Permission type that should be changed", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "permissionValue", - "in": "query", - "description": "New permission value", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "permissionType", + "permissionValue" + ], + "properties": { + "permissionType": { + "type": "string", + "description": "Permission type that should be changed" + }, + "permissionValue": { + "type": "boolean", + "description": "New permission value" + } + } + } } - }, + } + }, + "parameters": [ { "name": "shareId", "in": "path", @@ -2045,7 +2059,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/shares": { "get": { - "operationId": "api1-list-view-shares", + "operationId": "api1-index-view-shares", "summary": "Get all shares for a view Will be empty if view does not exist", "tags": [ "api1" @@ -2104,7 +2118,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/shares": { "get": { - "operationId": "api1-list-table-shares", + "operationId": "api1-index-table-shares", "summary": "Get all shares for a table Will be empty if table does not exist", "tags": [ "api1" @@ -2171,114 +2185,80 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "receiver", - "in": "query", - "description": "Receiver ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "receiverType", - "in": "query", - "description": "Receiver type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "user", - "group" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "receiver", + "receiverType", + "permissionRead", + "permissionCreate", + "permissionUpdate", + "permissionDelete", + "permissionManage" + ], + "properties": { + "receiver": { + "type": "string", + "description": "Receiver ID" + }, + "receiverType": { + "type": "string", + "enum": [ + "user", + "group" + ], + "description": "Receiver type" + }, + "permissionRead": { + "type": "boolean", + "description": "Permission if receiver can read data" + }, + "permissionCreate": { + "type": "boolean", + "description": "Permission if receiver can create data" + }, + "permissionUpdate": { + "type": "boolean", + "description": "Permission if receiver can update data" + }, + "permissionDelete": { + "type": "boolean", + "description": "Permission if receiver can delete data" + }, + "permissionManage": { + "type": "boolean", + "description": "Permission if receiver can manage table" + } + } + } } - }, + } + }, + "parameters": [ { - "name": "permissionRead", - "in": "query", - "description": "Permission if receiver can read data", + "name": "tableId", + "in": "path", + "description": "Table ID", "required": true, "schema": { "type": "integer", - "enum": [ - 0, - 1 - ] + "format": "int64" } - }, - { - "name": "permissionCreate", - "in": "query", - "description": "Permission if receiver can create data", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionUpdate", - "in": "query", - "description": "Permission if receiver can update data", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionDelete", - "in": "query", - "description": "Permission if receiver can delete data", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionManage", - "in": "query", - "description": "Permission if receiver can manage table", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "tableId", - "in": "path", - "description": "Table ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "View deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Share" - } - } + } + ], + "responses": { + "200": { + "description": "View deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Share" + } + } } }, "403": { @@ -2350,129 +2330,81 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "nodeId", - "in": "query", - "description": "Node ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "nodeType", - "in": "query", - "description": "Node type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "table", - "view", - "context" - ] - } - }, - { - "name": "receiver", - "in": "query", - "description": "Receiver ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "receiverType", - "in": "query", - "description": "Receiver type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "user", - "group" - ] - } - }, - { - "name": "permissionRead", - "in": "query", - "description": "Permission if receiver can read data", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionCreate", - "in": "query", - "description": "Permission if receiver can create data", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionUpdate", - "in": "query", - "description": "Permission if receiver can update data", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionDelete", - "in": "query", - "description": "Permission if receiver can delete data", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "permissionManage", - "in": "query", - "description": "Permission if receiver can manage node", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "displayMode", - "in": "query", - "description": "context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all", - "schema": { - "type": "integer", - "format": "int64", - "default": 0 + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "nodeId", + "nodeType", + "receiver", + "receiverType" + ], + "properties": { + "nodeId": { + "type": "integer", + "format": "int64", + "description": "Node ID" + }, + "nodeType": { + "type": "string", + "enum": [ + "table", + "view", + "context" + ], + "description": "Node type" + }, + "receiver": { + "type": "string", + "description": "Receiver ID" + }, + "receiverType": { + "type": "string", + "enum": [ + "user", + "group" + ], + "description": "Receiver type" + }, + "permissionRead": { + "type": "boolean", + "default": false, + "description": "Permission if receiver can read data" + }, + "permissionCreate": { + "type": "boolean", + "default": false, + "description": "Permission if receiver can create data" + }, + "permissionUpdate": { + "type": "boolean", + "default": false, + "description": "Permission if receiver can update data" + }, + "permissionDelete": { + "type": "boolean", + "default": false, + "description": "Permission if receiver can delete data" + }, + "permissionManage": { + "type": "boolean", + "default": false, + "description": "Permission if receiver can manage node" + }, + "displayMode": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all" + } + } + } } } - ], + }, "responses": { "200": { "description": "Share returned", @@ -2553,32 +2485,38 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "displayMode", - "in": "query", - "description": "The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0, - "maximum": 2 - } - }, - { - "name": "target", - "in": "query", - "description": "\"default\" to set the default, \"self\" to set an override for the authenticated user", - "schema": { - "type": "string", - "default": "default", - "enum": [ - "default", - "self" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "displayMode" + ], + "properties": { + "displayMode": { + "type": "integer", + "format": "int64", + "description": "The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all", + "minimum": 0, + "maximum": 2 + }, + "target": { + "type": "string", + "default": "default", + "enum": [ + "default", + "self" + ], + "description": "\"default\" to set the default, \"self\" to set an override for the authenticated user" + } + } + } } - }, + } + }, + "parameters": [ { "name": "shareId", "in": "path", @@ -2678,7 +2616,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/columns": { "get": { - "operationId": "api1-list-table-columns", + "operationId": "api1-index-table-columns", "summary": "Get all columns for a table or a underlying view Return an empty array if no columns were found", "tags": [ "api1" @@ -2688,17 +2626,25 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "viewId", - "in": "query", - "description": "View ID", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "viewId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "View ID" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -2791,200 +2737,138 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title", + "type", + "mandatory" + ], + "properties": { + "title": { + "type": "string", + "description": "Title" + }, + "type": { + "type": "string", + "enum": [ + "text", + "number", + "datetime", + "select" + ], + "description": "Column main type" + }, + "subtype": { + "type": "string", + "nullable": true, + "description": "Column sub type" + }, + "mandatory": { + "type": "boolean", + "description": "Is the column mandatory" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "numberPrefix": { + "type": "string", + "nullable": true, + "description": "Prefix if the column is a number field" + }, + "numberSuffix": { + "type": "string", + "nullable": true, + "description": "Suffix if the column is a number field" + }, + "numberDefault": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Default number, if column is a number" + }, + "numberMin": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Min value, if column is a number" + }, + "numberMax": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Max number, if column is a number" + }, + "numberDecimals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Number of decimals, if column is a number" + }, + "textDefault": { + "type": "string", + "nullable": true, + "description": "Default text, if column is a text" + }, + "textAllowedPattern": { + "type": "string", + "nullable": true, + "description": "Allowed pattern (regex) for text columns (not yet implemented)" + }, + "textMaxLength": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Max length, if column is a text" + }, + "selectionOptions": { + "type": "string", + "nullable": true, + "default": "", + "description": "Options for a selection (json array{id: int, label: string})" + }, + "selectionDefault": { + "type": "string", + "nullable": true, + "default": "", + "description": "Default option IDs for a selection (json int[])" + }, + "datetimeDefault": { + "type": "string", + "nullable": true, + "default": "", + "description": "Default value, if column is datetime" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this column should be added to be presented", + "items": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + }, "parameters": [ { - "name": "title", - "in": "query", - "description": "Title", + "name": "tableId", + "in": "path", + "description": "Table ID", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "Column main type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "text", - "number", - "datetime", - "select" - ] - } - }, - { - "name": "subtype", - "in": "query", - "description": "Column sub type", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is the column mandatory", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberPrefix", - "in": "query", - "description": "Prefix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberSuffix", - "in": "query", - "description": "Suffix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberDefault", - "in": "query", - "description": "Default number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMin", - "in": "query", - "description": "Min value, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMax", - "in": "query", - "description": "Max number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberDecimals", - "in": "query", - "description": "Number of decimals, if column is a number", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "textDefault", - "in": "query", - "description": "Default text, if column is a text", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textAllowedPattern", - "in": "query", - "description": "Allowed pattern (regex) for text columns (not yet implemented)", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textMaxLength", - "in": "query", - "description": "Max length, if column is a text", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "selectionOptions", - "in": "query", - "description": "Options for a selection (json array{id: int, label: string})", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "selectionDefault", - "in": "query", - "description": "Default option IDs for a selection (json int[])", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "datetimeDefault", - "in": "query", - "description": "Default value, if column is datetime", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this column should be added to be presented", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" - } - } - }, - { - "name": "tableId", - "in": "path", - "description": "Table ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "type": "integer", + "format": "int64" } } ], @@ -3058,7 +2942,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/columns": { "get": { - "operationId": "api1-list-view-columns", + "operationId": "api1-index-view-columns", "summary": "Get all columns for a view Return an empty array if no columns were found", "tags": [ "api1" @@ -3163,213 +3047,141 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "tableId", - "in": "query", - "description": "Table ID", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "viewId", - "in": "query", - "description": "View ID", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "title", - "in": "query", - "description": "Title", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "Column main type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "text", - "number", - "datetime", - "select" - ] - } - }, - { - "name": "subtype", - "in": "query", - "description": "Column sub type", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is the column mandatory", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberPrefix", - "in": "query", - "description": "Prefix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberSuffix", - "in": "query", - "description": "Suffix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberDefault", - "in": "query", - "description": "Default number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMin", - "in": "query", - "description": "Min value, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMax", - "in": "query", - "description": "Max number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberDecimals", - "in": "query", - "description": "Number of decimals, if column is a number", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "textDefault", - "in": "query", - "description": "Default text, if column is a text", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textAllowedPattern", - "in": "query", - "description": "Allowed pattern (regex) for text columns (not yet implemented)", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textMaxLength", - "in": "query", - "description": "Max length, if column is a text", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "selectionOptions", - "in": "query", - "description": "Options for a selection (json array{id: int, label: string})", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "selectionDefault", - "in": "query", - "description": "Default option IDs for a selection (json int[])", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "datetimeDefault", - "in": "query", - "description": "Default value, if column is datetime", - "schema": { - "type": "string", - "nullable": true, - "default": "" - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this column should be added to be presented", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title", + "type", + "mandatory" + ], + "properties": { + "tableId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Table ID" + }, + "viewId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "View ID" + }, + "title": { + "type": "string", + "description": "Title" + }, + "type": { + "type": "string", + "enum": [ + "text", + "number", + "datetime", + "select" + ], + "description": "Column main type" + }, + "subtype": { + "type": "string", + "nullable": true, + "description": "Column sub type" + }, + "mandatory": { + "type": "boolean", + "description": "Is the column mandatory" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "numberPrefix": { + "type": "string", + "nullable": true, + "description": "Prefix if the column is a number field" + }, + "numberSuffix": { + "type": "string", + "nullable": true, + "description": "Suffix if the column is a number field" + }, + "numberDefault": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Default number, if column is a number" + }, + "numberMin": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Min value, if column is a number" + }, + "numberMax": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Max number, if column is a number" + }, + "numberDecimals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Number of decimals, if column is a number" + }, + "textDefault": { + "type": "string", + "nullable": true, + "description": "Default text, if column is a text" + }, + "textAllowedPattern": { + "type": "string", + "nullable": true, + "description": "Allowed pattern (regex) for text columns (not yet implemented)" + }, + "textMaxLength": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Max length, if column is a text" + }, + "selectionOptions": { + "type": "string", + "nullable": true, + "default": "", + "description": "Options for a selection (json array{id: int, label: string})" + }, + "selectionDefault": { + "type": "string", + "nullable": true, + "default": "", + "description": "Default option IDs for a selection (json int[])" + }, + "datetimeDefault": { + "type": "string", + "nullable": true, + "default": "", + "description": "Default value, if column is datetime" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this column should be added to be presented", + "items": { + "type": "integer", + "format": "int64" + } + } + } } } } - ], + }, "responses": { "200": { "description": "Column created", @@ -3386,224 +3198,170 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/index.php/apps/tables/api/1/columns/{columnId}": { - "put": { - "operationId": "api1-update-column", - "summary": "Update a column", - "tags": [ - "api1" - ], - "security": [ - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "Title", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "subtype", - "in": "query", - "description": "Column sub type", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is the column mandatory", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberPrefix", - "in": "query", - "description": "Prefix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberSuffix", - "in": "query", - "description": "Suffix if the column is a number field", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberDefault", - "in": "query", - "description": "Default number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMin", - "in": "query", - "description": "Min value, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMax", - "in": "query", - "description": "Max number, if column is a number", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberDecimals", - "in": "query", - "description": "Number of decimals, if column is a number", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "textDefault", - "in": "query", - "description": "Default text, if column is a text", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textAllowedPattern", - "in": "query", - "description": "Allowed pattern (regex) for text columns (not yet implemented)", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textMaxLength", - "in": "query", - "description": "Max length, if column is a text", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } } }, - { - "name": "selectionOptions", - "in": "query", - "description": "Options for a selection (json array{id: int, label: string})", - "schema": { - "type": "string", - "nullable": true + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } } }, - { - "name": "selectionDefault", - "in": "query", - "description": "Default option IDs for a selection (json int[])", - "schema": { - "type": "string", - "nullable": true + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } } - }, + } + } + } + }, + "/index.php/apps/tables/api/1/columns/{columnId}": { + "put": { + "operationId": "api1-update-column", + "summary": "Update a column", + "tags": [ + "api1" + ], + "security": [ { - "name": "datetimeDefault", - "in": "query", - "description": "Default value, if column is datetime", - "schema": { - "type": "string", - "nullable": true + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "mandatory" + ], + "properties": { + "title": { + "type": "string", + "nullable": true, + "description": "Title" + }, + "subtype": { + "type": "string", + "nullable": true, + "description": "Column sub type" + }, + "mandatory": { + "type": "boolean", + "description": "Is the column mandatory" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "numberPrefix": { + "type": "string", + "nullable": true, + "description": "Prefix if the column is a number field" + }, + "numberSuffix": { + "type": "string", + "nullable": true, + "description": "Suffix if the column is a number field" + }, + "numberDefault": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Default number, if column is a number" + }, + "numberMin": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Min value, if column is a number" + }, + "numberMax": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Max number, if column is a number" + }, + "numberDecimals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Number of decimals, if column is a number" + }, + "textDefault": { + "type": "string", + "nullable": true, + "description": "Default text, if column is a text" + }, + "textAllowedPattern": { + "type": "string", + "nullable": true, + "description": "Allowed pattern (regex) for text columns (not yet implemented)" + }, + "textMaxLength": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Max length, if column is a text" + }, + "selectionOptions": { + "type": "string", + "nullable": true, + "description": "Options for a selection (json array{id: int, label: string})" + }, + "selectionDefault": { + "type": "string", + "nullable": true, + "description": "Default option IDs for a selection (json int[])" + }, + "datetimeDefault": { + "type": "string", + "nullable": true, + "description": "Default value, if column is datetime" + } + } + } } - }, + } + }, + "parameters": [ { "name": "columnId", "in": "path", @@ -3829,7 +3587,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/rows/simple": { "get": { - "operationId": "api1-list-table-rows-simple", + "operationId": "api1-index-table-rows-simple", "summary": "List all rows values for a table, first row are the column titles", "tags": [ "api1" @@ -3839,27 +3597,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -3944,7 +3706,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/rows": { "get": { - "operationId": "api1-list-table-rows", + "operationId": "api1-index-table-rows", "summary": "List all rows for a table", "tags": [ "api1" @@ -3954,27 +3716,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -4090,9 +3856,11 @@ } } } - ] + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -4156,7 +3924,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/rows": { "get": { - "operationId": "api1-list-view-rows", + "operationId": "api1-index-view-rows", "summary": "List all rows for a view", "tags": [ "api1" @@ -4166,27 +3934,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Limit", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Limit" + }, + "offset": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Offset" + } + } + } } - }, + } + }, + "parameters": [ { "name": "viewId", "in": "path", @@ -4279,36 +4051,46 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "data", - "in": "query", - "description": "Data as key - value store", - "required": true, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": [ - "columnId", - "value" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "value": { - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Data as key - value store", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "columnId", + "value" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "object" + } + } + } + ] } } - ] + } } - }, + } + }, + "parameters": [ { "name": "viewId", "in": "path", @@ -4472,46 +4254,52 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "viewId", - "in": "query", - "description": "View ID", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "data", - "in": "query", - "description": "Data as key - value store", - "required": true, - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "required": [ - "columnId", - "value" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "value": { - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "viewId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "View ID" + }, + "data": { + "description": "Data as key - value store", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "columnId", + "value" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "object" + } + } + } + ] } } - ] + } } - }, + } + }, + "parameters": [ { "name": "rowId", "in": "path", @@ -4795,29 +4583,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "path", - "in": "query", - "description": "Path to file", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "createMissingColumns", - "in": "query", - "description": "Create missing columns", - "schema": { - "type": "integer", - "default": 1, - "enum": [ - 0, - 1 - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "description": "Path to file" + }, + "createMissingColumns": { + "type": "boolean", + "default": true, + "description": "Create missing columns" + } + } + } } - }, + } + }, + "parameters": [ { "name": "tableId", "in": "path", @@ -4909,29 +4699,31 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "path", - "in": "query", - "description": "Path to file", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "createMissingColumns", - "in": "query", - "description": "Create missing columns", - "schema": { - "type": "integer", - "default": 1, - "enum": [ - 0, - 1 - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "description": "Path to file" + }, + "createMissingColumns": { + "type": "boolean", + "default": true, + "description": "Create missing columns" + } + } + } } - }, + } + }, + "parameters": [ { "name": "viewId", "in": "path", @@ -5013,7 +4805,7 @@ }, "/ocs/v2.php/apps/tables/api/2/init": { "get": { - "operationId": "api_general-list", + "operationId": "api_general-index", "summary": "[api v2] Returns all main resources", "description": "Tables and views incl. shares", "tags": [ @@ -5113,7 +4905,7 @@ }, "/ocs/v2.php/apps/tables/api/2/tables": { "get": { - "operationId": "api_tables-list", + "operationId": "api_tables-index", "summary": "[api v2] Returns all Tables", "tags": [ "api_tables" @@ -5226,43 +5018,41 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "Title of the table", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "emoji", - "in": "query", - "description": "Emoji for the table", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "description", - "in": "query", - "description": "Description for the table", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "template", - "in": "query", - "description": "Template to use if wanted", - "schema": { - "type": "string", - "default": "custom" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "Title of the table" + }, + "emoji": { + "type": "string", + "nullable": true, + "description": "Emoji for the table" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description for the table" + }, + "template": { + "type": "string", + "default": "custom", + "description": "Template to use if wanted" + } + } + } } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -5544,46 +5334,37 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "title", - "in": "query", - "description": "New table title", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "emoji", - "in": "query", - "description": "New table emoji", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "description", - "in": "query", - "description": "the tables description", - "schema": { - "type": "string" - } - }, - { - "name": "archived", - "in": "query", - "description": "whether the table is archived", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true, + "description": "New table title" + }, + "emoji": { + "type": "string", + "nullable": true, + "description": "New table emoji" + }, + "description": { + "type": "string", + "description": "the tables description" + }, + "archived": { + "type": "boolean", + "description": "whether the table is archived" + } + } + } } - }, + } + }, + "parameters": [ { "name": "id", "in": "path", @@ -5952,16 +5733,26 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "newOwnerUserId", - "in": "query", - "description": "New user ID", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "newOwnerUserId" + ], + "properties": { + "newOwnerUserId": { + "type": "string", + "description": "New user ID" + } + } + } } - }, + } + }, + "parameters": [ { "name": "id", "in": "path", @@ -6133,7 +5924,7 @@ }, "/ocs/v2.php/apps/tables/api/2/columns/{nodeType}/{nodeId}": { "get": { - "operationId": "api_columns-list", + "operationId": "api_columns-index", "summary": "[api v2] Get all columns for a table or a view", "description": "Return an empty array if no columns were found", "tags": [ @@ -6507,173 +6298,131 @@ "type": "string" } } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/tables/api/2/columns/number": { - "post": { - "operationId": "api_columns-create-number-column", - "summary": "[api v2] Create new numbered column", - "description": "Specify a subtype to use any special numbered column", - "tags": [ - "api_columns" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "baseNodeId", - "in": "query", - "description": "Context of the column creation", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "title", - "in": "query", - "description": "Title", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "numberDefault", - "in": "query", - "description": "Default value for new rows", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberDecimals", - "in": "query", - "description": "Decimals", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "numberPrefix", - "in": "query", - "description": "Prefix", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberSuffix", - "in": "query", - "description": "Suffix", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "numberMin", - "in": "query", - "description": "Min", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "numberMax", - "in": "query", - "description": "Max", - "schema": { - "type": "number", - "format": "float", - "nullable": true - } - }, - { - "name": "subtype", - "in": "query", - "description": "Subtype for the new column", - "schema": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this columns should be added", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" + } + } + } + } + } } } - }, + } + } + } + }, + "/ocs/v2.php/apps/tables/api/2/columns/number": { + "post": { + "operationId": "api_columns-create-number-column", + "summary": "[api v2] Create new numbered column", + "description": "Specify a subtype to use any special numbered column", + "tags": [ + "api_columns" + ], + "security": [ { - "name": "mandatory", - "in": "query", - "description": "Is mandatory", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } + "bearer_auth": [] }, { - "name": "baseNodeType", - "in": "query", - "description": "Context type of the column creation", - "schema": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ] + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "baseNodeId", + "title" + ], + "properties": { + "baseNodeId": { + "type": "integer", + "format": "int64", + "description": "Context of the column creation" + }, + "title": { + "type": "string", + "description": "Title" + }, + "numberDefault": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Default value for new rows" + }, + "numberDecimals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Decimals" + }, + "numberPrefix": { + "type": "string", + "nullable": true, + "description": "Prefix" + }, + "numberSuffix": { + "type": "string", + "nullable": true, + "description": "Suffix" + }, + "numberMin": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Min" + }, + "numberMax": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Max" + }, + "subtype": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ], + "description": "Subtype for the new column" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this columns should be added", + "items": { + "type": "integer", + "format": "int64" + } + }, + "mandatory": { + "type": "boolean", + "default": false, + "description": "Is mandatory" + }, + "baseNodeType": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ], + "description": "Context type of the column creation" + } + } + } } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -6854,116 +6603,86 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "baseNodeId", - "in": "query", - "description": "Context of the column creation", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "title", - "in": "query", - "description": "Title", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "textDefault", - "in": "query", - "description": "Default", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textAllowedPattern", - "in": "query", - "description": "Allowed regex pattern", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "textMaxLength", - "in": "query", - "description": "Max raw text length", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "subtype", - "in": "query", - "description": "Subtype for the new column", - "schema": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this columns should be added", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "baseNodeId", + "title" + ], + "properties": { + "baseNodeId": { + "type": "integer", + "format": "int64", + "description": "Context of the column creation" + }, + "title": { + "type": "string", + "description": "Title" + }, + "textDefault": { + "type": "string", + "nullable": true, + "description": "Default" + }, + "textAllowedPattern": { + "type": "string", + "nullable": true, + "description": "Allowed regex pattern" + }, + "textMaxLength": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Max raw text length" + }, + "subtype": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ], + "description": "Subtype for the new column" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this columns should be added", + "items": { + "type": "integer", + "format": "int64" + } + }, + "mandatory": { + "type": "boolean", + "default": false, + "description": "Is mandatory" + }, + "baseNodeType": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ], + "description": "Context type of the column creation" + } + } } } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is mandatory", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "baseNodeType", - "in": "query", - "description": "Context type of the column creation", - "schema": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ] - } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -7144,106 +6863,80 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "baseNodeId", - "in": "query", - "description": "Context of the column creation", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "title", - "in": "query", - "description": "Title", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "selectionOptions", - "in": "query", - "description": "Json array{id: int, label: string} with options that can be selected, eg [{\"id\": 1, \"label\": \"first\"},{\"id\": 2, \"label\": \"second\"}]", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "selectionDefault", - "in": "query", - "description": "Json int|int[] for default selected option(s), eg 5 or [\"1\", \"8\"]", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "subtype", - "in": "query", - "description": "Subtype for the new column", - "schema": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this columns should be added", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" - } - } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is mandatory", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "baseNodeType", - "in": "query", - "description": "Context type of the column creation", - "schema": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "baseNodeId", + "title", + "selectionOptions" + ], + "properties": { + "baseNodeId": { + "type": "integer", + "format": "int64", + "description": "Context of the column creation" + }, + "title": { + "type": "string", + "description": "Title" + }, + "selectionOptions": { + "type": "string", + "description": "Json array{id: int, label: string} with options that can be selected, eg [{\"id\": 1, \"label\": \"first\"},{\"id\": 2, \"label\": \"second\"}]" + }, + "selectionDefault": { + "type": "string", + "nullable": true, + "description": "Json int|int[] for default selected option(s), eg 5 or [\"1\", \"8\"]" + }, + "subtype": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ], + "description": "Subtype for the new column" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this columns should be added", + "items": { + "type": "integer", + "format": "int64" + } + }, + "mandatory": { + "type": "boolean", + "default": false, + "description": "Is mandatory" + }, + "baseNodeType": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ], + "description": "Context type of the column creation" + } + } + } } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -7424,101 +7117,79 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "baseNodeId", - "in": "query", - "description": "Context of the column creation", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "title", - "in": "query", - "description": "Title", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "datetimeDefault", - "in": "query", - "description": "For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'.", - "schema": { - "type": "string", - "nullable": true, - "enum": [ - "today", - "now" - ] - } - }, - { - "name": "subtype", - "in": "query", - "description": "Subtype for the new column", - "schema": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ] - } - }, - { - "name": "description", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "selectedViewIds[]", - "in": "query", - "description": "View IDs where this columns should be added", - "schema": { - "type": "array", - "nullable": true, - "default": [], - "items": { - "type": "integer", - "format": "int64" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "baseNodeId", + "title" + ], + "properties": { + "baseNodeId": { + "type": "integer", + "format": "int64", + "description": "Context of the column creation" + }, + "title": { + "type": "string", + "description": "Title" + }, + "datetimeDefault": { + "type": "string", + "nullable": true, + "enum": [ + "today", + "now" + ], + "description": "For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'." + }, + "subtype": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ], + "description": "Subtype for the new column" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description" + }, + "selectedViewIds": { + "type": "array", + "nullable": true, + "default": [], + "description": "View IDs where this columns should be added", + "items": { + "type": "integer", + "format": "int64" + } + }, + "mandatory": { + "type": "boolean", + "default": false, + "description": "Is mandatory" + }, + "baseNodeType": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ], + "description": "Context type of the column creation" + } + } } } - }, - { - "name": "mandatory", - "in": "query", - "description": "Is mandatory", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "baseNodeType", - "in": "query", - "description": "Context type of the column creation", - "schema": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ] - } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -8073,7 +7744,7 @@ }, "/ocs/v2.php/apps/tables/api/2/contexts": { "get": { - "operationId": "context-list", + "operationId": "context-index", "summary": "[api v3] Get all contexts available to the requesting person", "description": "Return an empty array if no contexts were found", "tags": [ @@ -8187,64 +7858,62 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Name of the context", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iconName", - "in": "query", - "description": "Material design icon name of the context", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "description", - "in": "query", - "description": "Descriptive text of the context", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "nodes[]", - "in": "query", - "description": "optional nodes to be connected to this context", - "schema": { - "type": "array", - "default": [], - "items": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "type": "object", "required": [ - "id", - "type" + "name", + "iconName" ], "properties": { - "id": { - "type": "integer", - "format": "int64" + "name": { + "type": "string", + "description": "Name of the context" }, - "type": { - "type": "integer", - "format": "int64" + "iconName": { + "type": "string", + "description": "Material design icon name of the context" }, - "permissions": { - "type": "integer", - "format": "int64" + "description": { + "type": "string", + "default": "", + "description": "Descriptive text of the context" + }, + "nodes": { + "type": "array", + "default": [], + "description": "optional nodes to be connected to this context", + "items": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "integer", + "format": "int64" + }, + "permissions": { + "type": "integer", + "format": "int64" + } + } + } } } } } - }, + } + }, + "parameters": [ { "name": "OCS-APIRequest", "in": "header", @@ -8564,43 +8233,63 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "provide this parameter to set a new name", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "iconName", - "in": "query", - "description": "provide this parameter to set a new icon", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "description", - "in": "query", - "description": "provide this parameter to set a new description", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "nodes", - "in": "query", - "description": "provide this parameter to set a new list of nodes.", - "schema": { - "type": "string", - "nullable": true + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "provide this parameter to set a new name" + }, + "iconName": { + "type": "string", + "nullable": true, + "description": "provide this parameter to set a new icon" + }, + "description": { + "type": "string", + "nullable": true, + "description": "provide this parameter to set a new description" + }, + "nodes": { + "type": "object", + "nullable": true, + "description": "provide this parameter to set a new list of nodes.", + "required": [ + "id", + "type", + "permissions", + "order" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "integer", + "format": "int64" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "order": { + "type": "integer", + "format": "int64" + } + } + } + } + } } - }, + } + }, + "parameters": [ { "name": "contextId", "in": "path", @@ -8930,28 +8619,34 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "newOwnerId", - "in": "query", - "description": "ID of the new owner", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "newOwnerType", - "in": "query", - "description": "any Application::OWNER_TYPE_* constant", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0, - "maximum": 0 + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "newOwnerId" + ], + "properties": { + "newOwnerId": { + "type": "string", + "description": "ID of the new owner" + }, + "newOwnerType": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "any Application::OWNER_TYPE_* constant", + "minimum": 0, + "maximum": 0 + } + } + } } - }, + } + }, + "parameters": [ { "name": "contextId", "in": "path", @@ -9137,16 +8832,40 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "content", - "in": "query", - "description": "content items with it and order values", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "object", + "description": "content items with it and order values", + "required": [ + "id", + "order" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "order": { + "type": "integer", + "format": "int64" + } + } + } + } + } } - }, + } + }, + "parameters": [ { "name": "contextId", "in": "path", @@ -9328,4 +9047,4 @@ } }, "tags": [] -} \ No newline at end of file +} diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 0bffdef10..d1cb137a9 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -12,7 +12,7 @@ type OneOf = T extends [infer Only] ? Only : T extends [infer A export type paths = { "/index.php/apps/tables/api/1/tables": { /** Returns all Tables */ - get: operations["api1-list"]; + get: operations["api1-index"]; /** Create a new table and return it */ post: operations["api1-create-table"]; }; @@ -26,7 +26,7 @@ export type paths = { }; "/index.php/apps/tables/api/1/tables/{tableId}/views": { /** Get all views for a table */ - get: operations["api1-list-views"]; + get: operations["api1-index-views"]; /** Create a new view for a table */ post: operations["api1-create-view"]; }; @@ -48,11 +48,11 @@ export type paths = { }; "/index.php/apps/tables/api/1/views/{viewId}/shares": { /** Get all shares for a view Will be empty if view does not exist */ - get: operations["api1-list-view-shares"]; + get: operations["api1-index-view-shares"]; }; "/index.php/apps/tables/api/1/tables/{tableId}/shares": { /** Get all shares for a table Will be empty if table does not exist */ - get: operations["api1-list-table-shares"]; + get: operations["api1-index-table-shares"]; /** Create a share for a table */ post: operations["api1-create-table-share"]; }; @@ -66,13 +66,13 @@ export type paths = { }; "/index.php/apps/tables/api/1/tables/{tableId}/columns": { /** Get all columns for a table or a underlying view Return an empty array if no columns were found */ - get: operations["api1-list-table-columns"]; + get: operations["api1-index-table-columns"]; /** Create a new column for a table */ post: operations["api1-create-table-column"]; }; "/index.php/apps/tables/api/1/views/{viewId}/columns": { /** Get all columns for a view Return an empty array if no columns were found */ - get: operations["api1-list-view-columns"]; + get: operations["api1-index-view-columns"]; }; "/index.php/apps/tables/api/1/columns": { /** Create a column */ @@ -88,17 +88,17 @@ export type paths = { }; "/index.php/apps/tables/api/1/tables/{tableId}/rows/simple": { /** List all rows values for a table, first row are the column titles */ - get: operations["api1-list-table-rows-simple"]; + get: operations["api1-index-table-rows-simple"]; }; "/index.php/apps/tables/api/1/tables/{tableId}/rows": { /** List all rows for a table */ - get: operations["api1-list-table-rows"]; + get: operations["api1-index-table-rows"]; /** Create a row within a table */ post: operations["api1-create-row-in-table"]; }; "/index.php/apps/tables/api/1/views/{viewId}/rows": { /** List all rows for a view */ - get: operations["api1-list-view-rows"]; + get: operations["api1-index-view-rows"]; /** Create a row within a view */ post: operations["api1-create-row-in-view"]; }; @@ -127,11 +127,11 @@ export type paths = { * [api v2] Returns all main resources * @description Tables and views incl. shares */ - get: operations["api_general-list"]; + get: operations["api_general-index"]; }; "/ocs/v2.php/apps/tables/api/2/tables": { /** [api v2] Returns all Tables */ - get: operations["api_tables-list"]; + get: operations["api_tables-index"]; /** [api v2] Create a new table and return it */ post: operations["api_tables-create"]; }; @@ -155,7 +155,7 @@ export type paths = { * [api v2] Get all columns for a table or a view * @description Return an empty array if no columns were found */ - get: operations["api_columns-list"]; + get: operations["api_columns-index"]; }; "/ocs/v2.php/apps/tables/api/2/columns/{id}": { /** [api v2] Get a column object */ @@ -200,7 +200,7 @@ export type paths = { * [api v3] Get all contexts available to the requesting person * @description Return an empty array if no contexts were found */ - get: operations["context-list"]; + get: operations["context-index"]; /** [api v2] Create a new context and return it */ post: operations["context-create"]; }; @@ -251,11 +251,11 @@ export type components = { description: string; /** Format: int64 */ orderWeight: number; - /** Format: float */ + /** Format: double */ numberDefault: number; - /** Format: float */ + /** Format: double */ numberMin: number; - /** Format: float */ + /** Format: double */ numberMax: number; /** Format: int64 */ numberDecimals: number; @@ -430,7 +430,7 @@ export type external = Record; export type operations = { /** Returns all Tables */ - "api1-list": { + "api1-index": { responses: { /** @description Tables returned */ 200: { @@ -449,14 +449,19 @@ export type operations = { }; /** Create a new table and return it */ "api1-create-table": { - parameters: { - query: { - /** @description Title of the table */ - title: string; - /** @description Emoji for the table */ - emoji?: string | null; - /** @description Template to use if wanted */ - template?: string; + requestBody: { + content: { + "application/json": { + /** @description Title of the table */ + title: string; + /** @description Emoji for the table */ + emoji?: string | null; + /** + * @description Template to use if wanted + * @default custom + */ + template?: string; + }; }; }; responses: { @@ -518,19 +523,26 @@ export type operations = { /** Update tables properties */ "api1-update-table": { parameters: { - query?: { - /** @description New table title */ - title?: string | null; - /** @description New table emoji */ - emoji?: string | null; - /** @description Whether the table is archived */ - archived?: 0 | 1; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** @description New table title */ + title?: string | null; + /** @description New table emoji */ + emoji?: string | null; + /** + * @description Whether the table is archived + * @default false + */ + archived?: boolean; + }; + }; + }; responses: { /** @description Tables returned */ 200: { @@ -604,7 +616,7 @@ export type operations = { }; }; /** Get all views for a table */ - "api1-list-views": { + "api1-index-views": { parameters: { path: { /** @description Table ID */ @@ -646,17 +658,21 @@ export type operations = { /** Create a new view for a table */ "api1-create-view": { parameters: { - query: { - /** @description Title for the view */ - title: string; - /** @description Emoji for the view */ - emoji?: string | null; - }; path: { /** @description Table ID that will hold the view */ tableId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Title for the view */ + title: string; + /** @description Emoji for the view */ + emoji?: string | null; + }; + }; + }; responses: { /** @description View created */ 200: { @@ -732,42 +748,46 @@ export type operations = { /** Update a view via key-value sets */ "api1-update-view": { parameters: { - query: { - /** @description key-value pairs */ - data: OneOf<[{ - /** @enum {string} */ - key: "title" | "emoji" | "description"; - value: string; - }, { - /** @enum {string} */ - key: "columns"; - value: number[]; - }, { - /** @enum {string} */ - key: "sort"; - value: { - /** Format: int64 */ - columnId: number; - /** @enum {string} */ - mode: "ASC" | "DESC"; - }; - }, { - /** @enum {string} */ - key: "filter"; - value: { - /** Format: int64 */ - columnId: number; - /** @enum {string} */ - operator: "begins-with" | "ends-with" | "contains" | "is-equal" | "is-greater-than" | "is-greater-than-or-equal" | "is-lower-than" | "is-lower-than-or-equal" | "is-empty"; - value: string | number; - }; - }]>; - }; path: { /** @description View ID */ viewId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description key-value pairs */ + data: ({ + /** @enum {string} */ + key: "title" | "emoji" | "description"; + value: string; + }) | { + /** @enum {string} */ + key: "columns"; + value: number[]; + } | ({ + /** @enum {string} */ + key: "sort"; + value: { + /** Format: int64 */ + columnId: number; + /** @enum {string} */ + mode: "ASC" | "DESC"; + }; + }) | ({ + /** @enum {string} */ + key: "filter"; + value: { + /** Format: int64 */ + columnId: number; + /** @enum {string} */ + operator: "begins-with" | "ends-with" | "contains" | "is-equal" | "is-greater-than" | "is-greater-than-or-equal" | "is-lower-than" | "is-lower-than-or-equal" | "is-empty"; + value: string | number; + }; + }); + }; + }; + }; responses: { /** @description View updated */ 200: { @@ -875,17 +895,21 @@ export type operations = { /** Update a share permission */ "api1-update-share-permissions": { parameters: { - query: { - /** @description Permission type that should be changed */ - permissionType: string; - /** @description New permission value */ - permissionValue: 0 | 1; - }; path: { /** @description Share ID */ shareId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Permission type that should be changed */ + permissionType: string; + /** @description New permission value */ + permissionValue: boolean; + }; + }; + }; responses: { /** @description View deleted */ 200: { @@ -959,7 +983,7 @@ export type operations = { }; }; /** Get all shares for a view Will be empty if view does not exist */ - "api1-list-view-shares": { + "api1-index-view-shares": { parameters: { path: { /** @description View ID */ @@ -983,7 +1007,7 @@ export type operations = { }; }; /** Get all shares for a table Will be empty if table does not exist */ - "api1-list-table-shares": { + "api1-index-table-shares": { parameters: { path: { /** @description Table ID */ @@ -1009,27 +1033,34 @@ export type operations = { /** Create a share for a table */ "api1-create-table-share": { parameters: { - query: { - /** @description Receiver ID */ - receiver: string; - /** @description Receiver type */ - receiverType: "user" | "group"; - /** @description Permission if receiver can read data */ - permissionRead: 0 | 1; - /** @description Permission if receiver can create data */ - permissionCreate: 0 | 1; - /** @description Permission if receiver can update data */ - permissionUpdate: 0 | 1; - /** @description Permission if receiver can delete data */ - permissionDelete: 0 | 1; - /** @description Permission if receiver can manage table */ - permissionManage: 0 | 1; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Receiver ID */ + receiver: string; + /** + * @description Receiver type + * @enum {string} + */ + receiverType: "user" | "group"; + /** @description Permission if receiver can read data */ + permissionRead: boolean; + /** @description Permission if receiver can create data */ + permissionCreate: boolean; + /** @description Permission if receiver can update data */ + permissionUpdate: boolean; + /** @description Permission if receiver can delete data */ + permissionDelete: boolean; + /** @description Permission if receiver can manage table */ + permissionManage: boolean; + }; + }; + }; responses: { /** @description View deleted */ 200: { @@ -1064,28 +1095,58 @@ export type operations = { }; /** Create a new share */ "api1-create-share": { - parameters: { - query: { - /** @description Node ID */ - nodeId: number; - /** @description Node type */ - nodeType: "table" | "view" | "context"; - /** @description Receiver ID */ - receiver: string; - /** @description Receiver type */ - receiverType: "user" | "group"; - /** @description Permission if receiver can read data */ - permissionRead?: 0 | 1; - /** @description Permission if receiver can create data */ - permissionCreate?: 0 | 1; - /** @description Permission if receiver can update data */ - permissionUpdate?: 0 | 1; - /** @description Permission if receiver can delete data */ - permissionDelete?: 0 | 1; - /** @description Permission if receiver can manage node */ - permissionManage?: 0 | 1; - /** @description context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all */ - displayMode?: number; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Node ID + */ + nodeId: number; + /** + * @description Node type + * @enum {string} + */ + nodeType: "table" | "view" | "context"; + /** @description Receiver ID */ + receiver: string; + /** + * @description Receiver type + * @enum {string} + */ + receiverType: "user" | "group"; + /** + * @description Permission if receiver can read data + * @default false + */ + permissionRead?: boolean; + /** + * @description Permission if receiver can create data + * @default false + */ + permissionCreate?: boolean; + /** + * @description Permission if receiver can update data + * @default false + */ + permissionUpdate?: boolean; + /** + * @description Permission if receiver can delete data + * @default false + */ + permissionDelete?: boolean; + /** + * @description Permission if receiver can manage node + * @default false + */ + permissionManage?: boolean; + /** + * Format: int64 + * @description context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all + * @default 0 + */ + displayMode?: number; + }; }; }; responses: { @@ -1123,17 +1184,28 @@ export type operations = { /** Updates the display mode of a context share */ "api1-update-share-display-mode": { parameters: { - query: { - /** @description The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all */ - displayMode: number; - /** @description "default" to set the default, "self" to set an override for the authenticated user */ - target?: "default" | "self"; - }; path: { /** @description Share ID */ shareId: number; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all + */ + displayMode: number; + /** + * @description "default" to set the default, "self" to set an override for the authenticated user + * @default default + * @enum {string} + */ + target?: "default" | "self"; + }; + }; + }; responses: { /** @description Display mode updated */ 200: { @@ -1175,17 +1247,24 @@ export type operations = { }; }; /** Get all columns for a table or a underlying view Return an empty array if no columns were found */ - "api1-list-table-columns": { + "api1-index-table-columns": { parameters: { - query?: { - /** @description View ID */ - viewId?: number | null; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description View ID + */ + viewId?: number | null; + }; + }; + }; responses: { /** @description View deleted */ 200: { @@ -1221,49 +1300,83 @@ export type operations = { /** Create a new column for a table */ "api1-create-table-column": { parameters: { - query: { - /** @description Title */ - title: string; - /** @description Column main type */ - type: "text" | "number" | "datetime" | "select"; - /** @description Column sub type */ - subtype?: string | null; - /** @description Is the column mandatory */ - mandatory: 0 | 1; - /** @description Description */ - description?: string | null; - /** @description Prefix if the column is a number field */ - numberPrefix?: string | null; - /** @description Suffix if the column is a number field */ - numberSuffix?: string | null; - /** @description Default number, if column is a number */ - numberDefault?: number | null; - /** @description Min value, if column is a number */ - numberMin?: number | null; - /** @description Max number, if column is a number */ - numberMax?: number | null; - /** @description Number of decimals, if column is a number */ - numberDecimals?: number | null; - /** @description Default text, if column is a text */ - textDefault?: string | null; - /** @description Allowed pattern (regex) for text columns (not yet implemented) */ - textAllowedPattern?: string | null; - /** @description Max length, if column is a text */ - textMaxLength?: number | null; - /** @description Options for a selection (json array{id: int, label: string}) */ - selectionOptions?: string | null; - /** @description Default option IDs for a selection (json int[]) */ - selectionDefault?: string | null; - /** @description Default value, if column is datetime */ - datetimeDefault?: string | null; - /** @description View IDs where this column should be added to be presented */ - "selectedViewIds[]"?: number[] | null; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Title */ + title: string; + /** + * @description Column main type + * @enum {string} + */ + type: "text" | "number" | "datetime" | "select"; + /** @description Column sub type */ + subtype?: string | null; + /** @description Is the column mandatory */ + mandatory: boolean; + /** @description Description */ + description?: string | null; + /** @description Prefix if the column is a number field */ + numberPrefix?: string | null; + /** @description Suffix if the column is a number field */ + numberSuffix?: string | null; + /** + * Format: double + * @description Default number, if column is a number + */ + numberDefault?: number | null; + /** + * Format: double + * @description Min value, if column is a number + */ + numberMin?: number | null; + /** + * Format: double + * @description Max number, if column is a number + */ + numberMax?: number | null; + /** + * Format: int64 + * @description Number of decimals, if column is a number + */ + numberDecimals?: number | null; + /** @description Default text, if column is a text */ + textDefault?: string | null; + /** @description Allowed pattern (regex) for text columns (not yet implemented) */ + textAllowedPattern?: string | null; + /** + * Format: int64 + * @description Max length, if column is a text + */ + textMaxLength?: number | null; + /** + * @description Options for a selection (json array{id: int, label: string}) + * @default + */ + selectionOptions?: string | null; + /** + * @description Default option IDs for a selection (json int[]) + * @default + */ + selectionDefault?: string | null; + /** + * @description Default value, if column is datetime + * @default + */ + datetimeDefault?: string | null; + /** + * @description View IDs where this column should be added to be presented + * @default [] + */ + selectedViewIds?: number[] | null; + }; + }; + }; responses: { /** @description Column created */ 200: { @@ -1297,7 +1410,7 @@ export type operations = { }; }; /** Get all columns for a view Return an empty array if no columns were found */ - "api1-list-view-columns": { + "api1-index-view-columns": { parameters: { path: { /** @description View ID */ @@ -1338,48 +1451,86 @@ export type operations = { }; /** Create a column */ "api1-create-column": { - parameters: { - query: { - /** @description Table ID */ - tableId?: number | null; - /** @description View ID */ - viewId?: number | null; - /** @description Title */ - title: string; - /** @description Column main type */ - type: "text" | "number" | "datetime" | "select"; - /** @description Column sub type */ - subtype?: string | null; - /** @description Is the column mandatory */ - mandatory: 0 | 1; - /** @description Description */ - description?: string | null; - /** @description Prefix if the column is a number field */ - numberPrefix?: string | null; - /** @description Suffix if the column is a number field */ - numberSuffix?: string | null; - /** @description Default number, if column is a number */ - numberDefault?: number | null; - /** @description Min value, if column is a number */ - numberMin?: number | null; - /** @description Max number, if column is a number */ - numberMax?: number | null; - /** @description Number of decimals, if column is a number */ - numberDecimals?: number | null; - /** @description Default text, if column is a text */ - textDefault?: string | null; - /** @description Allowed pattern (regex) for text columns (not yet implemented) */ - textAllowedPattern?: string | null; - /** @description Max length, if column is a text */ - textMaxLength?: number | null; - /** @description Options for a selection (json array{id: int, label: string}) */ - selectionOptions?: string | null; - /** @description Default option IDs for a selection (json int[]) */ - selectionDefault?: string | null; - /** @description Default value, if column is datetime */ - datetimeDefault?: string | null; - /** @description View IDs where this column should be added to be presented */ - "selectedViewIds[]"?: number[] | null; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Table ID + */ + tableId?: number | null; + /** + * Format: int64 + * @description View ID + */ + viewId?: number | null; + /** @description Title */ + title: string; + /** + * @description Column main type + * @enum {string} + */ + type: "text" | "number" | "datetime" | "select"; + /** @description Column sub type */ + subtype?: string | null; + /** @description Is the column mandatory */ + mandatory: boolean; + /** @description Description */ + description?: string | null; + /** @description Prefix if the column is a number field */ + numberPrefix?: string | null; + /** @description Suffix if the column is a number field */ + numberSuffix?: string | null; + /** + * Format: double + * @description Default number, if column is a number + */ + numberDefault?: number | null; + /** + * Format: double + * @description Min value, if column is a number + */ + numberMin?: number | null; + /** + * Format: double + * @description Max number, if column is a number + */ + numberMax?: number | null; + /** + * Format: int64 + * @description Number of decimals, if column is a number + */ + numberDecimals?: number | null; + /** @description Default text, if column is a text */ + textDefault?: string | null; + /** @description Allowed pattern (regex) for text columns (not yet implemented) */ + textAllowedPattern?: string | null; + /** + * Format: int64 + * @description Max length, if column is a text + */ + textMaxLength?: number | null; + /** + * @description Options for a selection (json array{id: int, label: string}) + * @default + */ + selectionOptions?: string | null; + /** + * @description Default option IDs for a selection (json int[]) + * @default + */ + selectionDefault?: string | null; + /** + * @description Default value, if column is datetime + * @default + */ + datetimeDefault?: string | null; + /** + * @description View IDs where this column should be added to be presented + * @default [] + */ + selectedViewIds?: number[] | null; + }; }; }; responses: { @@ -1457,45 +1608,64 @@ export type operations = { /** Update a column */ "api1-update-column": { parameters: { - query: { - /** @description Title */ - title?: string | null; - /** @description Column sub type */ - subtype?: string | null; - /** @description Is the column mandatory */ - mandatory: 0 | 1; - /** @description Description */ - description?: string | null; - /** @description Prefix if the column is a number field */ - numberPrefix?: string | null; - /** @description Suffix if the column is a number field */ - numberSuffix?: string | null; - /** @description Default number, if column is a number */ - numberDefault?: number | null; - /** @description Min value, if column is a number */ - numberMin?: number | null; - /** @description Max number, if column is a number */ - numberMax?: number | null; - /** @description Number of decimals, if column is a number */ - numberDecimals?: number | null; - /** @description Default text, if column is a text */ - textDefault?: string | null; - /** @description Allowed pattern (regex) for text columns (not yet implemented) */ - textAllowedPattern?: string | null; - /** @description Max length, if column is a text */ - textMaxLength?: number | null; - /** @description Options for a selection (json array{id: int, label: string}) */ - selectionOptions?: string | null; - /** @description Default option IDs for a selection (json int[]) */ - selectionDefault?: string | null; - /** @description Default value, if column is datetime */ - datetimeDefault?: string | null; - }; path: { /** @description Column ID that will be updated */ columnId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Title */ + title?: string | null; + /** @description Column sub type */ + subtype?: string | null; + /** @description Is the column mandatory */ + mandatory: boolean; + /** @description Description */ + description?: string | null; + /** @description Prefix if the column is a number field */ + numberPrefix?: string | null; + /** @description Suffix if the column is a number field */ + numberSuffix?: string | null; + /** + * Format: double + * @description Default number, if column is a number + */ + numberDefault?: number | null; + /** + * Format: double + * @description Min value, if column is a number + */ + numberMin?: number | null; + /** + * Format: double + * @description Max number, if column is a number + */ + numberMax?: number | null; + /** + * Format: int64 + * @description Number of decimals, if column is a number + */ + numberDecimals?: number | null; + /** @description Default text, if column is a text */ + textDefault?: string | null; + /** @description Allowed pattern (regex) for text columns (not yet implemented) */ + textAllowedPattern?: string | null; + /** + * Format: int64 + * @description Max length, if column is a text + */ + textMaxLength?: number | null; + /** @description Options for a selection (json array{id: int, label: string}) */ + selectionOptions?: string | null; + /** @description Default option IDs for a selection (json int[]) */ + selectionDefault?: string | null; + /** @description Default value, if column is datetime */ + datetimeDefault?: string | null; + }; + }; + }; responses: { /** @description Updated column */ 200: { @@ -1553,19 +1723,29 @@ export type operations = { }; }; /** List all rows values for a table, first row are the column titles */ - "api1-list-table-rows-simple": { + "api1-index-table-rows-simple": { parameters: { - query?: { - /** @description Limit */ - limit?: number | null; - /** @description Offset */ - offset?: number | null; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description Limit + */ + limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + offset?: number | null; + }; + }; + }; responses: { /** @description Row values returned */ 200: { @@ -1599,19 +1779,29 @@ export type operations = { }; }; /** List all rows for a table */ - "api1-list-table-rows": { + "api1-index-table-rows": { parameters: { - query?: { - /** @description Limit */ - limit?: number | null; - /** @description Offset */ - offset?: number | null; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description Limit + */ + limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + offset?: number | null; + }; + }; + }; responses: { /** @description Rows returned */ 200: { @@ -1683,19 +1873,29 @@ export type operations = { }; }; /** List all rows for a view */ - "api1-list-view-rows": { + "api1-index-view-rows": { parameters: { - query?: { - /** @description Limit */ - limit?: number | null; - /** @description Offset */ - offset?: number | null; - }; path: { /** @description View ID */ viewId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description Limit + */ + limit?: number | null; + /** + * Format: int64 + * @description Offset + */ + offset?: number | null; + }; + }; + }; responses: { /** @description Rows returned */ 200: { @@ -1731,19 +1931,23 @@ export type operations = { /** Create a row within a view */ "api1-create-row-in-view": { parameters: { - query: { - /** @description Data as key - value store */ - data: OneOf<[string, { - /** Format: int64 */ - columnId: number; - value: Record; - }]>; - }; path: { /** @description View ID */ viewId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Data as key - value store */ + data: OneOf<[string, { + /** Format: int64 */ + columnId: number; + value: Record; + }]>; + }; + }; + }; responses: { /** @description Row returned */ 200: { @@ -1811,21 +2015,28 @@ export type operations = { /** Update a row */ "api1-update-row": { parameters: { - query: { - /** @description View ID */ - viewId?: number | null; - /** @description Data as key - value store */ - data: OneOf<[string, { - /** Format: int64 */ - columnId: number; - value: Record; - }]>; - }; path: { /** @description Row ID */ rowId: number; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description View ID + */ + viewId?: number | null; + /** @description Data as key - value store */ + data: OneOf<[string, { + /** Format: int64 */ + columnId: number; + value: Record; + }]>; + }; + }; + }; responses: { /** @description Updated row returned */ 200: { @@ -1943,17 +2154,24 @@ export type operations = { /** Import from file in to a table */ "api1-import-in-table": { parameters: { - query: { - /** @description Path to file */ - path: string; - /** @description Create missing columns */ - createMissingColumns?: 0 | 1; - }; path: { /** @description Table ID */ tableId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Path to file */ + path: string; + /** + * @description Create missing columns + * @default true + */ + createMissingColumns?: boolean; + }; + }; + }; responses: { /** @description Import status returned */ 200: { @@ -1989,17 +2207,24 @@ export type operations = { /** Import from file in to a table */ "api1-import-in-view": { parameters: { - query: { - /** @description Path to file */ - path: string; - /** @description Create missing columns */ - createMissingColumns?: 0 | 1; - }; path: { /** @description View ID */ viewId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description Path to file */ + path: string; + /** + * @description Create missing columns + * @default true + */ + createMissingColumns?: boolean; + }; + }; + }; responses: { /** @description Import status returned */ 200: { @@ -2036,7 +2261,7 @@ export type operations = { * [api v2] Returns all main resources * @description Tables and views incl. shares */ - "api_general-list": { + "api_general-index": { parameters: { header: { /** @description Required to be true for the API request to pass */ @@ -2070,7 +2295,7 @@ export type operations = { }; }; /** [api v2] Returns all Tables */ - "api_tables-list": { + "api_tables-index": { parameters: { header: { /** @description Required to be true for the API request to pass */ @@ -2106,21 +2331,28 @@ export type operations = { /** [api v2] Create a new table and return it */ "api_tables-create": { parameters: { - query: { - /** @description Title of the table */ - title: string; - /** @description Emoji for the table */ - emoji?: string | null; - /** @description Description for the table */ - description?: string | null; - /** @description Template to use if wanted */ - template?: string; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** @description Title of the table */ + title: string; + /** @description Emoji for the table */ + emoji?: string | null; + /** @description Description for the table */ + description?: string | null; + /** + * @description Template to use if wanted + * @default custom + */ + template?: string; + }; + }; + }; responses: { /** @description Tables returned */ 200: { @@ -2214,16 +2446,6 @@ export type operations = { /** [api v2] Update tables properties */ "api_tables-update": { parameters: { - query?: { - /** @description New table title */ - title?: string | null; - /** @description New table emoji */ - emoji?: string | null; - /** @description the tables description */ - description?: string; - /** @description whether the table is archived */ - archived?: 0 | 1; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; @@ -2233,6 +2455,20 @@ export type operations = { id: number; }; }; + requestBody?: { + content: { + "application/json": { + /** @description New table title */ + title?: string | null; + /** @description New table emoji */ + emoji?: string | null; + /** @description the tables description */ + description?: string; + /** @description whether the table is archived */ + archived?: boolean; + }; + }; + }; responses: { /** @description Tables returned */ 200: { @@ -2355,10 +2591,6 @@ export type operations = { */ "api_tables-transfer": { parameters: { - query: { - /** @description New user ID */ - newOwnerUserId: string; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; @@ -2368,6 +2600,14 @@ export type operations = { id: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description New user ID */ + newOwnerUserId: string; + }; + }; + }; responses: { /** @description Ownership changed */ 200: { @@ -2424,7 +2664,7 @@ export type operations = { * [api v2] Get all columns for a table or a view * @description Return an empty array if no columns were found */ - "api_columns-list": { + "api_columns-index": { parameters: { header: { /** @description Required to be true for the API request to pass */ @@ -2559,39 +2799,71 @@ export type operations = { */ "api_columns-create-number-column": { parameters: { - query: { - /** @description Context of the column creation */ - baseNodeId: number; - /** @description Title */ - title: string; - /** @description Default value for new rows */ - numberDefault?: number | null; - /** @description Decimals */ - numberDecimals?: number | null; - /** @description Prefix */ - numberPrefix?: string | null; - /** @description Suffix */ - numberSuffix?: string | null; - /** @description Min */ - numberMin?: number | null; - /** @description Max */ - numberMax?: number | null; - /** @description Subtype for the new column */ - subtype?: "progress" | "stars" | null; - /** @description Description */ - description?: string | null; - /** @description View IDs where this columns should be added */ - "selectedViewIds[]"?: number[] | null; - /** @description Is mandatory */ - mandatory?: 0 | 1; - /** @description Context type of the column creation */ - baseNodeType?: "table" | "view"; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Context of the column creation + */ + baseNodeId: number; + /** @description Title */ + title: string; + /** + * Format: double + * @description Default value for new rows + */ + numberDefault?: number | null; + /** + * Format: int64 + * @description Decimals + */ + numberDecimals?: number | null; + /** @description Prefix */ + numberPrefix?: string | null; + /** @description Suffix */ + numberSuffix?: string | null; + /** + * Format: double + * @description Min + */ + numberMin?: number | null; + /** + * Format: double + * @description Max + */ + numberMax?: number | null; + /** + * @description Subtype for the new column + * @enum {string|null} + */ + subtype?: "progress" | "stars" | null; + /** @description Description */ + description?: string | null; + /** + * @description View IDs where this columns should be added + * @default [] + */ + selectedViewIds?: number[] | null; + /** + * @description Is mandatory + * @default false + */ + mandatory?: boolean; + /** + * @description Context type of the column creation + * @default table + * @enum {string} + */ + baseNodeType?: "table" | "view"; + }; + }; + }; responses: { /** @description Column created */ 200: { @@ -2651,33 +2923,56 @@ export type operations = { */ "api_columns-create-text-column": { parameters: { - query: { - /** @description Context of the column creation */ - baseNodeId: number; - /** @description Title */ - title: string; - /** @description Default */ - textDefault?: string | null; - /** @description Allowed regex pattern */ - textAllowedPattern?: string | null; - /** @description Max raw text length */ - textMaxLength?: number | null; - /** @description Subtype for the new column */ - subtype?: "progress" | "stars" | null; - /** @description Description */ - description?: string | null; - /** @description View IDs where this columns should be added */ - "selectedViewIds[]"?: number[] | null; - /** @description Is mandatory */ - mandatory?: 0 | 1; - /** @description Context type of the column creation */ - baseNodeType?: "table" | "view"; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Context of the column creation + */ + baseNodeId: number; + /** @description Title */ + title: string; + /** @description Default */ + textDefault?: string | null; + /** @description Allowed regex pattern */ + textAllowedPattern?: string | null; + /** + * Format: int64 + * @description Max raw text length + */ + textMaxLength?: number | null; + /** + * @description Subtype for the new column + * @enum {string|null} + */ + subtype?: "progress" | "stars" | null; + /** @description Description */ + description?: string | null; + /** + * @description View IDs where this columns should be added + * @default [] + */ + selectedViewIds?: number[] | null; + /** + * @description Is mandatory + * @default false + */ + mandatory?: boolean; + /** + * @description Context type of the column creation + * @default table + * @enum {string} + */ + baseNodeType?: "table" | "view"; + }; + }; + }; responses: { /** @description Column created */ 200: { @@ -2737,31 +3032,51 @@ export type operations = { */ "api_columns-create-selection-column": { parameters: { - query: { - /** @description Context of the column creation */ - baseNodeId: number; - /** @description Title */ - title: string; - /** @description Json array{id: int, label: string} with options that can be selected, eg [{"id": 1, "label": "first"},{"id": 2, "label": "second"}] */ - selectionOptions: string; - /** @description Json int|int[] for default selected option(s), eg 5 or ["1", "8"] */ - selectionDefault?: string | null; - /** @description Subtype for the new column */ - subtype?: "progress" | "stars" | null; - /** @description Description */ - description?: string | null; - /** @description View IDs where this columns should be added */ - "selectedViewIds[]"?: number[] | null; - /** @description Is mandatory */ - mandatory?: 0 | 1; - /** @description Context type of the column creation */ - baseNodeType?: "table" | "view"; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Context of the column creation + */ + baseNodeId: number; + /** @description Title */ + title: string; + /** @description Json array{id: int, label: string} with options that can be selected, eg [{"id": 1, "label": "first"},{"id": 2, "label": "second"}] */ + selectionOptions: string; + /** @description Json int|int[] for default selected option(s), eg 5 or ["1", "8"] */ + selectionDefault?: string | null; + /** + * @description Subtype for the new column + * @enum {string|null} + */ + subtype?: "progress" | "stars" | null; + /** @description Description */ + description?: string | null; + /** + * @description View IDs where this columns should be added + * @default [] + */ + selectedViewIds?: number[] | null; + /** + * @description Is mandatory + * @default false + */ + mandatory?: boolean; + /** + * @description Context type of the column creation + * @default table + * @enum {string} + */ + baseNodeType?: "table" | "view"; + }; + }; + }; responses: { /** @description Column created */ 200: { @@ -2821,29 +3136,52 @@ export type operations = { */ "api_columns-create-datetime-column": { parameters: { - query: { - /** @description Context of the column creation */ - baseNodeId: number; - /** @description Title */ - title: string; - /** @description For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'. */ - datetimeDefault?: "today" | "now" | null; - /** @description Subtype for the new column */ - subtype?: "progress" | "stars" | null; - /** @description Description */ - description?: string | null; - /** @description View IDs where this columns should be added */ - "selectedViewIds[]"?: number[] | null; - /** @description Is mandatory */ - mandatory?: 0 | 1; - /** @description Context type of the column creation */ - baseNodeType?: "table" | "view"; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Context of the column creation + */ + baseNodeId: number; + /** @description Title */ + title: string; + /** + * @description For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'. + * @enum {string|null} + */ + datetimeDefault?: "today" | "now" | null; + /** + * @description Subtype for the new column + * @enum {string|null} + */ + subtype?: "progress" | "stars" | null; + /** @description Description */ + description?: string | null; + /** + * @description View IDs where this columns should be added + * @default [] + */ + selectedViewIds?: number[] | null; + /** + * @description Is mandatory + * @default false + */ + mandatory?: boolean; + /** + * @description Context type of the column creation + * @default table + * @enum {string} + */ + baseNodeType?: "table" | "view"; + }; + }; + }; responses: { /** @description Column created */ 200: { @@ -3033,7 +3371,7 @@ export type operations = { * [api v3] Get all contexts available to the requesting person * @description Return an empty array if no contexts were found */ - "context-list": { + "context-index": { parameters: { header: { /** @description Required to be true for the API request to pass */ @@ -3069,28 +3407,38 @@ export type operations = { /** [api v2] Create a new context and return it */ "context-create": { parameters: { - query: { - /** @description Name of the context */ - name: string; - /** @description Material design icon name of the context */ - iconName: string; - /** @description Descriptive text of the context */ - description?: string; - /** @description optional nodes to be connected to this context */ - "nodes[]"?: { - /** Format: int64 */ - id: number; - /** Format: int64 */ - type: number; - /** Format: int64 */ - permissions?: number; - }[]; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; }; + requestBody: { + content: { + "application/json": { + /** @description Name of the context */ + name: string; + /** @description Material design icon name of the context */ + iconName: string; + /** + * @description Descriptive text of the context + * @default + */ + description?: string; + /** + * @description optional nodes to be connected to this context + * @default [] + */ + nodes?: { + /** Format: int64 */ + id: number; + /** Format: int64 */ + type: number; + /** Format: int64 */ + permissions?: number; + }[]; + }; + }; + }; responses: { /** @description returning the full context information */ 200: { @@ -3197,16 +3545,6 @@ export type operations = { /** [api v2] Update an existing context and return it */ "context-update": { parameters: { - query?: { - /** @description provide this parameter to set a new name */ - name?: string | null; - /** @description provide this parameter to set a new icon */ - iconName?: string | null; - /** @description provide this parameter to set a new description */ - description?: string | null; - /** @description provide this parameter to set a new list of nodes. */ - nodes?: string | null; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; @@ -3216,6 +3554,29 @@ export type operations = { contextId: number; }; }; + requestBody?: { + content: { + "application/json": { + /** @description provide this parameter to set a new name */ + name?: string | null; + /** @description provide this parameter to set a new icon */ + iconName?: string | null; + /** @description provide this parameter to set a new description */ + description?: string | null; + /** @description provide this parameter to set a new list of nodes. */ + nodes?: { + /** Format: int64 */ + id: number; + /** Format: int64 */ + type: number; + /** Format: int64 */ + permissions: number; + /** Format: int64 */ + order: number; + } | null; + }; + }; + }; responses: { /** @description returning the full context information */ 200: { @@ -3322,12 +3683,6 @@ export type operations = { /** [api v2] Transfer the ownership of a context and return it */ "context-transfer": { parameters: { - query: { - /** @description ID of the new owner */ - newOwnerId: string; - /** @description any Application::OWNER_TYPE_* constant */ - newOwnerType?: number; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; @@ -3337,6 +3692,20 @@ export type operations = { contextId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description ID of the new owner */ + newOwnerId: string; + /** + * Format: int64 + * @description any Application::OWNER_TYPE_* constant + * @default 0 + */ + newOwnerType?: number; + }; + }; + }; responses: { /** @description Ownership transferred */ 200: { @@ -3392,10 +3761,6 @@ export type operations = { /** [api v2] Update the order on a page of a context */ "context-update-content-order": { parameters: { - query: { - /** @description content items with it and order values */ - content: string; - }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; @@ -3407,6 +3772,19 @@ export type operations = { pageId: number; }; }; + requestBody: { + content: { + "application/json": { + /** @description content items with it and order values */ + content: { + /** Format: int64 */ + id: number; + /** Format: int64 */ + order: number; + }; + }; + }; + }; responses: { /** @description content updated successfully */ 200: {