@activepieces/shared 0.4.0 → 0.5.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/package.json +1 -1
- package/src/lib/common/utils/assertions.d.ts +2 -0
- package/src/lib/common/utils/assertions.js +14 -0
- package/src/lib/common/utils/assertions.js.map +1 -0
- package/src/lib/common/utils/index.d.ts +1 -0
- package/src/lib/common/utils/index.js +1 -0
- package/src/lib/common/utils/index.js.map +1 -1
- package/src/lib/engine/engine-operation.d.ts +3 -0
- package/src/lib/engine/engine-operation.js.map +1 -1
- package/src/lib/flow-run/execution/execution-output.d.ts +6 -2
- package/src/lib/flow-run/execution/execution-output.js +1 -0
- package/src/lib/flow-run/execution/execution-output.js.map +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNotUndefined = exports.assertNotNullOrUndefined = void 0;
|
|
4
|
+
function assertNotNullOrUndefined(value, fieldName) {
|
|
5
|
+
if (value === null || value === undefined) {
|
|
6
|
+
throw new Error(`${fieldName} is null or undefined`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.assertNotNullOrUndefined = assertNotNullOrUndefined;
|
|
10
|
+
const isNotUndefined = (value) => {
|
|
11
|
+
return value !== undefined;
|
|
12
|
+
};
|
|
13
|
+
exports.isNotUndefined = isNotUndefined;
|
|
14
|
+
//# sourceMappingURL=assertions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertions.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/common/utils/assertions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,wBAAwB,CACpC,KAA2B,EAC3B,SAAiB;IAEjB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,uBAAuB,CAAC,CAAC;KACxD;AACL,CAAC;AAPD,4DAOC;AAEM,MAAM,cAAc,GAAG,CAAI,KAAoB,EAAc,EAAE;IAClE,OAAO,KAAK,KAAK,SAAS,CAAC;AAC/B,CAAC,CAAA;AAFY,QAAA,cAAc,kBAE1B"}
|
|
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./object-utils"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./utils"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./assertions"), exports);
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/common/utils/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,kDAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/common/utils/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,kDAAuB;AACvB,uDAA4B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ResumeStepMetadata } from "../flow-run/execution/execution-output";
|
|
2
2
|
import { ExecutionState } from "../flow-run/execution/execution-state";
|
|
3
3
|
import { ExecutionType } from "../flow-run/execution/execution-type";
|
|
4
|
+
import { FlowRunId } from "../flow-run/flow-run";
|
|
4
5
|
import { FlowVersion, FlowVersionId } from "../flows/flow-version";
|
|
5
6
|
import { ProjectId } from "../project/project";
|
|
6
7
|
export declare enum EngineOperationType {
|
|
@@ -50,6 +51,7 @@ export interface ExecutePropsOptions {
|
|
|
50
51
|
}
|
|
51
52
|
type BaseExecuteFlowOperation<T extends ExecutionType> = {
|
|
52
53
|
flowVersionId: FlowVersionId;
|
|
54
|
+
flowRunId: FlowRunId;
|
|
53
55
|
projectId: ProjectId;
|
|
54
56
|
triggerPayload: unknown;
|
|
55
57
|
executionType: T;
|
|
@@ -60,6 +62,7 @@ export type BeginExecuteFlowOperation = BaseExecuteFlowOperation<ExecutionType.B
|
|
|
60
62
|
export type ResumeExecuteFlowOperation = BaseExecuteFlowOperation<ExecutionType.RESUME> & {
|
|
61
63
|
executionState: ExecutionState;
|
|
62
64
|
resumeStepMetadata: ResumeStepMetadata;
|
|
65
|
+
resumePayload: unknown;
|
|
63
66
|
};
|
|
64
67
|
export type ExecuteFlowOperation = BeginExecuteFlowOperation | ResumeExecuteFlowOperation;
|
|
65
68
|
export interface ExecuteTriggerOperation<HT extends TriggerHookType> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-operation.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/engine/engine-operation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"engine-operation.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/engine/engine-operation.ts"],"names":[],"mappings":";;;AAOA,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC3B,wEAAiD,CAAA;IACjD,wDAAiC,CAAA;IACjC,oDAA6B,CAAA;IAC7B,oDAA6B,CAAA;IAC7B,4DAAqC,CAAA;IACrC,oEAA6C,CAAA;AACjD,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAuGA,CAAC;AAmCF,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,uCAAe,CAAA;IACf,2CAAmB,CAAA;AACvB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"}
|
|
@@ -36,7 +36,8 @@ export type BranchResumeStepMetadata = BaseResumeStepMetadata<ActionType.BRANCH>
|
|
|
36
36
|
type NormalResumeStepMetadata = BaseResumeStepMetadata<Exclude<ActionType, ActionType.BRANCH | ActionType.LOOP_ON_ITEMS>>;
|
|
37
37
|
export type ResumeStepMetadata = NormalResumeStepMetadata | BranchResumeStepMetadata | LoopResumeStepMetadata;
|
|
38
38
|
export declare enum PauseType {
|
|
39
|
-
DELAY = "DELAY"
|
|
39
|
+
DELAY = "DELAY",
|
|
40
|
+
WEBHOOK = "WEBHOOK"
|
|
40
41
|
}
|
|
41
42
|
type BasePauseMetadata<T extends PauseType> = {
|
|
42
43
|
type: T;
|
|
@@ -45,7 +46,10 @@ type BasePauseMetadata<T extends PauseType> = {
|
|
|
45
46
|
export type DelayPauseMetadata = BasePauseMetadata<PauseType.DELAY> & {
|
|
46
47
|
resumeDateTime: string;
|
|
47
48
|
};
|
|
48
|
-
export type
|
|
49
|
+
export type WebhookPauseMetadata = BasePauseMetadata<PauseType.WEBHOOK> & {
|
|
50
|
+
actions: string[];
|
|
51
|
+
};
|
|
52
|
+
export type PauseMetadata = DelayPauseMetadata | WebhookPauseMetadata;
|
|
49
53
|
export type PauseExecutionOutput = BaseExecutionOutput<ExecutionOutputStatus.PAUSED> & {
|
|
50
54
|
pauseMetadata: PauseMetadata;
|
|
51
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-output.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flow-run/execution/execution-output.ts"],"names":[],"mappings":";;;AAIA,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,0DAAiC,CAAA;IACjC,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,4CAAmB,CAAA;AACrB,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC;AAyCD,IAAY,
|
|
1
|
+
{"version":3,"file":"execution-output.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flow-run/execution/execution-output.ts"],"names":[],"mappings":";;;AAIA,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,0DAAiC,CAAA;IACjC,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,4CAAmB,CAAA;AACrB,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC;AAyCD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,gCAAmB,CAAA;AACrB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
|