@budibase/types 2.29.24 → 2.29.26

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.
@@ -8,8 +8,12 @@ export interface UpdateRowActionRequest extends RowActionData {
8
8
  export interface RowActionResponse extends RowActionData {
9
9
  id: string;
10
10
  tableId: string;
11
+ automationId: string;
11
12
  }
12
13
  export interface RowActionsResponse {
13
14
  actions: Record<string, RowActionResponse>;
14
15
  }
16
+ export interface RowActionTriggerRequest {
17
+ rowId: string;
18
+ }
15
19
  export {};
@@ -1,3 +1,22 @@
1
1
  import { DocumentDestroyResponse } from "@budibase/nano";
2
+ import { Automation } from "../../documents";
2
3
  export interface DeleteAutomationResponse extends DocumentDestroyResponse {
3
4
  }
5
+ export interface AutomationBuilderData {
6
+ displayName: string;
7
+ triggerInfo?: {
8
+ type: string;
9
+ table: {
10
+ id: string;
11
+ name: string;
12
+ };
13
+ rowAction: {
14
+ id: string;
15
+ name: string;
16
+ };
17
+ };
18
+ }
19
+ export interface FetchAutomationResponse {
20
+ automations: Automation[];
21
+ builderData?: Record<string, AutomationBuilderData>;
22
+ }
@@ -41,7 +41,8 @@ export declare enum AutomationTriggerStepId {
41
41
  ROW_DELETED = "ROW_DELETED",
42
42
  WEBHOOK = "WEBHOOK",
43
43
  APP = "APP",
44
- CRON = "CRON"
44
+ CRON = "CRON",
45
+ ROW_ACTION = "ROW_ACTION"
45
46
  }
46
47
  export declare enum AutomationStepType {
47
48
  LOGIC = "LOGIC",
@@ -131,6 +132,7 @@ interface BaseIOStructure {
131
132
  [key: string]: BaseIOStructure;
132
133
  };
133
134
  required?: string[];
135
+ readonly?: true;
134
136
  }
135
137
  export interface InputOutputBlock {
136
138
  properties: {
@@ -149,9 +151,7 @@ export interface AutomationStepSchema {
149
151
  deprecated?: boolean;
150
152
  stepId: AutomationTriggerStepId | AutomationActionStepId;
151
153
  blockToLoop?: string;
152
- inputs: {
153
- [key: string]: any;
154
- };
154
+ inputs: Record<string, any>;
155
155
  schema: {
156
156
  inputs: InputOutputBlock;
157
157
  outputs: InputOutputBlock;
@@ -166,6 +166,7 @@ export interface AutomationStep extends AutomationStepSchema {
166
166
  id: string;
167
167
  }
168
168
  export interface AutomationTriggerSchema extends AutomationStepSchema {
169
+ type: AutomationStepType.TRIGGER;
169
170
  event?: string;
170
171
  cronJobId?: string;
171
172
  }
@@ -236,7 +237,8 @@ export declare enum AutomationEventType {
236
237
  ROW_DELETE = "row:delete",
237
238
  APP_TRIGGER = "app:trigger",
238
239
  CRON_TRIGGER = "cron:trigger",
239
- WEBHOOK_TRIGGER = "web:trigger"
240
+ WEBHOOK_TRIGGER = "web:trigger",
241
+ ROW_ACTION = "row:action"
240
242
  }
241
243
  export type UpdatedRowEventEmitter = {
242
244
  row: Row;
@@ -3,5 +3,6 @@ export interface TableRowActions extends Document {
3
3
  _id: string;
4
4
  actions: Record<string, {
5
5
  name: string;
6
+ automationId: string;
6
7
  }>;
7
8
  }
@@ -11,6 +11,8 @@ export interface PlatformUserByEmail extends Document {
11
11
  */
12
12
  export interface PlatformUserById extends Document {
13
13
  tenantId: string;
14
+ email?: string;
15
+ ssoId?: string;
14
16
  }
15
17
  /**
16
18
  * doc id is a unique SSO provider ID for the user
@@ -19,5 +21,6 @@ export interface PlatformUserBySsoId extends Document {
19
21
  tenantId: string;
20
22
  userId: string;
21
23
  email: string;
24
+ ssoId?: string;
22
25
  }
23
26
  export type PlatformUser = PlatformUserByEmail | PlatformUserById | PlatformUserBySsoId;
package/dist/index.js CHANGED
@@ -888,6 +888,7 @@ var AutomationTriggerStepId = /* @__PURE__ */ ((AutomationTriggerStepId2) => {
888
888
  AutomationTriggerStepId2["WEBHOOK"] = "WEBHOOK";
889
889
  AutomationTriggerStepId2["APP"] = "APP";
890
890
  AutomationTriggerStepId2["CRON"] = "CRON";
891
+ AutomationTriggerStepId2["ROW_ACTION"] = "ROW_ACTION";
891
892
  return AutomationTriggerStepId2;
892
893
  })(AutomationTriggerStepId || {});
893
894
  var AutomationStepType = /* @__PURE__ */ ((AutomationStepType2) => {
@@ -950,6 +951,7 @@ var AutomationEventType = /* @__PURE__ */ ((AutomationEventType2) => {
950
951
  AutomationEventType2["APP_TRIGGER"] = "app:trigger";
951
952
  AutomationEventType2["CRON_TRIGGER"] = "cron:trigger";
952
953
  AutomationEventType2["WEBHOOK_TRIGGER"] = "web:trigger";
954
+ AutomationEventType2["ROW_ACTION"] = "row:action";
953
955
  return AutomationEventType2;
954
956
  })(AutomationEventType || {});
955
957