mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 01:15:28 +00:00
feat: add createByExcel API
This commit is contained in:
@@ -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<ProjectType, any>({
|
||||
path: `/api/v1/db/meta/projects/import/excel`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
type: ContentType.Json,
|
||||
format: 'json',
|
||||
...params,
|
||||
}),
|
||||
|
||||
/**
|
||||
* @description Read project details
|
||||
*
|
||||
|
||||
@@ -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": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user