@activepieces/shared 0.24.0 → 0.25.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.
Files changed (86) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +0 -2
  3. package/src/index.js +0 -2
  4. package/src/index.js.map +1 -1
  5. package/src/lib/common/activepieces-error.d.ts +1 -5
  6. package/src/lib/common/activepieces-error.js +0 -1
  7. package/src/lib/common/activepieces-error.js.map +1 -1
  8. package/src/lib/common/telemetry.d.ts +1 -6
  9. package/src/lib/common/telemetry.js +0 -1
  10. package/src/lib/common/telemetry.js.map +1 -1
  11. package/src/lib/engine/index.d.ts +3 -2
  12. package/src/lib/engine/index.js +2 -1
  13. package/src/lib/engine/index.js.map +1 -1
  14. package/src/lib/engine/requests.d.ts +16 -9
  15. package/src/lib/engine/requests.js +16 -11
  16. package/src/lib/engine/requests.js.map +1 -1
  17. package/src/lib/file/index.js +3 -0
  18. package/src/lib/file/index.js.map +1 -1
  19. package/src/lib/flag/flag.d.ts +3 -1
  20. package/src/lib/flag/flag.js +2 -0
  21. package/src/lib/flag/flag.js.map +1 -1
  22. package/src/lib/flow-run/execution/execution-output.d.ts +1 -0
  23. package/src/lib/flow-run/execution/flow-execution.js +1 -0
  24. package/src/lib/flow-run/execution/flow-execution.js.map +1 -1
  25. package/src/lib/flows/flow.d.ts +10 -0
  26. package/src/lib/flows/flow.js +4 -2
  27. package/src/lib/flows/flow.js.map +1 -1
  28. package/src/lib/flows/folders/folder.d.ts +1 -1
  29. package/src/lib/flows/folders/folder.js +1 -1
  30. package/src/lib/flows/folders/folder.js.map +1 -1
  31. package/src/lib/flows/operations/index.js +1 -3
  32. package/src/lib/flows/operations/index.js.map +1 -1
  33. package/src/lib/flows/triggers/trigger-run.d.ts +0 -24
  34. package/src/lib/flows/triggers/trigger-run.js +1 -11
  35. package/src/lib/flows/triggers/trigger-run.js.map +1 -1
  36. package/src/lib/platform/platform.model.d.ts +12 -55
  37. package/src/lib/platform/platform.model.js +5 -30
  38. package/src/lib/platform/platform.model.js.map +1 -1
  39. package/src/lib/platform/platform.request.d.ts +0 -13
  40. package/src/lib/platform/platform.request.js +0 -1
  41. package/src/lib/platform/platform.request.js.map +1 -1
  42. package/src/lib/project/project.d.ts +0 -9
  43. package/src/lib/project/project.js +2 -9
  44. package/src/lib/project/project.js.map +1 -1
  45. package/src/lib/websocket/index.d.ts +5 -6
  46. package/src/lib/websocket/index.js +3 -4
  47. package/src/lib/websocket/index.js.map +1 -1
  48. package/src/lib/workers/index.d.ts +32 -16
  49. package/src/lib/workers/index.js +22 -2
  50. package/src/lib/workers/index.js.map +1 -1
  51. package/src/lib/workers/job-data.d.ts +35 -31
  52. package/src/lib/workers/job-data.js +56 -24
  53. package/src/lib/workers/job-data.js.map +1 -1
  54. package/src/lib/workers/queue-metrics.d.ts +13 -95
  55. package/src/lib/workers/queue-metrics.js +10 -26
  56. package/src/lib/workers/queue-metrics.js.map +1 -1
  57. package/src/lib/copilot/index.d.ts +0 -55
  58. package/src/lib/copilot/index.js +0 -43
  59. package/src/lib/copilot/index.js.map +0 -1
  60. package/src/lib/flows/operations/migrations/flow-migration-util.d.ts +0 -54
  61. package/src/lib/flows/operations/migrations/flow-migration-util.js +0 -18
  62. package/src/lib/flows/operations/migrations/flow-migration-util.js.map +0 -1
  63. package/src/lib/flows/operations/migrations/index.d.ts +0 -8
  64. package/src/lib/flows/operations/migrations/index.js +0 -30
  65. package/src/lib/flows/operations/migrations/index.js.map +0 -1
  66. package/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.d.ts +0 -2
  67. package/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.js +0 -47
  68. package/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.js.map +0 -1
  69. package/src/lib/flows/operations/migrations/migrate-v1-connection-ids.d.ts +0 -2
  70. package/src/lib/flows/operations/migrations/migrate-v1-connection-ids.js +0 -11
  71. package/src/lib/flows/operations/migrations/migrate-v1-connection-ids.js.map +0 -1
  72. package/src/lib/flows/operations/migrations/migrate-v2-agent-piece.d.ts +0 -2
  73. package/src/lib/flows/operations/migrations/migrate-v2-agent-piece.js +0 -13
  74. package/src/lib/flows/operations/migrations/migrate-v2-agent-piece.js.map +0 -1
  75. package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.d.ts +0 -2
  76. package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.js +0 -13
  77. package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.js.map +0 -1
  78. package/src/lib/flows/operations/migrations/migrate-v4-agent-piece.d.ts +0 -2
  79. package/src/lib/flows/operations/migrations/migrate-v4-agent-piece.js +0 -14
  80. package/src/lib/flows/operations/migrations/migrate-v4-agent-piece.js.map +0 -1
  81. package/src/lib/flows/operations/migrations/migrate-v5-http-to-webhook.d.ts +0 -2
  82. package/src/lib/flows/operations/migrations/migrate-v5-http-to-webhook.js +0 -58
  83. package/src/lib/flows/operations/migrations/migrate-v5-http-to-webhook.js.map +0 -1
  84. package/src/lib/flows/operations/migrations/migrate-v6-property-settings.d.ts +0 -2
  85. package/src/lib/flows/operations/migrations/migrate-v6-property-settings.js +0 -33
  86. package/src/lib/flows/operations/migrations/migrate-v6-property-settings.js.map +0 -1
