Browse Source

chore: update swagger json and rebuild nocodb-sdk

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1687/head
Pranav C 3 years ago
parent
commit
70b4ce9651
  1. 44
      packages/nocodb-sdk/src/lib/Api.ts
  2. 176
      scripts/sdk/swagger.json

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

@ -2258,6 +2258,36 @@ export class Api<
...params, ...params,
}), }),
/**
* No description
*
* @tags DB table row
* @name GroupBy
* @summary Table row Group by
* @request GET:/api/v1/db/data/{orgs}/{projectName}/{tableName}/groupby
* @response `200` `any` OK
*/
groupBy: (
orgs: string,
projectName: string,
tableName: string,
query?: {
column_name?: string;
sort?: any[];
where?: string;
limit?: number;
offset?: number;
},
params: RequestParams = {}
) =>
this.request<any, any>({
path: `/api/v1/db/data/${orgs}/${projectName}/${tableName}/groupby`,
method: 'GET',
query: query,
format: 'json',
...params,
}),
/** /**
* No description * No description
* *
@ -2664,17 +2694,23 @@ export class Api<
* No description * No description
* *
* @tags DB view row * @tags DB view row
* @name FindOne * @name GroupBy
* @summary Table view row FindOne * @summary Table view row Group by
* @request GET:/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/find-one * @request GET:/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/find-one
* @response `200` `any` OK * @response `200` `any` OK
*/ */
findOne: ( groupBy: (
orgs: string, orgs: string,
projectName: string, projectName: string,
tableName: string, tableName: string,
viewName: string, viewName: string,
query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any }, query?: {
column_name?: string;
sort?: any[];
where?: string;
limit?: number;
offset?: number;
},
params: RequestParams = {} params: RequestParams = {}
) => ) =>
this.request<any, any>({ this.request<any, any>({

176
scripts/sdk/swagger.json

@ -2600,6 +2600,90 @@
} }
} }
}, },
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/groupby": {
"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"
},
"in": "query",
"name": "column_name",
"description":
"Column name of the column you want to group by, eg. `column_name=column1`"
}
],
"get": {
"summary": "Table row Group by",
"operationId": "db-table-row-group-by",
"description": "",
"tags": [
"DB table row"
],
"parameters": [
{
"schema": {
"type": "array"
},
"in": "query",
"name": "sort"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {
"type": "number"
},
"in": "query",
"name": "limit"
},
{
"schema": {
"type": "number"
},
"in": "query",
"name": "offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}": { "/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}": {
"parameters": [ "parameters": [
{ {
@ -2790,6 +2874,98 @@
} }
} }
}, },
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/find-one": {
"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"
},
"in": "query",
"name": "column_name",
"description":
"Column name of the column you want to group by, eg. `column_name=column1`"
}
],
"get": {
"summary": "Table view row Group by",
"operationId": "db-view-row-group-by",
"description": "",
"tags": [
"DB view row"
],
"parameters": [
{
"schema": {
"type": "array"
},
"in": "query",
"name": "sort"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {
"type": "number"
},
"in": "query",
"name": "limit"
},
{
"schema": {
"type": "number"
},
"in": "query",
"name": "offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count": { "/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count": {
"parameters": [ "parameters": [
{ {

Loading…
Cancel
Save