@activepieces/shared 0.3.17 → 0.3.19

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 (90) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +5 -6
  3. package/src/index.js +6 -13
  4. package/src/index.js.map +1 -1
  5. package/src/lib/authentication/model/principal.d.ts +0 -2
  6. package/src/lib/common/activepieces-error.d.ts +8 -13
  7. package/src/lib/common/activepieces-error.js +2 -3
  8. package/src/lib/common/activepieces-error.js.map +1 -1
  9. package/src/lib/common/telemetry.d.ts +6 -15
  10. package/src/lib/common/telemetry.js +1 -2
  11. package/src/lib/common/telemetry.js.map +1 -1
  12. package/src/lib/engine/engine-operation.d.ts +27 -11
  13. package/src/lib/engine/engine-operation.js +7 -1
  14. package/src/lib/engine/engine-operation.js.map +1 -1
  15. package/src/lib/flow-run/create-flow-run-request.d.ts +0 -1
  16. package/src/lib/flow-run/create-flow-run-request.js +0 -1
  17. package/src/lib/flow-run/create-flow-run-request.js.map +1 -1
  18. package/src/lib/flow-run/flow-run.d.ts +0 -3
  19. package/src/lib/flow-run/flow-run.js.map +1 -1
  20. package/src/lib/flows/dto/count-flows-request.d.ts +3 -0
  21. package/src/lib/flows/dto/count-flows-request.js +3 -0
  22. package/src/lib/flows/dto/count-flows-request.js.map +1 -0
  23. package/src/lib/flows/dto/create-flow-request.d.ts +2 -6
  24. package/src/lib/flows/dto/create-flow-request.js +2 -3
  25. package/src/lib/flows/dto/create-flow-request.js.map +1 -1
  26. package/src/lib/flows/dto/list-flows-request.d.ts +2 -4
  27. package/src/lib/flows/dto/list-flows-request.js +1 -1
  28. package/src/lib/flows/dto/list-flows-request.js.map +1 -1
  29. package/src/lib/flows/dto/list-folders-response.d.ts +4 -0
  30. package/src/lib/flows/dto/list-folders-response.js +3 -0
  31. package/src/lib/flows/dto/list-folders-response.js.map +1 -0
  32. package/src/lib/flows/flow-instances/flow-instance.d.ts +25 -0
  33. package/src/lib/flows/flow-instances/flow-instance.js +13 -0
  34. package/src/lib/flows/flow-instances/flow-instance.js.map +1 -0
  35. package/src/lib/flows/flow-instances/flow-instances-requests.d.ts +17 -0
  36. package/src/lib/flows/flow-instances/flow-instances-requests.js +15 -0
  37. package/src/lib/flows/flow-instances/flow-instances-requests.js.map +1 -0
  38. package/src/lib/flows/flow-instances/index.d.ts +2 -0
  39. package/src/lib/flows/flow-instances/index.js +6 -0
  40. package/src/lib/flows/flow-instances/index.js.map +1 -0
  41. package/src/lib/flows/flow-operations.d.ts +10 -0
  42. package/src/lib/flows/flow-operations.js +9 -1
  43. package/src/lib/flows/flow-operations.js.map +1 -1
  44. package/src/lib/flows/flow-version.js.map +1 -1
  45. package/src/lib/flows/flow.d.ts +4 -2
  46. package/src/lib/flows/folders/folder-requests.d.ts +17 -0
  47. package/src/lib/flows/folders/folder-requests.js +15 -0
  48. package/src/lib/flows/folders/folder-requests.js.map +1 -0
  49. package/src/lib/flows/folders/folder.d.ts +14 -0
  50. package/src/lib/flows/folders/folder.js +8 -0
  51. package/src/lib/flows/folders/folder.js.map +1 -0
  52. package/src/lib/flows/step-run/dto/test-step-request.d.ts +0 -1
  53. package/src/lib/flows/step-run/dto/test-step-request.js +0 -1
  54. package/src/lib/flows/step-run/dto/test-step-request.js.map +1 -1
  55. package/src/lib/instance/index.d.ts +0 -1
  56. package/src/lib/instance/index.js +0 -1
  57. package/src/lib/instance/index.js.map +1 -1
  58. package/src/lib/instance/model/instance.d.ts +0 -2
  59. package/src/lib/instance/model/instance.js.map +1 -1
  60. package/src/lib/pieces/dto/piece-option-request.d.ts +0 -1
  61. package/src/lib/pieces/dto/piece-option-request.js +1 -2
  62. package/src/lib/pieces/dto/piece-option-request.js.map +1 -1
  63. package/src/lib/store-entry/store-entry.d.ts +2 -2
  64. package/src/lib/workers/code-worker/code-execution-result.d.ts +5 -1
  65. package/src/lib/workers/code-worker/code-execution-result.js +7 -0
  66. package/src/lib/workers/code-worker/code-execution-result.js.map +1 -1
  67. package/src/lib/collections/collection.d.ts +0 -30
  68. package/src/lib/collections/collection.js +0 -19
  69. package/src/lib/collections/collection.js.map +0 -1
  70. package/src/lib/collections/dto/create-collection-request.d.ts +0 -5
  71. package/src/lib/collections/dto/create-collection-request.js +0 -8
  72. package/src/lib/collections/dto/create-collection-request.js.map +0 -1
  73. package/src/lib/collections/dto/list-collections-request.d.ts +0 -11
  74. package/src/lib/collections/dto/list-collections-request.js +0 -9
  75. package/src/lib/collections/dto/list-collections-request.js.map +0 -1
  76. package/src/lib/collections/dto/update-collection-request.d.ts +0 -5
  77. package/src/lib/collections/dto/update-collection-request.js +0 -8
  78. package/src/lib/collections/dto/update-collection-request.js.map +0 -1
  79. package/src/lib/instance/dto/get-instance-request.d.ts +0 -5
  80. package/src/lib/instance/dto/get-instance-request.js +0 -8
  81. package/src/lib/instance/dto/get-instance-request.js.map +0 -1
  82. package/src/lib/instance/dto/index.d.ts +0 -2
  83. package/src/lib/instance/dto/index.js +0 -6
  84. package/src/lib/instance/dto/index.js.map +0 -1
  85. package/src/lib/instance/dto/upsert-instance-request.d.ts +0 -14
  86. package/src/lib/instance/dto/upsert-instance-request.js +0 -13
  87. package/src/lib/instance/dto/upsert-instance-request.js.map +0 -1
  88. package/src/lib/workers/code-worker/code-run-status.d.ts +0 -8
  89. package/src/lib/workers/code-worker/code-run-status.js +0 -13
  90. package/src/lib/workers/code-worker/code-run-status.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/shared",
