@budibase/server 2.5.6-alpha.3 → 2.5.6-alpha.5
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/builder/assets/{index.a33a6c3d.js → index.564a7c4f.js} +243 -243
- package/builder/assets/{index.841e62d8.css → index.9e886d0a.css} +1 -1
- package/builder/index.html +2 -2
- package/dist/api/controllers/automation.js +13 -7
- package/dist/api/controllers/plugin/index.js +4 -35
- package/dist/automations/actions.js +32 -6
- package/dist/automations/index.js +3 -2
- package/dist/automations/steps/bash.js +6 -6
- package/dist/automations/steps/createRow.js +11 -11
- package/dist/automations/steps/delay.js +3 -3
- package/dist/automations/steps/deleteRow.js +8 -8
- package/dist/automations/steps/discord.js +8 -8
- package/dist/automations/steps/executeQuery.js +9 -9
- package/dist/automations/steps/executeScript.js +6 -6
- package/dist/automations/steps/filter.js +6 -6
- package/dist/automations/steps/integromat.js +10 -10
- package/dist/automations/steps/loop.js +9 -9
- package/dist/automations/steps/outgoingWebhook.js +10 -10
- package/dist/automations/steps/queryRows.js +14 -14
- package/dist/automations/steps/sendSmtpEmail.js +9 -9
- package/dist/automations/steps/serverLog.js +4 -4
- package/dist/automations/steps/slack.js +6 -6
- package/dist/automations/steps/updateRow.js +11 -11
- package/dist/automations/steps/zapier.js +9 -9
- package/dist/automations/triggerInfo/app.js +5 -5
- package/dist/automations/triggerInfo/cron.js +4 -4
- package/dist/automations/triggerInfo/rowDeleted.js +5 -5
- package/dist/automations/triggerInfo/rowSaved.js +7 -7
- package/dist/automations/triggerInfo/rowUpdated.js +7 -7
- package/dist/automations/triggerInfo/webhook.js +6 -6
- package/dist/integrations/index.js +3 -3
- package/dist/package.json +7 -7
- package/dist/sdk/index.js +2 -0
- package/dist/sdk/plugins/index.js +27 -0
- package/dist/sdk/plugins/plugins.js +53 -0
- package/dist/threads/automation.js +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/plugin.js +33 -23
- package/dist/watch.js +2 -2
- package/package.json +8 -8
- package/src/api/controllers/automation.ts +12 -6
- package/src/api/controllers/plugin/index.ts +6 -43
- package/src/api/routes/tests/automation.spec.js +2 -2
- package/src/automations/actions.ts +56 -24
- package/src/automations/index.ts +1 -1
- package/src/automations/steps/bash.ts +10 -7
- package/src/automations/steps/createRow.ts +15 -12
- package/src/automations/steps/delay.ts +6 -4
- package/src/automations/steps/deleteRow.ts +12 -9
- package/src/automations/steps/discord.ts +10 -8
- package/src/automations/steps/executeQuery.ts +13 -10
- package/src/automations/steps/executeScript.ts +10 -7
- package/src/automations/steps/filter.ts +8 -6
- package/src/automations/steps/integromat.ts +12 -10
- package/src/automations/steps/loop.ts +16 -10
- package/src/automations/steps/outgoingWebhook.ts +14 -11
- package/src/automations/steps/queryRows.ts +18 -15
- package/src/automations/steps/sendSmtpEmail.ts +11 -9
- package/src/automations/steps/serverLog.ts +6 -4
- package/src/automations/steps/slack.ts +8 -6
- package/src/automations/steps/updateRow.ts +15 -12
- package/src/automations/steps/zapier.ts +11 -9
- package/src/automations/tests/utilities/index.ts +2 -2
- package/src/automations/triggerInfo/app.ts +8 -5
- package/src/automations/triggerInfo/cron.ts +7 -4
- package/src/automations/triggerInfo/rowDeleted.ts +8 -5
- package/src/automations/triggerInfo/rowSaved.ts +10 -7
- package/src/automations/triggerInfo/rowUpdated.ts +10 -7
- package/src/automations/triggerInfo/webhook.ts +9 -6
- package/src/integrations/index.ts +3 -3
- package/src/sdk/index.ts +2 -0
- package/src/sdk/plugins/index.ts +5 -0
- package/src/sdk/plugins/plugins.ts +41 -0
- package/src/tests/utilities/structures.ts +25 -17
- package/src/threads/automation.ts +2 -2
- package/src/utilities/fileSystem/plugin.ts +13 -4
- package/src/watch.ts +2 -2
|
@@ -14,19 +14,19 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
option: {
|
|
17
|
-
customType:
|
|
17
|
+
customType: types_1.AutomationCustomIOType.LOOP_OPTION,
|
|
18
18
|
title: "Input type",
|
|
19
19
|
},
|
|
20
20
|
binding: {
|
|
21
|
-
type:
|
|
21
|
+
type: types_1.AutomationIOType.STRING,
|
|
22
22
|
title: "Binding / Value",
|
|
23
23
|
},
|
|
24
24
|
iterations: {
|
|
25
|
-
type:
|
|
25
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
26
26
|
title: "Max loop iterations",
|
|
27
27
|
},
|
|
28
28
|
failure: {
|
|
29
|
-
type:
|
|
29
|
+
type: types_1.AutomationIOType.STRING,
|
|
30
30
|
title: "Failure Condition",
|
|
31
31
|
},
|
|
32
32
|
},
|
|
@@ -35,20 +35,20 @@ exports.definition = {
|
|
|
35
35
|
outputs: {
|
|
36
36
|
properties: {
|
|
37
37
|
items: {
|
|
38
|
-
customType:
|
|
38
|
+
customType: types_1.AutomationCustomIOType.ITEM,
|
|
39
39
|
description: "The item currently being executed",
|
|
40
40
|
},
|
|
41
41
|
success: {
|
|
42
|
-
type:
|
|
42
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
43
43
|
description: "Whether the message loop was successfully",
|
|
44
44
|
},
|
|
45
45
|
iterations: {
|
|
46
|
-
type:
|
|
47
|
-
|
|
46
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
47
|
+
description: "The amount of times the block ran",
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
required: ["success", "items", "iterations"],
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
-
type:
|
|
53
|
+
type: types_1.AutomationStepType.LOGIC,
|
|
54
54
|
};
|
|
@@ -58,7 +58,7 @@ exports.definition = {
|
|
|
58
58
|
tagline: "Send a {{inputs.requestMethod}} request",
|
|
59
59
|
icon: "Send",
|
|
60
60
|
description: "Send a request of specified method to a URL",
|
|
61
|
-
type:
|
|
61
|
+
type: types_1.AutomationStepType.ACTION,
|
|
62
62
|
internal: true,
|
|
63
63
|
stepId: types_1.AutomationActionStepId.OUTGOING_WEBHOOK,
|
|
64
64
|
inputs: {
|
|
@@ -71,23 +71,23 @@ exports.definition = {
|
|
|
71
71
|
inputs: {
|
|
72
72
|
properties: {
|
|
73
73
|
requestMethod: {
|
|
74
|
-
type:
|
|
74
|
+
type: types_1.AutomationIOType.STRING,
|
|
75
75
|
enum: Object.values(RequestType),
|
|
76
76
|
title: "Request method",
|
|
77
77
|
},
|
|
78
78
|
url: {
|
|
79
|
-
type:
|
|
79
|
+
type: types_1.AutomationIOType.STRING,
|
|
80
80
|
title: "URL",
|
|
81
81
|
},
|
|
82
82
|
requestBody: {
|
|
83
|
-
type:
|
|
83
|
+
type: types_1.AutomationIOType.STRING,
|
|
84
84
|
title: "JSON Body",
|
|
85
|
-
customType:
|
|
85
|
+
customType: types_1.AutomationCustomIOType.WIDE,
|
|
86
86
|
},
|
|
87
87
|
headers: {
|
|
88
|
-
type:
|
|
88
|
+
type: types_1.AutomationIOType.STRING,
|
|
89
89
|
title: "Headers",
|
|
90
|
-
customType:
|
|
90
|
+
customType: types_1.AutomationCustomIOType.WIDE,
|
|
91
91
|
},
|
|
92
92
|
},
|
|
93
93
|
required: ["requestMethod", "url"],
|
|
@@ -95,15 +95,15 @@ exports.definition = {
|
|
|
95
95
|
outputs: {
|
|
96
96
|
properties: {
|
|
97
97
|
response: {
|
|
98
|
-
type:
|
|
98
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
99
99
|
description: "The response from the webhook",
|
|
100
100
|
},
|
|
101
101
|
httpStatus: {
|
|
102
|
-
type:
|
|
102
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
103
103
|
description: "The HTTP status code returned",
|
|
104
104
|
},
|
|
105
105
|
success: {
|
|
106
|
-
type:
|
|
106
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
107
107
|
description: "Whether the action was successful",
|
|
108
108
|
},
|
|
109
109
|
},
|
|
@@ -62,7 +62,7 @@ exports.definition = {
|
|
|
62
62
|
icon: "Search",
|
|
63
63
|
name: "Query rows",
|
|
64
64
|
tagline: "Query rows from {{inputs.enriched.table.name}} table",
|
|
65
|
-
type:
|
|
65
|
+
type: types_1.AutomationStepType.ACTION,
|
|
66
66
|
stepId: types_1.AutomationActionStepId.QUERY_ROWS,
|
|
67
67
|
internal: true,
|
|
68
68
|
inputs: {},
|
|
@@ -70,35 +70,35 @@ exports.definition = {
|
|
|
70
70
|
inputs: {
|
|
71
71
|
properties: {
|
|
72
72
|
tableId: {
|
|
73
|
-
type:
|
|
74
|
-
customType:
|
|
73
|
+
type: types_1.AutomationIOType.STRING,
|
|
74
|
+
customType: types_1.AutomationCustomIOType.TABLE,
|
|
75
75
|
title: "Table",
|
|
76
76
|
},
|
|
77
77
|
filters: {
|
|
78
|
-
type:
|
|
79
|
-
customType:
|
|
78
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
79
|
+
customType: types_1.AutomationCustomIOType.FILTERS,
|
|
80
80
|
title: "Filtering",
|
|
81
81
|
},
|
|
82
82
|
sortColumn: {
|
|
83
|
-
type:
|
|
83
|
+
type: types_1.AutomationIOType.STRING,
|
|
84
84
|
title: "Sort Column",
|
|
85
|
-
customType:
|
|
85
|
+
customType: types_1.AutomationCustomIOType.COLUMN,
|
|
86
86
|
},
|
|
87
87
|
sortOrder: {
|
|
88
|
-
type:
|
|
88
|
+
type: types_1.AutomationIOType.STRING,
|
|
89
89
|
title: "Sort Order",
|
|
90
90
|
enum: Object.values(SortOrder),
|
|
91
91
|
pretty: Object.values(SortOrderPretty),
|
|
92
92
|
},
|
|
93
93
|
limit: {
|
|
94
|
-
type:
|
|
94
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
95
95
|
title: "Limit",
|
|
96
|
-
customType:
|
|
96
|
+
customType: types_1.AutomationCustomIOType.QUERY_LIMIT,
|
|
97
97
|
},
|
|
98
98
|
onEmptyFilter: {
|
|
99
99
|
pretty: Object.values(EmptyFilterOptionPretty),
|
|
100
100
|
enum: Object.values(EmptyFilterOption),
|
|
101
|
-
type:
|
|
101
|
+
type: types_1.AutomationIOType.STRING,
|
|
102
102
|
title: "When Filter Empty",
|
|
103
103
|
},
|
|
104
104
|
},
|
|
@@ -107,12 +107,12 @@ exports.definition = {
|
|
|
107
107
|
outputs: {
|
|
108
108
|
properties: {
|
|
109
109
|
rows: {
|
|
110
|
-
type:
|
|
111
|
-
customType:
|
|
110
|
+
type: types_1.AutomationIOType.ARRAY,
|
|
111
|
+
customType: types_1.AutomationCustomIOType.ROWS,
|
|
112
112
|
description: "The rows that were found",
|
|
113
113
|
},
|
|
114
114
|
success: {
|
|
115
|
-
type:
|
|
115
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
116
116
|
description: "Whether the query was successful",
|
|
117
117
|
},
|
|
118
118
|
},
|
|
@@ -41,7 +41,7 @@ exports.definition = {
|
|
|
41
41
|
tagline: "Send SMTP email to {{inputs.to}}",
|
|
42
42
|
icon: "Email",
|
|
43
43
|
name: "Send Email (SMTP)",
|
|
44
|
-
type:
|
|
44
|
+
type: types_1.AutomationStepType.ACTION,
|
|
45
45
|
internal: true,
|
|
46
46
|
stepId: types_1.AutomationActionStepId.SEND_EMAIL_SMTP,
|
|
47
47
|
inputs: {},
|
|
@@ -49,27 +49,27 @@ exports.definition = {
|
|
|
49
49
|
inputs: {
|
|
50
50
|
properties: {
|
|
51
51
|
to: {
|
|
52
|
-
type:
|
|
52
|
+
type: types_1.AutomationIOType.STRING,
|
|
53
53
|
title: "Send To",
|
|
54
54
|
},
|
|
55
55
|
from: {
|
|
56
|
-
type:
|
|
56
|
+
type: types_1.AutomationIOType.STRING,
|
|
57
57
|
title: "Send From",
|
|
58
58
|
},
|
|
59
59
|
cc: {
|
|
60
|
-
type:
|
|
60
|
+
type: types_1.AutomationIOType.STRING,
|
|
61
61
|
title: "CC",
|
|
62
62
|
},
|
|
63
63
|
bcc: {
|
|
64
|
-
type:
|
|
64
|
+
type: types_1.AutomationIOType.STRING,
|
|
65
65
|
title: "BCC",
|
|
66
66
|
},
|
|
67
67
|
subject: {
|
|
68
|
-
type:
|
|
68
|
+
type: types_1.AutomationIOType.STRING,
|
|
69
69
|
title: "Email Subject",
|
|
70
70
|
},
|
|
71
71
|
contents: {
|
|
72
|
-
type:
|
|
72
|
+
type: types_1.AutomationIOType.STRING,
|
|
73
73
|
title: "HTML Contents",
|
|
74
74
|
},
|
|
75
75
|
},
|
|
@@ -78,11 +78,11 @@ exports.definition = {
|
|
|
78
78
|
outputs: {
|
|
79
79
|
properties: {
|
|
80
80
|
success: {
|
|
81
|
-
type:
|
|
81
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
82
82
|
description: "Whether the email was sent",
|
|
83
83
|
},
|
|
84
84
|
response: {
|
|
85
|
-
type:
|
|
85
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
86
86
|
description: "A response from the email client, this may be an error",
|
|
87
87
|
},
|
|
88
88
|
},
|
|
@@ -21,7 +21,7 @@ exports.definition = {
|
|
|
21
21
|
tagline: "Console log a value in the backend",
|
|
22
22
|
icon: "Monitoring",
|
|
23
23
|
description: "Logs the given text to the server (using console.log)",
|
|
24
|
-
type:
|
|
24
|
+
type: types_1.AutomationStepType.ACTION,
|
|
25
25
|
internal: true,
|
|
26
26
|
stepId: types_1.AutomationActionStepId.SERVER_LOG,
|
|
27
27
|
inputs: {
|
|
@@ -31,7 +31,7 @@ exports.definition = {
|
|
|
31
31
|
inputs: {
|
|
32
32
|
properties: {
|
|
33
33
|
text: {
|
|
34
|
-
type:
|
|
34
|
+
type: types_1.AutomationIOType.STRING,
|
|
35
35
|
title: "Log",
|
|
36
36
|
},
|
|
37
37
|
},
|
|
@@ -40,11 +40,11 @@ exports.definition = {
|
|
|
40
40
|
outputs: {
|
|
41
41
|
properties: {
|
|
42
42
|
success: {
|
|
43
|
-
type:
|
|
43
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
44
44
|
description: "Whether the action was successful",
|
|
45
45
|
},
|
|
46
46
|
message: {
|
|
47
|
-
type:
|
|
47
|
+
type: types_1.AutomationIOType.STRING,
|
|
48
48
|
description: "What was output",
|
|
49
49
|
},
|
|
50
50
|
},
|
|
@@ -22,18 +22,18 @@ exports.definition = {
|
|
|
22
22
|
description: "Send a message to Slack",
|
|
23
23
|
icon: "ri-slack-line",
|
|
24
24
|
stepId: types_1.AutomationActionStepId.slack,
|
|
25
|
-
type:
|
|
25
|
+
type: types_1.AutomationStepType.ACTION,
|
|
26
26
|
internal: false,
|
|
27
27
|
inputs: {},
|
|
28
28
|
schema: {
|
|
29
29
|
inputs: {
|
|
30
30
|
properties: {
|
|
31
31
|
url: {
|
|
32
|
-
type:
|
|
32
|
+
type: types_1.AutomationIOType.STRING,
|
|
33
33
|
title: "Incoming Webhook URL",
|
|
34
34
|
},
|
|
35
35
|
text: {
|
|
36
|
-
type:
|
|
36
|
+
type: types_1.AutomationIOType.STRING,
|
|
37
37
|
title: "Message",
|
|
38
38
|
},
|
|
39
39
|
},
|
|
@@ -42,15 +42,15 @@ exports.definition = {
|
|
|
42
42
|
outputs: {
|
|
43
43
|
properties: {
|
|
44
44
|
httpStatus: {
|
|
45
|
-
type:
|
|
45
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
46
46
|
description: "The HTTP status code of the request",
|
|
47
47
|
},
|
|
48
48
|
success: {
|
|
49
|
-
type:
|
|
49
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
50
50
|
description: "Whether the message sent successfully",
|
|
51
51
|
},
|
|
52
52
|
response: {
|
|
53
|
-
type:
|
|
53
|
+
type: types_1.AutomationIOType.STRING,
|
|
54
54
|
description: "The response from the Slack Webhook",
|
|
55
55
|
},
|
|
56
56
|
},
|
|
@@ -42,7 +42,7 @@ exports.definition = {
|
|
|
42
42
|
tagline: "Update a {{inputs.enriched.table.name}} row",
|
|
43
43
|
icon: "Refresh",
|
|
44
44
|
description: "Update a row in your database",
|
|
45
|
-
type:
|
|
45
|
+
type: types_1.AutomationStepType.ACTION,
|
|
46
46
|
internal: true,
|
|
47
47
|
stepId: types_1.AutomationActionStepId.UPDATE_ROW,
|
|
48
48
|
inputs: {},
|
|
@@ -50,16 +50,16 @@ exports.definition = {
|
|
|
50
50
|
inputs: {
|
|
51
51
|
properties: {
|
|
52
52
|
meta: {
|
|
53
|
-
type:
|
|
53
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
54
54
|
title: "Field settings",
|
|
55
55
|
},
|
|
56
56
|
row: {
|
|
57
|
-
type:
|
|
58
|
-
customType:
|
|
57
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
58
|
+
customType: types_1.AutomationCustomIOType.ROW,
|
|
59
59
|
title: "Table",
|
|
60
60
|
},
|
|
61
61
|
rowId: {
|
|
62
|
-
type:
|
|
62
|
+
type: types_1.AutomationIOType.STRING,
|
|
63
63
|
title: "Row ID",
|
|
64
64
|
},
|
|
65
65
|
},
|
|
@@ -68,24 +68,24 @@ exports.definition = {
|
|
|
68
68
|
outputs: {
|
|
69
69
|
properties: {
|
|
70
70
|
row: {
|
|
71
|
-
type:
|
|
72
|
-
customType:
|
|
71
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
72
|
+
customType: types_1.AutomationCustomIOType.ROW,
|
|
73
73
|
description: "The updated row",
|
|
74
74
|
},
|
|
75
75
|
response: {
|
|
76
|
-
type:
|
|
76
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
77
77
|
description: "The response from the table",
|
|
78
78
|
},
|
|
79
79
|
success: {
|
|
80
|
-
type:
|
|
80
|
+
type: types_1.AutomationIOType.BOOLEAN,
|
|
81
81
|
description: "Whether the action was successful",
|
|
82
82
|
},
|
|
83
83
|
id: {
|
|
84
|
-
type:
|
|
84
|
+
type: types_1.AutomationIOType.STRING,
|
|
85
85
|
description: "The identifier of the updated row",
|
|
86
86
|
},
|
|
87
87
|
revision: {
|
|
88
|
-
type:
|
|
88
|
+
type: types_1.AutomationIOType.STRING,
|
|
89
89
|
description: "The revision of the updated row",
|
|
90
90
|
},
|
|
91
91
|
},
|
|
@@ -19,7 +19,7 @@ const types_1 = require("@budibase/types");
|
|
|
19
19
|
exports.definition = {
|
|
20
20
|
name: "Zapier Webhook",
|
|
21
21
|
stepId: types_1.AutomationActionStepId.zapier,
|
|
22
|
-
type:
|
|
22
|
+
type: types_1.AutomationStepType.ACTION,
|
|
23
23
|
internal: false,
|
|
24
24
|
description: "Trigger a Zapier Zap via webhooks",
|
|
25
25
|
tagline: "Trigger a Zapier Zap",
|
|
@@ -29,27 +29,27 @@ exports.definition = {
|
|
|
29
29
|
inputs: {
|
|
30
30
|
properties: {
|
|
31
31
|
url: {
|
|
32
|
-
type:
|
|
32
|
+
type: types_1.AutomationIOType.STRING,
|
|
33
33
|
title: "Webhook URL",
|
|
34
34
|
},
|
|
35
35
|
value1: {
|
|
36
|
-
type:
|
|
36
|
+
type: types_1.AutomationIOType.STRING,
|
|
37
37
|
title: "Payload Value 1",
|
|
38
38
|
},
|
|
39
39
|
value2: {
|
|
40
|
-
type:
|
|
40
|
+
type: types_1.AutomationIOType.STRING,
|
|
41
41
|
title: "Payload Value 2",
|
|
42
42
|
},
|
|
43
43
|
value3: {
|
|
44
|
-
type:
|
|
44
|
+
type: types_1.AutomationIOType.STRING,
|
|
45
45
|
title: "Payload Value 3",
|
|
46
46
|
},
|
|
47
47
|
value4: {
|
|
48
|
-
type:
|
|
48
|
+
type: types_1.AutomationIOType.STRING,
|
|
49
49
|
title: "Payload Value 4",
|
|
50
50
|
},
|
|
51
51
|
value5: {
|
|
52
|
-
type:
|
|
52
|
+
type: types_1.AutomationIOType.STRING,
|
|
53
53
|
title: "Payload Value 5",
|
|
54
54
|
},
|
|
55
55
|
},
|
|
@@ -58,11 +58,11 @@ exports.definition = {
|
|
|
58
58
|
outputs: {
|
|
59
59
|
properties: {
|
|
60
60
|
httpStatus: {
|
|
61
|
-
type:
|
|
61
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
62
62
|
description: "The HTTP status code of the request",
|
|
63
63
|
},
|
|
64
64
|
response: {
|
|
65
|
-
type:
|
|
65
|
+
type: types_1.AutomationIOType.STRING,
|
|
66
66
|
description: "The response from Zapier",
|
|
67
67
|
},
|
|
68
68
|
},
|
|
@@ -14,8 +14,8 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
fields: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.TRIGGER_SCHEMA,
|
|
19
19
|
title: "Fields",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
@@ -24,13 +24,13 @@ exports.definition = {
|
|
|
24
24
|
outputs: {
|
|
25
25
|
properties: {
|
|
26
26
|
fields: {
|
|
27
|
-
type:
|
|
27
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
28
28
|
description: "Fields submitted from the app frontend",
|
|
29
|
-
customType:
|
|
29
|
+
customType: types_1.AutomationCustomIOType.TRIGGER_SCHEMA,
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
required: ["fields"],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
type:
|
|
35
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
36
36
|
};
|
|
@@ -14,8 +14,8 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
cron: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.STRING,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.CRON,
|
|
19
19
|
title: "Expression",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
@@ -24,12 +24,12 @@ exports.definition = {
|
|
|
24
24
|
outputs: {
|
|
25
25
|
properties: {
|
|
26
26
|
timestamp: {
|
|
27
|
-
type:
|
|
27
|
+
type: types_1.AutomationIOType.NUMBER,
|
|
28
28
|
description: "Timestamp the cron was executed",
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
required: ["timestamp"],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
-
type:
|
|
34
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
35
35
|
};
|
|
@@ -14,8 +14,8 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
tableId: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.STRING,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.TABLE,
|
|
19
19
|
title: "Table",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
@@ -24,13 +24,13 @@ exports.definition = {
|
|
|
24
24
|
outputs: {
|
|
25
25
|
properties: {
|
|
26
26
|
row: {
|
|
27
|
-
type:
|
|
28
|
-
customType:
|
|
27
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
28
|
+
customType: types_1.AutomationCustomIOType.ROW,
|
|
29
29
|
description: "The row that was deleted",
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
required: ["row"],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
type:
|
|
35
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
36
36
|
};
|
|
@@ -14,8 +14,8 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
tableId: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.STRING,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.TABLE,
|
|
19
19
|
title: "Table",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
@@ -24,21 +24,21 @@ exports.definition = {
|
|
|
24
24
|
outputs: {
|
|
25
25
|
properties: {
|
|
26
26
|
row: {
|
|
27
|
-
type:
|
|
28
|
-
customType:
|
|
27
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
28
|
+
customType: types_1.AutomationCustomIOType.ROW,
|
|
29
29
|
description: "The new row that was created",
|
|
30
30
|
},
|
|
31
31
|
id: {
|
|
32
|
-
type:
|
|
32
|
+
type: types_1.AutomationIOType.STRING,
|
|
33
33
|
description: "Row ID - can be used for updating",
|
|
34
34
|
},
|
|
35
35
|
revision: {
|
|
36
|
-
type:
|
|
36
|
+
type: types_1.AutomationIOType.STRING,
|
|
37
37
|
description: "Revision of row",
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
required: ["row", "id"],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
type:
|
|
43
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
44
44
|
};
|
|
@@ -14,8 +14,8 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
tableId: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.STRING,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.TABLE,
|
|
19
19
|
title: "Table",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
@@ -24,21 +24,21 @@ exports.definition = {
|
|
|
24
24
|
outputs: {
|
|
25
25
|
properties: {
|
|
26
26
|
row: {
|
|
27
|
-
type:
|
|
28
|
-
customType:
|
|
27
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
28
|
+
customType: types_1.AutomationCustomIOType.ROW,
|
|
29
29
|
description: "The row that was updated",
|
|
30
30
|
},
|
|
31
31
|
id: {
|
|
32
|
-
type:
|
|
32
|
+
type: types_1.AutomationIOType.STRING,
|
|
33
33
|
description: "Row ID - can be used for updating",
|
|
34
34
|
},
|
|
35
35
|
revision: {
|
|
36
|
-
type:
|
|
36
|
+
type: types_1.AutomationIOType.STRING,
|
|
37
37
|
description: "Revision of row",
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
required: ["row", "id"],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
type:
|
|
43
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
44
44
|
};
|
|
@@ -14,13 +14,13 @@ exports.definition = {
|
|
|
14
14
|
inputs: {
|
|
15
15
|
properties: {
|
|
16
16
|
schemaUrl: {
|
|
17
|
-
type:
|
|
18
|
-
customType:
|
|
17
|
+
type: types_1.AutomationIOType.STRING,
|
|
18
|
+
customType: types_1.AutomationCustomIOType.WEBHOOK_URL,
|
|
19
19
|
title: "Schema URL",
|
|
20
20
|
},
|
|
21
21
|
triggerUrl: {
|
|
22
|
-
type:
|
|
23
|
-
customType:
|
|
22
|
+
type: types_1.AutomationIOType.STRING,
|
|
23
|
+
customType: types_1.AutomationCustomIOType.WEBHOOK_URL,
|
|
24
24
|
title: "Trigger URL",
|
|
25
25
|
},
|
|
26
26
|
},
|
|
@@ -29,12 +29,12 @@ exports.definition = {
|
|
|
29
29
|
outputs: {
|
|
30
30
|
properties: {
|
|
31
31
|
body: {
|
|
32
|
-
type:
|
|
32
|
+
type: types_1.AutomationIOType.OBJECT,
|
|
33
33
|
description: "Body of the request which hit the webhook",
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
required: ["body"],
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
-
type:
|
|
39
|
+
type: types_1.AutomationStepType.TRIGGER,
|
|
40
40
|
};
|
|
@@ -29,11 +29,11 @@ const firebase_1 = __importDefault(require("./firebase"));
|
|
|
29
29
|
const redis_1 = __importDefault(require("./redis"));
|
|
30
30
|
const snowflake_1 = __importDefault(require("./snowflake"));
|
|
31
31
|
const oracle_1 = __importDefault(require("./oracle"));
|
|
32
|
-
const plugin_1 = require("../api/controllers/plugin");
|
|
33
32
|
const types_1 = require("@budibase/types");
|
|
34
33
|
const fileSystem_1 = require("../utilities/fileSystem");
|
|
35
34
|
const environment_1 = __importDefault(require("../environment"));
|
|
36
35
|
const lodash_1 = require("lodash");
|
|
36
|
+
const sdk_1 = __importDefault(require("../sdk"));
|
|
37
37
|
const DEFINITIONS = {
|
|
38
38
|
[types_1.SourceName.POSTGRES]: postgres_1.default.schema,
|
|
39
39
|
[types_1.SourceName.DYNAMODB]: dynamodb_1.default.schema,
|
|
@@ -91,7 +91,7 @@ function getDefinitions() {
|
|
|
91
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
const pluginSchemas = {};
|
|
93
93
|
if (environment_1.default.SELF_HOSTED) {
|
|
94
|
-
const plugins = yield
|
|
94
|
+
const plugins = yield sdk_1.default.plugins.fetch(types_1.PluginType.DATASOURCE);
|
|
95
95
|
// extract the actual schema from each custom
|
|
96
96
|
for (let plugin of plugins) {
|
|
97
97
|
const sourceId = plugin.name;
|
|
@@ -111,7 +111,7 @@ function getIntegration(integration) {
|
|
|
111
111
|
return INTEGRATIONS[integration];
|
|
112
112
|
}
|
|
113
113
|
if (environment_1.default.SELF_HOSTED) {
|
|
114
|
-
const plugins = yield
|
|
114
|
+
const plugins = yield sdk_1.default.plugins.fetch(types_1.PluginType.DATASOURCE);
|
|
115
115
|
for (let plugin of plugins) {
|
|
116
116
|
if (plugin.name === integration) {
|
|
117
117
|
// need to use commonJS require due to its dynamic runtime nature
|