cliodot 1.2.3 → 1.2.4

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 (135) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +2 -0
  3. package/dist/AuthAppClient.d.ts +1 -0
  4. package/dist/AuthAppClient.d.ts.map +1 -1
  5. package/dist/AuthAppClient.js +199 -1
  6. package/dist/CommercialAppClient.d.ts +50 -9
  7. package/dist/CommercialAppClient.d.ts.map +1 -1
  8. package/dist/CommercialAppClient.js +576 -1
  9. package/dist/ConnectorBuilder.js +104 -1
  10. package/dist/Events.d.ts +2 -0
  11. package/dist/Events.d.ts.map +1 -1
  12. package/dist/Events.js +325 -1
  13. package/dist/Flosync.js +296 -1
  14. package/dist/FlosyncClient.js +429 -1
  15. package/dist/FunctionBuilder.js +65 -1
  16. package/dist/IdentityAppClient.d.ts +1 -0
  17. package/dist/IdentityAppClient.d.ts.map +1 -1
  18. package/dist/IdentityAppClient.js +197 -1
  19. package/dist/MemoryAppClient.d.ts +1 -0
  20. package/dist/MemoryAppClient.d.ts.map +1 -1
  21. package/dist/MemoryAppClient.js +149 -1
  22. package/dist/MemoryClient.js +20 -1
  23. package/dist/OAuthAppClient.d.ts +1 -0
  24. package/dist/OAuthAppClient.d.ts.map +1 -1
  25. package/dist/OAuthAppClient.js +269 -1
  26. package/dist/ProviderServicesClient.d.ts +24 -0
  27. package/dist/ProviderServicesClient.d.ts.map +1 -0
  28. package/dist/ProviderServicesClient.js +158 -0
  29. package/dist/Surface.d.ts +2 -0
  30. package/dist/Surface.d.ts.map +1 -1
  31. package/dist/Surface.js +255 -1
  32. package/dist/ValidatorBuilder.js +24 -1
  33. package/dist/Webhooks.js +61 -1
  34. package/dist/WorkflowBuilder.js +279 -1
  35. package/dist/__tests__/CommercialAppClient.test.d.ts +2 -0
  36. package/dist/__tests__/CommercialAppClient.test.d.ts.map +1 -0
  37. package/dist/__tests__/CommercialAppClient.test.js +217 -0
  38. package/dist/__tests__/Events.test.js +191 -1
  39. package/dist/__tests__/IdentityAppClient.test.js +232 -1
  40. package/dist/__tests__/OAuthAppClient.test.js +300 -1
  41. package/dist/__tests__/ProviderServicesClient.test.d.ts +2 -0
  42. package/dist/__tests__/ProviderServicesClient.test.d.ts.map +1 -0
  43. package/dist/__tests__/ProviderServicesClient.test.js +131 -0
  44. package/dist/__tests__/Surface.test.js +150 -1
  45. package/dist/__tests__/errors.test.js +54 -1
  46. package/dist/__tests__/function.test.js +58 -1
  47. package/dist/__tests__/helpers.d.ts +5 -0
  48. package/dist/__tests__/helpers.d.ts.map +1 -0
  49. package/dist/__tests__/helpers.js +10 -0
  50. package/dist/__tests__/localhost-lookup.test.d.ts +2 -0
  51. package/dist/__tests__/localhost-lookup.test.d.ts.map +1 -0
  52. package/dist/__tests__/localhost-lookup.test.js +26 -0
  53. package/dist/__tests__/parse-api-error.test.js +26 -1
  54. package/dist/__tests__/runner.test.js +156 -1
  55. package/dist/connectors/builtin.js +354 -1
  56. package/dist/connectors/registry.js +300 -1
  57. package/dist/decorators/build.js +105 -1
  58. package/dist/decorators/connector.js +56 -1
  59. package/dist/decorators/index.js +34 -1
  60. package/dist/decorators/metadata.js +338 -1
  61. package/dist/decorators/steps.js +220 -1
  62. package/dist/decorators/workflow.js +52 -1
  63. package/dist/errors.js +76 -1
  64. package/dist/http/__tests__/cliodot-request.environment.test.d.ts +2 -0
  65. package/dist/http/__tests__/cliodot-request.environment.test.d.ts.map +1 -0
  66. package/dist/http/__tests__/cliodot-request.environment.test.js +37 -0
  67. package/dist/http/__tests__/cliodot-result.test.d.ts +2 -0
  68. package/dist/http/__tests__/cliodot-result.test.d.ts.map +1 -0
  69. package/dist/http/__tests__/cliodot-result.test.js +57 -0
  70. package/dist/http/__tests__/events-instance-id.test.d.ts +2 -0
  71. package/dist/http/__tests__/events-instance-id.test.d.ts.map +1 -0
  72. package/dist/http/__tests__/events-instance-id.test.js +45 -0
  73. package/dist/http/cliodot-request.d.ts +35 -0
  74. package/dist/http/cliodot-request.d.ts.map +1 -0
  75. package/dist/http/cliodot-request.js +105 -0
  76. package/dist/http/cliodot-result.d.ts +40 -0
  77. package/dist/http/cliodot-result.d.ts.map +1 -0
  78. package/dist/http/cliodot-result.js +139 -0
  79. package/dist/http/create-client.d.ts +3 -0
  80. package/dist/http/create-client.d.ts.map +1 -0
  81. package/dist/http/create-client.js +14 -0
  82. package/dist/http/events-instance-id.d.ts +11 -0
  83. package/dist/http/events-instance-id.d.ts.map +1 -0
  84. package/dist/http/events-instance-id.js +86 -0
  85. package/dist/http/localhost-lookup.d.ts +12 -0
  86. package/dist/http/localhost-lookup.d.ts.map +1 -0
  87. package/dist/http/localhost-lookup.js +67 -0
  88. package/dist/http/parse-api-error.js +56 -1
  89. package/dist/http/sanitize-execution-headers.js +79 -1
  90. package/dist/identity-offline-verify.js +174 -1
  91. package/dist/identity-token-cache.js +51 -1
  92. package/dist/index.d.ts +1 -1
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +108 -1
  95. package/dist/runner/ProcessorEngine.js +1311 -1
  96. package/dist/runner/connector.executor.js +1786 -1
  97. package/dist/runner/utilities/math.executor.js +153 -1
  98. package/dist/runner/utilities/random.executor.js +151 -1
  99. package/dist/runner/utilities/string.executor.js +825 -1
  100. package/dist/template.js +127 -1
  101. package/dist/transformers/StepsToNodesTransformer.js +214 -1
  102. package/dist/transformers/WorkflowTransformer.js +189 -1
  103. package/dist/types/auth-app.api.d.ts +2 -0
  104. package/dist/types/auth-app.api.d.ts.map +1 -1
  105. package/dist/types/auth-app.api.js +2 -1
  106. package/dist/types/builtin.js +2 -1
  107. package/dist/types/client.api.js +2 -1
  108. package/dist/types/commercial-app.api.d.ts +407 -11
  109. package/dist/types/commercial-app.api.d.ts.map +1 -1
  110. package/dist/types/commercial-app.api.js +2 -1
  111. package/dist/types/connector.js +2 -1
  112. package/dist/types/context.js +2 -1
  113. package/dist/types/event-app.api.d.ts +8 -0
  114. package/dist/types/event-app.api.d.ts.map +1 -1
  115. package/dist/types/event-app.api.js +2 -1
  116. package/dist/types/function.js +2 -1
  117. package/dist/types/identity-app.api.d.ts +2 -0
  118. package/dist/types/identity-app.api.d.ts.map +1 -1
  119. package/dist/types/identity-app.api.js +2 -1
  120. package/dist/types/index.js +23 -1
  121. package/dist/types/memory-app.api.d.ts +2 -0
  122. package/dist/types/memory-app.api.d.ts.map +1 -1
  123. package/dist/types/memory-app.api.js +2 -1
  124. package/dist/types/oauth-app.api.d.ts +2 -0
  125. package/dist/types/oauth-app.api.d.ts.map +1 -1
  126. package/dist/types/oauth-app.api.js +105 -1
  127. package/dist/types/provider-services.api.d.ts +98 -0
  128. package/dist/types/provider-services.api.d.ts.map +1 -0
  129. package/dist/types/provider-services.api.js +2 -0
  130. package/dist/types/validator.js +2 -1
  131. package/dist/types/webhook-app.api.js +2 -1
  132. package/dist/types/workflow.js +33 -1
  133. package/dist/validators/validators.js +478 -1
  134. package/dist/variable.js +37 -1
  135. package/package.json +3 -2
