diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index ee6bb65487..3ca7adba17 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -1204,6 +1204,39 @@ export class Api< ...params, }), + /** + * @description Create Project by Importing Excel File + * + * @tags Project + * @name CreateByExcel + * @summary Project create + * @request POST:/api/v1/db/meta/projects/import/excel + * @response `200` `ProjectType` OK + */ + createByExcel: ( + data: { + title?: string; + projectType?: string; + template?: { + title?: string; + tables?: { + table_name?: string; + ref_table_name?: string; + columns?: object[]; + }[]; + }; + }, + params: RequestParams = {} + ) => + this.request({ + path: `/api/v1/db/meta/projects/import/excel`, + method: 'POST', + body: data, + type: ContentType.Json, + format: 'json', + ...params, + }), + /** * @description Read project details * diff --git a/scripts/sdk/swagger.json b/scripts/sdk/swagger.json index 091505e9a9..8ce379b025 100644 --- a/scripts/sdk/swagger.json +++ b/scripts/sdk/swagger.json @@ -801,6 +801,74 @@ ] } }, + "/api/v1/db/meta/projects/import/excel": { + "parameters": [], + "post": { + "summary": "Project create", + "operationId": "project-create-by-excel", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "projectType": { + "type": "string" + }, + "template": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "tables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "table_name": { + "type": "string" + }, + "ref_table_name": { + "type": "string" + }, + "columns": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [ + "Project" + ], + "description": "Create Project by Importing Excel File" + } + }, "/api/v1/db/meta/projects/{projectId}": { "parameters": [ {