@treasuredata/tdx 2026.4.8 → 2026.4.9
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-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/policy-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/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/tools/work-create-item.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/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-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/oauth-refresh.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/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.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/policy.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/segment-validator.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/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.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/types/workspace.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/paginate.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/sdk/workspace/access-tracker.d.ts +2 -0
- package/dist/sdk/workspace/access-tracker.d.ts.map +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/access-tracker.js.map +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +2 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +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/process.d.ts +3 -0
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +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.d.ts +10 -2
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/package.json +1 -1
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x10dc55=a126_0x2ede;(function(_0x369ac4,_0x54d91f){const _0xcada43=a126_0x2ede,_0x5a6e9d=_0x369ac4();while(!![]){try{const _0xd8ee=-parseInt(_0xcada43(0x98))/0x1+parseInt(_0xcada43(0x7e))/0x2+parseInt(_0xcada43(0x9c))/0x3*(parseInt(_0xcada43(0x92))/0x4)+-parseInt(_0xcada43(0x8d))/0x5+parseInt(_0xcada43(0x83))/0x6*(-parseInt(_0xcada43(0x9b))/0x7)+parseInt(_0xcada43(0x97))/0x8*(-parseInt(_0xcada43(0x84))/0x9)+parseInt(_0xcada43(0x91))/0xa;if(_0xd8ee===_0x54d91f)break;else _0x5a6e9d['push'](_0x5a6e9d['shift']());}catch(_0x53a801){_0x5a6e9d['push'](_0x5a6e9d['shift']());}}}(a126_0x1ca3,0x208ca));import{loadUserConfigOnce,getAPIKey,getAccessToken,loadGlobalProxy,resolveSite}from'../core/config.js';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{DeliverySDK}from'./delivery.js';import{ConnectionSDK}from'./connection.js';import{ScheduleSDK}from'./schedule.js';import{RealtimeSDK}from'./realtime.js';import{PersonalizationSDK}from'./personalization.js';import{PolicySDK}from'./policy.js';import{CASSDK}from'./cas/index.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';function a126_0x2ede(_0x1163ac,_0x3cd1a8){_0x1163ac=_0x1163ac-0x7c;const _0x1ca33c=a126_0x1ca3();let _0x2ede31=_0x1ca33c[_0x1163ac];return _0x2ede31;}function a126_0x1ca3(){const _0xf55ae8=['5064500nqOrJR','4kKenxa','us01','segment','user','llm','48ulZLVo','132042DjWSMt','api','delivery','14GEpjJk','256686IrxzNr','schedules','logLevel','query','catch','realtime','context','30328QXWfjO','connection','policy','accessToken','timeout','413736SNnRFt','29871vzDnQm','apiKey','site','cas','engage','personalization','workflow','proxy','init','919930BoItMI','jobs','isInitialized','journey'];a126_0x1ca3=function(){return _0xf55ae8;};return a126_0x1ca3();}export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./delivery.js';export*from'./connection.js';export*from'./schedule.js';export*from'./realtime.js';export*from'./personalization.js';export*from'./policy.js';export*from'./cas/index.js';export{Logger,LogLevel}from'../utils/logger/index.js';export{WorkspaceSDK,resolveWorkspacePath}from'./workspace/index.js';export{getLLMProxyEndpoint,getConsoleUrl,getEndpoint,LLM_PROXY_ENDPOINTS}from'./client/endpoints.js';export class TDX{['context'];[a126_0x10dc55(0x9f)];[a126_0x10dc55(0x94)];['journey'];[a126_0x10dc55(0x8a)];[a126_0x10dc55(0x96)];[a126_0x10dc55(0x8e)];[a126_0x10dc55(0x95)];[a126_0x10dc55(0x88)];[a126_0x10dc55(0x9a)];[a126_0x10dc55(0x7f)];[a126_0x10dc55(0x9d)];[a126_0x10dc55(0x7c)];[a126_0x10dc55(0x89)];['policy'];[a126_0x10dc55(0x87)];['api'];static['create'](_0x59f9b0={}){const _0x29a9c1=a126_0x10dc55,_0x35e107=resolveSite(_0x59f9b0[_0x29a9c1(0x86)]||_0x29a9c1(0x93)),_0x505c4e=_0x59f9b0[_0x29a9c1(0x9e)]??LogLevel['INFO'],_0x597652=_0x59f9b0['profile'];let _0x35de09=_0x59f9b0[_0x29a9c1(0x81)];!_0x35de09&&(_0x35de09=getAccessToken(_0x597652));let _0x26ee45=_0x59f9b0[_0x29a9c1(0x85)];!_0x26ee45&&(loadUserConfigOnce(),_0x26ee45=getAPIKey(_0x597652));let _0x169453=_0x59f9b0[_0x29a9c1(0x8b)];return!_0x169453&&(_0x169453=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger[_0x29a9c1(0x8f)]()&&Logger[_0x29a9c1(0x8c)]({'defaultLevel':_0x505c4e,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x29a9c1(0xa0)](()=>{}),new TDX({'site':_0x35e107,'apiKey':_0x26ee45,'accessToken':_0x35de09,'logLevel':_0x505c4e,'profile':_0x597652,'proxy':_0x169453,'timeout':_0x59f9b0[_0x29a9c1(0x82)]});}constructor(_0x3c1559){const _0x37510d=a126_0x10dc55;this[_0x37510d(0x7d)]=_0x3c1559,this['query']=new QuerySDK(_0x3c1559),this[_0x37510d(0x94)]=new SegmentSDK(_0x3c1559),this[_0x37510d(0x90)]=new JourneySDK(_0x3c1559),this[_0x37510d(0x8a)]=new WorkflowSDK(_0x3c1559),this['llm']=new LLMSDK(_0x3c1559),this[_0x37510d(0x8e)]=new JobSDK(_0x3c1559),this['user']=new UserSDK(_0x3c1559),this[_0x37510d(0x88)]=new EngageSDK(_0x3c1559),this[_0x37510d(0x9a)]=new DeliverySDK(_0x3c1559),this[_0x37510d(0x7f)]=new ConnectionSDK(_0x3c1559),this['schedules']=new ScheduleSDK(_0x3c1559),this['realtime']=new RealtimeSDK(_0x3c1559),this[_0x37510d(0x89)]=new PersonalizationSDK(_0x3c1559),this[_0x37510d(0x80)]=new PolicySDK(_0x3c1559),this[_0x37510d(0x87)]=new CASSDK(_0x3c1559),this[_0x37510d(0x99)]=new RawAPI(_0x3c1559),this[_0x37510d(0x94)]['_tdxInstance']=this,this[_0x37510d(0x87)]['_connectionSDK']=this[_0x37510d(0x7f)];}}
|
package/dist/sdk/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4dfcde,_0x12b764){var _0x582a40=a127_0x29dc,_0x3c6a2f=_0x4dfcde();while(!![]){try{var _0x4907a6=-parseInt(_0x582a40(0x10f))/0x1+-parseInt(_0x582a40(0x113))/0x2*(-parseInt(_0x582a40(0x115))/0x3)+-parseInt(_0x582a40(0x111))/0x4+parseInt(_0x582a40(0x112))/0x5*(parseInt(_0x582a40(0x10d))/0x6)+-parseInt(_0x582a40(0x110))/0x7+-parseInt(_0x582a40(0x114))/0x8+parseInt(_0x582a40(0x10e))/0x9*(-parseInt(_0x582a40(0x10c))/0xa);if(_0x4907a6===_0x12b764)break;else _0x3c6a2f['push'](_0x3c6a2f['shift']());}catch(_0x4fc737){_0x3c6a2f['push'](_0x3c6a2f['shift']());}}}(a127_0x5656,0x8f6c6));export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';function a127_0x29dc(_0x51c000,_0x983286){_0x51c000=_0x51c000-0x10c;var _0x565620=a127_0x5656();var _0x29dccc=_0x565620[_0x51c000];return _0x29dccc;}function a127_0x5656(){var _0x19b48a=['10kFhkxh','30LHNksz','2113362BGObAe','283315Tmmuja','308364nlJzKD','692292zYGOdt','909215zxKukJ','14414qQxCaY','2976464eXMdrl','327fsLDpj'];a127_0x5656=function(){return _0x19b48a;};return a127_0x5656();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x37617a=a128_0x253c;(function(_0x159973,_0x42830c){const _0xb951ee=a128_0x253c,_0x17ed3e=_0x159973();while(!![]){try{const _0x5dca9b=parseInt(_0xb951ee(0xe3))/0x1*(-parseInt(_0xb951ee(0xdf))/0x2)+parseInt(_0xb951ee(0xf4))/0x3+parseInt(_0xb951ee(0xe4))/0x4*(parseInt(_0xb951ee(0xf3))/0x5)+parseInt(_0xb951ee(0xe5))/0x6*(-parseInt(_0xb951ee(0xef))/0x7)+parseInt(_0xb951ee(0xed))/0x8+-parseInt(_0xb951ee(0xee))/0x9+parseInt(_0xb951ee(0xe0))/0xa*(parseInt(_0xb951ee(0xe6))/0xb);if(_0x5dca9b===_0x42830c)break;else _0x17ed3e['push'](_0x17ed3e['shift']());}catch(_0x348e78){_0x17ed3e['push'](_0x17ed3e['shift']());}}}(a128_0x5b21,0x621b8));function a128_0x5b21(){const _0x547007=['isDirectory','4727120glpAWm','4897260ytFuVi','28odtdIG','writeFileSync','writeFile','readdirSync','35OTPwrr','765843KrehYb','unlinkSync','mkdir','unlink','7750uPWOMT','4345180TEacwi','statSync','stat','10aIPSrb','187212ZfhyGR','935358xxuRZF','11Yfxfxp','utf-8','access','isFile','readFileSync','readdir'];a128_0x5b21=function(){return _0x547007;};return a128_0x5b21();}import*as a128_0x2c86a9 from'node:fs';import*as a128_0x790909 from'node:fs/promises';function a128_0x253c(_0x21eb7a,_0x2451e8){_0x21eb7a=_0x21eb7a-0xde;const _0x5b21c0=a128_0x5b21();let _0x253c5d=_0x5b21c0[_0x21eb7a];return _0x253c5d;}export const nodeFileSystem={'readFile':_0x3d5f69=>a128_0x790909['readFile'](_0x3d5f69,'utf-8'),'writeFile':(_0xe49859,_0x3dfd8c)=>a128_0x790909[a128_0x37617a(0xf1)](_0xe49859,_0x3dfd8c,a128_0x37617a(0xe7)),'exists':async _0x273d8c=>{const _0x365743=a128_0x37617a;try{return await a128_0x790909[_0x365743(0xe8)](_0x273d8c),!![];}catch{return![];}},'mkdir':async(_0x36d94f,_0x16197c)=>{const _0x22b7ed=a128_0x37617a;await a128_0x790909[_0x22b7ed(0xf6)](_0x36d94f,_0x16197c);},'readdir':_0x3d9f4a=>a128_0x790909[a128_0x37617a(0xeb)](_0x3d9f4a),'stat':async _0x5a0fa8=>{const _0x537d87=a128_0x37617a,_0xea8279=await a128_0x790909[_0x537d87(0xe2)](_0x5a0fa8);return{'isDirectory':()=>_0xea8279[_0x537d87(0xec)](),'isFile':()=>_0xea8279[_0x537d87(0xe9)]()};},'unlink':_0x4a5b78=>a128_0x790909[a128_0x37617a(0xde)](_0x4a5b78)};export const nodeFileSystemSync={'readFileSync':_0x1bf231=>a128_0x2c86a9[a128_0x37617a(0xea)](_0x1bf231,a128_0x37617a(0xe7)),'writeFileSync':(_0x4c16ea,_0x5a7cc5)=>a128_0x2c86a9[a128_0x37617a(0xf0)](_0x4c16ea,_0x5a7cc5,'utf-8'),'existsSync':_0x4d61fb=>a128_0x2c86a9['existsSync'](_0x4d61fb),'mkdirSync':(_0x2f1e79,_0x786a5b)=>{a128_0x2c86a9['mkdirSync'](_0x2f1e79,_0x786a5b);},'readdirSync':_0x3e13b7=>a128_0x2c86a9[a128_0x37617a(0xf2)](_0x3e13b7),'statSync':_0x405224=>{const _0x5e49cd=a128_0x37617a,_0x5d8741=a128_0x2c86a9[_0x5e49cd(0xe1)](_0x405224);return{'isDirectory':()=>_0x5d8741['isDirectory'](),'isFile':()=>_0x5d8741[_0x5e49cd(0xe9)]()};},'unlinkSync':_0x14016e=>a128_0x2c86a9[a128_0x37617a(0xf5)](_0x14016e)};
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x3b6212=a130_0x83b5;function a130_0x83b5(_0x21325c,_0x5de7b7){_0x21325c=_0x21325c-0xcb;const _0x190238=a130_0x1902();let _0x83b50=_0x190238[_0x21325c];return _0x83b50;}function a130_0x1902(){const _0x4b1a46=['1641017WTZAsa','80pUcOEP','kill','submitPrestoJob','result','showJob','getJobResult','map','cancelJob','created_at','end_at','show','hive','submit','start_at','\x20UTC','2645dEJJgc','test','trino','replace','1917354iRcXCu','updated_at','getUserInfo','list','1348lwOqUt','24494WqpyjG','541047SuEDAp','listJobs','144495FhyusI','client','9iritao','submitHiveJob','5083370oxkxUK'];a130_0x1902=function(){return _0x4b1a46;};return a130_0x1902();}(function(_0x2e190a,_0x45e90c){const _0x3892e2=a130_0x83b5,_0x5919ae=_0x2e190a();while(!![]){try{const _0x202f02=-parseInt(_0x3892e2(0xdb))/0x1*(-parseInt(_0x3892e2(0xd6))/0x2)+-parseInt(_0x3892e2(0xd7))/0x3+-parseInt(_0x3892e2(0xd5))/0x4*(parseInt(_0x3892e2(0xcd))/0x5)+parseInt(_0x3892e2(0xd1))/0x6+-parseInt(_0x3892e2(0xde))/0x7+-parseInt(_0x3892e2(0xdf))/0x8*(parseInt(_0x3892e2(0xd9))/0x9)+parseInt(_0x3892e2(0xdd))/0xa;if(_0x202f02===_0x45e90c)break;else _0x5919ae['push'](_0x5919ae['shift']());}catch(_0x50080b){_0x5919ae['push'](_0x5919ae['shift']());}}}(a130_0x1902,0x2d0c4));import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x174271){const _0x14c696=a130_0x83b5;if(!_0x174271)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x14c696(0xce)](_0x174271))return _0x174271;return _0x174271[_0x14c696(0xd0)](_0x14c696(0xcc),'Z')['replace']('\x20','T');}export class JobSDK{['client'];constructor(_0x3d34e9){const _0x4dfc06=a130_0x83b5;this[_0x4dfc06(0xda)]=new TDApiClient(_0x3d34e9);}async[a130_0x3b6212(0xd4)](_0xa9859b){const _0x2bdb3c=a130_0x3b6212,_0x472278=await this[_0x2bdb3c(0xda)][_0x2bdb3c(0xd8)](_0xa9859b);return _0x472278[_0x2bdb3c(0xe5)](_0x59d525=>({..._0x59d525,'created_at':normalizeTimestamp(_0x59d525[_0x2bdb3c(0xe7)]),'updated_at':normalizeTimestamp(_0x59d525[_0x2bdb3c(0xd2)]),'start_at':normalizeTimestamp(_0x59d525[_0x2bdb3c(0xcb)]),'end_at':normalizeTimestamp(_0x59d525[_0x2bdb3c(0xe8)])}));}async[a130_0x3b6212(0xe9)](_0x1fc9f7){const _0x4d2106=a130_0x3b6212,_0x4cf790=await this[_0x4d2106(0xda)][_0x4d2106(0xe3)](_0x1fc9f7);return{..._0x4cf790,'created_at':normalizeTimestamp(_0x4cf790[_0x4d2106(0xe7)]),'updated_at':normalizeTimestamp(_0x4cf790['updated_at']),'start_at':normalizeTimestamp(_0x4cf790[_0x4d2106(0xcb)]),'end_at':normalizeTimestamp(_0x4cf790['end_at'])};}async[a130_0x3b6212(0xe0)](_0x1ffe3c){const _0x957251=a130_0x3b6212;await this['client'][_0x957251(0xe6)](_0x1ffe3c);}async[a130_0x3b6212(0xeb)](_0xa70275,_0x4c2ac5,_0x15128d=a130_0x3b6212(0xcf),_0x510e09){const _0x25c9cb=a130_0x3b6212;return _0x15128d===_0x25c9cb(0xea)?await this[_0x25c9cb(0xda)][_0x25c9cb(0xdc)](_0xa70275,_0x4c2ac5,_0x510e09):await this['client'][_0x25c9cb(0xe1)](_0xa70275,_0x4c2ac5,_0x510e09);}async[a130_0x3b6212(0xe2)](_0x325144){const _0x20b6b2=a130_0x3b6212;return await this[_0x20b6b2(0xda)][_0x20b6b2(0xe4)](_0x325144);}async[a130_0x3b6212(0xd3)](){const _0x255c37=a130_0x3b6212;return await this['client'][_0x255c37(0xd3)]();}}
|
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0x324a42=a131_0x3e95;(function(_0x13f841,_0x5a10fe){const _0x53b0f2=a131_0x3e95,_0x4095be=_0x13f841();while(!![]){try{const _0x5e524b=parseInt(_0x53b0f2(0x1bb))/0x1+parseInt(_0x53b0f2(0x208))/0x2*(parseInt(_0x53b0f2(0x219))/0x3)+-parseInt(_0x53b0f2(0x1c4))/0x4*(-parseInt(_0x53b0f2(0x22b))/0x5)+-parseInt(_0x53b0f2(0x1e0))/0x6*(-parseInt(_0x53b0f2(0x22c))/0x7)+parseInt(_0x53b0f2(0x1bf))/0x8+parseInt(_0x53b0f2(0x1bd))/0x9*(parseInt(_0x53b0f2(0x1df))/0xa)+-parseInt(_0x53b0f2(0x1ff))/0xb;if(_0x5e524b===_0x5a10fe)break;else _0x4095be['push'](_0x4095be['shift']());}catch(_0x26deef){_0x4095be['push'](_0x4095be['shift']());}}}(a131_0xf4be,0x8f829));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x54a90f){const _0xd7c5a=a131_0x3e95;return _0x54a90f[_0xd7c5a(0x1d9)]??_0x54a90f[_0xd7c5a(0x1c8)]?.[_0xd7c5a(0x1d9)]??undefined;}function getVersionNumber(_0x2ba428){const _0x2d1143=a131_0x3e95;return _0x2ba428[_0x2d1143(0x1c3)]??_0x2ba428[_0x2d1143(0x1c8)]?.[_0x2d1143(0x1c3)]??0x0;}function getState(_0x4ffb53){const _0x58c289=a131_0x3e95;return _0x4ffb53[_0x58c289(0x1aa)]??_0x4ffb53[_0x58c289(0x1c8)]?.['state'];}export function deduplicateJourneysByBundle(_0x1cb9aa){const _0x4afd84=a131_0x3e95,_0x3d1bab=new Map();let _0x2a18c9=0x0;for(const _0x23260c of _0x1cb9aa){const _0x1905d9=getBundleId(_0x23260c);if(!_0x1905d9){const _0x1cfcb6=_0x4afd84(0x1ec)+(_0x23260c['id']??'idx-'+_0x2a18c9++);_0x3d1bab['set'](_0x1cfcb6,_0x23260c);continue;}const _0x28eb0a=_0x3d1bab[_0x4afd84(0x1ac)](_0x1905d9);if(!_0x28eb0a)_0x3d1bab['set'](_0x1905d9,_0x23260c);else{const _0x20a2df=getState(_0x28eb0a)==='launched',_0x50b81e=getState(_0x23260c)===_0x4afd84(0x1b0);if(_0x50b81e&&!_0x20a2df)_0x3d1bab[_0x4afd84(0x1e4)](_0x1905d9,_0x23260c);else{if(!_0x50b81e&&_0x20a2df){}else{const _0x5f541b=getVersionNumber(_0x28eb0a),_0x4ff28a=getVersionNumber(_0x23260c);_0x4ff28a>_0x5f541b&&_0x3d1bab['set'](_0x1905d9,_0x23260c);}}}}return Array[_0x4afd84(0x205)](_0x3d1bab[_0x4afd84(0x1ad)]());}const VALID_JOURNEY_STATES=new Set([a131_0x324a42(0x20f),a131_0x324a42(0x21b),a131_0x324a42(0x1b0)]);export function parseJourneyState(_0x3ba068){const _0x13b95a=a131_0x324a42;if(typeof _0x3ba068==='string'&&VALID_JOURNEY_STATES[_0x13b95a(0x1f0)](_0x3ba068))return _0x3ba068;return _0x13b95a(0x20f);}export function entityToJourneyListItem(_0x512d53,_0x44adc7){const _0x4646f7=a131_0x324a42,_0x460197=_0x512d53[_0x4646f7(0x1c8)];return{'id':_0x512d53['id'],'name':_0x460197[_0x4646f7(0x206)]??'','journeyBundleName':_0x460197['journeyBundleName']??_0x460197[_0x4646f7(0x206)]??'','journeyBundleId':_0x460197[_0x4646f7(0x1d9)]??'','versionNumber':_0x460197[_0x4646f7(0x1c3)],'description':_0x460197[_0x4646f7(0x21c)]??null,'state':parseJourneyState(_0x460197[_0x4646f7(0x1aa)]),'paused':_0x460197[_0x4646f7(0x1e9)]??![],'audienceId':_0x44adc7,'folderId':_0x460197['segmentFolderId']??_0x512d53[_0x4646f7(0x21e)]?.[_0x4646f7(0x1d3)]?.[_0x4646f7(0x1c1)]?.['id']??null,'createdAt':_0x460197[_0x4646f7(0x20c)]??'','updatedAt':_0x460197[_0x4646f7(0x21d)]??''};}function a131_0x3e95(_0x7d493e,_0x4c275b){_0x7d493e=_0x7d493e-0x1a8;const _0xf4be52=a131_0xf4be();let _0x3e9530=_0xf4be52[_0x7d493e];return _0x3e9530;}function convertToColumnId(_0x17d911){const _0x42e799=a131_0x324a42;return _0x17d911[_0x42e799(0x222)](/-/g,'_');}function getStepEntries(_0x59e62e){const _0x591924=a131_0x324a42;if(!_0x59e62e)return[];if(Array[_0x591924(0x1a8)](_0x59e62e))return _0x59e62e[_0x591924(0x1ea)](_0x1626cc=>[_0x1626cc['id'],_0x1626cc]);return Object['entries'](_0x59e62e);}export function flattenJourneyActivation(_0x2e4213){const _0x38ec1c=a131_0x324a42,{activationParams:_0x4732e8,activationId:_0x2c665d,runAfterJourneyRefresh:_0x1b974d}=_0x2e4213[_0x38ec1c(0x1c8)];return{'id':_0x2e4213['id'],'activationId':_0x2c665d,'runAfterJourneyRefresh':_0x1b974d,..._0x4732e8};}function col(_0x4690e0,_0x1f4a9a={}){return{'column':_0x4690e0,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x1f4a9a};}export function generateColumnMapping(_0x40061e){const _0x103227=a131_0x324a42,_0x3f19d7=[];_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x1cf))),_0x3f19d7[_0x103227(0x1eb)](col('intime_journey',{'direction':'in','category':_0x103227(0x210)})),_0x3f19d7[_0x103227(0x1eb)](col('outtime_journey',{'direction':_0x103227(0x21a),'category':_0x103227(0x210)}));_0x40061e[_0x103227(0x1c8)][_0x103227(0x200)]&&_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x1da),{'direction':'in','category':_0x103227(0x200),'detail':_0x40061e[_0x103227(0x1c8)][_0x103227(0x200)][_0x103227(0x206)]||null}));const _0x465b76=_0x40061e[_0x103227(0x1c8)]['journeyStages']||[];for(let _0x1b5367=0x0;_0x1b5367<_0x465b76[_0x103227(0x1f2)];_0x1b5367++){const _0x29a09b=_0x465b76[_0x1b5367],_0x16c95e=_0x29a09b['name'],_0x48cccd={'stageIndex':_0x1b5367,'stageName':_0x16c95e},_0x410f77=_0x29a09b[_0x103227(0x225)]?.[_0x103227(0x206)]||null;_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x217)+_0x1b5367,{..._0x48cccd,'direction':'in','category':_0x103227(0x1f6),'detail':_0x410f77})),_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x1d6)+_0x1b5367,{..._0x48cccd,'direction':'out','category':_0x103227(0x1f6),'detail':_0x410f77}));_0x29a09b[_0x103227(0x1ba)]&&_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x217)+_0x1b5367+'_milestone',{..._0x48cccd,'direction':'in','category':_0x103227(0x1ba),'detail':_0x29a09b['milestone']['name']||null}));const _0x1ebfa0=_0x29a09b[_0x103227(0x22d)]||_0x29a09b[_0x103227(0x1fd)]||[];for(let _0x1da2ae=0x0;_0x1da2ae<_0x1ebfa0[_0x103227(0x1f2)];_0x1da2ae++){_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x217)+_0x1b5367+_0x103227(0x1f7)+_0x1da2ae,{..._0x48cccd,'direction':'in','category':'exit_criteria','detail':_0x1ebfa0[_0x1da2ae][_0x103227(0x206)]||null}));}const _0xd00f8e=getStepEntries(_0x29a09b[_0x103227(0x1c7)]);for(const [_0x3cf97a,_0x7ccc7b]of _0xd00f8e){const _0x542b64=convertToColumnId(_0x3cf97a),_0xdf7c=_0x7ccc7b['type']||null,_0x31d6e1=_0x7ccc7b[_0x103227(0x206)]||null,_0x4d6bc3={..._0x48cccd,'stepType':_0xdf7c,'stepName':_0x31d6e1,'stepId':_0x3cf97a};_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x217)+_0x1b5367+'_'+_0x542b64,{..._0x4d6bc3,'direction':'in','category':_0x103227(0x215)})),_0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x1d6)+_0x1b5367+'_'+_0x542b64,{..._0x4d6bc3,'direction':_0x103227(0x21a),'category':_0x103227(0x215)}));if(_0x7ccc7b[_0x103227(0x218)]===_0x103227(0x202)&&_0x7ccc7b[_0x103227(0x211)])for(const _0x46512f of _0x7ccc7b[_0x103227(0x211)]){_0x46512f[_0x103227(0x1e1)]&&_0x3f19d7[_0x103227(0x1eb)](col('intime_stage_'+_0x1b5367+'_'+_0x542b64+'_'+_0x46512f[_0x103227(0x1e1)],{..._0x4d6bc3,'direction':'in','category':_0x103227(0x204),'detail':_0x46512f[_0x103227(0x206)]||(_0x46512f['excluded']?_0x103227(0x1fa):null)}));}if((_0x7ccc7b[_0x103227(0x218)]==='AbTest'||_0x7ccc7b[_0x103227(0x218)]==='ABTest')&&_0x7ccc7b[_0x103227(0x1e2)])for(const _0x24f1b9 of _0x7ccc7b[_0x103227(0x1e2)]){_0x24f1b9['id']&&_0x3f19d7['push'](col('intime_stage_'+_0x1b5367+'_'+_0x542b64+_0x103227(0x1be)+convertToColumnId(_0x24f1b9['id']),{..._0x4d6bc3,'direction':'in','category':_0x103227(0x1af),'detail':_0x24f1b9[_0x103227(0x206)]||null}));}if(_0x7ccc7b[_0x103227(0x218)]===_0x103227(0x1ab)||_0x7ccc7b[_0x103227(0x218)]===_0x103227(0x1c6)){const _0x22a65b=[];if(_0x7ccc7b[_0x103227(0x1ce)])_0x22a65b[_0x103227(0x1eb)](_0x7ccc7b['conditionSegmentId']);else{if(Array['isArray'](_0x7ccc7b[_0x103227(0x1ed)]))for(const _0x438de0 of _0x7ccc7b[_0x103227(0x1ed)]){_0x438de0[_0x103227(0x1e1)]&&!_0x438de0[_0x103227(0x1d5)]&&_0x22a65b[_0x103227(0x1eb)](_0x438de0['segmentId']);}else _0x7ccc7b[_0x103227(0x1e5)]?.[_0x103227(0x1e1)]&&_0x22a65b[_0x103227(0x1eb)](_0x7ccc7b[_0x103227(0x1e5)][_0x103227(0x1e1)]);}for(const _0x46eee8 of _0x22a65b){_0x3f19d7['push'](col(_0x103227(0x217)+_0x1b5367+'_'+_0x542b64+'_'+_0x46eee8,{..._0x4d6bc3,'direction':'in','category':_0x103227(0x204)}));}}}}return _0x3f19d7[_0x103227(0x1eb)](col(_0x103227(0x1e7))),_0x3f19d7;}export function aggregateJourneyHistory(_0x5923d7){const _0x3c151f=a131_0x324a42,_0x4fa5dd=_0x5923d7[_0x3c151f(0x1ae)]((_0x438374,_0x3263dc)=>_0x438374+(_0x3263dc[_0x3c151f(0x1c9)]??0x0),0x0),_0x15d1d5=_0x5923d7['reduce']((_0x4bbf4c,_0x2b2cb7)=>_0x4bbf4c+(_0x2b2cb7['goalInflux']??0x0),0x0),_0x3b2e9e=_0x5923d7[_0x3c151f(0x1ae)]((_0x3cae28,_0x2a77d7)=>_0x3cae28+((_0x2a77d7['exitInflux']??0x0)+(_0x2a77d7[_0x3c151f(0x22f)]??0x0)),0x0),_0x187eb6=_0x5923d7[_0x5923d7[_0x3c151f(0x1f2)]-0x1];return{'size':_0x187eb6?.[_0x3c151f(0x223)]??0x0,'entered':_0x4fa5dd,'goal_achieved':_0x15d1d5,'completion_rate':_0x15d1d5&&_0x4fa5dd?_0x15d1d5/_0x4fa5dd*0x64:0x0,'exit_or_jump':_0x3b2e9e,'exit_or_jump_rate':_0x3b2e9e&&_0x4fa5dd?_0x3b2e9e/_0x4fa5dd*0x64:0x0};}export function aggregateStageHistory(_0x116596){const _0x1a3532=a131_0x324a42,_0x5cfd99=_0x116596[_0x1a3532(0x1ae)]((_0x50c6cf,_0x2e9dbd)=>_0x50c6cf+(_0x2e9dbd[_0x1a3532(0x1c9)]??0x0),0x0),_0xf40eb6=_0x116596[_0x1a3532(0x1ae)]((_0x3550b6,_0x40fc66)=>_0x3550b6+(_0x40fc66['milestoneInflux']??0x0),0x0),_0x46e5eb=_0x116596[_0x1a3532(0x1ae)]((_0x3169d2,_0x5925b0)=>_0x3169d2+((_0x5925b0[_0x1a3532(0x1d2)]??0x0)+(_0x5925b0['jumpInflux']??0x0)),0x0),_0x50a9d0=_0x116596[_0x116596['length']-0x1];return{'size':_0x50a9d0?.[_0x1a3532(0x223)]??0x0,'entered':_0x5cfd99,'milestone':_0xf40eb6,'milestone_rate':_0xf40eb6&&_0x5cfd99?_0xf40eb6/_0x5cfd99*0x64:0x0,'exit_or_jump':_0x46e5eb,'exit_or_jump_rate':_0x46e5eb&&_0x5cfd99?_0x46e5eb/_0x5cfd99*0x64:0x0};}export function assembleJourneyStats(_0x4ac9c6,_0x70858d){const _0x5e028c=a131_0x324a42,_0x276128=!!(_0x70858d?.[_0x5e028c(0x205)]||_0x70858d?.['to'])&&!!_0x4ac9c6['history']?.['length'];if(_0x276128){const _0x257269=aggregateJourneyHistory(_0x4ac9c6[_0x5e028c(0x1f9)]),_0x4f291a={'journey_id':_0x4ac9c6[_0x5e028c(0x1cd)],..._0x70858d?.[_0x5e028c(0x205)]&&{'from':_0x70858d[_0x5e028c(0x205)]},..._0x70858d?.['to']&&{'to':_0x70858d['to']},..._0x257269};return _0x70858d?.[_0x5e028c(0x234)]&&(_0x4f291a[_0x5e028c(0x1f9)]=_0x4ac9c6[_0x5e028c(0x1f9)]),_0x4f291a;}return{'journey_id':_0x4ac9c6[_0x5e028c(0x1cd)],'size':_0x4ac9c6['size'],'entered':_0x4ac9c6[_0x5e028c(0x231)],'goal_achieved':_0x4ac9c6[_0x5e028c(0x1f4)],'completion_rate':_0x4ac9c6[_0x5e028c(0x1c2)],'exit_or_jump':_0x4ac9c6[_0x5e028c(0x1b3)],'exit_or_jump_rate':_0x4ac9c6[_0x5e028c(0x1dd)]};}export function formatVersionsFromBundle(_0x2ee642){const _0x38760b=a131_0x324a42,_0x58a0a8=_0x2ee642['journeys']['map'](_0x1fb41f=>({'journeyId':_0x1fb41f['id'],'versionNumber':_0x1fb41f[_0x38760b(0x1c8)][_0x38760b(0x1c3)]??0x0,'name':_0x1fb41f['attributes']['name'],'state':_0x1fb41f[_0x38760b(0x1c8)]['state'],'paused':_0x1fb41f[_0x38760b(0x1c8)]['paused'],'createdAt':_0x1fb41f['attributes'][_0x38760b(0x20c)],'updatedAt':_0x1fb41f[_0x38760b(0x1c8)][_0x38760b(0x21d)]}));return _0x58a0a8[_0x38760b(0x1d8)]((_0x332374,_0x2b7043)=>_0x332374[_0x38760b(0x1c3)]-_0x2b7043[_0x38760b(0x1c3)]),_0x58a0a8;}export function synthesizePreBundleVersion(_0x4c221f){const _0x1d8034=a131_0x324a42;return{'journeyId':_0x4c221f['id'],'versionNumber':0x1,'name':_0x4c221f['attributes']['name'],'state':_0x4c221f[_0x1d8034(0x1c8)]['state'],'paused':_0x4c221f[_0x1d8034(0x1c8)][_0x1d8034(0x1e9)],'createdAt':_0x4c221f['attributes']['createdAt'],'updatedAt':_0x4c221f['attributes'][_0x1d8034(0x21d)]};}export function buildStageNameMap(_0x2f1786){const _0x57b413=a131_0x324a42;return new Map(_0x2f1786[_0x57b413(0x1c8)]['journeyStages']?.[_0x57b413(0x1ea)](_0x15d7b0=>[_0x15d7b0['id'],_0x15d7b0[_0x57b413(0x206)]])??[]);}export class JourneySDK{['client'];constructor(_0xb8486a){this['client']=new CDPApiClient(_0xb8486a);}[a131_0x324a42(0x228)](_0x1d907a,_0x3fb717){return _0x3fb717?_0x1d907a:deduplicateJourneysByBundle(_0x1d907a);}async[a131_0x324a42(0x209)](_0x2612a3,_0x2d9de8){const _0x3bcb29=a131_0x324a42;try{const _0x4d6836=await this[_0x3bcb29(0x232)][_0x3bcb29(0x209)](_0x2612a3);return{'journeys':this['applyVersionDeduplication'](_0x4d6836[_0x3bcb29(0x207)],_0x2d9de8),'activationStepsById':_0x4d6836[_0x3bcb29(0x1b9)]};}catch(_0x3a3cd3){if(isHttp404Error(_0x3a3cd3))return{'journeys':[],'activationStepsById':new Map()};throw _0x3a3cd3;}}async[a131_0x324a42(0x1d0)](_0x9f7cd3,_0x135c18,_0x4ff399){const _0x371b2e=a131_0x324a42;let _0x47a9b0=_0x135c18;if(!_0x47a9b0)try{const _0x1aac5c=await this[_0x371b2e(0x232)]['getParentSegmentFull'](_0x9f7cd3);_0x47a9b0=_0x1aac5c[_0x371b2e(0x1b4)]??undefined;}catch(_0xd5698f){if(isHttp404Error(_0xd5698f))return[];throw _0xd5698f;}if(!_0x47a9b0)return[];let _0x13ff0c;if(_0x4ff399?.[_0x371b2e(0x227)]){const _0x1d5db0=await this[_0x371b2e(0x232)][_0x371b2e(0x1f3)](_0x9f7cd3),_0x16cdda=_0x1d5db0[_0x371b2e(0x1ea)](_0x2deab0=>this[_0x371b2e(0x232)][_0x371b2e(0x1fc)](_0x2deab0['id'])),_0x1c7952=await Promise[_0x371b2e(0x203)](_0x16cdda),_0x8f0313=new Set();_0x13ff0c=_0x1c7952['flat']()[_0x371b2e(0x1dc)](_0x2727ff=>{if(_0x8f0313['has'](_0x2727ff['id']))return![];return _0x8f0313['add'](_0x2727ff['id']),!![];});}else{const _0xc236bd=await this[_0x371b2e(0x232)][_0x371b2e(0x20a)](_0x47a9b0,0x20,![]),_0x383250=_0xc236bd[_0x371b2e(0x1c1)],_0x52beac=_0x383250[_0x371b2e(0x1dc)](_0x2f4087=>_0x2f4087['type']===_0x371b2e(0x210));_0x13ff0c=_0x52beac[_0x371b2e(0x1ea)](_0x5b5c68=>entityToJourneyListItem(_0x5b5c68,_0x9f7cd3));}return this[_0x371b2e(0x228)](_0x13ff0c,_0x4ff399?.[_0x371b2e(0x227)]);}async[a131_0x324a42(0x1fb)](_0x31539b,_0x2e1f68,_0x77a10f){const _0x2210a4=a131_0x324a42;if(!_0x2e1f68)return{'journeys':[],'folders':[]};const _0x1f6b30=await this[_0x2210a4(0x232)][_0x2210a4(0x20a)](_0x2e1f68,0x20,![]),_0x241689=_0x1f6b30['data'],_0x35996a=_0x241689[_0x2210a4(0x1dc)](_0x17cf3d=>_0x17cf3d[_0x2210a4(0x218)]==='folder-segment'&&_0x17cf3d['id']!==_0x2e1f68),_0xe131bd=_0x35996a[_0x2210a4(0x1ea)](_0x56c72b=>({'id':_0x56c72b['id'],'name':_0x56c72b['attributes'][_0x2210a4(0x206)]})),_0x351279=_0x241689['filter'](_0x2f805a=>_0x2f805a['type']===_0x2210a4(0x210)),_0x25132d=_0x351279[_0x2210a4(0x1ea)](_0x3a916c=>entityToJourneyListItem(_0x3a916c,_0x31539b));return{'journeys':this[_0x2210a4(0x228)](_0x25132d,_0x77a10f?.['includeAllVersions']),'folders':_0xe131bd};}async[a131_0x324a42(0x229)](_0x3f1267,_0x375fcd){const _0x5503ea=a131_0x324a42;let _0x3eaf5e;try{_0x3eaf5e=await this[_0x5503ea(0x232)][_0x5503ea(0x1f3)](_0x3f1267);}catch(_0x58c0c8){if(isHttp404Error(_0x58c0c8))return{'journeys':[],'activationStepsById':new Map()};throw _0x58c0c8;}const _0x52f2e5=_0x3eaf5e['map'](async _0x48c7d5=>{const _0x596d0d=_0x5503ea;return await this[_0x596d0d(0x209)](_0x48c7d5['id'],_0x375fcd?.['includeAllVersions']);}),_0x497533=await Promise[_0x5503ea(0x203)](_0x52f2e5),_0x5561fc=new Map(),_0x1d96ed=[];for(const _0x30fd96 of _0x497533){_0x1d96ed[_0x5503ea(0x1eb)](..._0x30fd96[_0x5503ea(0x207)]);for(const [_0x29714d,_0x12eddf]of _0x30fd96['activationStepsById']){_0x5561fc[_0x5503ea(0x1e4)](_0x29714d,_0x12eddf);}}const _0x1b8213=new Set(),_0x2c82ba=_0x1d96ed[_0x5503ea(0x1dc)](_0x5baf90=>{const _0x236401=_0x5503ea;if(_0x1b8213[_0x236401(0x1f0)](_0x5baf90['id']))return![];return _0x1b8213[_0x236401(0x1e8)](_0x5baf90['id']),!![];});return{'journeys':this[_0x5503ea(0x228)](_0x2c82ba,_0x375fcd?.[_0x5503ea(0x227)]),'activationStepsById':_0x5561fc};}async[a131_0x324a42(0x1b6)](_0x2bf1dd){const _0x4975c0=a131_0x324a42;try{return await this[_0x4975c0(0x232)][_0x4975c0(0x1b6)](_0x2bf1dd);}catch(_0x9eb833){if(isHttp404Error(_0x9eb833))throw new SDKError(ErrorCode[_0x4975c0(0x20d)],_0x4975c0(0x1b2)+_0x2bf1dd,_0x9eb833);throw _0x9eb833;}}async[a131_0x324a42(0x1ca)](_0x399acd,_0xe11a95){const _0x2531bd=a131_0x324a42,_0x2878db=await this['listJourneysFromParentSegment'](_0x399acd),_0x3afa3a=_0x2878db[_0x2531bd(0x1bc)](_0x54962d=>_0x54962d[_0x2531bd(0x1d4)][_0x2531bd(0x224)]()===_0xe11a95['toLowerCase']());if(!_0x3afa3a)throw new SDKError(ErrorCode[_0x2531bd(0x20d)],'Journey\x20not\x20found:\x20'+_0xe11a95,undefined,{'helpText':_0x2531bd(0x1b8)});return _0x3afa3a['id'];}async[a131_0x324a42(0x1c5)](_0x222fb2,_0x2f9f5a){const _0x35b3ea=a131_0x324a42;try{return await this[_0x35b3ea(0x232)][_0x35b3ea(0x1f1)](_0x222fb2,_0x2f9f5a);}catch(_0xf7e44b){if(isHttp404Error(_0xf7e44b))throw new SDKError(ErrorCode[_0x35b3ea(0x20d)],_0x35b3ea(0x1b2)+_0x222fb2,_0xf7e44b);throw _0xf7e44b;}}async[a131_0x324a42(0x233)](_0x141908,_0x5e5896){const _0x409e46=a131_0x324a42,_0x49d4a9={'from':_0x5e5896?.[_0x409e46(0x205)],'to':_0x5e5896?.['to'],'limit':_0x5e5896?.[_0x409e46(0x1d1)]},_0x1489cb=_0x5e5896?.['type']!==_0x409e46(0x1e6);try{const [_0x1295ba,_0x3215db]=await Promise[_0x409e46(0x203)]([this[_0x409e46(0x221)](_0x141908,_0x5e5896?.[_0x409e46(0x218)],_0x49d4a9),_0x1489cb?this[_0x409e46(0x1b6)](_0x141908):undefined]);if(_0x1295ba[_0x409e46(0x1f5)]&&_0x3215db){const _0x43024b=buildStageNameMap(_0x3215db);_0x1295ba[_0x409e46(0x1f5)]=_0x1295ba[_0x409e46(0x1f5)]['map'](_0x254790=>({..._0x254790,'journeyStageName':_0x43024b[_0x409e46(0x1ac)](_0x254790[_0x409e46(0x1fe)])??_0x254790[_0x409e46(0x1fe)]}));}return _0x1295ba;}catch(_0xd2414b){if(isHttp404Error(_0xd2414b))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x409e46(0x1b2)+_0x141908,_0xd2414b);throw _0xd2414b;}}async[a131_0x324a42(0x221)](_0x1e0086,_0x3e54fd,_0x3d40e1){const _0x1c375c=a131_0x324a42;if(_0x3e54fd===_0x1c375c(0x1e6)){const _0x3426b2=await this[_0x1c375c(0x232)]['getConversionSankeyChart'](_0x1e0086,_0x3d40e1);return{'conversion':_0x3426b2};}if(_0x3e54fd===_0x1c375c(0x1f5)){const _0x3ace22=await this[_0x1c375c(0x232)][_0x1c375c(0x20b)](_0x1e0086,_0x3d40e1);return{'activation':_0x3ace22};}const [_0x224615,_0x1222ac]=await Promise[_0x1c375c(0x203)]([this[_0x1c375c(0x232)][_0x1c375c(0x1b1)](_0x1e0086,_0x3d40e1),this['client']['getActivationSankeyChart'](_0x1e0086,_0x3d40e1)]);return{'conversion':_0x224615,'activation':_0x1222ac};}async[a131_0x324a42(0x1db)](_0x5385de){const _0x4c2594=a131_0x324a42;try{return await this[_0x4c2594(0x232)]['pauseJourney'](_0x5385de);}catch(_0x3d8c19){if(isHttp404Error(_0x3d8c19))throw new SDKError(ErrorCode[_0x4c2594(0x20d)],_0x4c2594(0x1b2)+_0x5385de,_0x3d8c19);throw _0x3d8c19;}}async[a131_0x324a42(0x213)](_0x338234){const _0x185157=a131_0x324a42;try{return await this[_0x185157(0x232)][_0x185157(0x1d7)](_0x338234);}catch(_0x317d97){if(isHttp404Error(_0x317d97))throw new SDKError(ErrorCode[_0x185157(0x20d)],_0x185157(0x1b2)+_0x338234,_0x317d97);throw _0x317d97;}}async['create'](_0x1416d5){const _0x174b37=a131_0x324a42;return await this['client'][_0x174b37(0x21f)](_0x1416d5);}async[a131_0x324a42(0x22e)](_0xb72d12,_0x36b542){const _0x58a26e=a131_0x324a42;try{return await this[_0x58a26e(0x232)][_0x58a26e(0x1e3)](_0xb72d12,_0x36b542);}catch(_0x452ecc){if(isHttp404Error(_0x452ecc))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x58a26e(0x1b2)+_0xb72d12,_0x452ecc);throw _0x452ecc;}}async['getActivation'](_0x360079,_0x15ca85){const _0x2ac24f=a131_0x324a42;try{return await this[_0x2ac24f(0x232)][_0x2ac24f(0x1cc)](_0x360079,_0x15ca85);}catch(_0x26879a){if(isHttp404Error(_0x26879a))throw new SDKError(ErrorCode['NOT_FOUND'],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x15ca85+'\x20in\x20journey\x20'+_0x360079,_0x26879a);throw _0x26879a;}}async[a131_0x324a42(0x216)](_0x552a8e){const _0x659834=a131_0x324a42;try{return await this[_0x659834(0x232)][_0x659834(0x1c0)](_0x552a8e);}catch(_0x167ef8){if(isHttp404Error(_0x167ef8))return[];throw _0x167ef8;}}async['listActivationsFlat'](_0x270aa3){const _0x2ecb23=a131_0x324a42,_0x428d15=await this[_0x2ecb23(0x216)](_0x270aa3);return _0x428d15[_0x2ecb23(0x1ea)](flattenJourneyActivation);}async[a131_0x324a42(0x201)](_0x42cb2c,_0xd6dfeb){const _0x2fdb64=a131_0x324a42;return await this[_0x2fdb64(0x232)][_0x2fdb64(0x1ee)](_0x42cb2c,_0xd6dfeb);}async['getColumnMapping'](_0x21d35c){const _0x42db9b=a131_0x324a42,_0x237361=await this[_0x42db9b(0x1b6)](_0x21d35c),_0xa4fc59=generateColumnMapping(_0x237361);return{'journeyId':_0x237361['id'],'journeyName':_0x237361['attributes'][_0x42db9b(0x206)],'database':_0x42db9b(0x226)+_0x237361['attributes'][_0x42db9b(0x1ef)],'table':_0x42db9b(0x1f8)+_0x237361['id'],'columns':_0xa4fc59};}async[a131_0x324a42(0x1de)](_0x94e290){const _0x23dfe2=a131_0x324a42;return this[_0x23dfe2(0x232)][_0x23dfe2(0x212)](_0x94e290);}async[a131_0x324a42(0x1b5)](_0x2eddf3){const _0x188eca=a131_0x324a42;if(!_0x2eddf3)return undefined;try{const _0xfd8dea=await this[_0x188eca(0x1de)](_0x2eddf3);return _0xfd8dea['latestJourneyId'];}catch{return undefined;}}async[a131_0x324a42(0x20e)](_0x3a730e){const _0x1e2447=a131_0x324a42,_0x6a47b3=await this[_0x1e2447(0x1b6)](_0x3a730e),_0x48013e=_0x6a47b3[_0x1e2447(0x1c8)][_0x1e2447(0x1d9)];if(!_0x48013e)return{'bundleId':'','bundleName':_0x6a47b3[_0x1e2447(0x1c8)]['name'],'bundleDescription':_0x6a47b3[_0x1e2447(0x1c8)]['description']??null,'latestJourneyId':_0x6a47b3['id'],'versions':[synthesizePreBundleVersion(_0x6a47b3)]};const _0x239277=await this[_0x1e2447(0x1de)](_0x48013e);return{'bundleId':_0x48013e,'bundleName':_0x239277[_0x1e2447(0x206)],'bundleDescription':_0x239277[_0x1e2447(0x21c)]??null,'latestJourneyId':_0x239277[_0x1e2447(0x230)],'versions':formatVersionsFromBundle(_0x239277)};}async[a131_0x324a42(0x22a)](_0x48fe6a){const _0x776b11=a131_0x324a42,_0x2156c0=await this[_0x776b11(0x1b6)](_0x48fe6a),_0xa975ba=_0x2156c0[_0x776b11(0x1c8)]['journeyBundleId'];if(!_0xa975ba)throw new SDKError(ErrorCode[_0x776b11(0x1a9)],_0x776b11(0x1cb));await this[_0x776b11(0x232)][_0x776b11(0x220)](_0xa975ba);const _0x3a0200=await this[_0x776b11(0x232)][_0x776b11(0x212)](_0xa975ba),_0x4763d1=_0x3a0200[_0x776b11(0x206)]+'\x20v'+(_0x3a0200[_0x776b11(0x214)]+0x1);return this[_0x776b11(0x232)][_0x776b11(0x1b7)](_0xa975ba,{'sourceId':_0x48fe6a,'attributes':{'name':_0x4763d1}});}}function a131_0xf4be(){const _0x54c743=['_exit_','journey_','history','Excluded\x20profiles','listJourneysWithFolders','listJourneys','exitCriteria','journeyStageId','30976737vYzEBG','goal','createActivation','DecisionPoint','all','branch','from','name','journeys','654brTngV','listJourneysWithDetails','listEntitiesByFolder','getActivationSankeyChart','createdAt','JOURNEY_NOT_FOUND','listVersions','draft','journey','branches','getJourneyBundle','resume','lastVersionNumber','step','listActivations','intime_stage_','type','6387yzcALE','out','simulation','description','updatedAt','relationships','createJourney','checkJourneyAppendable','fetchTrafficRaw','replace','size','toLowerCase','entryCriteria','cdp_audience_','includeAllVersions','applyVersionDeduplication','listJourneysWithDetailsFromParentSegment','createVersion','66660CATjmR','4711MPbaGs','exitCriterias','update','jumpInflux','latestJourneyId','enteredSize','client','getTrafficData','includeHistory','isArray','INVALID_ARGUMENT','state','WaitStep','get','values','reduce','variant','launched','getConversionSankeyChart','Journey\x20not\x20found:\x20','exitOrJumpSize','rootFolderId','getLatestJourneyId','getJourney','createJourneyVersion','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','activationStepsById','milestone','909599lzAfqd','find','537021mgpcpY','_variant_','2005408zSkbJN','listJourneyActivations','data','completionRate','versionNumber','84AzIRXr','getStatistics','Wait','steps','attributes','entryInflux','resolveJourneyId','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','getJourneyActivation','journeyId','conditionSegmentId','cdp_customer_id','listJourneysFromParentSegment','limit','exitInflux','parentFolder','journeyBundleName','timedOutPath','outtime_stage_','resumeJourney','sort','journeyBundleId','intime_goal','pause','filter','exitOrJumpRate','getBundle','80tAvEiT','7044AzYABX','segmentId','variants','updateJourney','set','waitCondition','conversion','time','add','paused','map','push','no-bundle-','conditions','createJourneyActivation','audienceId','has','getJourneyStatistics','length','listSegmentFolders','goalSize','activation','stage'];a131_0xf4be=function(){return _0x54c743;};return a131_0xf4be();}
|
|
1
|
+
function a131_0x2570(){const _0x58088d=['name','toLowerCase','conditions','includeAllVersions','state','idx-','WaitStep','activationStepsById','createActivation','INVALID_ARGUMENT','sort','getColumnMapping','exitCriteria','exit_criteria','conversion','4115178ycdNRQ','cdp_customer_id','createJourneyVersion','variant','5167221ftUeTb','goal','checkJourneyAppendable','30HFOosJ','draft','segmentFolderId','listSegmentFolders','map','string','4btczuL','getActivationSankeyChart','AbTest','getConversionSankeyChart','limit','applyVersionDeduplication','37983MnzKQO','exitInflux','branches','listActivations','JOURNEY_NOT_FOUND','entryCriteria','pauseJourney','timedOutPath','add','goalSize','outtime_stage_','goalInflux','data','launched','getJourneyActivation','description','Journey\x20not\x20found:\x20','paused','milestone','length','journeyBundleId','variants','entries','journeyStageId','382737yviKTe','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','latestJourneyId','journey','intime_journey','updatedAt','stage','getTrafficData','getJourney','out','resume','intime_stage_','has','reduce','getBundle','journey_','resumeJourney','flat','createdAt','versionNumber','exitCriterias','journeys','Excluded\x20profiles','intime_goal','9031314MdoliQ','segmentId','set','listJourneyActivations','history','entryInflux','parentFolder','steps','createJourney','cdp_audience_','journeyStages','values','replace','exitOrJumpRate','filter','getStatistics','pause','40BdObtx','Journey\x20activation\x20step\x20not\x20found:\x20','10596pQrZCS','client','_variant_','496236iKsxYy','waitCondition','activation','jumpInflux','NOT_FOUND','createJourneyActivation','attributes','listJourneysWithFolders','push','lastVersionNumber','relationships','audienceId','_exit_','getParentSegmentFull','time','all','DecisionPoint','getJourneyStatistics','simulation','step','\x20in\x20journey\x20','listJourneysWithDetails','enteredSize','9305984pdAhnJ','journeyId','fetchTrafficRaw','branch','from','getLatestJourneyId','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','type','getJourneyBundle','get','ABTest','7ZeDHgY','resolveJourneyId','listEntitiesByFolder','isArray','create','size','listJourneysFromParentSegment'];a131_0x2570=function(){return _0x58088d;};return a131_0x2570();}const a131_0x3dd182=a131_0x4f2e;(function(_0x1c6a82,_0x5bc3c8){const _0x20eda4=a131_0x4f2e,_0x3ca471=_0x1c6a82();while(!![]){try{const _0x2c7536=-parseInt(_0x20eda4(0x12c))/0x1*(parseInt(_0x20eda4(0x10e))/0x2)+-parseInt(_0x20eda4(0x196))/0x3+parseInt(_0x20eda4(0x15a))/0x4*(-parseInt(_0x20eda4(0x155))/0x5)+-parseInt(_0x20eda4(0x144))/0x6*(-parseInt(_0x20eda4(0x17c))/0x7)+parseInt(_0x20eda4(0x171))/0x8+-parseInt(_0x20eda4(0x192))/0x9*(parseInt(_0x20eda4(0x199))/0xa)+-parseInt(_0x20eda4(0x114))/0xb*(-parseInt(_0x20eda4(0x157))/0xc);if(_0x2c7536===_0x5bc3c8)break;else _0x3ca471['push'](_0x3ca471['shift']());}catch(_0x393431){_0x3ca471['push'](_0x3ca471['shift']());}}}(a131_0x2570,0xd346b));function a131_0x4f2e(_0x490407,_0x2e6a1c){_0x490407=_0x490407-0x10d;const _0x2570e5=a131_0x2570();let _0x4f2ef2=_0x2570e5[_0x490407];return _0x4f2ef2;}import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x414a4f){const _0x2d00fb=a131_0x4f2e;return _0x414a4f[_0x2d00fb(0x128)]??_0x414a4f[_0x2d00fb(0x160)]?.[_0x2d00fb(0x128)]??undefined;}function getVersionNumber(_0x18f2db){const _0x2cbcbb=a131_0x4f2e;return _0x18f2db[_0x2cbcbb(0x13f)]??_0x18f2db[_0x2cbcbb(0x160)]?.[_0x2cbcbb(0x13f)]??0x0;}function getState(_0x2fb83e){const _0x59292d=a131_0x4f2e;return _0x2fb83e['state']??_0x2fb83e[_0x59292d(0x160)]?.[_0x59292d(0x187)];}export function deduplicateJourneysByBundle(_0x59b7f8){const _0x1f88b2=a131_0x4f2e,_0x4ca76f=new Map();let _0x424b96=0x0;for(const _0x7016bc of _0x59b7f8){const _0x5b10e8=getBundleId(_0x7016bc);if(!_0x5b10e8){const _0x6e5081='no-bundle-'+(_0x7016bc['id']??_0x1f88b2(0x188)+_0x424b96++);_0x4ca76f[_0x1f88b2(0x146)](_0x6e5081,_0x7016bc);continue;}const _0x4b804d=_0x4ca76f[_0x1f88b2(0x17a)](_0x5b10e8);if(!_0x4b804d)_0x4ca76f[_0x1f88b2(0x146)](_0x5b10e8,_0x7016bc);else{const _0xfc6752=getState(_0x4b804d)===_0x1f88b2(0x121),_0x6d289=getState(_0x7016bc)==='launched';if(_0x6d289&&!_0xfc6752)_0x4ca76f[_0x1f88b2(0x146)](_0x5b10e8,_0x7016bc);else{if(!_0x6d289&&_0xfc6752){}else{const _0x51aee5=getVersionNumber(_0x4b804d),_0x2a44f4=getVersionNumber(_0x7016bc);_0x2a44f4>_0x51aee5&&_0x4ca76f[_0x1f88b2(0x146)](_0x5b10e8,_0x7016bc);}}}}return Array['from'](_0x4ca76f[_0x1f88b2(0x14f)]());}const VALID_JOURNEY_STATES=new Set(['draft',a131_0x3dd182(0x16c),'launched']);export function parseJourneyState(_0x468a99){const _0x54af27=a131_0x3dd182;if(typeof _0x468a99===_0x54af27(0x10d)&&VALID_JOURNEY_STATES[_0x54af27(0x138)](_0x468a99))return _0x468a99;return _0x54af27(0x19a);}export function entityToJourneyListItem(_0x2518f8,_0x338afd){const _0x530639=a131_0x3dd182,_0x5373d1=_0x2518f8['attributes'];return{'id':_0x2518f8['id'],'name':_0x5373d1['name']??'','journeyBundleName':_0x5373d1['journeyBundleName']??_0x5373d1[_0x530639(0x183)]??'','journeyBundleId':_0x5373d1[_0x530639(0x128)]??'','versionNumber':_0x5373d1['versionNumber'],'description':_0x5373d1[_0x530639(0x123)]??null,'state':parseJourneyState(_0x5373d1[_0x530639(0x187)]),'paused':_0x5373d1[_0x530639(0x125)]??![],'audienceId':_0x338afd,'folderId':_0x5373d1[_0x530639(0x19b)]??_0x2518f8[_0x530639(0x164)]?.[_0x530639(0x14a)]?.['data']?.['id']??null,'createdAt':_0x5373d1[_0x530639(0x13e)]??'','updatedAt':_0x5373d1['updatedAt']??''};}function convertToColumnId(_0x320564){const _0x492677=a131_0x3dd182;return _0x320564[_0x492677(0x150)](/-/g,'_');}function getStepEntries(_0x3a1a1d){const _0x41caa7=a131_0x3dd182;if(!_0x3a1a1d)return[];if(Array[_0x41caa7(0x17f)](_0x3a1a1d))return _0x3a1a1d[_0x41caa7(0x19d)](_0x29ee1e=>[_0x29ee1e['id'],_0x29ee1e]);return Object[_0x41caa7(0x12a)](_0x3a1a1d);}export function flattenJourneyActivation(_0x56d3d9){const _0x3f2ac5=a131_0x3dd182,{activationParams:_0x163b76,activationId:_0x4711a2,runAfterJourneyRefresh:_0x40ed08}=_0x56d3d9[_0x3f2ac5(0x160)];return{'id':_0x56d3d9['id'],'activationId':_0x4711a2,'runAfterJourneyRefresh':_0x40ed08,..._0x163b76};}function col(_0x7e5bb7,_0x3fecc8={}){return{'column':_0x7e5bb7,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x3fecc8};}export function generateColumnMapping(_0x299a31){const _0x335f2d=a131_0x3dd182,_0x11bd46=[];_0x11bd46['push'](col(_0x335f2d(0x193))),_0x11bd46[_0x335f2d(0x162)](col(_0x335f2d(0x130),{'direction':'in','category':'journey'})),_0x11bd46[_0x335f2d(0x162)](col('outtime_journey',{'direction':_0x335f2d(0x135),'category':_0x335f2d(0x12f)}));_0x299a31[_0x335f2d(0x160)][_0x335f2d(0x197)]&&_0x11bd46['push'](col(_0x335f2d(0x143),{'direction':'in','category':_0x335f2d(0x197),'detail':_0x299a31[_0x335f2d(0x160)][_0x335f2d(0x197)][_0x335f2d(0x183)]||null}));const _0x3d0110=_0x299a31[_0x335f2d(0x160)]['journeyStages']||[];for(let _0x38fc83=0x0;_0x38fc83<_0x3d0110['length'];_0x38fc83++){const _0x2dcf35=_0x3d0110[_0x38fc83],_0x3ccfe9=_0x2dcf35[_0x335f2d(0x183)],_0x40bcdd={'stageIndex':_0x38fc83,'stageName':_0x3ccfe9},_0x3cb9b8=_0x2dcf35[_0x335f2d(0x119)]?.[_0x335f2d(0x183)]||null;_0x11bd46['push'](col(_0x335f2d(0x137)+_0x38fc83,{..._0x40bcdd,'direction':'in','category':_0x335f2d(0x132),'detail':_0x3cb9b8})),_0x11bd46['push'](col(_0x335f2d(0x11e)+_0x38fc83,{..._0x40bcdd,'direction':_0x335f2d(0x135),'category':'stage','detail':_0x3cb9b8}));_0x2dcf35[_0x335f2d(0x126)]&&_0x11bd46[_0x335f2d(0x162)](col(_0x335f2d(0x137)+_0x38fc83+'_milestone',{..._0x40bcdd,'direction':'in','category':_0x335f2d(0x126),'detail':_0x2dcf35['milestone'][_0x335f2d(0x183)]||null}));const _0x46c985=_0x2dcf35[_0x335f2d(0x140)]||_0x2dcf35[_0x335f2d(0x18f)]||[];for(let _0xdece0d=0x0;_0xdece0d<_0x46c985['length'];_0xdece0d++){_0x11bd46['push'](col('intime_stage_'+_0x38fc83+_0x335f2d(0x166)+_0xdece0d,{..._0x40bcdd,'direction':'in','category':_0x335f2d(0x190),'detail':_0x46c985[_0xdece0d]['name']||null}));}const _0x47b4d0=getStepEntries(_0x2dcf35[_0x335f2d(0x14b)]);for(const [_0x4134bb,_0x51759d]of _0x47b4d0){const _0x57243b=convertToColumnId(_0x4134bb),_0x4682a3=_0x51759d['type']||null,_0x4d63a9=_0x51759d[_0x335f2d(0x183)]||null,_0x2ce9cc={..._0x40bcdd,'stepType':_0x4682a3,'stepName':_0x4d63a9,'stepId':_0x4134bb};_0x11bd46[_0x335f2d(0x162)](col('intime_stage_'+_0x38fc83+'_'+_0x57243b,{..._0x2ce9cc,'direction':'in','category':_0x335f2d(0x16d)})),_0x11bd46[_0x335f2d(0x162)](col('outtime_stage_'+_0x38fc83+'_'+_0x57243b,{..._0x2ce9cc,'direction':_0x335f2d(0x135),'category':'step'}));if(_0x51759d[_0x335f2d(0x178)]===_0x335f2d(0x16a)&&_0x51759d[_0x335f2d(0x116)])for(const _0x2080ca of _0x51759d[_0x335f2d(0x116)]){_0x2080ca[_0x335f2d(0x145)]&&_0x11bd46[_0x335f2d(0x162)](col('intime_stage_'+_0x38fc83+'_'+_0x57243b+'_'+_0x2080ca[_0x335f2d(0x145)],{..._0x2ce9cc,'direction':'in','category':_0x335f2d(0x174),'detail':_0x2080ca['name']||(_0x2080ca['excluded']?_0x335f2d(0x142):null)}));}if((_0x51759d[_0x335f2d(0x178)]===_0x335f2d(0x110)||_0x51759d[_0x335f2d(0x178)]===_0x335f2d(0x17b))&&_0x51759d['variants'])for(const _0x37fe23 of _0x51759d[_0x335f2d(0x129)]){_0x37fe23['id']&&_0x11bd46['push'](col('intime_stage_'+_0x38fc83+'_'+_0x57243b+_0x335f2d(0x159)+convertToColumnId(_0x37fe23['id']),{..._0x2ce9cc,'direction':'in','category':_0x335f2d(0x195),'detail':_0x37fe23[_0x335f2d(0x183)]||null}));}if(_0x51759d[_0x335f2d(0x178)]===_0x335f2d(0x189)||_0x51759d[_0x335f2d(0x178)]==='Wait'){const _0x4020a5=[];if(_0x51759d['conditionSegmentId'])_0x4020a5[_0x335f2d(0x162)](_0x51759d['conditionSegmentId']);else{if(Array['isArray'](_0x51759d[_0x335f2d(0x185)]))for(const _0x4b90b9 of _0x51759d[_0x335f2d(0x185)]){_0x4b90b9[_0x335f2d(0x145)]&&!_0x4b90b9[_0x335f2d(0x11b)]&&_0x4020a5[_0x335f2d(0x162)](_0x4b90b9[_0x335f2d(0x145)]);}else _0x51759d[_0x335f2d(0x15b)]?.[_0x335f2d(0x145)]&&_0x4020a5[_0x335f2d(0x162)](_0x51759d[_0x335f2d(0x15b)][_0x335f2d(0x145)]);}for(const _0x4ca80e of _0x4020a5){_0x11bd46[_0x335f2d(0x162)](col('intime_stage_'+_0x38fc83+'_'+_0x57243b+'_'+_0x4ca80e,{..._0x2ce9cc,'direction':'in','category':'branch'}));}}}}return _0x11bd46[_0x335f2d(0x162)](col(_0x335f2d(0x168))),_0x11bd46;}export function aggregateJourneyHistory(_0x390710){const _0x140e50=a131_0x3dd182,_0x2c5e79=_0x390710[_0x140e50(0x139)]((_0x35c814,_0x29b134)=>_0x35c814+(_0x29b134[_0x140e50(0x149)]??0x0),0x0),_0x581140=_0x390710[_0x140e50(0x139)]((_0x339228,_0x37ad1f)=>_0x339228+(_0x37ad1f[_0x140e50(0x11f)]??0x0),0x0),_0xff1461=_0x390710[_0x140e50(0x139)]((_0x59bffa,_0x465c61)=>_0x59bffa+((_0x465c61[_0x140e50(0x115)]??0x0)+(_0x465c61[_0x140e50(0x15d)]??0x0)),0x0),_0x41508f=_0x390710[_0x390710[_0x140e50(0x127)]-0x1];return{'size':_0x41508f?.[_0x140e50(0x181)]??0x0,'entered':_0x2c5e79,'goal_achieved':_0x581140,'completion_rate':_0x581140&&_0x2c5e79?_0x581140/_0x2c5e79*0x64:0x0,'exit_or_jump':_0xff1461,'exit_or_jump_rate':_0xff1461&&_0x2c5e79?_0xff1461/_0x2c5e79*0x64:0x0};}export function aggregateStageHistory(_0x1b76a4){const _0x315828=a131_0x3dd182,_0x2c173e=_0x1b76a4['reduce']((_0x551122,_0x56c71c)=>_0x551122+(_0x56c71c['entryInflux']??0x0),0x0),_0x38d2f9=_0x1b76a4[_0x315828(0x139)]((_0x712ba7,_0x1a260)=>_0x712ba7+(_0x1a260['milestoneInflux']??0x0),0x0),_0x4aec44=_0x1b76a4['reduce']((_0xfba5e7,_0x2cfe38)=>_0xfba5e7+((_0x2cfe38[_0x315828(0x115)]??0x0)+(_0x2cfe38[_0x315828(0x15d)]??0x0)),0x0),_0x1bb368=_0x1b76a4[_0x1b76a4['length']-0x1];return{'size':_0x1bb368?.[_0x315828(0x181)]??0x0,'entered':_0x2c173e,'milestone':_0x38d2f9,'milestone_rate':_0x38d2f9&&_0x2c173e?_0x38d2f9/_0x2c173e*0x64:0x0,'exit_or_jump':_0x4aec44,'exit_or_jump_rate':_0x4aec44&&_0x2c173e?_0x4aec44/_0x2c173e*0x64:0x0};}export function assembleJourneyStats(_0x31c349,_0x480791){const _0x3bb134=a131_0x3dd182,_0x51f7aa=!!(_0x480791?.[_0x3bb134(0x175)]||_0x480791?.['to'])&&!!_0x31c349['history']?.[_0x3bb134(0x127)];if(_0x51f7aa){const _0x45d415=aggregateJourneyHistory(_0x31c349[_0x3bb134(0x148)]),_0x378c9c={'journey_id':_0x31c349[_0x3bb134(0x172)],..._0x480791?.[_0x3bb134(0x175)]&&{'from':_0x480791[_0x3bb134(0x175)]},..._0x480791?.['to']&&{'to':_0x480791['to']},..._0x45d415};return _0x480791?.['includeHistory']&&(_0x378c9c[_0x3bb134(0x148)]=_0x31c349['history']),_0x378c9c;}return{'journey_id':_0x31c349[_0x3bb134(0x172)],'size':_0x31c349[_0x3bb134(0x181)],'entered':_0x31c349[_0x3bb134(0x170)],'goal_achieved':_0x31c349[_0x3bb134(0x11d)],'completion_rate':_0x31c349['completionRate'],'exit_or_jump':_0x31c349['exitOrJumpSize'],'exit_or_jump_rate':_0x31c349[_0x3bb134(0x151)]};}export function formatVersionsFromBundle(_0x529f12){const _0xf468b6=a131_0x3dd182,_0x18adbe=_0x529f12[_0xf468b6(0x141)]['map'](_0x17f5c3=>({'journeyId':_0x17f5c3['id'],'versionNumber':_0x17f5c3[_0xf468b6(0x160)][_0xf468b6(0x13f)]??0x0,'name':_0x17f5c3[_0xf468b6(0x160)][_0xf468b6(0x183)],'state':_0x17f5c3[_0xf468b6(0x160)][_0xf468b6(0x187)],'paused':_0x17f5c3['attributes'][_0xf468b6(0x125)],'createdAt':_0x17f5c3[_0xf468b6(0x160)][_0xf468b6(0x13e)],'updatedAt':_0x17f5c3[_0xf468b6(0x160)][_0xf468b6(0x131)]}));return _0x18adbe[_0xf468b6(0x18d)]((_0x75992f,_0x2e4f08)=>_0x75992f[_0xf468b6(0x13f)]-_0x2e4f08['versionNumber']),_0x18adbe;}export function synthesizePreBundleVersion(_0x45a017){const _0x3e41ab=a131_0x3dd182;return{'journeyId':_0x45a017['id'],'versionNumber':0x1,'name':_0x45a017[_0x3e41ab(0x160)]['name'],'state':_0x45a017[_0x3e41ab(0x160)][_0x3e41ab(0x187)],'paused':_0x45a017[_0x3e41ab(0x160)][_0x3e41ab(0x125)],'createdAt':_0x45a017[_0x3e41ab(0x160)][_0x3e41ab(0x13e)],'updatedAt':_0x45a017['attributes'][_0x3e41ab(0x131)]};}export function buildStageNameMap(_0xcb1a1d){const _0x3c6c3a=a131_0x3dd182;return new Map(_0xcb1a1d['attributes'][_0x3c6c3a(0x14e)]?.[_0x3c6c3a(0x19d)](_0x257a23=>[_0x257a23['id'],_0x257a23['name']])??[]);}export class JourneySDK{[a131_0x3dd182(0x158)];constructor(_0x4fdcb0){const _0x2e4ee2=a131_0x3dd182;this[_0x2e4ee2(0x158)]=new CDPApiClient(_0x4fdcb0);}[a131_0x3dd182(0x113)](_0x4af0e0,_0x563f96){return _0x563f96?_0x4af0e0:deduplicateJourneysByBundle(_0x4af0e0);}async['listJourneysWithDetails'](_0x4dc867,_0x51c3fb){const _0x60af74=a131_0x3dd182;try{const _0x1e52de=await this['client'][_0x60af74(0x16f)](_0x4dc867);return{'journeys':this['applyVersionDeduplication'](_0x1e52de[_0x60af74(0x141)],_0x51c3fb),'activationStepsById':_0x1e52de[_0x60af74(0x18a)]};}catch(_0x3d695d){if(isHttp404Error(_0x3d695d))return{'journeys':[],'activationStepsById':new Map()};throw _0x3d695d;}}async[a131_0x3dd182(0x182)](_0x5839cc,_0x3f8bb1,_0x92102a){const _0x2eeae9=a131_0x3dd182;let _0x32bd42=_0x3f8bb1;if(!_0x32bd42)try{const _0x27de6b=await this[_0x2eeae9(0x158)][_0x2eeae9(0x167)](_0x5839cc);_0x32bd42=_0x27de6b['rootFolderId']??undefined;}catch(_0x3306ac){if(isHttp404Error(_0x3306ac))return[];throw _0x3306ac;}if(!_0x32bd42)return[];let _0x2a8881;if(_0x92102a?.[_0x2eeae9(0x186)]){const _0x9512b3=await this[_0x2eeae9(0x158)][_0x2eeae9(0x19c)](_0x5839cc),_0xbfab7e=_0x9512b3[_0x2eeae9(0x19d)](_0x2afa9f=>this[_0x2eeae9(0x158)]['listJourneys'](_0x2afa9f['id'])),_0x4d54a2=await Promise['all'](_0xbfab7e),_0x12c6c8=new Set();_0x2a8881=_0x4d54a2[_0x2eeae9(0x13d)]()['filter'](_0x68745=>{const _0x3e9525=_0x2eeae9;if(_0x12c6c8['has'](_0x68745['id']))return![];return _0x12c6c8[_0x3e9525(0x11c)](_0x68745['id']),!![];});}else{const _0x5431eb=await this['client']['listEntitiesByFolder'](_0x32bd42,0x20,![]),_0x2a60b3=_0x5431eb[_0x2eeae9(0x120)],_0x34f544=_0x2a60b3['filter'](_0x297ecb=>_0x297ecb[_0x2eeae9(0x178)]==='journey');_0x2a8881=_0x34f544['map'](_0x18207a=>entityToJourneyListItem(_0x18207a,_0x5839cc));}return this['applyVersionDeduplication'](_0x2a8881,_0x92102a?.[_0x2eeae9(0x186)]);}async[a131_0x3dd182(0x161)](_0x490cfd,_0x39bea8,_0x87f42b){const _0x53f8fb=a131_0x3dd182;if(!_0x39bea8)return{'journeys':[],'folders':[]};const _0x196b99=await this['client'][_0x53f8fb(0x17e)](_0x39bea8,0x20,![]),_0x193e59=_0x196b99[_0x53f8fb(0x120)],_0x4e7e29=_0x193e59['filter'](_0x360e00=>_0x360e00[_0x53f8fb(0x178)]==='folder-segment'&&_0x360e00['id']!==_0x39bea8),_0x42e4ee=_0x4e7e29[_0x53f8fb(0x19d)](_0x68a231=>({'id':_0x68a231['id'],'name':_0x68a231['attributes'][_0x53f8fb(0x183)]})),_0x2b1516=_0x193e59[_0x53f8fb(0x152)](_0x4585ec=>_0x4585ec['type']===_0x53f8fb(0x12f)),_0x5e465c=_0x2b1516[_0x53f8fb(0x19d)](_0x443ca9=>entityToJourneyListItem(_0x443ca9,_0x490cfd));return{'journeys':this[_0x53f8fb(0x113)](_0x5e465c,_0x87f42b?.[_0x53f8fb(0x186)]),'folders':_0x42e4ee};}async['listJourneysWithDetailsFromParentSegment'](_0x2304f3,_0x16a9ba){const _0x14bd98=a131_0x3dd182;let _0x1da8ea;try{_0x1da8ea=await this['client'][_0x14bd98(0x19c)](_0x2304f3);}catch(_0x8f9494){if(isHttp404Error(_0x8f9494))return{'journeys':[],'activationStepsById':new Map()};throw _0x8f9494;}const _0x398ee1=_0x1da8ea[_0x14bd98(0x19d)](async _0x362282=>{const _0x141d99=_0x14bd98;return await this[_0x141d99(0x16f)](_0x362282['id'],_0x16a9ba?.['includeAllVersions']);}),_0x104167=await Promise[_0x14bd98(0x169)](_0x398ee1),_0x2398a6=new Map(),_0x14fd14=[];for(const _0xae4a7d of _0x104167){_0x14fd14[_0x14bd98(0x162)](..._0xae4a7d[_0x14bd98(0x141)]);for(const [_0x102c00,_0x3b8d15]of _0xae4a7d[_0x14bd98(0x18a)]){_0x2398a6[_0x14bd98(0x146)](_0x102c00,_0x3b8d15);}}const _0x34e016=new Set(),_0x3fc1cf=_0x14fd14[_0x14bd98(0x152)](_0x5d0d25=>{const _0x35d1f6=_0x14bd98;if(_0x34e016[_0x35d1f6(0x138)](_0x5d0d25['id']))return![];return _0x34e016['add'](_0x5d0d25['id']),!![];});return{'journeys':this[_0x14bd98(0x113)](_0x3fc1cf,_0x16a9ba?.['includeAllVersions']),'activationStepsById':_0x2398a6};}async[a131_0x3dd182(0x134)](_0x5be187){const _0x3a9055=a131_0x3dd182;try{return await this[_0x3a9055(0x158)][_0x3a9055(0x134)](_0x5be187);}catch(_0x4d83f4){if(isHttp404Error(_0x4d83f4))throw new SDKError(ErrorCode[_0x3a9055(0x118)],'Journey\x20not\x20found:\x20'+_0x5be187,_0x4d83f4);throw _0x4d83f4;}}async[a131_0x3dd182(0x17d)](_0x5a8aaa,_0x30d48e){const _0x53ef34=a131_0x3dd182,_0x288076=await this[_0x53ef34(0x182)](_0x5a8aaa),_0x2a1dc8=_0x288076['find'](_0x5f5039=>_0x5f5039['journeyBundleName']['toLowerCase']()===_0x30d48e[_0x53ef34(0x184)]());if(!_0x2a1dc8)throw new SDKError(ErrorCode[_0x53ef34(0x118)],_0x53ef34(0x124)+_0x30d48e,undefined,{'helpText':_0x53ef34(0x177)});return _0x2a1dc8['id'];}async[a131_0x3dd182(0x153)](_0x3ea28c,_0x74f301){const _0x178f23=a131_0x3dd182;try{return await this[_0x178f23(0x158)][_0x178f23(0x16b)](_0x3ea28c,_0x74f301);}catch(_0x342a3d){if(isHttp404Error(_0x342a3d))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x178f23(0x124)+_0x3ea28c,_0x342a3d);throw _0x342a3d;}}async[a131_0x3dd182(0x133)](_0x2c4b73,_0xb75d92){const _0x1073d0=a131_0x3dd182,_0x3165bc={'from':_0xb75d92?.[_0x1073d0(0x175)],'to':_0xb75d92?.['to'],'limit':_0xb75d92?.[_0x1073d0(0x112)]},_0x5a91a2=_0xb75d92?.['type']!==_0x1073d0(0x191);try{const [_0x4e7124,_0x269e9b]=await Promise[_0x1073d0(0x169)]([this[_0x1073d0(0x173)](_0x2c4b73,_0xb75d92?.[_0x1073d0(0x178)],_0x3165bc),_0x5a91a2?this[_0x1073d0(0x134)](_0x2c4b73):undefined]);if(_0x4e7124[_0x1073d0(0x15c)]&&_0x269e9b){const _0x5aa989=buildStageNameMap(_0x269e9b);_0x4e7124['activation']=_0x4e7124[_0x1073d0(0x15c)][_0x1073d0(0x19d)](_0x1a18bd=>({..._0x1a18bd,'journeyStageName':_0x5aa989['get'](_0x1a18bd['journeyStageId'])??_0x1a18bd[_0x1073d0(0x12b)]}));}return _0x4e7124;}catch(_0x296db7){if(isHttp404Error(_0x296db7))throw new SDKError(ErrorCode[_0x1073d0(0x118)],_0x1073d0(0x124)+_0x2c4b73,_0x296db7);throw _0x296db7;}}async[a131_0x3dd182(0x173)](_0x4618a3,_0x2d302e,_0x37313b){const _0x4b41d6=a131_0x3dd182;if(_0x2d302e==='conversion'){const _0xf035a0=await this[_0x4b41d6(0x158)][_0x4b41d6(0x111)](_0x4618a3,_0x37313b);return{'conversion':_0xf035a0};}if(_0x2d302e===_0x4b41d6(0x15c)){const _0x262c96=await this[_0x4b41d6(0x158)][_0x4b41d6(0x10f)](_0x4618a3,_0x37313b);return{'activation':_0x262c96};}const [_0x18747f,_0xfd339c]=await Promise[_0x4b41d6(0x169)]([this[_0x4b41d6(0x158)][_0x4b41d6(0x111)](_0x4618a3,_0x37313b),this[_0x4b41d6(0x158)][_0x4b41d6(0x10f)](_0x4618a3,_0x37313b)]);return{'conversion':_0x18747f,'activation':_0xfd339c};}async[a131_0x3dd182(0x154)](_0x5bb414){const _0x590325=a131_0x3dd182;try{return await this['client'][_0x590325(0x11a)](_0x5bb414);}catch(_0x201831){if(isHttp404Error(_0x201831))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x590325(0x124)+_0x5bb414,_0x201831);throw _0x201831;}}async[a131_0x3dd182(0x136)](_0x411c37){const _0x211a22=a131_0x3dd182;try{return await this['client'][_0x211a22(0x13c)](_0x411c37);}catch(_0xdd9f5a){if(isHttp404Error(_0xdd9f5a))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x211a22(0x124)+_0x411c37,_0xdd9f5a);throw _0xdd9f5a;}}async[a131_0x3dd182(0x180)](_0x860ca7){const _0x40ee1b=a131_0x3dd182;return await this[_0x40ee1b(0x158)][_0x40ee1b(0x14c)](_0x860ca7);}async['update'](_0x199195,_0x236aaf){const _0x527ab8=a131_0x3dd182;try{return await this[_0x527ab8(0x158)]['updateJourney'](_0x199195,_0x236aaf);}catch(_0x41872c){if(isHttp404Error(_0x41872c))throw new SDKError(ErrorCode[_0x527ab8(0x118)],_0x527ab8(0x124)+_0x199195,_0x41872c);throw _0x41872c;}}async['getActivation'](_0x5b7ea1,_0x5af66b){const _0x1c2c20=a131_0x3dd182;try{return await this[_0x1c2c20(0x158)][_0x1c2c20(0x122)](_0x5b7ea1,_0x5af66b);}catch(_0x79266d){if(isHttp404Error(_0x79266d))throw new SDKError(ErrorCode[_0x1c2c20(0x15e)],_0x1c2c20(0x156)+_0x5af66b+_0x1c2c20(0x16e)+_0x5b7ea1,_0x79266d);throw _0x79266d;}}async[a131_0x3dd182(0x117)](_0x28935d){const _0x25f742=a131_0x3dd182;try{return await this[_0x25f742(0x158)][_0x25f742(0x147)](_0x28935d);}catch(_0x3a319c){if(isHttp404Error(_0x3a319c))return[];throw _0x3a319c;}}async['listActivationsFlat'](_0x3c661f){const _0x59d32d=a131_0x3dd182,_0x578d94=await this[_0x59d32d(0x117)](_0x3c661f);return _0x578d94[_0x59d32d(0x19d)](flattenJourneyActivation);}async[a131_0x3dd182(0x18b)](_0x4e2446,_0x389060){const _0x1238f1=a131_0x3dd182;return await this[_0x1238f1(0x158)][_0x1238f1(0x15f)](_0x4e2446,_0x389060);}async[a131_0x3dd182(0x18e)](_0x3e8ddf){const _0x468581=a131_0x3dd182,_0x53fb51=await this[_0x468581(0x134)](_0x3e8ddf),_0x276459=generateColumnMapping(_0x53fb51);return{'journeyId':_0x53fb51['id'],'journeyName':_0x53fb51[_0x468581(0x160)][_0x468581(0x183)],'database':_0x468581(0x14d)+_0x53fb51[_0x468581(0x160)][_0x468581(0x165)],'table':_0x468581(0x13b)+_0x53fb51['id'],'columns':_0x276459};}async[a131_0x3dd182(0x13a)](_0x213b50){const _0x1b5e23=a131_0x3dd182;return this['client'][_0x1b5e23(0x179)](_0x213b50);}async[a131_0x3dd182(0x176)](_0x7b9144){const _0x1f61a1=a131_0x3dd182;if(!_0x7b9144)return undefined;try{const _0x4b87e0=await this[_0x1f61a1(0x13a)](_0x7b9144);return _0x4b87e0[_0x1f61a1(0x12e)];}catch{return undefined;}}async['listVersions'](_0x5633e6){const _0x5ada17=a131_0x3dd182,_0x54bbdd=await this[_0x5ada17(0x134)](_0x5633e6),_0x32b1e3=_0x54bbdd['attributes'][_0x5ada17(0x128)];if(!_0x32b1e3)return{'bundleId':'','bundleName':_0x54bbdd[_0x5ada17(0x160)][_0x5ada17(0x183)],'bundleDescription':_0x54bbdd[_0x5ada17(0x160)]['description']??null,'latestJourneyId':_0x54bbdd['id'],'versions':[synthesizePreBundleVersion(_0x54bbdd)]};const _0x53a811=await this[_0x5ada17(0x13a)](_0x32b1e3);return{'bundleId':_0x32b1e3,'bundleName':_0x53a811[_0x5ada17(0x183)],'bundleDescription':_0x53a811[_0x5ada17(0x123)]??null,'latestJourneyId':_0x53a811[_0x5ada17(0x12e)],'versions':formatVersionsFromBundle(_0x53a811)};}async['createVersion'](_0x497bbe){const _0x113ebc=a131_0x3dd182,_0xe38540=await this[_0x113ebc(0x134)](_0x497bbe),_0x2d5308=_0xe38540['attributes'][_0x113ebc(0x128)];if(!_0x2d5308)throw new SDKError(ErrorCode[_0x113ebc(0x18c)],_0x113ebc(0x12d));await this[_0x113ebc(0x158)][_0x113ebc(0x198)](_0x2d5308);const _0x1b4be6=await this[_0x113ebc(0x158)][_0x113ebc(0x179)](_0x2d5308),_0x4b03c9=_0x1b4be6[_0x113ebc(0x183)]+'\x20v'+(_0x1b4be6[_0x113ebc(0x163)]+0x1);return this[_0x113ebc(0x158)][_0x113ebc(0x194)](_0x2d5308,{'sourceId':_0x497bbe,'attributes':{'name':_0x4b03c9}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a132_0x323f8f=a132_0x52e2;function a132_0x52e2(_0x33ad1c,_0x49722d){_0x33ad1c=_0x33ad1c-0x73;const _0x12fd52=a132_0x12fd();let _0x52e279=_0x12fd52[_0x33ad1c];return _0x52e279;}(function(_0x526bc5,_0x44632a){const _0x4771d4=a132_0x52e2,_0xfc00ec=_0x526bc5();while(!![]){try{const _0x864091=parseInt(_0x4771d4(0x79))/0x1*(parseInt(_0x4771d4(0x75))/0x2)+-parseInt(_0x4771d4(0x7a))/0x3+parseInt(_0x4771d4(0x76))/0x4+parseInt(_0x4771d4(0x81))/0x5+-parseInt(_0x4771d4(0x74))/0x6*(-parseInt(_0x4771d4(0x77))/0x7)+-parseInt(_0x4771d4(0x7d))/0x8+parseInt(_0x4771d4(0x7c))/0x9*(-parseInt(_0x4771d4(0x7e))/0xa);if(_0x864091===_0x44632a)break;else _0xfc00ec['push'](_0xfc00ec['shift']());}catch(_0x34d2ea){_0xfc00ec['push'](_0xfc00ec['shift']());}}}(a132_0x12fd,0x6e427));function a132_0x12fd(){const _0x3f53e2=['read','222bAAcBg','2CBMVGX','3359352XvnKTA','123592TjPDXB','last_chat_id','326047IRRmic','2244027MJxkCM','llm/chat','10041534QQsUzD','654456ArdIbx','10rTreRV','clear','write','2890040fRqCki'];a132_0x12fd=function(){return _0x3f53e2;};return a132_0x12fd();}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x323f8f(0x78),a132_0x323f8f(0x7b));export function saveLastChatId(_0xb6a7ba){const _0x3de273=a132_0x323f8f;chatIdCache[_0x3de273(0x80)](_0xb6a7ba);}export function loadLastChatId(){const _0x37bb85=a132_0x323f8f;return chatIdCache[_0x37bb85(0x73)]();}export function clearLastChatId(){const _0x324d81=a132_0x323f8f;chatIdCache[_0x324d81(0x7f)]();}
|