@budibase/types 2.5.6-alpha.2 → 2.5.6-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/account/license.d.ts +9 -1
- package/dist/cjs/api/web/user.d.ts +17 -15
- package/dist/cjs/documents/account/account.d.ts +3 -0
- package/dist/cjs/documents/account/account.js.map +1 -1
- package/dist/cjs/documents/app/automation.d.ts +57 -8
- package/dist/cjs/documents/app/automation.js +37 -1
- package/dist/cjs/documents/app/automation.js.map +1 -1
- package/dist/cjs/documents/app/table.d.ts +3 -0
- package/dist/cjs/documents/global/plugin.d.ts +2 -1
- package/dist/cjs/documents/global/plugin.js +1 -0
- package/dist/cjs/documents/global/plugin.js.map +1 -1
- package/dist/cjs/documents/global/quotas.d.ts +1 -0
- package/dist/cjs/sdk/licensing/billing.d.ts +1 -0
- package/dist/cjs/sdk/licensing/feature.d.ts +4 -0
- package/dist/cjs/sdk/licensing/feature.js.map +1 -1
- package/dist/cjs/sdk/licensing/license.d.ts +3 -2
- package/dist/cjs/sdk/licensing/plan.d.ts +25 -6
- package/dist/cjs/sdk/licensing/plan.js +9 -1
- package/dist/cjs/sdk/licensing/plan.js.map +1 -1
- package/dist/cjs/sdk/licensing/quota.d.ts +10 -5
- package/dist/cjs/sdk/licensing/quota.js +1 -1
- package/dist/cjs/sdk/licensing/quota.js.map +1 -1
- package/dist/cjs/sdk/locks.d.ts +10 -2
- package/dist/cjs/sdk/locks.js +2 -0
- package/dist/cjs/sdk/locks.js.map +1 -1
- package/dist/cjs/tsconfig-cjs.build.tsbuildinfo +1 -1
- package/dist/mjs/api/account/license.d.ts +9 -1
- package/dist/mjs/api/web/user.d.ts +17 -15
- package/dist/mjs/documents/account/account.d.ts +3 -0
- package/dist/mjs/documents/account/account.js +1 -1
- package/dist/mjs/documents/account/account.js.map +1 -1
- package/dist/mjs/documents/app/automation.d.ts +57 -8
- package/dist/mjs/documents/app/automation.js +36 -0
- package/dist/mjs/documents/app/automation.js.map +1 -1
- package/dist/mjs/documents/app/table.d.ts +3 -0
- package/dist/mjs/documents/global/plugin.d.ts +2 -1
- package/dist/mjs/documents/global/plugin.js +1 -0
- package/dist/mjs/documents/global/plugin.js.map +1 -1
- package/dist/mjs/documents/global/quotas.d.ts +1 -0
- package/dist/mjs/sdk/licensing/billing.d.ts +1 -0
- package/dist/mjs/sdk/licensing/feature.d.ts +4 -0
- package/dist/mjs/sdk/licensing/feature.js.map +1 -1
- package/dist/mjs/sdk/licensing/license.d.ts +3 -2
- package/dist/mjs/sdk/licensing/plan.d.ts +25 -6
- package/dist/mjs/sdk/licensing/plan.js +8 -0
- package/dist/mjs/sdk/licensing/plan.js.map +1 -1
- package/dist/mjs/sdk/licensing/quota.d.ts +10 -5
- package/dist/mjs/sdk/licensing/quota.js +1 -1
- package/dist/mjs/sdk/licensing/quota.js.map +1 -1
- package/dist/mjs/sdk/locks.d.ts +10 -2
- package/dist/mjs/sdk/locks.js +2 -0
- package/dist/mjs/sdk/locks.js.map +1 -1
- package/dist/mjs/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/api/account/license.ts +12 -1
- package/src/api/web/user.ts +12 -8
- package/src/documents/account/account.ts +5 -11
- package/src/documents/app/automation.ts +65 -8
- package/src/documents/app/table.ts +3 -0
- package/src/documents/global/plugin.ts +1 -0
- package/src/documents/global/quotas.ts +1 -0
- package/src/sdk/licensing/billing.ts +1 -0
- package/src/sdk/licensing/feature.ts +4 -0
- package/src/sdk/licensing/license.ts +3 -2
- package/src/sdk/licensing/plan.ts +29 -7
- package/src/sdk/licensing/quota.ts +9 -6
- package/src/sdk/locks.ts +9 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { QuotaUsage } from "../../documents";
|
|
2
2
|
export interface GetLicenseRequest {
|
|
3
|
-
quotaUsage
|
|
3
|
+
quotaUsage?: QuotaUsage;
|
|
4
|
+
install: {
|
|
5
|
+
id: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
4
9
|
}
|
|
5
10
|
export interface QuotaTriggeredRequest {
|
|
6
11
|
percentage: number;
|
|
7
12
|
name: string;
|
|
8
13
|
resetDate?: string;
|
|
9
14
|
}
|
|
15
|
+
export interface LicenseActivateRequest {
|
|
16
|
+
installVersion?: string;
|
|
17
|
+
}
|
|
@@ -18,22 +18,24 @@ export interface BulkUserRequest {
|
|
|
18
18
|
groups: any[];
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
export interface BulkUserCreated {
|
|
22
|
+
successful: UserDetails[];
|
|
23
|
+
unsuccessful: {
|
|
24
|
+
email: string;
|
|
25
|
+
reason: string;
|
|
26
|
+
}[];
|
|
27
|
+
}
|
|
28
|
+
export interface BulkUserDeleted {
|
|
29
|
+
successful: UserDetails[];
|
|
30
|
+
unsuccessful: {
|
|
31
|
+
_id: string;
|
|
32
|
+
email: string;
|
|
33
|
+
reason: string;
|
|
34
|
+
}[];
|
|
35
|
+
}
|
|
21
36
|
export interface BulkUserResponse {
|
|
22
|
-
created?:
|
|
23
|
-
|
|
24
|
-
unsuccessful: {
|
|
25
|
-
email: string;
|
|
26
|
-
reason: string;
|
|
27
|
-
}[];
|
|
28
|
-
};
|
|
29
|
-
deleted?: {
|
|
30
|
-
successful: UserDetails[];
|
|
31
|
-
unsuccessful: {
|
|
32
|
-
_id: string;
|
|
33
|
-
email: string;
|
|
34
|
-
reason: string;
|
|
35
|
-
}[];
|
|
36
|
-
};
|
|
37
|
+
created?: BulkUserCreated;
|
|
38
|
+
deleted?: BulkUserDeleted;
|
|
37
39
|
message?: string;
|
|
38
40
|
}
|
|
39
41
|
export interface InviteUserRequest {
|
|
@@ -28,6 +28,9 @@ export interface Account extends CreateAccount {
|
|
|
28
28
|
planType?: PlanType;
|
|
29
29
|
planTier?: number;
|
|
30
30
|
license?: License;
|
|
31
|
+
installId?: string;
|
|
32
|
+
installTenantId?: string;
|
|
33
|
+
installVersion?: string;
|
|
31
34
|
stripeCustomerId?: string;
|
|
32
35
|
licenseKey?: string;
|
|
33
36
|
licenseKeyActivatedAt?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/documents/account/account.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/documents/account/account.ts"],"names":[],"mappings":";;;AAAA,mCAAuE;AAqBhE,MAAM,uBAAuB,GAAG,CACrC,OAAsB,EACa,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAA;AAFjE,QAAA,uBAAuB,2BAE0C;AAiCvE,MAAM,iBAAiB,GAAG,CAC/B,OAAgB,EACY,EAAE,CAC9B,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,aAAO,CAAC,IAAI,CAAA;AAH/D,QAAA,iBAAiB,qBAG8C;AAOrE,MAAM,cAAc,GAAG,CAAC,OAAgB,EAA2B,EAAE,CAC1E,OAAO,CAAC,OAAO,KAAK,aAAO,CAAC,KAAK,CAAA;AADtB,QAAA,cAAc,kBACQ;AAE5B,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACpD,OAAO,CAAC,OAAO,KAAK,aAAO,CAAC,IAAI,CAAA;AADrB,QAAA,iBAAiB,qBACI;AAE3B,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAyB,EAAE,CACtE,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,GAAG,CAAA;AADtB,QAAA,YAAY,gBACU;AAEnC,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,iDAAuB,CAAA;AACzB,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAYD,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,iCAAqB,CAAA;AACvB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB"}
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Document } from "../document";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
|
+
export declare enum AutomationIOType {
|
|
5
|
+
OBJECT = "object",
|
|
6
|
+
STRING = "string",
|
|
7
|
+
BOOLEAN = "boolean",
|
|
8
|
+
NUMBER = "number",
|
|
9
|
+
ARRAY = "array"
|
|
10
|
+
}
|
|
11
|
+
export declare enum AutomationCustomIOType {
|
|
12
|
+
TABLE = "table",
|
|
13
|
+
ROW = "row",
|
|
14
|
+
ROWS = "rows",
|
|
15
|
+
WIDE = "wide",
|
|
16
|
+
QUERY = "query",
|
|
17
|
+
QUERY_PARAMS = "queryParams",
|
|
18
|
+
QUERY_LIMIT = "queryLimit",
|
|
19
|
+
LOOP_OPTION = "loopOption",
|
|
20
|
+
ITEM = "item",
|
|
21
|
+
CODE = "code",
|
|
22
|
+
FILTERS = "filters",
|
|
23
|
+
COLUMN = "column",
|
|
24
|
+
TRIGGER_SCHEMA = "triggerSchema",
|
|
25
|
+
CRON = "cron",
|
|
26
|
+
WEBHOOK_URL = "webhookUrl"
|
|
27
|
+
}
|
|
4
28
|
export declare enum AutomationTriggerStepId {
|
|
5
29
|
ROW_SAVED = "ROW_SAVED",
|
|
6
30
|
ROW_UPDATED = "ROW_UPDATED",
|
|
@@ -9,6 +33,11 @@ export declare enum AutomationTriggerStepId {
|
|
|
9
33
|
APP = "APP",
|
|
10
34
|
CRON = "CRON"
|
|
11
35
|
}
|
|
36
|
+
export declare enum AutomationStepType {
|
|
37
|
+
LOGIC = "LOGIC",
|
|
38
|
+
ACTION = "ACTION",
|
|
39
|
+
TRIGGER = "TRIGGER"
|
|
40
|
+
}
|
|
12
41
|
export declare enum AutomationActionStepId {
|
|
13
42
|
SEND_EMAIL_SMTP = "SEND_EMAIL_SMTP",
|
|
14
43
|
CREATE_ROW = "CREATE_ROW",
|
|
@@ -28,21 +57,44 @@ export declare enum AutomationActionStepId {
|
|
|
28
57
|
zapier = "zapier",
|
|
29
58
|
integromat = "integromat"
|
|
30
59
|
}
|
|
60
|
+
export declare const AutomationStepIdArray: (AutomationActionStepId | AutomationTriggerStepId)[];
|
|
31
61
|
export interface Automation extends Document {
|
|
32
62
|
definition: {
|
|
33
63
|
steps: AutomationStep[];
|
|
34
64
|
trigger: AutomationTrigger;
|
|
35
65
|
};
|
|
66
|
+
screenId?: string;
|
|
67
|
+
uiTree?: any;
|
|
36
68
|
appId: string;
|
|
37
69
|
live?: boolean;
|
|
38
70
|
name: string;
|
|
71
|
+
internal?: boolean;
|
|
72
|
+
type?: string;
|
|
73
|
+
}
|
|
74
|
+
interface BaseIOStructure {
|
|
75
|
+
type?: AutomationIOType;
|
|
76
|
+
customType?: AutomationCustomIOType;
|
|
77
|
+
title?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
enum?: string[];
|
|
80
|
+
pretty?: string[];
|
|
81
|
+
properties?: {
|
|
82
|
+
[key: string]: BaseIOStructure;
|
|
83
|
+
};
|
|
84
|
+
required?: string[];
|
|
85
|
+
}
|
|
86
|
+
interface InputOutputBlock {
|
|
87
|
+
properties: {
|
|
88
|
+
[key: string]: BaseIOStructure;
|
|
89
|
+
};
|
|
90
|
+
required?: string[];
|
|
39
91
|
}
|
|
40
92
|
export interface AutomationStepSchema {
|
|
41
93
|
name: string;
|
|
42
94
|
tagline: string;
|
|
43
95
|
icon: string;
|
|
44
96
|
description: string;
|
|
45
|
-
type:
|
|
97
|
+
type: AutomationStepType;
|
|
46
98
|
internal?: boolean;
|
|
47
99
|
deprecated?: boolean;
|
|
48
100
|
stepId: AutomationTriggerStepId | AutomationActionStepId;
|
|
@@ -51,14 +103,10 @@ export interface AutomationStepSchema {
|
|
|
51
103
|
[key: string]: any;
|
|
52
104
|
};
|
|
53
105
|
schema: {
|
|
54
|
-
inputs:
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
outputs: {
|
|
58
|
-
[key: string]: any;
|
|
59
|
-
};
|
|
60
|
-
required?: string[];
|
|
106
|
+
inputs: InputOutputBlock;
|
|
107
|
+
outputs: InputOutputBlock;
|
|
61
108
|
};
|
|
109
|
+
custom?: boolean;
|
|
62
110
|
}
|
|
63
111
|
export interface AutomationStep extends AutomationStepSchema {
|
|
64
112
|
id: string;
|
|
@@ -107,3 +155,4 @@ export declare type AutomationStepInput = {
|
|
|
107
155
|
appId: string;
|
|
108
156
|
apiKey?: string;
|
|
109
157
|
};
|
|
158
|
+
export {};
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutomationStatus = exports.AutomationActionStepId = exports.AutomationTriggerStepId = void 0;
|
|
3
|
+
exports.AutomationStatus = exports.AutomationStepIdArray = exports.AutomationActionStepId = exports.AutomationStepType = exports.AutomationTriggerStepId = exports.AutomationCustomIOType = exports.AutomationIOType = void 0;
|
|
4
|
+
var AutomationIOType;
|
|
5
|
+
(function (AutomationIOType) {
|
|
6
|
+
AutomationIOType["OBJECT"] = "object";
|
|
7
|
+
AutomationIOType["STRING"] = "string";
|
|
8
|
+
AutomationIOType["BOOLEAN"] = "boolean";
|
|
9
|
+
AutomationIOType["NUMBER"] = "number";
|
|
10
|
+
AutomationIOType["ARRAY"] = "array";
|
|
11
|
+
})(AutomationIOType = exports.AutomationIOType || (exports.AutomationIOType = {}));
|
|
12
|
+
var AutomationCustomIOType;
|
|
13
|
+
(function (AutomationCustomIOType) {
|
|
14
|
+
AutomationCustomIOType["TABLE"] = "table";
|
|
15
|
+
AutomationCustomIOType["ROW"] = "row";
|
|
16
|
+
AutomationCustomIOType["ROWS"] = "rows";
|
|
17
|
+
AutomationCustomIOType["WIDE"] = "wide";
|
|
18
|
+
AutomationCustomIOType["QUERY"] = "query";
|
|
19
|
+
AutomationCustomIOType["QUERY_PARAMS"] = "queryParams";
|
|
20
|
+
AutomationCustomIOType["QUERY_LIMIT"] = "queryLimit";
|
|
21
|
+
AutomationCustomIOType["LOOP_OPTION"] = "loopOption";
|
|
22
|
+
AutomationCustomIOType["ITEM"] = "item";
|
|
23
|
+
AutomationCustomIOType["CODE"] = "code";
|
|
24
|
+
AutomationCustomIOType["FILTERS"] = "filters";
|
|
25
|
+
AutomationCustomIOType["COLUMN"] = "column";
|
|
26
|
+
AutomationCustomIOType["TRIGGER_SCHEMA"] = "triggerSchema";
|
|
27
|
+
AutomationCustomIOType["CRON"] = "cron";
|
|
28
|
+
AutomationCustomIOType["WEBHOOK_URL"] = "webhookUrl";
|
|
29
|
+
})(AutomationCustomIOType = exports.AutomationCustomIOType || (exports.AutomationCustomIOType = {}));
|
|
4
30
|
var AutomationTriggerStepId;
|
|
5
31
|
(function (AutomationTriggerStepId) {
|
|
6
32
|
AutomationTriggerStepId["ROW_SAVED"] = "ROW_SAVED";
|
|
@@ -10,6 +36,12 @@ var AutomationTriggerStepId;
|
|
|
10
36
|
AutomationTriggerStepId["APP"] = "APP";
|
|
11
37
|
AutomationTriggerStepId["CRON"] = "CRON";
|
|
12
38
|
})(AutomationTriggerStepId = exports.AutomationTriggerStepId || (exports.AutomationTriggerStepId = {}));
|
|
39
|
+
var AutomationStepType;
|
|
40
|
+
(function (AutomationStepType) {
|
|
41
|
+
AutomationStepType["LOGIC"] = "LOGIC";
|
|
42
|
+
AutomationStepType["ACTION"] = "ACTION";
|
|
43
|
+
AutomationStepType["TRIGGER"] = "TRIGGER";
|
|
44
|
+
})(AutomationStepType = exports.AutomationStepType || (exports.AutomationStepType = {}));
|
|
13
45
|
var AutomationActionStepId;
|
|
14
46
|
(function (AutomationActionStepId) {
|
|
15
47
|
AutomationActionStepId["SEND_EMAIL_SMTP"] = "SEND_EMAIL_SMTP";
|
|
@@ -31,6 +63,10 @@ var AutomationActionStepId;
|
|
|
31
63
|
AutomationActionStepId["zapier"] = "zapier";
|
|
32
64
|
AutomationActionStepId["integromat"] = "integromat";
|
|
33
65
|
})(AutomationActionStepId = exports.AutomationActionStepId || (exports.AutomationActionStepId = {}));
|
|
66
|
+
exports.AutomationStepIdArray = [
|
|
67
|
+
...Object.values(AutomationActionStepId),
|
|
68
|
+
...Object.values(AutomationTriggerStepId),
|
|
69
|
+
];
|
|
34
70
|
var AutomationStatus;
|
|
35
71
|
(function (AutomationStatus) {
|
|
36
72
|
AutomationStatus["SUCCESS"] = "success";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../../src/documents/app/automation.ts"],"names":[],"mappings":";;;AAGA,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,kDAAuB,CAAA;IACvB,sDAA2B,CAAA;IAC3B,sDAA2B,CAAA;IAC3B,8CAAmB,CAAA;IACnB,sCAAW,CAAA;IACX,wCAAa,CAAA;AACf,CAAC,EAPW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAOlC;AAED,IAAY,sBAmBX;AAnBD,WAAY,sBAAsB;IAChC,6DAAmC,CAAA;IACnC,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,uDAA6B,CAAA;IAC7B,+DAAqC,CAAA;IACrC,2DAAiC,CAAA;IACjC,yDAA+B,CAAA;IAC/B,mDAAyB,CAAA;IACzB,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,mDAAyB,CAAA;IACzB,uCAAa,CAAA;IACb,qEAAqE;IACrE,6CAAmB,CAAA;IACnB,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,mDAAyB,CAAA;AAC3B,CAAC,EAnBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAmBjC;
|
|
1
|
+
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../../src/documents/app/automation.ts"],"names":[],"mappings":";;;AAGA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACjB,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B;AAED,IAAY,sBAgBX;AAhBD,WAAY,sBAAsB;IAChC,yCAAe,CAAA;IACf,qCAAW,CAAA;IACX,uCAAa,CAAA;IACb,uCAAa,CAAA;IACb,yCAAe,CAAA;IACf,sDAA4B,CAAA;IAC5B,oDAA0B,CAAA;IAC1B,oDAA0B,CAAA;IAC1B,uCAAa,CAAA;IACb,uCAAa,CAAA;IACb,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;IACjB,0DAAgC,CAAA;IAChC,uCAAa,CAAA;IACb,oDAA0B,CAAA;AAC5B,CAAC,EAhBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAgBjC;AAED,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,kDAAuB,CAAA;IACvB,sDAA2B,CAAA;IAC3B,sDAA2B,CAAA;IAC3B,8CAAmB,CAAA;IACnB,sCAAW,CAAA;IACX,wCAAa,CAAA;AACf,CAAC,EAPW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAOlC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACrB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,sBAmBX;AAnBD,WAAY,sBAAsB;IAChC,6DAAmC,CAAA;IACnC,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,uDAA6B,CAAA;IAC7B,+DAAqC,CAAA;IACrC,2DAAiC,CAAA;IACjC,yDAA+B,CAAA;IAC/B,mDAAyB,CAAA;IACzB,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,mDAAyB,CAAA;IACzB,uCAAa,CAAA;IACb,qEAAqE;IACrE,6CAAmB,CAAA;IACnB,yCAAe,CAAA;IACf,2CAAiB,CAAA;IACjB,mDAAyB,CAAA;AAC3B,CAAC,EAnBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAmBjC;AAEY,QAAA,qBAAqB,GAAG;IACnC,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC;IACxC,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC;CAC1C,CAAA;AAqED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,mDAA+B,CAAA;IAC/B,mDAA+B,CAAA;AACjC,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B"}
|
|
@@ -29,6 +29,8 @@ export interface FieldSchema {
|
|
|
29
29
|
timeOnly?: boolean;
|
|
30
30
|
lastID?: number;
|
|
31
31
|
useRichText?: boolean | null;
|
|
32
|
+
order?: number;
|
|
33
|
+
width?: number;
|
|
32
34
|
meta?: {
|
|
33
35
|
toTable: string;
|
|
34
36
|
toKey: string;
|
|
@@ -77,6 +79,7 @@ export interface Table extends Document {
|
|
|
77
79
|
[key: string]: any;
|
|
78
80
|
};
|
|
79
81
|
created?: boolean;
|
|
82
|
+
rowHeight?: number;
|
|
80
83
|
}
|
|
81
84
|
export interface TableRequest extends Table {
|
|
82
85
|
_rename?: RenameColumn;
|
|
@@ -5,6 +5,7 @@ var PluginType;
|
|
|
5
5
|
(function (PluginType) {
|
|
6
6
|
PluginType["DATASOURCE"] = "datasource";
|
|
7
7
|
PluginType["COMPONENT"] = "component";
|
|
8
|
+
PluginType["AUTOMATION"] = "automation";
|
|
8
9
|
})(PluginType = exports.PluginType || (exports.PluginType = {}));
|
|
9
10
|
var PluginSource;
|
|
10
11
|
(function (PluginSource) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/documents/global/plugin.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/documents/global/plugin.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,qCAAuB,CAAA;IACvB,uCAAyB,CAAA;AAC3B,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IACX,oCAAoB,CAAA;AACtB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAwBY,QAAA,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA"}
|
|
@@ -18,6 +18,7 @@ export declare type QuotaTriggers = {
|
|
|
18
18
|
export interface StaticUsage {
|
|
19
19
|
[StaticQuotaName.APPS]: number;
|
|
20
20
|
[StaticQuotaName.PLUGINS]: number;
|
|
21
|
+
[StaticQuotaName.USERS]: number;
|
|
21
22
|
[StaticQuotaName.USER_GROUPS]: number;
|
|
22
23
|
[StaticQuotaName.ROWS]: number;
|
|
23
24
|
triggers: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PlanType } from "./plan";
|
|
1
2
|
export declare enum Feature {
|
|
2
3
|
USER_GROUPS = "userGroups",
|
|
3
4
|
APP_BACKUPS = "appBackups",
|
|
@@ -7,3 +8,6 @@ export declare enum Feature {
|
|
|
7
8
|
BRANDING = "branding",
|
|
8
9
|
SCIM = "scim"
|
|
9
10
|
}
|
|
11
|
+
export declare type PlanFeatures = {
|
|
12
|
+
[key in PlanType]: Feature[] | undefined;
|
|
13
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/feature.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/feature.ts"],"names":[],"mappings":";;;AAEA,IAAY,OAQX;AARD,WAAY,OAAO;IACjB,qCAA0B,CAAA;IAC1B,qCAA0B,CAAA;IAC1B,yDAA8C,CAAA;IAC9C,mCAAwB,CAAA;IACxB,6CAAkC,CAAA;IAClC,gCAAqB,CAAA;IACrB,wBAAa,CAAA;AACf,CAAC,EARW,OAAO,GAAP,eAAO,KAAP,eAAO,QAQlB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PurchasedPlan, Quotas, Feature, Billing } from ".";
|
|
2
2
|
export interface License {
|
|
3
3
|
features: Feature[];
|
|
4
4
|
quotas: Quotas;
|
|
5
|
-
plan:
|
|
5
|
+
plan: PurchasedPlan;
|
|
6
6
|
billing?: Billing;
|
|
7
|
+
testClockId?: string;
|
|
7
8
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export interface AccountPlan {
|
|
2
|
-
type: PlanType;
|
|
3
|
-
price?: Price;
|
|
4
|
-
}
|
|
5
1
|
export declare enum PlanType {
|
|
6
2
|
FREE = "free",
|
|
3
|
+
/** @deprecated */
|
|
7
4
|
PRO = "pro",
|
|
5
|
+
/** @deprecated */
|
|
8
6
|
TEAM = "team",
|
|
7
|
+
PREMIUM = "premium",
|
|
9
8
|
BUSINESS = "business",
|
|
10
9
|
ENTERPRISE = "enterprise"
|
|
11
10
|
}
|
|
@@ -13,12 +12,32 @@ export declare enum PriceDuration {
|
|
|
13
12
|
MONTHLY = "monthly",
|
|
14
13
|
YEARLY = "yearly"
|
|
15
14
|
}
|
|
16
|
-
export interface
|
|
15
|
+
export interface AvailablePlan {
|
|
16
|
+
type: PlanType;
|
|
17
|
+
maxUsers: number;
|
|
18
|
+
minUsers: number;
|
|
19
|
+
prices: AvailablePrice[];
|
|
20
|
+
}
|
|
21
|
+
export interface AvailablePrice {
|
|
17
22
|
amount: number;
|
|
18
23
|
amountMonthly: number;
|
|
19
24
|
currency: string;
|
|
20
25
|
duration: PriceDuration;
|
|
21
26
|
priceId: string;
|
|
22
|
-
|
|
27
|
+
}
|
|
28
|
+
export declare enum PlanModel {
|
|
29
|
+
PER_USER = "perUser",
|
|
30
|
+
DAY_PASS = "dayPass"
|
|
31
|
+
}
|
|
32
|
+
export interface PurchasedPlan {
|
|
33
|
+
type: PlanType;
|
|
34
|
+
model: PlanModel;
|
|
35
|
+
usesInvoicing: boolean;
|
|
36
|
+
minUsers: number;
|
|
37
|
+
price?: PurchasedPrice;
|
|
38
|
+
}
|
|
39
|
+
export interface PurchasedPrice extends AvailablePrice {
|
|
40
|
+
dayPasses: number | undefined;
|
|
41
|
+
/** @deprecated - now at the plan level via model */
|
|
23
42
|
isPerUser: boolean;
|
|
24
43
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PriceDuration = exports.PlanType = void 0;
|
|
3
|
+
exports.PlanModel = exports.PriceDuration = exports.PlanType = void 0;
|
|
4
4
|
var PlanType;
|
|
5
5
|
(function (PlanType) {
|
|
6
6
|
PlanType["FREE"] = "free";
|
|
7
|
+
/** @deprecated */
|
|
7
8
|
PlanType["PRO"] = "pro";
|
|
9
|
+
/** @deprecated */
|
|
8
10
|
PlanType["TEAM"] = "team";
|
|
11
|
+
PlanType["PREMIUM"] = "premium";
|
|
9
12
|
PlanType["BUSINESS"] = "business";
|
|
10
13
|
PlanType["ENTERPRISE"] = "enterprise";
|
|
11
14
|
})(PlanType = exports.PlanType || (exports.PlanType = {}));
|
|
@@ -14,4 +17,9 @@ var PriceDuration;
|
|
|
14
17
|
PriceDuration["MONTHLY"] = "monthly";
|
|
15
18
|
PriceDuration["YEARLY"] = "yearly";
|
|
16
19
|
})(PriceDuration = exports.PriceDuration || (exports.PriceDuration = {}));
|
|
20
|
+
var PlanModel;
|
|
21
|
+
(function (PlanModel) {
|
|
22
|
+
PlanModel["PER_USER"] = "perUser";
|
|
23
|
+
PlanModel["DAY_PASS"] = "dayPass";
|
|
24
|
+
})(PlanModel = exports.PlanModel || (exports.PlanModel = {}));
|
|
17
25
|
//# sourceMappingURL=plan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/plan.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/plan.ts"],"names":[],"mappings":";;;AAAA,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,kBAAkB;IAClB,uBAAW,CAAA;IACX,kBAAkB;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,qCAAyB,CAAA;AAC3B,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAiBD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,iCAAoB,CAAA;AACtB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|
|
@@ -10,6 +10,7 @@ export declare enum QuotaType {
|
|
|
10
10
|
export declare enum StaticQuotaName {
|
|
11
11
|
ROWS = "rows",
|
|
12
12
|
APPS = "apps",
|
|
13
|
+
USERS = "users",
|
|
13
14
|
USER_GROUPS = "userGroups",
|
|
14
15
|
PLUGINS = "plugins"
|
|
15
16
|
}
|
|
@@ -27,12 +28,14 @@ export declare type QuotaName = StaticQuotaName | MonthlyQuotaName | ConstantQuo
|
|
|
27
28
|
export declare const isStaticQuota: (quotaType: QuotaType, usageType: QuotaUsageType, name: QuotaName) => name is StaticQuotaName;
|
|
28
29
|
export declare const isMonthlyQuota: (quotaType: QuotaType, usageType: QuotaUsageType, name: QuotaName) => name is MonthlyQuotaName;
|
|
29
30
|
export declare const isConstantQuota: (quotaType: QuotaType, name: QuotaName) => name is ConstantQuotaName;
|
|
31
|
+
export interface Minimums {
|
|
32
|
+
users: number;
|
|
33
|
+
}
|
|
34
|
+
export declare type PlanMinimums = {
|
|
35
|
+
[key in PlanType]: Minimums;
|
|
36
|
+
};
|
|
30
37
|
export declare type PlanQuotas = {
|
|
31
|
-
[PlanType
|
|
32
|
-
[PlanType.PRO]: Quotas;
|
|
33
|
-
[PlanType.TEAM]: Quotas;
|
|
34
|
-
[PlanType.BUSINESS]: Quotas;
|
|
35
|
-
[PlanType.ENTERPRISE]: Quotas;
|
|
38
|
+
[key in PlanType]: Quotas | undefined;
|
|
36
39
|
};
|
|
37
40
|
export declare type MonthlyQuotas = {
|
|
38
41
|
[MonthlyQuotaName.QUERIES]: Quota;
|
|
@@ -42,6 +45,7 @@ export declare type MonthlyQuotas = {
|
|
|
42
45
|
export declare type StaticQuotas = {
|
|
43
46
|
[StaticQuotaName.ROWS]: Quota;
|
|
44
47
|
[StaticQuotaName.APPS]: Quota;
|
|
48
|
+
[StaticQuotaName.USERS]: Quota;
|
|
45
49
|
[StaticQuotaName.USER_GROUPS]: Quota;
|
|
46
50
|
[StaticQuotaName.PLUGINS]: Quota;
|
|
47
51
|
};
|
|
@@ -67,4 +71,5 @@ export interface Quota {
|
|
|
67
71
|
* which can have subsequent effects such as sending emails to users.
|
|
68
72
|
*/
|
|
69
73
|
triggers: number[];
|
|
74
|
+
startDate?: number;
|
|
70
75
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isConstantQuota = exports.isMonthlyQuota = exports.isStaticQuota = exports.ConstantQuotaName = exports.MonthlyQuotaName = exports.StaticQuotaName = exports.QuotaType = exports.QuotaUsageType = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
var QuotaUsageType;
|
|
6
5
|
(function (QuotaUsageType) {
|
|
7
6
|
QuotaUsageType["STATIC"] = "static";
|
|
@@ -16,6 +15,7 @@ var StaticQuotaName;
|
|
|
16
15
|
(function (StaticQuotaName) {
|
|
17
16
|
StaticQuotaName["ROWS"] = "rows";
|
|
18
17
|
StaticQuotaName["APPS"] = "apps";
|
|
18
|
+
StaticQuotaName["USERS"] = "users";
|
|
19
19
|
StaticQuotaName["USER_GROUPS"] = "userGroups";
|
|
20
20
|
StaticQuotaName["PLUGINS"] = "plugins";
|
|
21
21
|
})(StaticQuotaName = exports.StaticQuotaName || (exports.StaticQuotaName = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/quota.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"quota.js","sourceRoot":"","sources":["../../../../src/sdk/licensing/quota.ts"],"names":[],"mappings":";;;AAEA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,6CAA0B,CAAA;IAC1B,sCAAmB,CAAA;AACrB,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,+CAA2B,CAAA;IAC3B,4CAAwB,CAAA;AAC1B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,iFAA4D,CAAA;IAC5D,0EAAqD,CAAA;AACvD,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAKM,MAAM,aAAa,GAAG,CAC3B,SAAoB,EACpB,SAAyB,EACzB,IAAe,EACU,EAAE;IAC3B,OAAO,SAAS,KAAK,SAAS,CAAC,KAAK,IAAI,SAAS,KAAK,cAAc,CAAC,MAAM,CAAA;AAC7E,CAAC,CAAA;AANY,QAAA,aAAa,iBAMzB;AAEM,MAAM,cAAc,GAAG,CAC5B,SAAoB,EACpB,SAAyB,EACzB,IAAe,EACW,EAAE;IAC5B,OAAO,SAAS,KAAK,SAAS,CAAC,KAAK,IAAI,SAAS,KAAK,cAAc,CAAC,OAAO,CAAA;AAC9E,CAAC,CAAA;AANY,QAAA,cAAc,kBAM1B;AAEM,MAAM,eAAe,GAAG,CAC7B,SAAoB,EACpB,IAAe,EACY,EAAE;IAC7B,OAAO,SAAS,KAAK,SAAS,CAAC,QAAQ,CAAA;AACzC,CAAC,CAAA;AALY,QAAA,eAAe,mBAK3B"}
|
package/dist/cjs/sdk/locks.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Redlock from "redlock";
|
|
1
2
|
export declare enum LockType {
|
|
2
3
|
/**
|
|
3
4
|
* If this lock is already held the attempted operation will not be performed.
|
|
@@ -5,20 +6,27 @@ export declare enum LockType {
|
|
|
5
6
|
*/
|
|
6
7
|
TRY_ONCE = "try_once",
|
|
7
8
|
DEFAULT = "default",
|
|
8
|
-
DELAY_500 = "delay_500"
|
|
9
|
+
DELAY_500 = "delay_500",
|
|
10
|
+
CUSTOM = "custom"
|
|
9
11
|
}
|
|
10
12
|
export declare enum LockName {
|
|
11
13
|
MIGRATIONS = "migrations",
|
|
12
14
|
TRIGGER_QUOTA = "trigger_quota",
|
|
13
15
|
SYNC_ACCOUNT_LICENSE = "sync_account_license",
|
|
14
16
|
UPDATE_TENANTS_DOC = "update_tenants_doc",
|
|
15
|
-
PERSIST_WRITETHROUGH = "persist_writethrough"
|
|
17
|
+
PERSIST_WRITETHROUGH = "persist_writethrough",
|
|
18
|
+
QUOTA_USAGE_EVENT = "quota_usage_event"
|
|
16
19
|
}
|
|
17
20
|
export interface LockOptions {
|
|
18
21
|
/**
|
|
19
22
|
* The lock type determines which client to use
|
|
20
23
|
*/
|
|
21
24
|
type: LockType;
|
|
25
|
+
/**
|
|
26
|
+
* The custom options to use when creating the redlock instance
|
|
27
|
+
* type must be set to custom for the options to be applied
|
|
28
|
+
*/
|
|
29
|
+
customOptions?: Redlock.Options;
|
|
22
30
|
/**
|
|
23
31
|
* The name for the lock
|
|
24
32
|
*/
|
package/dist/cjs/sdk/locks.js
CHANGED
|
@@ -10,6 +10,7 @@ var LockType;
|
|
|
10
10
|
LockType["TRY_ONCE"] = "try_once";
|
|
11
11
|
LockType["DEFAULT"] = "default";
|
|
12
12
|
LockType["DELAY_500"] = "delay_500";
|
|
13
|
+
LockType["CUSTOM"] = "custom";
|
|
13
14
|
})(LockType = exports.LockType || (exports.LockType = {}));
|
|
14
15
|
var LockName;
|
|
15
16
|
(function (LockName) {
|
|
@@ -18,5 +19,6 @@ var LockName;
|
|
|
18
19
|
LockName["SYNC_ACCOUNT_LICENSE"] = "sync_account_license";
|
|
19
20
|
LockName["UPDATE_TENANTS_DOC"] = "update_tenants_doc";
|
|
20
21
|
LockName["PERSIST_WRITETHROUGH"] = "persist_writethrough";
|
|
22
|
+
LockName["QUOTA_USAGE_EVENT"] = "quota_usage_event";
|
|
21
23
|
})(LockName = exports.LockName || (exports.LockName = {}));
|
|
22
24
|
//# sourceMappingURL=locks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locks.js","sourceRoot":"","sources":["../../../src/sdk/locks.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"locks.js","sourceRoot":"","sources":["../../../src/sdk/locks.ts"],"names":[],"mappings":";;;AAEA,IAAY,QASX;AATD,WAAY,QAAQ;IAClB;;;OAGG;IACH,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;IACvB,6BAAiB,CAAA;AACnB,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB;AAED,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,2CAA+B,CAAA;IAC/B,yDAA6C,CAAA;IAC7C,qDAAyC,CAAA;IACzC,yDAA6C,CAAA;IAC7C,mDAAuC,CAAA;AACzC,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB"}
|