@budibase/types 2.0.39 → 2.0.40
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/api/account/index.d.ts +1 -0
- package/dist/api/account/index.js +1 -0
- package/dist/api/account/index.js.map +1 -1
- package/dist/api/account/license.d.ts +9 -0
- package/dist/api/account/license.js +3 -0
- package/dist/api/account/license.js.map +1 -0
- package/dist/api/web/app/backup.d.ts +14 -0
- package/dist/api/web/app/backup.js +3 -0
- package/dist/api/web/app/backup.js.map +1 -0
- package/dist/api/web/app/index.d.ts +1 -0
- package/dist/api/web/app/index.js +18 -0
- package/dist/api/web/app/index.js.map +1 -0
- package/dist/api/web/index.d.ts +2 -0
- package/dist/api/web/index.js +2 -0
- package/dist/api/web/index.js.map +1 -1
- package/dist/api/web/schedule.d.ts +10 -0
- package/dist/api/web/schedule.js +3 -0
- package/dist/api/web/schedule.js.map +1 -0
- package/dist/api/web/user.d.ts +6 -0
- package/dist/documents/account/account.d.ts +2 -0
- package/dist/documents/account/account.js.map +1 -1
- package/dist/documents/app/automation.d.ts +32 -8
- package/dist/documents/app/automation.js +30 -1
- package/dist/documents/app/automation.js.map +1 -1
- package/dist/documents/app/backup.d.ts +62 -0
- package/dist/documents/app/backup.js +23 -0
- package/dist/documents/app/backup.js.map +1 -0
- package/dist/documents/app/index.d.ts +2 -0
- package/dist/documents/app/index.js +2 -0
- package/dist/documents/app/index.js.map +1 -1
- package/dist/documents/app/row.d.ts +7 -0
- package/dist/documents/app/table.d.ts +7 -0
- package/dist/documents/app/webhook.d.ts +13 -0
- package/dist/documents/app/webhook.js +8 -0
- package/dist/documents/app/webhook.js.map +1 -0
- package/dist/documents/global/index.d.ts +1 -0
- package/dist/documents/global/index.js +1 -0
- package/dist/documents/global/index.js.map +1 -1
- package/dist/documents/global/quotas.d.ts +56 -8
- package/dist/documents/global/quotas.js +17 -0
- package/dist/documents/global/quotas.js.map +1 -1
- package/dist/documents/global/schedule.d.ts +21 -0
- package/dist/documents/global/schedule.js +18 -0
- package/dist/documents/global/schedule.js.map +1 -0
- package/dist/sdk/datasources.d.ts +6 -0
- package/dist/sdk/datasources.js +1 -0
- package/dist/sdk/datasources.js.map +1 -1
- package/dist/sdk/db.d.ts +21 -0
- package/dist/sdk/db.js +9 -0
- package/dist/sdk/db.js.map +1 -0
- package/dist/sdk/events/backup.d.ts +6 -0
- package/dist/sdk/events/backup.js +3 -0
- package/dist/sdk/events/backup.js.map +1 -0
- package/dist/sdk/events/event.d.ts +2 -1
- package/dist/sdk/events/event.js +2 -0
- package/dist/sdk/events/event.js.map +1 -1
- package/dist/sdk/events/index.d.ts +1 -0
- package/dist/sdk/events/index.js +1 -0
- package/dist/sdk/events/index.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +2 -0
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/koa.d.ts +5 -2
- package/dist/sdk/licensing/feature.d.ts +2 -1
- package/dist/sdk/licensing/feature.js +1 -0
- package/dist/sdk/licensing/feature.js.map +1 -1
- package/dist/sdk/licensing/quota.d.ts +29 -15
- package/dist/sdk/licensing/quota.js +1 -0
- package/dist/sdk/licensing/quota.js.map +1 -1
- package/dist/sdk/locks.d.ts +33 -0
- package/dist/sdk/locks.js +17 -0
- package/dist/sdk/locks.js.map +1 -0
- package/dist/sdk/migrations.d.ts +1 -3
- package/dist/sdk/migrations.js +2 -3
- package/dist/sdk/migrations.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/api/account/index.ts +1 -0
- package/src/api/account/license.ts +11 -0
- package/src/api/web/app/backup.ts +17 -0
- package/src/api/web/app/index.ts +1 -0
- package/src/api/web/index.ts +2 -0
- package/src/api/web/schedule.ts +15 -0
- package/src/api/web/user.ts +7 -0
- package/src/documents/account/account.ts +10 -1
- package/src/documents/app/automation.ts +35 -8
- package/src/documents/app/backup.ts +70 -0
- package/src/documents/app/index.ts +2 -0
- package/src/documents/app/row.ts +8 -0
- package/src/documents/app/table.ts +3 -0
- package/src/documents/app/webhook.ts +15 -0
- package/src/documents/global/index.ts +1 -0
- package/src/documents/global/quotas.ts +73 -8
- package/src/documents/global/schedule.ts +32 -0
- package/src/sdk/datasources.ts +7 -0
- package/src/sdk/db.ts +24 -0
- package/src/sdk/events/backup.ts +7 -0
- package/src/sdk/events/event.ts +3 -0
- package/src/sdk/events/index.ts +1 -0
- package/src/sdk/index.ts +2 -0
- package/src/sdk/koa.ts +6 -2
- package/src/sdk/licensing/feature.ts +1 -0
- package/src/sdk/licensing/quota.ts +31 -14
- package/src/sdk/locks.ts +35 -0
- package/src/sdk/migrations.ts +2 -3
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./user"), exports);
|
|
18
|
+
__exportStar(require("./license"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,4CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.js","sourceRoot":"","sources":["../../../src/api/account/license.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AppBackupTrigger, AppBackupType } from "../../../documents";
|
|
2
|
+
export interface SearchAppBackupsRequest {
|
|
3
|
+
trigger: AppBackupTrigger;
|
|
4
|
+
type: AppBackupType;
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
page?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateAppBackupRequest {
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UpdateAppBackupRequest {
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../../../../src/api/web/app/backup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./backup";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./backup"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/web/app/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
package/dist/api/web/index.d.ts
CHANGED
package/dist/api/web/index.js
CHANGED
|
@@ -17,4 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./analytics"), exports);
|
|
18
18
|
__exportStar(require("./user"), exports);
|
|
19
19
|
__exportStar(require("./errors"), exports);
|
|
20
|
+
__exportStar(require("./schedule"), exports);
|
|
21
|
+
__exportStar(require("./app"), exports);
|
|
20
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/web/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,yCAAsB;AACtB,2CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/web/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,yCAAsB;AACtB,2CAAwB;AACxB,6CAA0B;AAC1B,wCAAqB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScheduleMetadata, ScheduleRepeatPeriod, ScheduleType } from "../../documents";
|
|
2
|
+
export interface CreateScheduleRequest {
|
|
3
|
+
type: ScheduleType;
|
|
4
|
+
name: string;
|
|
5
|
+
startDate: string;
|
|
6
|
+
repeat: ScheduleRepeatPeriod;
|
|
7
|
+
metadata: ScheduleMetadata;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateScheduleRequest extends CreateScheduleRequest {
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/api/web/schedule.ts"],"names":[],"mappings":""}
|
package/dist/api/web/user.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Feature, Hosting, PlanType, Quotas } from "../../sdk";
|
|
2
|
+
import { QuotaUsage } from "../global";
|
|
2
3
|
export interface CreateAccount {
|
|
3
4
|
email: string;
|
|
4
5
|
tenantId: string;
|
|
@@ -30,6 +31,7 @@ export interface Account extends CreateAccount {
|
|
|
30
31
|
licenseKey?: string;
|
|
31
32
|
licenseKeyActivatedAt?: number;
|
|
32
33
|
licenseOverrides?: LicenseOverrides;
|
|
34
|
+
quotaUsage?: QuotaUsage;
|
|
33
35
|
}
|
|
34
36
|
export interface PasswordAccount extends Account {
|
|
35
37
|
password: string;
|
|
@@ -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,mCAOkB;AAqBX,MAAM,uBAAuB,GAAG,CACrC,OAAsB,EACa,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAA;AAFjE,QAAA,uBAAuB,2BAE0C;AA6BvE,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;AAUnC,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,iCAAqB,CAAA;AACvB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB"}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
import { Document } from "../document";
|
|
2
|
+
export declare enum AutomationTriggerStepId {
|
|
3
|
+
ROW_SAVED = "ROW_SAVED",
|
|
4
|
+
ROW_UPDATED = "ROW_UPDATED",
|
|
5
|
+
ROW_DELETED = "ROW_DELETED",
|
|
6
|
+
WEBHOOK = "WEBHOOK",
|
|
7
|
+
APP = "APP",
|
|
8
|
+
CRON = "CRON"
|
|
9
|
+
}
|
|
10
|
+
export declare enum AutomationActionStepId {
|
|
11
|
+
SEND_EMAIL_SMTP = "SEND_EMAIL_SMTP",
|
|
12
|
+
CREATE_ROW = "CREATE_ROW",
|
|
13
|
+
UPDATE_ROW = "UPDATE_ROW",
|
|
14
|
+
DELETE_ROW = "DELETE_ROW",
|
|
15
|
+
OUTGOING_WEBHOOK = "OUTGOING_WEBHOOK",
|
|
16
|
+
EXECUTE_SCRIPT = "EXECUTE_SCRIPT",
|
|
17
|
+
EXECUTE_QUERY = "EXECUTE_QUERY",
|
|
18
|
+
SERVER_LOG = "SERVER_LOG",
|
|
19
|
+
DELAY = "DELAY",
|
|
20
|
+
FILTER = "FILTER",
|
|
21
|
+
QUERY_ROWS = "QUERY_ROWS",
|
|
22
|
+
LOOP = "LOOP",
|
|
23
|
+
discord = "discord",
|
|
24
|
+
slack = "slack",
|
|
25
|
+
zapier = "zapier",
|
|
26
|
+
integromat = "integromat"
|
|
27
|
+
}
|
|
2
28
|
export interface Automation extends Document {
|
|
3
29
|
definition: {
|
|
4
30
|
steps: AutomationStep[];
|
|
@@ -9,7 +35,7 @@ export interface Automation extends Document {
|
|
|
9
35
|
}
|
|
10
36
|
export interface AutomationStep {
|
|
11
37
|
id: string;
|
|
12
|
-
stepId:
|
|
38
|
+
stepId: AutomationTriggerStepId | AutomationActionStepId;
|
|
13
39
|
inputs: {
|
|
14
40
|
[key: string]: any;
|
|
15
41
|
};
|
|
@@ -17,14 +43,12 @@ export interface AutomationStep {
|
|
|
17
43
|
inputs: {
|
|
18
44
|
[key: string]: any;
|
|
19
45
|
};
|
|
46
|
+
outputs: {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
};
|
|
20
49
|
};
|
|
21
50
|
}
|
|
22
|
-
export interface AutomationTrigger {
|
|
23
|
-
id: string;
|
|
24
|
-
stepId: string;
|
|
25
|
-
inputs: {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
51
|
+
export interface AutomationTrigger extends AutomationStep {
|
|
28
52
|
cronJobId?: string;
|
|
29
53
|
}
|
|
30
54
|
export declare enum AutomationStatus {
|
|
@@ -38,7 +62,7 @@ export interface AutomationResults {
|
|
|
38
62
|
status?: AutomationStatus;
|
|
39
63
|
trigger?: any;
|
|
40
64
|
steps: {
|
|
41
|
-
stepId:
|
|
65
|
+
stepId: AutomationTriggerStepId | AutomationActionStepId;
|
|
42
66
|
inputs: {
|
|
43
67
|
[key: string]: any;
|
|
44
68
|
};
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutomationStatus = void 0;
|
|
3
|
+
exports.AutomationStatus = exports.AutomationActionStepId = exports.AutomationTriggerStepId = void 0;
|
|
4
|
+
var AutomationTriggerStepId;
|
|
5
|
+
(function (AutomationTriggerStepId) {
|
|
6
|
+
AutomationTriggerStepId["ROW_SAVED"] = "ROW_SAVED";
|
|
7
|
+
AutomationTriggerStepId["ROW_UPDATED"] = "ROW_UPDATED";
|
|
8
|
+
AutomationTriggerStepId["ROW_DELETED"] = "ROW_DELETED";
|
|
9
|
+
AutomationTriggerStepId["WEBHOOK"] = "WEBHOOK";
|
|
10
|
+
AutomationTriggerStepId["APP"] = "APP";
|
|
11
|
+
AutomationTriggerStepId["CRON"] = "CRON";
|
|
12
|
+
})(AutomationTriggerStepId = exports.AutomationTriggerStepId || (exports.AutomationTriggerStepId = {}));
|
|
13
|
+
var AutomationActionStepId;
|
|
14
|
+
(function (AutomationActionStepId) {
|
|
15
|
+
AutomationActionStepId["SEND_EMAIL_SMTP"] = "SEND_EMAIL_SMTP";
|
|
16
|
+
AutomationActionStepId["CREATE_ROW"] = "CREATE_ROW";
|
|
17
|
+
AutomationActionStepId["UPDATE_ROW"] = "UPDATE_ROW";
|
|
18
|
+
AutomationActionStepId["DELETE_ROW"] = "DELETE_ROW";
|
|
19
|
+
AutomationActionStepId["OUTGOING_WEBHOOK"] = "OUTGOING_WEBHOOK";
|
|
20
|
+
AutomationActionStepId["EXECUTE_SCRIPT"] = "EXECUTE_SCRIPT";
|
|
21
|
+
AutomationActionStepId["EXECUTE_QUERY"] = "EXECUTE_QUERY";
|
|
22
|
+
AutomationActionStepId["SERVER_LOG"] = "SERVER_LOG";
|
|
23
|
+
AutomationActionStepId["DELAY"] = "DELAY";
|
|
24
|
+
AutomationActionStepId["FILTER"] = "FILTER";
|
|
25
|
+
AutomationActionStepId["QUERY_ROWS"] = "QUERY_ROWS";
|
|
26
|
+
AutomationActionStepId["LOOP"] = "LOOP";
|
|
27
|
+
// these used to be lowercase step IDs, maintain for backwards compat
|
|
28
|
+
AutomationActionStepId["discord"] = "discord";
|
|
29
|
+
AutomationActionStepId["slack"] = "slack";
|
|
30
|
+
AutomationActionStepId["zapier"] = "zapier";
|
|
31
|
+
AutomationActionStepId["integromat"] = "integromat";
|
|
32
|
+
})(AutomationActionStepId = exports.AutomationActionStepId || (exports.AutomationActionStepId = {}));
|
|
4
33
|
var AutomationStatus;
|
|
5
34
|
(function (AutomationStatus) {
|
|
6
35
|
AutomationStatus["SUCCESS"] = "success";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../src/documents/app/automation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../src/documents/app/automation.ts"],"names":[],"mappings":";;;AAEA,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,sBAkBX;AAlBD,WAAY,sBAAsB;IAChC,6DAAmC,CAAA;IACnC,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;IACzB,+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,EAlBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAkBjC;AA+BD,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,mDAA+B,CAAA;AACjC,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Document } from "../document";
|
|
2
|
+
import { User } from "../../";
|
|
3
|
+
export declare enum AppBackupType {
|
|
4
|
+
BACKUP = "backup",
|
|
5
|
+
RESTORE = "restore"
|
|
6
|
+
}
|
|
7
|
+
export declare enum AppBackupStatus {
|
|
8
|
+
STARTED = "started",
|
|
9
|
+
PENDING = "pending",
|
|
10
|
+
COMPLETE = "complete",
|
|
11
|
+
FAILED = "failed"
|
|
12
|
+
}
|
|
13
|
+
export declare enum AppBackupTrigger {
|
|
14
|
+
PUBLISH = "publish",
|
|
15
|
+
MANUAL = "manual",
|
|
16
|
+
SCHEDULED = "scheduled",
|
|
17
|
+
RESTORING = "restoring"
|
|
18
|
+
}
|
|
19
|
+
export interface AppBackupContents {
|
|
20
|
+
datasources: string[];
|
|
21
|
+
screens: string[];
|
|
22
|
+
automations: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface AppBackupMetadata {
|
|
25
|
+
appId: string;
|
|
26
|
+
trigger?: AppBackupTrigger;
|
|
27
|
+
type: AppBackupType;
|
|
28
|
+
status: AppBackupStatus;
|
|
29
|
+
name?: string;
|
|
30
|
+
createdBy?: string | User;
|
|
31
|
+
timestamp: string;
|
|
32
|
+
finishedAt?: string;
|
|
33
|
+
startedAt?: string;
|
|
34
|
+
contents?: AppBackupContents;
|
|
35
|
+
}
|
|
36
|
+
export interface AppBackup extends Document, AppBackupMetadata {
|
|
37
|
+
filename?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare type AppBackupFetchOpts = {
|
|
40
|
+
trigger?: AppBackupTrigger;
|
|
41
|
+
type?: AppBackupType;
|
|
42
|
+
limit?: number;
|
|
43
|
+
page?: string;
|
|
44
|
+
paginate?: boolean;
|
|
45
|
+
startDate?: string;
|
|
46
|
+
endDate?: string;
|
|
47
|
+
};
|
|
48
|
+
export interface AppBackupQueueData {
|
|
49
|
+
appId: string;
|
|
50
|
+
docId: string;
|
|
51
|
+
docRev: string;
|
|
52
|
+
export?: {
|
|
53
|
+
trigger: AppBackupTrigger;
|
|
54
|
+
name?: string;
|
|
55
|
+
createdBy?: string;
|
|
56
|
+
};
|
|
57
|
+
import?: {
|
|
58
|
+
backupId: string;
|
|
59
|
+
nameForBackup: string;
|
|
60
|
+
createdBy?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppBackupTrigger = exports.AppBackupStatus = exports.AppBackupType = void 0;
|
|
4
|
+
var AppBackupType;
|
|
5
|
+
(function (AppBackupType) {
|
|
6
|
+
AppBackupType["BACKUP"] = "backup";
|
|
7
|
+
AppBackupType["RESTORE"] = "restore";
|
|
8
|
+
})(AppBackupType = exports.AppBackupType || (exports.AppBackupType = {}));
|
|
9
|
+
var AppBackupStatus;
|
|
10
|
+
(function (AppBackupStatus) {
|
|
11
|
+
AppBackupStatus["STARTED"] = "started";
|
|
12
|
+
AppBackupStatus["PENDING"] = "pending";
|
|
13
|
+
AppBackupStatus["COMPLETE"] = "complete";
|
|
14
|
+
AppBackupStatus["FAILED"] = "failed";
|
|
15
|
+
})(AppBackupStatus = exports.AppBackupStatus || (exports.AppBackupStatus = {}));
|
|
16
|
+
var AppBackupTrigger;
|
|
17
|
+
(function (AppBackupTrigger) {
|
|
18
|
+
AppBackupTrigger["PUBLISH"] = "publish";
|
|
19
|
+
AppBackupTrigger["MANUAL"] = "manual";
|
|
20
|
+
AppBackupTrigger["SCHEDULED"] = "scheduled";
|
|
21
|
+
AppBackupTrigger["RESTORING"] = "restoring";
|
|
22
|
+
})(AppBackupTrigger = exports.AppBackupTrigger || (exports.AppBackupTrigger = {}));
|
|
23
|
+
//# sourceMappingURL=backup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../../../src/documents/app/backup.ts"],"names":[],"mappings":";;;AAGA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;AACnB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;AACzB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B"}
|
|
@@ -26,4 +26,6 @@ __exportStar(require("./view"), exports);
|
|
|
26
26
|
__exportStar(require("../document"), exports);
|
|
27
27
|
__exportStar(require("./row"), exports);
|
|
28
28
|
__exportStar(require("./user"), exports);
|
|
29
|
+
__exportStar(require("./backup"), exports);
|
|
30
|
+
__exportStar(require("./webhook"), exports);
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/app/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,+CAA4B;AAC5B,+CAA4B;AAC5B,2CAAwB;AACxB,0CAAuB;AACvB,yCAAsB;AACtB,0CAAuB;AACvB,2CAAwB;AACxB,yCAAsB;AACtB,8CAA2B;AAC3B,wCAAqB;AACrB,yCAAsB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/app/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,+CAA4B;AAC5B,+CAA4B;AAC5B,2CAAwB;AACxB,0CAAuB;AACvB,yCAAsB;AACtB,0CAAuB;AACvB,2CAAwB;AACxB,yCAAsB;AACtB,8CAA2B;AAC3B,wCAAqB;AACrB,yCAAsB;AACtB,2CAAwB;AACxB,4CAAyB"}
|
|
@@ -14,6 +14,13 @@ export declare enum FieldType {
|
|
|
14
14
|
JSON = "json",
|
|
15
15
|
INTERNAL = "internal"
|
|
16
16
|
}
|
|
17
|
+
export interface RowAttachment {
|
|
18
|
+
size: number;
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
|
+
extension: string;
|
|
22
|
+
key: string;
|
|
23
|
+
}
|
|
17
24
|
export interface Row extends Document {
|
|
18
25
|
type?: string;
|
|
19
26
|
tableId?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document } from "../document";
|
|
2
|
+
export declare enum WebhookActionType {
|
|
3
|
+
AUTOMATION = "automation"
|
|
4
|
+
}
|
|
5
|
+
export interface Webhook extends Document {
|
|
6
|
+
live: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
action: {
|
|
9
|
+
type: WebhookActionType;
|
|
10
|
+
target: string;
|
|
11
|
+
};
|
|
12
|
+
bodySchema?: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookActionType = void 0;
|
|
4
|
+
var WebhookActionType;
|
|
5
|
+
(function (WebhookActionType) {
|
|
6
|
+
WebhookActionType["AUTOMATION"] = "automation";
|
|
7
|
+
})(WebhookActionType = exports.WebhookActionType || (exports.WebhookActionType = {}));
|
|
8
|
+
//# sourceMappingURL=webhook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/documents/app/webhook.ts"],"names":[],"mappings":";;;AAEA,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,8CAAyB,CAAA;AAC3B,CAAC,EAFW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAE5B"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./user"), exports);
|
|
|
19
19
|
__exportStar(require("./userGroup"), exports);
|
|
20
20
|
__exportStar(require("./plugin"), exports);
|
|
21
21
|
__exportStar(require("./quotas"), exports);
|
|
22
|
+
__exportStar(require("./schedule"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/global/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,2CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/global/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,2CAAwB;AACxB,6CAA0B"}
|
|
@@ -1,14 +1,62 @@
|
|
|
1
1
|
import { MonthlyQuotaName, StaticQuotaName } from "../../sdk";
|
|
2
|
-
export
|
|
2
|
+
export declare enum BreakdownQuotaName {
|
|
3
|
+
ROW_QUERIES = "rowQueries",
|
|
4
|
+
DATASOURCE_QUERIES = "datasourceQueries",
|
|
5
|
+
AUTOMATIONS = "automations"
|
|
6
|
+
}
|
|
7
|
+
export declare const APP_QUOTA_NAMES: (StaticQuotaName | MonthlyQuotaName)[];
|
|
8
|
+
export declare const BREAKDOWN_QUOTA_NAMES: MonthlyQuotaName[];
|
|
9
|
+
export interface UsageBreakdown {
|
|
10
|
+
parent: MonthlyQuotaName;
|
|
11
|
+
values: {
|
|
12
|
+
[key: string]: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare type QuotaTriggers = {
|
|
16
|
+
[key: string]: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
export interface StaticUsage {
|
|
19
|
+
[StaticQuotaName.APPS]: number;
|
|
20
|
+
[StaticQuotaName.PLUGINS]: number;
|
|
21
|
+
[StaticQuotaName.USER_GROUPS]: number;
|
|
22
|
+
[StaticQuotaName.ROWS]: number;
|
|
23
|
+
triggers: {
|
|
24
|
+
[key in StaticQuotaName]?: QuotaTriggers;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface MonthlyUsage {
|
|
28
|
+
[MonthlyQuotaName.QUERIES]: number;
|
|
29
|
+
[MonthlyQuotaName.AUTOMATIONS]: number;
|
|
30
|
+
[MonthlyQuotaName.DAY_PASSES]: number;
|
|
31
|
+
triggers: {
|
|
32
|
+
[key in MonthlyQuotaName]?: QuotaTriggers;
|
|
33
|
+
};
|
|
34
|
+
breakdown?: {
|
|
35
|
+
[key in BreakdownQuotaName]?: UsageBreakdown;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface BaseQuotaUsage {
|
|
39
|
+
usageQuota: StaticUsage;
|
|
40
|
+
monthly: {
|
|
41
|
+
[key: string]: MonthlyUsage;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface QuotaUsage extends BaseQuotaUsage {
|
|
3
45
|
_id: string;
|
|
4
46
|
_rev?: string;
|
|
5
47
|
quotaReset: string;
|
|
6
|
-
|
|
7
|
-
[key
|
|
8
|
-
};
|
|
9
|
-
monthly: {
|
|
10
|
-
[key: string]: {
|
|
11
|
-
[key in MonthlyQuotaName]: number;
|
|
12
|
-
};
|
|
48
|
+
apps?: {
|
|
49
|
+
[key: string]: BaseQuotaUsage;
|
|
13
50
|
};
|
|
14
51
|
}
|
|
52
|
+
export declare type SetUsageValues = {
|
|
53
|
+
total: number;
|
|
54
|
+
app?: number;
|
|
55
|
+
breakdown?: number;
|
|
56
|
+
triggers?: QuotaTriggers;
|
|
57
|
+
};
|
|
58
|
+
export declare type UsageValues = {
|
|
59
|
+
total: number;
|
|
60
|
+
app?: number;
|
|
61
|
+
breakdown?: number;
|
|
62
|
+
};
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BREAKDOWN_QUOTA_NAMES = exports.APP_QUOTA_NAMES = exports.BreakdownQuotaName = void 0;
|
|
4
|
+
const sdk_1 = require("../../sdk");
|
|
5
|
+
var BreakdownQuotaName;
|
|
6
|
+
(function (BreakdownQuotaName) {
|
|
7
|
+
BreakdownQuotaName["ROW_QUERIES"] = "rowQueries";
|
|
8
|
+
BreakdownQuotaName["DATASOURCE_QUERIES"] = "datasourceQueries";
|
|
9
|
+
BreakdownQuotaName["AUTOMATIONS"] = "automations";
|
|
10
|
+
})(BreakdownQuotaName = exports.BreakdownQuotaName || (exports.BreakdownQuotaName = {}));
|
|
11
|
+
exports.APP_QUOTA_NAMES = [
|
|
12
|
+
sdk_1.StaticQuotaName.ROWS,
|
|
13
|
+
sdk_1.MonthlyQuotaName.QUERIES,
|
|
14
|
+
sdk_1.MonthlyQuotaName.AUTOMATIONS,
|
|
15
|
+
];
|
|
16
|
+
exports.BREAKDOWN_QUOTA_NAMES = [
|
|
17
|
+
sdk_1.MonthlyQuotaName.QUERIES,
|
|
18
|
+
sdk_1.MonthlyQuotaName.AUTOMATIONS,
|
|
19
|
+
];
|
|
3
20
|
//# sourceMappingURL=quotas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotas.js","sourceRoot":"","sources":["../../../src/documents/global/quotas.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"quotas.js","sourceRoot":"","sources":["../../../src/documents/global/quotas.ts"],"names":[],"mappings":";;;AAAA,mCAA6D;AAE7D,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,gDAA0B,CAAA;IAC1B,8DAAwC,CAAA;IACxC,iDAA2B,CAAA;AAC7B,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAEY,QAAA,eAAe,GAAG;IAC7B,qBAAe,CAAC,IAAI;IACpB,sBAAgB,CAAC,OAAO;IACxB,sBAAgB,CAAC,WAAW;CAC7B,CAAA;AAEY,QAAA,qBAAqB,GAAG;IACnC,sBAAgB,CAAC,OAAO;IACxB,sBAAgB,CAAC,WAAW;CAC7B,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Document } from "../document";
|
|
2
|
+
export declare enum ScheduleType {
|
|
3
|
+
APP_BACKUP = "app_backup"
|
|
4
|
+
}
|
|
5
|
+
export declare enum ScheduleRepeatPeriod {
|
|
6
|
+
DAILY = "daily",
|
|
7
|
+
WEEKLY = "weekly",
|
|
8
|
+
MONTHLY = "monthly"
|
|
9
|
+
}
|
|
10
|
+
export interface Schedule extends Document {
|
|
11
|
+
type: ScheduleType;
|
|
12
|
+
name: string;
|
|
13
|
+
startDate: string;
|
|
14
|
+
repeat: ScheduleRepeatPeriod;
|
|
15
|
+
metadata: ScheduleMetadata;
|
|
16
|
+
}
|
|
17
|
+
export declare type ScheduleMetadata = AppBackupScheduleMetadata;
|
|
18
|
+
export declare const isAppBackupMetadata: (type: ScheduleType, metadata: ScheduleMetadata) => metadata is AppBackupScheduleMetadata;
|
|
19
|
+
export interface AppBackupScheduleMetadata {
|
|
20
|
+
apps: string[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAppBackupMetadata = exports.ScheduleRepeatPeriod = exports.ScheduleType = void 0;
|
|
4
|
+
var ScheduleType;
|
|
5
|
+
(function (ScheduleType) {
|
|
6
|
+
ScheduleType["APP_BACKUP"] = "app_backup";
|
|
7
|
+
})(ScheduleType = exports.ScheduleType || (exports.ScheduleType = {}));
|
|
8
|
+
var ScheduleRepeatPeriod;
|
|
9
|
+
(function (ScheduleRepeatPeriod) {
|
|
10
|
+
ScheduleRepeatPeriod["DAILY"] = "daily";
|
|
11
|
+
ScheduleRepeatPeriod["WEEKLY"] = "weekly";
|
|
12
|
+
ScheduleRepeatPeriod["MONTHLY"] = "monthly";
|
|
13
|
+
})(ScheduleRepeatPeriod = exports.ScheduleRepeatPeriod || (exports.ScheduleRepeatPeriod = {}));
|
|
14
|
+
const isAppBackupMetadata = (type, metadata) => {
|
|
15
|
+
return type === ScheduleType.APP_BACKUP;
|
|
16
|
+
};
|
|
17
|
+
exports.isAppBackupMetadata = isAppBackupMetadata;
|
|
18
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/documents/global/schedule.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,yCAAyB,CAAA;AAC3B,CAAC,EAFW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAEvB;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;AACrB,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AAYM,MAAM,mBAAmB,GAAG,CACjC,IAAkB,EAClB,QAA0B,EACa,EAAE;IACzC,OAAO,IAAI,KAAK,YAAY,CAAC,UAAU,CAAA;AACzC,CAAC,CAAA;AALY,QAAA,mBAAmB,uBAK/B"}
|
|
@@ -20,6 +20,7 @@ export declare enum QueryType {
|
|
|
20
20
|
}
|
|
21
21
|
export declare enum DatasourceFieldType {
|
|
22
22
|
STRING = "string",
|
|
23
|
+
CODE = "code",
|
|
23
24
|
LONGFORM = "longForm",
|
|
24
25
|
BOOLEAN = "boolean",
|
|
25
26
|
NUMBER = "number",
|
|
@@ -62,6 +63,10 @@ export declare enum FilterType {
|
|
|
62
63
|
NOT_EMPTY = "notEmpty",
|
|
63
64
|
ONE_OF = "oneOf"
|
|
64
65
|
}
|
|
66
|
+
export interface StepDefinition {
|
|
67
|
+
key: string;
|
|
68
|
+
template: string;
|
|
69
|
+
}
|
|
65
70
|
export interface QueryDefinition {
|
|
66
71
|
type: QueryType;
|
|
67
72
|
displayName?: string;
|
|
@@ -69,6 +74,7 @@ export interface QueryDefinition {
|
|
|
69
74
|
customisable?: boolean;
|
|
70
75
|
fields?: object;
|
|
71
76
|
urlDisplay?: boolean;
|
|
77
|
+
steps?: Array<StepDefinition>;
|
|
72
78
|
}
|
|
73
79
|
export interface ExtraQueryConfig {
|
|
74
80
|
[key: string]: {
|
package/dist/sdk/datasources.js
CHANGED
|
@@ -26,6 +26,7 @@ var QueryType;
|
|
|
26
26
|
var DatasourceFieldType;
|
|
27
27
|
(function (DatasourceFieldType) {
|
|
28
28
|
DatasourceFieldType["STRING"] = "string";
|
|
29
|
+
DatasourceFieldType["CODE"] = "code";
|
|
29
30
|
DatasourceFieldType["LONGFORM"] = "longForm";
|
|
30
31
|
DatasourceFieldType["BOOLEAN"] = "boolean";
|
|
31
32
|
DatasourceFieldType["NUMBER"] = "number";
|