@@ -1,34 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueueMetricsResponse = exports.WorkerJobStats = exports.WorkerJobTypeForMetrics = exports.WorkerJobStatus = void 0;
3
+ exports.QueueMetricsResponse = exports.WorkerJobStats = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
- const job_data_1 = require("./job-data");
6
- var WorkerJobStatus;
7
- (function (WorkerJobStatus) {
8
- WorkerJobStatus["FAILED"] = "failed";
9
- WorkerJobStatus["DELAYED"] = "delayed";
10
- WorkerJobStatus["ACTIVE"] = "active";
11
- WorkerJobStatus["QUEUED"] = "queued";
12
- WorkerJobStatus["RETRYING"] = "retrying";
13
- })(WorkerJobStatus || (exports.WorkerJobStatus = WorkerJobStatus = {}));
14
- exports.WorkerJobTypeForMetrics = [
15
- job_data_1.WorkerJobType.RENEW_WEBHOOK,
16
- job_data_1.WorkerJobType.EXECUTE_POLLING,
17
- job_data_1.WorkerJobType.DELAYED_FLOW,
18
- job_data_1.WorkerJobType.EXECUTE_WEBHOOK,
19
- job_data_1.WorkerJobType.EXECUTE_FLOW,
20
- job_data_1.WorkerJobType.EXECUTE_AGENT,
21
- job_data_1.WorkerJobType.EXECUTE_TOOL,
22
- ];
23
5
  exports.WorkerJobStats = typebox_1.Type.Object({
24
- [WorkerJobStatus.ACTIVE]: typebox_1.Type.Number(),
25
- [WorkerJobStatus.QUEUED]: typebox_1.Type.Number(),
26
- [WorkerJobStatus.FAILED]: typebox_1.Type.Number(),
27
- [WorkerJobStatus.RETRYING]: typebox_1.Type.Number(),
28
- [WorkerJobStatus.DELAYED]: typebox_1.Type.Number(),
6
+ active: typebox_1.Type.Number(),
7
+ delayed: typebox_1.Type.Number(),
8
+ prioritized: typebox_1.Type.Number(),
9
+ waiting: typebox_1.Type.Number(),
10
+ 'waiting-children': typebox_1.Type.Number(),
11
+ completed: typebox_1.Type.Number(),
12
+ failed: typebox_1.Type.Number(),
13
+ paused: typebox_1.Type.Number(),
29
14
  });
30
15
  exports.QueueMetricsResponse = typebox_1.Type.Object({
31
- statsPerJobType: typebox_1.Type.Record(typebox_1.Type.Enum(job_data_1.WorkerJobType), exports.WorkerJobStats),
32
- totalStats: exports.WorkerJobStats,
16
+ stats: exports.WorkerJobStats,
33
17
  });
34
18
  //# sourceMappingURL=queue-metrics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue-metrics.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/workers/queue-metrics.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,yCAA0C;AAE1C,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,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B,kBAAkB,EAAE,cAAI,CAAC,MAAM,EAAE;IACjC,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;CACxB,CAAC,CAAA;AAIW,QAAA,oBAAoB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,sBAAc;CACxB,CAAC,CAAA"}