3
- "version": "0.3.17",
3
+ "version": "0.3.19",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@sinclair/typebox": "0.26.8",
package/src/index.d.ts CHANGED
@@ -21,8 +21,7 @@ export * from "./lib/instance";
21
21
  export * from "./lib/pieces";
22
22
  export * from "./lib/store-entry/dto/store-entry-request";
23
23
  export * from "./lib/webhook";
24
- export { CodeRunStatus } from "./lib/workers/code-worker/code-run-status";
25
- export { CodeExecutionResult } from "./lib/workers/code-worker/code-execution-result";
24
+ export * from "./lib/workers/code-worker/code-execution-result";
26
25
  export { ExecuteCodeRequest } from './lib/code/dto/code-request';
27
26
  export { AuthenticationResponse } from './lib/authentication/dto/authentication-response';
28
27
  export { SignUpRequest } from './lib/authentication/dto/sign-up-request';
@@ -34,7 +33,6 @@ export { StoreEntry, StoreEntryId } from './lib/store-entry/store-entry';
34
33
  export * from './lib/user/user';
35
34
  export { CreateFlowRunRequest } from './lib/flow-run/create-flow-run-request';
36
35
  export { Trigger, EmptyTrigger, PieceTriggerSettings, PieceTrigger, WebhookTrigger, TriggerType } from './lib/flows/triggers/trigger';
37
- export { Collection, CollectionId, CollectionListDto, CollectionStatus } from './lib/collections/collection';
38
36
  export { FlowVersion, FlowVersionState, FlowVersionId } from './lib/flows/flow-version';
39
37
  export { Flow, FlowId } from './lib/flows/flow';
40
38
  export { File, FileId } from './lib/file/file';
@@ -42,10 +40,7 @@ export * from './lib/flows/flow-helper';
42
40
  export { FlowRun, FlowRunId, RunEnvironment } from './lib/flow-run/flow-run';
43
41
  export { ExecutionState } from './lib/flow-run/execution/execution-state';
44
42
  export { Project, ProjectId } from './lib/project/project';
45
- export { ListCollectionsRequest, } from './lib/collections/dto/list-collections-request';
46
43
  export { ListFlowsRequest } from './lib/flows/dto/list-flows-request';
47
- export { CreateCollectionRequest } from './lib/collections/dto/create-collection-request';
48
- export { UpdateCollectionRequest } from './lib/collections/dto/update-collection-request';
49
44
  export * from './lib/flows/dto/create-flow-request';
50
45
  export { CloneFlowVersionRequest } from './lib/flows/dto/clone-flow-version-request';
51
46
  export { SeekPage, Cursor } from './lib/common/seek-page';
@@ -53,4 +48,8 @@ export { apId, ApId } from './lib/common/id-generator';
53
48
  export * from "./lib/flows/trigger-events/trigger-events-dto";
54
49
  export * from "./lib/flows/trigger-events/trigger-event";
55
50
  export { SampleDataSettings } from './lib/flows/sample-data';
51
+ export * from './lib/flows/dto/count-flows-request';
56
52
  export * from './lib/common/base-model';
53
+ export * from './lib/flows/flow-instances';
54
+ export * from "./lib/flows/folders/folder";
55
+ export * from "./lib/flows/folders/folder-requests";
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApId = exports.apId = exports.UpdateCollectionRequest = exports.CreateCollectionRequest = exports.ListFlowsRequest = exports.ListCollectionsRequest = exports.ExecutionState = exports.RunEnvironment = exports.FlowVersionState = exports.CollectionStatus = exports.CollectionListDto = exports.Collection = exports.TriggerType = exports.WebhookTrigger = exports.PieceTrigger = exports.PieceTriggerSettings = exports.EmptyTrigger = exports.Trigger = exports.CreateFlowRunRequest = exports.CodeActionSettings = exports.ActionType = exports.Action = exports.LoopOnItemsActionSettings = exports.PieceActionSettings = exports.PrincipalType = exports.SignInRequest = exports.SignUpRequest = exports.ExecuteCodeRequest = exports.CodeRunStatus = exports.StepOutputStatus = void 0;
3
+ exports.ApId = exports.apId = exports.ListFlowsRequest = exports.ExecutionState = exports.RunEnvironment = exports.FlowVersionState = exports.TriggerType = exports.WebhookTrigger = exports.PieceTrigger = exports.PieceTriggerSettings = exports.EmptyTrigger = exports.Trigger = exports.CreateFlowRunRequest = exports.CodeActionSettings = exports.ActionType = exports.Action = exports.LoopOnItemsActionSettings = exports.PieceActionSettings = exports.PrincipalType = exports.SignInRequest = exports.SignUpRequest = exports.ExecuteCodeRequest = exports.StepOutputStatus = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./lib/flows/actions/action"), exports);
6
6
  tslib_1.__exportStar(require("./lib/app-connection/app-connection"), exports);
@@ -26,8 +26,7 @@ tslib_1.__exportStar(require("./lib/instance"), exports);
26
26
  tslib_1.__exportStar(require("./lib/pieces"), exports);
27
27
  tslib_1.__exportStar(require("./lib/store-entry/dto/store-entry-request"), exports);
28
28
  tslib_1.__exportStar(require("./lib/webhook"), exports);
29
- var code_run_status_1 = require("./lib/workers/code-worker/code-run-status");
30
- Object.defineProperty(exports, "CodeRunStatus", { enumerable: true, get: function () { return code_run_status_1.CodeRunStatus; } });
29
+ tslib_1.__exportStar(require("./lib/workers/code-worker/code-execution-result"), exports);
31
30
  var code_request_1 = require("./lib/code/dto/code-request");
32
31
  Object.defineProperty(exports, "ExecuteCodeRequest", { enumerable: true, get: function () { return code_request_1.ExecuteCodeRequest; } });
33
32
  var sign_up_request_1 = require("./lib/authentication/dto/sign-up-request");
