@budibase/server 2.5.6-alpha.4 → 2.5.6-alpha.41

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.
Files changed (130) hide show
  1. package/builder/assets/{index.58b41739.js → index.05e726d8.js} +384 -366
  2. package/builder/assets/index.4eae16b2.css +6 -0
  3. package/builder/index.html +2 -2
  4. package/dist/api/controllers/application.js +3 -4
  5. package/dist/api/controllers/automation.js +13 -7
  6. package/dist/api/controllers/datasource.js +1 -1
  7. package/dist/api/controllers/dev.js +1 -1
  8. package/dist/api/controllers/plugin/index.js +6 -37
  9. package/dist/api/controllers/query/index.js +2 -2
  10. package/dist/api/controllers/row/ExternalRequest.js +21 -14
  11. package/dist/api/controllers/table/utils.js +9 -3
  12. package/dist/api/index.js +1 -2
  13. package/dist/api/routes/index.js +0 -2
  14. package/dist/app.js +2 -2
  15. package/dist/automations/actions.js +32 -6
  16. package/dist/automations/index.js +3 -2
  17. package/dist/automations/steps/bash.js +6 -6
  18. package/dist/automations/steps/createRow.js +11 -11
  19. package/dist/automations/steps/delay.js +3 -3
  20. package/dist/automations/steps/deleteRow.js +8 -8
  21. package/dist/automations/steps/discord.js +8 -8
  22. package/dist/automations/steps/executeQuery.js +9 -9
  23. package/dist/automations/steps/executeScript.js +6 -6
  24. package/dist/automations/steps/filter.js +6 -6
  25. package/dist/automations/steps/integromat.js +10 -10
  26. package/dist/automations/steps/loop.js +9 -9
  27. package/dist/automations/steps/outgoingWebhook.js +10 -10
  28. package/dist/automations/steps/queryRows.js +14 -14
  29. package/dist/automations/steps/sendSmtpEmail.js +9 -9
  30. package/dist/automations/steps/serverLog.js +4 -4
  31. package/dist/automations/steps/slack.js +6 -6
  32. package/dist/automations/steps/updateRow.js +11 -11
  33. package/dist/automations/steps/zapier.js +9 -9
  34. package/dist/automations/triggerInfo/app.js +5 -5
  35. package/dist/automations/triggerInfo/cron.js +4 -4
  36. package/dist/automations/triggerInfo/rowDeleted.js +5 -5
  37. package/dist/automations/triggerInfo/rowSaved.js +7 -7
  38. package/dist/automations/triggerInfo/rowUpdated.js +7 -7
  39. package/dist/automations/triggerInfo/webhook.js +6 -6
  40. package/dist/db/utils.js +3 -2
  41. package/dist/integrations/base/sqlTable.js +9 -2
  42. package/dist/integrations/index.js +3 -3
  43. package/dist/migrations/functions/syncQuotas.js +2 -0
  44. package/dist/migrations/functions/usageQuotas/syncApps.js +0 -1
  45. package/dist/migrations/functions/usageQuotas/syncUsers.js +21 -0
  46. package/dist/sdk/app/backups/exports.js +14 -38
  47. package/dist/sdk/index.js +2 -0
  48. package/dist/{api/routes/cloud.js → sdk/plugins/index.js} +2 -14
  49. package/dist/sdk/plugins/plugins.js +53 -0
  50. package/dist/threads/automation.js +2 -2
  51. package/dist/tsconfig.build.tsbuildinfo +1 -1
  52. package/dist/utilities/fileSystem/plugin.js +33 -23
  53. package/dist/utilities/rowProcessor/utils.js +4 -5
  54. package/dist/watch.js +2 -2
  55. package/dist/websockets/client.js +14 -0
  56. package/dist/websockets/grid.js +60 -0
  57. package/dist/websockets/index.js +17 -0
  58. package/dist/websockets/websocket.js +78 -0
  59. package/package.json +11 -10
  60. package/src/api/controllers/application.ts +4 -4
  61. package/src/api/controllers/automation.ts +12 -6
  62. package/src/api/controllers/datasource.ts +15 -5
  63. package/src/api/controllers/dev.ts +2 -2
  64. package/src/api/controllers/plugin/index.ts +8 -45
  65. package/src/api/controllers/query/index.ts +2 -2
  66. package/src/api/controllers/row/ExternalRequest.ts +21 -12
  67. package/src/api/controllers/table/utils.ts +10 -3
  68. package/src/api/index.ts +2 -4
  69. package/src/api/routes/index.ts +0 -2
  70. package/src/api/routes/tests/automation.spec.js +2 -2
  71. package/src/app.ts +2 -2
  72. package/src/automations/actions.ts +56 -24
  73. package/src/automations/index.ts +1 -1
  74. package/src/automations/steps/bash.ts +10 -7
  75. package/src/automations/steps/createRow.ts +15 -12
  76. package/src/automations/steps/delay.ts +6 -4
  77. package/src/automations/steps/deleteRow.ts +12 -9
  78. package/src/automations/steps/discord.ts +10 -8
  79. package/src/automations/steps/executeQuery.ts +13 -10
  80. package/src/automations/steps/executeScript.ts +10 -7
  81. package/src/automations/steps/filter.ts +8 -6
  82. package/src/automations/steps/integromat.ts +12 -10
  83. package/src/automations/steps/loop.ts +16 -10
  84. package/src/automations/steps/outgoingWebhook.ts +14 -11
  85. package/src/automations/steps/queryRows.ts +18 -15
  86. package/src/automations/steps/sendSmtpEmail.ts +11 -9
  87. package/src/automations/steps/serverLog.ts +6 -4
  88. package/src/automations/steps/slack.ts +8 -6
  89. package/src/automations/steps/updateRow.ts +15 -12
  90. package/src/automations/steps/zapier.ts +11 -9
  91. package/src/automations/tests/utilities/index.ts +2 -2
  92. package/src/automations/triggerInfo/app.ts +8 -5
  93. package/src/automations/triggerInfo/cron.ts +7 -4
  94. package/src/automations/triggerInfo/rowDeleted.ts +8 -5
  95. package/src/automations/triggerInfo/rowSaved.ts +10 -7
  96. package/src/automations/triggerInfo/rowUpdated.ts +10 -7
  97. package/src/automations/triggerInfo/webhook.ts +9 -6
  98. package/src/db/utils.ts +1 -0
  99. package/src/integration-test/postgres.spec.ts +3 -1
  100. package/src/integrations/base/sqlTable.ts +9 -2
  101. package/src/integrations/index.ts +3 -3
  102. package/src/migrations/functions/syncQuotas.ts +2 -0
  103. package/src/migrations/functions/usageQuotas/syncApps.ts +1 -2
  104. package/src/migrations/functions/usageQuotas/syncUsers.ts +9 -0
  105. package/src/migrations/functions/usageQuotas/tests/syncUsers.spec.ts +26 -0
  106. package/src/migrations/index.ts +1 -0
  107. package/src/sdk/app/backups/exports.ts +17 -41
  108. package/src/sdk/index.ts +2 -0
  109. package/src/sdk/plugins/index.ts +5 -0
  110. package/src/sdk/plugins/plugins.ts +41 -0
  111. package/src/tests/utilities/structures.ts +25 -17
  112. package/src/threads/automation.ts +2 -2
  113. package/src/utilities/fileSystem/plugin.ts +13 -4
  114. package/src/utilities/rowProcessor/utils.ts +9 -10
  115. package/src/watch.ts +2 -2
  116. package/src/websockets/client.ts +11 -0
  117. package/src/websockets/grid.ts +55 -0
  118. package/src/websockets/index.ts +14 -0
  119. package/src/websockets/websocket.ts +83 -0
  120. package/tsconfig.build.json +3 -5
  121. package/tsconfig.json +2 -1
  122. package/builder/assets/index.841e62d8.css +0 -6
  123. package/dist/api/controllers/cloud.js +0 -130
  124. package/dist/package.json +0 -179
  125. package/dist/websocket.js +0 -22
  126. package/src/api/controllers/cloud.ts +0 -119
  127. package/src/api/routes/cloud.ts +0 -18
  128. package/src/api/routes/tests/cloud.spec.ts +0 -54
  129. package/src/migrations/functions/tests/syncQuotas.spec.js +0 -26
  130. package/src/websocket.ts +0 -26
