@budibase/types 3.7.4 → 3.8.0
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/documents/app/automation/StepInputsOutputs.d.ts +1 -0
- package/dist/documents/app/automation/automation.d.ts +5 -6
- package/dist/documents/app/automation/schema.d.ts +10 -4
- package/dist/index.js +12 -12
- package/dist/index.js.map +4 -4
- package/dist/sdk/featureFlag.d.ts +0 -1
- package/dist/sdk/licensing/feature.d.ts +2 -1
- package/dist/ui/stores/automations.d.ts +15 -4
- package/package.json +2 -2
|
@@ -126,18 +126,17 @@ export interface BaseIOStructure {
|
|
|
126
126
|
dependsOn?: string;
|
|
127
127
|
enum?: string[];
|
|
128
128
|
pretty?: string[];
|
|
129
|
-
properties?:
|
|
130
|
-
[key: string]: BaseIOStructure;
|
|
131
|
-
};
|
|
129
|
+
properties?: AutomationIOProps;
|
|
132
130
|
required?: string[];
|
|
133
131
|
readonly?: true;
|
|
134
132
|
}
|
|
135
133
|
export interface InputOutputBlock {
|
|
136
|
-
properties:
|
|
137
|
-
[key: string]: BaseIOStructure;
|
|
138
|
-
};
|
|
134
|
+
properties: AutomationIOProps;
|
|
139
135
|
required?: string[];
|
|
140
136
|
}
|
|
137
|
+
export interface AutomationIOProps {
|
|
138
|
+
[key: string]: BaseIOStructure;
|
|
139
|
+
}
|
|
141
140
|
export declare enum AutomationFeature {
|
|
142
141
|
LOOPING = "LOOPING"
|
|
143
142
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hosting } from "../../../sdk";
|
|
2
|
-
import { AutomationActionStepId, ActionImplementation, AutomationStepType, AutomationFeature, InputOutputBlock, AutomationTriggerStepId, AutomationEventType } from "./automation";
|
|
3
|
-
import { CollectStepInputs, CollectStepOutputs, CreateRowStepInputs, CreateRowStepOutputs, DelayStepInputs, DelayStepOutputs, DeleteRowStepInputs, DeleteRowStepOutputs, ExecuteQueryStepInputs, ExecuteQueryStepOutputs, ExecuteScriptStepInputs, ExecuteScriptStepOutputs, FilterStepInputs, FilterStepOutputs, QueryRowsStepInputs, QueryRowsStepOutputs, SmtpEmailStepInputs, ServerLogStepInputs, ServerLogStepOutputs, TriggerAutomationStepInputs, TriggerAutomationStepOutputs, UpdateRowStepInputs, UpdateRowStepOutputs, OutgoingWebhookStepInputs, ExternalAppStepOutputs, DiscordStepInputs, SlackStepInputs, ZapierStepInputs, ZapierStepOutputs, MakeIntegrationInputs, n8nStepInputs, BashStepInputs, BashStepOutputs, OpenAIStepInputs, OpenAIStepOutputs, LoopStepInputs, CronTriggerInputs, RowUpdatedTriggerInputs, RowCreatedTriggerInputs, RowDeletedTriggerInputs, BranchStepInputs, BaseAutomationOutputs, AppActionTriggerOutputs, CronTriggerOutputs, RowDeletedTriggerOutputs, RowCreatedTriggerOutputs, RowUpdatedTriggerOutputs, WebhookTriggerOutputs } from "./StepInputsOutputs";
|
|
2
|
+
import { AutomationActionStepId, ActionImplementation, AutomationStepType, AutomationFeature, InputOutputBlock, AutomationTriggerStepId, AutomationEventType, AutomationIOType } from "./automation";
|
|
3
|
+
import { CollectStepInputs, CollectStepOutputs, CreateRowStepInputs, CreateRowStepOutputs, DelayStepInputs, DelayStepOutputs, DeleteRowStepInputs, DeleteRowStepOutputs, ExecuteQueryStepInputs, ExecuteQueryStepOutputs, ExecuteScriptStepInputs, ExecuteScriptStepOutputs, FilterStepInputs, FilterStepOutputs, QueryRowsStepInputs, QueryRowsStepOutputs, SmtpEmailStepInputs, ServerLogStepInputs, ServerLogStepOutputs, TriggerAutomationStepInputs, TriggerAutomationStepOutputs, UpdateRowStepInputs, UpdateRowStepOutputs, OutgoingWebhookStepInputs, ExternalAppStepOutputs, DiscordStepInputs, SlackStepInputs, ZapierStepInputs, ZapierStepOutputs, MakeIntegrationInputs, n8nStepInputs, BashStepInputs, BashStepOutputs, OpenAIStepInputs, OpenAIStepOutputs, LoopStepInputs, CronTriggerInputs, RowUpdatedTriggerInputs, RowCreatedTriggerInputs, RowDeletedTriggerInputs, BranchStepInputs, BaseAutomationOutputs, AppActionTriggerOutputs, CronTriggerOutputs, RowDeletedTriggerOutputs, RowCreatedTriggerOutputs, RowUpdatedTriggerOutputs, WebhookTriggerOutputs, RowActionTriggerInputs } from "./StepInputsOutputs";
|
|
4
4
|
export type ActionImplementations<T extends Hosting> = {
|
|
5
5
|
[AutomationActionStepId.COLLECT]: ActionImplementation<CollectStepInputs, CollectStepOutputs>;
|
|
6
6
|
[AutomationActionStepId.CREATE_ROW]: ActionImplementation<CreateRowStepInputs, CreateRowStepOutputs>;
|
|
@@ -80,6 +80,10 @@ export declare function isTrigger(step: AutomationStep | AutomationTrigger): ste
|
|
|
80
80
|
export declare function isRowUpdateTrigger(step: AutomationStep | AutomationTrigger): step is RowUpdatedTrigger;
|
|
81
81
|
export declare function isRowSaveTrigger(step: AutomationStep | AutomationTrigger): step is RowSavedTrigger;
|
|
82
82
|
export declare function isAppTrigger(step: AutomationStep | AutomationTrigger): step is AppActionTrigger;
|
|
83
|
+
export declare function isFilterStep(step: AutomationStep | AutomationTrigger): step is FilterStep;
|
|
84
|
+
export declare function isLoopStep(step: AutomationStep | AutomationTrigger): step is LoopStep;
|
|
85
|
+
export declare function isActionStep(step: AutomationStep | AutomationTrigger): step is AutomationStep;
|
|
86
|
+
export declare function isCronTrigger(trigger: AutomationStep | AutomationTrigger): trigger is CronTrigger;
|
|
83
87
|
type EmptyInputs = {};
|
|
84
88
|
export type AutomationStepDefinition = Omit<AutomationStep, "id" | "inputs"> & {
|
|
85
89
|
inputs: EmptyInputs;
|
|
@@ -89,7 +93,9 @@ export type AutomationTriggerDefinition = Omit<AutomationTrigger, "id" | "inputs
|
|
|
89
93
|
inputs: EmptyInputs;
|
|
90
94
|
deprecated?: boolean;
|
|
91
95
|
};
|
|
92
|
-
export type AutomationTriggerInputs<T extends AutomationTriggerStepId> = T extends AutomationTriggerStepId.APP ? void | Record<string, any>
|
|
96
|
+
export type AutomationTriggerInputs<T extends AutomationTriggerStepId> = T extends AutomationTriggerStepId.APP ? void | (Record<string, any> & {
|
|
97
|
+
fields?: Record<string, AutomationIOType>;
|
|
98
|
+
}) : T extends AutomationTriggerStepId.CRON ? CronTriggerInputs : T extends AutomationTriggerStepId.ROW_ACTION ? RowActionTriggerInputs : T extends AutomationTriggerStepId.ROW_DELETED ? RowDeletedTriggerInputs : T extends AutomationTriggerStepId.ROW_SAVED ? RowCreatedTriggerInputs : T extends AutomationTriggerStepId.ROW_UPDATED ? RowUpdatedTriggerInputs : T extends AutomationTriggerStepId.WEBHOOK ? Record<string, any> : never;
|
|
93
99
|
export type AutomationTriggerOutputs<T extends AutomationTriggerStepId> = T extends AutomationTriggerStepId.APP ? AppActionTriggerOutputs : T extends AutomationTriggerStepId.CRON ? CronTriggerOutputs : T extends AutomationTriggerStepId.ROW_ACTION ? Record<string, any> : T extends AutomationTriggerStepId.ROW_DELETED ? RowDeletedTriggerOutputs : T extends AutomationTriggerStepId.ROW_SAVED ? RowCreatedTriggerOutputs : T extends AutomationTriggerStepId.ROW_UPDATED ? RowUpdatedTriggerOutputs : T extends AutomationTriggerStepId.WEBHOOK ? WebhookTriggerOutputs : never;
|
|
94
100
|
export interface AutomationTriggerSchema<TTrigger extends AutomationTriggerStepId> extends AutomationStepSchemaBase {
|
|
95
101
|
id: string;
|
|
@@ -97,7 +103,7 @@ export interface AutomationTriggerSchema<TTrigger extends AutomationTriggerStepI
|
|
|
97
103
|
event?: AutomationEventType;
|
|
98
104
|
cronJobId?: string;
|
|
99
105
|
stepId: TTrigger;
|
|
100
|
-
inputs: AutomationTriggerInputs<
|
|
106
|
+
inputs: AutomationTriggerInputs<AutomationTriggerStepId>;
|
|
101
107
|
}
|
|
102
108
|
export type AutomationTrigger = AppActionTrigger | CronTrigger | RowActionTrigger | RowDeletedTrigger | RowSavedTrigger | RowUpdatedTrigger | WebhookTrigger;
|
|
103
109
|
export type AppActionTrigger = AutomationTriggerSchema<AutomationTriggerStepId.APP>;
|