diff --git a/appinfo/routes.php b/appinfo/routes.php index 2700b3668..d1314d927 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -20,6 +20,7 @@ ['name' => 'api1#createTable', 'url' => '/api/1/tables', 'verb' => 'POST'], ['name' => 'api1#updateTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'PUT'], ['name' => 'api1#getTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'GET'], + ['name' => 'api1#showScheme', 'url' => '/api/1/tables/{tableId}/scheme', 'verb' => 'GET'], ['name' => 'api1#deleteTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'DELETE'], // -> views ['name' => 'api1#indexViews', 'url' => '/api/1/tables/{tableId}/views', 'verb' => 'GET'], @@ -117,6 +118,8 @@ // -> tables ['name' => 'ApiTables#index', 'url' => '/api/2/tables', 'verb' => 'GET'], ['name' => 'ApiTables#show', 'url' => '/api/2/tables/{id}', 'verb' => 'GET'], + ['name' => 'ApiTables#showScheme', 'url' => '/api/2/tables/scheme/{id}', 'verb' => 'GET'], + ['name' => 'ApiTables#createFromScheme', 'url' => '/api/2/tables/scheme', 'verb' => 'POST'], ['name' => 'ApiTables#create', 'url' => '/api/2/tables', 'verb' => 'POST'], ['name' => 'ApiTables#update', 'url' => '/api/2/tables/{id}', 'verb' => 'PUT'], ['name' => 'ApiTables#destroy', 'url' => '/api/2/tables/{id}', 'verb' => 'DELETE'], diff --git a/lib/Controller/Api1Controller.php b/lib/Controller/Api1Controller.php index 5426c96c1..7a2f33666 100644 --- a/lib/Controller/Api1Controller.php +++ b/lib/Controller/Api1Controller.php @@ -132,6 +132,39 @@ public function createTable(string $title, ?string $emoji, string $template = 'c } } + /** + * returns table scheme + * + * @NoAdminRequired + * @CORS + * @NoCSRFRequired + * + * @param int $tableId Table ID + * @return DataResponse|DataResponse + * + * 200: Table returned + * 403: No permissions + * 404: Not found + */ + public function showScheme(int $tableId): DataResponse { + try { + $scheme = $this->tableService->getScheme($tableId); + return new DataResponse($scheme->jsonSerialize(), http::STATUS_OK, ['Content-Disposition' => 'attachment; filename="'.$scheme->getTitle() . '.json"', 'Content-Type' => 'application/octet-stream']); + } catch (PermissionError $e) { + $this->logger->warning('A permission error occurred: ' . $e->getMessage()); + $message = ['message' => $e->getMessage()]; + return new DataResponse($message, Http::STATUS_FORBIDDEN); + } catch (NotFoundError $e) { + $this->logger->warning('A not found error occurred: ' . $e->getMessage()); + $message = ['message' => $e->getMessage()]; + return new DataResponse($message, Http::STATUS_NOT_FOUND); + } catch (InternalError|Exception $e) { + $this->logger->warning('An internal error or exception occurred: '.$e->getMessage()); + $message = ['message' => $e->getMessage()]; + return new DataResponse($message, Http::STATUS_INTERNAL_SERVER_ERROR); + } + } + /** * Get a table object * diff --git a/lib/Controller/ApiTablesController.php b/lib/Controller/ApiTablesController.php index 0ee061d20..d246636d5 100644 --- a/lib/Controller/ApiTablesController.php +++ b/lib/Controller/ApiTablesController.php @@ -7,27 +7,45 @@ use OCA\Tables\Errors\NotFoundError; use OCA\Tables\Errors\PermissionError; use OCA\Tables\ResponseDefinitions; +use OCA\Tables\Service\ColumnService; use OCA\Tables\Service\TableService; +use OCA\Tables\Service\ViewService; +use OCP\App\IAppManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; +use OCP\IDBConnection; use OCP\IL10N; use OCP\IRequest; use Psr\Log\LoggerInterface; /** * @psalm-import-type TablesTable from ResponseDefinitions + * @psalm-import-type TablesView from ResponseDefinitions + * @psalm-import-type TablesColumn from ResponseDefinitions */ class ApiTablesController extends AOCSController { private TableService $service; + private ColumnService $columnService; + private ViewService $viewService; + private IAppManager $appManager; + private IDBConnection $db; public function __construct( IRequest $request, LoggerInterface $logger, TableService $service, + ColumnService $columnService, + ViewService $viewService, IL10N $n, + IAppManager $appManager, + IDBConnection $db, string $userId) { parent::__construct($request, $logger, $n, $userId); $this->service = $service; + $this->columnService = $columnService; + $this->appManager = $appManager; + $this->viewService = $viewService; + $this->db = $db; } /** @@ -71,6 +89,97 @@ public function show(int $id): DataResponse { } } + /** + * [api v2] Get a table Scheme + * + * @NoAdminRequired + * + * @param int $id Table ID + * @return DataResponse|DataResponse + * + * 200: Scheme returned + * 403: No permissions + * 404: Not found + */ + public function showScheme(int $id): DataResponse { + try { + return new DataResponse($this->service->getScheme($id)->jsonSerialize()); + } catch (PermissionError $e) { + return $this->handlePermissionError($e); + } catch (InternalError $e) { + return $this->handleError($e); + } catch (NotFoundError $e) { + return $this->handleNotFoundError($e); + } + } + + /** + * @NoAdminRequired + * + * creates table from scheme + * + * @param string $title title of new table + * @param string $emoji emoji + * @param string $description description + * @param array $columns columns + * @param array $views views + * @return DataResponse|DataResponse + * + * 200: Tables returned + */ + public function createFromScheme(string $title, string $emoji, string $description, array $columns, array $views): DataResponse { + try { + $this->db->beginTransaction(); + $table = $this->service->create($title, 'custom', $emoji, $description); + foreach ($columns as $column) { + $this->columnService->create( + $this->userId, + $table->getId(), + null, + $column['type'], + $column['subtype'], + $column['title'], + $column['mandatory'], + $column['description'], + + $column['textDefault'], + $column['textAllowedPattern'], + $column['textMaxLength'], + + $column['numberPrefix'], + $column['numberSuffix'], + $column['numberDefault'], + $column['numberMin'], + $column['numberMax'], + $column['numberDecimals'], + + $column['selectionOptions'] == [] ? '' : $column['selectionOptions'], + $column['selectionDefault'], + + $column['datetimeDefault'], + [], + ); + }; + foreach ($views as $view) { + $this->viewService->create( + $view['title'], + $view['emoji'], + $table, + $this->userId, + ); + } + $this->db->commit(); + return new DataResponse($table->jsonSerialize()); + } catch(InternalError | Exception $e) { + try { + $this->db->rollBack(); + } catch (\OCP\DB\Exception $e) { + return $this->handleError($e); + } + return $this->handleError($e); + } + } + /** * [api v2] Create a new table and return it * diff --git a/lib/Controller/TableScheme.php b/lib/Controller/TableScheme.php new file mode 100644 index 000000000..45349da5b --- /dev/null +++ b/lib/Controller/TableScheme.php @@ -0,0 +1,57 @@ +tablesVersion = $tablesVersion; + $this->title = $title; + $this->emoji = $emoji; + $this->columns = $columns; + $this->description = $description; + $this->views = $view; + } + + public function getTitle():string { + return $this->title | ''; + } + + public function jsonSerialize(): array { + return [ + 'title' => $this->title ?: '', + 'emoji' => $this->emoji, + 'columns' => $this->columns, + 'views' => $this->views, + 'description' => $this->description ?:'', + 'tablesVersion' => $this->tablesVersion, + ]; + } + + public function getEmoji(): ?string { + return $this->emoji; + } + + public function getColumns(): ?array { + return $this->columns; + } + + public function getDescription(): ?string { + return $this->description; + } +} diff --git a/lib/Db/Table.php b/lib/Db/Table.php index 9f5b1411f..c6b8e6050 100644 --- a/lib/Db/Table.php +++ b/lib/Db/Table.php @@ -14,11 +14,13 @@ * @psalm-import-type TablesView from ResponseDefinitions * * @method getTitle(): string + * @method getId(): int * @method setTitle(string $title) * @method getEmoji(): string * @method setEmoji(string $emoji) * @method getArchived(): bool * @method setArchived(bool $archived) + * @method getDescription(): string * @method setDescription(string $description) * @method getOwnership(): string * @method setOwnership(string $ownership) diff --git a/lib/Service/TableService.php b/lib/Service/TableService.php index 2d86a33ca..3e7826cc4 100644 --- a/lib/Service/TableService.php +++ b/lib/Service/TableService.php @@ -14,7 +14,9 @@ use OCA\Tables\Event\TableDeletedEvent; use OCA\Tables\Event\TableOwnershipTransferredEvent; use OCA\Tables\Helper\UserHelper; +use OCA\Tables\Model\TableScheme; use OCA\Tables\ResponseDefinitions; +use OCP\App\IAppManager; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\DB\Exception as OcpDbException; @@ -42,6 +44,7 @@ class TableService extends SuperService { protected FavoritesService $favoritesService; + protected IAppManager $appManager; protected IL10N $l; private ContextService $contextService; @@ -62,9 +65,11 @@ public function __construct( FavoritesService $favoritesService, IEventDispatcher $eventDispatcher, ContextService $contextService, + IAppManager $appManager, IL10N $l, ) { parent::__construct($logger, $userId, $permissionsService); + $this->appManager = $appManager; $this->mapper = $mapper; $this->tableTemplateService = $tableTemplateService; $this->columnService = $columnService; @@ -533,11 +538,22 @@ public function search(string $term, int $limit = 100, int $offset = 0, ?string $this->enhanceTable($table, $userId); } return $tables; - } catch (InternalError | PermissionError |OcpDbException $e) { + } catch (InternalError | PermissionError | OcpDbException $e) { return []; } } + /** + * @throws PermissionError + * @throws NotFoundError + * @throws InternalError + */ + public function getScheme(int $id): TableScheme { + $columns = $this->columnService->findAllByTable($id); + $table = $this->find($id); + return new TableScheme($table->getTitle(), $table->getEmoji(), $columns, $table->getViews(), $table->getDescription(), $this->appManager->getAppVersion("tables")); + } + // PRIVATE FUNCTIONS --------------------------------------------------------------- /** diff --git a/openapi.json b/openapi.json index b7b06486d..652d6d5cd 100644 --- a/openapi.json +++ b/openapi.json @@ -1143,6 +1143,105 @@ } } }, + "/index.php/apps/tables/api/1/tables/{tableId}/scheme": { + "get": { + "operationId": "api1-show-scheme", + "summary": "returns table scheme", + "tags": [ + "api1" + ], + "security": [ + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "tableId", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Table returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Table" + } + } + } + }, + "403": { + "description": "No permissions", + "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/tables/{tableId}/views": { "get": { "operationId": "api1-index-views", @@ -5699,6 +5798,335 @@ } } }, + "/ocs/v2.php/apps/tables/api/2/tables/scheme/{id}": { + "get": { + "operationId": "api_tables-show-scheme", + "summary": "[api v2] Get a table Scheme", + "tags": [ + "api_tables" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Scheme returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Table" + } + } + } + } + } + } + } + }, + "403": { + "description": "No permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/tables/api/2/tables/scheme": { + "post": { + "operationId": "api_tables-create-from-scheme", + "summary": "creates table from scheme", + "tags": [ + "api_tables" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title", + "emoji", + "description", + "columns", + "views" + ], + "properties": { + "title": { + "type": "string", + "description": "title of new table" + }, + "emoji": { + "type": "string", + "description": "emoji" + }, + "description": { + "type": "string", + "description": "description" + }, + "columns": { + "type": "array", + "description": "columns", + "items": { + "$ref": "#/components/schemas/Column" + } + }, + "views": { + "type": "array", + "description": "views", + "items": { + "$ref": "#/components/schemas/View" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Tables returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Table" + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/tables/api/2/tables/{id}/transfer": { "put": { "operationId": "api_tables-transfer", diff --git a/src/modules/modals/CreateTable.vue b/src/modules/modals/CreateTable.vue index 66ec5d683..bcd7570f4 100644 --- a/src/modules/modals/CreateTable.vue +++ b/src/modules/modals/CreateTable.vue @@ -61,6 +61,14 @@ :tabbable="true" @set-template="setTemplate(template.name)" /> +
+ +
@@ -168,6 +176,11 @@ export default { }, async submit() { if (this.title === '') { + if (this.templateChoice === 'scheme') { + emit('tables:modal:scheme', {}) + this.actionCancel() + return + } showError(t('tables', 'Cannot create new table. Title is missing.')) this.errorTitle = true } else { diff --git a/src/modules/modals/ImportScheme.vue b/src/modules/modals/ImportScheme.vue new file mode 100644 index 000000000..b604a73da --- /dev/null +++ b/src/modules/modals/ImportScheme.vue @@ -0,0 +1,96 @@ + + diff --git a/src/modules/modals/Modals.vue b/src/modules/modals/Modals.vue index 0de238ef4..5f725ca0e 100644 --- a/src/modules/modals/Modals.vue +++ b/src/modules/modals/Modals.vue @@ -37,6 +37,9 @@ :is-element-view="importToElement?.isView" @close="importToElement = null" /> + @@ -48,6 +51,7 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus' import CreateRow from './CreateRow.vue' +import ImportScheme from './ImportScheme.vue' import DeleteColumn from './DeleteColumn.vue' import EditColumn from './EditColumn.vue' import CreateColumn from './CreateColumn.vue' @@ -71,6 +75,7 @@ export default { DeleteView, CreateTable, Import, + ImportScheme, DeleteRows, ViewSettings, EditRow, @@ -98,6 +103,7 @@ export default { showModalCreateTable: false, showModalCreateContext: false, importToElement: null, + showImportScheme: false, createViewTableId: null, // if null, no modal open tableToDelete: null, viewToDelete: null, @@ -142,6 +148,7 @@ export default { // misc subscribe('tables:modal:import', element => { this.importToElement = element }) + subscribe('tables:modal:scheme', () => { this.showImportScheme = true }) // context subscribe('tables:context:create', () => { this.showModalCreateContext = true }) diff --git a/src/modules/navigation/partials/NavigationTableItem.vue b/src/modules/navigation/partials/NavigationTableItem.vue index 9ec1263eb..5998f798b 100644 --- a/src/modules/navigation/partials/NavigationTableItem.vue +++ b/src/modules/navigation/partials/NavigationTableItem.vue @@ -67,6 +67,13 @@ + + + {{ t('tables','Export') }} + + err) diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index bbf117dbf..b64696958 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -41,6 +41,23 @@ export type paths = { readonly patch?: never; readonly trace?: never; }; + readonly "/index.php/apps/tables/api/1/tables/{tableId}/scheme": { + readonly parameters: { + readonly query?: never; + readonly header?: never; + readonly path?: never; + readonly cookie?: never; + }; + /** returns table scheme */ + readonly get: operations["api1-show-scheme"]; + readonly put?: never; + readonly post?: never; + readonly delete?: never; + readonly options?: never; + readonly head?: never; + readonly patch?: never; + readonly trace?: never; + }; readonly "/index.php/apps/tables/api/1/tables/{tableId}/views": { readonly parameters: { readonly query?: never; @@ -417,6 +434,40 @@ export type paths = { readonly patch?: never; readonly trace?: never; }; + readonly "/ocs/v2.php/apps/tables/api/2/tables/scheme/{id}": { + readonly parameters: { + readonly query?: never; + readonly header?: never; + readonly path?: never; + readonly cookie?: never; + }; + /** [api v2] Get a table Scheme */ + readonly get: operations["api_tables-show-scheme"]; + readonly put?: never; + readonly post?: never; + readonly delete?: never; + readonly options?: never; + readonly head?: never; + readonly patch?: never; + readonly trace?: never; + }; + readonly "/ocs/v2.php/apps/tables/api/2/tables/scheme": { + readonly parameters: { + readonly query?: never; + readonly header?: never; + readonly path?: never; + readonly cookie?: never; + }; + readonly get?: never; + readonly put?: never; + /** creates table from scheme */ + readonly post: operations["api_tables-create-from-scheme"]; + readonly delete?: never; + readonly options?: never; + readonly head?: never; + readonly patch?: never; + readonly trace?: never; + }; readonly "/ocs/v2.php/apps/tables/api/2/tables/{id}/transfer": { readonly parameters: { readonly query?: never; @@ -1118,6 +1169,62 @@ export interface operations { }; }; }; + readonly "api1-show-scheme": { + readonly parameters: { + readonly query?: never; + readonly header?: never; + readonly path: { + /** @description Table ID */ + readonly tableId: number; + }; + readonly cookie?: never; + }; + readonly requestBody?: never; + readonly responses: { + /** @description Table returned */ + readonly 200: { + headers: { + readonly "Content-Disposition"?: string; + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": components["schemas"]["Table"]; + }; + }; + /** @description No permissions */ + readonly 403: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly message: string; + }; + }; + }; + /** @description Not found */ + readonly 404: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly message: string; + }; + }; + }; + readonly 500: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly message: string; + }; + }; + }; + }; + }; readonly "api1-index-views": { readonly parameters: { readonly query?: never; @@ -3581,6 +3688,142 @@ export interface operations { }; }; }; + readonly "api_tables-show-scheme": { + readonly parameters: { + readonly query?: never; + readonly header: { + /** @description Required to be true for the API request to pass */ + readonly "OCS-APIRequest": boolean; + }; + readonly path: { + /** @description Table ID */ + readonly id: number; + }; + readonly cookie?: never; + }; + readonly requestBody?: never; + readonly responses: { + /** @description Scheme returned */ + readonly 200: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: components["schemas"]["Table"]; + }; + }; + }; + }; + /** @description No permissions */ + readonly 403: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: { + readonly message: string; + }; + }; + }; + }; + }; + /** @description Not found */ + readonly 404: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: { + readonly message: string; + }; + }; + }; + }; + }; + readonly 500: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: { + readonly message: string; + }; + }; + }; + }; + }; + }; + }; + readonly "api_tables-create-from-scheme": { + readonly parameters: { + readonly query?: never; + readonly header: { + /** @description Required to be true for the API request to pass */ + readonly "OCS-APIRequest": boolean; + }; + readonly path?: never; + readonly cookie?: never; + }; + readonly requestBody: { + readonly content: { + readonly "application/json": { + /** @description title of new table */ + readonly title: string; + /** @description emoji */ + readonly emoji: string; + /** @description description */ + readonly description: string; + /** @description columns */ + readonly columns: readonly components["schemas"]["Column"][]; + /** @description views */ + readonly views: readonly components["schemas"]["View"][]; + }; + }; + }; + readonly responses: { + /** @description Tables returned */ + readonly 200: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: components["schemas"]["Table"]; + }; + }; + }; + }; + readonly 500: { + headers: { + readonly [name: string]: unknown; + }; + content: { + readonly "application/json": { + readonly ocs: { + readonly meta: components["schemas"]["OCSMeta"]; + readonly data: { + readonly message: string; + }; + }; + }; + }; + }; + }; + }; readonly "api_tables-transfer": { readonly parameters: { readonly query?: never;