@activepieces/shared 0.9.0 → 0.10.1
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/activepieces-error.d.ts +12 -5
- package/src/lib/common/activepieces-error.js +2 -1
- package/src/lib/common/activepieces-error.js.map +1 -1
- package/src/lib/common/telemetry.d.ts +42 -2
- package/src/lib/common/telemetry.js +8 -1
- package/src/lib/common/telemetry.js.map +1 -1
- package/src/lib/engine/engine-operation.d.ts +7 -11
- package/src/lib/engine/engine-operation.js.map +1 -1
- package/src/lib/file/file-type.d.ts +2 -1
- package/src/lib/file/file-type.js +1 -0
- package/src/lib/file/file-type.js.map +1 -1
- package/src/lib/flag/flag.d.ts +5 -1
- package/src/lib/flag/flag.js +4 -0
- package/src/lib/flag/flag.js.map +1 -1
- package/src/lib/flow-run/execution/execution-output.d.ts +1 -0
- package/src/lib/flow-run/execution/execution-output.js +1 -0
- package/src/lib/flow-run/execution/execution-output.js.map +1 -1
- package/src/lib/flow-run/execution/step-output.d.ts +0 -3
- package/src/lib/flow-run/execution/step-output.js.map +1 -1
- package/src/lib/flows/actions/action.d.ts +14 -26
- package/src/lib/flows/actions/action.js +5 -8
- package/src/lib/flows/actions/action.js.map +1 -1
- package/src/lib/flows/dto/flow-template-request.d.ts +6 -0
- package/src/lib/flows/flow-helper.js +0 -5
- package/src/lib/flows/flow-helper.js.map +1 -1
- package/src/lib/flows/flow-operations.d.ts +42 -72
- package/src/lib/flows/flow-operations.js +1 -1
- package/src/lib/flows/flow-operations.js.map +1 -1
- package/src/lib/flows/flow-version.d.ts +3 -0
- package/src/lib/flows/flow.d.ts +3 -0
- package/src/lib/flows/triggers/trigger.d.ts +10 -0
- package/src/lib/flows/triggers/trigger.js +4 -0
- package/src/lib/flows/triggers/trigger.js.map +1 -1
- package/src/lib/pieces/dto/piece-requests.d.ts +12 -3
- package/src/lib/pieces/dto/piece-requests.js +13 -3
- package/src/lib/pieces/dto/piece-requests.js.map +1 -1
- package/src/lib/pieces/index.d.ts +1 -0
- package/src/lib/pieces/index.js +1 -0
- package/src/lib/pieces/index.js.map +1 -1
- package/src/lib/pieces/piece.d.ts +18 -0
- package/src/lib/pieces/piece.js +14 -0
- package/src/lib/pieces/piece.js.map +1 -0
- package/src/lib/pieces/utils.d.ts +17 -4
- package/src/lib/pieces/utils.js +23 -5
- package/src/lib/pieces/utils.js.map +1 -1
- package/src/lib/user/user.d.ts +2 -1
- package/src/lib/user/user.js +1 -0
- package/src/lib/user/user.js.map +1 -1
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export declare class ActivepiecesError extends Error {
|
|
|
9
9
|
error: ErrorParams;
|
|
10
10
|
constructor(error: ErrorParams, message?: string);
|
|
11
11
|
}
|
|
12
|
-
type ErrorParams = AppConnectionNotFoundErrorParams | AuthorizationErrorParams | ConfigNotFoundErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowInstanceNotFoundErrorParams | FlowNotFoundErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | FlowVersionNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | ProjectNotFoundErrorParams | StepNotFoundErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams |
|
|
12
|
+
type ErrorParams = AppConnectionNotFoundErrorParams | AuthorizationErrorParams | PermissionDeniedErrorParams | ConfigNotFoundErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowInstanceNotFoundErrorParams | FlowNotFoundErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | FlowVersionNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | ProjectNotFoundErrorParams | StepNotFoundErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | QuotaExceededParams | TestTriggerFailedErrorParams | TriggerDisableErrorParams | TriggerEnableErrorParams | TriggerFailedErrorParams | ValidationErrorParams;
|
|
13
13
|
export interface BaseErrorParams<T, V> {
|
|
14
14
|
code: T;
|
|
15
15
|
params: V;
|
|
@@ -30,6 +30,11 @@ export type AppConnectionNotFoundErrorParams = BaseErrorParams<ErrorCode.APP_CON
|
|
|
30
30
|
id: AppConnectionId;
|
|
31
31
|
}>;
|
|
32
32
|
export type AuthorizationErrorParams = BaseErrorParams<ErrorCode.AUTHORIZATION, Record<string, never>>;
|
|
33
|
+
export type PermissionDeniedErrorParams = BaseErrorParams<ErrorCode.PERMISSION_DENIED, {
|
|
34
|
+
resource: string;
|
|
35
|
+
action: string;
|
|
36
|
+
projectId: string;
|
|
37
|
+
}>;
|
|
33
38
|
export type SystemInvalidErrorParams = BaseErrorParams<ErrorCode.SYSTEM_PROP_INVALID, {
|
|
34
39
|
prop: string;
|
|
35
40
|
}>;
|
|
@@ -91,9 +96,6 @@ export type FlowOperationErrorParams = BaseErrorParams<ErrorCode.FLOW_OPERATION_
|
|
|
91
96
|
export type InvalidJwtTokenErrorParams = BaseErrorParams<ErrorCode.INVALID_OR_EXPIRED_JWT_TOKEN, {
|
|
92
97
|
token: string;
|
|
93
98
|
}>;
|
|
94
|
-
export type TaskQuotaExceededErrorParams = BaseErrorParams<ErrorCode.TASK_QUOTA_EXCEEDED, {
|
|
95
|
-
projectId: string;
|
|
96
|
-
}>;
|
|
97
99
|
export type TestTriggerFailedErrorParams = BaseErrorParams<ErrorCode.TEST_TRIGGER_FAILED, {
|
|
98
100
|
message: string;
|
|
99
101
|
}>;
|
|
@@ -118,9 +120,15 @@ export type EngineOperationFailureParams = BaseErrorParams<ErrorCode.ENGINE_OPER
|
|
|
118
120
|
export type InvalidAppConnectionParams = BaseErrorParams<ErrorCode.INVALID_APP_CONNECTION, {
|
|
119
121
|
error: string;
|
|
120
122
|
}>;
|
|
123
|
+
export type QuotaExceededParams = BaseErrorParams<ErrorCode.QUOTA_EXCEEDED, {
|
|
124
|
+
metric: 'connections' | 'tasks' | 'bots' | 'datasource' | 'team-members';
|
|
125
|
+
quota: number;
|
|
126
|
+
}>;
|
|
121
127
|
export declare enum ErrorCode {
|
|
122
128
|
APP_CONNECTION_NOT_FOUND = "APP_CONNECTION_NOT_FOUND",
|
|
129
|
+
QUOTA_EXCEEDED = "QUOTA_EXCEEDED",
|
|
123
130
|
AUTHORIZATION = "AUTHORIZATION",
|
|
131
|
+
PERMISSION_DENIED = "PERMISSION_DENIED",
|
|
124
132
|
CONFIG_NOT_FOUND = "CONFIG_NOT_FOUND",
|
|
125
133
|
ENGINE_OPERATION_FAILURE = "ENGINE_OPERATION_FAILURE",
|
|
126
134
|
ENTITY_NOT_FOUND = "ENTITY_NOT_FOUND",
|
|
@@ -148,7 +156,6 @@ export declare enum ErrorCode {
|
|
|
148
156
|
STEP_NOT_FOUND = "STEP_NOT_FOUND",
|
|
149
157
|
SYSTEM_PROP_INVALID = "SYSTEM_PROP_INVALID",
|
|
150
158
|
SYSTEM_PROP_NOT_DEFINED = "SYSTEM_PROP_NOT_DEFINED",
|
|
151
|
-
TASK_QUOTA_EXCEEDED = "TASK_QUOTA_EXCEEDED",
|
|
152
159
|
TEST_TRIGGER_FAILED = "TEST_TRIGGER_FAILED",
|
|
153
160
|
TRIGGER_DISABLE = "TRIGGER_DISABLE",
|
|
154
161
|
TRIGGER_ENABLE = "TRIGGER_ENABLE",
|
|
@@ -11,7 +11,9 @@ exports.ActivepiecesError = ActivepiecesError;
|
|
|
11
11
|
var ErrorCode;
|
|
12
12
|
(function (ErrorCode) {
|
|
13
13
|
ErrorCode["APP_CONNECTION_NOT_FOUND"] = "APP_CONNECTION_NOT_FOUND";
|
|
14
|
+
ErrorCode["QUOTA_EXCEEDED"] = "QUOTA_EXCEEDED";
|
|
14
15
|
ErrorCode["AUTHORIZATION"] = "AUTHORIZATION";
|
|
16
|
+
ErrorCode["PERMISSION_DENIED"] = "PERMISSION_DENIED";
|
|
15
17
|
ErrorCode["CONFIG_NOT_FOUND"] = "CONFIG_NOT_FOUND";
|
|
16
18
|
ErrorCode["ENGINE_OPERATION_FAILURE"] = "ENGINE_OPERATION_FAILURE";
|
|
17
19
|
ErrorCode["ENTITY_NOT_FOUND"] = "ENTITY_NOT_FOUND";
|
|
@@ -39,7 +41,6 @@ var ErrorCode;
|
|
|
39
41
|
ErrorCode["STEP_NOT_FOUND"] = "STEP_NOT_FOUND";
|
|
40
42
|
ErrorCode["SYSTEM_PROP_INVALID"] = "SYSTEM_PROP_INVALID";
|
|
41
43
|
ErrorCode["SYSTEM_PROP_NOT_DEFINED"] = "SYSTEM_PROP_NOT_DEFINED";
|
|
42
|
-
ErrorCode["TASK_QUOTA_EXCEEDED"] = "TASK_QUOTA_EXCEEDED";
|
|
43
44
|
ErrorCode["TEST_TRIGGER_FAILED"] = "TEST_TRIGGER_FAILED";
|
|
44
45
|
ErrorCode["TRIGGER_DISABLE"] = "TRIGGER_DISABLE";
|
|
45
46
|
ErrorCode["TRIGGER_ENABLE"] = "TRIGGER_ENABLE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAQA,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,KAAkB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QADnC,UAAK,GAAL,KAAK,CAAa;IAErC,CAAC;CACF;AAJD,8CAIC;
|
|
1
|
+
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAQA,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,KAAkB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QADnC,UAAK,GAAL,KAAK,CAAa;IAErC,CAAC;CACF;AAJD,8CAIC;AAuRD,IAAY,SAqCX;AArCD,WAAY,SAAS;IACnB,kEAAqD,CAAA;IACrD,8CAAiC,CAAA;IACjC,4CAA+B,CAAA;IAC/B,oDAAuC,CAAA;IACvC,kDAAqC,CAAA;IACrC,kEAAqD,CAAA;IACrD,kDAAqC,CAAA;IACrC,oDAAuC,CAAA;IACvC,4CAA+B,CAAA;IAC/B,8CAAiC,CAAA;IACjC,2DAA8C,CAAA;IAC9C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,sDAAyC,CAAA;IACzC,8DAAiD,CAAA;IACjD,gDAAmC,CAAA;IACnC,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,0EAA6D,CAAA;IAC7D,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,gDAAmC,CAAA;IACnC,gEAAmD,CAAA;IACnD,oDAAuC,CAAA;IACvC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,gEAAmD,CAAA;IACnD,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,sCAAyB,CAAA;AAC3B,CAAC,EArCW,SAAS,yBAAT,SAAS,QAqCpB"}
|
|
@@ -8,6 +8,20 @@ interface ChatbotCreated {
|
|
|
8
8
|
interface FlowCreated {
|
|
9
9
|
flowId: FlowId;
|
|
10
10
|
}
|
|
11
|
+
interface PiecesSearch {
|
|
12
|
+
target: 'steps' | 'triggers';
|
|
13
|
+
search: string;
|
|
14
|
+
}
|
|
15
|
+
interface FlowImported {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
location: string;
|
|
19
|
+
}
|
|
20
|
+
interface TemplateSearch {
|
|
21
|
+
search: string;
|
|
22
|
+
tags: string[];
|
|
23
|
+
pieces: string[];
|
|
24
|
+
}
|
|
11
25
|
interface RunCreated {
|
|
12
26
|
projectId: ProjectId;
|
|
13
27
|
flowId: FlowId;
|
|
@@ -23,20 +37,46 @@ interface SignedUp {
|
|
|
23
37
|
lastName: string;
|
|
24
38
|
projectId: ProjectId;
|
|
25
39
|
}
|
|
40
|
+
interface QuotaAlert {
|
|
41
|
+
percentageUsed: number;
|
|
42
|
+
}
|
|
26
43
|
interface FlowImported {
|
|
27
44
|
id: string;
|
|
28
45
|
name: string;
|
|
29
46
|
location: string;
|
|
30
47
|
tab?: string;
|
|
31
48
|
}
|
|
49
|
+
interface UpgradeClicked {
|
|
50
|
+
limit?: 'team' | 'connections';
|
|
51
|
+
}
|
|
52
|
+
interface UpgradePopup {
|
|
53
|
+
limit?: 'team' | 'connections';
|
|
54
|
+
}
|
|
55
|
+
interface ReferralLinkCopied {
|
|
56
|
+
userId: UserId;
|
|
57
|
+
}
|
|
58
|
+
interface Referral {
|
|
59
|
+
referredUserId: UserId;
|
|
60
|
+
}
|
|
61
|
+
interface FlowShared {
|
|
62
|
+
flowId: FlowId;
|
|
63
|
+
projectId: ProjectId;
|
|
64
|
+
}
|
|
32
65
|
export declare enum TelemetryEventName {
|
|
33
66
|
SIGNED_UP = "signed.up",
|
|
67
|
+
QUOTA_ALERT = "quota.alert",
|
|
68
|
+
UPGRADE_CLICKED = "upgrade.clicked",
|
|
69
|
+
UPGRADE_POPUP = "upgrade.popup",
|
|
34
70
|
CHATBOT_CREATED = "chatbot.created",
|
|
35
71
|
FLOW_CREATED = "flow.created",
|
|
36
72
|
DEMO_IMPORTED = "demo.imported",
|
|
37
|
-
FLOW_IMPORTED = "flow.imported",
|
|
38
73
|
FLOW_RUN_CREATED = "run.created",
|
|
39
74
|
FLOW_PUBLISHED = "flow.published",
|
|
75
|
+
FLOW_IMPORTED = "flow.imported",
|
|
76
|
+
PIECES_SEARCH = "pieces.search",
|
|
77
|
+
REFERRAL = "referral",
|
|
78
|
+
REFERRAL_LINK_COPIED = "referral.link.copied",
|
|
79
|
+
FLOW_SHARED = "flow.shared",
|
|
40
80
|
FEATURED_TAB_VIEWED = "template.featured-tab-viewed",
|
|
41
81
|
TEMPLATE_SEARCH = "template.search"
|
|
42
82
|
}
|
|
@@ -52,5 +92,5 @@ interface BaseTelemetryEvent<T, P> {
|
|
|
52
92
|
name: T;
|
|
53
93
|
payload: P;
|
|
54
94
|
}
|
|
55
|
-
export type TelemetryEvent = BaseTelemetryEvent<TelemetryEventName.SIGNED_UP, SignedUp> | BaseTelemetryEvent<TelemetryEventName.
|
|
95
|
+
export type TelemetryEvent = BaseTelemetryEvent<TelemetryEventName.SIGNED_UP, SignedUp> | BaseTelemetryEvent<TelemetryEventName.REFERRAL, Referral> | BaseTelemetryEvent<TelemetryEventName.UPGRADE_CLICKED, UpgradeClicked> | BaseTelemetryEvent<TelemetryEventName.UPGRADE_POPUP, UpgradePopup> | BaseTelemetryEvent<TelemetryEventName.FLOW_RUN_CREATED, RunCreated> | BaseTelemetryEvent<TelemetryEventName.FLOW_PUBLISHED, FlowPublished> | BaseTelemetryEvent<TelemetryEventName.QUOTA_ALERT, QuotaAlert> | BaseTelemetryEvent<TelemetryEventName.FLOW_CREATED, FlowCreated> | BaseTelemetryEvent<TelemetryEventName.TEMPLATE_SEARCH, TemplateSearch> | BaseTelemetryEvent<TelemetryEventName.PIECES_SEARCH, PiecesSearch> | BaseTelemetryEvent<TelemetryEventName.FLOW_IMPORTED, FlowImported> | BaseTelemetryEvent<TelemetryEventName.REFERRAL_LINK_COPIED, ReferralLinkCopied> | BaseTelemetryEvent<TelemetryEventName.FLOW_SHARED, FlowShared> | BaseTelemetryEvent<TelemetryEventName.DEMO_IMPORTED, Record<string, never>> | BaseTelemetryEvent<TelemetryEventName.CHATBOT_CREATED, ChatbotCreated> | BaseTelemetryEvent<TelemetryEventName.FEATURED_TAB_VIEWED, FeaturedTabViewed>;
|
|
56
96
|
export {};
|
|
@@ -4,12 +4,19 @@ exports.TelemetryEventName = void 0;
|
|
|
4
4
|
var TelemetryEventName;
|
|
5
5
|
(function (TelemetryEventName) {
|
|
6
6
|
TelemetryEventName["SIGNED_UP"] = "signed.up";
|
|
7
|
+
TelemetryEventName["QUOTA_ALERT"] = "quota.alert";
|
|
8
|
+
TelemetryEventName["UPGRADE_CLICKED"] = "upgrade.clicked";
|
|
9
|
+
TelemetryEventName["UPGRADE_POPUP"] = "upgrade.popup";
|
|
7
10
|
TelemetryEventName["CHATBOT_CREATED"] = "chatbot.created";
|
|
8
11
|
TelemetryEventName["FLOW_CREATED"] = "flow.created";
|
|
9
12
|
TelemetryEventName["DEMO_IMPORTED"] = "demo.imported";
|
|
10
|
-
TelemetryEventName["FLOW_IMPORTED"] = "flow.imported";
|
|
11
13
|
TelemetryEventName["FLOW_RUN_CREATED"] = "run.created";
|
|
12
14
|
TelemetryEventName["FLOW_PUBLISHED"] = "flow.published";
|
|
15
|
+
TelemetryEventName["FLOW_IMPORTED"] = "flow.imported";
|
|
16
|
+
TelemetryEventName["PIECES_SEARCH"] = "pieces.search";
|
|
17
|
+
TelemetryEventName["REFERRAL"] = "referral";
|
|
18
|
+
TelemetryEventName["REFERRAL_LINK_COPIED"] = "referral.link.copied";
|
|
19
|
+
TelemetryEventName["FLOW_SHARED"] = "flow.shared";
|
|
13
20
|
TelemetryEventName["FEATURED_TAB_VIEWED"] = "template.featured-tab-viewed";
|
|
14
21
|
TelemetryEventName["TEMPLATE_SEARCH"] = "template.search";
|
|
15
22
|
})(TelemetryEventName || (exports.TelemetryEventName = TelemetryEventName = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/telemetry.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/telemetry.ts"],"names":[],"mappings":";;;AA6EA,IAAY,kBAiBX;AAjBD,WAAY,kBAAkB;IAC1B,6CAAuB,CAAA;IACvB,iDAA2B,CAAA;IAC3B,yDAAmC,CAAA;IACnC,qDAA+B,CAAA;IAC/B,yDAAmC,CAAA;IACnC,mDAA6B,CAAA;IAC7B,qDAA+B,CAAA;IAC/B,sDAAgC,CAAA;IAChC,uDAAiC,CAAA;IACjC,qDAA8B,CAAA;IAC9B,qDAA8B,CAAA;IAC9B,2CAAqB,CAAA;IACrB,mEAA6C,CAAA;IAC7C,iDAA2B,CAAA;IAC3B,0EAAoD,CAAA;IACpD,yDAAkC,CAAA;AACtC,CAAC,EAjBW,kBAAkB,kCAAlB,kBAAkB,QAiB7B"}
|
|
@@ -7,6 +7,7 @@ import { FlowRunId } from "../flow-run/flow-run";
|
|
|
7
7
|
import { CodeAction } from "../flows/actions/action";
|
|
8
8
|
import { FlowVersion } from "../flows/flow-version";
|
|
9
9
|
import { ProjectId } from "../project/project";
|
|
10
|
+
import { PiecePackage } from "../pieces";
|
|
10
11
|
export declare enum EngineOperationType {
|
|
11
12
|
EXTRACT_PIECE_METADATA = "EXTRACT_PIECE_METADATA",
|
|
12
13
|
EXECUTE_ACTION = "EXECUTE_ACTION",
|
|
@@ -24,28 +25,24 @@ export declare enum TriggerHookType {
|
|
|
24
25
|
RUN = "RUN",
|
|
25
26
|
TEST = "TEST"
|
|
26
27
|
}
|
|
27
|
-
export type EngineOperation = ExecuteActionOperation | ExecuteCodeOperation | ExecuteFlowOperation | ExecutePropsOptions | ExecuteTriggerOperation<TriggerHookType> | ExecuteExtractPieceMetadata;
|
|
28
|
+
export type EngineOperation = ExecuteActionOperation | ExecuteCodeOperation | ExecuteFlowOperation | ExecutePropsOptions | ExecuteTriggerOperation<TriggerHookType> | ExecuteExtractPieceMetadata | ExecuteValidateAuthOperation;
|
|
28
29
|
type BaseEngineOperation = {
|
|
29
30
|
projectId: ProjectId;
|
|
30
31
|
workerToken?: string;
|
|
31
32
|
serverUrl: string;
|
|
32
33
|
};
|
|
33
34
|
export type ExecuteActionOperation = BaseEngineOperation & {
|
|
35
|
+
piece: PiecePackage;
|
|
34
36
|
actionName: string;
|
|
35
37
|
flowVersion: FlowVersion;
|
|
36
|
-
|
|
37
|
-
pieceVersion: string;
|
|
38
|
+
serverUrl: string;
|
|
38
39
|
input: Record<string, unknown>;
|
|
39
40
|
};
|
|
40
41
|
export type ExecuteValidateAuthOperation = BaseEngineOperation & {
|
|
41
|
-
|
|
42
|
-
pieceVersion: string;
|
|
42
|
+
piece: PiecePackage;
|
|
43
43
|
auth: AppConnectionValue;
|
|
44
44
|
};
|
|
45
|
-
export type ExecuteExtractPieceMetadata =
|
|
46
|
-
pieceName: string;
|
|
47
|
-
pieceVersion: string;
|
|
48
|
-
};
|
|
45
|
+
export type ExecuteExtractPieceMetadata = PiecePackage;
|
|
49
46
|
export type ExecuteCodeOperation = {
|
|
50
47
|
file: File;
|
|
51
48
|
step: CodeAction;
|
|
@@ -55,8 +52,7 @@ export type ExecuteCodeOperation = {
|
|
|
55
52
|
projectId: ProjectId;
|
|
56
53
|
};
|
|
57
54
|
export type ExecutePropsOptions = BaseEngineOperation & {
|
|
58
|
-
|
|
59
|
-
pieceVersion: string;
|
|
55
|
+
piece: PiecePackage;
|
|
60
56
|
propertyName: string;
|
|
61
57
|
stepName: string;
|
|
62
58
|
input: Record<string, any>;
|
|
@@ -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":";;;AAWA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC3B,wEAAiD,CAAA;IACjD,wDAAiC,CAAA;IACjC,oDAA6B,CAAA;IAC7B,oDAA6B,CAAA;IAC7B,4DAAqC,CAAA;IACrC,oEAA6C,CAAA;IAC7C,sEAA+C,CAAA;IAC/C,oDAA6B,CAAA;AACjC,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,0CAAuB,CAAA;IACvB,8BAAW,CAAA;IACX,gCAAa,CAAA;AACjB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAgHA,CAAC;AA2DF,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,uCAAe,CAAA;IACf,2CAAmB,CAAA;AACvB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"}
|
|
@@ -6,5 +6,6 @@ var FileType;
|
|
|
6
6
|
FileType["UNKNOWN"] = "UNKNOWN";
|
|
7
7
|
FileType["FLOW_RUN_LOG"] = "FLOW_RUN_LOG";
|
|
8
8
|
FileType["CODE_SOURCE"] = "CODE_SOURCE";
|
|
9
|
+
FileType["PACKAGE_ARCHIVE"] = "PACKAGE_ARCHIVE";
|
|
9
10
|
})(FileType || (exports.FileType = FileType = {}));
|
|
10
11
|
//# sourceMappingURL=file-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-type.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/file/file-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"file-type.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/file/file-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,+BAAmB,CAAA;IACnB,yCAA6B,CAAA;IAC7B,uCAA2B,CAAA;IAC3B,+CAAmC,CAAA;AACvC,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
package/src/lib/flag/flag.d.ts
CHANGED
|
@@ -29,5 +29,9 @@ export declare enum ApFlagId {
|
|
|
29
29
|
CURRENT_VERSION = "CURRENT_VERSION",
|
|
30
30
|
LATEST_VERSION = "LATEST_VERSION",
|
|
31
31
|
CLOUD_AUTH_ENABLED = "CLOUD_AUTH_ENABLED",
|
|
32
|
-
TEMPLATES_SOURCE_URL = "TEMPLATES_SOURCE_URL"
|
|
32
|
+
TEMPLATES_SOURCE_URL = "TEMPLATES_SOURCE_URL",
|
|
33
|
+
BILLING_ENABLED = "BILLING_ENABLED",
|
|
34
|
+
PROJECT_MEMBERS_ENABLED = "PROJECT_MEMBERS_ENABLED",
|
|
35
|
+
TEMPLATES_PROJECT_ID = "TEMPLATES_PROJECT_ID",
|
|
36
|
+
PRIVATE_PIECES_ENABLED = "PRIVATE_PIECES_ENABLED"
|
|
33
37
|
}
|
package/src/lib/flag/flag.js
CHANGED
|
@@ -30,5 +30,9 @@ var ApFlagId;
|
|
|
30
30
|
ApFlagId["LATEST_VERSION"] = "LATEST_VERSION";
|
|
31
31
|
ApFlagId["CLOUD_AUTH_ENABLED"] = "CLOUD_AUTH_ENABLED";
|
|
32
32
|
ApFlagId["TEMPLATES_SOURCE_URL"] = "TEMPLATES_SOURCE_URL";
|
|
33
|
+
ApFlagId["BILLING_ENABLED"] = "BILLING_ENABLED";
|
|
34
|
+
ApFlagId["PROJECT_MEMBERS_ENABLED"] = "PROJECT_MEMBERS_ENABLED";
|
|
35
|
+
ApFlagId["TEMPLATES_PROJECT_ID"] = "TEMPLATES_PROJECT_ID";
|
|
36
|
+
ApFlagId["PRIVATE_PIECES_ENABLED"] = "PRIVATE_PIECES_ENABLED";
|
|
33
37
|
})(ApFlagId || (exports.ApFlagId = ApFlagId = {}));
|
|
34
38
|
//# sourceMappingURL=flag.js.map
|
package/src/lib/flag/flag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flag/flag.ts"],"names":[],"mappings":";;;AASA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,6BAAgB,CAAA;IAChB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"flag.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flag/flag.ts"],"names":[],"mappings":";;;AASA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,6BAAgB,CAAA;IAChB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,QAqBX;AArBD,WAAY,QAAQ;IAChB,iEAAqD,CAAA;IACrD,yCAA6B,CAAA;IAC7B,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,uCAA2B,CAAA;IAC3B,+CAAmC,CAAA;IACnC,qDAAyC,CAAA;IACzC,yCAA6B,CAAA;IAC7B,+CAAmC,CAAA;IACnC,6CAAiC,CAAA;IACjC,mCAAuB,CAAA;IACvB,mDAAuC,CAAA;IACvC,+CAAmC,CAAA;IACnC,6CAAiC,CAAA;IACjC,qDAAyC,CAAA;IACzC,yDAA6C,CAAA;IAC7C,+CAAmC,CAAA;IACnC,+DAAmD,CAAA;IACnD,yDAA6C,CAAA;IAC7C,6DAAiD,CAAA;AACrD,CAAC,EArBW,QAAQ,wBAAR,QAAQ,QAqBnB"}
|
|
@@ -3,6 +3,7 @@ import { ExecutionState } from './execution-state';
|
|
|
3
3
|
import { StopResponse } from './step-output';
|
|
4
4
|
export declare enum ExecutionOutputStatus {
|
|
5
5
|
FAILED = "FAILED",
|
|
6
|
+
QUOTA_EXCEEDED = "QUOTA_EXCEEDED",
|
|
6
7
|
INTERNAL_ERROR = "INTERNAL_ERROR",
|
|
7
8
|
PAUSED = "PAUSED",
|
|
8
9
|
RUNNING = "RUNNING",
|
|
@@ -4,6 +4,7 @@ exports.PauseType = exports.ExecutionOutputStatus = void 0;
|
|
|
4
4
|
var ExecutionOutputStatus;
|
|
5
5
|
(function (ExecutionOutputStatus) {
|
|
6
6
|
ExecutionOutputStatus["FAILED"] = "FAILED";
|
|
7
|
+
ExecutionOutputStatus["QUOTA_EXCEEDED"] = "QUOTA_EXCEEDED";
|
|
7
8
|
ExecutionOutputStatus["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
8
9
|
ExecutionOutputStatus["PAUSED"] = "PAUSED";
|
|
9
10
|
ExecutionOutputStatus["RUNNING"] = "RUNNING";
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"execution-output.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flow-run/execution/execution-output.ts"],"names":[],"mappings":";;;AAIA,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,0DAAiC,CAAA;IACjC,0DAAiC,CAAA;IACjC,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,4CAAmB,CAAA;AACrB,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AA0CD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,gCAAmB,CAAA;AACrB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ActionType } from "../../flows/actions/action";
|
|
2
|
-
import { PauseMetadata } from "./execution-output";
|
|
3
2
|
export declare enum StepOutputStatus {
|
|
4
3
|
FAILED = "FAILED",
|
|
5
4
|
PAUSED = "PAUSED",
|
|
@@ -20,8 +19,6 @@ export type StepOutput<T extends ActionType = ActionType, O = any> = {
|
|
|
20
19
|
duration?: number;
|
|
21
20
|
errorMessage?: unknown;
|
|
22
21
|
standardOutput?: unknown;
|
|
23
|
-
pauseMetadata?: PauseMetadata;
|
|
24
|
-
stopResponse?: StopResponse;
|
|
25
22
|
};
|
|
26
23
|
type LoopOnItemsOutput = {
|
|
27
24
|
item: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-output.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flow-run/execution/step-output.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"step-output.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flow-run/execution/step-output.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;AACzB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Static } from '@sinclair/typebox';
|
|
2
|
+
import { PackageType, PieceType } from '../../pieces';
|
|
2
3
|
import { PieceTriggerSettings } from '../triggers/trigger';
|
|
3
4
|
export declare enum ActionType {
|
|
4
5
|
CODE = "CODE",
|
|
5
6
|
PIECE = "PIECE",
|
|
6
7
|
LOOP_ON_ITEMS = "LOOP_ON_ITEMS",
|
|
7
|
-
BRANCH = "BRANCH"
|
|
8
|
-
MISSING = "MISSING"
|
|
8
|
+
BRANCH = "BRANCH"
|
|
9
9
|
}
|
|
10
10
|
export declare const CodeActionSettings: import("@sinclair/typebox").TObject<{
|
|
11
11
|
artifactSourceId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
@@ -35,8 +35,11 @@ export declare const CodeActionSchema: import("@sinclair/typebox").TObject<{
|
|
|
35
35
|
displayName: import("@sinclair/typebox").TString<string>;
|
|
36
36
|
}>;
|
|
37
37
|
export declare const PieceActionSettings: import("@sinclair/typebox").TObject<{
|
|
38
|
+
packageType: import("@sinclair/typebox").TEnum<typeof PackageType>;
|
|
39
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof PieceType>;
|
|
38
40
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
39
41
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
42
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
40
43
|
actionName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
41
44
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
42
45
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -45,19 +48,15 @@ export declare const PieceActionSettings: import("@sinclair/typebox").TObject<{
|
|
|
45
48
|
lastTestDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
46
49
|
}>;
|
|
47
50
|
}>;
|
|
48
|
-
export declare const MissingActionSchema: import("@sinclair/typebox").TObject<{
|
|
49
|
-
type: import("@sinclair/typebox").TLiteral<ActionType.MISSING>;
|
|
50
|
-
settings: import("@sinclair/typebox").TObject<{}>;
|
|
51
|
-
name: import("@sinclair/typebox").TString<string>;
|
|
52
|
-
valid: import("@sinclair/typebox").TBoolean;
|
|
53
|
-
displayName: import("@sinclair/typebox").TString<string>;
|
|
54
|
-
}>;
|
|
55
51
|
export type PieceActionSettings = Static<typeof PieceActionSettings>;
|
|
56
52
|
export declare const PieceActionSchema: import("@sinclair/typebox").TObject<{
|
|
57
53
|
type: import("@sinclair/typebox").TLiteral<ActionType.PIECE>;
|
|
58
54
|
settings: import("@sinclair/typebox").TObject<{
|
|
55
|
+
packageType: import("@sinclair/typebox").TEnum<typeof PackageType>;
|
|
56
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof PieceType>;
|
|
59
57
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
60
58
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
59
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
61
60
|
actionName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
62
61
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
63
62
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -187,14 +186,6 @@ export declare const BranchActionSchema: import("@sinclair/typebox").TObject<{
|
|
|
187
186
|
displayName: import("@sinclair/typebox").TString<string>;
|
|
188
187
|
}>;
|
|
189
188
|
export declare const Action: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
190
|
-
type: import("@sinclair/typebox").TLiteral<ActionType.MISSING>;
|
|
191
|
-
settings: import("@sinclair/typebox").TObject<{}>;
|
|
192
|
-
name: import("@sinclair/typebox").TString<string>;
|
|
193
|
-
valid: import("@sinclair/typebox").TBoolean;
|
|
194
|
-
displayName: import("@sinclair/typebox").TString<string>;
|
|
195
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
196
|
-
nextAction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSelf>;
|
|
197
|
-
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
198
189
|
type: import("@sinclair/typebox").TLiteral<ActionType.CODE>;
|
|
199
190
|
settings: import("@sinclair/typebox").TObject<{
|
|
200
191
|
artifactSourceId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
@@ -214,8 +205,11 @@ export declare const Action: import("@sinclair/typebox").TRecursive<import("@sin
|
|
|
214
205
|
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
215
206
|
type: import("@sinclair/typebox").TLiteral<ActionType.PIECE>;
|
|
216
207
|
settings: import("@sinclair/typebox").TObject<{
|
|
208
|
+
packageType: import("@sinclair/typebox").TEnum<typeof PackageType>;
|
|
209
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof PieceType>;
|
|
217
210
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
218
211
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
212
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
219
213
|
actionName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
220
214
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
221
215
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -271,12 +265,6 @@ export declare const Action: import("@sinclair/typebox").TRecursive<import("@sin
|
|
|
271
265
|
onFailureAction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSelf>;
|
|
272
266
|
}>]>]>>;
|
|
273
267
|
export declare const SingleActionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
274
|
-
type: import("@sinclair/typebox").TLiteral<ActionType.MISSING>;
|
|
275
|
-
settings: import("@sinclair/typebox").TObject<{}>;
|
|
276
|
-
name: import("@sinclair/typebox").TString<string>;
|
|
277
|
-
valid: import("@sinclair/typebox").TBoolean;
|
|
278
|
-
displayName: import("@sinclair/typebox").TString<string>;
|
|
279
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
280
268
|
type: import("@sinclair/typebox").TLiteral<ActionType.CODE>;
|
|
281
269
|
settings: import("@sinclair/typebox").TObject<{
|
|
282
270
|
artifactSourceId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
@@ -294,8 +282,11 @@ export declare const SingleActionSchema: import("@sinclair/typebox").TUnion<[imp
|
|
|
294
282
|
}>, import("@sinclair/typebox").TObject<{
|
|
295
283
|
type: import("@sinclair/typebox").TLiteral<ActionType.PIECE>;
|
|
296
284
|
settings: import("@sinclair/typebox").TObject<{
|
|
285
|
+
packageType: import("@sinclair/typebox").TEnum<typeof PackageType>;
|
|
286
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof PieceType>;
|
|
297
287
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
298
288
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
289
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
299
290
|
actionName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
300
291
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
301
292
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -357,7 +348,4 @@ export type PieceAction = Static<typeof PieceActionSchema> & {
|
|
|
357
348
|
export type CodeAction = Static<typeof CodeActionSchema> & {
|
|
358
349
|
nextAction?: Action;
|
|
359
350
|
};
|
|
360
|
-
export type MissingAction = Static<typeof MissingActionSchema> & {
|
|
361
|
-
nextAction?: Action;
|
|
362
|
-
};
|
|
363
351
|
export type StepSettings = CodeActionSettings | PieceActionSettings | PieceTriggerSettings | BranchActionSettings | LoopOnItemsActionSettings;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SingleActionSchema = exports.Action = exports.BranchActionSchema = exports.BranchActionSettings = exports.BranchCondition = exports.BranchActionSettingsWithValidation = exports.textConditions = exports.singleValueConditions = exports.BranchOperator = exports.LoopOnItemsActionSchema = exports.LoopOnItemsActionSettings = exports.LoopOnItemsActionSettingsWithValidation = exports.PieceActionSchema = exports.
|
|
3
|
+
exports.SingleActionSchema = exports.Action = exports.BranchActionSchema = exports.BranchActionSettings = exports.BranchCondition = exports.BranchActionSettingsWithValidation = exports.textConditions = exports.singleValueConditions = exports.BranchOperator = exports.LoopOnItemsActionSchema = exports.LoopOnItemsActionSettings = exports.LoopOnItemsActionSettingsWithValidation = exports.PieceActionSchema = exports.PieceActionSettings = exports.CodeActionSchema = exports.CodeActionSettings = exports.ActionType = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
5
|
const pieces_1 = require("../../pieces");
|
|
6
6
|
const sample_data_1 = require("../sample-data");
|
|
7
|
+
const id_generator_1 = require("../../common/id-generator");
|
|
7
8
|
var ActionType;
|
|
8
9
|
(function (ActionType) {
|
|
9
10
|
ActionType["CODE"] = "CODE";
|
|
10
11
|
ActionType["PIECE"] = "PIECE";
|
|
11
12
|
ActionType["LOOP_ON_ITEMS"] = "LOOP_ON_ITEMS";
|
|
12
13
|
ActionType["BRANCH"] = "BRANCH";
|
|
13
|
-
// Missing action is used when the action is not found by AI
|
|
14
|
-
ActionType["MISSING"] = "MISSING";
|
|
15
14
|
})(ActionType || (exports.ActionType = ActionType = {}));
|
|
16
15
|
const commonActionProps = {
|
|
17
16
|
name: typebox_1.Type.String({}),
|
|
@@ -28,13 +27,15 @@ exports.CodeActionSettings = typebox_1.Type.Object({
|
|
|
28
27
|
exports.CodeActionSchema = typebox_1.Type.Object(Object.assign(Object.assign({}, commonActionProps), { type: typebox_1.Type.Literal(ActionType.CODE), settings: exports.CodeActionSettings }));
|
|
29
28
|
// Piece Action
|
|
30
29
|
exports.PieceActionSettings = typebox_1.Type.Object({
|
|
30
|
+
packageType: typebox_1.Type.Enum(pieces_1.PackageType),
|
|
31
|
+
pieceType: typebox_1.Type.Enum(pieces_1.PieceType),
|
|
31
32
|
pieceName: typebox_1.Type.String({}),
|
|
32
33
|
pieceVersion: pieces_1.VersionType,
|
|
34
|
+
pieceArchiveId: typebox_1.Type.Optional(id_generator_1.ApId),
|
|
33
35
|
actionName: typebox_1.Type.Optional(typebox_1.Type.String({})),
|
|
34
36
|
input: typebox_1.Type.Record(typebox_1.Type.String({}), typebox_1.Type.Any()),
|
|
35
37
|
inputUiInfo: sample_data_1.SampleDataSettingsObject,
|
|
36
38
|
});
|
|
37
|
-
exports.MissingActionSchema = typebox_1.Type.Object(Object.assign(Object.assign({}, commonActionProps), { type: typebox_1.Type.Literal(ActionType.MISSING), settings: typebox_1.Type.Object({}) }));
|
|
38
39
|
exports.PieceActionSchema = typebox_1.Type.Object(Object.assign(Object.assign({}, commonActionProps), { type: typebox_1.Type.Literal(ActionType.PIECE), settings: exports.PieceActionSettings }));
|
|
39
40
|
// Loop Items
|
|
40
41
|
exports.LoopOnItemsActionSettingsWithValidation = typebox_1.Type.Object({
|
|
@@ -123,9 +124,6 @@ exports.BranchActionSettings = typebox_1.Type.Object({
|
|
|
123
124
|
exports.BranchActionSchema = typebox_1.Type.Object(Object.assign(Object.assign({}, commonActionProps), { type: typebox_1.Type.Literal(ActionType.BRANCH), settings: exports.BranchActionSettings }));
|
|
124
125
|
// Union of all actions
|
|
125
126
|
exports.Action = typebox_1.Type.Recursive(action => typebox_1.Type.Union([
|
|
126
|
-
typebox_1.Type.Intersect([exports.MissingActionSchema, typebox_1.Type.Object({
|
|
127
|
-
nextAction: typebox_1.Type.Optional(action),
|
|
128
|
-
})]),
|
|
129
127
|
typebox_1.Type.Intersect([exports.CodeActionSchema, typebox_1.Type.Object({
|
|
130
128
|
nextAction: typebox_1.Type.Optional(action),
|
|
131
129
|
})]),
|
|
@@ -143,7 +141,6 @@ exports.Action = typebox_1.Type.Recursive(action => typebox_1.Type.Union([
|
|
|
143
141
|
})])
|
|
144
142
|
]));
|
|
145
143
|
exports.SingleActionSchema = typebox_1.Type.Union([
|
|
146
|
-
exports.MissingActionSchema,
|
|
147
144
|
exports.CodeActionSchema,
|
|
148
145
|
exports.PieceActionSchema,
|
|
149
146
|
exports.LoopOnItemsActionSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/actions/action.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAElD,
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/actions/action.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAElD,yCAAmE;AACnE,gDAA0D;AAE1D,4DAAiD;AAEjD,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,6CAA+B,CAAA;IAC/B,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACrB,KAAK,EAAE,cAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IACvB,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;CAC7B,CAAA;AAED,cAAc;AAED,QAAA,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC5C,gBAAgB,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAChD,QAAQ,EAAE,cA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|
settings: import("@sinclair/typebox").TObject<{
|
|
21
21
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
22
22
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
23
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof import("../../pieces").PieceType>;
|
|
24
|
+
packageType: import("@sinclair/typebox").TEnum<typeof import("../../pieces").PackageType>;
|
|
25
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
23
26
|
triggerName: import("@sinclair/typebox").TString<string>;
|
|
24
27
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
25
28
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -69,6 +72,9 @@ export declare const FlowTemplate: import("@sinclair/typebox").TObject<{
|
|
|
69
72
|
settings: import("@sinclair/typebox").TObject<{
|
|
70
73
|
pieceName: import("@sinclair/typebox").TString<string>;
|
|
71
74
|
pieceVersion: import("@sinclair/typebox").TString<string>;
|
|
75
|
+
pieceType: import("@sinclair/typebox").TEnum<typeof import("../../pieces").PieceType>;
|
|
76
|
+
packageType: import("@sinclair/typebox").TEnum<typeof import("../../pieces").PackageType>;
|
|
77
|
+
pieceArchiveId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
|
|
72
78
|
triggerName: import("@sinclair/typebox").TString<string>;
|
|
73
79
|
input: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>;
|
|
74
80
|
inputUiInfo: import("@sinclair/typebox").TObject<{
|
|
@@ -56,7 +56,6 @@ function deleteAction(flowVersion, request) {
|
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
case action_1.ActionType.CODE:
|
|
59
|
-
case action_1.ActionType.MISSING:
|
|
60
59
|
case action_1.ActionType.PIECE:
|
|
61
60
|
break;
|
|
62
61
|
}
|
|
@@ -329,8 +328,6 @@ function createAction(request, { nextAction, onFailureAction, onSuccessAction, f
|
|
|
329
328
|
case action_1.ActionType.CODE:
|
|
330
329
|
action = Object.assign(Object.assign({}, baseProperties), { type: action_1.ActionType.CODE, settings: request.settings });
|
|
331
330
|
break;
|
|
332
|
-
case action_1.ActionType.MISSING:
|
|
333
|
-
action = Object.assign(Object.assign({}, baseProperties), { type: action_1.ActionType.MISSING, settings: request.settings });
|
|
334
331
|
}
|
|
335
332
|
action.valid = ((_a = request.valid) !== null && _a !== void 0 ? _a : true) && actionSchemaValidator.Check(action);
|
|
336
333
|
return action;
|
|
@@ -444,8 +441,6 @@ function keepBaseAction(action) {
|
|
|
444
441
|
return Object.assign({ type: action.type, settings: Object.assign(Object.assign({}, action.settings), { artifactSourceId: undefined }) }, commonProps);
|
|
445
442
|
case action_1.ActionType.PIECE:
|
|
446
443
|
return Object.assign({ type: action.type, settings: action.settings }, commonProps);
|
|
447
|
-
case action_1.ActionType.MISSING:
|
|
448
|
-
return Object.assign({ type: action.type, settings: action.settings }, commonProps);
|
|
449
444
|
}
|
|
450
445
|
}
|
|
451
446
|
function upgradePiece(step, stepName) {
|