@@ -1,55 +0,0 @@
1
- import { Static } from '@sinclair/typebox';
2
- export declare enum AskCopilotTool {
3
- GENERATE_CODE = "generate_code",
4
- GENERATE_HTTP_REQUEST = "generate_http_request"
5
- }
6
- export declare const AskCopilotRequest: import("@sinclair/typebox").TObject<{
7
- context: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
8
- role: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"assistant">]>;
9
- content: import("@sinclair/typebox").TString;
10
- }>>;
11
- selectedStepName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
12
- flowVersionId: import("@sinclair/typebox").TString;
13
- flowId: import("@sinclair/typebox").TString;
14
- prompt: import("@sinclair/typebox").TString;
15
- tools: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<typeof AskCopilotTool>>;
16
- }>;
17
- export type AskCopilotRequest = Static<typeof AskCopilotRequest>;
18
- export declare const AskCopilotCodeResponse: import("@sinclair/typebox").TObject<{
19
- code: import("@sinclair/typebox").TString;
20
- packageJson: import("@sinclair/typebox").TObject<{
21
- dependencies: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
22
- }>;
23
- inputs: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
24
- icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
25
- title: import("@sinclair/typebox").TString;
26
- textMessage: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
- }>;
28
- export type AskCopilotCodeResponse = Static<typeof AskCopilotCodeResponse>;
29
- export declare const AskCopilotHttpRequestResponse: import("@sinclair/typebox").TObject<{
30
- headers: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
31
- body: import("@sinclair/typebox").TString;
32
- statusCode: import("@sinclair/typebox").TNumber;
33
- queryParams: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
34
- method: import("@sinclair/typebox").TString;
35
- url: import("@sinclair/typebox").TString;
36
- }>;
37
- export type AskCopilotHttpRequestResponse = Static<typeof AskCopilotHttpRequestResponse>;
38
- export declare const AskCopilotResponse: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
39
- code: import("@sinclair/typebox").TString;
40
- packageJson: import("@sinclair/typebox").TObject<{
41
- dependencies: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
42
- }>;
43
- inputs: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
44
- icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
45
- title: import("@sinclair/typebox").TString;
46
- textMessage: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
47
- }>, import("@sinclair/typebox").TObject<{
48
- headers: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
49
- body: import("@sinclair/typebox").TString;
50
- statusCode: import("@sinclair/typebox").TNumber;
51
- queryParams: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
52
- method: import("@sinclair/typebox").TString;
53
- url: import("@sinclair/typebox").TString;
54
- }>]>;
55
- export type AskCopilotResponse = Static<typeof AskCopilotResponse>;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AskCopilotResponse = exports.AskCopilotHttpRequestResponse = exports.AskCopilotCodeResponse = exports.AskCopilotRequest = exports.AskCopilotTool = void 0;
4
- const typebox_1 = require("@sinclair/typebox");
5
- var AskCopilotTool;
6
- (function (AskCopilotTool) {
7
- AskCopilotTool["GENERATE_CODE"] = "generate_code";
8
- AskCopilotTool["GENERATE_HTTP_REQUEST"] = "generate_http_request";
9
- })(AskCopilotTool || (exports.AskCopilotTool = AskCopilotTool = {}));
10
- exports.AskCopilotRequest = typebox_1.Type.Object({
11
- context: typebox_1.Type.Array(typebox_1.Type.Object({
12
- role: typebox_1.Type.Union([typebox_1.Type.Literal('user'), typebox_1.Type.Literal('assistant')]),
13
- content: typebox_1.Type.String(),
14
- })),
15
- selectedStepName: typebox_1.Type.Optional(typebox_1.Type.String()),
16
- flowVersionId: typebox_1.Type.String(),
17
- flowId: typebox_1.Type.String(),
18
- prompt: typebox_1.Type.String(),
19
- tools: typebox_1.Type.Array(typebox_1.Type.Enum(AskCopilotTool)),
20
- });
21
- exports.AskCopilotCodeResponse = typebox_1.Type.Object({
22
- code: typebox_1.Type.String(),
23
- packageJson: typebox_1.Type.Object({
24
- dependencies: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String()),
25
- }),
26
- inputs: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String()),
27
- icon: typebox_1.Type.Optional(typebox_1.Type.String()),
28
- title: typebox_1.Type.String(),
29
- textMessage: typebox_1.Type.Optional(typebox_1.Type.String()),
30
- });
31
- exports.AskCopilotHttpRequestResponse = typebox_1.Type.Object({
32
- headers: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String()),
33
- body: typebox_1.Type.String(),
34
- statusCode: typebox_1.Type.Number(),
35
- queryParams: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String()),
36
- method: typebox_1.Type.String(),
37
- url: typebox_1.Type.String(),
38
- });
39
- exports.AskCopilotResponse = typebox_1.Type.Union([
40
- exports.AskCopilotCodeResponse,
41
- exports.AskCopilotHttpRequestResponse,
42
- ]);
43
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/copilot/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAEhD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,iDAA+B,CAAA;IAC/B,iEAA+C,CAAA;AACnD,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAEY,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QACnE,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;KACzB,CAAC,CAAC;IACH,gBAAgB,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAC9C,aAAa,EAAE,cAAI,CAAC,MAAM,EAAE;IAC5B,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC,CAAA;AAIW,QAAA,sBAAsB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC;QACrB,YAAY,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC;KAC1D,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC;IACjD,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAClC,KAAK,EAAE,cAAI,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC,CAAA;AAIW,QAAA,6BAA6B,GAAG,cAAI,CAAC,MAAM,CAAC;IACrD,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC;IAClD,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC;IACtD,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;IACrB,GAAG,EAAE,cAAI,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAIW,QAAA,kBAAkB,GAAG,cAAI,CAAC,KAAK,CAAC;IACzC,8BAAsB;IACtB,qCAA6B;CAChC,CAAC,CAAA"}
@@ -1,54 +0,0 @@
1
- import { FlowVersion } from '../../flow-version';
2
- import { FlowTriggerType } from '../../triggers/trigger';
3
- export declare const flowMigrationUtil: {
4
- pinPieceToVersion(flowVersion: FlowVersion, pieceName: string, pieceVersion: string): {
5
- updatedBy?: string | null | undefined;
6
- schemaVersion?: string | null | undefined;
7
- backupFiles?: {
8
- [x: string]: string;
9
- } | null | undefined;
10
- flowId: string;
11
- id: string;
12
- created: string;
13
- updated: string;
14
- displayName: string;
15
- valid: boolean;
16
- trigger: {
17
- nextAction?: any;
18
- type: FlowTriggerType.EMPTY;
19
- name: string;
20
- displayName: string;
21
- settings: any;
22
- valid: boolean;
23
- } | {
24
- nextAction?: any;
25
- type: FlowTriggerType.PIECE;
26
- name: string;
27
- displayName: string;
28
- settings: {
29
- sampleData?: {
30
- sampleDataFileId?: string | undefined;
31
- sampleDataInputFileId?: string | undefined;
32
- lastTestDate?: string | undefined;
33
- } | undefined;
34
- customLogoUrl?: string | undefined;
35
- triggerName?: string | undefined;
36
- pieceName: string;
37
- pieceVersion: string;
38
- input: {
39
- [x: string]: any;
40
- };
41
- propertySettings: {
42
- [x: string]: {
43
- schema?: any;
44
- type: import("../..").PropertyExecutionType;
45
- };
46
- };
47
- };
48
- valid: boolean;
49
- };
50
- agentIds: string[];
51
- state: import("../../flow-version").FlowVersionState;
52
- connectionIds: string[];
53
- };
54
- };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.flowMigrationUtil = void 0;
4
- const action_1 = require("../../actions/action");
5
- const trigger_1 = require("../../triggers/trigger");
6
- const flow_structure_util_1 = require("../../util/flow-structure-util");
7
- exports.flowMigrationUtil = {
8
- pinPieceToVersion(flowVersion, pieceName, pieceVersion) {
9
- const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
10
- if ((step.type === action_1.FlowActionType.PIECE || step.type === trigger_1.FlowTriggerType.PIECE) && step.settings.pieceName === pieceName) {
11
- return Object.assign(Object.assign({}, step), { settings: Object.assign(Object.assign({}, step.settings), { pieceVersion }) });
12
- }
13
- return step;
14
- });
15
- return newVersion;
16
- },
17
- };
18
- //# sourceMappingURL=flow-migration-util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow-migration-util.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/flow-migration-util.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,oDAAwD;AACxD,wEAAkE;AAGrD,QAAA,iBAAiB,GAAG;IAC7B,iBAAiB,CAAC,WAAwB,EAAE,SAAiB,EAAE,YAAoB;QAC/E,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;YACpE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,uBAAc,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,yBAAe,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;gBACvH,uCACO,IAAI,KACP,QAAQ,kCACD,IAAI,CAAC,QAAQ,KAChB,YAAY,OAEnB;YACL,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QACF,OAAO,UAAU,CAAA;IACrB,CAAC;CACJ,CAAA"}
@@ -1,8 +0,0 @@
1
- import { FlowVersion } from '../../flow-version';
2
- export type Migration = {
3
- targetSchemaVersion: string | undefined;
4
- migrate: (flowVersion: FlowVersion) => FlowVersion;
5
- };
6
- export declare const flowMigrations: {
7
- apply: (flowVersion: FlowVersion) => FlowVersion;
8
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.flowMigrations = void 0;
4
- const migrate_v0_branch_to_router_1 = require("./migrate-v0-branch-to-router");
5
- const migrate_v1_connection_ids_1 = require("./migrate-v1-connection-ids");
6
- const migrate_v2_agent_piece_1 = require("./migrate-v2-agent-piece");
7
- const migrate_v3_agent_piece_1 = require("./migrate-v3-agent-piece");
8
- const migrate_v4_agent_piece_1 = require("./migrate-v4-agent-piece");
9
- const migrate_v5_http_to_webhook_1 = require("./migrate-v5-http-to-webhook");
10
- const migrate_v6_property_settings_1 = require("./migrate-v6-property-settings");
11
- const migrations = [
12
- migrate_v0_branch_to_router_1.migrateBranchToRouter,
13
- migrate_v1_connection_ids_1.migrateConnectionIds,
14
- migrate_v2_agent_piece_1.migrateAgentPieceV2,
15
- migrate_v3_agent_piece_1.migrateAgentPieceV3,
16
- migrate_v4_agent_piece_1.migrateAgentPieceV4,
17
- migrate_v5_http_to_webhook_1.migrateHttpToWebhookV5,
18
- migrate_v6_property_settings_1.migratePropertySettingsV6,
19
- ];
20
- exports.flowMigrations = {
21
- apply: (flowVersion) => {
22
- return migrations.reduce((acc, migration) => {
23
- if (acc.schemaVersion === migration.targetSchemaVersion) {
24
- return migration.migrate(acc);
25
- }
26
- return acc;
27
- }, flowVersion);
28
- },
29
- };
30
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/index.ts"],"names":[],"mappings":";;;AACA,+EAAqE;AACrE,2EAAkE;AAClE,qEAA8D;AAC9D,qEAA8D;AAC9D,qEAA8D;AAC9D,6EAAqE;AACrE,iFAA0E;AAO1E,MAAM,UAAU,GAAgB;IAC5B,mDAAqB;IACrB,gDAAoB;IACpB,4CAAmB;IACnB,4CAAmB;IACnB,4CAAmB;IACnB,mDAAsB;IACtB,wDAAyB;CACnB,CAAA;AAEG,QAAA,cAAc,GAAG;IAC1B,KAAK,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC7C,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,SAAoB,EAAE,EAAE;YACnD,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,mBAAmB,EAAE,CAAC;gBACtD,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YACjC,CAAC;YACD,OAAO,GAAG,CAAA;QACd,CAAC,EAAE,WAAW,CAAC,CAAA;IACnB,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateBranchToRouter: Migration;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateBranchToRouter = void 0;
4
- const action_1 = require("../../actions/action");
5
- const flow_structure_util_1 = require("../../util/flow-structure-util");
6
- exports.migrateBranchToRouter = {
7
- targetSchemaVersion: undefined,
8
- migrate: (flowVersion) => {
9
- const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
10
- var _a, _b;
11
- const unschemedStep = step;
12
- if (unschemedStep.type === 'BRANCH') {
13
- const routerAction = {
14
- displayName: step.displayName,
15
- name: step.name,
16
- valid: step.valid,
17
- type: action_1.FlowActionType.ROUTER,
18
- settings: {
19
- branches: [
20
- {
21
- branchName: 'Branch 1',
22
- conditions: step.settings.conditions,
23
- branchType: action_1.BranchExecutionType.CONDITION,
24
- },
25
- {
26
- branchName: 'Otherwise',
27
- branchType: action_1.BranchExecutionType.FALLBACK,
28
- },
29
- ],
30
- executionType: action_1.RouterExecutionType.EXECUTE_FIRST_MATCH,
31
- sampleData: {
32
- sampleDataFileId: undefined,
33
- sampleDataInputFileId: undefined,
34
- lastTestDate: undefined,
35
- },
36
- },
37
- nextAction: step.nextAction,
38
- children: [(_a = unschemedStep.onSuccessAction) !== null && _a !== void 0 ? _a : null, (_b = unschemedStep.onFailureAction) !== null && _b !== void 0 ? _b : null],
39
- };
40
- return routerAction;
41
- }
42
- return step;
43
- });
44
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '1' });
45
- },
46
- };
47
- //# sourceMappingURL=migrate-v0-branch-to-router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v0-branch-to-router.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.ts"],"names":[],"mappings":";;;AACA,iDAAyH;AAEzH,wEAAkE;AAGrD,QAAA,qBAAqB,GAAc;IAC5C,mBAAmB,EAAE,SAAS;IAC9B,OAAO,EAAE,CAAC,WAAwB,EAAE,EAAE;QAClC,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;;YACpE,MAAM,aAAa,GAAG,IAAgJ,CAAA;YACtK,IAAI,aAAa,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAClC,MAAM,YAAY,GAAiB;oBAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,IAAI,EAAE,uBAAc,CAAC,MAAM;oBAC3B,QAAQ,EAAE;wBACN,QAAQ,EAAE;4BACN;gCACI,UAAU,EAAE,UAAU;gCACtB,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU;gCACpC,UAAU,EAAE,4BAAmB,CAAC,SAAS;6BAC5C;4BACD;gCACI,UAAU,EAAE,WAAW;gCACvB,UAAU,EAAE,4BAAmB,CAAC,QAAQ;6BAC3C;yBACJ;wBACD,aAAa,EAAE,4BAAmB,CAAC,mBAAmB;wBACtD,UAAU,EAAE;4BACR,gBAAgB,EAAE,SAAS;4BAC3B,qBAAqB,EAAE,SAAS;4BAChC,YAAY,EAAE,SAAS;yBAC1B;qBACJ;oBACD,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,QAAQ,EAAE,CAAC,MAAA,aAAa,CAAC,eAAe,mCAAI,IAAI,EAAE,MAAA,aAAa,CAAC,eAAe,mCAAI,IAAI,CAAC;iBAC3F,CAAA;gBACD,OAAO,YAAY,CAAA;YACvB,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QACF,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateConnectionIds: Migration;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateConnectionIds = void 0;
4
- const flow_structure_util_1 = require("../../util/flow-structure-util");
5
- exports.migrateConnectionIds = {
6
- targetSchemaVersion: '1',
7
- migrate: (flowVersion) => {
8
- return Object.assign(Object.assign({}, flowVersion), { schemaVersion: '2', connectionIds: flow_structure_util_1.flowStructureUtil.extractConnectionIds(flowVersion) });
9
- },
10
- };
11
- //# sourceMappingURL=migrate-v1-connection-ids.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v1-connection-ids.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v1-connection-ids.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,oBAAoB,GAAc;IAC3C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,uCACO,WAAW,KACd,aAAa,EAAE,GAAG,EAClB,aAAa,EAAE,uCAAiB,CAAC,oBAAoB,CAAC,WAAW,CAAC,IACrE;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateAgentPieceV2: Migration;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateAgentPieceV2 = void 0;
4
- const flow_structure_util_1 = require("../../util/flow-structure-util");
5
- const flow_migration_util_1 = require("./flow-migration-util");
6
- exports.migrateAgentPieceV2 = {
7
- targetSchemaVersion: '2',
8
- migrate: (flowVersion) => {
9
- const newVersion = flow_migration_util_1.flowMigrationUtil.pinPieceToVersion(flowVersion, flow_structure_util_1.AGENT_PIECE_NAME, '0.2.0');
10
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '3' });
11
- },
12
- };
13
- //# sourceMappingURL=migrate-v2-agent-piece.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v2-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v2-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAiE;AACjE,+DAAyD;AAG5C,QAAA,mBAAmB,GAAc;IAC1C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,iBAAiB,CAAC,WAAW,EAAE,sCAAgB,EAAE,OAAO,CAAC,CAAA;QAC9F,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateAgentPieceV3: Migration;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateAgentPieceV3 = void 0;
4
- const flow_structure_util_1 = require("../../util/flow-structure-util");
5
- const flow_migration_util_1 = require("./flow-migration-util");
6
- exports.migrateAgentPieceV3 = {
7
- targetSchemaVersion: '3',
8
- migrate: (flowVersion) => {
9
- const newVersion = flow_migration_util_1.flowMigrationUtil.pinPieceToVersion(flowVersion, flow_structure_util_1.AGENT_PIECE_NAME, '0.2.2');
10
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '4' });
11
- },
12
- };
13
- //# sourceMappingURL=migrate-v3-agent-piece.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v3-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v3-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAiE;AACjE,+DAAyD;AAG5C,QAAA,mBAAmB,GAAc;IAC1C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,iBAAiB,CAAC,WAAW,EAAE,sCAAgB,EAAE,OAAO,CAAC,CAAA;QAC9F,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateAgentPieceV4: Migration;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateAgentPieceV4 = void 0;
4
- const flow_structure_util_1 = require("../../util/flow-structure-util");
5
- const flow_migration_util_1 = require("./flow-migration-util");
6
- exports.migrateAgentPieceV4 = {
7
- targetSchemaVersion: '4',
8
- migrate: (flowVersion) => {
9
- const newVersion = flow_migration_util_1.flowMigrationUtil.pinPieceToVersion(flowVersion, flow_structure_util_1.AGENT_PIECE_NAME, '0.2.4');
10
- const agentIds = flow_structure_util_1.flowStructureUtil.extractAgentIds(newVersion);
11
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '5', agentIds });
12
- },
13
- };
14
- //# sourceMappingURL=migrate-v4-agent-piece.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v4-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v4-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAoF;AACpF,+DAAyD;AAG5C,QAAA,mBAAmB,GAAc;IAC1C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,iBAAiB,CAAC,WAAW,EAAE,sCAAgB,EAAE,OAAO,CAAC,CAAA;QAC9F,MAAM,QAAQ,GAAG,uCAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QAC9D,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,EAClB,QAAQ,IACX;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migrateHttpToWebhookV5: Migration;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateHttpToWebhookV5 = void 0;
4
- const tslib_1 = require("tslib");
5
- const semver_1 = tslib_1.__importDefault(require("semver"));
6
- const action_1 = require("../../actions/action");
7
- const properties_1 = require("../../properties");
8
- const flow_structure_util_1 = require("../../util/flow-structure-util");
9
- const HTTP_PIECE_NAME = '@activepieces/piece-http';
10
- const WEBHOOK_PIECE_NAME = '@activepieces/piece-webhook';
11
- const HTTP_RETURN_RESPONSE_ACTION = 'return_response';
12
- const WEBHOOK_RETURN_RESPONSE_ACTION = 'return_response';
13
- exports.migrateHttpToWebhookV5 = {
14
- targetSchemaVersion: '5',
15
- migrate: (flowVersion) => {
16
- const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
17
- if (step.type === action_1.FlowActionType.PIECE &&
18
- step.settings.pieceName === HTTP_PIECE_NAME &&
19
- step.settings.actionName === HTTP_RETURN_RESPONSE_ACTION) {
20
- const httpInput = step.settings.input || {};
21
- const fields = {};
22
- const pieceVersionWithoutTildaOrPlus = step.settings.pieceVersion.replace('~', '').replace('^', '');
23
- // Check the scehma for each action in the http piece
24
- const isGreaterThanOrEqual050 = semver_1.default.gte(pieceVersionWithoutTildaOrPlus, '0.5.0');
25
- if (httpInput['body'] && typeof httpInput['body'] === 'object' && 'data' in httpInput['body'] && isGreaterThanOrEqual050) {
26
- fields['body'] = httpInput['body']['data'];
27
- }
28
- if (httpInput['body'] && typeof httpInput['body'] === 'object' && !isGreaterThanOrEqual050) {
29
- fields['body'] = httpInput['body'];
30
- }
31
- if (httpInput['status'] !== undefined) {
32
- fields['status'] = httpInput['status'];
33
- }
34
- if (httpInput['headers']) {
35
- fields['headers'] = httpInput['headers'];
36
- }
37
- const webhookInput = {
38
- respond: 'stop',
39
- responseType: httpInput['body_type'] || 'json',
40
- fields,
41
- };
42
- return Object.assign(Object.assign({}, step), { settings: Object.assign(Object.assign({}, step.settings), { pieceName: WEBHOOK_PIECE_NAME, pieceVersion: '0.1.20', actionName: WEBHOOK_RETURN_RESPONSE_ACTION, input: webhookInput, propertySettings: Object.assign(Object.assign({}, step.settings.propertySettings), { 'respond': {
43
- type: properties_1.PropertyExecutionType.MANUAL,
44
- schema: undefined,
45
- }, 'responseType': {
46
- type: properties_1.PropertyExecutionType.MANUAL,
47
- schema: undefined,
48
- }, 'fields': {
49
- type: properties_1.PropertyExecutionType.MANUAL,
50
- schema: undefined,
51
- } }) }) });
52
- }
53
- return step;
54
- });
55
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '6' });
56
- },
57
- };
58
- //# sourceMappingURL=migrate-v5-http-to-webhook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v5-http-to-webhook.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v5-http-to-webhook.ts"],"names":[],"mappings":";;;;AAAA,4DAA2B;AAC3B,iDAAqD;AAErD,iDAAwD;AACxD,wEAAkE;AAGlE,MAAM,eAAe,GAAG,0BAA0B,CAAA;AAClD,MAAM,kBAAkB,GAAG,6BAA6B,CAAA;AACxD,MAAM,2BAA2B,GAAG,iBAAiB,CAAA;AACrD,MAAM,8BAA8B,GAAG,iBAAiB,CAAA;AAE3C,QAAA,sBAAsB,GAAc;IAC7C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;YACpE,IACI,IAAI,CAAC,IAAI,KAAK,uBAAc,CAAC,KAAK;gBAClC,IAAI,CAAC,QAAQ,CAAC,SAAS,KAAK,eAAe;gBAC3C,IAAI,CAAC,QAAQ,CAAC,UAAU,KAAK,2BAA2B,EAC1D,CAAC;gBACC,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAA;gBAC3C,MAAM,MAAM,GAA4B,EAAE,CAAA;gBAC1C,MAAM,8BAA8B,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;gBACnG,qDAAqD;gBACrD,MAAM,uBAAuB,GAAG,gBAAM,CAAC,GAAG,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAA;gBAEnF,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,QAA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C,MAAM,EAAE,SAAS;6BACpB,UAGZ;YACL,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QAEF,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- import { Migration } from '.';
2
- export declare const migratePropertySettingsV6: Migration;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migratePropertySettingsV6 = void 0;
4
- const properties_1 = require("../../properties");
5
- const flow_structure_util_1 = require("../../util/flow-structure-util");
6
- exports.migratePropertySettingsV6 = {
7
- targetSchemaVersion: '6',
8
- migrate: (flowVersion) => {
9
- const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
11
- const input = (_b = (_a = step.settings) === null || _a === void 0 ? void 0 : _a.input) !== null && _b !== void 0 ? _b : {};
12
- const sampleDataFileId = (_d = (_c = step.settings) === null || _c === void 0 ? void 0 : _c.inputUiInfo) === null || _d === void 0 ? void 0 : _d.sampleDataFileId;
13
- const sampleDataInputFileId = (_f = (_e = step.settings) === null || _e === void 0 ? void 0 : _e.inputUiInfo) === null || _f === void 0 ? void 0 : _f.sampleDataInputFileId;
14
- const lastTestDate = (_h = (_g = step.settings) === null || _g === void 0 ? void 0 : _g.inputUiInfo) === null || _h === void 0 ? void 0 : _h.lastTestDate;
15
- const schema = (_j = step.settings) === null || _j === void 0 ? void 0 : _j.schema;
16
- const customLogoUrl = (_o = (_m = (_l = (_k = step.settings) === null || _k === void 0 ? void 0 : _k.inputUiInfo) === null || _l === void 0 ? void 0 : _l.customizedInputs) === null || _m === void 0 ? void 0 : _m.logoUrl) !== null && _o !== void 0 ? _o : (('customLogoUrl' in step && step.customLogoUrl) ? step.customLogoUrl : undefined);
17
- const customizedInputs = (_r = (_q = (_p = step.settings) === null || _p === void 0 ? void 0 : _p.inputUiInfo) === null || _q === void 0 ? void 0 : _q.customizedInputs) !== null && _r !== void 0 ? _r : {};
18
- return Object.assign(Object.assign({}, step), { settings: Object.assign(Object.assign({}, step.settings), { customLogoUrl, sampleDataSettings: {
19
- sampleDataFileId,
20
- sampleDataInputFileId,
21
- lastTestDate,
22
- }, propertySettings: Object.fromEntries(Object.entries(input).map(([key]) => {
23
- var _a;
24
- return [key, {
25
- type: (customizedInputs === null || customizedInputs === void 0 ? void 0 : customizedInputs[key]) ? properties_1.PropertyExecutionType.DYNAMIC : properties_1.PropertyExecutionType.MANUAL,
26
- schema: (_a = schema === null || schema === void 0 ? void 0 : schema[key]) !== null && _a !== void 0 ? _a : undefined,
27
- }];
28
- })), inputUiInfo: undefined }) });
29
- });
30
- return Object.assign(Object.assign({}, newVersion), { schemaVersion: '7' });
31
- },
32
- };
33
- //# sourceMappingURL=migrate-v6-property-settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate-v6-property-settings.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v6-property-settings.ts"],"names":[],"mappings":";;;AACA,iDAAwD;AACxD,wEAAkE;AAGrD,QAAA,yBAAyB,GAAc;IAChD,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;;YACpE,MAAM,KAAK,GAAG,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,mCAAI,EAAE,CAAA;YACxC,MAAM,gBAAgB,GAAG,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,WAAW,0CAAE,gBAAgB,CAAA;YACrE,MAAM,qBAAqB,GAAG,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,WAAW,0CAAE,qBAAqB,CAAA;YAC/E,MAAM,YAAY,GAAG,MAAA,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