@prismatic-io/spectral 7.8.0-preview3 → 7.8.0-preview4
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,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Instance, Customer, DataSourceType, DataSourceResultType, User } from "../types";
|
|
2
|
+
import { Instance, Customer, DataSourceType, DataSourceResultType, User, TriggerEventFunctionReturn } from "../types";
|
|
3
3
|
interface DisplayDefinition {
|
|
4
4
|
label: string;
|
|
5
5
|
description: string;
|
|
@@ -102,7 +102,7 @@ interface TriggerBranchingResult extends TriggerBaseResult {
|
|
|
102
102
|
}
|
|
103
103
|
export declare type TriggerResult = TriggerBranchingResult | TriggerBaseResult | undefined;
|
|
104
104
|
export declare type TriggerPerformFunction = (context: ActionContext, payload: TriggerPayload, params: Record<string, unknown>) => Promise<TriggerResult>;
|
|
105
|
-
export declare type TriggerEventFunction = (context: ActionContext, params: Record<string, unknown>) => Promise<void>;
|
|
105
|
+
export declare type TriggerEventFunction = (context: ActionContext, params: Record<string, unknown>) => Promise<void | TriggerEventFunctionReturn>;
|
|
106
106
|
export interface Trigger {
|
|
107
107
|
key: string;
|
|
108
108
|
display: DisplayDefinition & {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { Inputs, ActionContext, ActionInputParameters } from ".";
|
|
2
|
+
export declare type TriggerEventFunctionReturn = {
|
|
3
|
+
/** An optional object, the keys and values of which will be persisted in the flow-specific instanceState and available for subsequent actions and executions */
|
|
4
|
+
instanceState?: Record<string, unknown>;
|
|
5
|
+
/** An optional object, the keys and values of which will be persisted in the crossFlowState and available in any flow for subsequent actions and executions */
|
|
6
|
+
crossFlowState?: Record<string, unknown>;
|
|
7
|
+
/** An optional object, the keys and values of which will be persisted in the executionState and available for the duration of the execution */
|
|
8
|
+
executionState?: Record<string, unknown>;
|
|
9
|
+
/** An optional object, the keys and values of which will be persisted in the integrationState and available in any flow of an Instance for any version of an Integration for subsequent actions and executions */
|
|
10
|
+
integrationState?: Record<string, unknown>;
|
|
11
|
+
};
|
|
2
12
|
/** Definition of the function to execute when a Trigger Event occurs. */
|
|
3
|
-
export declare type TriggerEventFunction<TInputs extends Inputs> = (context: ActionContext, params: ActionInputParameters<TInputs>) => Promise<void>;
|
|
13
|
+
export declare type TriggerEventFunction<TInputs extends Inputs> = (context: ActionContext, params: ActionInputParameters<TInputs>) => Promise<void | TriggerEventFunctionReturn>;
|