@budibase/types 2.5.6-alpha.4 → 2.5.6-alpha.6

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.
@@ -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: string;
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
- [key: string]: any;
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;AAiDD,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"}
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"}
@@ -1,7 +1,8 @@
1
1
  import { Document } from "../document";
2
2
  export declare enum PluginType {
3
3
  DATASOURCE = "datasource",
4
- COMPONENT = "component"
4
+ COMPONENT = "component",
5
+ AUTOMATION = "automation"
5
6
  }
6
7
  export declare enum PluginSource {
7
8
  NPM = "NPM",
@@ -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,UAGX;AAHD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,qCAAuB,CAAA;AACzB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;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"}
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"}