package/dist/variable.js CHANGED
@@ -1 +1,37 @@
1
- 'use strict';const _0x45a92c=_0x40e8;(function(_0xab7796,_0xda3cfc){const _0x4c5d3b=_0x40e8,_0x3ed21d=_0xab7796();while(!![]){try{const _0x1a4a5e=parseInt(_0x4c5d3b(0x1d9))/0x1*(parseInt(_0x4c5d3b(0x1de))/0x2)+-parseInt(_0x4c5d3b(0x1cc))/0x3+-parseInt(_0x4c5d3b(0x1d6))/0x4*(parseInt(_0x4c5d3b(0x1d7))/0x5)+parseInt(_0x4c5d3b(0x1d2))/0x6*(-parseInt(_0x4c5d3b(0x1cd))/0x7)+parseInt(_0x4c5d3b(0x1e1))/0x8+parseInt(_0x4c5d3b(0x1e2))/0x9*(-parseInt(_0x4c5d3b(0x1d5))/0xa)+parseInt(_0x4c5d3b(0x1cb))/0xb*(parseInt(_0x4c5d3b(0x1d8))/0xc);if(_0x1a4a5e===_0xda3cfc)break;else _0x3ed21d['push'](_0x3ed21d['shift']());}catch(_0x5a33d2){_0x3ed21d['push'](_0x3ed21d['shift']());}}}(_0x14ad,0xd1279));function _0x40e8(_0x1c7a9b,_0x542daa){_0x1c7a9b=_0x1c7a9b-0x1c6;const _0x14add6=_0x14ad();let _0x40e88e=_0x14add6[_0x1c7a9b];if(_0x40e8['IbmQxx']===undefined){var _0x4a038d=function(_0x336c83){const _0x179a34='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b0bfd='',_0x10b50b='';for(let _0x166f75=0x0,_0x3a957f,_0x25e4c2,_0x4433e1=0x0;_0x25e4c2=_0x336c83['charAt'](_0x4433e1++);~_0x25e4c2&&(_0x3a957f=_0x166f75%0x4?_0x3a957f*0x40+_0x25e4c2:_0x25e4c2,_0x166f75++%0x4)?_0x1b0bfd+=String['fromCharCode'](0xff&_0x3a957f>>(-0x2*_0x166f75&0x6)):0x0){_0x25e4c2=_0x179a34['indexOf'](_0x25e4c2);}for(let _0x32959b=0x0,_0x7beb67=_0x1b0bfd['length'];_0x32959b<_0x7beb67;_0x32959b++){_0x10b50b+='%'+('00'+_0x1b0bfd['charCodeAt'](_0x32959b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10b50b);};_0x40e8['vqwUSu']=_0x4a038d,_0x40e8['xBNyrO']={},_0x40e8['IbmQxx']=!![];}const _0x126502=_0x14add6[0x0],_0x4e91f5=_0x1c7a9b+_0x126502,_0x1ede18=_0x40e8['xBNyrO'][_0x4e91f5];return!_0x1ede18?(_0x40e88e=_0x40e8['vqwUSu'](_0x40e88e),_0x40e8['xBNyrO'][_0x4e91f5]=_0x40e88e):_0x40e88e=_0x1ede18,_0x40e88e;}Object[_0x45a92c(0x1d0)](exports,_0x45a92c(0x1da),{'value':!![]}),exports['v']=exports['variable']=void 0x0,exports[_0x45a92c(0x1d4)]=defineStepVars;function _0x14ad(){const _0x1555fa=['ih19','E3SGDMfYC1SI','BgvUz3rO','mJuYogPHrhnowG','E3SGC3rLCfjLC3vSDhmU','zMLSDgvY','mtmYmtK0otzLrKr0tvG','mtK4mhrxB2DKra','AM9PBG','E3SGCgf0AfbHCMfTC1SI','yM9KEq','E3SGzw52wYi','DhjPz2DLCG','mtfSs1f2sxa','mJy3mdaXofHbt2LkuG','nJK2ode3mxffDfP6CG','yxjNCW','E3SG','zgvMAw5LuhjVCgvYDhK','DMfYAwfIBgu','nKHYvMDMqq','iL0GFx0','zgvMAw5Lu3rLCfzHCNm','ntu0mfDkDvH4yG','nhPztvbxyW','nJuZotm1r1v3D0fH','ntuYmtm2oe56q2TOua','nJK4tKzHuMHP','x19LC01VzhvSzq'];_0x14ad=function(){return _0x1555fa;};return _0x14ad();}function path(..._0x1b0bfd){const _0x2fb504=_0x45a92c;return _0x1b0bfd[_0x2fb504(0x1e0)](Boolean)[_0x2fb504(0x1c6)]('.');}function expr(_0x10b50b,..._0x166f75){const _0x2bed84=_0x45a92c,_0x3a957f=path(..._0x166f75);return _0x3a957f?_0x2bed84(0x1cf)+_0x10b50b+'.'+_0x3a957f+'\x20}}':_0x2bed84(0x1cf)+_0x10b50b+_0x2bed84(0x1db);}function defineStepVars(){function _0x25e4c2(_0x4433e1,..._0x32959b){const _0x5a7a30=_0x40e8,_0x7beb67=_0x32959b[_0x5a7a30(0x1dd)]>0x0?path(_0x4433e1,..._0x32959b):_0x4433e1;return _0x5a7a30(0x1df)+_0x7beb67+_0x5a7a30(0x1db);}return{'stepResult':_0x25e4c2};}exports[_0x45a92c(0x1d1)]={'body':(..._0x2a52c7)=>expr(_0x45a92c(0x1c8),..._0x2a52c7),'trigger':(..._0x24bda0)=>expr(_0x45a92c(0x1ca),..._0x24bda0),'stepResult':(_0xf667db,..._0x6e23e1)=>{const _0x566e57=_0x45a92c,_0x4b4f4a=_0x6e23e1[_0x566e57(0x1dd)]>0x0?path(_0xf667db,..._0x6e23e1):_0xf667db;return'{{\x20stepResults.'+_0x4b4f4a+'\x20}}';},'header':_0x8c645=>'{{\x20headers[\x22'+_0x8c645+'\x22]\x20}}','param':_0x19bf31=>'{{\x20params[\x22'+_0x19bf31+_0x45a92c(0x1d3),'pathParam':_0x4b113d=>_0x45a92c(0x1c7)+_0x4b113d+'\x22]\x20}}','query':_0x5ec259=>'{{\x20query[\x22'+_0x5ec259+_0x45a92c(0x1d3),'vars':_0x248885=>_0x45a92c(0x1dc)+_0x248885+_0x45a92c(0x1d3),'env':_0xc4cc73=>_0x45a92c(0x1c9)+_0xc4cc73+_0x45a92c(0x1d3),'args':(..._0x30bbc1)=>expr(_0x45a92c(0x1ce),..._0x30bbc1),'expr':_0x2bf94d=>_0x45a92c(0x1cf)+_0x2bf94d+_0x45a92c(0x1db)},exports['v']=exports[_0x45a92c(0x1d1)];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v = exports.variable = void 0;
4
+ exports.defineStepVars = defineStepVars;
5
+ function path(...parts) {
6
+ return parts.filter(Boolean).join(".");
7
+ }
8
+ function expr(base, ...pathParts) {
9
+ const p = path(...pathParts);
10
+ return p ? `{{ ${base}.${p} }}` : `{{ ${base} }}`;
11
+ }
12
+ function defineStepVars() {
13
+ function stepResultImpl(stepId, ...pathParts) {
14
+ const fullPath = pathParts.length > 0 ? path(stepId, ...pathParts) : stepId;
15
+ return `{{ stepResults.${fullPath} }}`;
16
+ }
17
+ return {
18
+ stepResult: stepResultImpl,
19
+ };
20
+ }
21
+ exports.variable = {
22
+ body: (...pathParts) => expr("body", ...pathParts),
23
+ trigger: (...pathParts) => expr("trigger", ...pathParts),
24
+ stepResult: (stepId, ...pathParts) => {
25
+ const fullPath = pathParts.length > 0 ? path(stepId, ...pathParts) : stepId;
26
+ return `{{ stepResults.${fullPath} }}`;
27
+ },
28
+ header: (key) => `{{ headers["${key}"] }}`,
29
+ param: (key) => `{{ params["${key}"] }}`,
30
+ pathParam: (key) => `{{ pathParams["${key}"] }}`,
31
+ query: (key) => `{{ query["${key}"] }}`,
32
+ vars: (key) => `{{ vars["${key}"] }}`,
33
+ env: (key) => `{{ env["${key}"] }}`,
34
+ args: (...pathParts) => expr("args", ...pathParts),
35
+ expr: (expression) => `{{ ${expression} }}`,
36
+ };
37
+ exports.v = exports.variable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cliodot",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "SDK for building workflows, APIs, and functions with Cliodot Flowsync",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,8 @@
8
8
  "dist"
9
9
  ],
10
10
  "scripts": {
11
- "build": "tsc && node scripts/obfuscate.js",
11
+ "build:obfuscate": "tsc && node scripts/obfuscate.js",
12
+ "build": "tsc -p .",
12
13
  "dev": "tsc -w",
13
14
  "test": "jest",
14
15
  "get-oauth-connection-token": "DOTENV_CONFIG_PATH=../.env node -r dotenv/config scripts/get-oauth-connection-token.js",