mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-02 02:37:33 +00:00
@@ -31,7 +31,8 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"bootstrap": "pnpm --filter=nocodb-sdk install && pnpm --filter=nocodb-sdk run build && pnpm --filter=nocodb --filter=nc-mail-templates --filter=nc-gui --filter=playwright install && pnpm run registerIntegrations",
|
||||
"bootstrap": "pnpm --filter=nocodb-sdk install && pnpm --filter=nocodb-sdk run build && pnpm --filter=nocodb --filter=nc-mail-templates --filter=nc-gui --filter=playwright install && pnpm run integrations:build && pnpm run registerIntegrations",
|
||||
"integrations:build": "cd ./packages/noco-integrations/ && pnpm i && pnpm run build",
|
||||
"start:frontend": "pnpm --filter=nc-gui run dev",
|
||||
"start:backend": "pnpm --filter=nocodb run start",
|
||||
"lint:staged:playwright": "cd ./tests/playwright; pnpm dlx lint-staged; cd -",
|
||||
|
||||
25
packages/noco-integrations/core/package.json
Normal file
25
packages/noco-integrations/core/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@noco-integrations/core",
|
||||
"version": "1.0.0",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "rimraf dist",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"ai": "^4.3.15",
|
||||
"nocodb-sdk": "file:../../nocodb-sdk",
|
||||
"zod": "^3.24.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.17.46",
|
||||
"@vitest/coverage-v8": "^3.1.3",
|
||||
"rimraf": "^5.0.10",
|
||||
"typescript": "^5.8.3",
|
||||
"vitest": "^3.1.3"
|
||||
}
|
||||
}
|
||||
29
packages/noco-integrations/package.json
Normal file
29
packages/noco-integrations/package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "nocodb-integrations",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm -r build",
|
||||
"test": "pnpm -r test",
|
||||
"test:coverage": "pnpm -r test:coverage",
|
||||
"test:watch": "pnpm -r test:watch",
|
||||
"lint": "eslint \"packages/**/src/**/*.{ts,tsx}\"",
|
||||
"lint:fix": "eslint --fix \"packages/**/src/**/*.{ts,tsx}\"",
|
||||
"format": "prettier --write \"packages/**/src/**/*.{ts,tsx,json,md}\"",
|
||||
"format:check": "prettier --check \"packages/**/src/**/*.{ts,tsx,json,md}\"",
|
||||
"fix": "pnpm format && pnpm lint:fix",
|
||||
"clean": "pnpm -r clean"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.26.0",
|
||||
"@types/node": "^20.17.46",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||
"@typescript-eslint/parser": "^8.32.0",
|
||||
"eslint": "^9.26.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"prettier": "^3.5.3",
|
||||
"taze": "^19.1.0",
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
3881
packages/noco-integrations/pnpm-lock.yaml
generated
Normal file
3881
packages/noco-integrations/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -266,7 +266,7 @@ export interface FieldOptionsLinkToAnotherRecordV3Type {
|
||||
*/
|
||||
relation_type: string;
|
||||
/** Identifier of the linked table. */
|
||||
linked_table_id: string;
|
||||
related_table_id: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsLinksV3Type {
|
||||
@@ -280,16 +280,46 @@ export interface FieldOptionsLinksV3Type {
|
||||
*/
|
||||
relation_type: string;
|
||||
/** Identifier of the linked table. */
|
||||
linked_table_id: string;
|
||||
related_table_id: string;
|
||||
}
|
||||
|
||||
export type FieldOptionsButtonV3Type = any;
|
||||
export type FieldOptionsButtonV3Type =
|
||||
| {
|
||||
/** Button type: formula */
|
||||
type: 'formula';
|
||||
/** Formula to execute */
|
||||
formula: string;
|
||||
}
|
||||
| {
|
||||
/** Button type: webhook */
|
||||
type: 'webhook';
|
||||
/** ID of the webhook to trigger */
|
||||
button_hook_id: string;
|
||||
}
|
||||
| {
|
||||
/** Button type: AI */
|
||||
type: 'ai';
|
||||
/** AI prompt to execute */
|
||||
prompt: string;
|
||||
/** Integration ID for AI service */
|
||||
integration_id: string;
|
||||
/** Theme of the button */
|
||||
theme?: string;
|
||||
/** IDs of columns where AI output should be stored */
|
||||
output_column_ids?: string;
|
||||
/** Label of the button */
|
||||
label?: string;
|
||||
/** Icon of the button */
|
||||
icon?: string;
|
||||
/** Color of the button */
|
||||
color?: string;
|
||||
};
|
||||
|
||||
export interface FieldOptionsRollupV3Type {
|
||||
/** Linked field ID. */
|
||||
link_field_id: string;
|
||||
related_field_id: string;
|
||||
/** Rollup field ID in the linked table. */
|
||||
linked_table_rollup_field_id: string;
|
||||
related_table_rollup_field_id: string;
|
||||
/** Rollup function. */
|
||||
rollup_function:
|
||||
| 'count'
|
||||
@@ -304,9 +334,9 @@ export interface FieldOptionsRollupV3Type {
|
||||
|
||||
export interface FieldOptionsLookupV3Type {
|
||||
/** Linked field ID. Can be of type Links or LinkToAnotherRecord */
|
||||
link_field_id: string;
|
||||
related_field_id: string;
|
||||
/** Lookup field ID in the linked table. */
|
||||
linked_table_lookup_field_id: string;
|
||||
related_table_lookup_field_id: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsUserV3Type {
|
||||
@@ -319,11 +349,16 @@ export interface FieldOptionsFormulaV3Type {
|
||||
formula?: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsQRCodeV3Type {
|
||||
/** Field ID that contains the value. */
|
||||
qrcode_value_field_id?: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsBarcodeV3Type {
|
||||
/** Barcode format (e.g., CODE128). */
|
||||
format?: string;
|
||||
/** Field ID that contains the value. */
|
||||
value_field_id?: string;
|
||||
barcode_value_field_id?: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsCheckboxV3Type {
|
||||
@@ -388,13 +423,6 @@ export interface FieldOptionsSelectV3Type {
|
||||
}
|
||||
|
||||
export interface FieldOptionsTimeV3Type {
|
||||
/**
|
||||
* Time format. Supported options are listed below
|
||||
* - `HH:mm`
|
||||
* - `HH:mm:ss`
|
||||
* - `HH:mm:ss.SSS`
|
||||
*/
|
||||
time_format?: string;
|
||||
/** Use 12-hour time format. */
|
||||
'12hr_format'?: boolean;
|
||||
}
|
||||
@@ -442,6 +470,12 @@ export interface FieldOptionsDateTimeV3Type {
|
||||
time_format?: string;
|
||||
/** Use 12-hour time format. */
|
||||
'12hr_format'?: boolean;
|
||||
/** Display timezone. */
|
||||
display_timezone?: boolean;
|
||||
/** Timezone. Refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones */
|
||||
timezone?: string;
|
||||
/** Use same timezone for all records. */
|
||||
use_same_timezone_for_all?: boolean;
|
||||
}
|
||||
|
||||
export interface FieldOptionsDurationV3Type {
|
||||
@@ -453,16 +487,10 @@ export interface FieldOptionsDurationV3Type {
|
||||
* - `h:mm:ss.SS`
|
||||
* - `h:mm:ss.SSS`
|
||||
*/
|
||||
format?: string;
|
||||
duration_format?: string;
|
||||
}
|
||||
|
||||
export interface FieldOptionsPercentV3Type {
|
||||
/**
|
||||
* Number of decimal places allowed.
|
||||
* @min 0
|
||||
* @max 5
|
||||
*/
|
||||
precision?: number;
|
||||
/** Display as a progress bar. */
|
||||
show_as_progress?: boolean;
|
||||
}
|
||||
@@ -6967,7 +6995,7 @@ export class Api<
|
||||
* @name HasEmptyOrNullFilters
|
||||
* @summary List Empty & Null Filter
|
||||
* @request GET:/api/v1/db/meta/projects/{baseId}/has-empty-or-null-filters
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -6976,7 +7004,7 @@ export class Api<
|
||||
*/
|
||||
hasEmptyOrNullFilters: (baseId: IdType, params: RequestParams = {}) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -7147,7 +7175,7 @@ export class Api<
|
||||
* @name List
|
||||
* @summary List Sources
|
||||
* @request GET:/api/v1/db/meta/projects/{baseId}/bases/
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -7156,7 +7184,7 @@ export class Api<
|
||||
*/
|
||||
list: (baseId: IdType, params: RequestParams = {}) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -9503,7 +9531,7 @@ export class Api<
|
||||
* @name Create
|
||||
* @summary Create Table Row
|
||||
* @request POST:/api/v1/db/data/{orgs}/{baseName}/{tableName}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -9522,7 +9550,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -9583,7 +9611,7 @@ export class Api<
|
||||
* @name GroupBy
|
||||
* @summary Group By Table Row
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/groupby
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
groupBy: (
|
||||
orgs: string,
|
||||
@@ -9601,7 +9629,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v1/db/data/${orgs}/${baseName}/${tableName}/groupby`,
|
||||
method: 'GET',
|
||||
query: query,
|
||||
@@ -9616,7 +9644,7 @@ export class Api<
|
||||
* @name GroupByCount
|
||||
* @summary Group By Table Row Count
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/groupby/count
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
groupByCount: (
|
||||
orgs: string,
|
||||
@@ -9632,7 +9660,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v1/db/data/${orgs}/${baseName}/${tableName}/groupby/count`,
|
||||
method: 'GET',
|
||||
query: query,
|
||||
@@ -9996,7 +10024,7 @@ export class Api<
|
||||
* @name BulkUpdateAll
|
||||
* @summary Bulk Update Table Rows with Conditions
|
||||
* @request PATCH:/api/v1/db/data/bulk/{orgs}/{baseName}/{tableName}/all
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10015,7 +10043,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10075,7 +10103,7 @@ export class Api<
|
||||
* @name NestedList
|
||||
* @summary List Nested Relations Rows
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10099,7 +10127,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10230,7 +10258,7 @@ export class Api<
|
||||
* @name NestedChildrenExcludedList
|
||||
* @summary Referenced Table Rows Excluding Current Record's Children / Parent
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/exclude
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10254,7 +10282,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10457,7 +10485,7 @@ export class Api<
|
||||
* @name GroupBy
|
||||
* @summary Group By Table View Row
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10482,7 +10510,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10502,7 +10530,7 @@ export class Api<
|
||||
* @name GroupByCount
|
||||
* @summary Count of Group By Table View Row
|
||||
* @request GET:/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby/count
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10525,7 +10553,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10827,7 +10855,7 @@ export class Api<
|
||||
* @name DbCalendarViewRowCount
|
||||
* @summary Count of Records in Dates in Calendar View
|
||||
* @request GET:/api/v1/db/calendar-data/{orgs}/{baseName}/{tableName}/views/{viewName}/countByDate/
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10854,7 +10882,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -10875,7 +10903,7 @@ export class Api<
|
||||
* @name DataCalendarRowCount
|
||||
* @summary Count of Records in Dates in Calendar View
|
||||
* @request GET:/api/v1/db/public/calendar-view/{sharedViewUuid}/countByDate
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -10899,7 +10927,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -11343,7 +11371,7 @@ export class Api<
|
||||
* @name DataGroupByCount
|
||||
* @summary Group By Table Row Count
|
||||
* @request GET:/api/v2/public/shared-view/{sharedViewUuid}/groupby/count
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -11365,7 +11393,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -11453,7 +11481,7 @@ export class Api<
|
||||
* @name DataRelationList
|
||||
* @summary List Nested Data Relation
|
||||
* @request GET:/api/v1/db/public/shared-view/{sharedViewUuid}/nested/{columnName}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -11488,7 +11516,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -12690,10 +12718,10 @@ export class Api<
|
||||
* @name CommandPalette
|
||||
* @summary Get command palette suggestions
|
||||
* @request POST:/api/v1/command_palette
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
commandPalette: (data: any, params: RequestParams = {}) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v1/command_palette`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
@@ -13043,7 +13071,7 @@ export class Api<
|
||||
* @name Test
|
||||
* @summary Test Plugin
|
||||
* @request POST:/api/v1/db/meta/plugins/test
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13052,7 +13080,7 @@ export class Api<
|
||||
*/
|
||||
test: (data: PluginTestReqType, params: RequestParams = {}) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13073,7 +13101,7 @@ export class Api<
|
||||
* @name Update
|
||||
* @summary Update Plugin
|
||||
* @request PATCH:/api/v1/db/meta/plugins/{pluginId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13086,7 +13114,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13505,7 +13533,7 @@ export class Api<
|
||||
* @name Create
|
||||
* @summary Create Table Rows
|
||||
* @request POST:/api/v2/tables/{tableId}/records
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13524,7 +13552,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13546,7 +13574,7 @@ export class Api<
|
||||
* @name Update
|
||||
* @summary Update Table Rows
|
||||
* @request PATCH:/api/v2/tables/{tableId}/records
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13563,7 +13591,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13585,7 +13613,7 @@ export class Api<
|
||||
* @name Delete
|
||||
* @summary Delete Table Rows
|
||||
* @request DELETE:/api/v2/tables/{tableId}/records
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13602,7 +13630,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13821,7 +13849,7 @@ export class Api<
|
||||
* @name NestedLink
|
||||
* @summary Create Nested Relations Rows
|
||||
* @request POST:/api/v2/tables/{tableId}/links/{columnId}/records/{rowId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13840,7 +13868,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13862,7 +13890,7 @@ export class Api<
|
||||
* @name NestedUnlink
|
||||
* @summary Delete Nested Relations Rows
|
||||
* @request DELETE:/api/v2/tables/{tableId}/links/{columnId}/records/{rowId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13881,7 +13909,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -13944,7 +13972,7 @@ export class Api<
|
||||
* @name NestedListCopyPasteOrDeleteAll
|
||||
* @summary Copy paste or deleteAll nested link
|
||||
* @request POST:/api/v2/tables/{tableId}/links/{columnId}/records
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
* @response `400` `{
|
||||
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
|
||||
msg: string,
|
||||
@@ -13962,7 +13990,7 @@ export class Api<
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<
|
||||
FieldOptionsButtonV3Type,
|
||||
BaseUserDeleteRequestV3Type,
|
||||
{
|
||||
/** @example BadRequest [Error]: <ERROR MESSAGE> */
|
||||
msg: string;
|
||||
@@ -14010,10 +14038,10 @@ export class Api<
|
||||
* @name Create
|
||||
* @summary Create Extension
|
||||
* @request POST:/api/v2/extensions/{baseId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
create: (baseId: IdType, data: object, params: RequestParams = {}) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/extensions/${baseId}`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
@@ -14046,10 +14074,10 @@ export class Api<
|
||||
* @name Update
|
||||
* @summary Update Extension
|
||||
* @request PATCH:/api/v2/extensions/{extensionId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
update: (extensionId: IdType, data: object, params: RequestParams = {}) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/extensions/${extensionId}`,
|
||||
method: 'PATCH',
|
||||
body: data,
|
||||
@@ -14065,10 +14093,10 @@ export class Api<
|
||||
* @name Delete
|
||||
* @summary Delete Extension
|
||||
* @request DELETE:/api/v2/extensions/{extensionId}
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
delete: (extensionId: IdType, params: RequestParams = {}) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/extensions/${extensionId}`,
|
||||
method: 'DELETE',
|
||||
format: 'json',
|
||||
@@ -14148,7 +14176,7 @@ export class Api<
|
||||
* @name Utils
|
||||
* @summary AI Utils
|
||||
* @request POST:/api/v2/ai/bases/{baseId}/utils
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
utils: (
|
||||
baseId: IdType,
|
||||
@@ -14158,7 +14186,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/ai/bases/${baseId}/utils`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
@@ -14174,7 +14202,7 @@ export class Api<
|
||||
* @name Schema
|
||||
* @summary AI Schema
|
||||
* @request POST:/api/v2/ai/bases/{baseId}/schema
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
schema: (
|
||||
baseId: IdType,
|
||||
@@ -14184,7 +14212,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/ai/bases/${baseId}/schema`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
@@ -14200,7 +14228,7 @@ export class Api<
|
||||
* @name SchemaCreate
|
||||
* @summary AI Schema
|
||||
* @request POST:/api/v2/ai/workspaces/{workspaceId}/bases
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
schemaCreate: (
|
||||
workspaceId: IdType,
|
||||
@@ -14210,7 +14238,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/ai/workspaces/${workspaceId}/bases`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
@@ -14315,7 +14343,7 @@ export class Api<
|
||||
* @name List
|
||||
* @summary List integrations
|
||||
* @request GET:/api/v2/meta/integrations
|
||||
* @response `200` `FieldOptionsButtonV3Type` OK
|
||||
* @response `200` `BaseUserDeleteRequestV3Type` OK
|
||||
*/
|
||||
list: (
|
||||
query?: {
|
||||
@@ -14329,7 +14357,7 @@ export class Api<
|
||||
},
|
||||
params: RequestParams = {}
|
||||
) =>
|
||||
this.request<FieldOptionsButtonV3Type, any>({
|
||||
this.request<BaseUserDeleteRequestV3Type, any>({
|
||||
path: `/api/v2/meta/integrations`,
|
||||
method: 'GET',
|
||||
query: query,
|
||||
|
||||
@@ -145,6 +145,15 @@ async function registerIntegrations(EE = false) {
|
||||
${exportEntries.map((entry) => ` ${entry},`).join('\n')}
|
||||
] as IntegrationEntry[];\n`;
|
||||
|
||||
if (EE) {
|
||||
// check if src/ee/integrations/index.ts exists
|
||||
const eeIndexPath = path.join(__dirname, '..', 'src/ee/integrations');
|
||||
const exists = await fs.stat(eeIndexPath).catch(() => false);
|
||||
if (!exists) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Write the generated content to index.ts
|
||||
await fs.writeFile(indexPath, indexContent);
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@ const baseDevConfig = {
|
||||
tsConfig: {
|
||||
configFile: resolve('tsconfig.json'),
|
||||
},
|
||||
alias: {
|
||||
'@noco-local-integrations': resolve(__dirname, '../noco-integrations/packages'),
|
||||
},
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
|
||||
@@ -62,6 +62,8 @@ export default class Integration implements IntegrationType {
|
||||
Object.assign(this, integration);
|
||||
}
|
||||
|
||||
public static async init() {}
|
||||
|
||||
protected static castType(integration: Integration): Integration {
|
||||
return integration && new Integration(integration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user