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.
- package/LICENSE +201 -0
- package/README.md +2 -0
- package/dist/AuthAppClient.d.ts +1 -0
- package/dist/AuthAppClient.d.ts.map +1 -1
- package/dist/AuthAppClient.js +199 -1
- package/dist/CommercialAppClient.d.ts +50 -9
- package/dist/CommercialAppClient.d.ts.map +1 -1
- package/dist/CommercialAppClient.js +576 -1
- package/dist/ConnectorBuilder.js +104 -1
- package/dist/Events.d.ts +2 -0
- package/dist/Events.d.ts.map +1 -1
- package/dist/Events.js +325 -1
- package/dist/Flosync.js +296 -1
- package/dist/FlosyncClient.js +429 -1
- package/dist/FunctionBuilder.js +65 -1
- package/dist/IdentityAppClient.d.ts +1 -0
- package/dist/IdentityAppClient.d.ts.map +1 -1
- package/dist/IdentityAppClient.js +197 -1
- package/dist/MemoryAppClient.d.ts +1 -0
- package/dist/MemoryAppClient.d.ts.map +1 -1
- package/dist/MemoryAppClient.js +149 -1
- package/dist/MemoryClient.js +20 -1
- package/dist/OAuthAppClient.d.ts +1 -0
- package/dist/OAuthAppClient.d.ts.map +1 -1
- package/dist/OAuthAppClient.js +269 -1
- package/dist/ProviderServicesClient.d.ts +24 -0
- package/dist/ProviderServicesClient.d.ts.map +1 -0
- package/dist/ProviderServicesClient.js +158 -0
- package/dist/Surface.d.ts +2 -0
- package/dist/Surface.d.ts.map +1 -1
- package/dist/Surface.js +255 -1
- package/dist/ValidatorBuilder.js +24 -1
- package/dist/Webhooks.js +61 -1
- package/dist/WorkflowBuilder.js +279 -1
- package/dist/__tests__/CommercialAppClient.test.d.ts +2 -0
- package/dist/__tests__/CommercialAppClient.test.d.ts.map +1 -0
- package/dist/__tests__/CommercialAppClient.test.js +217 -0
- package/dist/__tests__/Events.test.js +191 -1
- package/dist/__tests__/IdentityAppClient.test.js +232 -1
- package/dist/__tests__/OAuthAppClient.test.js +300 -1
- package/dist/__tests__/ProviderServicesClient.test.d.ts +2 -0
- package/dist/__tests__/ProviderServicesClient.test.d.ts.map +1 -0
- package/dist/__tests__/ProviderServicesClient.test.js +131 -0
- package/dist/__tests__/Surface.test.js +150 -1
- package/dist/__tests__/errors.test.js +54 -1
- package/dist/__tests__/function.test.js +58 -1
- package/dist/__tests__/helpers.d.ts +5 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/__tests__/helpers.js +10 -0
- package/dist/__tests__/localhost-lookup.test.d.ts +2 -0
- package/dist/__tests__/localhost-lookup.test.d.ts.map +1 -0
- package/dist/__tests__/localhost-lookup.test.js +26 -0
- package/dist/__tests__/parse-api-error.test.js +26 -1
- package/dist/__tests__/runner.test.js +156 -1
- package/dist/connectors/builtin.js +354 -1
- package/dist/connectors/registry.js +300 -1
- package/dist/decorators/build.js +105 -1
- package/dist/decorators/connector.js +56 -1
- package/dist/decorators/index.js +34 -1
- package/dist/decorators/metadata.js +338 -1
- package/dist/decorators/steps.js +220 -1
- package/dist/decorators/workflow.js +52 -1
- package/dist/errors.js +76 -1
- package/dist/http/__tests__/cliodot-request.environment.test.d.ts +2 -0
- package/dist/http/__tests__/cliodot-request.environment.test.d.ts.map +1 -0
- package/dist/http/__tests__/cliodot-request.environment.test.js +37 -0
- package/dist/http/__tests__/cliodot-result.test.d.ts +2 -0
- package/dist/http/__tests__/cliodot-result.test.d.ts.map +1 -0
- package/dist/http/__tests__/cliodot-result.test.js +57 -0
- package/dist/http/__tests__/events-instance-id.test.d.ts +2 -0
- package/dist/http/__tests__/events-instance-id.test.d.ts.map +1 -0
- package/dist/http/__tests__/events-instance-id.test.js +45 -0
- package/dist/http/cliodot-request.d.ts +35 -0
- package/dist/http/cliodot-request.d.ts.map +1 -0
- package/dist/http/cliodot-request.js +105 -0
- package/dist/http/cliodot-result.d.ts +40 -0
- package/dist/http/cliodot-result.d.ts.map +1 -0
- package/dist/http/cliodot-result.js +139 -0
- package/dist/http/create-client.d.ts +3 -0
- package/dist/http/create-client.d.ts.map +1 -0
- package/dist/http/create-client.js +14 -0
- package/dist/http/events-instance-id.d.ts +11 -0
- package/dist/http/events-instance-id.d.ts.map +1 -0
- package/dist/http/events-instance-id.js +86 -0
- package/dist/http/localhost-lookup.d.ts +12 -0
- package/dist/http/localhost-lookup.d.ts.map +1 -0
- package/dist/http/localhost-lookup.js +67 -0
- package/dist/http/parse-api-error.js +56 -1
- package/dist/http/sanitize-execution-headers.js +79 -1
- package/dist/identity-offline-verify.js +174 -1
- package/dist/identity-token-cache.js +51 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -1
- package/dist/runner/ProcessorEngine.js +1311 -1
- package/dist/runner/connector.executor.js +1786 -1
- package/dist/runner/utilities/math.executor.js +153 -1
- package/dist/runner/utilities/random.executor.js +151 -1
- package/dist/runner/utilities/string.executor.js +825 -1
- package/dist/template.js +127 -1
- package/dist/transformers/StepsToNodesTransformer.js +214 -1
- package/dist/transformers/WorkflowTransformer.js +189 -1
- package/dist/types/auth-app.api.d.ts +2 -0
- package/dist/types/auth-app.api.d.ts.map +1 -1
- package/dist/types/auth-app.api.js +2 -1
- package/dist/types/builtin.js +2 -1
- package/dist/types/client.api.js +2 -1
- package/dist/types/commercial-app.api.d.ts +407 -11
- package/dist/types/commercial-app.api.d.ts.map +1 -1
- package/dist/types/commercial-app.api.js +2 -1
- package/dist/types/connector.js +2 -1
- package/dist/types/context.js +2 -1
- package/dist/types/event-app.api.d.ts +8 -0
- package/dist/types/event-app.api.d.ts.map +1 -1
- package/dist/types/event-app.api.js +2 -1
- package/dist/types/function.js +2 -1
- package/dist/types/identity-app.api.d.ts +2 -0
- package/dist/types/identity-app.api.d.ts.map +1 -1
- package/dist/types/identity-app.api.js +2 -1
- package/dist/types/index.js +23 -1
- package/dist/types/memory-app.api.d.ts +2 -0
- package/dist/types/memory-app.api.d.ts.map +1 -1
- package/dist/types/memory-app.api.js +2 -1
- package/dist/types/oauth-app.api.d.ts +2 -0
- package/dist/types/oauth-app.api.d.ts.map +1 -1
- package/dist/types/oauth-app.api.js +105 -1
- package/dist/types/provider-services.api.d.ts +98 -0
- package/dist/types/provider-services.api.d.ts.map +1 -0
- package/dist/types/provider-services.api.js +2 -0
- package/dist/types/validator.js +2 -1
- package/dist/types/webhook-app.api.js +2 -1
- package/dist/types/workflow.js +33 -1
- package/dist/validators/validators.js +478 -1
- package/dist/variable.js +37 -1
- package/package.json +3 -2
package/dist/FlosyncClient.js
CHANGED
|
@@ -1 +1,429 @@
|
|
|
1
|
-
'use strict';const _0x24c48e=_0x5aa2;(function(_0x300f58,_0x30bfda){const _0x26c3be=_0x5aa2,_0x4cab32=_0x300f58();while(!![]){try{const _0x2d7218=parseInt(_0x26c3be(0x11e))/0x1*(-parseInt(_0x26c3be(0xe5))/0x2)+-parseInt(_0x26c3be(0x14a))/0x3+parseInt(_0x26c3be(0xf7))/0x4+-parseInt(_0x26c3be(0x157))/0x5*(-parseInt(_0x26c3be(0x14b))/0x6)+parseInt(_0x26c3be(0x110))/0x7+parseInt(_0x26c3be(0x15d))/0x8+parseInt(_0x26c3be(0x14c))/0x9;if(_0x2d7218===_0x30bfda)break;else _0x4cab32['push'](_0x4cab32['shift']());}catch(_0x2ffc8b){_0x4cab32['push'](_0x4cab32['shift']());}}}(_0x1052,0xa5975));var __createBinding=this&&this[_0x24c48e(0x127)]||(Object[_0x24c48e(0x14e)]?function(_0xe3450b,_0x46f08d,_0x14dfa1,_0x29392c){const _0x293468=_0x24c48e;if(_0x29392c===undefined)_0x29392c=_0x14dfa1;var _0x81ee8=Object[_0x293468(0x10a)](_0x46f08d,_0x14dfa1);(!_0x81ee8||(_0x293468(0x102)in _0x81ee8?!_0x46f08d[_0x293468(0xe7)]:_0x81ee8[_0x293468(0x13e)]||_0x81ee8[_0x293468(0x106)]))&&(_0x81ee8={'enumerable':!![],'get':function(){return _0x46f08d[_0x14dfa1];}}),Object[_0x293468(0x121)](_0xe3450b,_0x29392c,_0x81ee8);}:function(_0x54df8e,_0x59bfac,_0x55a615,_0x436c50){if(_0x436c50===undefined)_0x436c50=_0x55a615;_0x54df8e[_0x436c50]=_0x59bfac[_0x55a615];}),__setModuleDefault=this&&this[_0x24c48e(0x13b)]||(Object[_0x24c48e(0x14e)]?function(_0x1375ab,_0x667905){const _0x55d36a=_0x24c48e;Object[_0x55d36a(0x121)](_0x1375ab,_0x55d36a(0x15c),{'enumerable':!![],'value':_0x667905});}:function(_0x3474a6,_0x47470a){const _0x1b5d0=_0x24c48e;_0x3474a6[_0x1b5d0(0x15c)]=_0x47470a;}),__importStar=this&&this['__importStar']||(function(){var _0x476c95=function(_0xb052db){const _0xa3b26c=_0x5aa2;return _0x476c95=Object[_0xa3b26c(0x10d)]||function(_0x13f331){const _0x459444=_0xa3b26c;var _0x2dacd4=[];for(var _0x216979 in _0x13f331)if(Object[_0x459444(0xe3)][_0x459444(0x161)][_0x459444(0xdb)](_0x13f331,_0x216979))_0x2dacd4[_0x2dacd4['length']]=_0x216979;return _0x2dacd4;},_0x476c95(_0xb052db);};return function(_0x2a335a){const _0x231a50=_0x5aa2;if(_0x2a335a&&_0x2a335a[_0x231a50(0xe7)])return _0x2a335a;var _0x2f3bf9={};if(_0x2a335a!=null){for(var _0x5e2d87=_0x476c95(_0x2a335a),_0x2c3751=0x0;_0x2c3751<_0x5e2d87['length'];_0x2c3751++)if(_0x5e2d87[_0x2c3751]!==_0x231a50(0x15c))__createBinding(_0x2f3bf9,_0x2a335a,_0x5e2d87[_0x2c3751]);}return __setModuleDefault(_0x2f3bf9,_0x2a335a),_0x2f3bf9;};}()),__importDefault=this&&this[_0x24c48e(0xe0)]||function(_0xcb99b7){const _0x4a1724=_0x24c48e;return _0xcb99b7&&_0xcb99b7[_0x4a1724(0xe7)]?_0xcb99b7:{'default':_0xcb99b7};};Object[_0x24c48e(0x121)](exports,_0x24c48e(0xe7),{'value':!![]}),exports[_0x24c48e(0xfa)]=exports['DEFAULT_CLIODOT_BASE_URL']=void 0x0;const axios_1=__importDefault(require(_0x24c48e(0x143))),StepsToNodesTransformer_1=require(_0x24c48e(0x10e)),errors_1=require(_0x24c48e(0x119)),sanitize_execution_headers_1=require(_0x24c48e(0xe2));exports['DEFAULT_CLIODOT_BASE_URL']=_0x24c48e(0xe9);function _0x5aa2(_0x50473d,_0x422f49){_0x50473d=_0x50473d-0xda;const _0x10526e=_0x1052();let _0x5aa22f=_0x10526e[_0x50473d];if(_0x5aa2['gzydlo']===undefined){var _0x1d84e7=function(_0x16b290){const _0x45765e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xe3450b='',_0x46f08d='';for(let _0x14dfa1=0x0,_0x29392c,_0x81ee8,_0x54df8e=0x0;_0x81ee8=_0x16b290['charAt'](_0x54df8e++);~_0x81ee8&&(_0x29392c=_0x14dfa1%0x4?_0x29392c*0x40+_0x81ee8:_0x81ee8,_0x14dfa1++%0x4)?_0xe3450b+=String['fromCharCode'](0xff&_0x29392c>>(-0x2*_0x14dfa1&0x6)):0x0){_0x81ee8=_0x45765e['indexOf'](_0x81ee8);}for(let _0x59bfac=0x0,_0x55a615=_0xe3450b['length'];_0x59bfac<_0x55a615;_0x59bfac++){_0x46f08d+='%'+('00'+_0xe3450b['charCodeAt'](_0x59bfac)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x46f08d);};_0x5aa2['ymFjsh']=_0x1d84e7,_0x5aa2['BKVYyt']={},_0x5aa2['gzydlo']=!![];}const _0x2e4690=_0x10526e[0x0],_0x1afb0a=_0x50473d+_0x2e4690,_0x5e18b7=_0x5aa2['BKVYyt'][_0x1afb0a];return!_0x5e18b7?(_0x5aa22f=_0x5aa2['ymFjsh'](_0x5aa22f),_0x5aa2['BKVYyt'][_0x1afb0a]=_0x5aa22f):_0x5aa22f=_0x5e18b7,_0x5aa22f;}const DEFAULT_TOKEN_REFRESH_MARGIN_MS=0xa*0x3c*0x3e8,DEFAULT_FALLBACK_REUSE_MS=0x32*0x3c*0x3e8;function _0x1052(){const _0x34822a=['DgvYBq','rNvUy3rPB24GBM90igzVDw5K','zgvMAw5LuhjVCgvYDhK','zNjVBuvUDhjPzxm','DgvUyw50x2LK','CMvXDwvZDa','CgfNzq','Dg9Rzw5szxvZzvvUDgLStxm','x19JCMvHDgvcAw5KAw5N','y2XPB2rVDefWAuvYCM9YrNjVBuf4Aw9Z','l2fWAs1JB3jLl2nSAw9KB3q','BNvTyMvY','C2v0u2vZC2LVBKzYB21mB2DPBLjLC3bVBNnL','zNvUy3rPB24','C3rLChm','ufvu','revgqvvmvf9dteLpre9ux0jbu0vFvvjm','q29UBMvJDg9Yig11C3qGAgf2zsbFAwqGB3iGC2X1zW','CMvZCg9UC2u','zNjVBq','yxv0Aa','zgf0yq','DMfYCW','D29YA2zSB3DZ','r0vu','l2nVBM5Ly3rVCNmV','C2vHCMnO','Bwf4','x19ZzxrnB2r1BgvezwzHDwX0','yxbPu2vJCMv0','uMvXDwvZDcbMywLSzwq6ia','D3jPDgfIBgu','yM9KEq','DhjHBNnMB3jT','CMvWzwf0','A2v5CW','yxHPB3m','zxHWAxjLC19PBG','l2nVBM5Ly3rVCNm','zxjYB3i','ChjVAMvJDhm','y2f0zwDVCNK','Aw5ZDgfSBgf0Aw9UCW','mtq4ndGYnNbKCg5VDa','mtG2C25OsMHk','nJa0mZK5nwr4CMrrDG','C3rYAw5N','y3jLyxrL','C3bSAxq','Bg9NAw5qCM9TAxnL','BM9Kzxm','BM93','AgvHzgvYCW','l3bYB2PLy3rZ','C3rHDhvZ','yxbWBgLJyxrPB24VANnVBG','mZqWmtvMu2f3CKW','D29YA2zSB3DhCM91Ca','q29UBMvJDg9Yigv4zwn1DgLVBIbMywLSzwq','l2vUDMLYB25Tzw50lxzHCMLHyMXLCW','AxnbCNjHEq','zgvMyxvSDa','ndu0otK1mMDjs1LIEq','l2z1BMn0Aw9UCY8','ywnJzxnZx3rVA2vU','x2LK','AgfZt3DUuhjVCgvYDhK','DhLWzq','zxHWAxjLC0f0','AND0','l3bYB2PLy3rZlW','BMfTzq','C2vTDMvY','CMvZDwX0','zxHWAxjLC19HDa','CgfYyw1Z','l2LUC3rHBgW','Aw5ZDgfSBgf0Aw9U','l2LUDM9Rzq','y2fSBa','zw50CMLLCW','yMfZzv91CMW','AxngAw5PDgu','Aw52ywXPzgf0zvnLC3nPB25uB2TLBG','x19PBxbVCNrezwzHDwX0','BgvUz3rO','lI9ODhrWl3nHBML0AxPLlwv4zwn1DgLVBI1OzwfKzxjZ','ChjVDg90ExbL','ue9tva','mJqYmJq1nhDryKHSvW','Dg9Rzw5szwzYzxnOtwfYz2LUtxm','x19LC01VzhvSzq','Dg9Rzw4','Ahr0Chm6lY9ZzgSUzMXVD2zSEs5Kzxy','C2fUAxrPEMvfEgvJDxrPB25izwfKzxjZ','DMvYC2LVBG','C2vZC2LVBLrVA2vUsxngCMvZAa','zNvUy3rPB25Z','uefuq0G','zw52AxjVBM1LBNq','zxHW','l3bYB21VDgu','ChjVAMvJDf9Pza','zgvIDwC','yxbPs2v5','B3v0Chv0x2zYB20','yxv0AgvUDgLJyxrL','mZu4mZqZmKntExLRqq','l3vZzxiVBg9NAw4TD2L0Ac1HCgKTA2v5','CMvWBgfJzq','rMXVC3LUy0nSAwvUDa','DgHLBG','DxrMoa','Cg9ZDa','l2nVBM5Ly3rVCNmVAw5ZDgfSBgvK','l2z1BMn0Aw9UCW','CgfYC2u','uKvtva','z2v0','Cgf5Bg9Hza','l3DVCMTMBg93CY90zxn0l3DLyMHVB2S','C3rLCfjLC3vSDhm','y29UzMLNDxjHyMXL','AxrLBxm','l3vUAw5ZDgfSBa','y29UBMvJDgLVBL9Pza','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','CgfNAw5HDgLVBG','yMfZzvvYBa','z2v0t3DUuhjVCgvYDhLoyw1LCW','lI90CMfUC2zVCM1LCNmVu3rLChnuB05VzgvZvhjHBNnMB3jTzxi','l3rLC3qVDhjPz2DLCI8','mJyXnJyWy0jsAun5','Axnoyu4','zw5ZDxjLqxv0Aa','l3DVCMTMBg93CW','Dg9Rzw5gywXSyMfJA1jLDxnLtxm','BgLTAxq','zgf0ywjHC2u','l3DVCMTMBg93CY8','Aw5WDxrFC2nOzw1H','lI9LCNjVCNm','CMvZB2X2zq','Dg9Rzw5fEhbPCMvZqxq','ywnJzxnZvg9Rzw4','C2X1zW','mujqt05AvG'];_0x1052=function(){return _0x34822a;};return _0x1052();}function decodeJwtExpMs(_0xe776a4){const _0x1024e3=_0x24c48e;try{if(typeof Buffer==='undefined')return null;const _0x4963b3=_0xe776a4[_0x1024e3(0x14f)]('.');if(_0x4963b3[_0x1024e3(0xe1)]<0x2)return null;const _0x2e4f54=_0x4963b3[0x1]['replace'](/-/g,'+')[_0x1024e3(0xf9)](/_/g,'/'),_0x59c1fd=_0x2e4f54[_0x1024e3(0xe1)]%0x4===0x0?'':'='[_0x1024e3(0x141)](0x4-_0x2e4f54[_0x1024e3(0xe1)]%0x4),_0x2ff759=JSON[_0x1024e3(0x100)](Buffer[_0x1024e3(0x132)](_0x2e4f54+_0x59c1fd,'base64')['toString'](_0x1024e3(0xfc)));return typeof _0x2ff759[_0x1024e3(0xf0)]===_0x1024e3(0x12a)?_0x2ff759[_0x1024e3(0xf0)]*0x3e8:null;}catch{return null;}}function parseExpiryMsFromLoginBody(_0x24e82c,_0x27a08d){const _0x2edb3f=_0x24c48e,_0x2f155f=_0x24e82c?.[_0x2edb3f(0x11b)]??_0x24e82c?.[_0x2edb3f(0x163)]??_0x24e82c?.[_0x2edb3f(0x169)];if(_0x2f155f!=null&&typeof _0x2f155f===_0x2edb3f(0x14d)){const _0x1c2801=Date['parse'](_0x2f155f);if(!Number[_0x2edb3f(0x111)](_0x1c2801))return _0x1c2801;}const _0x233ec6=_0x24e82c?.[_0x2edb3f(0x144)]??_0x24e82c?.['expiresIn'];if(typeof _0x233ec6===_0x2edb3f(0x12a)&&Number[_0x2edb3f(0xde)](_0x233ec6))return Date[_0x2edb3f(0x152)]()+Math[_0x2edb3f(0x13a)](0x0,_0x233ec6)*0x3e8;return decodeJwtExpMs(_0x27a08d);}function toFinalWorkflowResult(_0x43d078,_0x30b6a1){const _0x31c9cb=_0x24c48e;if(_0x43d078?.['result']?.[_0x31c9cb(0x131)]){const _0x4fd777={'statusCode':_0x43d078[_0x31c9cb(0x168)][_0x31c9cb(0x131)]['statusCode'],'data':_0x43d078[_0x31c9cb(0x168)][_0x31c9cb(0x131)]?.['body']??{}};return _0x30b6a1&&_0x43d078[_0x31c9cb(0x168)][_0x31c9cb(0x105)]&&(_0x4fd777['_debug']={'stepResults':_0x43d078[_0x31c9cb(0x168)][_0x31c9cb(0x105)]}),_0x4fd777;}if(_0x43d078?.[_0x31c9cb(0x168)]?.[_0x31c9cb(0x105)]){const _0x558d7d=Object[_0x31c9cb(0x142)](_0x43d078[_0x31c9cb(0x168)]['stepResults']),_0xba700e=_0x43d078['result'][_0x31c9cb(0x105)][_0x558d7d?.[0x0]];if(_0x30b6a1)return{'data':_0xba700e,'_debug':{'stepResults':_0x43d078['result']['stepResults']}};return _0xba700e;}return _0x43d078;}class FlosyncClient{constructor(_0x5b7f4b){const _0x5570ee=_0x24c48e;this['jwt']=null,this['tokenReuseUntilMs']=0x0,this['loginPromise']=null,this['connectors']={'get':async(_0x306496,_0x1c52df)=>{const _0x56a415=_0x5aa2,_0x4e7087={},_0x363870=_0x1c52df?.[_0x56a415(0x167)]??_0x1c52df?.[_0x56a415(0xeb)];_0x363870&&(_0x4e7087['semver']=_0x363870);const _0x1b7d3f=await this[_0x56a415(0x124)](_0x56a415(0x137),_0x56a415(0x138)+_0x306496,undefined,_0x4e7087),_0x314522=_0x1b7d3f?.['connector']??_0x1b7d3f;if(!_0x314522)return null;return{'_id':_0x314522[_0x56a415(0x160)]??_0x306496,'name':_0x314522['name'],'type':_0x314522[_0x56a415(0x162)]??_0x56a415(0x101),'base_url':_0x314522[_0x56a415(0xdd)],'auth':_0x314522[_0x56a415(0x133)]??{'type':'none'},'endpoints':_0x314522['endpoints']??[]};},'list':async _0x4cbc14=>{const _0x2a3800=_0x5aa2,_0x9227f9={};if(_0x4cbc14?.[_0x2a3800(0x162)])_0x9227f9[_0x2a3800(0x162)]=_0x4cbc14[_0x2a3800(0x162)];if(_0x4cbc14?.[_0x2a3800(0x155)])_0x9227f9[_0x2a3800(0x155)]=_0x4cbc14[_0x2a3800(0x155)];if(_0x4cbc14?.[_0x2a3800(0x148)])_0x9227f9['category']=_0x4cbc14[_0x2a3800(0x148)];if(_0x4cbc14?.[_0x2a3800(0x125)])_0x9227f9[_0x2a3800(0x125)]=_0x4cbc14['page'];if(_0x4cbc14?.['limit'])_0x9227f9[_0x2a3800(0x115)]=_0x4cbc14['limit'];const _0x232171=await this[_0x2a3800(0x124)](_0x2a3800(0x137),_0x2a3800(0x145),undefined,_0x9227f9);return{'connectors':_0x232171?.['connectors']??_0x232171?.[_0x2a3800(0x107)]??[],'pagination':_0x232171?.['pagination']};},'search':async _0x4186b3=>{const _0x1d0245=_0x5aa2,_0x2d72f9={};if(_0x4186b3?.['term'])_0x2d72f9[_0x1d0245(0x139)]=_0x4186b3[_0x1d0245(0x11f)];if(_0x4186b3?.[_0x1d0245(0x148)])_0x2d72f9[_0x1d0245(0x148)]=_0x4186b3[_0x1d0245(0x148)];if(_0x4186b3?.[_0x1d0245(0x125)])_0x2d72f9[_0x1d0245(0x125)]=_0x4186b3[_0x1d0245(0x125)];if(_0x4186b3?.[_0x1d0245(0x115)])_0x2d72f9[_0x1d0245(0x115)]=_0x4186b3[_0x1d0245(0x115)];const _0x12fb70=await this[_0x1d0245(0x124)](_0x1d0245(0x137),'/connectors/search',undefined,_0x2d72f9);return{'connectors':_0x12fb70?.['connectors']??_0x12fb70?.[_0x1d0245(0x107)]??[],'pagination':_0x12fb70?.[_0x1d0245(0x10b)]};},'installed':async _0x493659=>{const _0x529779=_0x5aa2,_0x161ac8={};if(_0x493659?.['status'])_0x161ac8[_0x529779(0x155)]=_0x493659[_0x529779(0x155)];if(_0x493659?.['page'])_0x161ac8[_0x529779(0x125)]=_0x493659[_0x529779(0x125)];if(_0x493659?.[_0x529779(0x115)])_0x161ac8['limit']=_0x493659[_0x529779(0x115)];const _0x42cf63=await this[_0x529779(0x124)](_0x529779(0x137),_0x529779(0xfe),undefined,_0x161ac8);return{'installations':_0x42cf63?.[_0x529779(0x149)]??_0x42cf63?.[_0x529779(0x107)]??[],'pagination':_0x42cf63?.['pagination']};},'push':async _0x1bb64b=>{const _0x19429b=_0x5aa2,_0x376475=_0x1bb64b[_0x19429b(0x160)]??_0x1bb64b[_0x19429b(0x11d)];if(!_0x376475)throw new Error(_0x19429b(0x130));try{return await this['request']('GET',_0x19429b(0x138)+_0x376475),this['request'](_0x19429b(0x12e),_0x19429b(0x138)+_0x376475,_0x1bb64b);}catch{return this[_0x19429b(0x124)](_0x19429b(0xe4),'/connectors',_0x1bb64b);}},'install':async(_0x347286,_0x303c45)=>{const _0x3a56ab=_0x5aa2,_0x42b6cc=await this[_0x3a56ab(0x124)](_0x3a56ab(0xe4),_0x3a56ab(0x138)+_0x347286+_0x3a56ab(0x16b),_0x303c45??{});return _0x42b6cc?.[_0x3a56ab(0x16c)]??_0x42b6cc;},'uninstall':async _0x31d256=>{const _0x120fb1=_0x5aa2;return this[_0x120fb1(0x124)]('POST','/connectors/'+_0x31d256+_0x120fb1(0x108));},'execute':async(_0x53c908,_0x3e9bdc,_0x59d45e)=>{const _0x99d9be=_0x5aa2,_0x3bdc66={..._0x59d45e?.[_0x99d9be(0x13f)],'installation_id':_0x59d45e?.['installation_id'],'database':_0x59d45e?.[_0x99d9be(0x116)],'connection_id':_0x59d45e?.[_0x99d9be(0x109)],'connector_version':_0x59d45e?.['connector_version']},_0x45dfdb=Object[_0x99d9be(0x122)](Object[_0x99d9be(0xdc)](_0x3bdc66)['filter'](([,_0x400d55])=>_0x400d55!==undefined)),_0x4ae62e=_0x59d45e?.[_0x99d9be(0x16a)],_0x161728=_0x59d45e?.[_0x99d9be(0x153)],_0xe53d36=await this['request'](_0x99d9be(0xe4),_0x99d9be(0x138)+_0x53c908+'/actions/'+encodeURIComponent(_0x3e9bdc),Object[_0x99d9be(0x142)](_0x45dfdb)[_0x99d9be(0xe1)]?_0x45dfdb:undefined,_0x4ae62e,_0x161728);if(_0xe53d36?.['ok']===![])throw new Error(_0xe53d36?.[_0x99d9be(0x146)]??_0x99d9be(0x159));return _0xe53d36?.['data']??_0xe53d36;}},this[_0x5570ee(0x136)]={'push':async _0x863794=>{const _0x3a088c=_0x5570ee,_0x2b7027=(0x0,StepsToNodesTransformer_1['stepsToNodes'])(_0x863794),_0x76eeb9=_0x863794[_0x3a088c(0x160)];try{return await this[_0x3a088c(0x124)](_0x3a088c(0x137),_0x3a088c(0x117)+_0x76eeb9),this[_0x3a088c(0x124)](_0x3a088c(0x12e),_0x3a088c(0x117)+_0x76eeb9,_0x2b7027);}catch{return this[_0x3a088c(0x124)](_0x3a088c(0xe4),_0x3a088c(0x113),_0x2b7027);}},'pull':async _0x25622a=>{const _0x48eeb6=_0x5570ee,_0x2aeaa9=await this[_0x48eeb6(0x124)](_0x48eeb6(0x137),_0x48eeb6(0x117)+_0x25622a),_0x182fee=_0x2aeaa9?.[_0x48eeb6(0x158)]||_0x2aeaa9,_0xac7f8b=Array[_0x48eeb6(0x15b)](_0x182fee?.[_0x48eeb6(0x134)])?_0x182fee[_0x48eeb6(0x134)][0x0]:_0x182fee;if(!_0xac7f8b||!_0xac7f8b[_0x48eeb6(0x151)])throw new Error('Workflow\x20not\x20found');const {WorkflowTransformer:_0x497e30}=await Promise[_0x48eeb6(0x11a)]()[_0x48eeb6(0xfb)](()=>__importStar(require('./transformers/WorkflowTransformer')));return _0x497e30[_0x48eeb6(0x140)](_0xac7f8b,_0x182fee[_0x48eeb6(0x160)]||_0x25622a,_0x182fee[_0x48eeb6(0x123)]||'',_0x182fee[_0x48eeb6(0x135)],_0x182fee['project_id']);},'list':async _0x19fd16=>{const _0x550a3e=_0x5570ee,_0x5a5f7e={};if(_0x19fd16?.[_0x550a3e(0x155)])_0x5a5f7e['status']=_0x19fd16[_0x550a3e(0x155)];if(_0x19fd16?.['type'])_0x5a5f7e[_0x550a3e(0x162)]=_0x19fd16['type'];if(_0x19fd16?.['name'])_0x5a5f7e[_0x550a3e(0x166)]=_0x19fd16['name'];if(_0x19fd16?.[_0x550a3e(0xf2)])_0x5a5f7e[_0x550a3e(0xf2)]=_0x19fd16['project_id'];if(_0x19fd16?.['page'])_0x5a5f7e[_0x550a3e(0x125)]=_0x19fd16[_0x550a3e(0x125)];if(_0x19fd16?.[_0x550a3e(0x115)])_0x5a5f7e['limit']=_0x19fd16['limit'];const _0x42b827=await this['request']('GET',_0x550a3e(0x113),undefined,_0x5a5f7e);return{'workflowGroups':_0x42b827?.['workflowGroups']??_0x42b827?.[_0x550a3e(0x107)]??[],'pagination':_0x42b827?.[_0x550a3e(0x10b)]};},'run':async(_0x4bde65,_0x47f45a,_0x57d08a={})=>{const _0x10dd0f=_0x5570ee,{payload:_0x314a5d,environment:_0x1d7ef3,executionHeaders:_0x3ad71d}=_0x57d08a,_0x71c7d4={};if(_0x314a5d!==undefined)_0x71c7d4[_0x10dd0f(0x103)]=_0x314a5d;if(_0x1d7ef3!==undefined)_0x71c7d4[_0x10dd0f(0xef)]=_0x1d7ef3;const _0xa558b3=(0x0,sanitize_execution_headers_1[_0x10dd0f(0xea)])(_0x3ad71d??{});if(Object['keys'](_0xa558b3)[_0x10dd0f(0xe1)]>0x0)_0x71c7d4['executionHeaders']=_0xa558b3;const _0x5938fc=await this[_0x10dd0f(0x124)](_0x10dd0f(0xe4),_0x10dd0f(0x117)+_0x4bde65+_0x10dd0f(0x10f)+_0x47f45a,_0x71c7d4);return toFinalWorkflowResult(_0x5938fc,this[_0x10dd0f(0xf3)]);},'runByWebhook':async(_0x595591,_0x10a762,_0x14c154={})=>{const _0x2573c6=_0x5570ee,{environment:_0x3f6dde,body:_0x1699b3,executionHeaders:_0x54e648,..._0x1f8250}=_0x14c154,_0x36c859={..._0x1699b3??{},..._0x1f8250},_0x148eae=(0x0,sanitize_execution_headers_1[_0x2573c6(0xea)])(_0x54e648??{}),_0x367215={'webhookPath':_0x595591,'webhookMethod':_0x10a762,'payload':_0x36c859};if(_0x3f6dde!==undefined)_0x367215[_0x2573c6(0xef)]=_0x3f6dde;if(Object[_0x2573c6(0x142)](_0x148eae)[_0x2573c6(0xe1)]>0x0)_0x367215['executionHeaders']=_0x148eae;const _0x4241af=await this['request'](_0x2573c6(0xe4),_0x2573c6(0x104),_0x367215);return toFinalWorkflowResult(_0x4241af,this[_0x2573c6(0xf3)]);},'promote':async _0x426fe6=>{const _0x1a9903=_0x5570ee;return this[_0x1a9903(0x124)](_0x1a9903(0xe4),_0x1a9903(0x117)+_0x426fe6+_0x1a9903(0xf1));}},this[_0x5570ee(0xed)]={'list':async()=>{const _0x322049=_0x5570ee,_0x3e7d09=await this[_0x322049(0x124)]('GET',_0x322049(0xff));return _0x3e7d09?.[_0x322049(0xed)]??_0x3e7d09?.[_0x322049(0x107)]??_0x3e7d09??[];},'push':async _0x619ae7=>{const _0x3fd5a4=_0x5570ee,_0x27c7dc={'name':_0x619ae7[_0x3fd5a4(0x166)],'slug':_0x619ae7[_0x3fd5a4(0x11d)]||_0x619ae7['_id'],'input_schema':_0x619ae7[_0x3fd5a4(0x118)],'steps':_0x619ae7['steps'],'output_from':_0x619ae7[_0x3fd5a4(0xf5)]},_0x18b391=_0x619ae7[_0x3fd5a4(0x160)];try{return await this[_0x3fd5a4(0x124)](_0x3fd5a4(0x137),_0x3fd5a4(0x15e)+_0x18b391),this[_0x3fd5a4(0x124)](_0x3fd5a4(0x12e),_0x3fd5a4(0x15e)+_0x18b391,_0x27c7dc);}catch{return this[_0x3fd5a4(0x124)]('POST',_0x3fd5a4(0xff),_0x27c7dc);}},'pull':async _0x12f764=>{const _0xced143=_0x5570ee,_0x5d50df=await this['request'](_0xced143(0x137),_0xced143(0x15e)+_0x12f764),_0x5c3a47=_0x5d50df?.[_0xced143(0x12c)]||_0x5d50df;if(!_0x5c3a47)throw new Error(_0xced143(0x120));return{'_id':_0x5c3a47[_0xced143(0x160)],'name':_0x5c3a47[_0xced143(0x166)],'slug':_0x5c3a47[_0xced143(0x11d)],'input_schema':_0x5c3a47['input_schema']||[],'steps':_0x5c3a47[_0xced143(0x12d)]||_0x5c3a47[_0xced143(0x134)]?.['steps']||[],'output_from':_0x5c3a47['output_from']};},'invoke':async(_0x5e88a0,_0x20056e)=>{const _0x234be4=_0x5570ee,_0x39f8a4=await this[_0x234be4(0x124)](_0x234be4(0xe4),_0x234be4(0x15e)+_0x5e88a0+_0x234be4(0xda),{'args':_0x20056e});return _0x39f8a4?.[_0x234be4(0x134)]??_0x39f8a4?.['result']??_0x39f8a4;},'invokePublic':async(_0xc64f73,_0x673023)=>{const _0x223325=_0x5570ee,_0x535dba=await this['request'](_0x223325(0xe4),'/functions/public/'+_0xc64f73+_0x223325(0xda),{'args':_0x673023});return _0x535dba?.['data']??_0x535dba?.[_0x223325(0x168)]??_0x535dba;}},this[_0x5570ee(0x147)]={'create':async _0x438cae=>{const _0x1d33bb=_0x5570ee;return this[_0x1d33bb(0x124)](_0x1d33bb(0xe4),_0x1d33bb(0x154),_0x438cae);},'list':async()=>{const _0x26dc44=_0x5570ee,_0xb02fd1=await this[_0x26dc44(0x124)](_0x26dc44(0x137),_0x26dc44(0x154));return _0xb02fd1?.[_0x26dc44(0x147)]||_0xb02fd1?.[_0x26dc44(0x107)]||_0xb02fd1||[];},'get':async _0x5769f0=>{const _0x2e8408=_0x5570ee;return this[_0x2e8408(0x124)](_0x2e8408(0x137),_0x2e8408(0x165)+_0x5769f0);},'update':async(_0x5af863,_0x1dc881)=>{const _0xcc18e4=_0x5570ee;return this[_0xcc18e4(0x124)](_0xcc18e4(0x12e),_0xcc18e4(0x165)+_0x5af863,_0x1dc881);},'delete':async _0x3b80be=>{const _0x425f86=_0x5570ee;return this[_0x425f86(0x124)]('DELETE',_0x425f86(0x165)+_0x3b80be);},'setEnvironmentVariables':async(_0x36a88e,_0x2d14a1)=>{const _0x45cb55=_0x5570ee;return this[_0x45cb55(0x124)]('POST','/projects/'+_0x36a88e+_0x45cb55(0x15a),_0x2d14a1);},'listEnvironmentVariables':async _0x1570d2=>{const _0x2bb2c0=_0x5570ee;return this[_0x2bb2c0(0x124)](_0x2bb2c0(0x137),_0x2bb2c0(0x165)+_0x1570d2+_0x2bb2c0(0x15a));},'switchEnvironment':async(_0x292950,_0x2c89fa)=>{const _0xd4789c=_0x5570ee;return this[_0xd4789c(0x124)](_0xd4789c(0xee),_0xd4789c(0x165)+_0x292950+'/environment',{'environment':_0x2c89fa});}},this['baseUrl']=(_0x5b7f4b[_0x5570ee(0x10c)]??exports[_0x5570ee(0x12f)])[_0x5570ee(0xf9)](/\/+$/,''),this[_0x5570ee(0xf4)]=_0x5b7f4b['apiKey'],this[_0x5570ee(0x13c)]=_0x5b7f4b['apiSecret'],this[_0x5570ee(0xe6)]=_0x5b7f4b[_0x5570ee(0xe6)]??DEFAULT_TOKEN_REFRESH_MARGIN_MS,this[_0x5570ee(0x114)]=_0x5b7f4b['tokenFallbackReuseMs']??DEFAULT_FALLBACK_REUSE_MS,this[_0x5570ee(0xf3)]=_0x5b7f4b[_0x5570ee(0xf3)]??![],this['axios']=axios_1[_0x5570ee(0x15c)][_0x5570ee(0x14e)]({'baseURL':this[_0x5570ee(0x10c)]+_0x5570ee(0x129),'timeout':0x7530,'headers':{'Content-Type':_0x5570ee(0x156)}});}['invalidateSessionToken'](){const _0x4dd861=_0x24c48e;this[_0x4dd861(0x164)]=null,this[_0x4dd861(0x126)]=0x0;}[_0x24c48e(0x12b)](_0x5d6227){const _0x347e33=_0x24c48e,_0x26e2fb=_0x5d6227?.[_0x347e33(0xe8)]??_0x5d6227?.[_0x347e33(0x11c)]??_0x5d6227?.[_0x347e33(0x15f)];if(!_0x26e2fb||typeof _0x26e2fb!==_0x347e33(0x14d)){const _0x5259d2=_0x5d6227?.[_0x347e33(0x146)]||_0x5d6227?.['message']||'Login\x20failed:\x20no\x20token\x20in\x20response';throw new Error(_0x5259d2);}this[_0x347e33(0x164)]=_0x26e2fb;const _0x24ce05=parseExpiryMsFromLoginBody(_0x5d6227,_0x26e2fb),_0x13dfee=Math[_0x347e33(0x13a)](0x0,this[_0x347e33(0xe6)]);_0x24ce05!=null&&_0x24ce05>Date[_0x347e33(0x152)]()?this[_0x347e33(0x126)]=Math[_0x347e33(0x13a)](Date[_0x347e33(0x152)](),_0x24ce05-_0x13dfee):this[_0x347e33(0x126)]=Date[_0x347e33(0x152)]()+this[_0x347e33(0x114)];}async[_0x24c48e(0xf6)](){const _0x1774f6=_0x24c48e,{data:_0xe28c23}=await this[_0x1774f6(0x143)][_0x1774f6(0xfd)](_0x1774f6(0xf8),{'apiKey':this[_0x1774f6(0xf4)],'apiSecret':this['apiSecret']});this[_0x1774f6(0x12b)](_0xe28c23);}['sessionTokenIsFresh'](){const _0xd70826=_0x24c48e;return!!this[_0xd70826(0x164)]&&Date[_0xd70826(0x152)]()<this['tokenReuseUntilMs'];}async['ensureAuth'](){const _0x2aabd3=_0x24c48e;if(this['sessionTokenIsFresh']())return this[_0x2aabd3(0x164)];if(this[_0x2aabd3(0x150)]){await this['loginPromise'];if(this[_0x2aabd3(0xec)]())return this[_0x2aabd3(0x164)];}return this[_0x2aabd3(0x150)]=((async()=>{const _0x4c6bfb=_0x2aabd3;try{await this['authenticate']();}finally{this[_0x4c6bfb(0x150)]=null;}})()),await this['loginPromise'],this[_0x2aabd3(0x164)];}async['request'](_0x55c749,_0x5879dc,_0x4bceae,_0x2fa3f3,_0x32cd00,_0x4029b6){const _0x269b74=_0x24c48e,_0xfa8d4b=await this[_0x269b74(0x112)](),_0x1afadc={'method':_0x55c749,'url':_0x5879dc,'headers':{'Authorization':'Bearer\x20'+_0xfa8d4b,..._0x32cd00}};if(_0x4bceae)_0x1afadc[_0x269b74(0x134)]=_0x4bceae;if(_0x2fa3f3)_0x1afadc['params']=_0x2fa3f3;try{const {data:_0x4a59cb}=await this[_0x269b74(0x143)](_0x1afadc);return _0x4a59cb;}catch(_0x231ea2){if(_0x231ea2?.[_0x269b74(0x131)]?.[_0x269b74(0x155)]===0x191&&!_0x4029b6)return this[_0x269b74(0xdf)](),this[_0x269b74(0x124)](_0x55c749,_0x5879dc,_0x4bceae,_0x2fa3f3,_0x32cd00,!![]);throw(0x0,errors_1[_0x269b74(0x128)])(_0x231ea2,_0x269b74(0x13d)+_0x55c749+'\x20'+_0x5879dc);}}}exports[_0x24c48e(0xfa)]=FlosyncClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.FlosyncClient = exports.DEFAULT_CLIODOT_BASE_URL = void 0;
|
|
40
|
+
const axios_1 = __importDefault(require("axios"));
|
|
41
|
+
const StepsToNodesTransformer_1 = require("./transformers/StepsToNodesTransformer");
|
|
42
|
+
const errors_1 = require("./errors");
|
|
43
|
+
const sanitize_execution_headers_1 = require("./http/sanitize-execution-headers");
|
|
44
|
+
exports.DEFAULT_CLIODOT_BASE_URL = "https://sdk.flowfly.dev";
|
|
45
|
+
const DEFAULT_TOKEN_REFRESH_MARGIN_MS = 10 * 60 * 1000;
|
|
46
|
+
const DEFAULT_FALLBACK_REUSE_MS = 50 * 60 * 1000;
|
|
47
|
+
function decodeJwtExpMs(token) {
|
|
48
|
+
try {
|
|
49
|
+
if (typeof Buffer === "undefined")
|
|
50
|
+
return null;
|
|
51
|
+
const parts = token.split(".");
|
|
52
|
+
if (parts.length < 2)
|
|
53
|
+
return null;
|
|
54
|
+
const b64 = parts[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
55
|
+
const pad = b64.length % 4 === 0 ? "" : "=".repeat(4 - (b64.length % 4));
|
|
56
|
+
const payload = JSON.parse(Buffer.from(b64 + pad, "base64").toString("utf8"));
|
|
57
|
+
return typeof payload.exp === "number" ? payload.exp * 1000 : null;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function parseExpiryMsFromLoginBody(data, token) {
|
|
64
|
+
const iso = data?.tokenExpiresAt ?? data?.expiresAt ?? data?.expires_at;
|
|
65
|
+
if (iso != null && typeof iso === "string") {
|
|
66
|
+
const t = Date.parse(iso);
|
|
67
|
+
if (!Number.isNaN(t))
|
|
68
|
+
return t;
|
|
69
|
+
}
|
|
70
|
+
const expiresIn = data?.expires_in ?? data?.expiresIn;
|
|
71
|
+
if (typeof expiresIn === "number" && Number.isFinite(expiresIn)) {
|
|
72
|
+
return Date.now() + Math.max(0, expiresIn) * 1000;
|
|
73
|
+
}
|
|
74
|
+
return decodeJwtExpMs(token);
|
|
75
|
+
}
|
|
76
|
+
function toFinalWorkflowResult(data, debug) {
|
|
77
|
+
if (data?.result?.response) {
|
|
78
|
+
const result = {
|
|
79
|
+
statusCode: data.result.response.statusCode,
|
|
80
|
+
data: data.result.response?.body ?? {},
|
|
81
|
+
};
|
|
82
|
+
if (debug && data.result.stepResults) {
|
|
83
|
+
result._debug = { stepResults: data.result.stepResults };
|
|
84
|
+
}
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
if (data?.result?.stepResults) {
|
|
88
|
+
const keys = Object.keys(data.result.stepResults);
|
|
89
|
+
const result = data.result.stepResults[keys?.[0]];
|
|
90
|
+
if (debug) {
|
|
91
|
+
return { data: result, _debug: { stepResults: data.result.stepResults } };
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
97
|
+
class FlosyncClient {
|
|
98
|
+
constructor(config) {
|
|
99
|
+
this.jwt = null;
|
|
100
|
+
this.tokenReuseUntilMs = 0;
|
|
101
|
+
this.loginPromise = null;
|
|
102
|
+
this.connectors = {
|
|
103
|
+
get: async (connectorId, options) => {
|
|
104
|
+
const params = {};
|
|
105
|
+
const v = options?.semver ?? options?.version;
|
|
106
|
+
if (v) {
|
|
107
|
+
params.semver = v;
|
|
108
|
+
}
|
|
109
|
+
const data = await this.request("GET", `/connectors/${connectorId}`, undefined, params);
|
|
110
|
+
const c = data?.connector ?? data;
|
|
111
|
+
if (!c)
|
|
112
|
+
return null;
|
|
113
|
+
return {
|
|
114
|
+
_id: c._id ?? connectorId,
|
|
115
|
+
name: c.name,
|
|
116
|
+
type: c.type ?? "REST",
|
|
117
|
+
base_url: c.base_url,
|
|
118
|
+
auth: c.auth ?? { type: "none" },
|
|
119
|
+
endpoints: c.endpoints ?? [],
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
list: async (options) => {
|
|
123
|
+
const params = {};
|
|
124
|
+
if (options?.type)
|
|
125
|
+
params.type = options.type;
|
|
126
|
+
if (options?.status)
|
|
127
|
+
params.status = options.status;
|
|
128
|
+
if (options?.category)
|
|
129
|
+
params.category = options.category;
|
|
130
|
+
if (options?.page)
|
|
131
|
+
params.page = options.page;
|
|
132
|
+
if (options?.limit)
|
|
133
|
+
params.limit = options.limit;
|
|
134
|
+
const data = await this.request("GET", "/connectors", undefined, params);
|
|
135
|
+
return { connectors: data?.connectors ?? data?.items ?? [], pagination: data?.pagination };
|
|
136
|
+
},
|
|
137
|
+
search: async (options) => {
|
|
138
|
+
const params = {};
|
|
139
|
+
if (options?.term)
|
|
140
|
+
params.search = options.term;
|
|
141
|
+
if (options?.category)
|
|
142
|
+
params.category = options.category;
|
|
143
|
+
if (options?.page)
|
|
144
|
+
params.page = options.page;
|
|
145
|
+
if (options?.limit)
|
|
146
|
+
params.limit = options.limit;
|
|
147
|
+
const data = await this.request("GET", "/connectors/search", undefined, params);
|
|
148
|
+
return { connectors: data?.connectors ?? data?.items ?? [], pagination: data?.pagination };
|
|
149
|
+
},
|
|
150
|
+
installed: async (options) => {
|
|
151
|
+
const params = {};
|
|
152
|
+
if (options?.status)
|
|
153
|
+
params.status = options.status;
|
|
154
|
+
if (options?.page)
|
|
155
|
+
params.page = options.page;
|
|
156
|
+
if (options?.limit)
|
|
157
|
+
params.limit = options.limit;
|
|
158
|
+
const data = await this.request("GET", "/connectors/installed", undefined, params);
|
|
159
|
+
return { installations: data?.installations ?? data?.items ?? [], pagination: data?.pagination };
|
|
160
|
+
},
|
|
161
|
+
push: async (connector) => {
|
|
162
|
+
const id = connector._id ?? connector.slug;
|
|
163
|
+
if (!id)
|
|
164
|
+
throw new Error("Connector must have _id or slug");
|
|
165
|
+
try {
|
|
166
|
+
await this.request("GET", `/connectors/${id}`);
|
|
167
|
+
return this.request("PUT", `/connectors/${id}`, connector);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return this.request("POST", "/connectors", connector);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
install: async (connectorId, options) => {
|
|
174
|
+
const data = await this.request("POST", `/connectors/${connectorId}/install`, options ?? {});
|
|
175
|
+
return data?.installation ?? data;
|
|
176
|
+
},
|
|
177
|
+
uninstall: async (connectorId) => {
|
|
178
|
+
return this.request("POST", `/connectors/${connectorId}/uninstall`);
|
|
179
|
+
},
|
|
180
|
+
execute: async (connectorId, action, options) => {
|
|
181
|
+
const requestBody = {
|
|
182
|
+
...options?.body,
|
|
183
|
+
installation_id: options?.installation_id,
|
|
184
|
+
database: options?.database,
|
|
185
|
+
connection_id: options?.connection_id,
|
|
186
|
+
connector_version: options?.connector_version,
|
|
187
|
+
};
|
|
188
|
+
const filteredBody = Object.fromEntries(Object.entries(requestBody).filter(([, v]) => v !== undefined));
|
|
189
|
+
const queryParams = options?.params;
|
|
190
|
+
// console.log("HERE WE GO", filteredBody)
|
|
191
|
+
const headers = options?.headers;
|
|
192
|
+
const data = await this.request("POST", `/connectors/${connectorId}/actions/${encodeURIComponent(action)}`, Object.keys(filteredBody).length ? filteredBody : undefined, queryParams, headers);
|
|
193
|
+
if (data?.ok === false)
|
|
194
|
+
throw new Error(data?.error ?? "Connector execution failed");
|
|
195
|
+
return data?.data ?? data;
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
this.workflows = {
|
|
199
|
+
push: async (workflow) => {
|
|
200
|
+
const group = (0, StepsToNodesTransformer_1.stepsToNodes)(workflow);
|
|
201
|
+
const groupId = workflow._id;
|
|
202
|
+
try {
|
|
203
|
+
await this.request("GET", `/workflows/${groupId}`);
|
|
204
|
+
return this.request("PUT", `/workflows/${groupId}`, group);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return this.request("POST", "/workflows", group);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
pull: async (groupId) => {
|
|
211
|
+
const data = await this.request("GET", `/workflows/${groupId}`);
|
|
212
|
+
const wg = data?.workflowGroup || data;
|
|
213
|
+
const dataItem = Array.isArray(wg?.data) ? wg.data[0] : wg;
|
|
214
|
+
if (!dataItem || !dataItem.nodes)
|
|
215
|
+
throw new Error("Workflow not found");
|
|
216
|
+
const { WorkflowTransformer } = await Promise.resolve().then(() => __importStar(require("./transformers/WorkflowTransformer")));
|
|
217
|
+
return WorkflowTransformer.transform(dataItem, wg._id || groupId, wg.tenant_id || "", wg.vars, wg.project_id);
|
|
218
|
+
},
|
|
219
|
+
list: async (options) => {
|
|
220
|
+
const params = {};
|
|
221
|
+
if (options?.status)
|
|
222
|
+
params.status = options.status;
|
|
223
|
+
if (options?.type)
|
|
224
|
+
params.type = options.type;
|
|
225
|
+
if (options?.name)
|
|
226
|
+
params.name = options.name;
|
|
227
|
+
if (options?.project_id)
|
|
228
|
+
params.project_id = options.project_id;
|
|
229
|
+
if (options?.page)
|
|
230
|
+
params.page = options.page;
|
|
231
|
+
if (options?.limit)
|
|
232
|
+
params.limit = options.limit;
|
|
233
|
+
const data = await this.request("GET", "/workflows", undefined, params);
|
|
234
|
+
return {
|
|
235
|
+
workflowGroups: data?.workflowGroups ?? data?.items ?? [],
|
|
236
|
+
pagination: data?.pagination,
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
run: async (groupId, triggerId, opts = {}) => {
|
|
240
|
+
const { payload, environment, executionHeaders } = opts;
|
|
241
|
+
const body = {};
|
|
242
|
+
if (payload !== undefined)
|
|
243
|
+
body.payload = payload;
|
|
244
|
+
if (environment !== undefined)
|
|
245
|
+
body.environment = environment;
|
|
246
|
+
const exec = (0, sanitize_execution_headers_1.sanitizeExecutionHeaders)(executionHeaders ?? {});
|
|
247
|
+
if (Object.keys(exec).length > 0)
|
|
248
|
+
body.executionHeaders = exec;
|
|
249
|
+
const data = await this.request("POST", `/workflows/${groupId}/test/trigger/${triggerId}`, body);
|
|
250
|
+
return toFinalWorkflowResult(data, this.debug);
|
|
251
|
+
},
|
|
252
|
+
runByWebhook: async (webhookPath, method, payload = {}) => {
|
|
253
|
+
const { environment, body, executionHeaders, ...rest } = payload;
|
|
254
|
+
const innerPayload = { ...(body ?? {}), ...rest };
|
|
255
|
+
const exec = (0, sanitize_execution_headers_1.sanitizeExecutionHeaders)(executionHeaders ?? {});
|
|
256
|
+
const reqBody = {
|
|
257
|
+
webhookPath,
|
|
258
|
+
webhookMethod: method,
|
|
259
|
+
payload: innerPayload,
|
|
260
|
+
};
|
|
261
|
+
if (environment !== undefined)
|
|
262
|
+
reqBody.environment = environment;
|
|
263
|
+
if (Object.keys(exec).length > 0)
|
|
264
|
+
reqBody.executionHeaders = exec;
|
|
265
|
+
const data = await this.request("POST", "/workflows/test/webhook", reqBody);
|
|
266
|
+
return toFinalWorkflowResult(data, this.debug);
|
|
267
|
+
},
|
|
268
|
+
promote: async (groupId) => {
|
|
269
|
+
return this.request("POST", `/workflows/${groupId}/promote`);
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
this.functions = {
|
|
273
|
+
list: async () => {
|
|
274
|
+
const data = await this.request("GET", "/functions");
|
|
275
|
+
return data?.functions ?? data?.items ?? data ?? [];
|
|
276
|
+
},
|
|
277
|
+
push: async (fn) => {
|
|
278
|
+
const payload = {
|
|
279
|
+
name: fn.name,
|
|
280
|
+
slug: fn.slug || fn._id,
|
|
281
|
+
input_schema: fn.input_schema,
|
|
282
|
+
steps: fn.steps,
|
|
283
|
+
output_from: fn.output_from,
|
|
284
|
+
};
|
|
285
|
+
const id = fn._id;
|
|
286
|
+
try {
|
|
287
|
+
await this.request("GET", `/functions/${id}`);
|
|
288
|
+
return this.request("PUT", `/functions/${id}`, payload);
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
return this.request("POST", "/functions", payload);
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
pull: async (functionId) => {
|
|
295
|
+
const data = await this.request("GET", `/functions/${functionId}`);
|
|
296
|
+
const f = data?.function || data;
|
|
297
|
+
if (!f)
|
|
298
|
+
throw new Error("Function not found");
|
|
299
|
+
return {
|
|
300
|
+
_id: f._id,
|
|
301
|
+
name: f.name,
|
|
302
|
+
slug: f.slug,
|
|
303
|
+
input_schema: f.input_schema || [],
|
|
304
|
+
steps: f.steps || f.data?.steps || [],
|
|
305
|
+
output_from: f.output_from,
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
invoke: async (functionId, args) => {
|
|
309
|
+
const data = await this.request("POST", `/functions/${functionId}/invoke`, { args });
|
|
310
|
+
return data?.data ?? data?.result ?? data;
|
|
311
|
+
},
|
|
312
|
+
invokePublic: async (slug, args) => {
|
|
313
|
+
const data = await this.request("POST", `/functions/public/${slug}/invoke`, { args });
|
|
314
|
+
return data?.data ?? data?.result ?? data;
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
this.projects = {
|
|
318
|
+
create: async (input) => {
|
|
319
|
+
return this.request("POST", "/projects", input);
|
|
320
|
+
},
|
|
321
|
+
list: async () => {
|
|
322
|
+
const data = await this.request("GET", "/projects");
|
|
323
|
+
return data?.projects || data?.items || data || [];
|
|
324
|
+
},
|
|
325
|
+
get: async (projectId) => {
|
|
326
|
+
return this.request("GET", `/projects/${projectId}`);
|
|
327
|
+
},
|
|
328
|
+
update: async (projectId, input) => {
|
|
329
|
+
return this.request("PUT", `/projects/${projectId}`, input);
|
|
330
|
+
},
|
|
331
|
+
delete: async (projectId) => {
|
|
332
|
+
return this.request("DELETE", `/projects/${projectId}`);
|
|
333
|
+
},
|
|
334
|
+
setEnvironmentVariables: async (projectId, input) => {
|
|
335
|
+
return this.request("POST", `/projects/${projectId}/environment-variables`, input);
|
|
336
|
+
},
|
|
337
|
+
listEnvironmentVariables: async (projectId) => {
|
|
338
|
+
return this.request("GET", `/projects/${projectId}/environment-variables`);
|
|
339
|
+
},
|
|
340
|
+
switchEnvironment: async (projectId, environment) => {
|
|
341
|
+
return this.request("PATCH", `/projects/${projectId}/environment`, { environment });
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
this.baseUrl = (config.baseUrl ?? exports.DEFAULT_CLIODOT_BASE_URL).replace(/\/+$/, "");
|
|
345
|
+
this.apiKey = config.apiKey;
|
|
346
|
+
this.apiSecret = config.apiSecret;
|
|
347
|
+
this.tokenRefreshMarginMs = config.tokenRefreshMarginMs ?? DEFAULT_TOKEN_REFRESH_MARGIN_MS;
|
|
348
|
+
this.tokenFallbackReuseMs = config.tokenFallbackReuseMs ?? DEFAULT_FALLBACK_REUSE_MS;
|
|
349
|
+
this.debug = config.debug ?? false;
|
|
350
|
+
this.axios = axios_1.default.create({
|
|
351
|
+
baseURL: `${this.baseUrl}/api-core/cliodot`,
|
|
352
|
+
timeout: 30000,
|
|
353
|
+
headers: { "Content-Type": "application/json" },
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
invalidateSessionToken() {
|
|
357
|
+
this.jwt = null;
|
|
358
|
+
this.tokenReuseUntilMs = 0;
|
|
359
|
+
}
|
|
360
|
+
setSessionFromLoginResponse(data) {
|
|
361
|
+
const token = data?.token ?? data?.accessToken ?? data?.access_token;
|
|
362
|
+
if (!token || typeof token !== "string") {
|
|
363
|
+
const errMsg = data?.error || data?.message || "Login failed: no token in response";
|
|
364
|
+
throw new Error(errMsg);
|
|
365
|
+
}
|
|
366
|
+
this.jwt = token;
|
|
367
|
+
const serverExpiryMs = parseExpiryMsFromLoginBody(data, token);
|
|
368
|
+
const margin = Math.max(0, this.tokenRefreshMarginMs);
|
|
369
|
+
if (serverExpiryMs != null && serverExpiryMs > Date.now()) {
|
|
370
|
+
this.tokenReuseUntilMs = Math.max(Date.now(), serverExpiryMs - margin);
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
this.tokenReuseUntilMs = Date.now() + this.tokenFallbackReuseMs;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
async authenticate() {
|
|
377
|
+
const { data } = await this.axios.post("/user/login-with-api-key", {
|
|
378
|
+
apiKey: this.apiKey,
|
|
379
|
+
apiSecret: this.apiSecret,
|
|
380
|
+
});
|
|
381
|
+
this.setSessionFromLoginResponse(data);
|
|
382
|
+
}
|
|
383
|
+
sessionTokenIsFresh() {
|
|
384
|
+
return !!this.jwt && Date.now() < this.tokenReuseUntilMs;
|
|
385
|
+
}
|
|
386
|
+
async ensureAuth() {
|
|
387
|
+
if (this.sessionTokenIsFresh())
|
|
388
|
+
return this.jwt;
|
|
389
|
+
if (this.loginPromise) {
|
|
390
|
+
await this.loginPromise;
|
|
391
|
+
if (this.sessionTokenIsFresh())
|
|
392
|
+
return this.jwt;
|
|
393
|
+
}
|
|
394
|
+
this.loginPromise = (async () => {
|
|
395
|
+
try {
|
|
396
|
+
await this.authenticate();
|
|
397
|
+
}
|
|
398
|
+
finally {
|
|
399
|
+
this.loginPromise = null;
|
|
400
|
+
}
|
|
401
|
+
})();
|
|
402
|
+
await this.loginPromise;
|
|
403
|
+
return this.jwt;
|
|
404
|
+
}
|
|
405
|
+
async request(method, path, body, params, headers, isRetryAfter401) {
|
|
406
|
+
const token = await this.ensureAuth();
|
|
407
|
+
const cfg = {
|
|
408
|
+
method,
|
|
409
|
+
url: path,
|
|
410
|
+
headers: { Authorization: `Bearer ${token}`, ...headers },
|
|
411
|
+
};
|
|
412
|
+
if (body)
|
|
413
|
+
cfg.data = body;
|
|
414
|
+
if (params)
|
|
415
|
+
cfg.params = params;
|
|
416
|
+
try {
|
|
417
|
+
const { data } = await this.axios(cfg);
|
|
418
|
+
return data;
|
|
419
|
+
}
|
|
420
|
+
catch (err) {
|
|
421
|
+
if (err?.response?.status === 401 && !isRetryAfter401) {
|
|
422
|
+
this.invalidateSessionToken();
|
|
423
|
+
return this.request(method, path, body, params, headers, true);
|
|
424
|
+
}
|
|
425
|
+
throw (0, errors_1.cliodotApiErrorFromAxios)(err, `Request failed: ${method} ${path}`);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
exports.FlosyncClient = FlosyncClient;
|
package/dist/FunctionBuilder.js
CHANGED
|
@@ -1 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FunctionBuilder = void 0;
|
|
4
|
+
const WorkflowBuilder_1 = require("./WorkflowBuilder");
|
|
5
|
+
function sanitizeStepId(id) {
|
|
6
|
+
return id.replace(/[.\-\s]/g, "_");
|
|
7
|
+
}
|
|
8
|
+
function toInputSchema(input) {
|
|
9
|
+
return Object.entries(input).map(([name, type]) => ({
|
|
10
|
+
name,
|
|
11
|
+
type: (type?.toLowerCase?.() || "string"),
|
|
12
|
+
required: true,
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
class FunctionBuilder {
|
|
16
|
+
constructor(functionId, functionName) {
|
|
17
|
+
this.inputSchema = [];
|
|
18
|
+
this.steps = [];
|
|
19
|
+
this.stepOrder = [];
|
|
20
|
+
this.rawId = functionId;
|
|
21
|
+
this.functionId = sanitizeStepId(functionId);
|
|
22
|
+
this.functionName = functionName || functionId;
|
|
23
|
+
}
|
|
24
|
+
input(schema) {
|
|
25
|
+
this.inputSchema = toInputSchema(schema);
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
step(stepId, fn) {
|
|
29
|
+
const s = new WorkflowBuilder_1.StepBuilder();
|
|
30
|
+
const result = fn(s);
|
|
31
|
+
const rawStep = result.step !== undefined ? result.step : result;
|
|
32
|
+
if (!rawStep || typeof rawStep !== "object")
|
|
33
|
+
throw new Error(`Step ${stepId} did not produce a valid step`);
|
|
34
|
+
const sanitizedId = sanitizeStepId(stepId);
|
|
35
|
+
const fullStep = { ...rawStep, id: sanitizedId };
|
|
36
|
+
this.steps.push(fullStep);
|
|
37
|
+
this.stepOrder.push(stepId);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
outputFrom(stepId) {
|
|
41
|
+
this.outputFromStepId = sanitizeStepId(stepId);
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
build() {
|
|
45
|
+
const stepsWithInputFrom = [];
|
|
46
|
+
for (let i = 0; i < this.steps.length; i++) {
|
|
47
|
+
const step = { ...this.steps[i] };
|
|
48
|
+
if (i > 0) {
|
|
49
|
+
step.input_from = sanitizeStepId(this.stepOrder[i - 1]);
|
|
50
|
+
}
|
|
51
|
+
stepsWithInputFrom.push(step);
|
|
52
|
+
}
|
|
53
|
+
const fn = {
|
|
54
|
+
_id: this.functionId,
|
|
55
|
+
name: this.functionName,
|
|
56
|
+
slug: this.functionId,
|
|
57
|
+
input_schema: this.inputSchema,
|
|
58
|
+
steps: stepsWithInputFrom,
|
|
59
|
+
output_from: this.outputFromStepId,
|
|
60
|
+
};
|
|
61
|
+
fn.__rawId = this.rawId;
|
|
62
|
+
return fn;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.FunctionBuilder = FunctionBuilder;
|
|
@@ -4,6 +4,7 @@ export declare class IdentityAppClient implements IdentityAppClientApi {
|
|
|
4
4
|
private readonly appId;
|
|
5
5
|
private readonly apiKey?;
|
|
6
6
|
private readonly appSecret?;
|
|
7
|
+
private readonly environment?;
|
|
7
8
|
private readonly axios;
|
|
8
9
|
readonly debug: boolean;
|
|
9
10
|
constructor(config: IdentityAppClientConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityAppClient.d.ts","sourceRoot":"","sources":["../src/IdentityAppClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityAppClient.d.ts","sourceRoot":"","sources":["../src/IdentityAppClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA8BlC,qBAAa,iBAAkB,YAAW,oBAAoB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,SAAgB,KAAK,EAAE,OAAO,CAAC;gBAEnB,MAAM,EAAE,uBAAuB;IAqB3C,EAAE,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAIjC,YAAY,CACV,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAiBxC,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAqBnE,OAAO,CACL,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,4BAA4B,CAAC;IAaxC,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAkB7D,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAyBnD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB;IAK9C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB;IAKjD,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,gBAAgB;YAoBV,OAAO;CA8BtB"}
|