@@ -52,10 +51,6 @@ Object.defineProperty(exports, "PieceTriggerSettings", { enumerable: true, get:
52
51
  Object.defineProperty(exports, "PieceTrigger", { enumerable: true, get: function () { return trigger_1.PieceTrigger; } });
53
52
  Object.defineProperty(exports, "WebhookTrigger", { enumerable: true, get: function () { return trigger_1.WebhookTrigger; } });
54
53
  Object.defineProperty(exports, "TriggerType", { enumerable: true, get: function () { return trigger_1.TriggerType; } });
55
- var collection_1 = require("./lib/collections/collection");
56
- Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
57
- Object.defineProperty(exports, "CollectionListDto", { enumerable: true, get: function () { return collection_1.CollectionListDto; } });
58
- Object.defineProperty(exports, "CollectionStatus", { enumerable: true, get: function () { return collection_1.CollectionStatus; } });
59
54
  var flow_version_1 = require("./lib/flows/flow-version");
60
55
  Object.defineProperty(exports, "FlowVersionState", { enumerable: true, get: function () { return flow_version_1.FlowVersionState; } });
61
56
  tslib_1.__exportStar(require("./lib/flows/flow-helper"), exports);
@@ -63,21 +58,19 @@ var flow_run_1 = require("./lib/flow-run/flow-run");
63
58
  Object.defineProperty(exports, "RunEnvironment", { enumerable: true, get: function () { return flow_run_1.RunEnvironment; } });
64
59
  var execution_state_1 = require("./lib/flow-run/execution/execution-state");
65
60
  Object.defineProperty(exports, "ExecutionState", { enumerable: true, get: function () { return execution_state_1.ExecutionState; } });
66
- var list_collections_request_1 = require("./lib/collections/dto/list-collections-request");
67
- Object.defineProperty(exports, "ListCollectionsRequest", { enumerable: true, get: function () { return list_collections_request_1.ListCollectionsRequest; } });
68
61
  var list_flows_request_1 = require("./lib/flows/dto/list-flows-request");
69
62
  Object.defineProperty(exports, "ListFlowsRequest", { enumerable: true, get: function () { return list_flows_request_1.ListFlowsRequest; } });
70
- var create_collection_request_1 = require("./lib/collections/dto/create-collection-request");
71
- Object.defineProperty(exports, "CreateCollectionRequest", { enumerable: true, get: function () { return create_collection_request_1.CreateCollectionRequest; } });
72
- var update_collection_request_1 = require("./lib/collections/dto/update-collection-request");
73
- Object.defineProperty(exports, "UpdateCollectionRequest", { enumerable: true, get: function () { return update_collection_request_1.UpdateCollectionRequest; } });
74
63
  tslib_1.__exportStar(require("./lib/flows/dto/create-flow-request"), exports);
75
64
  var id_generator_1 = require("./lib/common/id-generator");
76
65
  Object.defineProperty(exports, "apId", { enumerable: true, get: function () { return id_generator_1.apId; } });
77
66
  Object.defineProperty(exports, "ApId", { enumerable: true, get: function () { return id_generator_1.ApId; } });
78
67
  tslib_1.__exportStar(require("./lib/flows/trigger-events/trigger-events-dto"), exports);
79
68
  tslib_1.__exportStar(require("./lib/flows/trigger-events/trigger-event"), exports);
69
+ tslib_1.__exportStar(require("./lib/flows/dto/count-flows-request"), exports);
80
70
  tslib_1.__exportStar(require("./lib/common/base-model"), exports);
71
+ tslib_1.__exportStar(require("./lib/flows/flow-instances"), exports);
72
+ tslib_1.__exportStar(require("./lib/flows/folders/folder"), exports);
73
+ tslib_1.__exportStar(require("./lib/flows/folders/folder-requests"), exports);
81
74
  const system_1 = require("@sinclair/typebox/system");
82
75
  // Look at https://github.com/sinclairzx81/typebox/issues/350
83
76
  system_1.TypeSystem.ExactOptionalPropertyTypes = false;
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/shared/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA2C;AAC3C,8EAAoD;AACpD,+FAAqE;AACrE,iGAAuE;AACvE,uDAA6B;AAC7B,0EAAgD;AAChD,iEAAuC;AACvC,wEAA8C;AAC9C,0DAAgC;AAChC,oFAA0D;AAC1D,oFAA0D;AAC1D,+EAAqD;AACrD,sEAA4C;AAC5C,+DAAqC;AACrC,yDAA+B;AAC/B,8EAAoD;AACpD,iGAAuE;AACvE,oFAA0D;AAC1D,oEAAwE;AAA/D,+GAAA,gBAAgB,OAAA;AACzB,yDAA+B;AAC/B,uDAA6B;AAC7B,oFAA0D;AAC1D,wDAA8B;AAE9B,6EAA0E;AAAjE,gHAAA,aAAa,OAAA;AAEtB,4DAAiE;AAAxD,kHAAA,kBAAkB,OAAA;AAE3B,4EAAyE;AAAhE,gHAAA,aAAa,OAAA;AACtB,4EAAyE;AAAhE,gHAAA,aAAa,OAAA;AACtB,4EAA0E;AAAjE,+GAAA,aAAa,OAAA;AAEtB,qDAGmC;AAD/B,6GAAA,mBAAmB,OAAA;AAAE,mHAAA,yBAAyB,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAG1F,0DAAgC;AAChC,kFAA8E;AAArE,+HAAA,oBAAoB,OAAA;AAC7B,wDAAsI;AAA7H,kGAAA,OAAO,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAAA;AAC/F,2DAA6G;AAApG,wGAAA,UAAU,OAAA;AAAgB,+GAAA,iBAAiB,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AACtE,yDAAwF;AAAlE,gHAAA,gBAAgB,OAAA;AAGtC,kEAAwC;AACxC,oDAA4E;AAA/C,0GAAA,cAAc,OAAA;AAC3C,4EAA0E;AAAjE,iHAAA,cAAc,OAAA;AAEvB,2FAAyF;AAAhF,kIAAA,sBAAsB,OAAA;AAC/B,yEAAsE;AAA7D,sHAAA,gBAAgB,OAAA;AACzB,6FAA0F;AAAjF,oIAAA,uBAAuB,OAAA;AAChC,6FAA0F;AAAjF,oIAAA,uBAAuB,OAAA;AAChC,8EAAoD;AAGpD,0DAAsD;AAA7C,oGAAA,IAAI,OAAA;AAAE,oGAAA,IAAI,OAAA;AACnB,wFAA8D;AAC9D,mFAAyD;AAEzD,kEAAwC;AAGxC,qDAAqD;AACrD,6DAA6D;AAC7D,mBAAU,CAAC,0BAA0B,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/shared/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA2C;AAC3C,8EAAoD;AACpD,+FAAqE;AACrE,iGAAuE;AACvE,uDAA6B;AAC7B,0EAAgD;AAChD,iEAAuC;AACvC,wEAA8C;AAC9C,0DAAgC;AAChC,oFAA0D;AAC1D,oFAA0D;AAC1D,+EAAqD;AACrD,sEAA4C;AAC5C,+DAAqC;AACrC,yDAA+B;AAC/B,8EAAoD;AACpD,iGAAuE;AACvE,oFAA0D;AAC1D,oEAAwE;AAA/D,+GAAA,gBAAgB,OAAA;AACzB,yDAA+B;AAC/B,uDAA6B;AAC7B,oFAA0D;AAC1D,wDAA8B;AAE9B,0FAAgE;AAChE,4DAAiE;AAAxD,kHAAA,kBAAkB,OAAA;AAE3B,4EAAyE;AAAhE,gHAAA,aAAa,OAAA;AACtB,4EAAyE;AAAhE,gHAAA,aAAa,OAAA;AACtB,4EAA0E;AAAjE,+GAAA,aAAa,OAAA;AAEtB,qDAGmC;AAD/B,6GAAA,mBAAmB,OAAA;AAAE,mHAAA,yBAAyB,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAG1F,0DAAgC;AAChC,kFAA8E;AAArE,+HAAA,oBAAoB,OAAA;AAC7B,wDAAsI;AAA7H,kGAAA,OAAO,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAAA;AAC/F,yDAAwF;AAAlE,gHAAA,gBAAgB,OAAA;AAGtC,kEAAwC;AACxC,oDAA4E;AAA/C,0GAAA,cAAc,OAAA;AAC3C,4EAA0E;AAAjE,iHAAA,cAAc,OAAA;AAEvB,yEAAsE;AAA7D,sHAAA,gBAAgB,OAAA;AACzB,8EAAoD;AAGpD,0DAAsD;AAA7C,oGAAA,IAAI,OAAA;AAAE,oGAAA,IAAI,OAAA;AACnB,wFAA8D;AAC9D,mFAAyD;AAEzD,8EAAmD;AACnD,kEAAwC;AACxC,qEAA2C;AAC3C,qEAA2C;AAC3C,8EAAoD;AACpD,qDAAqD;AACrD,6DAA6D;AAC7D,mBAAU,CAAC,0BAA0B,GAAG,KAAK,CAAC"}
@@ -1,13 +1,11 @@
1
1
  import { ApId } from '../../common/id-generator';
2
2
  import { PrincipalType } from './principal-type';
3
- import { CollectionId } from "../../collections/collection";
4
3
  import { ProjectId } from '../../project/project';
5
4
  export declare type Principal = WorkerPrincipal | UserPrincipal;
6
5
  export interface UserPrincipal extends BasePrincipal<PrincipalType.USER> {
7
6
  projectId: ProjectId;
8
7
  }
9
8
  export interface WorkerPrincipal extends BasePrincipal<PrincipalType.WORKER> {
10
- collectionId: CollectionId;
11
9
  projectId: ProjectId;
12
10
  }
13
11
  interface BasePrincipal<T> {
@@ -1,5 +1,4 @@
1
1
  import { AppConnectionId } from "../app-connection/app-connection";
2
- import { CollectionId } from "../collections/collection";
3
2
  import { FileId } from "../file/file";
4
3
  import { FlowRunId } from "../flow-run/flow-run";
5
4
  import { FlowId } from "../flows/flow";
@@ -10,7 +9,7 @@ export declare class ActivepiecesError extends Error {
10
9
  error: ErrorParams;
11
10
  constructor(error: ErrorParams, message?: string);
12
11
  }
13
- declare type ErrorParams = CollectionNotFoundErrorParams | ConfigNotFoundErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowNotFoundErrorParams | FlowRunNotFoundErrorParams | FlowVersionNotFoundErrorParams | InstanceNotFoundErrorParams | InvalidBearerTokenParams | InvalidCredentialsErrorParams | JobRemovalFailureErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | StepNotFoundErrorParams | AppConnectionNotFoundErrorParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidJwtTokenErrorParams | TaskQuotaExeceededErrorParams | TriggerFailedErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | OpenAiFailedErrorParams | TestTriggerFailedErrorParams | FlowOperationErrorParams | EntityNotFoundErrorParams | ValidationErrorParams;
12
+ declare type ErrorParams = ConfigNotFoundErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowNotFoundErrorParams | FlowRunNotFoundErrorParams | FlowVersionNotFoundErrorParams | FlowInstanceNotFoundErrorParams | InvalidBearerTokenParams | InvalidCredentialsErrorParams | JobRemovalFailureErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | StepNotFoundErrorParams | AppConnectionNotFoundErrorParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidJwtTokenErrorParams | TaskQuotaExeceededErrorParams | TriggerFailedErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | OpenAiFailedErrorParams | TestTriggerFailedErrorParams | FlowOperationErrorParams | EntityNotFoundErrorParams | ValidationErrorParams | ExecutionTimeoutErrorParams;
14
13
  export interface BaseErrorParams<T, V> {
15
14
  code: T;
16
15
  params: V;
@@ -36,14 +35,10 @@ export declare type SystemInvalidErrorParams = BaseErrorParams<ErrorCode.SYSTEM_
36
35
  export declare type FlowNotFoundErrorParams = BaseErrorParams<ErrorCode.FLOW_NOT_FOUND, {
37
36
  id: FlowId;
38
37
  }>;
39
- export declare type CollectionNotFoundErrorParams = BaseErrorParams<ErrorCode.COLLECTION_NOT_FOUND, {
40
- id: CollectionId;
41
- }>;
42
- export declare type InstanceNotFoundErrorParams = BaseErrorParams<ErrorCode.INSTANCE_NOT_FOUND, {
38
+ export declare type FlowInstanceNotFoundErrorParams = BaseErrorParams<ErrorCode.FLOW_INSTANCE_NOT_FOUND, {
43
39
  id?: InstanceId;
44
- collectionId?: CollectionId;
45
40
  }>;
46
- export declare type FlowRunNotFoundErrorParams = BaseErrorParams<ErrorCode.INSTANCE_NOT_FOUND, {
41
+ export declare type FlowRunNotFoundErrorParams = BaseErrorParams<ErrorCode.FLOW_RUN_NOT_FOUND, {
47
42
  id: FlowRunId;
48
43
  }>;
49
44
  export declare type FlowVersionNotFoundErrorParams = BaseErrorParams<ErrorCode.FLOW_VERSION_NOT_FOUND, {
@@ -73,7 +68,7 @@ export declare type TriggerFailedErrorParams = BaseErrorParams<ErrorCode.TRIGGER
73
68
  pieceName: string;
74
69
  pieceVersion: string;
75
70
  triggerName: string;
76
- error: Error;
71
+ error: string | undefined;
77
72
  }>;
78
73
  export declare type ConfigNotFoundErrorParams = BaseErrorParams<ErrorCode.CONFIG_NOT_FOUND, {
79
74
  pieceName: string;
@@ -101,12 +96,11 @@ export declare type TestTriggerFailedErrorParams = BaseErrorParams<ErrorCode.TES
101
96
  export declare type EntityNotFoundErrorParams = BaseErrorParams<ErrorCode.ENTITY_NOT_FOUND, {
102
97
  message: string;
103
98
  }>;
99
+ export declare type ExecutionTimeoutErrorParams = BaseErrorParams<ErrorCode.EXECUTION_TIMEOUT, Record<string, never>>;
104
100
  export declare type ValidationErrorParams = BaseErrorParams<ErrorCode.VALIDATION, {
105
101
  message: string;
106
102
  }>;
107
103
  export declare enum ErrorCode {
108
- COLLECTION_NOT_FOUND = "COLLECTION_NOT_FOUND",
109
- COLLECTION_VERSION_NOT_FOUND = "COLLECTION_VERSION_NOT_FOUND",
110
104
  CONFIG_NOT_FOUND = "CONFIG_NOT_FOUND",
111
105
  EXISTING_USER = "EXISTING_USER",
112
106
  APP_CONNECTION_NOT_FOUND = "APP_CONNECTION_NOT_FOUND",
@@ -114,7 +108,7 @@ export declare enum ErrorCode {
114
108
  FLOW_NOT_FOUND = "FLOW_NOT_FOUND",
115
109
  FLOW_RUN_NOT_FOUND = "INSTANCE_NOT_FOUND",
116
110
  FLOW_VERSION_NOT_FOUND = "FLOW_VERSION_NOT_FOUND",
117
- INSTANCE_NOT_FOUND = "INSTANCE_NOT_FOUND",
111
+ FLOW_INSTANCE_NOT_FOUND = "INSTANCE_NOT_FOUND",
118
112
  INVALID_BEARER_TOKEN = "INVALID_BEARER_TOKEN",
119
113
  INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
120
114
  JOB_REMOVAL_FAILURE = "JOB_REMOVAL_FAILURE",
@@ -132,6 +126,7 @@ export declare enum ErrorCode {
132
126
  OPENAI_FAILED = "OPENAI_FAILED",
133
127
  TEST_TRIGGER_FAILED = "TEST_TRIGGER_FAILED",
134
128
  ENTITY_NOT_FOUND = "ENTITY_NOT_FOUND",
135
- VALIDATION = "VALIDATION"
129
+ VALIDATION = "VALIDATION",
130
+ EXECUTION_TIMEOUT = "EXECUTION_TIMEOUT"
136
131
  }
137
132
  export {};
@@ -10,8 +10,6 @@ class ActivepiecesError extends Error {
10
10
  exports.ActivepiecesError = ActivepiecesError;
11
11
  var ErrorCode;
12
12
  (function (ErrorCode) {
13
- ErrorCode["COLLECTION_NOT_FOUND"] = "COLLECTION_NOT_FOUND";
14
- ErrorCode["COLLECTION_VERSION_NOT_FOUND"] = "COLLECTION_VERSION_NOT_FOUND";
15
13
  ErrorCode["CONFIG_NOT_FOUND"] = "CONFIG_NOT_FOUND";
16
14
  ErrorCode["EXISTING_USER"] = "EXISTING_USER";
17
15
  ErrorCode["APP_CONNECTION_NOT_FOUND"] = "APP_CONNECTION_NOT_FOUND";
@@ -19,7 +17,7 @@ var ErrorCode;
19
17
  ErrorCode["FLOW_NOT_FOUND"] = "FLOW_NOT_FOUND";
20
18
  ErrorCode["FLOW_RUN_NOT_FOUND"] = "INSTANCE_NOT_FOUND";
21
19
  ErrorCode["FLOW_VERSION_NOT_FOUND"] = "FLOW_VERSION_NOT_FOUND";
22
- ErrorCode["INSTANCE_NOT_FOUND"] = "INSTANCE_NOT_FOUND";
20
+ ErrorCode["FLOW_INSTANCE_NOT_FOUND"] = "INSTANCE_NOT_FOUND";
23
21
  ErrorCode["INVALID_BEARER_TOKEN"] = "INVALID_BEARER_TOKEN";
24
22
  ErrorCode["INVALID_CREDENTIALS"] = "INVALID_CREDENTIALS";
25
23
  ErrorCode["JOB_REMOVAL_FAILURE"] = "JOB_REMOVAL_FAILURE";
@@ -38,5 +36,6 @@ var ErrorCode;
38
36
  ErrorCode["TEST_TRIGGER_FAILED"] = "TEST_TRIGGER_FAILED";
39
37
  ErrorCode["ENTITY_NOT_FOUND"] = "ENTITY_NOT_FOUND";
40
38
  ErrorCode["VALIDATION"] = "VALIDATION";
39
+ ErrorCode["EXECUTION_TIMEOUT"] = "EXECUTION_TIMEOUT";
41
40
  })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
42
41
  //# sourceMappingURL=activepieces-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AASA,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;AAsND,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB,0DAA6C,CAAA;IAC7C,0EAA6D,CAAA;IAC7D,kDAAqC,CAAA;IACrC,4CAA+B,CAAA;IAC/B,kEAAqD,CAAA;IACrD,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,sDAAyC,CAAA;IACzC,8DAAiD,CAAA;IACjD,sDAAyC,CAAA;IACzC,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,gEAAmD,CAAA;IACnD,8CAAiC,CAAA;IACjC,gEAAmD,CAAA;IACnD,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,0EAA6D,CAAA;IAC7D,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,kDAAqC,CAAA;IACrC,sCAAyB,CAAA;AAC3B,CAAC,EA7BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA6BpB"}
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;AAmND,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACnB,kDAAqC,CAAA;IACrC,4CAA+B,CAAA;IAC/B,kEAAqD,CAAA;IACrD,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,sDAAyC,CAAA;IACzC,8DAAiD,CAAA;IACjD,2DAA8C,CAAA;IAC9C,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,gEAAmD,CAAA;IACnD,8CAAiC,CAAA;IACjC,gEAAmD,CAAA;IACnD,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,0EAA6D,CAAA;IAC7D,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,kDAAqC,CAAA;IACrC,sCAAyB,CAAA;IACzB,oDAAuC,CAAA;AACzC,CAAC,EA5BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA4BpB"}
@@ -1,26 +1,18 @@
1
- import { CollectionId } from "../collections/collection";
2
1
  import { RunEnvironment } from "../flow-run/flow-run";
3
2
  import { FlowId } from "../flows/flow";
4
3
  import { ProjectId } from "../project/project";
5
4
  import { UserId } from "../user/user";
6
- interface CollectionCreated {
7
- collectionId: CollectionId;
8
- projectId: ProjectId;
9
- }
10
- interface CollectionEnabled {
11
- collectionId: CollectionId;
12
- projectId: ProjectId;
13
- }
14
5
  interface FlowCreated {
15
- collectionId: CollectionId;
16
6
  flowId: FlowId;
17
7
  }
18
8
  interface RunCreated {
19
9
  projectId: ProjectId;
20
10
  flowId: FlowId;
21
- collectionId: CollectionId;
22
11
  environment: RunEnvironment;
23
12
  }
13
+ interface FlowPublished {
14
+ flowId: FlowId;
15
+ }
24
16
  interface SignedUp {
25
17
  userId: UserId;
26
18
  email: string;
@@ -29,15 +21,14 @@ interface SignedUp {
29
21
  projectId: ProjectId;
30
22
  }
31
23
  export declare enum TelemetryEventName {
32
- COLLECTION_ENABLED = "collection.enabled",
33
24
  SIGNED_UP = "signed.up",
34
25
  FLOW_CREATED = "flow.created",
35
- COLLECTION_CREATED = "collection.created",
36
- FLOW_RUN_CREATED = "run.created"
26
+ FLOW_RUN_CREATED = "run.created",
27
+ FLOW_PUBLISHED = "flow.published"
37
28
  }
38
29
  interface BaseTelemetryEvent<T, P> {
39
30
  name: T;
40
31
  payload: P;
41
32
  }
42
- export declare type TelemetryEvent = BaseTelemetryEvent<TelemetryEventName.COLLECTION_CREATED, CollectionCreated> | BaseTelemetryEvent<TelemetryEventName.COLLECTION_ENABLED, CollectionEnabled> | BaseTelemetryEvent<TelemetryEventName.SIGNED_UP, SignedUp> | BaseTelemetryEvent<TelemetryEventName.FLOW_RUN_CREATED, RunCreated> | BaseTelemetryEvent<TelemetryEventName.FLOW_CREATED, FlowCreated>;
33
+ export declare type TelemetryEvent = BaseTelemetryEvent<TelemetryEventName.SIGNED_UP, SignedUp> | BaseTelemetryEvent<TelemetryEventName.FLOW_RUN_CREATED, RunCreated> | BaseTelemetryEvent<TelemetryEventName.FLOW_PUBLISHED, FlowPublished> | BaseTelemetryEvent<TelemetryEventName.FLOW_CREATED, FlowCreated>;
43
34
  export {};
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TelemetryEventName = void 0;
4
4
  var TelemetryEventName;
5
5
  (function (TelemetryEventName) {
6
- TelemetryEventName["COLLECTION_ENABLED"] = "collection.enabled";
7
6
  TelemetryEventName["SIGNED_UP"] = "signed.up";
8
7
  TelemetryEventName["FLOW_CREATED"] = "flow.created";
9
- TelemetryEventName["COLLECTION_CREATED"] = "collection.created";
10
8
  TelemetryEventName["FLOW_RUN_CREATED"] = "run.created";
9
+ TelemetryEventName["FLOW_PUBLISHED"] = "flow.published";
11
10
  })(TelemetryEventName = exports.TelemetryEventName || (exports.TelemetryEventName = {}));
12
11
  //# sourceMappingURL=telemetry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/telemetry.ts"],"names":[],"mappings":";;;AAoCA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,+DAAyC,CAAA;IACzC,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;IAC7B,+DAAyC,CAAA;IACzC,sDAAgC,CAAA;AACpC,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B"}
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/telemetry.ts"],"names":[],"mappings":";;;AA4BA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;IAC7B,sDAAgC,CAAA;IAChC,uDAAiC,CAAA;AACrC,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
@@ -1,4 +1,3 @@
1
- import { CollectionId } from "../collections/collection";
2
1
  import { FlowVersion, FlowVersionId } from "../flows/flow-version";
3
2
  import { ProjectId } from "../project/project";
4
3
  export declare enum EngineOperationType {
@@ -13,7 +12,7 @@ export declare enum TriggerHookType {
13
12
  RUN = "RUN",
14
13
  TEST = "TEST"
15
14
  }
16
- export declare type EngineOperation = ExecuteActionOperation | ExecuteFlowOperation | ExecutePropsOptions | ExecuteTriggerOperation;
15
+ export declare type EngineOperation = ExecuteActionOperation | ExecuteFlowOperation | ExecutePropsOptions | ExecuteTriggerOperation<TriggerHookType>;
17
16
  export declare type ExecuteActionOperation = {
18
17
  actionName: string;
19
18
  pieceName: string;
@@ -21,7 +20,6 @@ export declare type ExecuteActionOperation = {
21
20
  input: Record<string, unknown>;
22
21
  testExecutionContext: Record<string, unknown>;
23
22
  projectId: ProjectId;
24
- collectionId: CollectionId;
25
23
  workerToken?: string;
26
24
  apiUrl?: string;
27
25
  };
@@ -32,31 +30,33 @@ export interface ExecutePropsOptions {
32
30
  stepName: string;
33
31
  input: Record<string, any>;
34
32
  projectId: ProjectId;
35
- collectionId: CollectionId;
36
33
  apiUrl?: string;
37
34
  workerToken?: string;
38
35
  }
39
36
  export interface ExecuteFlowOperation {
40
37
  flowVersionId: FlowVersionId;
41
- collectionId: CollectionId;
42
38
  projectId: ProjectId;
43
39
  triggerPayload: unknown;
44
40
  workerToken?: string;
45
41
  apiUrl?: string;
46
42
  }
47
- export interface ExecuteTriggerOperation {
48
- hookType: TriggerHookType;
43
+ export interface ExecuteTriggerOperation<HT extends TriggerHookType> {
44
+ hookType: HT;
49
45
  flowVersion: FlowVersion;
50
46
  webhookUrl: string;
51
- triggerPayload?: unknown;
47
+ triggerPayload?: TriggerPayload;
52
48
  projectId: ProjectId;
53
- collectionId: CollectionId;
54
49
  workerToken?: string;
55
50
  apiUrl?: string;
56
51
  edition?: string;
57
52
  appWebhookUrl?: string;
58
53
  webhookSecret?: string;
59
54
  }
55
+ export declare type TriggerPayload = Record<string, never> | {
56
+ body: any;
57
+ headers: Record<string, string>;
58
+ queryParams: Record<string, string>;
59
+ };
60
60
  export interface EventPayload {
61
61
  body: any;
62
62
  rawBody?: any;
@@ -76,16 +76,32 @@ export interface AppEventListener {
76
76
  events: string[];
77
77
  identifierValue: string;
78
78
  }
79
- export interface ExecuteTestOrRunTriggerResponse {
79
+ interface ExecuteTestOrRunTriggerResponse {
80
80
  success: boolean;
81
81
  message?: string;
82
82
  output: unknown[];
83
83
  }
84
- export interface ExecuteTriggerResponse {
84
+ interface ExecuteOnEnableTriggerResponse {
85
85
  listeners: AppEventListener[];
86
86
  scheduleOptions: ScheduleOptions;
87
87
  }
88
+ export declare type ExecuteTriggerResponse<H extends TriggerHookType> = H extends TriggerHookType.RUN ? ExecuteTestOrRunTriggerResponse : H extends TriggerHookType.TEST ? ExecuteTestOrRunTriggerResponse : H extends TriggerHookType.ON_DISABLE ? Record<string, never> : ExecuteOnEnableTriggerResponse;
89
+ export declare type ExecuteActionResponse = {
90
+ success: boolean;
91
+ output: unknown;
92
+ message?: string;
93
+ };
88
94
  export interface ScheduleOptions {
89
95
  cronExpression: string;
90
96
  timezone?: string;
91
97
  }
98
+ export declare type EngineResponse<T> = {
99
+ status: EngineResponseStatus;
100
+ response: T;
101
+ };
102
+ export declare enum EngineResponseStatus {
103
+ OK = "OK",
104
+ ERROR = "ERROR",
105
+ TIMEOUT = "TIMEOUT"
106
+ }
107
+ export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TriggerHookType = exports.EngineOperationType = void 0;
3
+ exports.EngineResponseStatus = exports.TriggerHookType = exports.EngineOperationType = void 0;
4
4
  var EngineOperationType;
5
5
  (function (EngineOperationType) {
6
6
  EngineOperationType["EXECUTE_ACTION"] = "EXECUTE_ACTION";
@@ -16,4 +16,10 @@ var TriggerHookType;
16
16
  TriggerHookType["TEST"] = "TEST";
17
17
  })(TriggerHookType = exports.TriggerHookType || (exports.TriggerHookType = {}));
18
18
  ;
19
+ var EngineResponseStatus;
20
+ (function (EngineResponseStatus) {
21
+ EngineResponseStatus["OK"] = "OK";
22
+ EngineResponseStatus["ERROR"] = "ERROR";
23
+ EngineResponseStatus["TIMEOUT"] = "TIMEOUT";
24
+ })(EngineResponseStatus = exports.EngineResponseStatus || (exports.EngineResponseStatus = {}));
19
25
  //# sourceMappingURL=engine-operation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine-operation.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/engine/engine-operation.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,wDAAiC,CAAA;IACjC,oDAA6B,CAAA;IAC7B,4DAAqC,CAAA;IACrC,oEAA6C,CAAA;AACjD,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AA2EA,CAAC"}
1
+ {"version":3,"file":"engine-operation.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/engine/engine-operation.ts"],"names":[],"mappings":";;;AAGA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,wDAAiC,CAAA;IACjC,oDAA6B,CAAA;IAC7B,4DAAqC,CAAA;IACrC,oEAA6C,CAAA;AACjD,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AA6EA,CAAC;AAmCF,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,uCAAe,CAAA;IACf,2CAAmB,CAAA;AACvB,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"}
@@ -2,6 +2,5 @@ import { Static } from '@sinclair/typebox';
2
2
  export declare const CreateFlowRunRequest: import("@sinclair/typebox").TObject<{
3
3
  flowVersionId: import("@sinclair/typebox").TString<string>;
4
4
  payload: import("@sinclair/typebox").TAny;
5
- collectionId: import("@sinclair/typebox").TString<string>;
6
5
  }>;
7
6
  export declare type CreateFlowRunRequest = Static<typeof CreateFlowRunRequest>;
@@ -5,6 +5,5 @@ const typebox_1 = require("@sinclair/typebox");
5
5
  exports.CreateFlowRunRequest = typebox_1.Type.Object({
6
6
  flowVersionId: typebox_1.Type.String(),
7
7
  payload: typebox_1.Type.Any(),
8
- collectionId: typebox_1.Type.String(),
9
8
  });
10
9
  //# sourceMappingURL=create-flow-run-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-flow-run-request.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flow-run/create-flow-run-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,oBAAoB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,aAAa,EAAE,cAAI,CAAC,MAAM,EAAE;IAC5B,OAAO,EAAE,cAAI,CAAC,GAAG,EAAE;IACnB,YAAY,EAAE,cAAI,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC"}
1
+ {"version":3,"file":"create-flow-run-request.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flow-run/create-flow-run-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,oBAAoB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,aAAa,EAAE,cAAI,CAAC,MAAM,EAAE;IAC5B,OAAO,EAAE,cAAI,CAAC,GAAG,EAAE;CACpB,CAAC,CAAC"}
@@ -2,7 +2,6 @@ import { BaseModel } from '../common/base-model';
2
2
  import { ProjectId } from '../project/project';
3
3
  import { FlowVersionId } from '../flows/flow-version';
4
4
  import { FileId } from '../file/file';
5
- import { CollectionId } from '../collections/collection';
6
5
  import { ApId } from '../common/id-generator';
7
6
  import { ExecutionOutput, ExecutionOutputStatus } from './execution/execution-output';
8
7
  import { FlowId } from '../flows/flow';
@@ -11,10 +10,8 @@ export interface FlowRun extends BaseModel<FlowRunId> {
11
10
  id: FlowRunId;
12
11
  projectId: ProjectId;
13
12
  flowId: FlowId;
14
- collectionId: CollectionId;
15
13
  flowVersionId: FlowVersionId;
16
14
  flowDisplayName: string;
17
- collectionDisplayName: string;
18
15
  logsFileId: FileId | null;
19
16
  status: ExecutionOutputStatus;
20
17
  startTime: string;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-run.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flow-run/flow-run.ts"],"names":[],"mappings":";;;AAgCA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"}
1
+ {"version":3,"file":"flow-run.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flow-run/flow-run.ts"],"names":[],"mappings":";;;AA6BA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"}
@@ -0,0 +1,3 @@
1
+ export declare type CountFlowsRequest = {
2
+ folderId?: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=count-flows-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-flows-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/count-flows-request.ts"],"names":[],"mappings":""}
@@ -1,15 +1,11 @@
1
1
  import { Static } from "@sinclair/typebox";
2
- import { CollectionId } from "../../collections/collection";
3
2
  export declare const CreateFlowRequest: import("@sinclair/typebox").TObject<{
4
3
  displayName: import("@sinclair/typebox").TString<string>;
5
- collectionId: import("@sinclair/typebox").TString<string>;
4
+ folderId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
6
5
  }>;
7
- export declare type CreateFlowRequest = Omit<Static<typeof CreateFlowRequest>, "collectionId"> & {
8
- collectionId: CollectionId;
9
- };
6
+ export declare type CreateFlowRequest = Static<typeof CreateFlowRequest>;
10
7
  export declare const GuessFlowRequest: import("@sinclair/typebox").TObject<{
11
8
  prompt: import("@sinclair/typebox").TString<string>;
12
9
  displayName: import("@sinclair/typebox").TString<string>;
13
- collectionId: import("@sinclair/typebox").TString<string>;
14
10
  }>;
15
11
  export declare type GuessFlowRequest = Static<typeof GuessFlowRequest>;
@@ -4,11 +4,10 @@ exports.GuessFlowRequest = exports.CreateFlowRequest = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
5
  exports.CreateFlowRequest = typebox_1.Type.Object({
6
6
  displayName: typebox_1.Type.String({}),
7
- collectionId: typebox_1.Type.String({})
7
+ folderId: typebox_1.Type.Optional(typebox_1.Type.String({}))
8
8
  });
9
9
  exports.GuessFlowRequest = typebox_1.Type.Object({
10
10
  prompt: typebox_1.Type.String({}),
11
- displayName: typebox_1.Type.String({}),
12
- collectionId: typebox_1.Type.String({}),
11
+ displayName: typebox_1.Type.String({})
13
12
  });
14
13
  //# sourceMappingURL=create-flow-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-flow-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/create-flow-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAGpC,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,YAAY,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;CAChC,CAAC,CAAC;AAKU,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACvB,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,YAAY,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;CAChC,CAAC,CAAC"}
1
+ {"version":3,"file":"create-flow-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/create-flow-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CAC3C,CAAC,CAAC;AAKU,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACvB,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;CAC/B,CAAC,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import { Static } from "@sinclair/typebox";
2
- import { CollectionId } from "../../collections/collection";
3
2
  import { Cursor } from "../../common/seek-page";
4
3
  export declare const ListFlowsRequest: import("@sinclair/typebox").TObject<{
5
- collectionId: import("@sinclair/typebox").TString<string>;
4
+ folderId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
6
5
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
7
6
  cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
8
7
  }>;
9
- export declare type ListFlowsRequest = Omit<Omit<Static<typeof ListFlowsRequest>, "collectionId">, "cursor"> & {
10
- collectionId: CollectionId;
8
+ export declare type ListFlowsRequest = Omit<Static<typeof ListFlowsRequest>, "cursor"> & {
11
9
  cursor: Cursor | undefined;
12
10
  };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ListFlowsRequest = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
5
  exports.ListFlowsRequest = typebox_1.Type.Object({
6
- collectionId: typebox_1.Type.String({}),
6
+ folderId: typebox_1.Type.Optional(typebox_1.Type.String()),
7
7
  limit: typebox_1.Type.Optional(typebox_1.Type.Number({})),
8
8
  cursor: typebox_1.Type.Optional(typebox_1.Type.String({})),
9
9
  });
@@ -1 +1 @@
1
- {"version":3,"file":"list-flows-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/list-flows-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAIpC,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7B,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CACzC,CAAC,CAAC"}
1
+ {"version":3,"file":"list-flows-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/list-flows-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAGpC,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IACtC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CACzC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Folder } from "../folders/folder";
2
+ export declare type FolderDto = Folder & {
3
+ numberOfFlows: number;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=list-folders-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-folders-response.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/flows/dto/list-folders-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ import { ApId } from "../../common/id-generator";
3
+ import { ProjectId } from "../../project/project";
4
+ import { FlowId } from "../flow";
5
+ import { FlowVersionId } from "../flow-version";
6
+ export declare type FlowInstanceId = ApId;
7
+ export declare enum FlowInstanceStatus {
8
+ ENABLED = "ENABLED",
9
+ DISABLED = "DISABLED",
10
+ UNPUBLISHED = "UNPUBLISHED"
11
+ }
12
+ export declare const FlowInstance: import("@sinclair/typebox").TObject<{
13
+ projectId: import("@sinclair/typebox").TString<string>;
14
+ flowId: import("@sinclair/typebox").TString<string>;
15
+ flowVersionId: import("@sinclair/typebox").TString<string>;
16
+ status: import("@sinclair/typebox").TEnum<typeof FlowInstanceStatus>;
17
+ id: import("@sinclair/typebox").TString<string>;
18
+ created: import("@sinclair/typebox").TString<string>;
19
+ updated: import("@sinclair/typebox").TString<string>;
20
+ }>;
21
+ export declare type FlowInstance = Static<typeof FlowInstance> & {
22
+ projectId: ProjectId;
23
+ flowId: FlowId;
24
+ flowVersionId: FlowVersionId;
25
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowInstance = exports.FlowInstanceStatus = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ const common_1 = require("../../common");
6
+ var FlowInstanceStatus;
7
+ (function (FlowInstanceStatus) {
8
+ FlowInstanceStatus["ENABLED"] = "ENABLED";
9
+ FlowInstanceStatus["DISABLED"] = "DISABLED";
10
+ FlowInstanceStatus["UNPUBLISHED"] = "UNPUBLISHED";
11
+ })(FlowInstanceStatus = exports.FlowInstanceStatus || (exports.FlowInstanceStatus = {}));
12
+ exports.FlowInstance = typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { projectId: typebox_1.Type.String(), flowId: typebox_1.Type.String(), flowVersionId: typebox_1.Type.String(), status: typebox_1.Type.Enum(FlowInstanceStatus) }));
13
+ //# sourceMappingURL=flow-instance.js.map