@@ -3,8 +3,11 @@ import { buildCtx } from "./utils"
3
3
  import * as automationUtils from "../automationUtils"
4
4
  import {
5
5
  AutomationActionStepId,
6
- AutomationStepSchema,
6
+ AutomationCustomIOType,
7
+ AutomationIOType,
7
8
  AutomationStepInput,
9
+ AutomationStepSchema,
10
+ AutomationStepType,
8
11
  } from "@budibase/types"
9
12
 
10
13
  export const definition: AutomationStepSchema = {
@@ -12,7 +15,7 @@ export const definition: AutomationStepSchema = {
12
15
  tagline: "Execute JavaScript Code",
13
16
  icon: "Code",
14
17
  description: "Run a piece of JavaScript code in your automation",
15
- type: "ACTION",
18
+ type: AutomationStepType.ACTION,
16
19
  internal: true,
17
20
  stepId: AutomationActionStepId.EXECUTE_SCRIPT,
18
21
  inputs: {},
@@ -20,8 +23,8 @@ export const definition: AutomationStepSchema = {
20
23
  inputs: {
21
24
  properties: {
22
25
  code: {
23
- type: "string",
24
- customType: "code",
26
+ type: AutomationIOType.STRING,
27
+ customType: AutomationCustomIOType.CODE,
25
28
  title: "Code",
26
29
  },
27
30
  },
@@ -30,16 +33,16 @@ export const definition: AutomationStepSchema = {
30
33
  outputs: {
31
34
  properties: {
32
35
  value: {
33
- type: "string",
36
+ type: AutomationIOType.STRING,
34
37
  description: "The result of the return statement",
35
38
  },
36
39
  success: {
37
- type: "boolean",
40
+ type: AutomationIOType.BOOLEAN,
38
41
  description: "Whether the action was successful",
39
42
  },
40
43
  },
44
+ required: ["success"],
41
45
  },
42
- required: ["success"],
43
46
  },
44
47
  }
45
48
 
@@ -2,6 +2,8 @@ import {
2
2
  AutomationActionStepId,
3
3
  AutomationStepSchema,
4
4
  AutomationStepInput,
5
+ AutomationStepType,
6
+ AutomationIOType,
5
7
  } from "@budibase/types"
6
8
 
7
9
  export const FilterConditions = {
@@ -24,7 +26,7 @@ export const definition: AutomationStepSchema = {
24
26
  icon: "Branch2",
25
27
  description:
26
28
  "Conditionally halt automations which do not meet certain conditions",
27
- type: "LOGIC",
29
+ type: AutomationStepType.LOGIC,
28
30
  internal: true,
29
31
  stepId: AutomationActionStepId.FILTER,
30
32
  inputs: {
@@ -34,17 +36,17 @@ export const definition: AutomationStepSchema = {
34
36
  inputs: {
35
37
  properties: {
36
38
  field: {
37
- type: "string",
39
+ type: AutomationIOType.STRING,
38
40
  title: "Reference Value",
39
41
  },
40
42
  condition: {
41
- type: "string",
43
+ type: AutomationIOType.STRING,
42
44
  title: "Condition",
43
45
  enum: Object.values(FilterConditions),
44
46
  pretty: Object.values(PrettyFilterConditions),
45
47
  },
46
48
  value: {
47
- type: "string",
49
+ type: AutomationIOType.STRING,
48
50
  title: "Comparison Value",
49
51
  },
50
52
  },
@@ -53,11 +55,11 @@ export const definition: AutomationStepSchema = {
53
55
  outputs: {
54
56
  properties: {
55
57
  success: {
56
- type: "boolean",
58
+ type: AutomationIOType.BOOLEAN,
57
59
  description: "Whether the action was successful",
58
60
  },
59
61
  result: {
60
- type: "boolean",
62
+ type: AutomationIOType.BOOLEAN,
61
63
  description: "Whether the logic block passed",
62
64
  },
63
65
  },
@@ -4,6 +4,8 @@ import {
4
4
  AutomationActionStepId,
5
5
  AutomationStepSchema,
6
6
  AutomationStepInput,
7
+ AutomationStepType,
8
+ AutomationIOType,
7
9
  } from "@budibase/types"
8
10
 
9
11
  export const definition: AutomationStepSchema = {
@@ -13,34 +15,34 @@ export const definition: AutomationStepSchema = {
13
15
  "Performs a webhook call to Integromat and gets the response (if configured)",
14
16
  icon: "ri-shut-down-line",
15
17
  stepId: AutomationActionStepId.integromat,
16
- type: "ACTION",
18
+ type: AutomationStepType.ACTION,
17
19
  internal: false,
18
20
  inputs: {},
19
21
  schema: {
20
22
  inputs: {
21
23
  properties: {
22
24
  url: {
23
- type: "string",
25
+ type: AutomationIOType.STRING,
24
26
  title: "Webhook URL",
25
27
  },
26
28
  value1: {
27
- type: "string",
29
+ type: AutomationIOType.STRING,
28
30
  title: "Input Value 1",
29
31
  },
30
32
  value2: {
31
- type: "string",
33
+ type: AutomationIOType.STRING,
32
34
  title: "Input Value 2",
33
35
  },
34
36
  value3: {
35
- type: "string",
37
+ type: AutomationIOType.STRING,
36
38
  title: "Input Value 3",
37
39
  },
38
40
  value4: {
39
- type: "string",
41
+ type: AutomationIOType.STRING,
40
42
  title: "Input Value 4",
41
43
  },
42
44
  value5: {
43
- type: "string",
45
+ type: AutomationIOType.STRING,
44
46
  title: "Input Value 5",
45
47
  },
46
48
  },
@@ -49,15 +51,15 @@ export const definition: AutomationStepSchema = {
49
51
  outputs: {
50
52
  properties: {
51
53
  success: {
52
- type: "boolean",
54
+ type: AutomationIOType.BOOLEAN,
53
55
  description: "Whether call was successful",
54
56
  },
55
57
  httpStatus: {
56
- type: "number",
58
+ type: AutomationIOType.NUMBER,
57
59
  description: "The HTTP status code returned",
58
60
  },
59
61
  response: {
60
- type: "object",
62
+ type: AutomationIOType.OBJECT,
61
63
  description: "The webhook response - this can have properties",
62
64
  },
63
65
  },
@@ -1,4 +1,10 @@
1
- import { AutomationActionStepId, AutomationStepSchema } from "@budibase/types"
1
+ import {
2
+ AutomationActionStepId,
3
+ AutomationCustomIOType,
4
+ AutomationIOType,
5
+ AutomationStepSchema,
6
+ AutomationStepType,
7
+ } from "@budibase/types"
2
8
 
3
9
  export const definition: AutomationStepSchema = {
4
10
  name: "Looping",
@@ -12,19 +18,19 @@ export const definition: AutomationStepSchema = {
12
18
  inputs: {
13
19
  properties: {
14
20
  option: {
15
- customType: "loopOption",
21
+ customType: AutomationCustomIOType.LOOP_OPTION,
16
22
  title: "Input type",
17
23
  },
18
24
  binding: {
19
- type: "string",
25
+ type: AutomationIOType.STRING,
20
26
  title: "Binding / Value",
21
27
  },
22
28
  iterations: {
23
- type: "number",
29
+ type: AutomationIOType.NUMBER,
24
30
  title: "Max loop iterations",
25
31
  },
26
32
  failure: {
27
- type: "string",
33
+ type: AutomationIOType.STRING,
28
34
  title: "Failure Condition",
29
35
  },
30
36
  },
@@ -33,20 +39,20 @@ export const definition: AutomationStepSchema = {
33
39
  outputs: {
34
40
  properties: {
35
41
  items: {
36
- customType: "item",
42
+ customType: AutomationCustomIOType.ITEM,
37
43
  description: "The item currently being executed",
38
44
  },
39
45
  success: {
40
- type: "boolean",
46
+ type: AutomationIOType.BOOLEAN,
41
47
  description: "Whether the message loop was successfully",
42
48
  },
43
49
  iterations: {
44
- type: "number",
45
- descriptions: "The amount of times the block ran",
50
+ type: AutomationIOType.NUMBER,
51
+ description: "The amount of times the block ran",
46
52
  },
47
53
  },
48
54
  required: ["success", "items", "iterations"],
49
55
  },
50
56
  },
51
- type: "LOGIC",
57
+ type: AutomationStepType.LOGIC,
52
58
  }
@@ -3,8 +3,11 @@ import { getFetchResponse } from "./utils"
3
3
  import * as automationUtils from "../automationUtils"
4
4
  import {
5
5
  AutomationActionStepId,
6
- AutomationStepSchema,
6
+ AutomationCustomIOType,
7
+ AutomationIOType,
7
8
  AutomationStepInput,
9
+ AutomationStepSchema,
10
+ AutomationStepType,
8
11
  } from "@budibase/types"
9
12
 
10
13
  enum RequestType {
@@ -27,7 +30,7 @@ export const definition: AutomationStepSchema = {
27
30
  tagline: "Send a {{inputs.requestMethod}} request",
28
31
  icon: "Send",
29
32
  description: "Send a request of specified method to a URL",
30
- type: "ACTION",
33
+ type: AutomationStepType.ACTION,
31
34
  internal: true,
32
35
  stepId: AutomationActionStepId.OUTGOING_WEBHOOK,
33
36
  inputs: {
@@ -40,23 +43,23 @@ export const definition: AutomationStepSchema = {
40
43
  inputs: {
41
44
  properties: {
42
45
  requestMethod: {
43
- type: "string",
46
+ type: AutomationIOType.STRING,
44
47
  enum: Object.values(RequestType),
45
48
  title: "Request method",
46
49
  },
47
50
  url: {
48
- type: "string",
51
+ type: AutomationIOType.STRING,
49
52
  title: "URL",
50
53
  },
51
54
  requestBody: {
52
- type: "string",
55
+ type: AutomationIOType.STRING,
53
56
  title: "JSON Body",
54
- customType: "wide",
57
+ customType: AutomationCustomIOType.WIDE,
55
58
  },
56
59
  headers: {
57
- type: "string",
60
+ type: AutomationIOType.STRING,
58
61
  title: "Headers",
59
- customType: "wide",
62
+ customType: AutomationCustomIOType.WIDE,
60
63
  },
61
64
  },
62
65
  required: ["requestMethod", "url"],
@@ -64,15 +67,15 @@ export const definition: AutomationStepSchema = {
64
67
  outputs: {
65
68
  properties: {
66
69
  response: {
67
- type: "object",
70
+ type: AutomationIOType.OBJECT,
68
71
  description: "The response from the webhook",
69
72
  },
70
73
  httpStatus: {
71
- type: "number",
74
+ type: AutomationIOType.NUMBER,
72
75
  description: "The HTTP status code returned",
73
76
  },
74
77
  success: {
75
- type: "boolean",
78
+ type: AutomationIOType.BOOLEAN,
76
79
  description: "Whether the action was successful",
77
80
  },
78
81
  },
@@ -5,8 +5,11 @@ import { buildCtx } from "./utils"
5
5
  import * as automationUtils from "../automationUtils"
6
6
  import {
7
7
  AutomationActionStepId,
8
- AutomationStepSchema,
8
+ AutomationCustomIOType,
9
+ AutomationIOType,
9
10
  AutomationStepInput,
11
+ AutomationStepSchema,
12
+ AutomationStepType,
10
13
  SearchFilters,
11
14
  Table,
12
15
  } from "@budibase/types"
@@ -36,7 +39,7 @@ export const definition: AutomationStepSchema = {
36
39
  icon: "Search",
37
40
  name: "Query rows",
38
41
  tagline: "Query rows from {{inputs.enriched.table.name}} table",
39
- type: "ACTION",
42
+ type: AutomationStepType.ACTION,
40
43
  stepId: AutomationActionStepId.QUERY_ROWS,
41
44
  internal: true,
42
45
  inputs: {},
@@ -44,35 +47,35 @@ export const definition: AutomationStepSchema = {
44
47
  inputs: {
45
48
  properties: {
46
49
  tableId: {
47
- type: "string",
48
- customType: "table",
50
+ type: AutomationIOType.STRING,
51
+ customType: AutomationCustomIOType.TABLE,
49
52
  title: "Table",
50
53
  },
51
54
  filters: {
52
- type: "object",
53
- customType: "filters",
55
+ type: AutomationIOType.OBJECT,
56
+ customType: AutomationCustomIOType.FILTERS,
54
57
  title: "Filtering",
55
58
  },
56
59
  sortColumn: {
57
- type: "string",
60
+ type: AutomationIOType.STRING,
58
61
  title: "Sort Column",
59
- customType: "column",
62
+ customType: AutomationCustomIOType.COLUMN,
60
63
  },
61
64
  sortOrder: {
62
- type: "string",
65
+ type: AutomationIOType.STRING,
63
66
  title: "Sort Order",
64
67
  enum: Object.values(SortOrder),
65
68
  pretty: Object.values(SortOrderPretty),
66
69
  },
67
70
  limit: {
68
- type: "number",
71
+ type: AutomationIOType.NUMBER,
69
72
  title: "Limit",
70
- customType: "queryLimit",
73
+ customType: AutomationCustomIOType.QUERY_LIMIT,
71
74
  },
72
75
  onEmptyFilter: {
73
76
  pretty: Object.values(EmptyFilterOptionPretty),
74
77
  enum: Object.values(EmptyFilterOption),
75
- type: "string",
78
+ type: AutomationIOType.STRING,
76
79
  title: "When Filter Empty",
77
80
  },
78
81
  },
@@ -81,12 +84,12 @@ export const definition: AutomationStepSchema = {
81
84
  outputs: {
82
85
  properties: {
83
86
  rows: {
84
- type: "array",
85
- customType: "rows",
87
+ type: AutomationIOType.ARRAY,
88
+ customType: AutomationCustomIOType.ROWS,
86
89
  description: "The rows that were found",
87
90
  },
88
91
  success: {
89
- type: "boolean",
92
+ type: AutomationIOType.BOOLEAN,
90
93
  description: "Whether the query was successful",
91
94
  },
92
95
  },
@@ -4,6 +4,8 @@ import {
4
4
  AutomationActionStepId,
5
5
  AutomationStepSchema,
6
6
  AutomationStepInput,
7
+ AutomationStepType,
8
+ AutomationIOType,
7
9
  } from "@budibase/types"
8
10
 
9
11
  export const definition: AutomationStepSchema = {
@@ -11,7 +13,7 @@ export const definition: AutomationStepSchema = {
11
13
  tagline: "Send SMTP email to {{inputs.to}}",
12
14
  icon: "Email",
13
15
  name: "Send Email (SMTP)",
14
- type: "ACTION",
16
+ type: AutomationStepType.ACTION,
15
17
  internal: true,
16
18
  stepId: AutomationActionStepId.SEND_EMAIL_SMTP,
17
19
  inputs: {},
@@ -19,27 +21,27 @@ export const definition: AutomationStepSchema = {
19
21
  inputs: {
20
22
  properties: {
21
23
  to: {
22
- type: "string",
24
+ type: AutomationIOType.STRING,
23
25
  title: "Send To",
24
26
  },
25
27
  from: {
26
- type: "string",
28
+ type: AutomationIOType.STRING,
27
29
  title: "Send From",
28
30
  },
29
31
  cc: {
30
- type: "string",
32
+ type: AutomationIOType.STRING,
31
33
  title: "CC",
32
34
  },
33
35
  bcc: {
34
- type: "string",
36
+ type: AutomationIOType.STRING,
35
37
  title: "BCC",
36
38
  },
37
39
  subject: {
38
- type: "string",
40
+ type: AutomationIOType.STRING,
39
41
  title: "Email Subject",
40
42
  },
41
43
  contents: {
42
- type: "string",
44
+ type: AutomationIOType.STRING,
43
45
  title: "HTML Contents",
44
46
  },
45
47
  },
@@ -48,11 +50,11 @@ export const definition: AutomationStepSchema = {
48
50
  outputs: {
49
51
  properties: {
50
52
  success: {
51
- type: "boolean",
53
+ type: AutomationIOType.BOOLEAN,
52
54
  description: "Whether the email was sent",
53
55
  },
54
56
  response: {
55
- type: "object",
57
+ type: AutomationIOType.OBJECT,
56
58
  description: "A response from the email client, this may be an error",
57
59
  },
58
60
  },
@@ -2,6 +2,8 @@ import {
2
2
  AutomationActionStepId,
3
3
  AutomationStepSchema,
4
4
  AutomationStepInput,
5
+ AutomationStepType,
6
+ AutomationIOType,
5
7
  } from "@budibase/types"
6
8
 
7
9
  /**
@@ -15,7 +17,7 @@ export const definition: AutomationStepSchema = {
15
17
  tagline: "Console log a value in the backend",
16
18
  icon: "Monitoring",
17
19
  description: "Logs the given text to the server (using console.log)",
18
- type: "ACTION",
20
+ type: AutomationStepType.ACTION,
19
21
  internal: true,
20
22
  stepId: AutomationActionStepId.SERVER_LOG,
21
23
  inputs: {
@@ -25,7 +27,7 @@ export const definition: AutomationStepSchema = {
25
27
  inputs: {
26
28
  properties: {
27
29
  text: {
28
- type: "string",
30
+ type: AutomationIOType.STRING,
29
31
  title: "Log",
30
32
  },
31
33
  },
@@ -34,11 +36,11 @@ export const definition: AutomationStepSchema = {
34
36
  outputs: {
35
37
  properties: {
36
38
  success: {
37
- type: "boolean",
39
+ type: AutomationIOType.BOOLEAN,
38
40
  description: "Whether the action was successful",
39
41
  },
40
42
  message: {
41
- type: "string",
43
+ type: AutomationIOType.STRING,
42
44
  description: "What was output",
43
45
  },
44
46
  },
@@ -4,6 +4,8 @@ import {
4
4
  AutomationActionStepId,
5
5
  AutomationStepSchema,
6
6
  AutomationStepInput,
7
+ AutomationStepType,
8
+ AutomationIOType,
7
9
  } from "@budibase/types"
8
10
 
9
11
  export const definition: AutomationStepSchema = {
@@ -12,18 +14,18 @@ export const definition: AutomationStepSchema = {
12
14
  description: "Send a message to Slack",
13
15
  icon: "ri-slack-line",
14
16
  stepId: AutomationActionStepId.slack,
15
- type: "ACTION",
17
+ type: AutomationStepType.ACTION,
16
18
  internal: false,
17
19
  inputs: {},
18
20
  schema: {
19
21
  inputs: {
20
22
  properties: {
21
23
  url: {
22
- type: "string",
24
+ type: AutomationIOType.STRING,
23
25
  title: "Incoming Webhook URL",
24
26
  },
25
27
  text: {
26
- type: "string",
28
+ type: AutomationIOType.STRING,
27
29
  title: "Message",
28
30
  },
29
31
  },
@@ -32,15 +34,15 @@ export const definition: AutomationStepSchema = {
32
34
  outputs: {
33
35
  properties: {
34
36
  httpStatus: {
35
- type: "number",
37
+ type: AutomationIOType.NUMBER,
36
38
  description: "The HTTP status code of the request",
37
39
  },
38
40
  success: {
39
- type: "boolean",
41
+ type: AutomationIOType.BOOLEAN,
40
42
  description: "Whether the message sent successfully",
41
43
  },
42
44
  response: {
43
- type: "string",
45
+ type: AutomationIOType.STRING,
44
46
  description: "The response from the Slack Webhook",
45
47
  },
46
48
  },
@@ -3,8 +3,11 @@ import * as automationUtils from "../automationUtils"
3
3
  import { buildCtx } from "./utils"
4
4
  import {
5
5
  AutomationActionStepId,
6
- AutomationStepSchema,
6
+ AutomationCustomIOType,
7
+ AutomationIOType,
7
8
  AutomationStepInput,
9
+ AutomationStepSchema,
10
+ AutomationStepType,
8
11
  } from "@budibase/types"
9
12
 
10
13
  export const definition: AutomationStepSchema = {
@@ -12,7 +15,7 @@ export const definition: AutomationStepSchema = {
12
15
  tagline: "Update a {{inputs.enriched.table.name}} row",
13
16
  icon: "Refresh",
14
17
  description: "Update a row in your database",
15
- type: "ACTION",
18
+ type: AutomationStepType.ACTION,
16
19
  internal: true,
17
20
  stepId: AutomationActionStepId.UPDATE_ROW,
18
21
  inputs: {},
@@ -20,16 +23,16 @@ export const definition: AutomationStepSchema = {
20
23
  inputs: {
21
24
  properties: {
22
25
  meta: {
23
- type: "object",
26
+ type: AutomationIOType.OBJECT,
24
27
  title: "Field settings",
25
28
  },
26
29
  row: {
27
- type: "object",
28
- customType: "row",
30
+ type: AutomationIOType.OBJECT,
31
+ customType: AutomationCustomIOType.ROW,
29
32
  title: "Table",
30
33
  },
31
34
  rowId: {
32
- type: "string",
35
+ type: AutomationIOType.STRING,
33
36
  title: "Row ID",
34
37
  },
35
38
  },
@@ -38,24 +41,24 @@ export const definition: AutomationStepSchema = {
38
41
  outputs: {
39
42
  properties: {
40
43
  row: {
41
- type: "object",
42
- customType: "row",
44
+ type: AutomationIOType.OBJECT,
45
+ customType: AutomationCustomIOType.ROW,
43
46
  description: "The updated row",
44
47
  },
45
48
  response: {
46
- type: "object",
49
+ type: AutomationIOType.OBJECT,
47
50
  description: "The response from the table",
48
51
  },
49
52
  success: {
50
- type: "boolean",
53
+ type: AutomationIOType.BOOLEAN,
51
54
  description: "Whether the action was successful",
52
55
  },
53
56
  id: {
54
- type: "string",
57
+ type: AutomationIOType.STRING,
55
58
  description: "The identifier of the updated row",
56
59
  },
57
60
  revision: {
58
- type: "string",
61
+ type: AutomationIOType.STRING,
59
62
  description: "The revision of the updated row",
60
63
  },
61
64
  },
@@ -4,12 +4,14 @@ import {
4
4
  AutomationActionStepId,
5
5
  AutomationStepSchema,
6
6
  AutomationStepInput,
7
+ AutomationStepType,
8
+ AutomationIOType,
7
9
  } from "@budibase/types"
8
10
 
9
11
  export const definition: AutomationStepSchema = {
10
12
  name: "Zapier Webhook",
11
13
  stepId: AutomationActionStepId.zapier,
12
- type: "ACTION",
14
+ type: AutomationStepType.ACTION,
13
15
  internal: false,
14
16
  description: "Trigger a Zapier Zap via webhooks",
15
17
  tagline: "Trigger a Zapier Zap",
@@ -19,27 +21,27 @@ export const definition: AutomationStepSchema = {
19
21
  inputs: {
20
22
  properties: {
21
23
  url: {
22
- type: "string",
24
+ type: AutomationIOType.STRING,
23
25
  title: "Webhook URL",
24
26
  },
25
27
  value1: {
26
- type: "string",
28
+ type: AutomationIOType.STRING,
27
29
  title: "Payload Value 1",
28
30
  },
29
31
  value2: {
30
- type: "string",
32
+ type: AutomationIOType.STRING,
31
33
  title: "Payload Value 2",
32
34
  },
33
35
  value3: {
34
- type: "string",
36
+ type: AutomationIOType.STRING,
35
37
  title: "Payload Value 3",
36
38
  },
37
39
  value4: {
38
- type: "string",
40
+ type: AutomationIOType.STRING,
39
41
  title: "Payload Value 4",
40
42
  },
41
43
  value5: {
42
- type: "string",
44
+ type: AutomationIOType.STRING,
43
45
  title: "Payload Value 5",
44
46
  },
45
47
  },
@@ -48,11 +50,11 @@ export const definition: AutomationStepSchema = {
48
50
  outputs: {
49
51
  properties: {
50
52
  httpStatus: {
51
- type: "number",
53
+ type: AutomationIOType.NUMBER,
52
54
  description: "The HTTP status code of the request",
53
55
  },
54
56
  response: {
55
- type: "string",
57
+ type: AutomationIOType.STRING,
56
58
  description: "The response from Zapier",
57
59
  },
58
60
  },