Browse Source

feat(nocodb-sdk): add grouped data list

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
5827a93c56
  1. 801
      packages/nocodb-sdk/package-lock.json
  2. 51
      packages/nocodb-sdk/src/lib/Api.ts
  3. 174
      scripts/sdk/swagger.json

801
packages/nocodb-sdk/package-lock.json generated

File diff suppressed because it is too large Load Diff

51
packages/nocodb-sdk/src/lib/Api.ts

@ -2401,6 +2401,31 @@ export class Api<
...params,
}),
/**
* No description
*
* @tags DB table row
* @name GroupedDataList
* @summary Table Group by Column
* @request GET:/api/v1/db/data/{orgs}/{projectName}/{tableName}/group/{columnId}
* @response `200` `any` OK
*/
groupedDataList: (
orgs: string,
projectName: string,
tableName: string,
columnId: string,
query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any },
params: RequestParams = {}
) =>
this.request<any, any>({
path: `/api/v1/db/data/${orgs}/${projectName}/${tableName}/group/${columnId}`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
/**
* No description
*
@ -2765,6 +2790,32 @@ export class Api<
}),
};
dbViewRow = {
/**
* No description
*
* @tags DB view row
* @name GroupedDataList
* @summary Table Group by Column
* @request GET:/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId}
* @response `200` `any` OK
*/
groupedDataList: (
orgs: string,
projectName: string,
tableName: string,
viewName: string,
columnId: string,
query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any },
params: RequestParams = {}
) =>
this.request<any, any>({
path: `/api/v1/db/data/${orgs}/${projectName}/${tableName}/views/${viewName}/group/${columnId}`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
/**
* No description
*

174
scripts/sdk/swagger.json

@ -2892,6 +2892,180 @@
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "orgs",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "projectName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "tableName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "viewName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "columnId",
"in": "path",
"required": true
}
],
"get": {
"summary": "Table Group by Column",
"operationId": "db-view-row-grouped-data-list",
"description": "",
"tags": [
"DB view row"
],
"parameters": [
{
"schema": {
"type": "array"
},
"in": "query",
"name": "fields"
},
{
"schema": {
"type": "array"
},
"in": "query",
"name": "sort"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {},
"in": "query",
"name": "nested",
"description": "Query params for nested data"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/group/{columnId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "orgs",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "projectName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "tableName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "columnId",
"in": "path",
"required": true
}
],
"get": {
"summary": "Table Group by Column",
"operationId": "db-table-row-grouped-data-list",
"description": "",
"tags": [
"DB table row"
],
"parameters": [
{
"schema": {
"type": "array"
},
"in": "query",
"name": "fields"
},
{
"schema": {
"type": "array"
},
"in": "query",
"name": "sort"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {},
"in": "query",
"name": "nested",
"description": "Query params for nested data"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}": {
"parameters": [
{

Loading…
Cancel
Save