@treasuredata/tdx 0.26.0 → 0.26.2
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/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.d.ts +2 -1
- package/dist/utils/local-cache.d.ts.map +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/local-cache.js.map +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x2d0d4d=a83_0x9f20;function a83_0x5bc6(){const _0x54d594=['DELETE','errorCode','X-Trino-Catalog','message','Invalid\x20nextUri\x20format:\x20','warn','request','cancelQuery','TRINO_INTERNAL_ERROR','jobId','INTERNAL_ERROR','apiKey','length','httpClient','padStart','site','stdout','streamResults','2558605xWlsGv','1288173jdmXlE','1431052vaKnwA','error','columns','completedSplits','pathname','X-Trino-Schema','processedRows','errorLocation','17784nsZmNU','checkResponseError','text/plain','INSUFFICIENT_RESOURCES','1ZnDiGR','proxy','x-td-jobid','55HnEzHL','consider\x20adding\x20LIMIT\x20clause','red','map','stats','INTERNAL','state','trino','USER_ERROR','20141517wiaaGh','nextUri','210EqHeqG','dim','push','8iivnDm','POST','GET','Failed\x20to\x20cancel\x20query:','totalSplits','split','143271vimdDq','name','EXTERNAL','12mDYQzr','executeQuery','TRINO_NOT_FOUND','X-TD-JobId','TRINO_INVALID_ARGUMENT','PERMISSION_DENIED','data','TRINO_USER_CANCELLED','56118pezElv','warnings','Warning:\x20Large\x20result\x20set\x20(','ALREADY_EXISTS','toLocaleString','\x20rows)\x20-\x20'];a83_0x5bc6=function(){return _0x54d594;};return a83_0x5bc6();}(function(_0x2e837e,_0xf15f02){const _0x147b5d=a83_0x9f20,_0x5d72d0=_0x2e837e();while(!![]){try{const _0x165685=parseInt(_0x147b5d(0x193))/0x1*(-parseInt(_0x147b5d(0x1b5))/0x2)+-parseInt(_0x147b5d(0x186))/0x3+-parseInt(_0x147b5d(0x187))/0x4+-parseInt(_0x147b5d(0x196))/0x5*(-parseInt(_0x147b5d(0x18f))/0x6)+parseInt(_0x147b5d(0x185))/0x7*(-parseInt(_0x147b5d(0x1a4))/0x8)+parseInt(_0x147b5d(0x1aa))/0x9*(-parseInt(_0x147b5d(0x1a1))/0xa)+parseInt(_0x147b5d(0x19f))/0xb*(parseInt(_0x147b5d(0x1ad))/0xc);if(_0x165685===_0xf15f02)break;else _0x5d72d0['push'](_0x5d72d0['shift']());}catch(_0x1ac7e2){_0x5d72d0['push'](_0x5d72d0['shift']());}}}(a83_0x5bc6,0x551d0));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';function a83_0x9f20(_0x44602a,_0x10827c){_0x44602a=_0x44602a-0x17a;const _0x5bc6a1=a83_0x5bc6();let _0x9f2044=_0x5bc6a1[_0x44602a];return _0x9f2044;}import{getTrinoHeaders}from'../../core/auth.js';import{SDKError,ErrorCode}from'../errors.js';import*as a83_0x395191 from'chalk';const Chalk=a83_0x395191['Chalk'];export class TrinoApiClient{[a83_0x2d0d4d(0x180)];constructor(_0x2bd87f){const _0x3eb40a=a83_0x2d0d4d,_0x230c79=getEndpoint(_0x2bd87f[_0x3eb40a(0x182)],_0x3eb40a(0x19d)),_0xc98c62=getTrinoHeaders(_0x2bd87f[_0x3eb40a(0x182)],_0x2bd87f[_0x3eb40a(0x17e)]);this[_0x3eb40a(0x180)]=new HTTPClient(_0x230c79,_0xc98c62,{'proxy':_0x2bd87f[_0x3eb40a(0x194)]});}async[a83_0x2d0d4d(0x1ae)](_0x40c693,_0x1d05c5={}){const _0x20d5b7=a83_0x2d0d4d,{catalog:_0x27cf99,schema:_0x5a1e6e,timeout:_0x153729,signal:_0x32f012,onJobId:_0x2aca8d,onProgress:_0x1a56ee}=_0x1d05c5,_0x1ef5f5={'Content-Type':_0x20d5b7(0x191)};(_0x27cf99||_0x5a1e6e)&&(_0x1ef5f5[_0x20d5b7(0x1bd)]=_0x27cf99||'td');_0x5a1e6e&&(_0x1ef5f5[_0x20d5b7(0x18c)]=_0x5a1e6e);const _0x87c8ed=await this[_0x20d5b7(0x180)][_0x20d5b7(0x1c1)](_0x20d5b7(0x1a5),'/v1/statement',{'headers':_0x1ef5f5,'body':_0x40c693,'timeout':_0x153729,'signal':_0x32f012,'includeHeaders':!![]}),_0x4bcf1f=_0x87c8ed[_0x20d5b7(0x1b3)],_0x1c0713=_0x87c8ed['headers'],_0x5a15fd=_0x1c0713[_0x20d5b7(0x195)]||_0x1c0713[_0x20d5b7(0x1b0)];_0x5a15fd&&_0x2aca8d&&_0x2aca8d(_0x5a15fd);this['checkResponseError'](_0x4bcf1f,_0x4bcf1f['id'],_0x40c693);const _0x2b9688=await this[_0x20d5b7(0x184)](_0x4bcf1f,_0x40c693,_0x32f012,_0x1a56ee);return _0x5a15fd&&(_0x2b9688[_0x20d5b7(0x17c)]=_0x5a15fd),_0x2b9688;}async['streamResults'](_0x47921f,_0x14e3c1,_0x5bccb7,_0x2bc2fe){const _0x12737f=a83_0x2d0d4d,_0x2ace83=_0x47921f['id'];let _0x1072bf=[];const _0xf7678b=[],_0x39d52f=[];let _0x322aff=_0x47921f;const _0x34f827=0x186a0;_0x322aff[_0x12737f(0x189)]&&(_0x1072bf=_0x322aff[_0x12737f(0x189)]);_0x322aff[_0x12737f(0x1b3)]&&_0xf7678b[_0x12737f(0x1a3)](..._0x322aff['data']);_0x322aff[_0x12737f(0x1b6)]&&_0x39d52f['push'](..._0x322aff['warnings']);_0x2bc2fe&&_0x322aff[_0x12737f(0x19a)]&&_0x2bc2fe({'state':_0x322aff['stats']['state'],'processedRows':_0x322aff[_0x12737f(0x19a)][_0x12737f(0x18d)],'completedSplits':_0x322aff[_0x12737f(0x19a)]['completedSplits'],'totalSplits':_0x322aff[_0x12737f(0x19a)][_0x12737f(0x1a8)]});while(_0x322aff['nextUri']){if(_0x5bccb7?.['aborted']){await this[_0x12737f(0x17a)](_0x322aff[_0x12737f(0x1a0)]);throw new Error('Query\x20cancelled\x20by\x20user');}let _0x117530;try{_0x117530=new URL(_0x322aff[_0x12737f(0x1a0)])['pathname'];}catch{throw new Error(_0x12737f(0x1bf)+_0x322aff[_0x12737f(0x1a0)]);}_0x322aff=await this[_0x12737f(0x180)][_0x12737f(0x1c1)](_0x12737f(0x1a6),_0x117530,{'signal':_0x5bccb7}),this[_0x12737f(0x190)](_0x322aff,_0x2ace83,_0x14e3c1),_0x322aff[_0x12737f(0x189)]&&_0x1072bf[_0x12737f(0x17f)]===0x0&&(_0x1072bf=_0x322aff[_0x12737f(0x189)]),_0x322aff[_0x12737f(0x1b3)]&&(_0xf7678b[_0x12737f(0x1a3)](..._0x322aff['data']),_0xf7678b[_0x12737f(0x17f)]>_0x34f827&&_0xf7678b[_0x12737f(0x17f)]%0xc350===0x0&&console[_0x12737f(0x1c0)](_0x12737f(0x1b7)+_0xf7678b[_0x12737f(0x17f)][_0x12737f(0x1b9)]()+_0x12737f(0x1ba)+_0x12737f(0x197))),_0x322aff[_0x12737f(0x1b6)]&&_0x39d52f[_0x12737f(0x1a3)](..._0x322aff[_0x12737f(0x1b6)]),_0x2bc2fe&&_0x322aff[_0x12737f(0x19a)]&&_0x2bc2fe({'state':_0x322aff[_0x12737f(0x19a)][_0x12737f(0x19c)],'processedRows':_0x322aff[_0x12737f(0x19a)]['processedRows'],'completedSplits':_0x322aff[_0x12737f(0x19a)][_0x12737f(0x18a)],'totalSplits':_0x322aff[_0x12737f(0x19a)][_0x12737f(0x1a8)]});}const _0x32b7bd=this['convertRowsToObjects'](_0x1072bf,_0xf7678b);return{'queryId':_0x2ace83,'columns':_0x1072bf,'data':_0x32b7bd,'stats':_0x322aff['stats'],'warnings':_0x39d52f[_0x12737f(0x17f)]>0x0?_0x39d52f:undefined};}['checkResponseError'](_0x1193dd,_0x277a86,_0xa08c3b){const _0x2d67a2=a83_0x2d0d4d;if(!_0x1193dd[_0x2d67a2(0x188)])return;const _0x17c5cd=_0x1193dd[_0x2d67a2(0x188)],_0x59dbaf=mapTrinoErrorToErrorCode(_0x17c5cd),_0x3de492=process[_0x2d67a2(0x183)]['isTTY']?new Chalk({'level':0x3}):new Chalk({'level':0x0}),_0x4e6541='['+_0x17c5cd['errorName']+']\x20Query\x20ID:\x20'+_0x277a86;let _0x462c70=_0x3de492[_0x2d67a2(0x198)](_0x4e6541+'\x0a'+_0x17c5cd[_0x2d67a2(0x1be)]);if(_0xa08c3b&&_0x17c5cd[_0x2d67a2(0x18e)]){const {lineNumber:_0x48d735,columnNumber:_0x86819e}=_0x17c5cd[_0x2d67a2(0x18e)];_0x462c70+='\x0a\x0a'+_0x3de492[_0x2d67a2(0x1a2)]('[query]')+'\x0a'+formatSqlErrorContext(_0xa08c3b,_0x48d735,_0x86819e);}throw new SDKError(_0x59dbaf,_0x462c70,_0x17c5cd);}['convertRowsToObjects'](_0x272655,_0x69c422){const _0x1247f5=a83_0x2d0d4d;if(_0x272655['length']===0x0)return _0x69c422;return _0x69c422[_0x1247f5(0x199)](_0x4c30a0=>{const _0x19e5c4={};return _0x272655['forEach']((_0xaa5d6f,_0x57bca8)=>{const _0x554152=a83_0x9f20;_0x19e5c4[_0xaa5d6f[_0x554152(0x1ab)]]=_0x4c30a0[_0x57bca8];}),_0x19e5c4;});}async[a83_0x2d0d4d(0x17a)](_0x158bf3){const _0x1f872b=a83_0x2d0d4d;try{const _0x3d514b=new URL(_0x158bf3)[_0x1f872b(0x18b)];await this[_0x1f872b(0x180)][_0x1f872b(0x1c1)](_0x1f872b(0x1bb),_0x3d514b);}catch(_0x267d9c){console[_0x1f872b(0x1c0)](_0x1f872b(0x1a7),_0x267d9c);}}}function formatSqlErrorContext(_0x341291,_0x2389bf,_0x39c7cb){const _0x45ac42=a83_0x2d0d4d,_0x178b0d=_0x341291[_0x45ac42(0x1a9)]('\x0a');if(_0x2389bf<0x1||_0x2389bf>_0x178b0d[_0x45ac42(0x17f)])return _0x341291;const _0x537d56=_0x2389bf-0x1,_0x4a58a6=Math['max'](0x0,_0x537d56-0x2),_0x241b84=Math['min'](_0x178b0d[_0x45ac42(0x17f)],_0x537d56+0x3),_0x42dba9=[],_0x1c2741=process[_0x45ac42(0x183)]['isTTY']?new Chalk({'level':0x3}):new Chalk({'level':0x0});for(let _0x339c5b=_0x4a58a6;_0x339c5b<_0x241b84;_0x339c5b++){const _0x241165=_0x339c5b===_0x537d56?'>\x20':'\x20\x20',_0x46c5bf=String(_0x339c5b+0x1)[_0x45ac42(0x181)](0x3,'\x20'),_0x3cec68=_0x1c2741['dim'](''+_0x241165+_0x46c5bf+'\x20|');_0x42dba9[_0x45ac42(0x1a3)](_0x3cec68+'\x20'+_0x178b0d[_0x339c5b]);if(_0x339c5b===_0x537d56){const _0xb2372d=0x8+(_0x39c7cb-0x1);_0x42dba9['push']('\x20'['repeat'](_0xb2372d)+'^');}}return _0x42dba9['join']('\x0a');}function mapTrinoErrorToErrorCode(_0x2a8be1){const _0x5607ab=a83_0x2d0d4d,_0x9c4248=_0x2a8be1['errorType'],_0x38ccf4=_0x2a8be1[_0x5607ab(0x1bc)];if(_0x9c4248===_0x5607ab(0x19e))switch(_0x38ccf4){case 0x1:return ErrorCode['TRINO_SYNTAX_ERROR'];case 0x3:return ErrorCode[_0x5607ab(0x1b4)];case 0x4:return ErrorCode[_0x5607ab(0x1b2)];case 0x5:case 0x2c:case 0x2d:case 0x2e:case 0x2f:return ErrorCode[_0x5607ab(0x1af)];case 0xc:case 0x31:case 0x32:return ErrorCode[_0x5607ab(0x1b8)];default:return ErrorCode[_0x5607ab(0x1b1)];}else{if(_0x9c4248===_0x5607ab(0x17d))return ErrorCode[_0x5607ab(0x17b)];else{if(_0x9c4248===_0x5607ab(0x192))return ErrorCode['TRINO_INSUFFICIENT_RESOURCES'];else{if(_0x9c4248===_0x5607ab(0x1ac))return ErrorCode['TRINO_INTERNAL_ERROR'];}}}return ErrorCode[_0x5607ab(0x19b)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a84_0x4721(_0x5cffa1,_0x15b0a6){_0x5cffa1=_0x5cffa1-0xe7;const _0x379ff1=a84_0x379f();let _0x4721c1=_0x379ff1[_0x5cffa1];return _0x4721c1;}const a84_0x5ca3c7=a84_0x4721;(function(_0xb6dc6c,_0x51da9c){const _0x315a48=a84_0x4721,_0xe0cfe=_0xb6dc6c();while(!![]){try{const _0x365bd9=parseInt(_0x315a48(0x102))/0x1+-parseInt(_0x315a48(0x145))/0x2*(-parseInt(_0x315a48(0x108))/0x3)+parseInt(_0x315a48(0x14e))/0x4*(parseInt(_0x315a48(0x14c))/0x5)+-parseInt(_0x315a48(0x11f))/0x6*(parseInt(_0x315a48(0x13f))/0x7)+parseInt(_0x315a48(0x112))/0x8+parseInt(_0x315a48(0x138))/0x9+-parseInt(_0x315a48(0x142))/0xa*(parseInt(_0x315a48(0x137))/0xb);if(_0x365bd9===_0x51da9c)break;else _0xe0cfe['push'](_0xe0cfe['shift']());}catch(_0x533cea){_0xe0cfe['push'](_0xe0cfe['shift']());}}}(a84_0x379f,0x40ae9));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../../core/auth.js';import{matchGlobPattern}from'../../utils/string-utils.js';function a84_0x379f(){const _0x4979a8=['resume_from','/api/sessions','toString','/api/workflows','getAttemptTasks','retryAttemptName','36553oAARBL','1701243RufOOP','append','listWorkflows','authHeaders','search_project_name','/api/attempts?','retrySession','14HRdHqH','/retry','deleteProject','1410uWyaaE','workflow','PUT','2afbDTJ','/logs?','/sessions','getProject','listSecrets','workflows','clear_schedule','90yMFrkO','apiKey','43528XQcgTX','name_pattern','downloadProjectArchive','files','workflow_name','/archive?','projectName','listLogFiles','clear_schedule_all','project','retryAttempt','getTaskLogs','allowQueueing','logs','replace','project_id','status','from_task','startAttempt','/api/workflows?','force','GET','workflowId','scheduleFrom','/api/logs/','/api/attempts/','/tasks?','setSecret','/tasks','offset','71641dBBkNH','name','killAttempt','/archive','sessionTime','filter','1310784qhDhWD','proxy','last_id','secrets','uploadProjectArchive','retry_params','/secrets','schedule_from','httpClient','count','2825376fBcRJc','getAttempt','/api/projects/','tasks','/logs','to_time','from_time','limit','task','include_retried','/api/attempts','workflowName','request','1539492gfbRxr','readFile','DELETE','/api/projects','true','sessions','attempts','site','page_size','params','length','/secrets/','project_name','POST','projects','deleteSecret','/tasks/','/api/projects?'];a84_0x379f=function(){return _0x4979a8;};return a84_0x379f();}import{validateGzipArchive,throwArchiveValidationError}from'../workflow/archive-validation.js';export class WorkflowApiClient{[a84_0x5ca3c7(0x110)];[a84_0x5ca3c7(0x13b)];constructor(_0xfb6410){const _0x1d291f=a84_0x5ca3c7,_0x7ef9cf=getEndpoint(_0xfb6410[_0x1d291f(0x126)],_0x1d291f(0x143));this[_0x1d291f(0x13b)]=toHeaderRecord(getAuthHeaders(_0xfb6410[_0x1d291f(0x126)],_0xfb6410[_0x1d291f(0x14d)])),this[_0x1d291f(0x110)]=new HTTPClient(_0x7ef9cf,this[_0x1d291f(0x13b)],{'proxy':_0xfb6410[_0x1d291f(0x109)]});}async['listProjects'](_0x5e63fa){const _0x39f418=a84_0x5ca3c7,_0x30b9ad=new URLSearchParams();if(_0x5e63fa?.['limit'])_0x30b9ad[_0x39f418(0x139)](_0x39f418(0x111),String(_0x5e63fa['limit']));if(_0x5e63fa?.[_0x39f418(0x10a)])_0x30b9ad[_0x39f418(0x139)](_0x39f418(0x10a),_0x5e63fa[_0x39f418(0x10a)]);if(_0x5e63fa?.['name_pattern']){const _0xa10bd2=_0x5e63fa[_0x39f418(0x14f)][_0x39f418(0xf2)](/[*?]/g,'');_0xa10bd2&&_0x30b9ad['append'](_0x39f418(0x14f),_0xa10bd2);}const _0x282d0c=_0x30b9ad[_0x39f418(0x133)](),_0x3646fe=_0x282d0c?'/api/projects?'+_0x282d0c:_0x39f418(0x122),_0xc74976=await this['httpClient'][_0x39f418(0x11e)](_0x39f418(0xf9),_0x3646fe),_0x551b29=_0xc74976[_0x39f418(0x12d)]||[],_0x5ce7bd=_0x551b29[_0x39f418(0x129)]>0x0?_0x551b29[_0x551b29[_0x39f418(0x129)]-0x1]['id']:undefined;let _0x3ed892=_0x551b29;return _0x5e63fa?.[_0x39f418(0x14f)]&&(_0x3ed892=_0x3ed892[_0x39f418(0x107)](_0x50a46c=>{const _0x1bb074=_0x39f418;return matchGlobPattern(_0x50a46c[_0x1bb074(0x103)],_0x5e63fa['name_pattern']);})),{'data':_0x3ed892,'lastId':_0x5ce7bd,'rawCount':_0x551b29['length']};}async[a84_0x5ca3c7(0x13a)](_0x38f379){const _0x2668c7=a84_0x5ca3c7,_0x4b2e71=new URLSearchParams();if(_0x38f379?.[_0x2668c7(0x119)])_0x4b2e71[_0x2668c7(0x139)](_0x2668c7(0x111),String(_0x38f379[_0x2668c7(0x119)]));if(_0x38f379?.[_0x2668c7(0x10a)])_0x4b2e71['append'](_0x2668c7(0x10a),_0x38f379[_0x2668c7(0x10a)]);if(_0x38f379?.[_0x2668c7(0x12b)]){const _0x4ccc8f=_0x38f379['project_name']['replace'](/[*?]/g,'');_0x4ccc8f&&(_0x4b2e71[_0x2668c7(0x139)](_0x2668c7(0x14f),_0x4ccc8f),_0x4b2e71['append'](_0x2668c7(0x13c),_0x2668c7(0x123)));}const _0x1eb8b4=_0x4b2e71[_0x2668c7(0x133)](),_0x39f7b9=_0x1eb8b4?_0x2668c7(0xf7)+_0x1eb8b4:_0x2668c7(0x134),_0x425775=await this[_0x2668c7(0x110)][_0x2668c7(0x11e)](_0x2668c7(0xf9),_0x39f7b9),_0x59cd7e=_0x425775[_0x2668c7(0x14a)]||[],_0x1c510c=_0x59cd7e['length']>0x0?_0x59cd7e[_0x59cd7e[_0x2668c7(0x129)]-0x1]['id']:undefined;let _0x1c7d40=_0x59cd7e;return _0x38f379?.[_0x2668c7(0x12b)]&&(_0x1c7d40=_0x1c7d40[_0x2668c7(0x107)](_0x4c812d=>{const _0x32b363=_0x2668c7,_0x2b6fc1=_0x4c812d[_0x32b363(0xed)]?.['name'];if(!_0x2b6fc1)return![];return matchGlobPattern(_0x2b6fc1,_0x38f379['project_name']);})),{'data':_0x1c7d40,'lastId':_0x1c510c,'rawCount':_0x59cd7e[_0x2668c7(0x129)]};}async['listSessions'](_0x226a2a){const _0x4fa534=a84_0x5ca3c7;let _0xf9bf0c=_0x4fa534(0x132);_0x226a2a?.[_0x4fa534(0xf3)]&&(_0xf9bf0c=_0x4fa534(0x114)+encodeURIComponent(_0x226a2a[_0x4fa534(0xf3)])+_0x4fa534(0x147));const _0xe09fb2=new URLSearchParams();if(_0x226a2a?.[_0x4fa534(0xe8)])_0xe09fb2[_0x4fa534(0x139)](_0x4fa534(0x143),_0x226a2a[_0x4fa534(0xe8)]);if(_0x226a2a?.['status'])_0xe09fb2[_0x4fa534(0x139)](_0x4fa534(0xf4),_0x226a2a[_0x4fa534(0xf4)]);if(_0x226a2a?.[_0x4fa534(0x118)])_0xe09fb2[_0x4fa534(0x139)](_0x4fa534(0x118),_0x226a2a[_0x4fa534(0x118)]);if(_0x226a2a?.[_0x4fa534(0x117)])_0xe09fb2[_0x4fa534(0x139)](_0x4fa534(0x117),_0x226a2a[_0x4fa534(0x117)]);if(_0x226a2a?.[_0x4fa534(0x119)])_0xe09fb2[_0x4fa534(0x139)](_0x4fa534(0x127),String(_0x226a2a[_0x4fa534(0x119)]));if(_0x226a2a?.[_0x4fa534(0x10a)])_0xe09fb2['append'](_0x4fa534(0x10a),_0x226a2a[_0x4fa534(0x10a)]);const _0x116e0c=_0xe09fb2['toString']();_0x116e0c&&(_0xf9bf0c=_0xf9bf0c+'?'+_0x116e0c);const _0x33b229=await this[_0x4fa534(0x110)][_0x4fa534(0x11e)](_0x4fa534(0xf9),_0xf9bf0c),_0x3b90e5=_0x33b229[_0x4fa534(0x124)]||[],_0x25ce39=_0x3b90e5[_0x4fa534(0x129)]>0x0?_0x3b90e5[_0x3b90e5[_0x4fa534(0x129)]-0x1]['id']:undefined;return{'data':_0x3b90e5,'lastId':_0x25ce39};}async['listAttempts'](_0x5bf948){const _0xa894f6=a84_0x5ca3c7,_0x247245=new URLSearchParams();if(_0x5bf948?.[_0xa894f6(0x12b)])_0x247245['append'](_0xa894f6(0xed),_0x5bf948[_0xa894f6(0x12b)]);if(_0x5bf948?.[_0xa894f6(0xe8)])_0x247245[_0xa894f6(0x139)](_0xa894f6(0x143),_0x5bf948['workflow_name']);if(_0x5bf948?.[_0xa894f6(0x11b)])_0x247245[_0xa894f6(0x139)](_0xa894f6(0x11b),'1');if(_0x5bf948?.[_0xa894f6(0x119)])_0x247245[_0xa894f6(0x139)]('page_size',String(_0x5bf948[_0xa894f6(0x119)]));if(_0x5bf948?.['last_id'])_0x247245['append'](_0xa894f6(0x10a),_0x5bf948['last_id']);const _0x454322=_0x247245[_0xa894f6(0x133)](),_0x6daa53=_0x454322?_0xa894f6(0x13d)+_0x454322:_0xa894f6(0x11c),_0x3548eb=await this[_0xa894f6(0x110)][_0xa894f6(0x11e)](_0xa894f6(0xf9),_0x6daa53),_0x53fb28=_0x3548eb[_0xa894f6(0x125)]||[],_0x5687e1=_0x53fb28[_0xa894f6(0x129)]>0x0?_0x53fb28[_0x53fb28[_0xa894f6(0x129)]-0x1]['id']:undefined;return{'data':_0x53fb28,'lastId':_0x5687e1};}async[a84_0x5ca3c7(0x113)](_0x5adb92){const _0x5d0554=a84_0x5ca3c7;return await this[_0x5d0554(0x110)][_0x5d0554(0x11e)]('GET','/api/attempts/'+encodeURIComponent(_0x5adb92));}async[a84_0x5ca3c7(0x135)](_0x51cfd8,_0x11b9c5=![]){const _0x46dafb=a84_0x5ca3c7,_0xddd27d=new URLSearchParams();_0x11b9c5&&_0xddd27d['append']('include_subtasks','true');const _0x11995b=_0xddd27d['toString'](),_0x33ca6c=_0x11995b?_0x46dafb(0xfd)+encodeURIComponent(_0x51cfd8)+_0x46dafb(0xfe)+_0x11995b:_0x46dafb(0xfd)+encodeURIComponent(_0x51cfd8)+_0x46dafb(0x100),_0x1a2870=await this['httpClient'][_0x46dafb(0x11e)](_0x46dafb(0xf9),_0x33ca6c);return _0x1a2870[_0x46dafb(0x115)]||[];}async[a84_0x5ca3c7(0xef)](_0x38a00a,_0x28f09e,_0x554b25){const _0x4bcf31=a84_0x5ca3c7,_0x62ce9=new URLSearchParams();_0x554b25?.[_0x4bcf31(0x101)]!==undefined&&_0x62ce9['append'](_0x4bcf31(0x101),String(_0x554b25['offset']));_0x554b25?.['limit']!==undefined&&_0x62ce9[_0x4bcf31(0x139)](_0x4bcf31(0x119),String(_0x554b25['limit']));const _0x163e8c=_0x62ce9['toString'](),_0x100bf4=_0x163e8c?'/api/attempts/'+encodeURIComponent(_0x38a00a)+_0x4bcf31(0x12f)+encodeURIComponent(_0x28f09e)+_0x4bcf31(0x146)+_0x163e8c:_0x4bcf31(0xfd)+encodeURIComponent(_0x38a00a)+_0x4bcf31(0x12f)+encodeURIComponent(_0x28f09e)+_0x4bcf31(0x116),_0x42346b=await this[_0x4bcf31(0x110)][_0x4bcf31(0x11e)]('GET',_0x100bf4);return _0x42346b[_0x4bcf31(0xf1)]||[];}async[a84_0x5ca3c7(0xeb)](_0x16ec7f,_0x320fac){const _0x92cf1f=a84_0x5ca3c7,_0x1f6e35=new URLSearchParams();_0x320fac&&_0x1f6e35['append'](_0x92cf1f(0x11a),_0x320fac);const _0x107849=_0x1f6e35['toString'](),_0x54b9be=_0x107849?_0x92cf1f(0xfc)+encodeURIComponent(_0x16ec7f)+'/files?'+_0x107849:_0x92cf1f(0xfc)+encodeURIComponent(_0x16ec7f)+'/files',_0x51d915=await this[_0x92cf1f(0x110)][_0x92cf1f(0x11e)]('GET',_0x54b9be);return _0x51d915[_0x92cf1f(0xe7)]||[];}async[a84_0x5ca3c7(0x104)](_0x3b24a1,_0x374f84){const _0x52d30f=a84_0x5ca3c7,_0x18db3a={};return _0x374f84&&(_0x18db3a['reason']=_0x374f84),await this[_0x52d30f(0x110)]['request'](_0x52d30f(0x12c),_0x52d30f(0xfd)+encodeURIComponent(_0x3b24a1)+'/kill',{'body':_0x18db3a});}async[a84_0x5ca3c7(0x13e)](_0x510431,_0x2883f1){const _0xdba109=a84_0x5ca3c7,_0x45bee4={};return _0x2883f1?.[_0xdba109(0xf5)]&&(_0x45bee4[_0xdba109(0xf5)]=_0x2883f1[_0xdba109(0xf5)]),_0x2883f1?.[_0xdba109(0x10d)]&&(_0x45bee4['retry_params']=_0x2883f1['retry_params']),await this[_0xdba109(0x110)][_0xdba109(0x11e)]('POST','/api/sessions/'+encodeURIComponent(_0x510431)+'/retry',{'body':_0x45bee4});}async[a84_0x5ca3c7(0xee)](_0x1c4382,_0xd405c){const _0x4a82ff=a84_0x5ca3c7,_0x1aa005={};return _0xd405c?.[_0x4a82ff(0x131)]&&(_0x1aa005[_0x4a82ff(0x131)]=_0xd405c['resume_from']),_0xd405c?.[_0x4a82ff(0x10d)]&&(_0x1aa005['retry_params']=_0xd405c[_0x4a82ff(0x10d)]),_0xd405c?.[_0x4a82ff(0xf8)]&&(_0x1aa005[_0x4a82ff(0xf8)]=_0xd405c[_0x4a82ff(0xf8)]),await this['httpClient']['request'](_0x4a82ff(0x12c),'/api/attempts/'+encodeURIComponent(_0x1c4382)+_0x4a82ff(0x140),{'body':_0x1aa005});}async[a84_0x5ca3c7(0xf6)](_0x5f3633){const _0x11ebd0=a84_0x5ca3c7,_0x735a59={'sessionTime':_0x5f3633[_0x11ebd0(0x106)],'params':_0x5f3633[_0x11ebd0(0x128)]};return _0x5f3633[_0x11ebd0(0xfa)]&&(_0x735a59['workflowId']=_0x5f3633[_0x11ebd0(0xfa)]),_0x5f3633[_0x11ebd0(0xea)]&&(_0x735a59[_0x11ebd0(0xea)]=_0x5f3633[_0x11ebd0(0xea)]),_0x5f3633[_0x11ebd0(0x11d)]&&(_0x735a59[_0x11ebd0(0x11d)]=_0x5f3633[_0x11ebd0(0x11d)]),_0x5f3633[_0x11ebd0(0x136)]&&(_0x735a59[_0x11ebd0(0x136)]=_0x5f3633[_0x11ebd0(0x136)]),_0x5f3633[_0x11ebd0(0xf0)]!==undefined&&(_0x735a59[_0x11ebd0(0xf0)]=_0x5f3633['allowQueueing']),await this[_0x11ebd0(0x110)][_0x11ebd0(0x11e)](_0x11ebd0(0x144),'/api/attempts',{'body':_0x735a59});}async[a84_0x5ca3c7(0x150)](_0xb334db,_0x334555,_0x2fde1c){const _0x48028f=a84_0x5ca3c7,{promises:_0xeaa215}=await import('fs'),_0x475646=new URLSearchParams();_0x2fde1c&&_0x475646[_0x48028f(0x139)]('revision',_0x2fde1c);const _0x1086d7=_0x475646[_0x48028f(0x133)](),_0x391c0f=_0x1086d7?'/api/projects/'+encodeURIComponent(_0xb334db)+_0x48028f(0xe9)+_0x1086d7:_0x48028f(0x114)+encodeURIComponent(_0xb334db)+_0x48028f(0x105),_0x6bd95=await this['httpClient'][_0x48028f(0x11e)](_0x48028f(0xf9),_0x391c0f,{'headers':{'Accept':'application/gzip'},'responseType':'arraybuffer'}),_0x4405e7=validateGzipArchive(_0x6bd95);return!_0x4405e7['isValid']&&throwArchiveValidationError(_0x4405e7),await _0xeaa215['writeFile'](_0x334555,_0x6bd95),_0x334555;}async[a84_0x5ca3c7(0x10c)](_0x50d521,_0xdc2c3a,_0x1c87e3,_0x166408){const _0xdad89a=a84_0x5ca3c7,{promises:_0x18d951}=await import('fs'),_0x2a6ed8=new URLSearchParams();_0x2a6ed8[_0xdad89a(0x139)](_0xdad89a(0xed),_0x50d521),_0x2a6ed8[_0xdad89a(0x139)]('revision',_0xdc2c3a);_0x166408?.[_0xdad89a(0xfb)]&&_0x2a6ed8[_0xdad89a(0x139)](_0xdad89a(0x10f),_0x166408[_0xdad89a(0xfb)]);_0x166408?.['clearSchedule']&&_0x166408['clearSchedule']['forEach'](_0x6a617f=>{const _0x14c342=_0xdad89a;_0x2a6ed8[_0x14c342(0x139)](_0x14c342(0x14b),_0x6a617f);});_0x166408?.['clearScheduleAll']&&_0x2a6ed8[_0xdad89a(0x139)](_0xdad89a(0xec),_0xdad89a(0x123));const _0x4f203b=_0x2a6ed8[_0xdad89a(0x133)](),_0x2e2c3a=_0xdad89a(0x130)+_0x4f203b,_0x43d017=await _0x18d951[_0xdad89a(0x120)](_0x1c87e3);return await this[_0xdad89a(0x110)][_0xdad89a(0x11e)]('PUT',_0x2e2c3a,{'body':_0x43d017,'headers':{'Content-Type':'application/gzip'}});}async[a84_0x5ca3c7(0x148)](_0x2d7009){const _0x3aeed4=a84_0x5ca3c7;return await this[_0x3aeed4(0x110)][_0x3aeed4(0x11e)]('GET','/api/projects/'+encodeURIComponent(_0x2d7009));}async[a84_0x5ca3c7(0x141)](_0x2f493d){const _0x6bb9eb=a84_0x5ca3c7;return await this[_0x6bb9eb(0x110)][_0x6bb9eb(0x11e)](_0x6bb9eb(0x121),_0x6bb9eb(0x114)+encodeURIComponent(_0x2f493d));}async[a84_0x5ca3c7(0x149)](_0xbcbe8f){const _0x35bf6d=a84_0x5ca3c7,_0x39b692=await this[_0x35bf6d(0x110)][_0x35bf6d(0x11e)](_0x35bf6d(0xf9),_0x35bf6d(0x114)+encodeURIComponent(_0xbcbe8f)+_0x35bf6d(0x10e));return _0x39b692[_0x35bf6d(0x10b)]||[];}async[a84_0x5ca3c7(0xff)](_0x2eb320,_0x153532,_0x2d79aa){const _0x47f8a2=a84_0x5ca3c7;await this['httpClient'][_0x47f8a2(0x11e)](_0x47f8a2(0x144),_0x47f8a2(0x114)+encodeURIComponent(_0x2eb320)+_0x47f8a2(0x12a)+encodeURIComponent(_0x153532),{'body':{'value':_0x2d79aa}});}async[a84_0x5ca3c7(0x12e)](_0x5bc2f8,_0x5101e2){const _0x4d34f7=a84_0x5ca3c7;await this[_0x4d34f7(0x110)][_0x4d34f7(0x11e)](_0x4d34f7(0x121),_0x4d34f7(0x114)+encodeURIComponent(_0x5bc2f8)+_0x4d34f7(0x12a)+encodeURIComponent(_0x5101e2));}}
|
|
1
|
+
const a84_0x36d5c8=a84_0xf446;function a84_0xf446(_0x256d55,_0x55881d){_0x256d55=_0x256d55-0x1a7;const _0x264c0b=a84_0x264c();let _0xf446d3=_0x264c0b[_0x256d55];return _0xf446d3;}(function(_0x44f076,_0x2f796b){const _0x35d34c=a84_0xf446,_0x3ae2cc=_0x44f076();while(!![]){try{const _0x210cef=parseInt(_0x35d34c(0x1e0))/0x1*(-parseInt(_0x35d34c(0x1ea))/0x2)+-parseInt(_0x35d34c(0x1ce))/0x3*(parseInt(_0x35d34c(0x1ba))/0x4)+-parseInt(_0x35d34c(0x1fe))/0x5+parseInt(_0x35d34c(0x1b6))/0x6+-parseInt(_0x35d34c(0x1b1))/0x7+-parseInt(_0x35d34c(0x1dc))/0x8*(parseInt(_0x35d34c(0x1fd))/0x9)+parseInt(_0x35d34c(0x1d4))/0xa*(parseInt(_0x35d34c(0x1bf))/0xb);if(_0x210cef===_0x2f796b)break;else _0x3ae2cc['push'](_0x3ae2cc['shift']());}catch(_0x4ee2f5){_0x3ae2cc['push'](_0x3ae2cc['shift']());}}}(a84_0x264c,0x81414));import{HTTPClient}from'./http-client.js';function a84_0x264c(){const _0x125987=['clearScheduleAll','resume_from','/tasks?','append','from_task','/api/logs/','1852410cafbnq','/archive','length','reason','logs','2390388hWDuFD','projectName','/api/projects','DELETE','20jlfeWu','scheduleFrom','deleteSecret','page_size','arraybuffer','198QaaflL','/secrets','/api/attempts','authHeaders','listSecrets','/api/projects/','/archive?','listSessions','PUT','/tasks/','project_name','workflow','getTaskLogs','clear_schedule','replace','420621lBhzry','to_time','clearSchedule','filter','task','request','1265110MMhvXn','deleteProject','readFile','offset','/retry','sessionTime','files','httpClient','85528YxkgPQ','application/gzip','secrets','from_time','82130dVpmFj','setSecret','workflowId','search_project_name','uploadProjectArchive','project_id','/api/attempts?','proxy','clear_schedule_all','tasks','6QNZQXn','attempts','schedule_from','workflowName','forEach','workflows','listProjects','project','workflow_name','getAttemptTasks','/logs','last_id','/api/attempts/','status','limit','getProject','listLogFiles','allowQueueing','/secrets/','369gYrGgy','2478910IlLtUd','force','sessions','toString','retryAttemptName','getAttempt','GET','revision','site','/api/workflows','/api/sessions','include_retried','name_pattern','/api/projects?','include_subtasks','/files','count','retry_params','true','POST','/api/workflows?','listWorkflows','/sessions','name'];a84_0x264c=function(){return _0x125987;};return a84_0x264c();}import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../../core/auth.js';import{matchGlobPattern}from'../../utils/string-utils.js';import{validateGzipArchive,throwArchiveValidationError}from'../workflow/archive-validation.js';export class WorkflowApiClient{['httpClient'];[a84_0x36d5c8(0x1c2)];constructor(_0x3769f4){const _0x468bcd=a84_0x36d5c8,_0x140917=getEndpoint(_0x3769f4[_0x468bcd(0x206)],_0x468bcd(0x1ca));this[_0x468bcd(0x1c2)]=toHeaderRecord(getAuthHeaders(_0x3769f4[_0x468bcd(0x206)],_0x3769f4['apiKey'])),this[_0x468bcd(0x1db)]=new HTTPClient(_0x140917,this[_0x468bcd(0x1c2)],{'proxy':_0x3769f4[_0x468bcd(0x1e7)]});}async[a84_0x36d5c8(0x1f0)](_0x1b3a7d){const _0x1ed360=a84_0x36d5c8,_0x2334f8=new URLSearchParams();if(_0x1b3a7d?.[_0x1ed360(0x1f8)])_0x2334f8['append'](_0x1ed360(0x20e),String(_0x1b3a7d[_0x1ed360(0x1f8)]));if(_0x1b3a7d?.['last_id'])_0x2334f8['append'](_0x1ed360(0x1f5),_0x1b3a7d[_0x1ed360(0x1f5)]);if(_0x1b3a7d?.[_0x1ed360(0x20a)]){const _0x2ad4ef=_0x1b3a7d[_0x1ed360(0x20a)][_0x1ed360(0x1cd)](/[*?]/g,'');_0x2ad4ef&&_0x2334f8['append']('name_pattern',_0x2ad4ef);}const _0x1ddd82=_0x2334f8[_0x1ed360(0x201)](),_0x5400ad=_0x1ddd82?_0x1ed360(0x20b)+_0x1ddd82:_0x1ed360(0x1b8),_0x4ba856=await this[_0x1ed360(0x1db)][_0x1ed360(0x1d3)]('GET',_0x5400ad),_0x71349e=_0x4ba856['projects']||[],_0x2153e4=_0x71349e[_0x1ed360(0x1b3)]>0x0?_0x71349e[_0x71349e[_0x1ed360(0x1b3)]-0x1]['id']:undefined;let _0x1e76cf=_0x71349e;return _0x1b3a7d?.['name_pattern']&&(_0x1e76cf=_0x1e76cf[_0x1ed360(0x1d1)](_0x1ea766=>{const _0x348924=_0x1ed360;return matchGlobPattern(_0x1ea766[_0x348924(0x1aa)],_0x1b3a7d[_0x348924(0x20a)]);})),{'data':_0x1e76cf,'lastId':_0x2153e4,'rawCount':_0x71349e[_0x1ed360(0x1b3)]};}async[a84_0x36d5c8(0x1a8)](_0x4d09fe){const _0x4ae463=a84_0x36d5c8,_0x233603=new URLSearchParams();if(_0x4d09fe?.[_0x4ae463(0x1f8)])_0x233603[_0x4ae463(0x1ae)](_0x4ae463(0x20e),String(_0x4d09fe['limit']));if(_0x4d09fe?.[_0x4ae463(0x1f5)])_0x233603[_0x4ae463(0x1ae)](_0x4ae463(0x1f5),_0x4d09fe[_0x4ae463(0x1f5)]);if(_0x4d09fe?.[_0x4ae463(0x1c9)]){const _0x1138ca=_0x4d09fe[_0x4ae463(0x1c9)]['replace'](/[*?]/g,'');_0x1138ca&&(_0x233603[_0x4ae463(0x1ae)](_0x4ae463(0x20a),_0x1138ca),_0x233603[_0x4ae463(0x1ae)](_0x4ae463(0x1e3),_0x4ae463(0x210)));}const _0x2dbecc=_0x233603[_0x4ae463(0x201)](),_0x373c50=_0x2dbecc?_0x4ae463(0x1a7)+_0x2dbecc:_0x4ae463(0x207),_0x145e7d=await this[_0x4ae463(0x1db)][_0x4ae463(0x1d3)]('GET',_0x373c50),_0x795378=_0x145e7d[_0x4ae463(0x1ef)]||[],_0x58e48b=_0x795378[_0x4ae463(0x1b3)]>0x0?_0x795378[_0x795378['length']-0x1]['id']:undefined;let _0xdfbbb5=_0x795378;return _0x4d09fe?.[_0x4ae463(0x1c9)]&&(_0xdfbbb5=_0xdfbbb5[_0x4ae463(0x1d1)](_0x495e86=>{const _0x228397=_0x4ae463,_0x4ffe2b=_0x495e86[_0x228397(0x1f1)]?.[_0x228397(0x1aa)];if(!_0x4ffe2b)return![];return matchGlobPattern(_0x4ffe2b,_0x4d09fe['project_name']);})),{'data':_0xdfbbb5,'lastId':_0x58e48b,'rawCount':_0x795378['length']};}async[a84_0x36d5c8(0x1c6)](_0x657ab2){const _0x290c9f=a84_0x36d5c8;let _0x58bfa2=_0x290c9f(0x208);_0x657ab2?.[_0x290c9f(0x1e5)]&&(_0x58bfa2=_0x290c9f(0x1c4)+encodeURIComponent(_0x657ab2[_0x290c9f(0x1e5)])+_0x290c9f(0x1a9));const _0x39b373=new URLSearchParams();if(_0x657ab2?.[_0x290c9f(0x1f2)])_0x39b373[_0x290c9f(0x1ae)](_0x290c9f(0x1ca),_0x657ab2[_0x290c9f(0x1f2)]);if(_0x657ab2?.['status'])_0x39b373[_0x290c9f(0x1ae)](_0x290c9f(0x1f7),_0x657ab2[_0x290c9f(0x1f7)]);if(_0x657ab2?.['from_time'])_0x39b373['append'](_0x290c9f(0x1df),_0x657ab2['from_time']);if(_0x657ab2?.['to_time'])_0x39b373['append'](_0x290c9f(0x1cf),_0x657ab2['to_time']);if(_0x657ab2?.[_0x290c9f(0x1f8)])_0x39b373[_0x290c9f(0x1ae)](_0x290c9f(0x1bd),String(_0x657ab2[_0x290c9f(0x1f8)]));if(_0x657ab2?.[_0x290c9f(0x1f5)])_0x39b373[_0x290c9f(0x1ae)](_0x290c9f(0x1f5),_0x657ab2[_0x290c9f(0x1f5)]);const _0x1266c9=_0x39b373['toString']();_0x1266c9&&(_0x58bfa2=_0x58bfa2+'?'+_0x1266c9);const _0x452b51=await this[_0x290c9f(0x1db)][_0x290c9f(0x1d3)](_0x290c9f(0x204),_0x58bfa2),_0x2b76ff=_0x452b51[_0x290c9f(0x200)]||[],_0x570ddc=_0x2b76ff[_0x290c9f(0x1b3)]>0x0?_0x2b76ff[_0x2b76ff[_0x290c9f(0x1b3)]-0x1]['id']:undefined;return{'data':_0x2b76ff,'lastId':_0x570ddc};}async['listAttempts'](_0x256738){const _0x5c9f4e=a84_0x36d5c8,_0x5c351b=new URLSearchParams();if(_0x256738?.[_0x5c9f4e(0x1c9)])_0x5c351b[_0x5c9f4e(0x1ae)](_0x5c9f4e(0x1f1),_0x256738[_0x5c9f4e(0x1c9)]);if(_0x256738?.['workflow_name'])_0x5c351b[_0x5c9f4e(0x1ae)](_0x5c9f4e(0x1ca),_0x256738[_0x5c9f4e(0x1f2)]);if(_0x256738?.[_0x5c9f4e(0x209)])_0x5c351b[_0x5c9f4e(0x1ae)](_0x5c9f4e(0x209),'1');if(_0x256738?.[_0x5c9f4e(0x1f8)])_0x5c351b['append'](_0x5c9f4e(0x1bd),String(_0x256738[_0x5c9f4e(0x1f8)]));if(_0x256738?.[_0x5c9f4e(0x1f5)])_0x5c351b['append'](_0x5c9f4e(0x1f5),_0x256738[_0x5c9f4e(0x1f5)]);const _0x3302bb=_0x5c351b[_0x5c9f4e(0x201)](),_0x356a40=_0x3302bb?_0x5c9f4e(0x1e6)+_0x3302bb:_0x5c9f4e(0x1c1),_0x2fa6e7=await this['httpClient']['request'](_0x5c9f4e(0x204),_0x356a40),_0x22ba25=_0x2fa6e7[_0x5c9f4e(0x1eb)]||[],_0x1876d9=_0x22ba25[_0x5c9f4e(0x1b3)]>0x0?_0x22ba25[_0x22ba25['length']-0x1]['id']:undefined;return{'data':_0x22ba25,'lastId':_0x1876d9};}async[a84_0x36d5c8(0x203)](_0x18b678){const _0x14a72c=a84_0x36d5c8;return await this[_0x14a72c(0x1db)][_0x14a72c(0x1d3)](_0x14a72c(0x204),_0x14a72c(0x1f6)+encodeURIComponent(_0x18b678));}async[a84_0x36d5c8(0x1f3)](_0x5e2aaa,_0x39934e=![]){const _0x1711b5=a84_0x36d5c8,_0x5f45fe=new URLSearchParams();_0x39934e&&_0x5f45fe[_0x1711b5(0x1ae)](_0x1711b5(0x20c),_0x1711b5(0x210));const _0x2720ee=_0x5f45fe[_0x1711b5(0x201)](),_0xc9aa88=_0x2720ee?_0x1711b5(0x1f6)+encodeURIComponent(_0x5e2aaa)+_0x1711b5(0x1ad)+_0x2720ee:_0x1711b5(0x1f6)+encodeURIComponent(_0x5e2aaa)+'/tasks',_0x165150=await this['httpClient'][_0x1711b5(0x1d3)](_0x1711b5(0x204),_0xc9aa88);return _0x165150[_0x1711b5(0x1e9)]||[];}async[a84_0x36d5c8(0x1cb)](_0xacb7c0,_0x55e414,_0x1d59a1){const _0xc956ad=a84_0x36d5c8,_0x1cf90c=new URLSearchParams();_0x1d59a1?.[_0xc956ad(0x1d7)]!==undefined&&_0x1cf90c[_0xc956ad(0x1ae)]('offset',String(_0x1d59a1[_0xc956ad(0x1d7)]));_0x1d59a1?.[_0xc956ad(0x1f8)]!==undefined&&_0x1cf90c['append'](_0xc956ad(0x1f8),String(_0x1d59a1[_0xc956ad(0x1f8)]));const _0x18d76d=_0x1cf90c[_0xc956ad(0x201)](),_0x3364b3=_0x18d76d?'/api/attempts/'+encodeURIComponent(_0xacb7c0)+_0xc956ad(0x1c8)+encodeURIComponent(_0x55e414)+'/logs?'+_0x18d76d:'/api/attempts/'+encodeURIComponent(_0xacb7c0)+_0xc956ad(0x1c8)+encodeURIComponent(_0x55e414)+_0xc956ad(0x1f4),_0x1687cc=await this[_0xc956ad(0x1db)][_0xc956ad(0x1d3)](_0xc956ad(0x204),_0x3364b3);return _0x1687cc[_0xc956ad(0x1b5)]||[];}async[a84_0x36d5c8(0x1fa)](_0x3fdef7,_0x244264){const _0x3dc4d5=a84_0x36d5c8,_0x437176=new URLSearchParams();_0x244264&&_0x437176[_0x3dc4d5(0x1ae)](_0x3dc4d5(0x1d2),_0x244264);const _0x37b440=_0x437176[_0x3dc4d5(0x201)](),_0x40188c=_0x37b440?_0x3dc4d5(0x1b0)+encodeURIComponent(_0x3fdef7)+'/files?'+_0x37b440:_0x3dc4d5(0x1b0)+encodeURIComponent(_0x3fdef7)+_0x3dc4d5(0x20d),_0x95bb84=await this[_0x3dc4d5(0x1db)][_0x3dc4d5(0x1d3)](_0x3dc4d5(0x204),_0x40188c);return _0x95bb84[_0x3dc4d5(0x1da)]||[];}async['killAttempt'](_0x4bad91,_0x4684ec){const _0x1664ad=a84_0x36d5c8,_0xe00378={};return _0x4684ec&&(_0xe00378[_0x1664ad(0x1b4)]=_0x4684ec),await this[_0x1664ad(0x1db)][_0x1664ad(0x1d3)]('POST',_0x1664ad(0x1f6)+encodeURIComponent(_0x4bad91)+'/kill',{'body':_0xe00378});}async['retrySession'](_0x4c5ea5,_0x3c2954){const _0xe5f543=a84_0x36d5c8,_0x259723={};return _0x3c2954?.[_0xe5f543(0x1af)]&&(_0x259723[_0xe5f543(0x1af)]=_0x3c2954[_0xe5f543(0x1af)]),_0x3c2954?.[_0xe5f543(0x20f)]&&(_0x259723[_0xe5f543(0x20f)]=_0x3c2954[_0xe5f543(0x20f)]),await this[_0xe5f543(0x1db)][_0xe5f543(0x1d3)](_0xe5f543(0x211),'/api/sessions/'+encodeURIComponent(_0x4c5ea5)+_0xe5f543(0x1d8),{'body':_0x259723});}async['retryAttempt'](_0x1959ec,_0x555e25){const _0x1537fb=a84_0x36d5c8,_0x3c93fd={};return _0x555e25?.[_0x1537fb(0x1ac)]&&(_0x3c93fd[_0x1537fb(0x1ac)]=_0x555e25[_0x1537fb(0x1ac)]),_0x555e25?.[_0x1537fb(0x20f)]&&(_0x3c93fd[_0x1537fb(0x20f)]=_0x555e25[_0x1537fb(0x20f)]),_0x555e25?.['force']&&(_0x3c93fd[_0x1537fb(0x1ff)]=_0x555e25[_0x1537fb(0x1ff)]),await this[_0x1537fb(0x1db)][_0x1537fb(0x1d3)]('POST',_0x1537fb(0x1f6)+encodeURIComponent(_0x1959ec)+'/retry',{'body':_0x3c93fd});}async['startAttempt'](_0x551592){const _0x5cb673=a84_0x36d5c8,_0x1b3a8b={'sessionTime':_0x551592[_0x5cb673(0x1d9)],'params':_0x551592['params']};return _0x551592[_0x5cb673(0x1e2)]&&(_0x1b3a8b[_0x5cb673(0x1e2)]=_0x551592[_0x5cb673(0x1e2)]),_0x551592[_0x5cb673(0x1b7)]&&(_0x1b3a8b['projectName']=_0x551592[_0x5cb673(0x1b7)]),_0x551592[_0x5cb673(0x1ed)]&&(_0x1b3a8b[_0x5cb673(0x1ed)]=_0x551592[_0x5cb673(0x1ed)]),_0x551592[_0x5cb673(0x202)]&&(_0x1b3a8b['retryAttemptName']=_0x551592[_0x5cb673(0x202)]),_0x551592[_0x5cb673(0x1fb)]!==undefined&&(_0x1b3a8b[_0x5cb673(0x1fb)]=_0x551592['allowQueueing']),await this['httpClient']['request'](_0x5cb673(0x1c7),_0x5cb673(0x1c1),{'body':_0x1b3a8b});}async['downloadProjectArchive'](_0x1c102c,_0x29fd68,_0x4616d5){const _0xc3b86c=a84_0x36d5c8,{promises:_0x462676}=await import('fs'),_0x3d904c=new URLSearchParams();_0x4616d5&&_0x3d904c[_0xc3b86c(0x1ae)](_0xc3b86c(0x205),_0x4616d5);const _0x29e957=_0x3d904c[_0xc3b86c(0x201)](),_0x403daf=_0x29e957?'/api/projects/'+encodeURIComponent(_0x1c102c)+_0xc3b86c(0x1c5)+_0x29e957:_0xc3b86c(0x1c4)+encodeURIComponent(_0x1c102c)+_0xc3b86c(0x1b2),_0xafeb06=await this[_0xc3b86c(0x1db)]['request'](_0xc3b86c(0x204),_0x403daf,{'headers':{'Accept':'application/gzip'},'responseType':_0xc3b86c(0x1be)}),_0x478096=validateGzipArchive(_0xafeb06);return!_0x478096['isValid']&&throwArchiveValidationError(_0x478096),await _0x462676['writeFile'](_0x29fd68,_0xafeb06),_0x29fd68;}async[a84_0x36d5c8(0x1e4)](_0x3c9c7e,_0x57c4ba,_0x1fefa1,_0x14cde5){const _0xe94ca2=a84_0x36d5c8,{promises:_0x27a5bd}=await import('fs'),_0x14e118=new URLSearchParams();_0x14e118[_0xe94ca2(0x1ae)]('project',_0x3c9c7e),_0x14e118[_0xe94ca2(0x1ae)](_0xe94ca2(0x205),_0x57c4ba);_0x14cde5?.['scheduleFrom']&&_0x14e118[_0xe94ca2(0x1ae)](_0xe94ca2(0x1ec),_0x14cde5[_0xe94ca2(0x1bb)]);_0x14cde5?.[_0xe94ca2(0x1d0)]&&_0x14cde5[_0xe94ca2(0x1d0)][_0xe94ca2(0x1ee)](_0x326c4e=>{const _0x1b39e9=_0xe94ca2;_0x14e118['append'](_0x1b39e9(0x1cc),_0x326c4e);});_0x14cde5?.[_0xe94ca2(0x1ab)]&&_0x14e118[_0xe94ca2(0x1ae)](_0xe94ca2(0x1e8),_0xe94ca2(0x210));const _0x26d2e0=_0x14e118[_0xe94ca2(0x201)](),_0x350f7a=_0xe94ca2(0x20b)+_0x26d2e0,_0x3aa294=await _0x27a5bd[_0xe94ca2(0x1d6)](_0x1fefa1);return await this[_0xe94ca2(0x1db)]['request'](_0xe94ca2(0x1c7),_0x350f7a,{'body':_0x3aa294,'headers':{'Content-Type':_0xe94ca2(0x1dd)}});}async[a84_0x36d5c8(0x1f9)](_0x4c22f6){const _0x5d8683=a84_0x36d5c8;return await this[_0x5d8683(0x1db)][_0x5d8683(0x1d3)](_0x5d8683(0x204),_0x5d8683(0x1c4)+encodeURIComponent(_0x4c22f6));}async[a84_0x36d5c8(0x1d5)](_0x58d6a9){const _0xa118ec=a84_0x36d5c8;return await this[_0xa118ec(0x1db)]['request'](_0xa118ec(0x1b9),'/api/projects/'+encodeURIComponent(_0x58d6a9));}async[a84_0x36d5c8(0x1c3)](_0x114e72){const _0x53cb58=a84_0x36d5c8,_0x118b7c=await this['httpClient'][_0x53cb58(0x1d3)](_0x53cb58(0x204),_0x53cb58(0x1c4)+encodeURIComponent(_0x114e72)+_0x53cb58(0x1c0));return _0x118b7c[_0x53cb58(0x1de)]||[];}async[a84_0x36d5c8(0x1e1)](_0x33fc05,_0x1b8a28,_0x561b8e){const _0x286a09=a84_0x36d5c8;await this['httpClient'][_0x286a09(0x1d3)]('PUT',_0x286a09(0x1c4)+encodeURIComponent(_0x33fc05)+_0x286a09(0x1fc)+encodeURIComponent(_0x1b8a28),{'body':{'value':_0x561b8e}});}async[a84_0x36d5c8(0x1bc)](_0x462c4e,_0x4abfaf){const _0x919631=a84_0x36d5c8;await this[_0x919631(0x1db)][_0x919631(0x1d3)](_0x919631(0x1b9),'/api/projects/'+encodeURIComponent(_0x462c4e)+_0x919631(0x1fc)+encodeURIComponent(_0x4abfaf));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x55589b,_0x115cf9){const _0x28b49b=a85_0x3f6c,_0xdd53de=_0x55589b();while(!![]){try{const _0x2c9d3d=-parseInt(_0x28b49b(0x1db))/0x1+-parseInt(_0x28b49b(0x1e8))/0x2+-parseInt(_0x28b49b(0x1ce))/0x3*(-parseInt(_0x28b49b(0x1d7))/0x4)+-parseInt(_0x28b49b(0x1ed))/0x5*(-parseInt(_0x28b49b(0x1c1))/0x6)+parseInt(_0x28b49b(0x205))/0x7*(parseInt(_0x28b49b(0x206))/0x8)+parseInt(_0x28b49b(0x1c2))/0x9+parseInt(_0x28b49b(0x1d0))/0xa;if(_0x2c9d3d===_0x115cf9)break;else _0xdd53de['push'](_0xdd53de['shift']());}catch(_0x2a40f9){_0xdd53de['push'](_0xdd53de['shift']());}}}(a85_0x3a4f,0xd4465));export function isLegacySchema(_0x294bfa){const _0x494376=a85_0x3f6c,_0x20bece=_0x294bfa[_0x494376(0x1f2)]||[];return _0x20bece['some'](_0x4d59f2=>_0x4d59f2[_0x494376(0x20b)]==='legacy_settings'&&_0x4d59f2[_0x494376(0x1dc)]==='record'&&_0x4d59f2[_0x494376(0x1f2)]);}export function getLegacySettingsField(_0x395309){const _0x5654c7=a85_0x3f6c,_0x2d4cd9=_0x395309[_0x5654c7(0x1f2)]||[];return _0x2d4cd9[_0x5654c7(0x1d1)](_0x8d5d1e=>_0x8d5d1e[_0x5654c7(0x20b)]==='legacy_settings'&&_0x8d5d1e[_0x5654c7(0x1dc)]==='record'&&_0x8d5d1e[_0x5654c7(0x1f2)]);}export function normalizeSchemaFields(_0x1194c1){const _0x16d69b=a85_0x3f6c,_0x4ef10c=_0x1194c1[_0x16d69b(0x1f2)]||[],_0x3c6e10=getLegacySettingsField(_0x1194c1);if(_0x3c6e10?.['properties']){const _0xea0c75=_0x4ef10c[_0x16d69b(0x1f5)](_0x51b9bd=>_0x51b9bd[_0x16d69b(0x20b)]!==_0x16d69b(0x1d5)&&_0x51b9bd[_0x16d69b(0x20b)]!=='legacy_settings');return[..._0xea0c75,..._0x3c6e10[_0x16d69b(0x1f2)]];}return _0x4ef10c[_0x16d69b(0x1f5)](_0x19b06b=>_0x19b06b[_0x16d69b(0x20b)]!==_0x16d69b(0x1d5));}export function transformConfigToLegacy(_0x260181,_0x287589){const _0x5994d6=a85_0x3f6c,_0x1c1dce=getLegacySettingsField(_0x287589);if(!_0x1c1dce?.['properties'])return _0x260181;const _0x4404c5=transformConfigFromLegacy(_0x260181),{legacy:_0x474ec3,..._0x44627d}=_0x4404c5,_0x5898d9=new Set(_0x1c1dce[_0x5994d6(0x1f2)]['map'](_0x23c404=>_0x23c404['name'])[_0x5994d6(0x1f5)](Boolean)),_0x2dad84=_0x287589[_0x5994d6(0x1f2)]||[],_0x955057=new Set(_0x2dad84['filter'](_0x46a8ad=>_0x46a8ad[_0x5994d6(0x20b)]!=='legacy'&&_0x46a8ad['name']!==_0x5994d6(0x210))[_0x5994d6(0x201)](_0x148946=>_0x148946['name'])['filter'](Boolean)),_0x1cc40f={},_0x39cd74={};for(const [_0x2dd01d,_0x5e3d5f]of Object[_0x5994d6(0x1de)](_0x44627d)){if(_0x5898d9[_0x5994d6(0x1e6)](_0x2dd01d))_0x1cc40f[_0x2dd01d]=_0x5e3d5f;else _0x955057['has'](_0x2dd01d)?_0x39cd74[_0x2dd01d]=_0x5e3d5f:_0x1cc40f[_0x2dd01d]=_0x5e3d5f;}const _0x2ae818={..._0x39cd74,'legacy':!![],'legacy_settings':_0x1cc40f};return _0x2ae818;}export function transformConfigFromLegacy(_0x2f2381){const _0x2de18b=a85_0x3f6c,_0x5eff3b=_0x2f2381[_0x2de18b(0x210)]??_0x2f2381[_0x2de18b(0x1d6)];if(typeof _0x5eff3b===_0x2de18b(0x20a)&&_0x5eff3b!==null&&!Array['isArray'](_0x5eff3b)){const _0x54e62d={};for(const [_0x2c43c8,_0x18fa48]of Object[_0x2de18b(0x1de)](_0x2f2381)){_0x2c43c8!==_0x2de18b(0x1d5)&&_0x2c43c8!==_0x2de18b(0x210)&&_0x2c43c8!==_0x2de18b(0x1d6)&&(_0x54e62d[_0x2c43c8]=_0x18fa48);}const _0x53b868=transformConfigFromLegacy(_0x5eff3b);return{..._0x54e62d,..._0x53b868};}return _0x2f2381;}function camelToSnake(_0x10cf07){const _0x14119b=a85_0x3f6c;return _0x10cf07[_0x14119b(0x1ee)](/[A-Z]/g,_0x1e7165=>'_'+_0x1e7165[_0x14119b(0x1c6)]());}export function normalizeConnectorConfigForYaml(_0x27029b){const _0x2a1905=a85_0x3f6c,_0x194ee0=transformConfigFromLegacy(_0x27029b),_0x40d3fe={};for(const [_0x27668c,_0xab6e65]of Object[_0x2a1905(0x1de)](_0x194ee0)){if(_0x27668c==='legacy')continue;let _0x1fe7a4=camelToSnake(_0x27668c);_0x1fe7a4[_0x2a1905(0x1ec)](_0x2a1905(0x20d))&&(_0x1fe7a4=_0x1fe7a4['slice'](0x5)),_0x40d3fe[_0x1fe7a4]=_0xab6e65;}return _0x40d3fe;}function shouldShowField(_0x39d185,_0x25f7b9){const _0x8e755e=a85_0x3f6c;if(!_0x39d185)return!![];for(const [_0x9035d1,_0x24ffed]of Object[_0x8e755e(0x1de)](_0x39d185)){const _0x58a22b=_0x25f7b9[_0x9035d1],_0x38c11c=_0x24ffed[_0x8e755e(0x1df)](_0x56774f=>{if(_0x56774f===null)return _0x58a22b===null||_0x58a22b===undefined;return String(_0x58a22b)===String(_0x56774f);});if(!_0x38c11c)return![];}return!![];}function formatEnumOptions(_0xf63b43){const _0x1a79e1=a85_0x3f6c;return _0xf63b43['map'](_0x289e8f=>{const _0x28f27f=a85_0x3f6c;if(typeof _0x289e8f===_0x28f27f(0x20a)&&_0x28f27f(0x1c4)in _0x289e8f)return String(_0x289e8f['value']);return String(_0x289e8f);})[_0x1a79e1(0x1fe)](',\x20');}function isValidEnumOption(_0x2e63fa,_0x26c174){return _0x26c174['some'](_0x13ff08=>{const _0x475956=a85_0x3f6c;if(typeof _0x13ff08===_0x475956(0x20a)&&_0x475956(0x1c4)in _0x13ff08)return _0x13ff08[_0x475956(0x1c4)]===_0x2e63fa||String(_0x13ff08[_0x475956(0x1c4)])===String(_0x2e63fa);return _0x13ff08===_0x2e63fa||String(_0x13ff08)===String(_0x2e63fa);});}function getFieldLabel(_0x51ad18){const _0x10f631=a85_0x3f6c;return _0x51ad18[_0x10f631(0x1fc)]||_0x51ad18[_0x10f631(0x20b)]||'Unknown\x20field';}function validateField(_0xd6d44b,_0x3e59ce,_0x5565e4,_0x37c8d6){const _0x41f9fd=a85_0x3f6c,_0x2a09c2=[],_0x2ac377=[],_0x34b11e=getFieldLabel(_0x5565e4);if(!shouldShowField(_0x5565e4['criteria'],_0x37c8d6))return{'errors':_0x2a09c2,'warnings':_0x2ac377};if(_0x3e59ce===undefined||_0x3e59ce===null)return{'errors':_0x2a09c2,'warnings':_0x2ac377};switch(_0x5565e4['input']){case _0x41f9fd(0x1f1):_0x5565e4['enumeration']&&!isValidEnumOption(_0x3e59ce,_0x5565e4[_0x41f9fd(0x1dd)])&&_0x2a09c2['push']({'field':_0xd6d44b,'message':_0x41f9fd(0x1cc)+_0x34b11e+'\x22','expected':_0x41f9fd(0x1e0)+formatEnumOptions(_0x5565e4[_0x41f9fd(0x1dd)]),'received':_0x3e59ce});break;case _0x41f9fd(0x1ca):if(typeof _0x3e59ce!=='number'&&typeof _0x3e59ce!==_0x41f9fd(0x1e2))_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1d8),'expected':_0x41f9fd(0x1ca),'received':typeof _0x3e59ce});else{const _0x3eb194=typeof _0x3e59ce==='string'?parseFloat(_0x3e59ce):_0x3e59ce;Number[_0x41f9fd(0x1e9)](_0x3eb194)?_0x2a09c2['push']({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1e5),'received':_0x3e59ce}):(_0x5565e4[_0x41f9fd(0x1c7)]!==undefined&&_0x3eb194<_0x5565e4[_0x41f9fd(0x1c7)]&&_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1e3)+_0x5565e4[_0x41f9fd(0x1c7)],'expected':'>=\x20'+_0x5565e4[_0x41f9fd(0x1c7)],'received':_0x3eb194}),_0x5565e4[_0x41f9fd(0x1e7)]!==undefined&&_0x3eb194>_0x5565e4[_0x41f9fd(0x1e7)]&&_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x211)+_0x5565e4[_0x41f9fd(0x1e7)],'expected':_0x41f9fd(0x208)+_0x5565e4[_0x41f9fd(0x1e7)],'received':_0x3eb194}));}break;case _0x41f9fd(0x1f9):typeof _0x3e59ce!==_0x41f9fd(0x1f8)&&_0x3e59ce!==_0x41f9fd(0x1ea)&&_0x3e59ce!==_0x41f9fd(0x20f)&&_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1c0),'expected':_0x41f9fd(0x1f8),'received':typeof _0x3e59ce});break;case'url':if(typeof _0x3e59ce==='string'&&_0x3e59ce[_0x41f9fd(0x1da)]>0x0)try{new URL(_0x3e59ce);}catch{_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x202),'received':_0x3e59ce});}break;case _0x41f9fd(0x1d3):if(typeof _0x3e59ce===_0x41f9fd(0x1e2)&&_0x3e59ce[_0x41f9fd(0x1da)]>0x0){const _0x33a3f5=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;!_0x33a3f5[_0x41f9fd(0x1e4)](_0x3e59ce)&&_0x2a09c2[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1bf),'received':_0x3e59ce});}break;case _0x41f9fd(0x1cd):case _0x41f9fd(0x1cb):case _0x41f9fd(0x1f6):default:typeof _0x3e59ce===_0x41f9fd(0x20a)&&!Array[_0x41f9fd(0x1fb)](_0x3e59ce)&&_0x2ac377[_0x41f9fd(0x1cf)]({'field':_0xd6d44b,'message':'\x22'+_0x34b11e+_0x41f9fd(0x1be)});break;}return{'errors':_0x2a09c2,'warnings':_0x2ac377};}export function validateConnectorConfig(_0x5c5ed7,_0x1c52ad){const _0x2f30fe=a85_0x3f6c,_0x1c07f9=[],_0x4785e9=[],_0x21ea1f=normalizeSchemaFields(_0x1c52ad),_0x547424=new Set();for(const _0x53080a of _0x21ea1f){_0x53080a[_0x2f30fe(0x20b)]&&_0x547424[_0x2f30fe(0x1fa)](_0x53080a['name']);}for(const [_0x3a6bea,_0x134633]of Object['entries'](_0x5c5ed7)){const _0x3ee5d8=_0x21ea1f[_0x2f30fe(0x1d1)](_0x32d751=>_0x32d751[_0x2f30fe(0x20b)]===_0x3a6bea);if(_0x3ee5d8){const _0x9129d9=validateField(_0x3a6bea,_0x134633,_0x3ee5d8,_0x5c5ed7);_0x1c07f9[_0x2f30fe(0x1cf)](..._0x9129d9['errors']),_0x4785e9['push'](..._0x9129d9[_0x2f30fe(0x1d2)]);}else _0x4785e9['push']({'field':_0x3a6bea,'message':_0x2f30fe(0x1ef)+_0x3a6bea+'\x22'});}return{'valid':_0x1c07f9[_0x2f30fe(0x1da)]===0x0,'errors':_0x1c07f9,'warnings':_0x4785e9};}export function validateConnectorConfigFromMetadata(_0x198898,_0x212112,_0xc8a403=![]){const _0x52b1e2=a85_0x3f6c,_0x449f62=[],_0x59326c=[],_0x48d2f3=_0xc8a403?_0x212112[_0x52b1e2(0x1c8)][_0x52b1e2(0x1f5)](_0xc1dd34=>_0xc1dd34[_0x52b1e2(0x204)]):_0x212112['settings']['filter'](_0x18d73a=>!_0x18d73a[_0x52b1e2(0x204)]);for(const [_0x42c4cf,_0x4b1134]of Object[_0x52b1e2(0x1de)](_0x198898)){const _0x4c5407=_0x48d2f3['find'](_0x4bed45=>_0x4bed45[_0x52b1e2(0x20b)]===_0x42c4cf);if(_0x4c5407){const _0x5c7737=validateMetadataField(_0x42c4cf,_0x4b1134,_0x4c5407,_0x198898);_0x449f62[_0x52b1e2(0x1cf)](..._0x5c7737[_0x52b1e2(0x1fd)]),_0x59326c['push'](..._0x5c7737[_0x52b1e2(0x1d2)]);}else!_0xc8a403&&_0x59326c[_0x52b1e2(0x1cf)]({'field':_0x42c4cf,'message':'Unknown\x20connector_config\x20field\x20\x22'+_0x42c4cf+'\x22'});}return{'valid':_0x449f62[_0x52b1e2(0x1da)]===0x0,'errors':_0x449f62,'warnings':_0x59326c};}function validateMetadataField(_0xc11587,_0x5710ec,_0x44d0d4,_0x156ac3){const _0xbe1774=a85_0x3f6c,_0x2358f0=[],_0x57869f=[];if(_0x44d0d4[_0xbe1774(0x1f3)]&&!shouldShowMetadataField(_0x44d0d4['criteria'],_0x156ac3))return{'errors':_0x2358f0,'warnings':_0x57869f};if(_0x5710ec===undefined||_0x5710ec===null)return{'errors':_0x2358f0,'warnings':_0x57869f};switch(_0x44d0d4['type']){case _0xbe1774(0x1f1):if(_0x44d0d4[_0xbe1774(0x20e)]){const _0x44e2c6=_0x44d0d4['options'][_0xbe1774(0x201)](_0x8a00aa=>_0x8a00aa[_0xbe1774(0x1c4)]);!_0x44e2c6[_0xbe1774(0x207)](String(_0x5710ec))&&_0x2358f0['push']({'field':_0xc11587,'message':_0xbe1774(0x1cc)+_0x44d0d4[_0xbe1774(0x1f7)]+'\x22','expected':_0xbe1774(0x1e0)+_0x44e2c6[_0xbe1774(0x1fe)](',\x20'),'received':_0x5710ec});}break;case _0xbe1774(0x1f9):typeof _0x5710ec!=='boolean'&&_0x5710ec!==_0xbe1774(0x1ea)&&_0x5710ec!==_0xbe1774(0x20f)&&_0x2358f0[_0xbe1774(0x1cf)]({'field':_0xc11587,'message':'\x22'+_0x44d0d4[_0xbe1774(0x1f7)]+'\x22\x20must\x20be\x20true\x20or\x20false','expected':_0xbe1774(0x1f8),'received':typeof _0x5710ec});break;case'password':case _0xbe1774(0x1cd):default:break;}return{'errors':_0x2358f0,'warnings':_0x57869f};}function shouldShowMetadataField(_0x4c3465,_0xa786c){for(const [_0x3289a4,_0x15179d]of Object['entries'](_0x4c3465)){const _0x50dcdd=_0xa786c[_0x3289a4];if(_0x50dcdd!==_0x15179d&&String(_0x50dcdd)!==String(_0x15179d))return![];}return!![];}export function formatValidationErrors(_0x3266be){const _0x426874=a85_0x3f6c;if(_0x3266be[_0x426874(0x1da)]===0x0)return'';return _0x3266be[_0x426874(0x201)](_0x176d9a=>{const _0x541f02=_0x426874;let _0x27bab3='\x20\x20×\x20'+_0x176d9a[_0x541f02(0x1f0)]+':\x20'+_0x176d9a[_0x541f02(0x200)];_0x176d9a[_0x541f02(0x1f4)]&&(_0x27bab3+=_0x541f02(0x1c3)+_0x176d9a[_0x541f02(0x1f4)]);if(_0x176d9a[_0x541f02(0x20c)]!==undefined){const _0x550af2=typeof _0x176d9a[_0x541f02(0x20c)]===_0x541f02(0x20a)?JSON[_0x541f02(0x1ff)](_0x176d9a[_0x541f02(0x20c)]):String(_0x176d9a[_0x541f02(0x20c)]);_0x27bab3+=_0x541f02(0x1bd)+_0x550af2;}return _0x27bab3;})[_0x426874(0x1fe)]('\x0a');}function a85_0x3a4f(){const _0x28ec4b=['maximum','2953948ROEFHF','isNaN','true','hint','startsWith','5rLJcHK','replace','Unknown\x20connector_config\x20field\x20\x22','field','select','properties','criteria','expected','filter','password','label','boolean','checkbox','add','isArray','title','errors','join','stringify','message','map','\x22\x20must\x20be\x20a\x20valid\x20URL','description','credential','413wIVFIa','102040ClbwzI','includes','<=\x20','No\x20fields\x20defined','object','name','received','user_','options','false','legacy_settings','\x22\x20must\x20be\x20at\x20most\x20','>=\x20','\x0a\x20\x20\x20\x20Received:\x20','\x22\x20has\x20an\x20unexpected\x20object\x20value','\x22\x20must\x20be\x20a\x20valid\x20email\x20address','\x22\x20must\x20be\x20true\x20or\x20false','2541972lXVDJY','7198380ZWmFqX','\x0a\x20\x20\x20\x20Expected:\x20','value','default_value','toLowerCase','minimum','settings','\x20[true/false]','number','textarea','Invalid\x20value\x20for\x20\x22','text','9oZSpdD','push','3808900SnPBiF','find','warnings','email','No\x20settings\x20defined','legacy','legacySettings','174140QNRrCq','\x22\x20must\x20be\x20a\x20number','input','length','141071WdQbaN','type','enumeration','entries','some','one\x20of:\x20','\x20\x20-\x20','string','\x22\x20must\x20be\x20at\x20least\x20','test','\x22\x20must\x20be\x20a\x20valid\x20number','has'];a85_0x3a4f=function(){return _0x28ec4b;};return a85_0x3a4f();}export function formatValidationWarnings(_0x1ca507){const _0x1f4a6d=a85_0x3f6c;if(_0x1ca507[_0x1f4a6d(0x1da)]===0x0)return'';return _0x1ca507[_0x1f4a6d(0x201)](_0x443e27=>'\x20\x20⚠\x20'+_0x443e27[_0x1f4a6d(0x1f0)]+':\x20'+_0x443e27['message'])['join']('\x0a');}export function formatSchemaAsHelp(_0x35dde7){const _0x1e6c76=a85_0x3f6c,_0x4fff29=_0x35dde7['properties']||[];if(_0x4fff29[_0x1e6c76(0x1da)]===0x0)return _0x1e6c76(0x209);const _0x8d45b3=[];for(const _0x59f26f of _0x4fff29){if(!_0x59f26f[_0x1e6c76(0x20b)])continue;let _0x14492d=_0x1e6c76(0x1e1)+_0x59f26f[_0x1e6c76(0x20b)];_0x59f26f[_0x1e6c76(0x1fc)]&&(_0x14492d+=':\x20'+_0x59f26f[_0x1e6c76(0x1fc)]);_0x59f26f[_0x1e6c76(0x203)]&&(_0x14492d+='\x20('+_0x59f26f[_0x1e6c76(0x203)]+')');if(_0x59f26f[_0x1e6c76(0x1dd)]){const _0x4c69d1=formatEnumOptions(_0x59f26f[_0x1e6c76(0x1dd)]);_0x14492d+='\x20['+_0x4c69d1+']';}_0x59f26f[_0x1e6c76(0x1d9)]===_0x1e6c76(0x1f9)&&(_0x14492d+='\x20[true/false]');if(_0x59f26f[_0x1e6c76(0x1c7)]!==undefined||_0x59f26f['maximum']!==undefined){const _0x2ec6ec=_0x59f26f['minimum']!==undefined&&_0x59f26f[_0x1e6c76(0x1e7)]!==undefined?_0x59f26f[_0x1e6c76(0x1c7)]+'-'+_0x59f26f[_0x1e6c76(0x1e7)]:_0x59f26f['minimum']!==undefined?_0x1e6c76(0x212)+_0x59f26f['minimum']:_0x1e6c76(0x208)+_0x59f26f['maximum'];_0x14492d+='\x20['+_0x2ec6ec+']';}_0x8d45b3['push'](_0x14492d);}return _0x8d45b3[_0x1e6c76(0x1fe)]('\x0a');}function a85_0x3f6c(_0x205255,_0x473a67){_0x205255=_0x205255-0x1bd;const _0x3a4fcf=a85_0x3a4f();let _0x3f6c85=_0x3a4fcf[_0x205255];return _0x3f6c85;}export function formatMetadataAsHelp(_0x19ff2c,_0x273732=![]){const _0x41d1db=a85_0x3f6c,_0x156eaa=_0x273732?_0x19ff2c[_0x41d1db(0x1c8)]['filter'](_0x3768bd=>_0x3768bd[_0x41d1db(0x204)]):_0x19ff2c['settings'][_0x41d1db(0x1f5)](_0x912fd5=>!_0x912fd5[_0x41d1db(0x204)]);if(_0x156eaa[_0x41d1db(0x1da)]===0x0)return _0x41d1db(0x1d4);const _0x5db73e=[];for(const _0x8d769a of _0x156eaa){let _0x1a6ef8=_0x41d1db(0x1e1)+_0x8d769a[_0x41d1db(0x20b)]+':\x20'+_0x8d769a['label'];_0x8d769a[_0x41d1db(0x1eb)]&&(_0x1a6ef8+='\x20('+_0x8d769a[_0x41d1db(0x1eb)]+')');if(_0x8d769a[_0x41d1db(0x20e)]){const _0x3b4a52=_0x8d769a[_0x41d1db(0x20e)][_0x41d1db(0x201)](_0xa86689=>_0xa86689[_0x41d1db(0x1c4)])['join'](',\x20');_0x1a6ef8+='\x20['+_0x3b4a52+']';}_0x8d769a[_0x41d1db(0x1dc)]===_0x41d1db(0x1f9)&&(_0x1a6ef8+=_0x41d1db(0x1c9)),_0x8d769a[_0x41d1db(0x1c5)]!==undefined&&_0x8d769a[_0x41d1db(0x1c5)]!==null&&(_0x1a6ef8+='\x20(default:\x20'+_0x8d769a[_0x41d1db(0x1c5)]+')'),_0x5db73e[_0x41d1db(0x1cf)](_0x1a6ef8);}return _0x5db73e[_0x41d1db(0x1fe)]('\x0a');}
|
|
1
|
+
(function(_0x350519,_0xcac471){const _0x3d71c0=a85_0x135c,_0x5471c7=_0x350519();while(!![]){try{const _0x102a27=-parseInt(_0x3d71c0(0x20a))/0x1+-parseInt(_0x3d71c0(0x225))/0x2+parseInt(_0x3d71c0(0x21f))/0x3*(-parseInt(_0x3d71c0(0x235))/0x4)+-parseInt(_0x3d71c0(0x1e8))/0x5+-parseInt(_0x3d71c0(0x1fa))/0x6*(parseInt(_0x3d71c0(0x203))/0x7)+-parseInt(_0x3d71c0(0x201))/0x8*(parseInt(_0x3d71c0(0x238))/0x9)+-parseInt(_0x3d71c0(0x1fe))/0xa*(-parseInt(_0x3d71c0(0x1f1))/0xb);if(_0x102a27===_0xcac471)break;else _0x5471c7['push'](_0x5471c7['shift']());}catch(_0x270fbe){_0x5471c7['push'](_0x5471c7['shift']());}}}(a85_0x4dba,0x898ef));export function isLegacySchema(_0x1ac526){const _0x411031=a85_0x135c,_0x3510cf=_0x1ac526['properties']||[];return _0x3510cf[_0x411031(0x213)](_0x2e646c=>_0x2e646c['name']===_0x411031(0x1f3)&&_0x2e646c[_0x411031(0x239)]==='record'&&_0x2e646c[_0x411031(0x205)]);}export function getLegacySettingsField(_0x75bbba){const _0x2fca2f=a85_0x135c,_0xb69cd8=_0x75bbba[_0x2fca2f(0x205)]||[];return _0xb69cd8[_0x2fca2f(0x20c)](_0x348456=>_0x348456['name']===_0x2fca2f(0x1f3)&&_0x348456['type']===_0x2fca2f(0x236)&&_0x348456['properties']);}export function normalizeSchemaFields(_0x33c3cd){const _0x40f970=a85_0x135c,_0x4e306b=_0x33c3cd[_0x40f970(0x205)]||[],_0x262b7b=getLegacySettingsField(_0x33c3cd);if(_0x262b7b?.['properties']){const _0x3f86c7=_0x4e306b[_0x40f970(0x219)](_0x2a20ac=>_0x2a20ac['name']!==_0x40f970(0x200)&&_0x2a20ac[_0x40f970(0x230)]!=='legacy_settings');return[..._0x3f86c7,..._0x262b7b['properties']];}return _0x4e306b[_0x40f970(0x219)](_0x5704ef=>_0x5704ef[_0x40f970(0x230)]!==_0x40f970(0x200));}export function transformConfigToLegacy(_0x5cb430,_0x5cd7b0){const _0x3c4102=a85_0x135c,_0x31e09d=getLegacySettingsField(_0x5cd7b0);if(!_0x31e09d?.[_0x3c4102(0x205)])return _0x5cb430;const _0x5929b0=transformConfigFromLegacy(_0x5cb430),{legacy:_0x1bddd1,..._0x1fb859}=_0x5929b0,_0x281be0=new Set(_0x31e09d[_0x3c4102(0x205)]['map'](_0x595693=>_0x595693[_0x3c4102(0x230)])[_0x3c4102(0x219)](Boolean)),_0x28b98d=_0x5cd7b0[_0x3c4102(0x205)]||[],_0x1096b7=new Set(_0x28b98d[_0x3c4102(0x219)](_0x375b42=>_0x375b42[_0x3c4102(0x230)]!==_0x3c4102(0x200)&&_0x375b42[_0x3c4102(0x230)]!==_0x3c4102(0x1f3))[_0x3c4102(0x1ec)](_0x2f5e6c=>_0x2f5e6c[_0x3c4102(0x230)])['filter'](Boolean)),_0x12f8a5={},_0x57aab3={};for(const [_0x11d75e,_0x1c762f]of Object['entries'](_0x1fb859)){if(_0x281be0[_0x3c4102(0x22b)](_0x11d75e))_0x12f8a5[_0x11d75e]=_0x1c762f;else _0x1096b7[_0x3c4102(0x22b)](_0x11d75e)?_0x57aab3[_0x11d75e]=_0x1c762f:_0x12f8a5[_0x11d75e]=_0x1c762f;}const _0xe2991d={..._0x57aab3,'legacy':!![],'legacy_settings':_0x12f8a5};return _0xe2991d;}export function transformConfigFromLegacy(_0x68268e){const _0x4a414c=a85_0x135c,_0x5beb76=_0x68268e['legacy_settings']??_0x68268e['legacySettings'];if(typeof _0x5beb76===_0x4a414c(0x22a)&&_0x5beb76!==null&&!Array[_0x4a414c(0x234)](_0x5beb76)){const _0x17fb95={};for(const [_0x540b63,_0x271a0e]of Object[_0x4a414c(0x208)](_0x68268e)){_0x540b63!==_0x4a414c(0x200)&&_0x540b63!==_0x4a414c(0x1f3)&&_0x540b63!==_0x4a414c(0x1f6)&&(_0x17fb95[_0x540b63]=_0x271a0e);}const _0x19418d=transformConfigFromLegacy(_0x5beb76);return{..._0x17fb95,..._0x19418d};}return _0x68268e;}function a85_0x135c(_0x15a52c,_0x820cbf){_0x15a52c=_0x15a52c-0x1e8;const _0x4dba1e=a85_0x4dba();let _0x135c34=_0x4dba1e[_0x15a52c];return _0x135c34;}function camelToSnake(_0x30a2e3){const _0x1e67ee=a85_0x135c;return _0x30a2e3[_0x1e67ee(0x223)](/[A-Z]/g,_0x338e62=>'_'+_0x338e62['toLowerCase']());}export function normalizeConnectorConfigForYaml(_0x1810ca){const _0x1dde4b=a85_0x135c,_0x571d01=transformConfigFromLegacy(_0x1810ca),_0x46ca66={};for(const [_0x14f704,_0x1e5526]of Object[_0x1dde4b(0x208)](_0x571d01)){if(_0x14f704===_0x1dde4b(0x200))continue;let _0x2cf3ad=camelToSnake(_0x14f704);_0x2cf3ad[_0x1dde4b(0x1fb)](_0x1dde4b(0x237))&&(_0x2cf3ad=_0x2cf3ad[_0x1dde4b(0x227)](0x5)),_0x46ca66[_0x2cf3ad]=_0x1e5526;}return _0x46ca66;}function shouldShowField(_0xd248fc,_0x4aa74c){const _0x13b446=a85_0x135c;if(!_0xd248fc)return!![];for(const [_0x45a8d4,_0x24c2b8]of Object[_0x13b446(0x208)](_0xd248fc)){const _0x2b3009=_0x4aa74c[_0x45a8d4],_0xd1a805=_0x24c2b8[_0x13b446(0x213)](_0x20a31d=>{if(_0x20a31d===null)return _0x2b3009===null||_0x2b3009===undefined;return String(_0x2b3009)===String(_0x20a31d);});if(!_0xd1a805)return![];}return!![];}function a85_0x4dba(){const _0x234f46=['replace','includes','846598noHBiY','number','slice','checkbox','errors','object','has','message','password','settings','\x22\x20must\x20be\x20a\x20valid\x20number','name','Unknown\x20field','\x22\x20must\x20be\x20true\x20or\x20false','\x20[true/false]','isArray','1227076nmYAXl','record','user_','747RDPRFP','type','4319595uGiGFH','\x22\x20has\x20an\x20unexpected\x20object\x20value','push','title','map','credential','true','select','label','220LXtbtQ','one\x20of:\x20','legacy_settings','\x20(default:\x20','received','legacySettings','text','textarea','\x22\x20must\x20be\x20at\x20most\x20','3306252FwZcyE','startsWith','expected','maximum','2422830byucyJ','input','legacy','70344wrynfR','value','7tXeAOK','false','properties','test','minimum','entries','url','793835vKSwLy','options','find','Unknown\x20connector_config\x20field\x20\x22','default_value','\x22\x20must\x20be\x20a\x20number','boolean','criteria','\x22\x20must\x20be\x20a\x20valid\x20email\x20address','some','length','field','\x0a\x20\x20\x20\x20Expected:\x20','join','description','filter','\x0a\x20\x20\x20\x20Received:\x20','>=\x20','stringify','\x22\x20must\x20be\x20at\x20least\x20','\x20\x20×\x20','9hlSHQy','string','<=\x20','enumeration'];a85_0x4dba=function(){return _0x234f46;};return a85_0x4dba();}function formatEnumOptions(_0x564ccb){const _0x2d1c3c=a85_0x135c;return _0x564ccb['map'](_0x8874e5=>{const _0x100240=a85_0x135c;if(typeof _0x8874e5===_0x100240(0x22a)&&_0x100240(0x202)in _0x8874e5)return String(_0x8874e5[_0x100240(0x202)]);return String(_0x8874e5);})[_0x2d1c3c(0x217)](',\x20');}function isValidEnumOption(_0x314005,_0x1456c9){const _0x268b70=a85_0x135c;return _0x1456c9[_0x268b70(0x213)](_0x4e4e7c=>{const _0x3801d6=_0x268b70;if(typeof _0x4e4e7c===_0x3801d6(0x22a)&&_0x3801d6(0x202)in _0x4e4e7c)return _0x4e4e7c[_0x3801d6(0x202)]===_0x314005||String(_0x4e4e7c[_0x3801d6(0x202)])===String(_0x314005);return _0x4e4e7c===_0x314005||String(_0x4e4e7c)===String(_0x314005);});}function getFieldLabel(_0x1fb2ae){const _0x4174bf=a85_0x135c;return _0x1fb2ae[_0x4174bf(0x1eb)]||_0x1fb2ae[_0x4174bf(0x230)]||_0x4174bf(0x231);}function validateField(_0x59fb9b,_0xf147bc,_0x386c18,_0x24f3ba){const _0x4991f5=a85_0x135c,_0x52551e=[],_0x5cf0a4=[],_0x49bba2=getFieldLabel(_0x386c18);if(!shouldShowField(_0x386c18[_0x4991f5(0x211)],_0x24f3ba))return{'errors':_0x52551e,'warnings':_0x5cf0a4};if(_0xf147bc===undefined||_0xf147bc===null)return{'errors':_0x52551e,'warnings':_0x5cf0a4};switch(_0x386c18[_0x4991f5(0x1ff)]){case _0x4991f5(0x1ef):_0x386c18[_0x4991f5(0x222)]&&!isValidEnumOption(_0xf147bc,_0x386c18[_0x4991f5(0x222)])&&_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'Invalid\x20value\x20for\x20\x22'+_0x49bba2+'\x22','expected':_0x4991f5(0x1f2)+formatEnumOptions(_0x386c18['enumeration']),'received':_0xf147bc});break;case'number':if(typeof _0xf147bc!==_0x4991f5(0x226)&&typeof _0xf147bc!==_0x4991f5(0x220))_0x52551e['push']({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x20f),'expected':'number','received':typeof _0xf147bc});else{const _0x12e6a1=typeof _0xf147bc===_0x4991f5(0x220)?parseFloat(_0xf147bc):_0xf147bc;Number['isNaN'](_0x12e6a1)?_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x22f),'received':_0xf147bc}):(_0x386c18[_0x4991f5(0x207)]!==undefined&&_0x12e6a1<_0x386c18[_0x4991f5(0x207)]&&_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x21d)+_0x386c18[_0x4991f5(0x207)],'expected':_0x4991f5(0x21b)+_0x386c18[_0x4991f5(0x207)],'received':_0x12e6a1}),_0x386c18['maximum']!==undefined&&_0x12e6a1>_0x386c18['maximum']&&_0x52551e['push']({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x1f9)+_0x386c18['maximum'],'expected':_0x4991f5(0x221)+_0x386c18[_0x4991f5(0x1fd)],'received':_0x12e6a1}));}break;case _0x4991f5(0x228):typeof _0xf147bc!==_0x4991f5(0x210)&&_0xf147bc!==_0x4991f5(0x1ee)&&_0xf147bc!==_0x4991f5(0x204)&&_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x232),'expected':_0x4991f5(0x210),'received':typeof _0xf147bc});break;case _0x4991f5(0x209):if(typeof _0xf147bc===_0x4991f5(0x220)&&_0xf147bc[_0x4991f5(0x214)]>0x0)try{new URL(_0xf147bc);}catch{_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+'\x22\x20must\x20be\x20a\x20valid\x20URL','received':_0xf147bc});}break;case'email':if(typeof _0xf147bc==='string'&&_0xf147bc[_0x4991f5(0x214)]>0x0){const _0xbf89cc=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;!_0xbf89cc[_0x4991f5(0x206)](_0xf147bc)&&_0x52551e[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x212),'received':_0xf147bc});}break;case _0x4991f5(0x1f7):case _0x4991f5(0x1f8):case _0x4991f5(0x22d):default:typeof _0xf147bc===_0x4991f5(0x22a)&&!Array[_0x4991f5(0x234)](_0xf147bc)&&_0x5cf0a4[_0x4991f5(0x1ea)]({'field':_0x59fb9b,'message':'\x22'+_0x49bba2+_0x4991f5(0x1e9)});break;}return{'errors':_0x52551e,'warnings':_0x5cf0a4};}export function validateConnectorConfig(_0x5cd25b,_0x3d6dd3){const _0xf16197=a85_0x135c,_0x195bba=[],_0x56f2e9=[],_0x585bb1=normalizeSchemaFields(_0x3d6dd3),_0x2d1cab=new Set();for(const _0x5c6bc6 of _0x585bb1){_0x5c6bc6[_0xf16197(0x230)]&&_0x2d1cab['add'](_0x5c6bc6[_0xf16197(0x230)]);}for(const [_0x50ec9e,_0xab6b8f]of Object[_0xf16197(0x208)](_0x5cd25b)){const _0x2fb1dd=_0x585bb1[_0xf16197(0x20c)](_0x2f55fd=>_0x2f55fd[_0xf16197(0x230)]===_0x50ec9e);if(_0x2fb1dd){const _0x5f287a=validateField(_0x50ec9e,_0xab6b8f,_0x2fb1dd,_0x5cd25b);_0x195bba['push'](..._0x5f287a[_0xf16197(0x229)]),_0x56f2e9['push'](..._0x5f287a['warnings']);}else _0x56f2e9[_0xf16197(0x1ea)]({'field':_0x50ec9e,'message':_0xf16197(0x20d)+_0x50ec9e+'\x22'});}return{'valid':_0x195bba[_0xf16197(0x214)]===0x0,'errors':_0x195bba,'warnings':_0x56f2e9};}export function validateConnectorConfigFromMetadata(_0x26b92f,_0x319837,_0x681a1a=![]){const _0x35c8ee=a85_0x135c,_0x4af93a=[],_0x93af4=[],_0x557c80=_0x681a1a?_0x319837[_0x35c8ee(0x22e)]['filter'](_0x381218=>_0x381218[_0x35c8ee(0x1ed)]):_0x319837[_0x35c8ee(0x22e)]['filter'](_0x58fad5=>!_0x58fad5[_0x35c8ee(0x1ed)]);for(const [_0x92b496,_0x27f64d]of Object[_0x35c8ee(0x208)](_0x26b92f)){const _0x5d66d4=_0x557c80['find'](_0x2a1402=>_0x2a1402[_0x35c8ee(0x230)]===_0x92b496);if(_0x5d66d4){const _0x3e2b43=validateMetadataField(_0x92b496,_0x27f64d,_0x5d66d4,_0x26b92f);_0x4af93a['push'](..._0x3e2b43[_0x35c8ee(0x229)]),_0x93af4[_0x35c8ee(0x1ea)](..._0x3e2b43['warnings']);}else!_0x681a1a&&_0x93af4[_0x35c8ee(0x1ea)]({'field':_0x92b496,'message':'Unknown\x20connector_config\x20field\x20\x22'+_0x92b496+'\x22'});}return{'valid':_0x4af93a['length']===0x0,'errors':_0x4af93a,'warnings':_0x93af4};}function validateMetadataField(_0x4216ca,_0x35717e,_0x92f73c,_0x5031c4){const _0x453a1c=a85_0x135c,_0x30373c=[],_0x137325=[];if(_0x92f73c[_0x453a1c(0x211)]&&!shouldShowMetadataField(_0x92f73c[_0x453a1c(0x211)],_0x5031c4))return{'errors':_0x30373c,'warnings':_0x137325};if(_0x35717e===undefined||_0x35717e===null)return{'errors':_0x30373c,'warnings':_0x137325};switch(_0x92f73c['type']){case _0x453a1c(0x1ef):if(_0x92f73c[_0x453a1c(0x20b)]){const _0x5f1046=_0x92f73c[_0x453a1c(0x20b)][_0x453a1c(0x1ec)](_0x2e0f98=>_0x2e0f98['value']);!_0x5f1046[_0x453a1c(0x224)](String(_0x35717e))&&_0x30373c['push']({'field':_0x4216ca,'message':'Invalid\x20value\x20for\x20\x22'+_0x92f73c[_0x453a1c(0x1f0)]+'\x22','expected':_0x453a1c(0x1f2)+_0x5f1046['join'](',\x20'),'received':_0x35717e});}break;case'checkbox':typeof _0x35717e!==_0x453a1c(0x210)&&_0x35717e!==_0x453a1c(0x1ee)&&_0x35717e!==_0x453a1c(0x204)&&_0x30373c[_0x453a1c(0x1ea)]({'field':_0x4216ca,'message':'\x22'+_0x92f73c[_0x453a1c(0x1f0)]+_0x453a1c(0x232),'expected':_0x453a1c(0x210),'received':typeof _0x35717e});break;case'password':case _0x453a1c(0x1f7):default:break;}return{'errors':_0x30373c,'warnings':_0x137325};}function shouldShowMetadataField(_0x5d0228,_0x1106ee){const _0x53c9a=a85_0x135c;for(const [_0x507609,_0x228324]of Object[_0x53c9a(0x208)](_0x5d0228)){const _0x40c5a0=_0x1106ee[_0x507609];if(_0x40c5a0!==_0x228324&&String(_0x40c5a0)!==String(_0x228324))return![];}return!![];}export function formatValidationErrors(_0x364a8a){const _0x760069=a85_0x135c;if(_0x364a8a['length']===0x0)return'';return _0x364a8a[_0x760069(0x1ec)](_0x46d95a=>{const _0x1225a7=_0x760069;let _0x3c71cc=_0x1225a7(0x21e)+_0x46d95a['field']+':\x20'+_0x46d95a[_0x1225a7(0x22c)];_0x46d95a[_0x1225a7(0x1fc)]&&(_0x3c71cc+=_0x1225a7(0x216)+_0x46d95a[_0x1225a7(0x1fc)]);if(_0x46d95a[_0x1225a7(0x1f5)]!==undefined){const _0x45bd33=typeof _0x46d95a[_0x1225a7(0x1f5)]===_0x1225a7(0x22a)?JSON[_0x1225a7(0x21c)](_0x46d95a['received']):String(_0x46d95a['received']);_0x3c71cc+=_0x1225a7(0x21a)+_0x45bd33;}return _0x3c71cc;})[_0x760069(0x217)]('\x0a');}export function formatValidationWarnings(_0x5df645){const _0x28f129=a85_0x135c;if(_0x5df645['length']===0x0)return'';return _0x5df645[_0x28f129(0x1ec)](_0x233805=>'\x20\x20⚠\x20'+_0x233805[_0x28f129(0x215)]+':\x20'+_0x233805[_0x28f129(0x22c)])[_0x28f129(0x217)]('\x0a');}export function formatSchemaAsHelp(_0x3901c7){const _0xf68642=a85_0x135c,_0xca6f4b=_0x3901c7[_0xf68642(0x205)]||[];if(_0xca6f4b[_0xf68642(0x214)]===0x0)return'No\x20fields\x20defined';const _0x2e5f2f=[];for(const _0x4893b7 of _0xca6f4b){if(!_0x4893b7[_0xf68642(0x230)])continue;let _0x91084b='\x20\x20-\x20'+_0x4893b7[_0xf68642(0x230)];_0x4893b7[_0xf68642(0x1eb)]&&(_0x91084b+=':\x20'+_0x4893b7[_0xf68642(0x1eb)]);_0x4893b7['description']&&(_0x91084b+='\x20('+_0x4893b7[_0xf68642(0x218)]+')');if(_0x4893b7[_0xf68642(0x222)]){const _0xb5d728=formatEnumOptions(_0x4893b7[_0xf68642(0x222)]);_0x91084b+='\x20['+_0xb5d728+']';}_0x4893b7[_0xf68642(0x1ff)]==='checkbox'&&(_0x91084b+=_0xf68642(0x233));if(_0x4893b7[_0xf68642(0x207)]!==undefined||_0x4893b7[_0xf68642(0x1fd)]!==undefined){const _0x258029=_0x4893b7['minimum']!==undefined&&_0x4893b7[_0xf68642(0x1fd)]!==undefined?_0x4893b7[_0xf68642(0x207)]+'-'+_0x4893b7[_0xf68642(0x1fd)]:_0x4893b7[_0xf68642(0x207)]!==undefined?_0xf68642(0x21b)+_0x4893b7[_0xf68642(0x207)]:_0xf68642(0x221)+_0x4893b7[_0xf68642(0x1fd)];_0x91084b+='\x20['+_0x258029+']';}_0x2e5f2f['push'](_0x91084b);}return _0x2e5f2f[_0xf68642(0x217)]('\x0a');}export function formatMetadataAsHelp(_0xb3cb2e,_0x2e1fbb=![]){const _0xc39de6=a85_0x135c,_0x3e56a5=_0x2e1fbb?_0xb3cb2e[_0xc39de6(0x22e)]['filter'](_0x515cb3=>_0x515cb3[_0xc39de6(0x1ed)]):_0xb3cb2e[_0xc39de6(0x22e)][_0xc39de6(0x219)](_0x410198=>!_0x410198[_0xc39de6(0x1ed)]);if(_0x3e56a5[_0xc39de6(0x214)]===0x0)return'No\x20settings\x20defined';const _0x4600bb=[];for(const _0x1576e6 of _0x3e56a5){let _0x20cd4d='\x20\x20-\x20'+_0x1576e6[_0xc39de6(0x230)]+':\x20'+_0x1576e6[_0xc39de6(0x1f0)];_0x1576e6['hint']&&(_0x20cd4d+='\x20('+_0x1576e6['hint']+')');if(_0x1576e6['options']){const _0x50bddf=_0x1576e6[_0xc39de6(0x20b)]['map'](_0x302803=>_0x302803[_0xc39de6(0x202)])['join'](',\x20');_0x20cd4d+='\x20['+_0x50bddf+']';}_0x1576e6[_0xc39de6(0x239)]===_0xc39de6(0x228)&&(_0x20cd4d+=_0xc39de6(0x233)),_0x1576e6[_0xc39de6(0x20e)]!==undefined&&_0x1576e6['default_value']!==null&&(_0x20cd4d+=_0xc39de6(0x1f4)+_0x1576e6[_0xc39de6(0x20e)]+')'),_0x4600bb['push'](_0x20cd4d);}return _0x4600bb[_0xc39de6(0x217)]('\x0a');}
|
package/dist/sdk/connection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a86_0x1996(){const _0xde09e8=['getConnection','Try\x20\x27tdx\x20connection\x20settings\x20','getOutputSchemaWithCache','listConnections','Use\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types','Connection\x20not\x20found:\x20','connector_config\x20warnings:\x0a','listConnectorMetadata','\x27\x20to\x20see\x20connection-level\x20settings\x20instead.\x0a','getOutputSchema','CONNECTION_NOT_FOUND','196736dSrQbt','Metadata\x20not\x20found\x20for\x20connector\x20type:\x20','3930765GjiSTi','get','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','name','Invalid\x20connector_config','validateConfigServer','warn','\x20for\x20activation\x20\x22','map','validateConfig','6220627NamBdj','10781514vWRpRB','clearCache','33GagAlX','16UUyVFn','listTypes','schemaCache','find','\x0a\x0aAvailable\x20fields:\x0a','length','3323650AXiXUN','Connector\x20type:\x20','getMetadata','CONNECTOR_SCHEMA_NOT_FOUND','valid','warnings','getConnectorMetadata','65109wZRghW','default','set','findById','list','resolve','client','profile','findByName','6iWtjHD','27686772AvZoCV','69bEtVJg','errors','8lPdoKk'];a86_0x1996=function(){return _0xde09e8;};return a86_0x1996();}const a86_0x443d6f=a86_0x2484;(function(_0x55bb5a,_0x5acfee){const _0x1100d1=a86_0x2484,_0x533a71=_0x55bb5a();while(!![]){try{const _0xb80f0d=parseInt(_0x1100d1(0x1ce))/0x1*(-parseInt(_0x1100d1(0x1f7))/0x2)+parseInt(_0x1100d1(0x1d9))/0x3*(parseInt(_0x1100d1(0x1e7))/0x4)+-parseInt(_0x1100d1(0x1e9))/0x5*(-parseInt(_0x1100d1(0x1d7))/0x6)+-parseInt(_0x1100d1(0x1f3))/0x7+parseInt(_0x1100d1(0x1db))/0x8*(-parseInt(_0x1100d1(0x1f4))/0x9)+parseInt(_0x1100d1(0x1fd))/0xa*(-parseInt(_0x1100d1(0x1f6))/0xb)+parseInt(_0x1100d1(0x1d8))/0xc;if(_0xb80f0d===_0x5acfee)break;else _0x533a71['push'](_0x533a71['shift']());}catch(_0x3c3b9d){_0x533a71['push'](_0x533a71['shift']());}}}(a86_0x1996,0x9760a));import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a86_0x2484(_0x3db9dd,_0x472a7e){_0x3db9dd=_0x3db9dd-0x1ce;const _0x199699=a86_0x1996();let _0x2484ce=_0x199699[_0x3db9dd];return _0x2484ce;}import{validateConnectorConfig,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'./connection-validator.js';import{loadCachedConnections,saveCachedConnections,clearConnectionCache}from'../core/connection-cache.js';export class ConnectionSDK{['client'];[a86_0x443d6f(0x1d5)];[a86_0x443d6f(0x1f9)]=new Map();constructor(_0x106d1f){const _0x45a5b2=a86_0x443d6f;this['client']=new TDApiClient(_0x106d1f),this[_0x45a5b2(0x1d5)]=_0x106d1f[_0x45a5b2(0x1d5)]||_0x45a5b2(0x1cf);}async['list'](_0xf607a=![]){const _0x35b802=a86_0x443d6f;if(!_0xf607a){const _0x39c614=loadCachedConnections(this[_0x35b802(0x1d5)]);if(_0x39c614)return _0x39c614;}const _0x2d94cd=await this['client'][_0x35b802(0x1df)]();return saveCachedConnections(this['profile'],_0x2d94cd),_0x2d94cd;}[a86_0x443d6f(0x1f5)](){const _0x40905f=a86_0x443d6f;clearConnectionCache(this[_0x40905f(0x1d5)]);}async[a86_0x443d6f(0x1ea)](_0x563d58){const _0x3d0bf9=a86_0x443d6f;return this['client'][_0x3d0bf9(0x1dc)](_0x563d58);}async[a86_0x443d6f(0x1d6)](_0x382554){const _0x5bc3d5=a86_0x443d6f,_0x1809cc=await this['list']();return _0x1809cc[_0x5bc3d5(0x1fa)](_0x96ea83=>_0x96ea83[_0x5bc3d5(0x1ec)]===_0x382554);}async[a86_0x443d6f(0x1d1)](_0x51ee6b){const _0xc72ed=a86_0x443d6f,_0x4a94fc=await this['list']();return _0x4a94fc[_0xc72ed(0x1fa)](_0x47d906=>_0x47d906['id']===_0x51ee6b);}async[a86_0x443d6f(0x1d3)](_0x2c3210){const _0x3bcf45=a86_0x443d6f;let _0x32c6e8=await this[_0x3bcf45(0x1d6)](_0x2c3210);if(!_0x32c6e8){const _0x3ad097=await this[_0x3bcf45(0x1d2)](!![]);_0x32c6e8=_0x3ad097[_0x3bcf45(0x1fa)](_0x1b9e90=>_0x1b9e90[_0x3bcf45(0x1ec)]===_0x2c3210);}if(!_0x32c6e8)throw new SDKError(ErrorCode[_0x3bcf45(0x1e6)],_0x3bcf45(0x1e1)+_0x2c3210,undefined,{'helpText':_0x3bcf45(0x1eb)});return _0x32c6e8;}async['buildIdToNameMap'](){const _0x123171=a86_0x443d6f,_0x36942e=await this[_0x123171(0x1d2)]();return new Map(_0x36942e[_0x123171(0x1f1)](_0x5810e7=>[_0x5810e7['id'],_0x5810e7[_0x123171(0x1ec)]]));}async['buildNameToIdMap'](){const _0x5e2dd2=a86_0x443d6f,_0x3d6f6b=await this[_0x5e2dd2(0x1d2)]();return new Map(_0x3d6f6b[_0x5e2dd2(0x1f1)](_0x3fcd68=>[_0x3fcd68[_0x5e2dd2(0x1ec)],parseInt(_0x3fcd68['id'],0xa)]));}async['getOutputSchema'](_0x5ce76f){const _0x3739d8=a86_0x443d6f;try{return await this['client']['getOutputFormSchema'](_0x5ce76f);}catch(_0x5b3a50){throw new SDKError(ErrorCode[_0x3739d8(0x200)],'Output\x20schema\x20not\x20found\x20for\x20connector\x20type:\x20'+_0x5ce76f,_0x5b3a50,{'helpText':'This\x20connector\x20may\x20not\x20have\x20activation\x20output\x20settings.\x0a'+(_0x3739d8(0x1dd)+_0x5ce76f+_0x3739d8(0x1e4))+'Use\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.'});}}async[a86_0x443d6f(0x1de)](_0x560c5e){const _0x5b880c=a86_0x443d6f,_0x24ec4f=this['schemaCache'][_0x5b880c(0x1ea)](_0x560c5e);if(_0x24ec4f)return _0x24ec4f;const _0x37e9ee=await this[_0x5b880c(0x1e5)](_0x560c5e);return this[_0x5b880c(0x1f9)][_0x5b880c(0x1d0)](_0x560c5e,_0x37e9ee),_0x37e9ee;}async[a86_0x443d6f(0x1ff)](_0x4ff413){const _0x3bd116=a86_0x443d6f;try{return await this[_0x3bd116(0x1d4)][_0x3bd116(0x203)](_0x4ff413);}catch(_0xc6da52){throw new SDKError(ErrorCode[_0x3bd116(0x200)],_0x3bd116(0x1e8)+_0x4ff413,_0xc6da52,{'helpText':_0x3bd116(0x1e0)});}}async[a86_0x443d6f(0x1f8)](){const _0x544bee=a86_0x443d6f;return this[_0x544bee(0x1d4)][_0x544bee(0x1e3)]();}async[a86_0x443d6f(0x1f2)](_0x311526,_0x4dbd14){const _0x5e62cc=a86_0x443d6f,_0x3013ee=await this[_0x5e62cc(0x1e5)](_0x311526);return validateConnectorConfig(_0x4dbd14,_0x3013ee);}async['validateConfigOrThrow'](_0x398a6f,_0x3d7e5a,_0x4fe36f){const _0x56aff9=a86_0x443d6f,_0x9a1a0=await this[_0x56aff9(0x1f2)](_0x398a6f,_0x3d7e5a);if(!_0x9a1a0[_0x56aff9(0x201)]){const _0x4031c9=_0x4fe36f?_0x56aff9(0x1f0)+_0x4fe36f+'\x22':'',_0xb31070=formatValidationErrors(_0x9a1a0[_0x56aff9(0x1da)]),_0x4789e3=await this[_0x56aff9(0x1e5)](_0x398a6f),_0x4e3f1a=_0x56aff9(0x1fe)+_0x398a6f+_0x56aff9(0x1fb)+formatSchemaAsHelp(_0x4789e3);throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x56aff9(0x1ed)+_0x4031c9+':\x0a'+_0xb31070,undefined,{'helpText':_0x4e3f1a});}if(_0x9a1a0[_0x56aff9(0x202)][_0x56aff9(0x1fc)]>0x0){const _0x22f815=formatValidationWarnings(_0x9a1a0[_0x56aff9(0x202)]);console[_0x56aff9(0x1ef)](_0x56aff9(0x1e2)+_0x22f815);}}async[a86_0x443d6f(0x1ee)](_0x261892,_0x3abbf2,_0x36536a){const _0x4183e5=a86_0x443d6f;await this[_0x4183e5(0x1d4)]['validateConnectorConfig'](_0x261892,_0x3abbf2,_0x36536a);}}
|
package/dist/sdk/engage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a87_0x39471d=a87_0x47ee;(function(_0x3a69e0,_0x2b427f){const _0x5332c8=a87_0x47ee,_0x2de7af=_0x3a69e0();while(!![]){try{const _0x3d1893=parseInt(_0x5332c8(0x205))/0x1*(-parseInt(_0x5332c8(0x1f1))/0x2)+-parseInt(_0x5332c8(0x233))/0x3*(-parseInt(_0x5332c8(0x214))/0x4)+parseInt(_0x5332c8(0x21a))/0x5*(parseInt(_0x5332c8(0x20a))/0x6)+-parseInt(_0x5332c8(0x1e9))/0x7*(-parseInt(_0x5332c8(0x210))/0x8)+-parseInt(_0x5332c8(0x218))/0x9*(parseInt(_0x5332c8(0x1fe))/0xa)+-parseInt(_0x5332c8(0x202))/0xb+-parseInt(_0x5332c8(0x216))/0xc*(-parseInt(_0x5332c8(0x1e6))/0xd);if(_0x3d1893===_0x2b427f)break;else _0x2de7af['push'](_0x2de7af['shift']());}catch(_0x994c75){_0x2de7af['push'](_0x2de7af['shift']());}}}(a87_0x24c8,0x35ae8));function a87_0x47ee(_0x2e8c90,_0x2ca8ff){_0x2e8c90=_0x2e8c90-0x1e1;const _0x24c8af=a87_0x24c8();let _0x47eeb2=_0x24c8af[_0x2e8c90];return _0x47eeb2;}import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a87_0x24c8(){const _0x1da0e8=['workspaceConfig','NOT_FOUND','createCampaign','Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.','Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.','resumeCampaign','INVALID_ARGUMENT','data','15DZLXft','campaignType','deleteWorkspace','enableUtmTracking','normalizeWorkspace','audienceId','9876399HuCWhH','getTemplate','Multiple\x20campaigns\x20found\x20with\x20name\x20\x22','511OPHBnr','client','normalizeCampaign','audienceName','normalizeTemplate','getCampaign','listWorkspaces','name','185148yBTusi','Email\x20template\x20not\x20found\x20with\x20ID:\x20','isArray','segmentId','updateWorkspace','listTemplates','workspaceId','pauseCampaign','createWorkspace','resolveTemplateId','Multiple\x20workspaces\x20found\x20with\x20name\x20\x22','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','listCampaigns','3910670BkNvaf','updateCampaign','updatedAt','limit','1952731csPIsd','code','attributes','2rnHdsF','Campaign\x20not\x20found:\x20','updateTemplate','length','duplicateCampaign','10110FmVvmG','Multiple\x20templates\x20found\x20with\x20name\x20\x22','subjectTemplate','createdAt','deleteTemplate','join','808xRAETZ','applicableParentSegments','deleteCampaign','\x22:\x20','101860rPgTCK','description','12KmHxQv','Workspace\x20not\x20found\x20with\x20ID:\x20','9pRNmcS','resolveWorkspaceId','235nIkaBP','isUUID','Campaign\x20not\x20found\x20with\x20ID:\x20','createTemplate','status','getCampaignFull','getWorkspaceFull','filter','launchedAt','type','getWorkspace','map','getTemplateFull','resolveCampaignId','launchCampaign','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.','editorType'];a87_0x24c8=function(){return _0x1da0e8;};return a87_0x24c8();}export class EngageSDK{[a87_0x39471d(0x1ea)];constructor(_0x23fc7c){const _0x1553b5=a87_0x39471d;this[_0x1553b5(0x1ea)]=new EngageApiClient(_0x23fc7c);}['isUUID'](_0x5125cc){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x5125cc);}['normalizeCampaign'](_0x35f2d1){const _0x2571da=a87_0x39471d;return{'id':_0x35f2d1['id'],'name':_0x35f2d1['attributes'][_0x2571da(0x1f0)],'campaignType':_0x35f2d1['attributes'][_0x2571da(0x1e1)],'status':_0x35f2d1['attributes']['status'],'description':_0x35f2d1['attributes'][_0x2571da(0x215)],'workspaceId':_0x35f2d1[_0x2571da(0x204)][_0x2571da(0x1f7)],'audienceId':_0x35f2d1['attributes'][_0x2571da(0x1e5)],'audienceName':_0x35f2d1['attributes'][_0x2571da(0x1ec)],'segmentId':_0x35f2d1[_0x2571da(0x204)][_0x2571da(0x1f4)],'segmentName':_0x35f2d1['attributes']['segmentName'],'enableUtmTracking':_0x35f2d1[_0x2571da(0x204)][_0x2571da(0x1e3)],'createdAt':_0x35f2d1['attributes']['createdAt'],'updatedAt':_0x35f2d1[_0x2571da(0x204)][_0x2571da(0x200)],'launchedAt':_0x35f2d1[_0x2571da(0x204)][_0x2571da(0x222)]};}[a87_0x39471d(0x1ed)](_0x3cc049){const _0x3e5c13=a87_0x39471d;return{'id':_0x3cc049['id'],'name':_0x3cc049['attributes'][_0x3e5c13(0x1f0)],'subjectTemplate':_0x3cc049[_0x3e5c13(0x204)][_0x3e5c13(0x20c)],'workspaceId':_0x3cc049[_0x3e5c13(0x204)][_0x3e5c13(0x1f7)],'editorType':_0x3cc049['attributes'][_0x3e5c13(0x22a)],'createdAt':_0x3cc049[_0x3e5c13(0x204)][_0x3e5c13(0x20d)],'updatedAt':_0x3cc049[_0x3e5c13(0x204)][_0x3e5c13(0x200)]};}[a87_0x39471d(0x1e4)](_0x1a0769){const _0x953a85=a87_0x39471d;return{'id':_0x1a0769['id'],'name':_0x1a0769[_0x953a85(0x204)]['name'],'description':_0x1a0769['attributes']['description'],'ownerName':_0x1a0769['attributes']['ownerUser'][_0x953a85(0x1f0)],'domainCount':_0x1a0769[_0x953a85(0x204)][_0x953a85(0x22b)]['applicableDomains'][_0x953a85(0x208)],'segmentCount':_0x1a0769[_0x953a85(0x204)][_0x953a85(0x22b)][_0x953a85(0x211)][_0x953a85(0x208)],'createdAt':_0x1a0769[_0x953a85(0x204)][_0x953a85(0x20d)],'updatedAt':_0x1a0769[_0x953a85(0x204)]['updatedAt']};}async[a87_0x39471d(0x227)](_0x304587,_0x341d64){const _0x2ecb4a=a87_0x39471d;if(this[_0x2ecb4a(0x21b)](_0x304587))try{return await this[_0x2ecb4a(0x1ea)][_0x2ecb4a(0x1ee)](_0x304587),_0x304587;}catch(_0x3841bc){if(_0x3841bc instanceof SDKError&&_0x3841bc[_0x2ecb4a(0x203)]===ErrorCode['NOT_FOUND'])throw new SDKError(ErrorCode[_0x2ecb4a(0x22c)],_0x2ecb4a(0x21c)+_0x304587,_0x3841bc,{'helpText':_0x2ecb4a(0x1fc)});throw _0x3841bc;}const _0x484fec=await this[_0x2ecb4a(0x1ea)][_0x2ecb4a(0x1fd)]({'workspaceId':_0x341d64}),_0xc5c5ef=Array[_0x2ecb4a(0x1f3)](_0x484fec['data'])?_0x484fec['data']:[_0x484fec[_0x2ecb4a(0x232)]],_0x371238=_0xc5c5ef[_0x2ecb4a(0x221)](_0xf782b3=>_0xf782b3[_0x2ecb4a(0x204)]['name']===_0x304587);if(_0x371238[_0x2ecb4a(0x208)]===0x0)throw new SDKError(ErrorCode[_0x2ecb4a(0x22c)],_0x2ecb4a(0x206)+_0x304587,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.'});if(_0x371238[_0x2ecb4a(0x208)]>0x1){const _0x146c9a=_0x371238[_0x2ecb4a(0x225)](_0x2381f5=>_0x2381f5['id'])['join'](',\x20');throw new SDKError(ErrorCode[_0x2ecb4a(0x231)],_0x2ecb4a(0x1e8)+_0x304587+'\x22:\x20'+_0x146c9a,undefined,{'helpText':_0x2ecb4a(0x229)});}return _0x371238[0x0]['id'];}async[a87_0x39471d(0x1fa)](_0x5a53e3,_0x11a7ef){const _0x1c19d8=a87_0x39471d;if(this[_0x1c19d8(0x21b)](_0x5a53e3))try{return await this[_0x1c19d8(0x1ea)][_0x1c19d8(0x1e7)](_0x5a53e3),_0x5a53e3;}catch(_0x413195){if(_0x413195 instanceof SDKError&&_0x413195[_0x1c19d8(0x203)]===ErrorCode[_0x1c19d8(0x22c)])throw new SDKError(ErrorCode[_0x1c19d8(0x22c)],_0x1c19d8(0x1f2)+_0x5a53e3,_0x413195,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});throw _0x413195;}const _0x21f19a=await this['client'][_0x1c19d8(0x1f6)]({'workspaceId':_0x11a7ef}),_0x3ee87b=Array['isArray'](_0x21f19a[_0x1c19d8(0x232)])?_0x21f19a[_0x1c19d8(0x232)]:[_0x21f19a['data']],_0x5d7da0=_0x3ee87b[_0x1c19d8(0x221)](_0x4d8984=>_0x4d8984['attributes'][_0x1c19d8(0x1f0)]===_0x5a53e3);if(_0x5d7da0[_0x1c19d8(0x208)]===0x0)throw new SDKError(ErrorCode[_0x1c19d8(0x22c)],'Email\x20template\x20not\x20found:\x20'+_0x5a53e3,undefined,{'helpText':_0x1c19d8(0x22e)});if(_0x5d7da0[_0x1c19d8(0x208)]>0x1){const _0x1d13ec=_0x5d7da0[_0x1c19d8(0x225)](_0x167d28=>_0x167d28['id'])[_0x1c19d8(0x20f)](',\x20');throw new SDKError(ErrorCode[_0x1c19d8(0x231)],_0x1c19d8(0x20b)+_0x5a53e3+_0x1c19d8(0x213)+_0x1d13ec,undefined,{'helpText':'Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.'});}return _0x5d7da0[0x0]['id'];}async[a87_0x39471d(0x219)](_0x12cea7){const _0x31ddc6=a87_0x39471d;if(this[_0x31ddc6(0x21b)](_0x12cea7))try{return await this[_0x31ddc6(0x1ea)][_0x31ddc6(0x224)](_0x12cea7),_0x12cea7;}catch(_0x58fb31){if(_0x58fb31 instanceof SDKError&&_0x58fb31['code']===ErrorCode['NOT_FOUND'])throw new SDKError(ErrorCode[_0x31ddc6(0x22c)],_0x31ddc6(0x217)+_0x12cea7,_0x58fb31,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});throw _0x58fb31;}const _0x241db2=await this[_0x31ddc6(0x1ea)][_0x31ddc6(0x1ef)]({'name':_0x12cea7}),_0x5496a0=Array[_0x31ddc6(0x1f3)](_0x241db2[_0x31ddc6(0x232)])?_0x241db2[_0x31ddc6(0x232)]:[_0x241db2['data']],_0x267a94=_0x5496a0[_0x31ddc6(0x221)](_0xd59743=>_0xd59743[_0x31ddc6(0x204)][_0x31ddc6(0x1f0)]===_0x12cea7);if(_0x267a94[_0x31ddc6(0x208)]===0x0)throw new SDKError(ErrorCode[_0x31ddc6(0x22c)],'Workspace\x20not\x20found:\x20'+_0x12cea7,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});if(_0x267a94[_0x31ddc6(0x208)]>0x1){const _0xe08edf=_0x267a94[_0x31ddc6(0x225)](_0x1e46a1=>_0x1e46a1['id'])[_0x31ddc6(0x20f)](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x31ddc6(0x1fb)+_0x12cea7+'\x22:\x20'+_0xe08edf,undefined,{'helpText':_0x31ddc6(0x22f)});}return _0x267a94[0x0]['id'];}async[a87_0x39471d(0x1fd)](_0x560d52){const _0x1f1f07=a87_0x39471d,_0x31459b=await this[_0x1f1f07(0x1ea)][_0x1f1f07(0x1fd)]({'campaignType':_0x560d52?.[_0x1f1f07(0x223)],'status':_0x560d52?.[_0x1f1f07(0x21e)],'workspaceId':_0x560d52?.[_0x1f1f07(0x1f7)],'limit':_0x560d52?.['limit']}),_0x549e51=Array[_0x1f1f07(0x1f3)](_0x31459b[_0x1f1f07(0x232)])?_0x31459b[_0x1f1f07(0x232)]:[_0x31459b['data']];return _0x549e51[_0x1f1f07(0x225)](_0x5c95fd=>this[_0x1f1f07(0x1eb)](_0x5c95fd));}async[a87_0x39471d(0x1ee)](_0x5335bb,_0x3b4485){const _0x56cfa3=a87_0x39471d,_0x3d168b=await this[_0x56cfa3(0x227)](_0x5335bb,_0x3b4485),_0x2b577d=await this[_0x56cfa3(0x1ea)][_0x56cfa3(0x1ee)](_0x3d168b);return this[_0x56cfa3(0x1eb)](_0x2b577d[_0x56cfa3(0x232)]);}async[a87_0x39471d(0x21f)](_0x2ff8d3,_0x285697){const _0x3b5bdf=a87_0x39471d,_0x2a6ee4=await this[_0x3b5bdf(0x227)](_0x2ff8d3,_0x285697),_0x5cdfc1=await this[_0x3b5bdf(0x1ea)][_0x3b5bdf(0x1ee)](_0x2a6ee4);return _0x5cdfc1[_0x3b5bdf(0x232)];}async[a87_0x39471d(0x22d)](_0x199ebb){const _0x3dfdc2=a87_0x39471d,_0x536024=await this[_0x3dfdc2(0x1ea)][_0x3dfdc2(0x22d)](_0x199ebb);return this[_0x3dfdc2(0x1eb)](_0x536024[_0x3dfdc2(0x232)]);}async[a87_0x39471d(0x1ff)](_0x4bff16,_0x417bc4,_0x4accf6){const _0x23ea7f=a87_0x39471d,_0x38e0e7=await this['resolveCampaignId'](_0x4bff16,_0x4accf6),_0x5423cf=await this[_0x23ea7f(0x1ea)][_0x23ea7f(0x1ff)](_0x38e0e7,_0x417bc4);return this[_0x23ea7f(0x1eb)](_0x5423cf[_0x23ea7f(0x232)]);}async[a87_0x39471d(0x212)](_0x2f8cb6,_0x201841){const _0x1f0e78=a87_0x39471d,_0x3e8360=await this[_0x1f0e78(0x227)](_0x2f8cb6,_0x201841);await this[_0x1f0e78(0x1ea)]['deleteCampaign'](_0x3e8360);}async[a87_0x39471d(0x228)](_0x997e10,_0x777af6){const _0x40b22e=a87_0x39471d,_0x3f99e4=await this[_0x40b22e(0x227)](_0x997e10,_0x777af6);await this['client'][_0x40b22e(0x228)](_0x3f99e4);}async[a87_0x39471d(0x1f8)](_0x3086a8,_0x281639){const _0x3939ce=a87_0x39471d,_0x142d91=await this[_0x3939ce(0x227)](_0x3086a8,_0x281639);await this[_0x3939ce(0x1ea)][_0x3939ce(0x1f8)](_0x142d91);}async[a87_0x39471d(0x230)](_0x8504a9,_0x5b9f78){const _0x46c509=a87_0x39471d,_0x29ce3d=await this[_0x46c509(0x227)](_0x8504a9,_0x5b9f78);await this['client'][_0x46c509(0x230)](_0x29ce3d);}async['duplicateCampaign'](_0x3e3933,_0x4e282a){const _0x560bb7=a87_0x39471d,_0x28f1b0=await this[_0x560bb7(0x227)](_0x3e3933,_0x4e282a),_0x4a01ea=await this['client'][_0x560bb7(0x209)](_0x28f1b0);return this[_0x560bb7(0x1eb)](_0x4a01ea['data']);}async[a87_0x39471d(0x1f6)](_0x16b273){const _0x11cafb=a87_0x39471d,_0x2c9545=await this['client'][_0x11cafb(0x1f6)]({'workspaceId':_0x16b273?.['workspaceId'],'limit':_0x16b273?.['limit']}),_0x2af39a=Array[_0x11cafb(0x1f3)](_0x2c9545['data'])?_0x2c9545['data']:[_0x2c9545[_0x11cafb(0x232)]];return _0x2af39a['map'](_0x593d71=>this[_0x11cafb(0x1ed)](_0x593d71));}async['getTemplate'](_0x59498e,_0x17a4d9){const _0x24b7a0=a87_0x39471d,_0x3b3dd2=await this[_0x24b7a0(0x1fa)](_0x59498e,_0x17a4d9),_0xfda4a1=await this['client']['getTemplate'](_0x3b3dd2);return this[_0x24b7a0(0x1ed)](_0xfda4a1[_0x24b7a0(0x232)]);}async[a87_0x39471d(0x226)](_0x3cb007,_0x43579d){const _0x405427=a87_0x39471d,_0xe1d821=await this[_0x405427(0x1fa)](_0x3cb007,_0x43579d),_0x5ebcde=await this['client']['getTemplate'](_0xe1d821);return _0x5ebcde[_0x405427(0x232)];}async[a87_0x39471d(0x21d)](_0x3f4121){const _0x33ec73=a87_0x39471d,_0xb57e87=await this[_0x33ec73(0x1ea)]['createTemplate'](_0x3f4121);return this[_0x33ec73(0x1ed)](_0xb57e87[_0x33ec73(0x232)]);}async[a87_0x39471d(0x207)](_0x5b8cc2,_0x32f361,_0x3f849c){const _0x3211ea=a87_0x39471d,_0x467a94=await this[_0x3211ea(0x1fa)](_0x5b8cc2,_0x3f849c),_0x39526a=await this[_0x3211ea(0x1ea)][_0x3211ea(0x207)](_0x467a94,_0x32f361);return this[_0x3211ea(0x1ed)](_0x39526a[_0x3211ea(0x232)]);}async[a87_0x39471d(0x20e)](_0x4c4bdd,_0x102e4f){const _0x1c7d1e=a87_0x39471d,_0x407999=await this[_0x1c7d1e(0x1fa)](_0x4c4bdd,_0x102e4f);await this[_0x1c7d1e(0x1ea)]['deleteTemplate'](_0x407999);}async[a87_0x39471d(0x1ef)](_0x5556f1){const _0x4e8aac=a87_0x39471d,_0x17900c=await this[_0x4e8aac(0x1ea)]['listWorkspaces']({'name':_0x5556f1?.['name'],'limit':_0x5556f1?.[_0x4e8aac(0x201)]}),_0x49bd2c=Array[_0x4e8aac(0x1f3)](_0x17900c[_0x4e8aac(0x232)])?_0x17900c['data']:[_0x17900c[_0x4e8aac(0x232)]];return _0x49bd2c[_0x4e8aac(0x225)](_0x7e4b2c=>this[_0x4e8aac(0x1e4)](_0x7e4b2c));}async[a87_0x39471d(0x224)](_0x39a7a2){const _0xb23120=a87_0x39471d,_0x30382d=await this[_0xb23120(0x219)](_0x39a7a2),_0x3a0f89=await this[_0xb23120(0x1ea)][_0xb23120(0x224)](_0x30382d);return this[_0xb23120(0x1e4)](_0x3a0f89[_0xb23120(0x232)]);}async[a87_0x39471d(0x220)](_0x451bad){const _0x18a413=a87_0x39471d,_0x33667f=await this[_0x18a413(0x219)](_0x451bad),_0x556bd0=await this[_0x18a413(0x1ea)][_0x18a413(0x224)](_0x33667f);return _0x556bd0[_0x18a413(0x232)];}async[a87_0x39471d(0x1f9)](_0x3e91f9){const _0x315990=a87_0x39471d,_0x2937d1=await this[_0x315990(0x1ea)]['createWorkspace'](_0x3e91f9);return this[_0x315990(0x1e4)](_0x2937d1['data']);}async[a87_0x39471d(0x1f5)](_0x246d32,_0x155418){const _0x3f1a92=a87_0x39471d,_0x30c775=await this[_0x3f1a92(0x219)](_0x246d32),_0x2d5b0d=await this[_0x3f1a92(0x1ea)][_0x3f1a92(0x1f5)](_0x30c775,_0x155418);return this['normalizeWorkspace'](_0x2d5b0d[_0x3f1a92(0x232)]);}async[a87_0x39471d(0x1e2)](_0x1fd1f4){const _0x2e091f=a87_0x39471d,_0x291d28=await this[_0x2e091f(0x219)](_0x1fd1f4);await this[_0x2e091f(0x1ea)][_0x2e091f(0x1e2)](_0x291d28);}}
|
|
1
|
+
const a87_0x159294=a87_0x41d5;function a87_0x41d5(_0x1de13e,_0xfc04f0){_0x1de13e=_0x1de13e-0x126;const _0x199fc4=a87_0x199f();let _0x41d5a2=_0x199fc4[_0x1de13e];return _0x41d5a2;}(function(_0x338a65,_0x31af75){const _0x5e75bd=a87_0x41d5,_0x63c0d0=_0x338a65();while(!![]){try{const _0x5a430a=-parseInt(_0x5e75bd(0x132))/0x1*(-parseInt(_0x5e75bd(0x137))/0x2)+-parseInt(_0x5e75bd(0x14f))/0x3*(parseInt(_0x5e75bd(0x138))/0x4)+-parseInt(_0x5e75bd(0x162))/0x5+-parseInt(_0x5e75bd(0x145))/0x6+-parseInt(_0x5e75bd(0x148))/0x7*(parseInt(_0x5e75bd(0x146))/0x8)+-parseInt(_0x5e75bd(0x13f))/0x9+parseInt(_0x5e75bd(0x12a))/0xa*(parseInt(_0x5e75bd(0x160))/0xb);if(_0x5a430a===_0x31af75)break;else _0x63c0d0['push'](_0x63c0d0['shift']());}catch(_0x204d10){_0x63c0d0['push'](_0x63c0d0['shift']());}}}(a87_0x199f,0x1ca5d));function a87_0x199f(){const _0x122317=['Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.','resolveCampaignId','launchedAt','resolveWorkspaceId','type','map','campaignType','Campaign\x20not\x20found:\x20','getTemplate','editorType','5907890gXNlcl','description','isUUID','status','updateCampaign','limit','segmentId','join','1zShGap','data','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','Multiple\x20campaigns\x20found\x20with\x20name\x20\x22','Campaign\x20not\x20found\x20with\x20ID:\x20','206846LCLppA','20YWWShl','client','listWorkspaces','applicableParentSegments','getWorkspace','getWorkspaceFull','updatedAt','729099QlROfx','getTemplateFull','createTemplate','createCampaign','isArray','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.','1192692ntvvqw','16bUGiTf','deleteTemplate','52703JRKzca','NOT_FOUND','audienceName','Email\x20template\x20not\x20found\x20with\x20ID:\x20','pauseCampaign','length','resumeCampaign','78633jGgPCy','listCampaigns','resolveTemplateId','filter','normalizeWorkspace','code','INVALID_ARGUMENT','listTemplates','applicableDomains','segmentName','workspaceId','updateTemplate','duplicateCampaign','launchCampaign','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.','enableUtmTracking','Multiple\x20workspaces\x20found\x20with\x20name\x20\x22','11KvLrvX','\x22:\x20','754825zkWlNA','normalizeTemplate','name','Workspace\x20not\x20found\x20with\x20ID:\x20','getCampaignFull','attributes','normalizeCampaign','createWorkspace','updateWorkspace','Email\x20template\x20not\x20found:\x20','createdAt','deleteCampaign','getCampaign'];a87_0x199f=function(){return _0x122317;};return a87_0x199f();}import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';export class EngageSDK{[a87_0x159294(0x139)];constructor(_0x1cd015){this['client']=new EngageApiClient(_0x1cd015);}[a87_0x159294(0x12c)](_0x5418e3){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x5418e3);}['normalizeCampaign'](_0x51168b){const _0x4ccd94=a87_0x159294;return{'id':_0x51168b['id'],'name':_0x51168b['attributes'][_0x4ccd94(0x164)],'campaignType':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x126)],'status':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x12d)],'description':_0x51168b['attributes'][_0x4ccd94(0x12b)],'workspaceId':_0x51168b['attributes'][_0x4ccd94(0x159)],'audienceId':_0x51168b['attributes']['audienceId'],'audienceName':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x14a)],'segmentId':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x130)],'segmentName':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x158)],'enableUtmTracking':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x15e)],'createdAt':_0x51168b[_0x4ccd94(0x167)]['createdAt'],'updatedAt':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x13e)],'launchedAt':_0x51168b[_0x4ccd94(0x167)][_0x4ccd94(0x171)]};}['normalizeTemplate'](_0x3b256c){const _0x233057=a87_0x159294;return{'id':_0x3b256c['id'],'name':_0x3b256c[_0x233057(0x167)][_0x233057(0x164)],'subjectTemplate':_0x3b256c[_0x233057(0x167)]['subjectTemplate'],'workspaceId':_0x3b256c[_0x233057(0x167)]['workspaceId'],'editorType':_0x3b256c[_0x233057(0x167)][_0x233057(0x129)],'createdAt':_0x3b256c[_0x233057(0x167)][_0x233057(0x16c)],'updatedAt':_0x3b256c[_0x233057(0x167)]['updatedAt']};}[a87_0x159294(0x153)](_0xc2081a){const _0x141f8f=a87_0x159294;return{'id':_0xc2081a['id'],'name':_0xc2081a['attributes'][_0x141f8f(0x164)],'description':_0xc2081a[_0x141f8f(0x167)][_0x141f8f(0x12b)],'ownerName':_0xc2081a[_0x141f8f(0x167)]['ownerUser']['name'],'domainCount':_0xc2081a['attributes']['workspaceConfig'][_0x141f8f(0x157)][_0x141f8f(0x14d)],'segmentCount':_0xc2081a['attributes']['workspaceConfig'][_0x141f8f(0x13b)][_0x141f8f(0x14d)],'createdAt':_0xc2081a[_0x141f8f(0x167)][_0x141f8f(0x16c)],'updatedAt':_0xc2081a[_0x141f8f(0x167)][_0x141f8f(0x13e)]};}async[a87_0x159294(0x170)](_0x4df857,_0x526129){const _0x5050a8=a87_0x159294;if(this['isUUID'](_0x4df857))try{return await this[_0x5050a8(0x139)][_0x5050a8(0x16e)](_0x4df857),_0x4df857;}catch(_0x4003a5){if(_0x4003a5 instanceof SDKError&&_0x4003a5[_0x5050a8(0x154)]===ErrorCode[_0x5050a8(0x149)])throw new SDKError(ErrorCode['NOT_FOUND'],_0x5050a8(0x136)+_0x4df857,_0x4003a5,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.'});throw _0x4003a5;}const _0x57f285=await this[_0x5050a8(0x139)]['listCampaigns']({'workspaceId':_0x526129}),_0x1353d7=Array[_0x5050a8(0x143)](_0x57f285[_0x5050a8(0x133)])?_0x57f285[_0x5050a8(0x133)]:[_0x57f285[_0x5050a8(0x133)]],_0x455288=_0x1353d7['filter'](_0x1280f6=>_0x1280f6[_0x5050a8(0x167)][_0x5050a8(0x164)]===_0x4df857);if(_0x455288[_0x5050a8(0x14d)]===0x0)throw new SDKError(ErrorCode[_0x5050a8(0x149)],_0x5050a8(0x127)+_0x4df857,undefined,{'helpText':_0x5050a8(0x134)});if(_0x455288[_0x5050a8(0x14d)]>0x1){const _0x483f1b=_0x455288[_0x5050a8(0x174)](_0x525891=>_0x525891['id'])[_0x5050a8(0x131)](',\x20');throw new SDKError(ErrorCode[_0x5050a8(0x155)],_0x5050a8(0x135)+_0x4df857+_0x5050a8(0x161)+_0x483f1b,undefined,{'helpText':_0x5050a8(0x15d)});}return _0x455288[0x0]['id'];}async['resolveTemplateId'](_0x481697,_0x16c1d4){const _0x280fee=a87_0x159294;if(this['isUUID'](_0x481697))try{return await this[_0x280fee(0x139)]['getTemplate'](_0x481697),_0x481697;}catch(_0xb34ff4){if(_0xb34ff4 instanceof SDKError&&_0xb34ff4[_0x280fee(0x154)]===ErrorCode[_0x280fee(0x149)])throw new SDKError(ErrorCode[_0x280fee(0x149)],_0x280fee(0x14b)+_0x481697,_0xb34ff4,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});throw _0xb34ff4;}const _0x2cf2f3=await this['client'][_0x280fee(0x156)]({'workspaceId':_0x16c1d4}),_0x46926f=Array[_0x280fee(0x143)](_0x2cf2f3['data'])?_0x2cf2f3[_0x280fee(0x133)]:[_0x2cf2f3[_0x280fee(0x133)]],_0x4ebd23=_0x46926f[_0x280fee(0x152)](_0x3ed02e=>_0x3ed02e[_0x280fee(0x167)][_0x280fee(0x164)]===_0x481697);if(_0x4ebd23['length']===0x0)throw new SDKError(ErrorCode[_0x280fee(0x149)],_0x280fee(0x16b)+_0x481697,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});if(_0x4ebd23[_0x280fee(0x14d)]>0x1){const _0x30b06b=_0x4ebd23['map'](_0x4871d0=>_0x4871d0['id'])[_0x280fee(0x131)](',\x20');throw new SDKError(ErrorCode[_0x280fee(0x155)],'Multiple\x20templates\x20found\x20with\x20name\x20\x22'+_0x481697+'\x22:\x20'+_0x30b06b,undefined,{'helpText':_0x280fee(0x144)});}return _0x4ebd23[0x0]['id'];}async[a87_0x159294(0x172)](_0x4c3a99){const _0x4984db=a87_0x159294;if(this['isUUID'](_0x4c3a99))try{return await this[_0x4984db(0x139)][_0x4984db(0x13c)](_0x4c3a99),_0x4c3a99;}catch(_0xc85c8a){if(_0xc85c8a instanceof SDKError&&_0xc85c8a[_0x4984db(0x154)]===ErrorCode['NOT_FOUND'])throw new SDKError(ErrorCode[_0x4984db(0x149)],_0x4984db(0x165)+_0x4c3a99,_0xc85c8a,{'helpText':_0x4984db(0x16f)});throw _0xc85c8a;}const _0x17ec56=await this[_0x4984db(0x139)][_0x4984db(0x13a)]({'name':_0x4c3a99}),_0x3f9dca=Array[_0x4984db(0x143)](_0x17ec56[_0x4984db(0x133)])?_0x17ec56[_0x4984db(0x133)]:[_0x17ec56[_0x4984db(0x133)]],_0x2895a0=_0x3f9dca[_0x4984db(0x152)](_0x55698b=>_0x55698b[_0x4984db(0x167)][_0x4984db(0x164)]===_0x4c3a99);if(_0x2895a0[_0x4984db(0x14d)]===0x0)throw new SDKError(ErrorCode[_0x4984db(0x149)],'Workspace\x20not\x20found:\x20'+_0x4c3a99,undefined,{'helpText':_0x4984db(0x16f)});if(_0x2895a0[_0x4984db(0x14d)]>0x1){const _0xf1f629=_0x2895a0[_0x4984db(0x174)](_0x4da038=>_0x4da038['id'])[_0x4984db(0x131)](',\x20');throw new SDKError(ErrorCode[_0x4984db(0x155)],_0x4984db(0x15f)+_0x4c3a99+_0x4984db(0x161)+_0xf1f629,undefined,{'helpText':'Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.'});}return _0x2895a0[0x0]['id'];}async[a87_0x159294(0x150)](_0x13f88c){const _0x518295=a87_0x159294,_0x23f284=await this[_0x518295(0x139)][_0x518295(0x150)]({'campaignType':_0x13f88c?.[_0x518295(0x173)],'status':_0x13f88c?.[_0x518295(0x12d)],'workspaceId':_0x13f88c?.[_0x518295(0x159)],'limit':_0x13f88c?.[_0x518295(0x12f)]}),_0x296da4=Array[_0x518295(0x143)](_0x23f284[_0x518295(0x133)])?_0x23f284[_0x518295(0x133)]:[_0x23f284[_0x518295(0x133)]];return _0x296da4[_0x518295(0x174)](_0x48681c=>this[_0x518295(0x168)](_0x48681c));}async['getCampaign'](_0x241982,_0x519661){const _0x5240d1=a87_0x159294,_0x1c36f1=await this[_0x5240d1(0x170)](_0x241982,_0x519661),_0x575444=await this[_0x5240d1(0x139)][_0x5240d1(0x16e)](_0x1c36f1);return this[_0x5240d1(0x168)](_0x575444[_0x5240d1(0x133)]);}async[a87_0x159294(0x166)](_0x320411,_0x4dc8a2){const _0x5d4329=a87_0x159294,_0x170734=await this[_0x5d4329(0x170)](_0x320411,_0x4dc8a2),_0x4d31cf=await this[_0x5d4329(0x139)]['getCampaign'](_0x170734);return _0x4d31cf[_0x5d4329(0x133)];}async[a87_0x159294(0x142)](_0x2826e2){const _0x4121f1=a87_0x159294,_0x3b6761=await this[_0x4121f1(0x139)][_0x4121f1(0x142)](_0x2826e2);return this['normalizeCampaign'](_0x3b6761[_0x4121f1(0x133)]);}async[a87_0x159294(0x12e)](_0x4e3462,_0x909ddd,_0x208626){const _0x1b95af=a87_0x159294,_0x1ab2d2=await this[_0x1b95af(0x170)](_0x4e3462,_0x208626),_0xf75d9f=await this[_0x1b95af(0x139)][_0x1b95af(0x12e)](_0x1ab2d2,_0x909ddd);return this[_0x1b95af(0x168)](_0xf75d9f[_0x1b95af(0x133)]);}async['deleteCampaign'](_0x3bb07e,_0x130bb3){const _0x3a0bec=a87_0x159294,_0x531482=await this[_0x3a0bec(0x170)](_0x3bb07e,_0x130bb3);await this[_0x3a0bec(0x139)][_0x3a0bec(0x16d)](_0x531482);}async[a87_0x159294(0x15c)](_0x5214b6,_0x214605){const _0x3e9902=a87_0x159294,_0x19f2a3=await this[_0x3e9902(0x170)](_0x5214b6,_0x214605);await this['client'][_0x3e9902(0x15c)](_0x19f2a3);}async[a87_0x159294(0x14c)](_0x23376e,_0x192e86){const _0x10dff7=a87_0x159294,_0x368d14=await this[_0x10dff7(0x170)](_0x23376e,_0x192e86);await this[_0x10dff7(0x139)][_0x10dff7(0x14c)](_0x368d14);}async['resumeCampaign'](_0x2e14e8,_0x3a9619){const _0x4625b5=a87_0x159294,_0x303020=await this[_0x4625b5(0x170)](_0x2e14e8,_0x3a9619);await this['client'][_0x4625b5(0x14e)](_0x303020);}async[a87_0x159294(0x15b)](_0x5db050,_0x2c1c3d){const _0x3b3a9e=a87_0x159294,_0x5aa07d=await this[_0x3b3a9e(0x170)](_0x5db050,_0x2c1c3d),_0x42fa02=await this[_0x3b3a9e(0x139)][_0x3b3a9e(0x15b)](_0x5aa07d);return this['normalizeCampaign'](_0x42fa02[_0x3b3a9e(0x133)]);}async[a87_0x159294(0x156)](_0x3d5e9d){const _0x3366f0=a87_0x159294,_0x38d383=await this[_0x3366f0(0x139)][_0x3366f0(0x156)]({'workspaceId':_0x3d5e9d?.[_0x3366f0(0x159)],'limit':_0x3d5e9d?.[_0x3366f0(0x12f)]}),_0x497863=Array['isArray'](_0x38d383['data'])?_0x38d383[_0x3366f0(0x133)]:[_0x38d383[_0x3366f0(0x133)]];return _0x497863[_0x3366f0(0x174)](_0x9b1e88=>this[_0x3366f0(0x163)](_0x9b1e88));}async[a87_0x159294(0x128)](_0x428b6f,_0x381667){const _0x5f5d25=a87_0x159294,_0x5885be=await this[_0x5f5d25(0x151)](_0x428b6f,_0x381667),_0x1292d7=await this['client']['getTemplate'](_0x5885be);return this['normalizeTemplate'](_0x1292d7['data']);}async[a87_0x159294(0x140)](_0x181f4a,_0x1539f6){const _0x13799a=a87_0x159294,_0x2169d3=await this[_0x13799a(0x151)](_0x181f4a,_0x1539f6),_0x30a6e1=await this[_0x13799a(0x139)][_0x13799a(0x128)](_0x2169d3);return _0x30a6e1[_0x13799a(0x133)];}async[a87_0x159294(0x141)](_0x3cab7a){const _0x1c632e=a87_0x159294,_0x5ba568=await this[_0x1c632e(0x139)][_0x1c632e(0x141)](_0x3cab7a);return this[_0x1c632e(0x163)](_0x5ba568['data']);}async[a87_0x159294(0x15a)](_0x159d65,_0xce93d3,_0x49aa08){const _0x62f1da=a87_0x159294,_0x121fd2=await this[_0x62f1da(0x151)](_0x159d65,_0x49aa08),_0x1eebaf=await this['client']['updateTemplate'](_0x121fd2,_0xce93d3);return this['normalizeTemplate'](_0x1eebaf['data']);}async[a87_0x159294(0x147)](_0x97378f,_0x217764){const _0x4c40ed=a87_0x159294,_0x6db179=await this['resolveTemplateId'](_0x97378f,_0x217764);await this[_0x4c40ed(0x139)][_0x4c40ed(0x147)](_0x6db179);}async[a87_0x159294(0x13a)](_0x2ea692){const _0x28b797=a87_0x159294,_0x5ac836=await this[_0x28b797(0x139)][_0x28b797(0x13a)]({'name':_0x2ea692?.[_0x28b797(0x164)],'limit':_0x2ea692?.[_0x28b797(0x12f)]}),_0x4d0492=Array[_0x28b797(0x143)](_0x5ac836[_0x28b797(0x133)])?_0x5ac836['data']:[_0x5ac836[_0x28b797(0x133)]];return _0x4d0492[_0x28b797(0x174)](_0x23c54d=>this['normalizeWorkspace'](_0x23c54d));}async[a87_0x159294(0x13c)](_0x20a8ad){const _0x3d4990=a87_0x159294,_0x515b4e=await this['resolveWorkspaceId'](_0x20a8ad),_0x2ff654=await this['client'][_0x3d4990(0x13c)](_0x515b4e);return this[_0x3d4990(0x153)](_0x2ff654['data']);}async[a87_0x159294(0x13d)](_0x2a5b2e){const _0xadd69a=a87_0x159294,_0x1966e5=await this['resolveWorkspaceId'](_0x2a5b2e),_0x3204c4=await this['client']['getWorkspace'](_0x1966e5);return _0x3204c4[_0xadd69a(0x133)];}async[a87_0x159294(0x169)](_0x533fbd){const _0xac2e5b=a87_0x159294,_0x1a6168=await this[_0xac2e5b(0x139)]['createWorkspace'](_0x533fbd);return this[_0xac2e5b(0x153)](_0x1a6168['data']);}async[a87_0x159294(0x16a)](_0x3249f3,_0x3d2fd9){const _0x2eb5c1=a87_0x159294,_0x1849cb=await this[_0x2eb5c1(0x172)](_0x3249f3),_0xa376b9=await this['client'][_0x2eb5c1(0x16a)](_0x1849cb,_0x3d2fd9);return this[_0x2eb5c1(0x153)](_0xa376b9[_0x2eb5c1(0x133)]);}async['deleteWorkspace'](_0x48ba98){const _0x36251b=a87_0x159294,_0x383046=await this[_0x36251b(0x172)](_0x48ba98);await this['client']['deleteWorkspace'](_0x383046);}}
|
package/dist/sdk/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a88_0x1af7cd=a88_0x2626;function a88_0x2626(_0x461563,_0x5819a9){_0x461563=_0x461563-0x145;const _0x404a9c=a88_0x404a();let _0x262621=_0x404a9c[_0x461563];return _0x262621;}(function(_0x3c3593,_0x25eab3){const _0x2e5eea=a88_0x2626,_0x555cc6=_0x3c3593();while(!![]){try{const _0x51e9d7=-parseInt(_0x2e5eea(0x188))/0x1+-parseInt(_0x2e5eea(0x174))/0x2+-parseInt(_0x2e5eea(0x150))/0x3*(-parseInt(_0x2e5eea(0x171))/0x4)+parseInt(_0x2e5eea(0x18f))/0x5+parseInt(_0x2e5eea(0x152))/0x6+parseInt(_0x2e5eea(0x14a))/0x7+-parseInt(_0x2e5eea(0x17f))/0x8;if(_0x51e9d7===_0x25eab3)break;else _0x555cc6['push'](_0x555cc6['shift']());}catch(_0x4b3df4){_0x555cc6['push'](_0x555cc6['shift']());}}}(a88_0x404a,0xa6f03));export var ErrorCategory;(function(_0x478ab2){const _0x2a82fe=a88_0x2626;_0x478ab2[_0x2a82fe(0x18d)]=_0x2a82fe(0x18d),_0x478ab2[_0x2a82fe(0x180)]='INTERNAL_ERROR';}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;(function(_0x53e155){const _0xd72f9=a88_0x2626;_0x53e155[_0xd72f9(0x181)]=_0xd72f9(0x181),_0x53e155[_0xd72f9(0x182)]='INVALID_ARGUMENT',_0x53e155[_0xd72f9(0x145)]=_0xd72f9(0x145),_0x53e155[_0xd72f9(0x168)]=_0xd72f9(0x168),_0x53e155[_0xd72f9(0x14b)]='TABLE_NOT_FOUND',_0x53e155[_0xd72f9(0x185)]=_0xd72f9(0x185),_0x53e155[_0xd72f9(0x158)]=_0xd72f9(0x158),_0x53e155['WORKFLOW_PROJECT_NOT_FOUND']=_0xd72f9(0x173),_0x53e155[_0xd72f9(0x149)]=_0xd72f9(0x149),_0x53e155[_0xd72f9(0x15a)]=_0xd72f9(0x15a),_0x53e155[_0xd72f9(0x167)]=_0xd72f9(0x167),_0x53e155[_0xd72f9(0x159)]=_0xd72f9(0x159),_0x53e155[_0xd72f9(0x15d)]=_0xd72f9(0x15d),_0x53e155['SEGMENT_FOLDER_NOT_FOUND']=_0xd72f9(0x177),_0x53e155[_0xd72f9(0x18c)]=_0xd72f9(0x18c),_0x53e155[_0xd72f9(0x17d)]=_0xd72f9(0x17d),_0x53e155[_0xd72f9(0x18b)]='ACTIVATION_SYNTAX_ERROR',_0x53e155[_0xd72f9(0x191)]='ACTIVATION_UPDATE_ERROR',_0x53e155['CONNECTOR_INVALID_CONFIG']=_0xd72f9(0x155),_0x53e155[_0xd72f9(0x15c)]=_0xd72f9(0x15c),_0x53e155['JOURNEY_NOT_FOUND']='JOURNEY_NOT_FOUND',_0x53e155[_0xd72f9(0x154)]=_0xd72f9(0x154),_0x53e155[_0xd72f9(0x156)]=_0xd72f9(0x156),_0x53e155[_0xd72f9(0x15e)]=_0xd72f9(0x15e),_0x53e155['AGENT_UPDATE_ERROR']=_0xd72f9(0x178),_0x53e155[_0xd72f9(0x189)]=_0xd72f9(0x189),_0x53e155[_0xd72f9(0x15b)]=_0xd72f9(0x15b),_0x53e155['COMMAND_NOT_FOUND']=_0xd72f9(0x16b),_0x53e155['CLAUDE_CODE_NOT_FOUND']=_0xd72f9(0x16e),_0x53e155[_0xd72f9(0x176)]=_0xd72f9(0x176),_0x53e155['INSTALLATION_FAILED']='INSTALLATION_FAILED',_0x53e155['PERMISSION_DENIED']='PERMISSION_DENIED',_0x53e155[_0xd72f9(0x18a)]=_0xd72f9(0x18a),_0x53e155[_0xd72f9(0x169)]='ALREADY_EXISTS',_0x53e155[_0xd72f9(0x187)]=_0xd72f9(0x187),_0x53e155[_0xd72f9(0x16c)]=_0xd72f9(0x16c),_0x53e155[_0xd72f9(0x183)]=_0xd72f9(0x183),_0x53e155['TRINO_SYNTAX_ERROR']=_0xd72f9(0x17e),_0x53e155[_0xd72f9(0x16f)]='TRINO_NOT_FOUND',_0x53e155['TRINO_INVALID_ARGUMENT']='TRINO_INVALID_ARGUMENT',_0x53e155[_0xd72f9(0x179)]=_0xd72f9(0x179),_0x53e155[_0xd72f9(0x184)]=_0xd72f9(0x184),_0x53e155['TIMEOUT']=_0xd72f9(0x165),_0x53e155[_0xd72f9(0x163)]='HTTP_REQUEST_FAILURE',_0x53e155[_0xd72f9(0x190)]=_0xd72f9(0x190),_0x53e155[_0xd72f9(0x172)]=_0xd72f9(0x172),_0x53e155[_0xd72f9(0x162)]=_0xd72f9(0x162),_0x53e155[_0xd72f9(0x160)]=_0xd72f9(0x160),_0x53e155[_0xd72f9(0x16a)]=_0xd72f9(0x16a),_0x53e155['LLM_MALFORMED_MESSAGE']=_0xd72f9(0x17b),_0x53e155[_0xd72f9(0x147)]=_0xd72f9(0x147),_0x53e155['LLM_CHAT_CREATION_FAILURE']='LLM_CHAT_CREATION_FAILURE';}(ErrorCode||(ErrorCode={})));const ERROR_CODE_CATEGORY={[ErrorCode['MISSING_ARGUMENT']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x182)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x145)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['DATABASE_NOT_FOUND']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x14b)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x185)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['AGENT_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x173)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x149)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x15a)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x167)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x159)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x15d)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x177)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x18c)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x17d)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x18b)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['ACTIVATION_UPDATE_ERROR']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x155)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x15c)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x153)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x154)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['JOURNEY_UPDATE_ERROR']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x15e)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x178)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x189)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x15b)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['COMMAND_NOT_FOUND']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x16e)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x176)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x164)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x175)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x18a)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x169)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x187)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x16c)]]:ErrorCategory['USER_ERROR'],[ErrorCode['INVALID_PROFILE_CONFIG']]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x1af7cd(0x17e)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode[a88_0x1af7cd(0x16f)]]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['TRINO_INVALID_ARGUMENT']]:ErrorCategory[a88_0x1af7cd(0x18d)],[ErrorCode['TRINO_USER_CANCELLED']]:ErrorCategory['USER_ERROR'],[ErrorCode['UNAVAILABLE']]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x165)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a88_0x1af7cd(0x163)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode['PROXY_CONNECTION_FAILURE']]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x172)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x162)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x160)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x16a)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a88_0x1af7cd(0x17b)]]:ErrorCategory[a88_0x1af7cd(0x180)],[ErrorCode[a88_0x1af7cd(0x147)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a88_0x1af7cd(0x14d)]]:ErrorCategory[a88_0x1af7cd(0x180)]};export function getErrorCategory(_0x1636a7){return ERROR_CODE_CATEGORY[_0x1636a7];}export function isRetryableError(_0x38fafd){const _0x5e8ad3=a88_0x1af7cd;return getErrorCategory(_0x38fafd)===ErrorCategory[_0x5e8ad3(0x180)];}export class SDKError extends Error{[a88_0x1af7cd(0x18e)];[a88_0x1af7cd(0x16d)];[a88_0x1af7cd(0x170)];constructor(_0x270eee,_0x4ecf20,_0x4b4a61,_0x3e83ad){const _0x274d12=a88_0x1af7cd;super('['+_0x270eee+']\x20'+_0x4ecf20),this[_0x274d12(0x166)]='SDKError',this['code']=_0x270eee,this['helpText']=_0x3e83ad?.['helpText'],this[_0x274d12(0x170)]=_0x4b4a61,_0x4b4a61 instanceof Error&&(this[_0x274d12(0x14e)]=this[_0x274d12(0x14e)]+'\x0aCaused\x20by:\x20'+_0x4b4a61['stack']);}get[a88_0x1af7cd(0x157)](){const _0x3171b7=a88_0x1af7cd;return getErrorCategory(this[_0x3171b7(0x18e)]);}[a88_0x1af7cd(0x186)](){const _0x2b4c31=a88_0x1af7cd;return isRetryableError(this[_0x2b4c31(0x18e)]);}[a88_0x1af7cd(0x146)](){const _0x129c3d=a88_0x1af7cd;return this[_0x129c3d(0x157)]===ErrorCategory['USER_ERROR'];}[a88_0x1af7cd(0x151)](){const _0x110afe=a88_0x1af7cd;return this[_0x110afe(0x157)]===ErrorCategory[_0x110afe(0x180)];}get[a88_0x1af7cd(0x161)](){const _0x36e1ed=a88_0x1af7cd;return this[_0x36e1ed(0x17a)][_0x36e1ed(0x14c)](/^\[.*?\]\s*/,'');}}function a88_0x404a(){const _0x41349e=['AGENT_EVALUATION_ERROR','UNAUTHENTICATED','ACTIVATION_SYNTAX_ERROR','SEGMENT_SYNTAX_ERROR','USER_ERROR','code','1362615HgqOpm','PROXY_CONNECTION_FAILURE','ACTIVATION_UPDATE_ERROR','NOT_FOUND','isUserError','LLM_STREAM_ERROR','status','WORKFLOW_SECRET_NOT_FOUND','1151052oskmXv','TABLE_NOT_FOUND','replace','LLM_CHAT_CREATION_FAILURE','stack','includes','9AXzENn','isInternalError','6322116EHCkws','JOURNEY_NOT_FOUND','JOURNEY_SYNTAX_ERROR','CONNECTOR_INVALID_CONFIG','JOURNEY_UPDATE_ERROR','category','AGENT_NOT_FOUND','CONNECTION_NOT_FOUND','WORKFLOW_ARCHIVE_CORRUPTED','LLM_EMPTY_MESSAGE','CONNECTOR_SCHEMA_NOT_FOUND','SEGMENT_NOT_FOUND','AGENT_SYNTAX_ERROR','some','TRINO_INTERNAL_ERROR','originalMessage','RATE_LIMITED','HTTP_REQUEST_FAILURE','INSTALLATION_FAILED','TIMEOUT','name','CHAT_NOT_FOUND','DATABASE_NOT_FOUND','ALREADY_EXISTS','TRINO_INSUFFICIENT_RESOURCES','COMMAND_NOT_FOUND','INVALID_REQUEST','helpText','CLAUDE_CODE_NOT_FOUND','TRINO_NOT_FOUND','cause','73624npJcnM','INTERNAL','WORKFLOW_PROJECT_NOT_FOUND','425990KmqfsX','PERMISSION_DENIED','CLAUDE_CODE_UNSUPPORTED_VERSION','SEGMENT_FOLDER_NOT_FOUND','AGENT_UPDATE_ERROR','TRINO_USER_CANCELLED','message','LLM_MALFORMED_MESSAGE','Unknown\x20error','SEGMENT_UPDATE_ERROR','TRINO_SYNTAX_ERROR','3491920OKtFFU','INTERNAL_ERROR','MISSING_ARGUMENT','INVALID_ARGUMENT','INVALID_PROFILE_CONFIG','UNAVAILABLE','LLM_PROJECT_NOT_FOUND','isRetryable','CANCELLED','212599TwoXoq'];a88_0x404a=function(){return _0x41349e;};return a88_0x404a();}export function isHttp400Error(_0x25a0c8){const _0x33c201=a88_0x1af7cd;if(!_0x25a0c8)return![];const _0x1a0614=_0x25a0c8;if(_0x1a0614[_0x33c201(0x148)]===0x190)return!![];const _0x28168d=_0x25a0c8?.[_0x33c201(0x17a)]||'';if(_0x28168d[_0x33c201(0x14f)]('HTTP\x20400'))return!![];const _0x212557=_0x25a0c8;if(_0x212557[_0x33c201(0x170)])return isHttp400Error(_0x212557[_0x33c201(0x170)]);return![];}export function isHttp404Error(_0x204b3f){const _0x14c4cb=a88_0x1af7cd;if(!_0x204b3f)return![];const _0xbdb66d=_0x204b3f;if(_0xbdb66d[_0x14c4cb(0x148)]===0x194)return!![];const _0x38452a=_0x204b3f?.[_0x14c4cb(0x17a)]||'';if(_0x38452a[_0x14c4cb(0x14f)]('404')||_0x38452a['includes']('Record\x20not\x20found'))return!![];const _0x3d1394=_0x204b3f;if(_0x3d1394[_0x14c4cb(0x170)])return isHttp404Error(_0x3d1394[_0x14c4cb(0x170)]);return![];}export function getErrorMessage(_0x111e1a){const _0x587df1=a88_0x1af7cd;if(!_0x111e1a)return _0x587df1(0x17c);if(_0x111e1a instanceof SDKError)return _0x111e1a[_0x587df1(0x161)];if(_0x111e1a instanceof Error)return _0x111e1a[_0x587df1(0x17a)][_0x587df1(0x14c)](/^\[.*?\]\s*/,'');return String(_0x111e1a);}export function errorContains(_0x1fc796,..._0x55a9d1){const _0x54ece6=a88_0x1af7cd,_0x9fa79d=_0x1fc796?.[_0x54ece6(0x17a)]||'',_0x490f75=_0x1fc796?.[_0x54ece6(0x170)],_0x3bc35e=_0x490f75?.[_0x54ece6(0x17a)]||'';return _0x55a9d1[_0x54ece6(0x15f)](_0x758b2b=>_0x9fa79d['includes'](_0x758b2b)||_0x3bc35e[_0x54ece6(0x14f)](_0x758b2b));}
|
|
1
|
+
const a88_0x5c4cff=a88_0x171c;(function(_0x252550,_0x582b5){const _0x42e36d=a88_0x171c,_0x119481=_0x252550();while(!![]){try{const _0x31f645=parseInt(_0x42e36d(0x16b))/0x1+parseInt(_0x42e36d(0x15a))/0x2+-parseInt(_0x42e36d(0x146))/0x3+-parseInt(_0x42e36d(0x174))/0x4*(-parseInt(_0x42e36d(0x179))/0x5)+-parseInt(_0x42e36d(0x14a))/0x6*(parseInt(_0x42e36d(0x161))/0x7)+parseInt(_0x42e36d(0x156))/0x8+-parseInt(_0x42e36d(0x151))/0x9;if(_0x31f645===_0x582b5)break;else _0x119481['push'](_0x119481['shift']());}catch(_0x50af36){_0x119481['push'](_0x119481['shift']());}}}(a88_0x3ba1,0x7aab7));export var ErrorCategory;(function(_0x3388c8){const _0x378eca=a88_0x171c;_0x3388c8['USER_ERROR']='USER_ERROR',_0x3388c8[_0x378eca(0x147)]=_0x378eca(0x147);}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;(function(_0x504bc1){const _0x523657=a88_0x171c;_0x504bc1[_0x523657(0x17b)]=_0x523657(0x17b),_0x504bc1[_0x523657(0x163)]=_0x523657(0x163),_0x504bc1[_0x523657(0x142)]='NOT_FOUND',_0x504bc1[_0x523657(0x14d)]=_0x523657(0x14d),_0x504bc1['TABLE_NOT_FOUND']=_0x523657(0x16d),_0x504bc1[_0x523657(0x14b)]=_0x523657(0x14b),_0x504bc1[_0x523657(0x16c)]=_0x523657(0x16c),_0x504bc1[_0x523657(0x17c)]=_0x523657(0x17c),_0x504bc1['WORKFLOW_SECRET_NOT_FOUND']='WORKFLOW_SECRET_NOT_FOUND',_0x504bc1[_0x523657(0x16a)]='WORKFLOW_ARCHIVE_CORRUPTED',_0x504bc1[_0x523657(0x15f)]='CHAT_NOT_FOUND',_0x504bc1[_0x523657(0x181)]='CONNECTION_NOT_FOUND',_0x504bc1[_0x523657(0x13b)]=_0x523657(0x13b),_0x504bc1[_0x523657(0x177)]=_0x523657(0x177),_0x504bc1[_0x523657(0x148)]='SEGMENT_SYNTAX_ERROR',_0x504bc1[_0x523657(0x16f)]=_0x523657(0x16f),_0x504bc1[_0x523657(0x172)]='ACTIVATION_SYNTAX_ERROR',_0x504bc1[_0x523657(0x15c)]=_0x523657(0x15c),_0x504bc1[_0x523657(0x17f)]=_0x523657(0x17f),_0x504bc1['CONNECTOR_SCHEMA_NOT_FOUND']='CONNECTOR_SCHEMA_NOT_FOUND',_0x504bc1[_0x523657(0x158)]=_0x523657(0x158),_0x504bc1[_0x523657(0x14f)]=_0x523657(0x14f),_0x504bc1[_0x523657(0x168)]='JOURNEY_UPDATE_ERROR',_0x504bc1[_0x523657(0x180)]=_0x523657(0x180),_0x504bc1[_0x523657(0x183)]=_0x523657(0x183),_0x504bc1[_0x523657(0x160)]=_0x523657(0x160),_0x504bc1[_0x523657(0x149)]=_0x523657(0x149),_0x504bc1[_0x523657(0x185)]=_0x523657(0x185),_0x504bc1[_0x523657(0x13f)]=_0x523657(0x13f),_0x504bc1[_0x523657(0x155)]=_0x523657(0x155),_0x504bc1['INSTALLATION_FAILED']=_0x523657(0x15b),_0x504bc1[_0x523657(0x17e)]='PERMISSION_DENIED',_0x504bc1[_0x523657(0x165)]=_0x523657(0x165),_0x504bc1[_0x523657(0x169)]=_0x523657(0x169),_0x504bc1[_0x523657(0x141)]=_0x523657(0x141),_0x504bc1[_0x523657(0x14c)]='INVALID_REQUEST',_0x504bc1[_0x523657(0x139)]='INVALID_PROFILE_CONFIG',_0x504bc1['TRINO_SYNTAX_ERROR']=_0x523657(0x152),_0x504bc1[_0x523657(0x143)]=_0x523657(0x143),_0x504bc1[_0x523657(0x166)]=_0x523657(0x166),_0x504bc1[_0x523657(0x159)]=_0x523657(0x159),_0x504bc1[_0x523657(0x15d)]='UNAVAILABLE',_0x504bc1[_0x523657(0x175)]='TIMEOUT',_0x504bc1[_0x523657(0x14e)]='HTTP_REQUEST_FAILURE',_0x504bc1[_0x523657(0x170)]='PROXY_CONNECTION_FAILURE',_0x504bc1[_0x523657(0x162)]=_0x523657(0x162),_0x504bc1[_0x523657(0x13d)]=_0x523657(0x13d),_0x504bc1[_0x523657(0x176)]=_0x523657(0x176),_0x504bc1[_0x523657(0x153)]=_0x523657(0x153),_0x504bc1['LLM_MALFORMED_MESSAGE']=_0x523657(0x145),_0x504bc1[_0x523657(0x182)]=_0x523657(0x182),_0x504bc1['LLM_CHAT_CREATION_FAILURE']=_0x523657(0x13e);}(ErrorCode||(ErrorCode={})));const ERROR_CODE_CATEGORY={[ErrorCode[a88_0x5c4cff(0x17b)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x163)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['NOT_FOUND']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x14d)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x16d)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x14b)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x16c)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x17c)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x167)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x16a)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode['CHAT_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode['CONNECTION_NOT_FOUND']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x13b)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x177)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x148)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x16f)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x172)]]:ErrorCategory['USER_ERROR'],[ErrorCode['ACTIVATION_UPDATE_ERROR']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x17f)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x154)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x158)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['JOURNEY_SYNTAX_ERROR']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x168)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x180)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['AGENT_UPDATE_ERROR']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x160)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x149)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x185)]]:ErrorCategory['USER_ERROR'],[ErrorCode['CLAUDE_CODE_NOT_FOUND']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x155)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x15b)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['PERMISSION_DENIED']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x165)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x169)]]:ErrorCategory['USER_ERROR'],[ErrorCode['CANCELLED']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['INVALID_REQUEST']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x139)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x152)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a88_0x5c4cff(0x143)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode['TRINO_INVALID_ARGUMENT']]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x159)]]:ErrorCategory[a88_0x5c4cff(0x17d)],[ErrorCode[a88_0x5c4cff(0x15d)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode['TIMEOUT']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a88_0x5c4cff(0x14e)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode['PROXY_CONNECTION_FAILURE']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a88_0x5c4cff(0x162)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x13d)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x176)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x153)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x145)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x182)]]:ErrorCategory[a88_0x5c4cff(0x147)],[ErrorCode[a88_0x5c4cff(0x13e)]]:ErrorCategory[a88_0x5c4cff(0x147)]};export function getErrorCategory(_0x35c6e4){return ERROR_CODE_CATEGORY[_0x35c6e4];}function a88_0x171c(_0xed6ce0,_0x10b51f){_0xed6ce0=_0xed6ce0-0x139;const _0x3ba13f=a88_0x3ba1();let _0x171c0d=_0x3ba13f[_0xed6ce0];return _0x171c0d;}export function isRetryableError(_0x3a1ad4){const _0x8cd417=a88_0x5c4cff;return getErrorCategory(_0x3a1ad4)===ErrorCategory[_0x8cd417(0x147)];}export class SDKError extends Error{['code'];['helpText'];[a88_0x5c4cff(0x144)];constructor(_0x4cd927,_0x9965f4,_0x4a5f1b,_0x5b364f){const _0xf77b8e=a88_0x5c4cff;super('['+_0x4cd927+']\x20'+_0x9965f4),this['name']='SDKError',this['code']=_0x4cd927,this[_0xf77b8e(0x173)]=_0x5b364f?.[_0xf77b8e(0x173)],this[_0xf77b8e(0x144)]=_0x4a5f1b,_0x4a5f1b instanceof Error&&(this['stack']=this[_0xf77b8e(0x178)]+_0xf77b8e(0x150)+_0x4a5f1b[_0xf77b8e(0x178)]);}get[a88_0x5c4cff(0x17a)](){const _0x3a41ad=a88_0x5c4cff;return getErrorCategory(this[_0x3a41ad(0x157)]);}['isRetryable'](){const _0x36c696=a88_0x5c4cff;return isRetryableError(this[_0x36c696(0x157)]);}['isUserError'](){const _0x6b803c=a88_0x5c4cff;return this['category']===ErrorCategory[_0x6b803c(0x17d)];}[a88_0x5c4cff(0x140)](){const _0x3465d7=a88_0x5c4cff;return this[_0x3465d7(0x17a)]===ErrorCategory[_0x3465d7(0x147)];}get['originalMessage'](){const _0x537628=a88_0x5c4cff;return this[_0x537628(0x15e)]['replace'](/^\[.*?\]\s*/,'');}}export function isHttp400Error(_0x57ee2a){const _0x2add9d=a88_0x5c4cff;if(!_0x57ee2a)return![];const _0x3585c2=_0x57ee2a;if(_0x3585c2['status']===0x190)return!![];const _0x180dea=_0x57ee2a?.[_0x2add9d(0x15e)]||'';if(_0x180dea[_0x2add9d(0x184)](_0x2add9d(0x16e)))return!![];const _0x43a46a=_0x57ee2a;if(_0x43a46a['cause'])return isHttp400Error(_0x43a46a['cause']);return![];}export function isHttp404Error(_0x5ce511){const _0x4a2681=a88_0x5c4cff;if(!_0x5ce511)return![];const _0x19c481=_0x5ce511;if(_0x19c481[_0x4a2681(0x13c)]===0x194)return!![];const _0x4c964d=_0x5ce511?.[_0x4a2681(0x15e)]||'';if(_0x4c964d[_0x4a2681(0x184)](_0x4a2681(0x13a))||_0x4c964d[_0x4a2681(0x184)](_0x4a2681(0x171)))return!![];const _0x403979=_0x5ce511;if(_0x403979[_0x4a2681(0x144)])return isHttp404Error(_0x403979[_0x4a2681(0x144)]);return![];}export function getErrorMessage(_0x3791dc){const _0x1382c3=a88_0x5c4cff;if(!_0x3791dc)return _0x1382c3(0x186);if(_0x3791dc instanceof SDKError)return _0x3791dc['originalMessage'];if(_0x3791dc instanceof Error)return _0x3791dc[_0x1382c3(0x15e)][_0x1382c3(0x164)](/^\[.*?\]\s*/,'');return String(_0x3791dc);}export function errorContains(_0xa42b34,..._0x8bd50e){const _0x58c84f=a88_0x5c4cff,_0x4a627a=_0xa42b34?.['message']||'',_0x23c55a=_0xa42b34?.[_0x58c84f(0x144)],_0xeb2e25=_0x23c55a?.[_0x58c84f(0x15e)]||'';return _0x8bd50e['some'](_0x5e0bcf=>_0x4a627a[_0x58c84f(0x184)](_0x5e0bcf)||_0xeb2e25['includes'](_0x5e0bcf));}function a88_0x3ba1(){const _0x1311a1=['CLAUDE_CODE_UNSUPPORTED_VERSION','6146832NUiyzF','code','JOURNEY_NOT_FOUND','TRINO_USER_CANCELLED','1045148zMlrAA','INSTALLATION_FAILED','ACTIVATION_UPDATE_ERROR','UNAVAILABLE','message','CHAT_NOT_FOUND','AGENT_EVALUATION_ERROR','152579eIbGKr','INTERNAL','INVALID_ARGUMENT','replace','UNAUTHENTICATED','TRINO_INVALID_ARGUMENT','WORKFLOW_SECRET_NOT_FOUND','JOURNEY_UPDATE_ERROR','ALREADY_EXISTS','WORKFLOW_ARCHIVE_CORRUPTED','145367DlKiwZ','AGENT_NOT_FOUND','TABLE_NOT_FOUND','HTTP\x20400','SEGMENT_UPDATE_ERROR','PROXY_CONNECTION_FAILURE','Record\x20not\x20found','ACTIVATION_SYNTAX_ERROR','helpText','582188dbnzAQ','TIMEOUT','TRINO_INTERNAL_ERROR','SEGMENT_FOLDER_NOT_FOUND','stack','10vrnFCY','category','MISSING_ARGUMENT','WORKFLOW_PROJECT_NOT_FOUND','USER_ERROR','PERMISSION_DENIED','CONNECTOR_INVALID_CONFIG','AGENT_SYNTAX_ERROR','CONNECTION_NOT_FOUND','LLM_STREAM_ERROR','AGENT_UPDATE_ERROR','includes','COMMAND_NOT_FOUND','Unknown\x20error','INVALID_PROFILE_CONFIG','404','SEGMENT_NOT_FOUND','status','RATE_LIMITED','LLM_CHAT_CREATION_FAILURE','CLAUDE_CODE_NOT_FOUND','isInternalError','CANCELLED','NOT_FOUND','TRINO_NOT_FOUND','cause','LLM_MALFORMED_MESSAGE','1490799Cubgpo','INTERNAL_ERROR','SEGMENT_SYNTAX_ERROR','LLM_EMPTY_MESSAGE','42pxGSLr','LLM_PROJECT_NOT_FOUND','INVALID_REQUEST','DATABASE_NOT_FOUND','HTTP_REQUEST_FAILURE','JOURNEY_SYNTAX_ERROR','\x0aCaused\x20by:\x20','5178798WglrRv','TRINO_SYNTAX_ERROR','TRINO_INSUFFICIENT_RESOURCES','CONNECTOR_SCHEMA_NOT_FOUND'];a88_0x3ba1=function(){return _0x1311a1;};return a88_0x3ba1();}
|
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x472760=a89_0x11b1;(function(_0x10749b,_0x3b0555){const _0x195bf8=a89_0x11b1,_0x14dd4a=_0x10749b();while(!![]){try{const _0x5bc678=parseInt(_0x195bf8(0x1ed))/0x1*(parseInt(_0x195bf8(0x1ea))/0x2)+-parseInt(_0x195bf8(0x1f4))/0x3+-parseInt(_0x195bf8(0x1fb))/0x4*(parseInt(_0x195bf8(0x1f9))/0x5)+parseInt(_0x195bf8(0x1fd))/0x6+-parseInt(_0x195bf8(0x1f6))/0x7+parseInt(_0x195bf8(0x1ff))/0x8+parseInt(_0x195bf8(0x1e6))/0x9*(parseInt(_0x195bf8(0x206))/0xa);if(_0x5bc678===_0x3b0555)break;else _0x14dd4a['push'](_0x14dd4a['shift']());}catch(_0x1760e3){_0x14dd4a['push'](_0x14dd4a['shift']());}}}(a89_0x412f,0x3b7da));function a89_0x412f(){const _0x16f7a3=['715977DIxuYo','init','973364BvqAXf','workflow','us01','5YkBztU','query','1226492yCxiXh','segment','2767722pHgFvj','context','2897712WsEain','llm','connection','realtime','personalization','proxy','jobs','24930kobrLV','9qadMGb','schedules','_tdxInstance','logLevel','44SMTuCP','journey','apiKey','4637YNAktj','api','isInitialized','engage','catch','user','INFO'];a89_0x412f=function(){return _0x16f7a3;};return a89_0x412f();}import{loadUserConfigOnce,getAPIKey,loadGlobalProxy}from'../core/config.js';function a89_0x11b1(_0x3eefe5,_0x15f51e){_0x3eefe5=_0x3eefe5-0x1e6;const _0x412f7e=a89_0x412f();let _0x11b11b=_0x412f7e[_0x3eefe5];return _0x11b11b;}import{SegmentSDK}from'./segment.js';import{JourneySDK}from'./journey.js';import{WorkflowSDK}from'./workflow/index.js';import{LLMSDK}from'./llm/index.js';import{JobSDK}from'./job.js';import{UserSDK}from'./user.js';import{RawAPI}from'./api.js';import{QuerySDK}from'./query/index.js';import{EngageSDK}from'./engage.js';import{ConnectionSDK}from'./connection.js';import{ScheduleSDK}from'./schedule.js';import{RealtimeSDK}from'./realtime.js';import{PersonalizationSDK}from'./personalization.js';import{Logger,LogLevel,FileHandler,DefaultLogFormatter}from'../utils/logger/index.js';export*from'./errors.js';export*from'./segment.js';export*from'./segment/parent-segment-preview.js';export*from'./journey.js';export*from'./workflow/index.js';export*from'./llm/index.js';export*from'./job.js';export*from'./user.js';export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./connection.js';export*from'./schedule.js';export*from'./realtime.js';export*from'./personalization.js';export{Logger,LogLevel}from'../utils/logger/index.js';export{getLLMProxyEndpoint,getConsoleUrl,getEndpoint,LLM_PROXY_ENDPOINTS}from'./client/endpoints.js';export class TDX{[a89_0x472760(0x1fe)];[a89_0x472760(0x1fa)];[a89_0x472760(0x1fc)];[a89_0x472760(0x1eb)];['workflow'];[a89_0x472760(0x200)];[a89_0x472760(0x205)];[a89_0x472760(0x1f2)];[a89_0x472760(0x1f0)];[a89_0x472760(0x201)];[a89_0x472760(0x1e7)];[a89_0x472760(0x202)];[a89_0x472760(0x203)];['api'];static['create'](_0x4a1259={}){const _0x564896=a89_0x472760,_0x1108b7=_0x4a1259['site']||_0x564896(0x1f8),_0x4d8d2c=_0x4a1259[_0x564896(0x1e9)]??LogLevel[_0x564896(0x1f3)],_0x547d64=_0x4a1259['profile'];let _0x325419=_0x4a1259[_0x564896(0x1ec)];!_0x325419&&(loadUserConfigOnce(),_0x325419=getAPIKey(_0x547d64));let _0x406fcc=_0x4a1259[_0x564896(0x204)];return!_0x406fcc&&(_0x406fcc=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger[_0x564896(0x1ef)]()&&Logger[_0x564896(0x1f5)]({'defaultLevel':_0x4d8d2c,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x564896(0x1f1)](()=>{}),new TDX({'site':_0x1108b7,'apiKey':_0x325419,'logLevel':_0x4d8d2c,'profile':_0x547d64,'proxy':_0x406fcc});}constructor(_0x33bd98){const _0x3e22a1=a89_0x472760;this[_0x3e22a1(0x1fe)]=_0x33bd98,this['query']=new QuerySDK(_0x33bd98),this[_0x3e22a1(0x1fc)]=new SegmentSDK(_0x33bd98),this[_0x3e22a1(0x1eb)]=new JourneySDK(_0x33bd98),this[_0x3e22a1(0x1f7)]=new WorkflowSDK(_0x33bd98),this[_0x3e22a1(0x200)]=new LLMSDK(_0x33bd98),this['jobs']=new JobSDK(_0x33bd98),this[_0x3e22a1(0x1f2)]=new UserSDK(_0x33bd98),this[_0x3e22a1(0x1f0)]=new EngageSDK(_0x33bd98),this[_0x3e22a1(0x201)]=new ConnectionSDK(_0x33bd98),this[_0x3e22a1(0x1e7)]=new ScheduleSDK(_0x33bd98),this[_0x3e22a1(0x202)]=new RealtimeSDK(_0x33bd98),this['personalization']=new PersonalizationSDK(_0x33bd98),this[_0x3e22a1(0x1ee)]=new RawAPI(_0x33bd98),this[_0x3e22a1(0x1fc)][_0x3e22a1(0x1e8)]=this;}}
|
package/dist/sdk/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x13afe2,_0x29e229){var _0x30dcd2=a90_0x3141,_0x5cba50=_0x13afe2();while(!![]){try{var _0xb155f4=-parseInt(_0x30dcd2(0x1a2))/0x1*(-parseInt(_0x30dcd2(0x1a1))/0x2)+-parseInt(_0x30dcd2(0x1a4))/0x3*(parseInt(_0x30dcd2(0x19f))/0x4)+parseInt(_0x30dcd2(0x19e))/0x5+parseInt(_0x30dcd2(0x1a5))/0x6*(-parseInt(_0x30dcd2(0x1a0))/0x7)+-parseInt(_0x30dcd2(0x1a6))/0x8+-parseInt(_0x30dcd2(0x1a8))/0x9*(-parseInt(_0x30dcd2(0x1a7))/0xa)+parseInt(_0x30dcd2(0x1a3))/0xb*(parseInt(_0x30dcd2(0x19d))/0xc);if(_0xb155f4===_0x29e229)break;else _0x5cba50['push'](_0x5cba50['shift']());}catch(_0x21a182){_0x5cba50['push'](_0x5cba50['shift']());}}}(a90_0x1657,0xd3322));export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';function a90_0x3141(_0x1f7177,_0x4aca1c){_0x1f7177=_0x1f7177-0x19d;var _0x165796=a90_0x1657();var _0x3141d5=_0x165796[_0x1f7177];return _0x3141d5;}function a90_0x1657(){var _0x314c7d=['2187126bCXkSH','10976744pnCLTV','3136870TmyrJx','27kLSDOm','20508480cLJRxf','2542865vYiMEv','4501444zqHHhM','7XyOxTY','11482CzTvmg','99OTUJXb','11LOLUOF','3QajbBV'];a90_0x1657=function(){return _0x314c7d;};return a90_0x1657();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x2632d4=a91_0x3189;(function(_0x2ad6c5,_0x4b7b75){const _0x35769e=a91_0x3189,_0x2089e2=_0x2ad6c5();while(!![]){try{const _0x160282=-parseInt(_0x35769e(0x141))/0x1*(parseInt(_0x35769e(0x149))/0x2)+-parseInt(_0x35769e(0x145))/0x3*(parseInt(_0x35769e(0x14b))/0x4)+parseInt(_0x35769e(0x14c))/0x5*(parseInt(_0x35769e(0x14d))/0x6)+parseInt(_0x35769e(0x146))/0x7*(parseInt(_0x35769e(0x14e))/0x8)+parseInt(_0x35769e(0x148))/0x9+-parseInt(_0x35769e(0x150))/0xa+-parseInt(_0x35769e(0x151))/0xb*(-parseInt(_0x35769e(0x143))/0xc);if(_0x160282===_0x4b7b75)break;else _0x2089e2['push'](_0x2089e2['shift']());}catch(_0x21f62f){_0x2089e2['push'](_0x2089e2['shift']());}}}(a91_0x1867,0xe22d8));import*as a91_0x4b25eb from'node:fs';function a91_0x1867(){const _0x5d9847=['unlink','utf-8','16897IkLRGI','readFile','5976xjEsrB','readdirSync','3zZZFbl','266847OhCPmy','writeFile','3665664jFBkyl','18maaMtx','isDirectory','5293616jmhxGS','24065qhgNtx','144XuDurq','88YFvwnJ','mkdir','16084160BOfTwZ','67771wEosyE','existsSync','access','isFile'];a91_0x1867=function(){return _0x5d9847;};return a91_0x1867();}import*as a91_0x3e877f from'node:fs/promises';function a91_0x3189(_0x48f4c6,_0xe6c7b6){_0x48f4c6=_0x48f4c6-0x140;const _0x1867c2=a91_0x1867();let _0x31896a=_0x1867c2[_0x48f4c6];return _0x31896a;}export const nodeFileSystem={'readFile':_0x48c94a=>a91_0x3e877f[a91_0x2632d4(0x142)](_0x48c94a,a91_0x2632d4(0x140)),'writeFile':(_0x4cc8ef,_0x1f6dc3)=>a91_0x3e877f[a91_0x2632d4(0x147)](_0x4cc8ef,_0x1f6dc3,a91_0x2632d4(0x140)),'exists':async _0xdaac8d=>{const _0x3a8a72=a91_0x2632d4;try{return await a91_0x3e877f[_0x3a8a72(0x153)](_0xdaac8d),!![];}catch{return![];}},'mkdir':async(_0x4be67a,_0x29833e)=>{const _0x1b535e=a91_0x2632d4;await a91_0x3e877f[_0x1b535e(0x14f)](_0x4be67a,_0x29833e);},'readdir':_0x2e891a=>a91_0x3e877f['readdir'](_0x2e891a),'stat':async _0x148685=>{const _0x9cf99e=a91_0x2632d4,_0x3ebc50=await a91_0x3e877f['stat'](_0x148685);return{'isDirectory':()=>_0x3ebc50[_0x9cf99e(0x14a)](),'isFile':()=>_0x3ebc50['isFile']()};},'unlink':_0x94aac4=>a91_0x3e877f[a91_0x2632d4(0x155)](_0x94aac4)};export const nodeFileSystemSync={'readFileSync':_0x50843a=>a91_0x4b25eb['readFileSync'](_0x50843a,'utf-8'),'writeFileSync':(_0x217fcd,_0x1e072e)=>a91_0x4b25eb['writeFileSync'](_0x217fcd,_0x1e072e,a91_0x2632d4(0x140)),'existsSync':_0x43b001=>a91_0x4b25eb[a91_0x2632d4(0x152)](_0x43b001),'mkdirSync':(_0x4eed55,_0x4ef6f3)=>{a91_0x4b25eb['mkdirSync'](_0x4eed55,_0x4ef6f3);},'readdirSync':_0x5745c0=>a91_0x4b25eb[a91_0x2632d4(0x144)](_0x5745c0),'statSync':_0xff6250=>{const _0x44099b=a91_0x2632d4,_0x4f7668=a91_0x4b25eb['statSync'](_0xff6250);return{'isDirectory':()=>_0x4f7668[_0x44099b(0x14a)](),'isFile':()=>_0x4f7668[_0x44099b(0x154)]()};},'unlinkSync':_0x37bf94=>a91_0x4b25eb['unlinkSync'](_0x37bf94)};
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x3cc0bc=a93_0x15ee;function a93_0x5452(){const _0x3bbe3c=['showJob','140LpVECO','146388uIMEpk','show','result','client','test','kill','replace','submit','getUserInfo','updated_at','listJobs','hive','63ckLwYh','start_at','list','getJobResult','1233pEJJYi','end_at','created_at','190672zODJdd','submitHiveJob','11864GMvIZf','4611aaCjLb','10ycLsfj','submitPrestoJob','cancelJob','859240PUnJxt','4175292DFtOBX','map','55272xgrJqR','trino'];a93_0x5452=function(){return _0x3bbe3c;};return a93_0x5452();}(function(_0x34a6a5,_0x47d17d){const _0x295719=a93_0x15ee,_0x51838f=_0x34a6a5();while(!![]){try{const _0x5d4ca2=parseInt(_0x295719(0x142))/0x1+-parseInt(_0x295719(0x145))/0x2*(-parseInt(_0x295719(0x13b))/0x3)+-parseInt(_0x295719(0x138))/0x4*(parseInt(_0x295719(0x13c))/0x5)+-parseInt(_0x295719(0x146))/0x6*(parseInt(_0x295719(0x152))/0x7)+parseInt(_0x295719(0x13a))/0x8*(-parseInt(_0x295719(0x135))/0x9)+parseInt(_0x295719(0x13f))/0xa+parseInt(_0x295719(0x140))/0xb;if(_0x5d4ca2===_0x47d17d)break;else _0x51838f['push'](_0x51838f['shift']());}catch(_0x3c6657){_0x51838f['push'](_0x51838f['shift']());}}}(a93_0x5452,0x1aebd));function a93_0x15ee(_0xa0d426,_0x27dc92){_0xa0d426=_0xa0d426-0x135;const _0x54529a=a93_0x5452();let _0x15ee7d=_0x54529a[_0xa0d426];return _0x15ee7d;}import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x2a3f7a){const _0x1c7581=a93_0x15ee;if(!_0x2a3f7a)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x1c7581(0x14a)](_0x2a3f7a))return _0x2a3f7a;return _0x2a3f7a[_0x1c7581(0x14c)]('\x20UTC','Z')[_0x1c7581(0x14c)]('\x20','T');}export class JobSDK{[a93_0x3cc0bc(0x149)];constructor(_0x2e1cf0){const _0xc07a4d=a93_0x3cc0bc;this[_0xc07a4d(0x149)]=new TDApiClient(_0x2e1cf0);}async[a93_0x3cc0bc(0x154)](_0x24da56){const _0x577682=a93_0x3cc0bc,_0x49cd3d=await this[_0x577682(0x149)][_0x577682(0x150)](_0x24da56);return _0x49cd3d[_0x577682(0x141)](_0x31ff13=>({..._0x31ff13,'created_at':normalizeTimestamp(_0x31ff13['created_at']),'updated_at':normalizeTimestamp(_0x31ff13[_0x577682(0x14f)]),'start_at':normalizeTimestamp(_0x31ff13[_0x577682(0x153)]),'end_at':normalizeTimestamp(_0x31ff13[_0x577682(0x136)])}));}async[a93_0x3cc0bc(0x147)](_0x9c3ce3){const _0x48a930=a93_0x3cc0bc,_0x268214=await this[_0x48a930(0x149)][_0x48a930(0x144)](_0x9c3ce3);return{..._0x268214,'created_at':normalizeTimestamp(_0x268214[_0x48a930(0x137)]),'updated_at':normalizeTimestamp(_0x268214[_0x48a930(0x14f)]),'start_at':normalizeTimestamp(_0x268214[_0x48a930(0x153)]),'end_at':normalizeTimestamp(_0x268214[_0x48a930(0x136)])};}async[a93_0x3cc0bc(0x14b)](_0x38258c){const _0x12dab5=a93_0x3cc0bc;await this[_0x12dab5(0x149)][_0x12dab5(0x13e)](_0x38258c);}async[a93_0x3cc0bc(0x14d)](_0x43d824,_0x20415f,_0x179864=a93_0x3cc0bc(0x143)){const _0x40d6c5=a93_0x3cc0bc;return _0x179864===_0x40d6c5(0x151)?await this[_0x40d6c5(0x149)][_0x40d6c5(0x139)](_0x43d824,_0x20415f):await this[_0x40d6c5(0x149)][_0x40d6c5(0x13d)](_0x43d824,_0x20415f);}async[a93_0x3cc0bc(0x148)](_0x38614a){const _0x575c11=a93_0x3cc0bc;return await this['client'][_0x575c11(0x155)](_0x38614a);}async['getUserInfo'](){const _0x39f014=a93_0x3cc0bc;return await this[_0x39f014(0x149)][_0x39f014(0x14e)]();}}
|