@activepieces/shared 0.0.0-alpha.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.
Files changed (197) hide show
  1. package/README.md +7 -0
  2. package/package.json +14 -0
  3. package/src/index.d.ts +55 -0
  4. package/src/index.js +83 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/app-connection/app-connection.d.ts +87 -0
  7. package/src/lib/app-connection/app-connection.js +22 -0
  8. package/src/lib/app-connection/app-connection.js.map +1 -0
  9. package/src/lib/app-connection/dto/read-app-connection-request.d.ts +7 -0
  10. package/src/lib/app-connection/dto/read-app-connection-request.js +10 -0
  11. package/src/lib/app-connection/dto/read-app-connection-request.js.map +1 -0
  12. package/src/lib/app-connection/dto/upsert-app-connection-request.d.ts +125 -0
  13. package/src/lib/app-connection/dto/upsert-app-connection-request.js +53 -0
  14. package/src/lib/app-connection/dto/upsert-app-connection-request.js.map +1 -0
  15. package/src/lib/app-connection/oauth2-authorization-method.d.ts +4 -0
  16. package/src/lib/app-connection/oauth2-authorization-method.js +10 -0
  17. package/src/lib/app-connection/oauth2-authorization-method.js.map +1 -0
  18. package/src/lib/authentication/dto/authentication-response.d.ts +5 -0
  19. package/src/lib/authentication/dto/authentication-response.js +3 -0
  20. package/src/lib/authentication/dto/authentication-response.js.map +1 -0
  21. package/src/lib/authentication/dto/sign-in-request.d.ts +6 -0
  22. package/src/lib/authentication/dto/sign-in-request.js +14 -0
  23. package/src/lib/authentication/dto/sign-in-request.js.map +1 -0
  24. package/src/lib/authentication/dto/sign-up-request.d.ts +10 -0
  25. package/src/lib/authentication/dto/sign-up-request.js +18 -0
  26. package/src/lib/authentication/dto/sign-up-request.js.map +1 -0
  27. package/src/lib/authentication/model/principal-type.d.ts +5 -0
  28. package/src/lib/authentication/model/principal-type.js +10 -0
  29. package/src/lib/authentication/model/principal-type.js.map +1 -0
  30. package/src/lib/authentication/model/principal.d.ts +18 -0
  31. package/src/lib/authentication/model/principal.js +3 -0
  32. package/src/lib/authentication/model/principal.js.map +1 -0
  33. package/src/lib/code/dto/code-request.d.ts +6 -0
  34. package/src/lib/code/dto/code-request.js +9 -0
  35. package/src/lib/code/dto/code-request.js.map +1 -0
  36. package/src/lib/common/activepieces-error.d.ts +158 -0
  37. package/src/lib/common/activepieces-error.js +49 -0
  38. package/src/lib/common/activepieces-error.js.map +1 -0
  39. package/src/lib/common/base-model.d.ts +10 -0
  40. package/src/lib/common/base-model.js +10 -0
  41. package/src/lib/common/base-model.js.map +1 -0
  42. package/src/lib/common/id-generator.d.ts +4 -0
  43. package/src/lib/common/id-generator.js +12 -0
  44. package/src/lib/common/id-generator.js.map +1 -0
  45. package/src/lib/common/index.d.ts +2 -0
  46. package/src/lib/common/index.js +6 -0
  47. package/src/lib/common/index.js.map +1 -0
  48. package/src/lib/common/seek-page.d.ts +12 -0
  49. package/src/lib/common/seek-page.js +11 -0
  50. package/src/lib/common/seek-page.js.map +1 -0
  51. package/src/lib/common/telemetry.d.ts +41 -0
  52. package/src/lib/common/telemetry.js +13 -0
  53. package/src/lib/common/telemetry.js.map +1 -0
  54. package/src/lib/common/utils/assertions.d.ts +2 -0
  55. package/src/lib/common/utils/assertions.js +14 -0
  56. package/src/lib/common/utils/assertions.js.map +1 -0
  57. package/src/lib/common/utils/index.d.ts +3 -0
  58. package/src/lib/common/utils/index.js +7 -0
  59. package/src/lib/common/utils/index.js.map +1 -0
  60. package/src/lib/common/utils/object-utils.d.ts +3 -0
  61. package/src/lib/common/utils/object-utils.js +14 -0
  62. package/src/lib/common/utils/object-utils.js.map +1 -0
  63. package/src/lib/common/utils/utils.d.ts +4 -0
  64. package/src/lib/common/utils/utils.js +34 -0
  65. package/src/lib/common/utils/utils.js.map +1 -0
  66. package/src/lib/engine/engine-operation.d.ts +165 -0
  67. package/src/lib/engine/engine-operation.js +30 -0
  68. package/src/lib/engine/engine-operation.js.map +1 -0
  69. package/src/lib/file/file.d.ts +16 -0
  70. package/src/lib/file/file.js +10 -0
  71. package/src/lib/file/file.js.map +1 -0
  72. package/src/lib/flag/flag.d.ts +29 -0
  73. package/src/lib/flag/flag.js +19 -0
  74. package/src/lib/flag/flag.js.map +1 -0
  75. package/src/lib/flow-run/dto/list-flow-runs-request.d.ts +13 -0
  76. package/src/lib/flow-run/dto/list-flow-runs-request.js +14 -0
  77. package/src/lib/flow-run/dto/list-flow-runs-request.js.map +1 -0
  78. package/src/lib/flow-run/execution/execution-output.d.ts +62 -0
  79. package/src/lib/flow-run/execution/execution-output.js +19 -0
  80. package/src/lib/flow-run/execution/execution-output.js.map +1 -0
  81. package/src/lib/flow-run/execution/execution-state.d.ts +26 -0
  82. package/src/lib/flow-run/execution/execution-state.js +153 -0
  83. package/src/lib/flow-run/execution/execution-state.js.map +1 -0
  84. package/src/lib/flow-run/execution/execution-type.d.ts +4 -0
  85. package/src/lib/flow-run/execution/execution-type.js +9 -0
  86. package/src/lib/flow-run/execution/execution-type.js.map +1 -0
  87. package/src/lib/flow-run/execution/step-output.d.ts +37 -0
  88. package/src/lib/flow-run/execution/step-output.js +12 -0
  89. package/src/lib/flow-run/execution/step-output.js.map +1 -0
  90. package/src/lib/flow-run/flow-run.d.ts +28 -0
  91. package/src/lib/flow-run/flow-run.js +9 -0
  92. package/src/lib/flow-run/flow-run.js.map +1 -0
  93. package/src/lib/flow-run/test-flow-run-request.d.ts +5 -0
  94. package/src/lib/flow-run/test-flow-run-request.js +9 -0
  95. package/src/lib/flow-run/test-flow-run-request.js.map +1 -0
  96. package/src/lib/flows/actions/action.d.ts +363 -0
  97. package/src/lib/flows/actions/action.js +152 -0
  98. package/src/lib/flows/actions/action.js.map +1 -0
  99. package/src/lib/flows/dto/count-flows-request.d.ts +3 -0
  100. package/src/lib/flows/dto/count-flows-request.js +3 -0
  101. package/src/lib/flows/dto/count-flows-request.js.map +1 -0
  102. package/src/lib/flows/dto/create-flow-request.d.ts +6 -0
  103. package/src/lib/flows/dto/create-flow-request.js +9 -0
  104. package/src/lib/flows/dto/create-flow-request.js.map +1 -0
  105. package/src/lib/flows/dto/flow-template-request.d.ts +103 -0
  106. package/src/lib/flows/dto/flow-template-request.js +23 -0
  107. package/src/lib/flows/dto/flow-template-request.js.map +1 -0
  108. package/src/lib/flows/dto/list-flows-request.d.ts +20 -0
  109. package/src/lib/flows/dto/list-flows-request.js +20 -0
  110. package/src/lib/flows/dto/list-flows-request.js.map +1 -0
  111. package/src/lib/flows/flow-helper.d.ts +40 -0
  112. package/src/lib/flows/flow-helper.js +537 -0
  113. package/src/lib/flows/flow-helper.js.map +1 -0
  114. package/src/lib/flows/flow-instances/flow-instance.d.ts +39 -0
  115. package/src/lib/flows/flow-instances/flow-instance.js +22 -0
  116. package/src/lib/flows/flow-instances/flow-instance.js.map +1 -0
  117. package/src/lib/flows/flow-instances/flow-instances-requests.d.ts +17 -0
  118. package/src/lib/flows/flow-instances/flow-instances-requests.js +15 -0
  119. package/src/lib/flows/flow-instances/flow-instances-requests.js.map +1 -0
  120. package/src/lib/flows/flow-instances/index.d.ts +2 -0
  121. package/src/lib/flows/flow-instances/index.js +6 -0
  122. package/src/lib/flows/flow-instances/index.js.map +1 -0
  123. package/src/lib/flows/flow-operations.d.ts +1041 -0
  124. package/src/lib/flows/flow-operations.js +93 -0
  125. package/src/lib/flows/flow-operations.js.map +1 -0
  126. package/src/lib/flows/flow-version.d.ts +56 -0
  127. package/src/lib/flows/flow-version.js +13 -0
  128. package/src/lib/flows/flow-version.js.map +1 -0
  129. package/src/lib/flows/flow.d.ts +66 -0
  130. package/src/lib/flows/flow.js +11 -0
  131. package/src/lib/flows/flow.js.map +1 -0
  132. package/src/lib/flows/folders/folder-requests.d.ts +17 -0
  133. package/src/lib/flows/folders/folder-requests.js +15 -0
  134. package/src/lib/flows/folders/folder-requests.js.map +1 -0
  135. package/src/lib/flows/folders/folder.d.ts +14 -0
  136. package/src/lib/flows/folders/folder.js +8 -0
  137. package/src/lib/flows/folders/folder.js.map +1 -0
  138. package/src/lib/flows/folders/list-folders-response.d.ts +4 -0
  139. package/src/lib/flows/folders/list-folders-response.js +3 -0
  140. package/src/lib/flows/folders/list-folders-response.js.map +1 -0
  141. package/src/lib/flows/index.d.ts +2 -0
  142. package/src/lib/flows/index.js +6 -0
  143. package/src/lib/flows/index.js.map +1 -0
  144. package/src/lib/flows/sample-data.d.ts +8 -0
  145. package/src/lib/flows/sample-data.js +17 -0
  146. package/src/lib/flows/sample-data.js.map +1 -0
  147. package/src/lib/flows/step-file/step-file.d.ts +29 -0
  148. package/src/lib/flows/step-file/step-file.js +18 -0
  149. package/src/lib/flows/step-file/step-file.js.map +1 -0
  150. package/src/lib/flows/step-run/dto/test-step-request.d.ts +12 -0
  151. package/src/lib/flows/step-run/dto/test-step-request.js +15 -0
  152. package/src/lib/flows/step-run/dto/test-step-request.js.map +1 -0
  153. package/src/lib/flows/step-run/index.d.ts +1 -0
  154. package/src/lib/flows/step-run/index.js +5 -0
  155. package/src/lib/flows/step-run/index.js.map +1 -0
  156. package/src/lib/flows/trigger-events/trigger-event.d.ts +9 -0
  157. package/src/lib/flows/trigger-events/trigger-event.js +3 -0
  158. package/src/lib/flows/trigger-events/trigger-event.js.map +1 -0
  159. package/src/lib/flows/trigger-events/trigger-events-dto.d.ts +16 -0
  160. package/src/lib/flows/trigger-events/trigger-events-dto.js +13 -0
  161. package/src/lib/flows/trigger-events/trigger-events-dto.js.map +1 -0
  162. package/src/lib/flows/triggers/trigger.d.ts +101 -0
  163. package/src/lib/flows/triggers/trigger.js +37 -0
  164. package/src/lib/flows/triggers/trigger.js.map +1 -0
  165. package/src/lib/pieces/dto/piece-requests.d.ts +33 -0
  166. package/src/lib/pieces/dto/piece-requests.js +33 -0
  167. package/src/lib/pieces/dto/piece-requests.js.map +1 -0
  168. package/src/lib/pieces/index.d.ts +2 -0
  169. package/src/lib/pieces/index.js +6 -0
  170. package/src/lib/pieces/index.js.map +1 -0
  171. package/src/lib/pieces/utils.d.ts +13 -0
  172. package/src/lib/pieces/utils.js +32 -0
  173. package/src/lib/pieces/utils.js.map +1 -0
  174. package/src/lib/project/project.d.ts +10 -0
  175. package/src/lib/project/project.js +3 -0
  176. package/src/lib/project/project.js.map +1 -0
  177. package/src/lib/project/update-project-request.d.ts +9 -0
  178. package/src/lib/project/update-project-request.js +13 -0
  179. package/src/lib/project/update-project-request.js.map +1 -0
  180. package/src/lib/store-entry/dto/store-entry-request.d.ts +14 -0
  181. package/src/lib/store-entry/dto/store-entry-request.js +15 -0
  182. package/src/lib/store-entry/dto/store-entry-request.js.map +1 -0
  183. package/src/lib/store-entry/store-entry.d.ts +9 -0
  184. package/src/lib/store-entry/store-entry.js +3 -0
  185. package/src/lib/store-entry/store-entry.js.map +1 -0
  186. package/src/lib/user/user.d.ts +16 -0
  187. package/src/lib/user/user.js +8 -0
  188. package/src/lib/user/user.js.map +1 -0
  189. package/src/lib/webhook/dto.d.ts +5 -0
  190. package/src/lib/webhook/dto.js +9 -0
  191. package/src/lib/webhook/dto.js.map +1 -0
  192. package/src/lib/webhook/index.d.ts +2 -0
  193. package/src/lib/webhook/index.js +6 -0
  194. package/src/lib/webhook/index.js.map +1 -0
  195. package/src/lib/webhook/webhook-simulation.d.ts +9 -0
  196. package/src/lib/webhook/webhook-simulation.js +3 -0
  197. package/src/lib/webhook/webhook-simulation.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # shared
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build shared` to build the library.
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@activepieces/shared",
3
+ "version": "0.0.0-alpha.1",
4
+ "type": "commonjs",
5
+ "dependencies": {
6
+ "@sinclair/typebox": "^0.26.3",
7
+ "nanoid": "^3.3.4",
8
+ "object-sizeof": "^2.6.3",
9
+ "semver": "7.5.4",
10
+ "tslib": "2.6.1"
11
+ },
12
+ "main": "./src/index.js",
13
+ "types": "./src/index.d.ts"
14
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,55 @@
1
+ export * from "./lib/flows/actions/action";
2
+ export * from "./lib/app-connection/app-connection";
3
+ export * from "./lib/app-connection/dto/read-app-connection-request";
4
+ export * from "./lib/app-connection/dto/upsert-app-connection-request";
5
+ export * from "./lib/common";
6
+ export * from "./lib/common/activepieces-error";
7
+ export * from "./lib/common/telemetry";
8
+ export * from "./lib/engine/engine-operation";
9
+ export * from "./lib/flag/flag";
10
+ export * from "./lib/flow-run/dto/list-flow-runs-request";
11
+ export * from "./lib/flow-run/execution/execution-output";
12
+ export * from "./lib/flow-run/execution/execution-type";
13
+ export * from "./lib/flow-run/execution/step-output";
14
+ export * from "./lib/flows/flow-operations";
15
+ export * from "./lib/flows/step-run";
16
+ export * from "./lib/app-connection/app-connection";
17
+ export * from "./lib/app-connection/dto/upsert-app-connection-request";
18
+ export * from "./lib/flow-run/execution/execution-output";
19
+ export { StepOutputStatus } from "./lib/flow-run/execution/step-output";
20
+ export * from "./lib/pieces";
21
+ export * from "./lib/store-entry/dto/store-entry-request";
22
+ export * from "./lib/webhook";
23
+ export * from './lib/flows/dto/count-flows-request';
24
+ export { ExecuteCodeRequest } from './lib/code/dto/code-request';
25
+ export { AuthenticationResponse } from './lib/authentication/dto/authentication-response';
26
+ export { SignUpRequest } from './lib/authentication/dto/sign-up-request';
27
+ export { SignInRequest } from './lib/authentication/dto/sign-in-request';
28
+ export { PrincipalType } from "./lib/authentication/model/principal-type";
29
+ export { Principal } from "./lib/authentication/model/principal";
30
+ export { CodeAction, PieceAction, LoopOnItemsAction, PieceActionSettings, LoopOnItemsActionSettings, Action, ActionType, CodeActionSettings, StepSettings } from './lib/flows/actions/action';
31
+ export { StoreEntry, StoreEntryId } from './lib/store-entry/store-entry';
32
+ export * from './lib/user/user';
33
+ export { TestFlowRunRequestBody } from "./lib/flow-run/test-flow-run-request";
34
+ export { Trigger, EmptyTrigger, PieceTriggerSettings, PieceTrigger, WebhookTrigger, TriggerType, AUTHENTICATION_PROPERTY_NAME } from './lib/flows/triggers/trigger';
35
+ export { FlowVersion, FlowVersionState, FlowVersionId } from './lib/flows/flow-version';
36
+ export { Flow, FlowId } from './lib/flows/flow';
37
+ export { File, FileId } from './lib/file/file';
38
+ export * from './lib/flows/flow-helper';
39
+ export { FlowRun, FlowRunId, RunEnvironment } from './lib/flow-run/flow-run';
40
+ export * from './lib/flow-run/execution/execution-state';
41
+ export { Project, ProjectId } from './lib/project/project';
42
+ export * from './lib/flows/dto/create-flow-request';
43
+ export { SeekPage, Cursor } from './lib/common/seek-page';
44
+ export { apId, ApId } from './lib/common/id-generator';
45
+ export * from "./lib/flows/trigger-events/trigger-events-dto";
46
+ export * from "./lib/flows/trigger-events/trigger-event";
47
+ export * from './lib/flows/sample-data';
48
+ export * from "./lib/project/update-project-request";
49
+ export * from './lib/common/base-model';
50
+ export * from './lib/flows/flow-instances';
51
+ export * from "./lib/flows/folders/folder";
52
+ export * from "./lib/flows/folders/folder-requests";
53
+ export * from "./lib/flows/dto/flow-template-request";
54
+ export * from "./lib/flows";
55
+ export * from "./lib/flows/dto/list-flows-request";
package/src/index.js ADDED
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApId = exports.apId = exports.SeekPage = exports.RunEnvironment = exports.Flow = exports.FlowVersionState = exports.FlowVersion = exports.AUTHENTICATION_PROPERTY_NAME = exports.TriggerType = exports.WebhookTrigger = exports.PieceTrigger = exports.PieceTriggerSettings = exports.EmptyTrigger = exports.Trigger = exports.TestFlowRunRequestBody = exports.CodeActionSettings = exports.ActionType = exports.Action = exports.LoopOnItemsActionSettings = exports.PieceActionSettings = exports.PrincipalType = exports.SignInRequest = exports.SignUpRequest = exports.ExecuteCodeRequest = exports.StepOutputStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./lib/flows/actions/action"), exports);
6
+ tslib_1.__exportStar(require("./lib/app-connection/app-connection"), exports);
7
+ tslib_1.__exportStar(require("./lib/app-connection/dto/read-app-connection-request"), exports);
8
+ tslib_1.__exportStar(require("./lib/app-connection/dto/upsert-app-connection-request"), exports);
9
+ tslib_1.__exportStar(require("./lib/common"), exports);
10
+ tslib_1.__exportStar(require("./lib/common/activepieces-error"), exports);
11
+ tslib_1.__exportStar(require("./lib/common/telemetry"), exports);
12
+ tslib_1.__exportStar(require("./lib/engine/engine-operation"), exports);
13
+ tslib_1.__exportStar(require("./lib/flag/flag"), exports);
14
+ tslib_1.__exportStar(require("./lib/flow-run/dto/list-flow-runs-request"), exports);
15
+ tslib_1.__exportStar(require("./lib/flow-run/execution/execution-output"), exports);
16
+ tslib_1.__exportStar(require("./lib/flow-run/execution/execution-type"), exports);
17
+ tslib_1.__exportStar(require("./lib/flow-run/execution/step-output"), exports);
18
+ tslib_1.__exportStar(require("./lib/flows/flow-operations"), exports);
19
+ tslib_1.__exportStar(require("./lib/flows/step-run"), exports);
20
+ tslib_1.__exportStar(require("./lib/app-connection/app-connection"), exports);
21
+ tslib_1.__exportStar(require("./lib/app-connection/dto/upsert-app-connection-request"), exports);
22
+ tslib_1.__exportStar(require("./lib/flow-run/execution/execution-output"), exports);
23
+ var step_output_1 = require("./lib/flow-run/execution/step-output");
24
+ Object.defineProperty(exports, "StepOutputStatus", { enumerable: true, get: function () { return step_output_1.StepOutputStatus; } });
25
+ tslib_1.__exportStar(require("./lib/pieces"), exports);
26
+ tslib_1.__exportStar(require("./lib/store-entry/dto/store-entry-request"), exports);
27
+ tslib_1.__exportStar(require("./lib/webhook"), exports);
28
+ tslib_1.__exportStar(require("./lib/flows/dto/count-flows-request"), exports);
29
+ var code_request_1 = require("./lib/code/dto/code-request");
30
+ Object.defineProperty(exports, "ExecuteCodeRequest", { enumerable: true, get: function () { return code_request_1.ExecuteCodeRequest; } });
31
+ var sign_up_request_1 = require("./lib/authentication/dto/sign-up-request");
32
+ Object.defineProperty(exports, "SignUpRequest", { enumerable: true, get: function () { return sign_up_request_1.SignUpRequest; } });
33
+ var sign_in_request_1 = require("./lib/authentication/dto/sign-in-request");
34
+ Object.defineProperty(exports, "SignInRequest", { enumerable: true, get: function () { return sign_in_request_1.SignInRequest; } });
35
+ var principal_type_1 = require("./lib/authentication/model/principal-type");
36
+ Object.defineProperty(exports, "PrincipalType", { enumerable: true, get: function () { return principal_type_1.PrincipalType; } });
37
+ var action_1 = require("./lib/flows/actions/action");
38
+ Object.defineProperty(exports, "PieceActionSettings", { enumerable: true, get: function () { return action_1.PieceActionSettings; } });
39
+ Object.defineProperty(exports, "LoopOnItemsActionSettings", { enumerable: true, get: function () { return action_1.LoopOnItemsActionSettings; } });
40
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return action_1.Action; } });
41
+ Object.defineProperty(exports, "ActionType", { enumerable: true, get: function () { return action_1.ActionType; } });
42
+ Object.defineProperty(exports, "CodeActionSettings", { enumerable: true, get: function () { return action_1.CodeActionSettings; } });
43
+ tslib_1.__exportStar(require("./lib/user/user"), exports);
44
+ var test_flow_run_request_1 = require("./lib/flow-run/test-flow-run-request");
45
+ Object.defineProperty(exports, "TestFlowRunRequestBody", { enumerable: true, get: function () { return test_flow_run_request_1.TestFlowRunRequestBody; } });
46
+ var trigger_1 = require("./lib/flows/triggers/trigger");
47
+ Object.defineProperty(exports, "Trigger", { enumerable: true, get: function () { return trigger_1.Trigger; } });
48
+ Object.defineProperty(exports, "EmptyTrigger", { enumerable: true, get: function () { return trigger_1.EmptyTrigger; } });
49
+ Object.defineProperty(exports, "PieceTriggerSettings", { enumerable: true, get: function () { return trigger_1.PieceTriggerSettings; } });
50
+ Object.defineProperty(exports, "PieceTrigger", { enumerable: true, get: function () { return trigger_1.PieceTrigger; } });
51
+ Object.defineProperty(exports, "WebhookTrigger", { enumerable: true, get: function () { return trigger_1.WebhookTrigger; } });
52
+ Object.defineProperty(exports, "TriggerType", { enumerable: true, get: function () { return trigger_1.TriggerType; } });
53
+ Object.defineProperty(exports, "AUTHENTICATION_PROPERTY_NAME", { enumerable: true, get: function () { return trigger_1.AUTHENTICATION_PROPERTY_NAME; } });
54
+ var flow_version_1 = require("./lib/flows/flow-version");
55
+ Object.defineProperty(exports, "FlowVersion", { enumerable: true, get: function () { return flow_version_1.FlowVersion; } });
56
+ Object.defineProperty(exports, "FlowVersionState", { enumerable: true, get: function () { return flow_version_1.FlowVersionState; } });
57
+ var flow_1 = require("./lib/flows/flow");
58
+ Object.defineProperty(exports, "Flow", { enumerable: true, get: function () { return flow_1.Flow; } });
59
+ tslib_1.__exportStar(require("./lib/flows/flow-helper"), exports);
60
+ var flow_run_1 = require("./lib/flow-run/flow-run");
61
+ Object.defineProperty(exports, "RunEnvironment", { enumerable: true, get: function () { return flow_run_1.RunEnvironment; } });
62
+ tslib_1.__exportStar(require("./lib/flow-run/execution/execution-state"), exports);
63
+ tslib_1.__exportStar(require("./lib/flows/dto/create-flow-request"), exports);
64
+ var seek_page_1 = require("./lib/common/seek-page");
65
+ Object.defineProperty(exports, "SeekPage", { enumerable: true, get: function () { return seek_page_1.SeekPage; } });
66
+ var id_generator_1 = require("./lib/common/id-generator");
67
+ Object.defineProperty(exports, "apId", { enumerable: true, get: function () { return id_generator_1.apId; } });
68
+ Object.defineProperty(exports, "ApId", { enumerable: true, get: function () { return id_generator_1.ApId; } });
69
+ tslib_1.__exportStar(require("./lib/flows/trigger-events/trigger-events-dto"), exports);
70
+ tslib_1.__exportStar(require("./lib/flows/trigger-events/trigger-event"), exports);
71
+ tslib_1.__exportStar(require("./lib/flows/sample-data"), exports);
72
+ tslib_1.__exportStar(require("./lib/project/update-project-request"), exports);
73
+ tslib_1.__exportStar(require("./lib/common/base-model"), exports);
74
+ tslib_1.__exportStar(require("./lib/flows/flow-instances"), exports);
75
+ tslib_1.__exportStar(require("./lib/flows/folders/folder"), exports);
76
+ tslib_1.__exportStar(require("./lib/flows/folders/folder-requests"), exports);
77
+ tslib_1.__exportStar(require("./lib/flows/dto/flow-template-request"), exports);
78
+ tslib_1.__exportStar(require("./lib/flows"), exports);
79
+ tslib_1.__exportStar(require("./lib/flows/dto/list-flows-request"), exports);
80
+ const system_1 = require("@sinclair/typebox/system");
81
+ // Look at https://github.com/sinclairzx81/typebox/issues/350
82
+ system_1.TypeSystem.ExactOptionalPropertyTypes = false;
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,kFAAwD;AACxD,+EAAqD;AACrD,sEAA4C;AAC5C,+DAAqC;AACrC,8EAAoD;AACpD,iGAAuE;AACvE,oFAA0D;AAC1D,oEAAwE;AAA/D,+GAAA,gBAAgB,OAAA;AACzB,uDAA6B;AAC7B,oFAA0D;AAC1D,wDAA8B;AAC9B,8EAAmD;AACnD,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,8EAA8E;AAArE,+HAAA,sBAAsB,OAAA;AAC/B,wDAAmK;AAA1J,kGAAA,OAAO,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,uHAAA,4BAA4B,OAAA;AAC7H,yDAAwF;AAA/E,2GAAA,WAAW,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACtC,yCAAgD;AAAvC,4FAAA,IAAI,OAAA;AAEb,kEAAwC;AACxC,oDAA4E;AAA/C,0GAAA,cAAc,OAAA;AAC3C,mFAAyD;AAEzD,8EAAoD;AACpD,oDAA0D;AAAjD,qGAAA,QAAQ,OAAA;AACjB,0DAAsD;AAA7C,oGAAA,IAAI,OAAA;AAAE,oGAAA,IAAI,OAAA;AACnB,wFAA8D;AAC9D,mFAAyD;AACzD,kEAAuC;AACvC,+EAAqD;AACrD,kEAAwC;AACxC,qEAA2C;AAC3C,qEAA2C;AAC3C,8EAAoD;AACpD,gFAAsD;AACtD,sDAA4B;AAC5B,6EAAmD;AAEnD,qDAAqD;AACrD,6DAA6D;AAC7D,mBAAU,CAAC,0BAA0B,GAAG,KAAK,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ import { BaseModel } from "../common/base-model";
3
+ import { OAuth2AuthorizationMethod } from "./oauth2-authorization-method";
4
+ export type AppConnectionId = string;
5
+ export declare enum AppConnectionStatus {
6
+ EXPIRED = "EXPIRED",
7
+ ACTIVE = "ACTIVE",
8
+ ERROR = "ERROR"
9
+ }
10
+ export declare enum AppConnectionType {
11
+ OAUTH2 = "OAUTH2",
12
+ CLOUD_OAUTH2 = "CLOUD_OAUTH2",
13
+ SECRET_TEXT = "SECRET_TEXT",
14
+ BASIC_AUTH = "BASIC_AUTH",
15
+ CUSTOM_AUTH = "CUSTOM_AUTH"
16
+ }
17
+ export interface SecretTextConnectionValue {
18
+ type: AppConnectionType.SECRET_TEXT;
19
+ secret_text: string;
20
+ }
21
+ export interface BasicAuthConnectionValue {
22
+ username: string;
23
+ password: string;
24
+ type: AppConnectionType.BASIC_AUTH;
25
+ }
26
+ export interface BaseOAuth2ConnectionValue {
27
+ expires_in?: number;
28
+ token_type: string;
29
+ access_token: string;
30
+ claimed_at: number;
31
+ refresh_token: string;
32
+ scope: string;
33
+ authorization_method?: OAuth2AuthorizationMethod;
34
+ data: Record<string, any>;
35
+ }
36
+ export interface CustomAuthConnectionValue {
37
+ type: AppConnectionType.CUSTOM_AUTH;
38
+ props: Record<string, unknown>;
39
+ }
40
+ export interface CloudOAuth2ConnectionValue extends BaseOAuth2ConnectionValue {
41
+ type: AppConnectionType.CLOUD_OAUTH2;
42
+ client_id: string;
43
+ expires_in: number;
44
+ token_type: string;
45
+ access_token: string;
46
+ claimed_at: number;
47
+ refresh_token: string;
48
+ scope: string;
49
+ data: Record<string, any>;
50
+ props?: Record<string, any>;
51
+ token_url: string;
52
+ }
53
+ export interface OAuth2ConnectionValueWithApp extends BaseOAuth2ConnectionValue {
54
+ type: AppConnectionType.OAUTH2;
55
+ client_id: string;
56
+ client_secret: string;
57
+ token_url: string;
58
+ redirect_url: string;
59
+ props?: Record<string, any>;
60
+ }
61
+ export type AppConnectionValue<T extends AppConnectionType = AppConnectionType> = T extends AppConnectionType.SECRET_TEXT ? SecretTextConnectionValue : T extends AppConnectionType.BASIC_AUTH ? BasicAuthConnectionValue : T extends AppConnectionType.CLOUD_OAUTH2 ? CloudOAuth2ConnectionValue : T extends AppConnectionType.OAUTH2 ? OAuth2ConnectionValueWithApp : T extends AppConnectionType.CUSTOM_AUTH ? CustomAuthConnectionValue : never;
62
+ export type AppConnection<Type extends AppConnectionType = AppConnectionType> = BaseModel<AppConnectionId> & {
63
+ name: string;
64
+ type: Type;
65
+ appName: string;
66
+ projectId: string;
67
+ status: AppConnectionStatus;
68
+ value: AppConnectionValue<Type>;
69
+ };
70
+ export type OAuth2AppConnection = AppConnection<AppConnectionType.OAUTH2>;
71
+ export type SecretKeyAppConnection = AppConnection<AppConnectionType.SECRET_TEXT>;
72
+ export type CloudAuth2Connection = AppConnection<AppConnectionType.CLOUD_OAUTH2>;
73
+ export type BasicAuthConnection = AppConnection<AppConnectionType.BASIC_AUTH>;
74
+ export type CustomAuthConnection = AppConnection<AppConnectionType.CUSTOM_AUTH>;
75
+ export declare const AppConnectionWithoutSensitiveData: import("@sinclair/typebox").TObject<{
76
+ name: import("@sinclair/typebox").TString<string>;
77
+ type: import("@sinclair/typebox").TEnum<typeof AppConnectionType>;
78
+ appName: import("@sinclair/typebox").TString<string>;
79
+ projectId: import("@sinclair/typebox").TString<string>;
80
+ status: import("@sinclair/typebox").TEnum<typeof AppConnectionStatus>;
81
+ id: import("@sinclair/typebox").TString<string>;
82
+ created: import("@sinclair/typebox").TString<string>;
83
+ updated: import("@sinclair/typebox").TString<string>;
84
+ }>;
85
+ export type AppConnectionWithoutSensitiveData = Static<typeof AppConnectionWithoutSensitiveData> & {
86
+ __brand: 'AppConnectionWithoutSensitiveData';
87
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppConnectionWithoutSensitiveData = exports.AppConnectionType = exports.AppConnectionStatus = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ const base_model_1 = require("../common/base-model");
6
+ const id_generator_1 = require("../common/id-generator");
7
+ var AppConnectionStatus;
8
+ (function (AppConnectionStatus) {
9
+ AppConnectionStatus["EXPIRED"] = "EXPIRED";
10
+ AppConnectionStatus["ACTIVE"] = "ACTIVE";
11
+ AppConnectionStatus["ERROR"] = "ERROR";
12
+ })(AppConnectionStatus || (exports.AppConnectionStatus = AppConnectionStatus = {}));
13
+ var AppConnectionType;
14
+ (function (AppConnectionType) {
15
+ AppConnectionType["OAUTH2"] = "OAUTH2";
16
+ AppConnectionType["CLOUD_OAUTH2"] = "CLOUD_OAUTH2";
17
+ AppConnectionType["SECRET_TEXT"] = "SECRET_TEXT";
18
+ AppConnectionType["BASIC_AUTH"] = "BASIC_AUTH";
19
+ AppConnectionType["CUSTOM_AUTH"] = "CUSTOM_AUTH";
20
+ })(AppConnectionType || (exports.AppConnectionType = AppConnectionType = {}));
21
+ exports.AppConnectionWithoutSensitiveData = typebox_1.Type.Object(Object.assign(Object.assign({}, base_model_1.BaseModelSchema), { name: typebox_1.Type.String(), type: typebox_1.Type.Enum(AppConnectionType), appName: typebox_1.Type.String(), projectId: id_generator_1.ApId, status: typebox_1.Type.Enum(AppConnectionStatus) }));
22
+ //# sourceMappingURL=app-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-connection.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/app-connection/app-connection.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AACjD,qDAAkE;AAElE,yDAA8C;AAI9C,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,sCAAe,CAAA;AACjB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,kDAA6B,CAAA;IAC7B,gDAA2B,CAAA;IAC3B,8CAAyB,CAAA;IACzB,gDAA0B,CAAA;AAC5B,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AA2EY,QAAA,iCAAiC,GAAG,cAAI,CAAC,MAAM,iCACvD,4BAAe,KAClB,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE,EACnB,IAAI,EAAE,cAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAClC,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE,EACtB,SAAS,EAAE,mBAAI,EACf,MAAM,EAAE,cAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,IACtC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ export declare const ListAppConnectionsRequestQuery: import("@sinclair/typebox").TObject<{
3
+ cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
4
+ appName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
5
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
6
+ }>;
7
+ export type ListAppConnectionsRequestQuery = Static<typeof ListAppConnectionsRequestQuery>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAppConnectionsRequestQuery = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ exports.ListAppConnectionsRequestQuery = typebox_1.Type.Object({
6
+ cursor: typebox_1.Type.Optional(typebox_1.Type.String({})),
7
+ appName: typebox_1.Type.Optional(typebox_1.Type.String({})),
8
+ limit: typebox_1.Type.Optional(typebox_1.Type.Number({}))
9
+ });
10
+ //# sourceMappingURL=read-app-connection-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-app-connection-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/app-connection/dto/read-app-connection-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,8BAA8B,GAAG,cAAI,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CACxC,CAAC,CAAC"}
@@ -0,0 +1,125 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ import { AppConnectionType } from "../app-connection";
3
+ import { OAuth2AuthorizationMethod } from "../oauth2-authorization-method";
4
+ export declare const UpsertCustomAuthRequest: import("@sinclair/typebox").TObject<{
5
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CUSTOM_AUTH>;
6
+ value: import("@sinclair/typebox").TObject<{
7
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CUSTOM_AUTH>;
8
+ props: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TUnknown>;
9
+ }>;
10
+ name: import("@sinclair/typebox").TString<string>;
11
+ appName: import("@sinclair/typebox").TString<string>;
12
+ }>;
13
+ export declare const UpsertCloudOAuth2Request: import("@sinclair/typebox").TObject<{
14
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CLOUD_OAUTH2>;
15
+ value: import("@sinclair/typebox").TObject<{
16
+ client_id: import("@sinclair/typebox").TString<string>;
17
+ authorization_method: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof OAuth2AuthorizationMethod>>;
18
+ code: import("@sinclair/typebox").TString<string>;
19
+ code_challenge: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
20
+ props: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TString<string>>>;
21
+ scope: import("@sinclair/typebox").TString<string>;
22
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CLOUD_OAUTH2>;
23
+ token_url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
24
+ }>;
25
+ name: import("@sinclair/typebox").TString<string>;
26
+ appName: import("@sinclair/typebox").TString<string>;
27
+ }>;
28
+ export declare const UpsertSecretTextRequest: import("@sinclair/typebox").TObject<{
29
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.SECRET_TEXT>;
30
+ value: import("@sinclair/typebox").TObject<{
31
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.SECRET_TEXT>;
32
+ secret_text: import("@sinclair/typebox").TString<string>;
33
+ }>;
34
+ name: import("@sinclair/typebox").TString<string>;
35
+ appName: import("@sinclair/typebox").TString<string>;
36
+ }>;
37
+ export declare const UpsertOAuth2Request: import("@sinclair/typebox").TObject<{
38
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.OAUTH2>;
39
+ value: import("@sinclair/typebox").TObject<{
40
+ client_id: import("@sinclair/typebox").TString<string>;
41
+ client_secret: import("@sinclair/typebox").TString<string>;
42
+ token_url: import("@sinclair/typebox").TString<string>;
43
+ props: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>>;
44
+ scope: import("@sinclair/typebox").TString<string>;
45
+ code: import("@sinclair/typebox").TString<string>;
46
+ authorization_method: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof OAuth2AuthorizationMethod>>;
47
+ code_challenge: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
48
+ redirect_url: import("@sinclair/typebox").TString<string>;
49
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.OAUTH2>;
50
+ }>;
51
+ name: import("@sinclair/typebox").TString<string>;
52
+ appName: import("@sinclair/typebox").TString<string>;
53
+ }>;
54
+ export declare const UpsertBasicAuthRequest: import("@sinclair/typebox").TObject<{
55
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.BASIC_AUTH>;
56
+ value: import("@sinclair/typebox").TObject<{
57
+ username: import("@sinclair/typebox").TString<string>;
58
+ password: import("@sinclair/typebox").TString<string>;
59
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.BASIC_AUTH>;
60
+ }>;
61
+ name: import("@sinclair/typebox").TString<string>;
62
+ appName: import("@sinclair/typebox").TString<string>;
63
+ }>;
64
+ export declare const UpsertAppConnectionRequestBody: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
65
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.SECRET_TEXT>;
66
+ value: import("@sinclair/typebox").TObject<{
67
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.SECRET_TEXT>;
68
+ secret_text: import("@sinclair/typebox").TString<string>;
69
+ }>;
70
+ name: import("@sinclair/typebox").TString<string>;
71
+ appName: import("@sinclair/typebox").TString<string>;
72
+ }>, import("@sinclair/typebox").TObject<{
73
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.OAUTH2>;
74
+ value: import("@sinclair/typebox").TObject<{
75
+ client_id: import("@sinclair/typebox").TString<string>;
76
+ client_secret: import("@sinclair/typebox").TString<string>;
77
+ token_url: import("@sinclair/typebox").TString<string>;
78
+ props: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TAny>>;
79
+ scope: import("@sinclair/typebox").TString<string>;
80
+ code: import("@sinclair/typebox").TString<string>;
81
+ authorization_method: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof OAuth2AuthorizationMethod>>;
82
+ code_challenge: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
83
+ redirect_url: import("@sinclair/typebox").TString<string>;
84
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.OAUTH2>;
85
+ }>;
86
+ name: import("@sinclair/typebox").TString<string>;
87
+ appName: import("@sinclair/typebox").TString<string>;
88
+ }>, import("@sinclair/typebox").TObject<{
89
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CLOUD_OAUTH2>;
90
+ value: import("@sinclair/typebox").TObject<{
91
+ client_id: import("@sinclair/typebox").TString<string>;
92
+ authorization_method: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof OAuth2AuthorizationMethod>>;
93
+ code: import("@sinclair/typebox").TString<string>;
94
+ code_challenge: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
95
+ props: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TString<string>>>;
96
+ scope: import("@sinclair/typebox").TString<string>;
97
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CLOUD_OAUTH2>;
98
+ token_url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
99
+ }>;
100
+ name: import("@sinclair/typebox").TString<string>;
101
+ appName: import("@sinclair/typebox").TString<string>;
102
+ }>, import("@sinclair/typebox").TObject<{
103
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.BASIC_AUTH>;
104
+ value: import("@sinclair/typebox").TObject<{
105
+ username: import("@sinclair/typebox").TString<string>;
106
+ password: import("@sinclair/typebox").TString<string>;
107
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.BASIC_AUTH>;
108
+ }>;
109
+ name: import("@sinclair/typebox").TString<string>;
110
+ appName: import("@sinclair/typebox").TString<string>;
111
+ }>, import("@sinclair/typebox").TObject<{
112
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CUSTOM_AUTH>;
113
+ value: import("@sinclair/typebox").TObject<{
114
+ type: import("@sinclair/typebox").TLiteral<AppConnectionType.CUSTOM_AUTH>;
115
+ props: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TUnknown>;
116
+ }>;
117
+ name: import("@sinclair/typebox").TString<string>;
118
+ appName: import("@sinclair/typebox").TString<string>;
119
+ }>]>;
120
+ export type UpsertCloudOAuth2Request = Static<typeof UpsertCloudOAuth2Request>;
121
+ export type UpsertOAuth2Request = Static<typeof UpsertOAuth2Request>;
122
+ export type UpsertSecretTextRequest = Static<typeof UpsertSecretTextRequest>;
123
+ export type UpsertBasicAuthRequest = Static<typeof UpsertBasicAuthRequest>;
124
+ export type UpsertCustomAuthRequest = Static<typeof UpsertCustomAuthRequest>;
125
+ export type UpsertAppConnectionRequestBody = Static<typeof UpsertAppConnectionRequestBody>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpsertAppConnectionRequestBody = exports.UpsertBasicAuthRequest = exports.UpsertOAuth2Request = exports.UpsertSecretTextRequest = exports.UpsertCloudOAuth2Request = exports.UpsertCustomAuthRequest = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ const app_connection_1 = require("../app-connection");
6
+ const oauth2_authorization_method_1 = require("../oauth2-authorization-method");
7
+ const commonAuthProps = {
8
+ name: typebox_1.Type.String({}),
9
+ appName: typebox_1.Type.String({}),
10
+ };
11
+ exports.UpsertCustomAuthRequest = typebox_1.Type.Object(Object.assign(Object.assign({}, commonAuthProps), { type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.CUSTOM_AUTH), value: typebox_1.Type.Object({
12
+ type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.CUSTOM_AUTH),
13
+ props: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown())
14
+ }) }));
15
+ exports.UpsertCloudOAuth2Request = typebox_1.Type.Object(Object.assign(Object.assign({}, commonAuthProps), { type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.CLOUD_OAUTH2), value: typebox_1.Type.Object({
16
+ client_id: typebox_1.Type.String(),
17
+ authorization_method: typebox_1.Type.Optional(typebox_1.Type.Enum(oauth2_authorization_method_1.OAuth2AuthorizationMethod)),
18
+ code: typebox_1.Type.String(),
19
+ code_challenge: typebox_1.Type.Optional(typebox_1.Type.String()),
20
+ props: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String())),
21
+ scope: typebox_1.Type.String(),
22
+ type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.CLOUD_OAUTH2),
23
+ token_url: typebox_1.Type.Optional(typebox_1.Type.String({})),
24
+ }) }));
25
+ exports.UpsertSecretTextRequest = typebox_1.Type.Object(Object.assign(Object.assign({}, commonAuthProps), { type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.SECRET_TEXT), value: typebox_1.Type.Object({
26
+ type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.SECRET_TEXT),
27
+ secret_text: typebox_1.Type.String({})
28
+ }) }));
29
+ exports.UpsertOAuth2Request = typebox_1.Type.Object(Object.assign(Object.assign({}, commonAuthProps), { type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.OAUTH2), value: typebox_1.Type.Object({
30
+ client_id: typebox_1.Type.String({}),
31
+ client_secret: typebox_1.Type.String({}),
32
+ token_url: typebox_1.Type.String({}),
33
+ props: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Any())),
34
+ scope: typebox_1.Type.String(),
35
+ code: typebox_1.Type.String(),
36
+ authorization_method: typebox_1.Type.Optional(typebox_1.Type.Enum(oauth2_authorization_method_1.OAuth2AuthorizationMethod)),
37
+ code_challenge: typebox_1.Type.Optional(typebox_1.Type.String()),
38
+ redirect_url: typebox_1.Type.String({}),
39
+ type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.OAUTH2),
40
+ }) }));
41
+ exports.UpsertBasicAuthRequest = typebox_1.Type.Object(Object.assign(Object.assign({}, commonAuthProps), { type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.BASIC_AUTH), value: typebox_1.Type.Object({
42
+ username: typebox_1.Type.String({}),
43
+ password: typebox_1.Type.String({}),
44
+ type: typebox_1.Type.Literal(app_connection_1.AppConnectionType.BASIC_AUTH),
45
+ }) }));
46
+ exports.UpsertAppConnectionRequestBody = typebox_1.Type.Union([
47
+ exports.UpsertSecretTextRequest,
48
+ exports.UpsertOAuth2Request,
49
+ exports.UpsertCloudOAuth2Request,
50
+ exports.UpsertBasicAuthRequest,
51
+ exports.UpsertCustomAuthRequest,
52
+ ]);
53
+ //# sourceMappingURL=upsert-app-connection-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upsert-app-connection-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/app-connection/dto/upsert-app-connection-request.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ export declare enum OAuth2AuthorizationMethod {
2
+ HEADER = "HEADER",
3
+ BODY = "BODY"
4
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OAuth2AuthorizationMethod = void 0;
4
+ // Todo remove it's duplicated in frameworkr as well, make sure it's not exported in shared package.
5
+ var OAuth2AuthorizationMethod;
6
+ (function (OAuth2AuthorizationMethod) {
7
+ OAuth2AuthorizationMethod["HEADER"] = "HEADER";
8
+ OAuth2AuthorizationMethod["BODY"] = "BODY";
9
+ })(OAuth2AuthorizationMethod || (exports.OAuth2AuthorizationMethod = OAuth2AuthorizationMethod = {}));
10
+ //# sourceMappingURL=oauth2-authorization-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth2-authorization-method.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/app-connection/oauth2-authorization-method.ts"],"names":[],"mappings":";;;AAAA,oGAAoG;AACpG,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACjB,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"}
@@ -0,0 +1,5 @@
1
+ import { User } from "../../user/user";
2
+ export type AuthenticationResponse = Omit<User, "password"> & {
3
+ token: string;
4
+ projectId: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=authentication-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication-response.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/authentication/dto/authentication-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ export declare const SignInRequest: import("@sinclair/typebox").TObject<{
3
+ email: import("@sinclair/typebox").TString<"email">;
4
+ password: import("@sinclair/typebox").TString<string>;
5
+ }>;
6
+ export type SignInRequest = Static<typeof SignInRequest>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignInRequest = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ exports.SignInRequest = typebox_1.Type.Object({
6
+ email: typebox_1.Type.String({
7
+ format: 'email',
8
+ }),
9
+ password: typebox_1.Type.String({
10
+ minLength: 8,
11
+ maxLength: 64,
12
+ }),
13
+ });
14
+ //# sourceMappingURL=sign-in-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-in-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/authentication/dto/sign-in-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,aAAa,GAAG,cAAI,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,OAAO;KAClB,CAAC;IACF,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC;QAClB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,EAAE;KAChB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Static } from "@sinclair/typebox";
2
+ export declare const SignUpRequest: import("@sinclair/typebox").TObject<{
3
+ email: import("@sinclair/typebox").TString<"email">;
4
+ password: import("@sinclair/typebox").TString<string>;
5
+ firstName: import("@sinclair/typebox").TString<string>;
6
+ lastName: import("@sinclair/typebox").TString<string>;
7
+ trackEvents: import("@sinclair/typebox").TBoolean;
8
+ newsLetter: import("@sinclair/typebox").TBoolean;
9
+ }>;
10
+ export type SignUpRequest = Static<typeof SignUpRequest>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignUpRequest = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ exports.SignUpRequest = typebox_1.Type.Object({
6
+ email: typebox_1.Type.String({
7
+ format: 'email',
8
+ }),
9
+ password: typebox_1.Type.String({
10
+ minLength: 8,
11
+ maxLength: 64,
12
+ }),
13
+ firstName: typebox_1.Type.String(),
14
+ lastName: typebox_1.Type.String(),
15
+ trackEvents: typebox_1.Type.Boolean(),
16
+ newsLetter: typebox_1.Type.Boolean(),
17
+ });
18
+ //# sourceMappingURL=sign-up-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-up-request.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/authentication/dto/sign-up-request.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEpC,QAAA,aAAa,GAAG,cAAI,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,OAAO;KAClB,CAAC;IACF,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC;QAClB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,EAAE;KAChB,CAAC;IACF,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,cAAI,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,cAAI,CAAC,OAAO,EAAE;IAC3B,UAAU,EAAE,cAAI,CAAC,OAAO,EAAE;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare enum PrincipalType {
2
+ USER = "USER",
3
+ WORKER = "WORKER",
4
+ UNKNOWN = "UNKNOWN"
5
+ }