@treasuredata/tdx 2026.4.5 → 2026.4.6
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.d.ts +3 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +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.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 +1 -1
- 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.d.ts +2 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +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.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
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x4348dc=a126_0xfc08;(function(_0x2c1296,_0x4bb533){const _0x3712e4=a126_0xfc08,_0x434a70=_0x2c1296();while(!![]){try{const _0x56ca0e=parseInt(_0x3712e4(0x93))/0x1*(parseInt(_0x3712e4(0x94))/0x2)+-parseInt(_0x3712e4(0x9c))/0x3*(parseInt(_0x3712e4(0x82))/0x4)+parseInt(_0x3712e4(0x95))/0x5*(parseInt(_0x3712e4(0x92))/0x6)+parseInt(_0x3712e4(0x9d))/0x7*(-parseInt(_0x3712e4(0x81))/0x8)+parseInt(_0x3712e4(0x77))/0x9*(parseInt(_0x3712e4(0x99))/0xa)+parseInt(_0x3712e4(0x8d))/0xb+-parseInt(_0x3712e4(0x7f))/0xc;if(_0x56ca0e===_0x4bb533)break;else _0x434a70['push'](_0x434a70['shift']());}catch(_0x59b383){_0x434a70['push'](_0x434a70['shift']());}}}(a126_0x33ab,0xc2708));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';function a126_0xfc08(_0x184356,_0x1a864a){_0x184356=_0x184356-0x77;const _0x33ab22=a126_0x33ab();let _0xfc08d7=_0x33ab22[_0x184356];return _0xfc08d7;}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';export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./delivery.js';export*from'./connection.js';function a126_0x33ab(){const _0x358032=['_tdxInstance','apiKey','timeout','delivery','journey','24070224YSVSXJ','schedules','8QWdQob','25700bZdihF','cas','_connectionSDK','logLevel','llm','profile','query','create','isInitialized','personalization','user','5058108Igtqma','policy','api','engage','segment','84Fsywse','1KyOWsy','2426786Rpktca','498245jvVKvH','accessToken','connection','jobs','5710JeUDJk','init','catch','9IEMVcS','2714551WKoVsg','2223pApNDg','realtime','context'];a126_0x33ab=function(){return _0x358032;};return a126_0x33ab();}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{[a126_0x4348dc(0x79)];[a126_0x4348dc(0x88)];[a126_0x4348dc(0x91)];[a126_0x4348dc(0x7e)];['workflow'];[a126_0x4348dc(0x86)];[a126_0x4348dc(0x98)];[a126_0x4348dc(0x8c)];[a126_0x4348dc(0x90)];[a126_0x4348dc(0x7d)];[a126_0x4348dc(0x97)];[a126_0x4348dc(0x80)];[a126_0x4348dc(0x78)];[a126_0x4348dc(0x8b)];[a126_0x4348dc(0x8e)];['cas'];[a126_0x4348dc(0x8f)];static[a126_0x4348dc(0x89)](_0x4c26e8={}){const _0x26b8ad=a126_0x4348dc,_0x4366b2=resolveSite(_0x4c26e8['site']||'us01'),_0x1cb338=_0x4c26e8[_0x26b8ad(0x85)]??LogLevel['INFO'],_0x3fe6dd=_0x4c26e8[_0x26b8ad(0x87)];let _0x33ad0b=_0x4c26e8[_0x26b8ad(0x96)];!_0x33ad0b&&(_0x33ad0b=getAccessToken(_0x3fe6dd));let _0x2096e2=_0x4c26e8[_0x26b8ad(0x7b)];!_0x2096e2&&(loadUserConfigOnce(),_0x2096e2=getAPIKey(_0x3fe6dd));let _0x119b05=_0x4c26e8['proxy'];return!_0x119b05&&(_0x119b05=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger[_0x26b8ad(0x8a)]()&&Logger[_0x26b8ad(0x9a)]({'defaultLevel':_0x1cb338,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x26b8ad(0x9b)](()=>{}),new TDX({'site':_0x4366b2,'apiKey':_0x2096e2,'accessToken':_0x33ad0b,'logLevel':_0x1cb338,'profile':_0x3fe6dd,'proxy':_0x119b05,'timeout':_0x4c26e8[_0x26b8ad(0x7c)]});}constructor(_0x2c622e){const _0x29edcc=a126_0x4348dc;this['context']=_0x2c622e,this['query']=new QuerySDK(_0x2c622e),this[_0x29edcc(0x91)]=new SegmentSDK(_0x2c622e),this[_0x29edcc(0x7e)]=new JourneySDK(_0x2c622e),this['workflow']=new WorkflowSDK(_0x2c622e),this[_0x29edcc(0x86)]=new LLMSDK(_0x2c622e),this[_0x29edcc(0x98)]=new JobSDK(_0x2c622e),this[_0x29edcc(0x8c)]=new UserSDK(_0x2c622e),this['engage']=new EngageSDK(_0x2c622e),this[_0x29edcc(0x7d)]=new DeliverySDK(_0x2c622e),this[_0x29edcc(0x97)]=new ConnectionSDK(_0x2c622e),this[_0x29edcc(0x80)]=new ScheduleSDK(_0x2c622e),this[_0x29edcc(0x78)]=new RealtimeSDK(_0x2c622e),this[_0x29edcc(0x8b)]=new PersonalizationSDK(_0x2c622e),this[_0x29edcc(0x8e)]=new PolicySDK(_0x2c622e),this[_0x29edcc(0x83)]=new CASSDK(_0x2c622e),this[_0x29edcc(0x8f)]=new RawAPI(_0x2c622e),this['segment'][_0x29edcc(0x7a)]=this,this['cas'][_0x29edcc(0x84)]=this[_0x29edcc(0x97)];}}
|
package/dist/sdk/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x370130,_0x2dbfbd){var _0x461c43=a127_0x5cc6,_0x2eb839=_0x370130();while(!![]){try{var _0xf51e36=-parseInt(_0x461c43(0x14c))/0x1*(-parseInt(_0x461c43(0x14b))/0x2)+-parseInt(_0x461c43(0x148))/0x3*(-parseInt(_0x461c43(0x146))/0x4)+parseInt(_0x461c43(0x143))/0x5*(parseInt(_0x461c43(0x147))/0x6)+parseInt(_0x461c43(0x14d))/0x7*(-parseInt(_0x461c43(0x145))/0x8)+parseInt(_0x461c43(0x14a))/0x9+parseInt(_0x461c43(0x144))/0xa+parseInt(_0x461c43(0x14e))/0xb*(-parseInt(_0x461c43(0x149))/0xc);if(_0xf51e36===_0x2dbfbd)break;else _0x2eb839['push'](_0x2eb839['shift']());}catch(_0x16429d){_0x2eb839['push'](_0x2eb839['shift']());}}}(a127_0x7514,0x4d1ff));function a127_0x7514(){var _0x1f50c0=['873452GUFGnL','6HQbFTG','3CwvUSA','360492Brxfat','5550111qMnOlu','2IIQOnU','549975YXKBmU','7zSWkfr','517sHPWjt','509935JFCwXt','2447910ZEufZm','31720qNSBLL'];a127_0x7514=function(){return _0x1f50c0;};return a127_0x7514();}function a127_0x5cc6(_0x64f518,_0x16853f){_0x64f518=_0x64f518-0x143;var _0x7514e2=a127_0x7514();var _0x5cc686=_0x7514e2[_0x64f518];return _0x5cc686;}export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a128_0x4753(){const _0x20635f=['16DKcdFY','941133DUCrdQ','writeFileSync','unlinkSync','430eajiPA','mkdirSync','isDirectory','utf-8','1708312gdTugy','20VpKwey','mkdir','readdirSync','stat','readdir','writeFile','109769BePTkl','10790801GrUUWM','6724782TdISQK','304365HPeGzm','2998338RAzBlf','readFile','access','2XqxFTD','isFile'];a128_0x4753=function(){return _0x20635f;};return a128_0x4753();}const a128_0x2aca42=a128_0x366b;(function(_0xebd8cc,_0x448f46){const _0x402c6a=a128_0x366b,_0x2397a0=_0xebd8cc();while(!![]){try{const _0x659d1e=parseInt(_0x402c6a(0x10b))/0x1*(-parseInt(_0x402c6a(0xfd))/0x2)+-parseInt(_0x402c6a(0x10e))/0x3*(-parseInt(_0x402c6a(0xfe))/0x4)+parseInt(_0x402c6a(0x107))/0x5+parseInt(_0x402c6a(0x108))/0x6+parseInt(_0x402c6a(0x105))/0x7+parseInt(_0x402c6a(0x10d))/0x8*(-parseInt(_0x402c6a(0x106))/0x9)+parseInt(_0x402c6a(0xf9))/0xa*(parseInt(_0x402c6a(0x104))/0xb);if(_0x659d1e===_0x448f46)break;else _0x2397a0['push'](_0x2397a0['shift']());}catch(_0x30f71c){_0x2397a0['push'](_0x2397a0['shift']());}}}(a128_0x4753,0xdb03b));import*as a128_0x5a0ff2 from'node:fs';import*as a128_0x66d4b5 from'node:fs/promises';function a128_0x366b(_0x41d251,_0x9aab06){_0x41d251=_0x41d251-0xf7;const _0x47530f=a128_0x4753();let _0x366bbb=_0x47530f[_0x41d251];return _0x366bbb;}export const nodeFileSystem={'readFile':_0x5f3f87=>a128_0x66d4b5[a128_0x2aca42(0x109)](_0x5f3f87,'utf-8'),'writeFile':(_0x2c7c6d,_0x21a939)=>a128_0x66d4b5[a128_0x2aca42(0x103)](_0x2c7c6d,_0x21a939,a128_0x2aca42(0xfc)),'exists':async _0x55ffb0=>{const _0x31edaa=a128_0x2aca42;try{return await a128_0x66d4b5[_0x31edaa(0x10a)](_0x55ffb0),!![];}catch{return![];}},'mkdir':async(_0x3cb6c3,_0x1c27fa)=>{const _0x918655=a128_0x2aca42;await a128_0x66d4b5[_0x918655(0xff)](_0x3cb6c3,_0x1c27fa);},'readdir':_0x279d5d=>a128_0x66d4b5[a128_0x2aca42(0x102)](_0x279d5d),'stat':async _0x492639=>{const _0x932bcf=a128_0x2aca42,_0x13f746=await a128_0x66d4b5[_0x932bcf(0x101)](_0x492639);return{'isDirectory':()=>_0x13f746[_0x932bcf(0xfb)](),'isFile':()=>_0x13f746[_0x932bcf(0x10c)]()};},'unlink':_0x4ec7f1=>a128_0x66d4b5['unlink'](_0x4ec7f1)};export const nodeFileSystemSync={'readFileSync':_0x38ddca=>a128_0x5a0ff2['readFileSync'](_0x38ddca,a128_0x2aca42(0xfc)),'writeFileSync':(_0x2bf5bc,_0x24c5fc)=>a128_0x5a0ff2[a128_0x2aca42(0xf7)](_0x2bf5bc,_0x24c5fc,a128_0x2aca42(0xfc)),'existsSync':_0x50ce5d=>a128_0x5a0ff2['existsSync'](_0x50ce5d),'mkdirSync':(_0x4d1734,_0x238605)=>{const _0x8ccc0c=a128_0x2aca42;a128_0x5a0ff2[_0x8ccc0c(0xfa)](_0x4d1734,_0x238605);},'readdirSync':_0x49526e=>a128_0x5a0ff2[a128_0x2aca42(0x100)](_0x49526e),'statSync':_0x65f23b=>{const _0x2e517e=a128_0x2aca42,_0x515e73=a128_0x5a0ff2['statSync'](_0x65f23b);return{'isDirectory':()=>_0x515e73['isDirectory'](),'isFile':()=>_0x515e73[_0x2e517e(0x10c)]()};},'unlinkSync':_0x3d7c5a=>a128_0x5a0ff2[a128_0x2aca42(0xf8)](_0x3d7c5a)};
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x638f14=a130_0x5cf2;(function(_0x35b289,_0x49a2d2){const _0x1cfcff=a130_0x5cf2,_0x945c89=_0x35b289();while(!![]){try{const _0x26b1dd=-parseInt(_0x1cfcff(0x98))/0x1*(parseInt(_0x1cfcff(0x96))/0x2)+parseInt(_0x1cfcff(0xaa))/0x3*(parseInt(_0x1cfcff(0xa9))/0x4)+-parseInt(_0x1cfcff(0xa5))/0x5*(parseInt(_0x1cfcff(0x9e))/0x6)+-parseInt(_0x1cfcff(0x97))/0x7+parseInt(_0x1cfcff(0x94))/0x8+-parseInt(_0x1cfcff(0xab))/0x9+parseInt(_0x1cfcff(0xa8))/0xa;if(_0x26b1dd===_0x49a2d2)break;else _0x945c89['push'](_0x945c89['shift']());}catch(_0x1385c1){_0x945c89['push'](_0x945c89['shift']());}}}(a130_0x4c54,0xc513a));import{TDApiClient}from'./client/td-api-client.js';function a130_0x4c54(){const _0x15c2bb=['4355451mVSWht','updated_at','client','replace','end_at','start_at','7052744saAxfl','created_at','2AFdqnB','10931228vdbfNu','421882RXlMgd','\x20UTC','getUserInfo','submitPrestoJob','trino','hive','6JhOiar','cancelJob','list','map','result','test','submit','277705eWEeXC','listJobs','submitHiveJob','21070220RGirTM','36EkobEC','113859LBcsdL'];a130_0x4c54=function(){return _0x15c2bb;};return a130_0x4c54();}function a130_0x5cf2(_0x106ce3,_0x19e025){_0x106ce3=_0x106ce3-0x94;const _0x4c54ca=a130_0x4c54();let _0x5cf2cc=_0x4c54ca[_0x106ce3];return _0x5cf2cc;}function normalizeTimestamp(_0x5b8dc1){const _0x2862be=a130_0x5cf2;if(!_0x5b8dc1)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x2862be(0xa3)](_0x5b8dc1))return _0x5b8dc1;return _0x5b8dc1[_0x2862be(0xae)](_0x2862be(0x99),'Z')[_0x2862be(0xae)]('\x20','T');}export class JobSDK{[a130_0x638f14(0xad)];constructor(_0x4ef048){this['client']=new TDApiClient(_0x4ef048);}async[a130_0x638f14(0xa0)](_0x2b6676){const _0x414997=a130_0x638f14,_0x44b9aa=await this[_0x414997(0xad)][_0x414997(0xa6)](_0x2b6676);return _0x44b9aa[_0x414997(0xa1)](_0x3ab2f6=>({..._0x3ab2f6,'created_at':normalizeTimestamp(_0x3ab2f6[_0x414997(0x95)]),'updated_at':normalizeTimestamp(_0x3ab2f6[_0x414997(0xac)]),'start_at':normalizeTimestamp(_0x3ab2f6['start_at']),'end_at':normalizeTimestamp(_0x3ab2f6[_0x414997(0xaf)])}));}async['show'](_0xc37e9a){const _0x530de5=a130_0x638f14,_0x1e4127=await this[_0x530de5(0xad)]['showJob'](_0xc37e9a);return{..._0x1e4127,'created_at':normalizeTimestamp(_0x1e4127[_0x530de5(0x95)]),'updated_at':normalizeTimestamp(_0x1e4127[_0x530de5(0xac)]),'start_at':normalizeTimestamp(_0x1e4127[_0x530de5(0xb0)]),'end_at':normalizeTimestamp(_0x1e4127[_0x530de5(0xaf)])};}async['kill'](_0x211c75){const _0x3a999b=a130_0x638f14;await this[_0x3a999b(0xad)][_0x3a999b(0x9f)](_0x211c75);}async[a130_0x638f14(0xa4)](_0x41457d,_0x5d73fa,_0x14f2e0=a130_0x638f14(0x9c),_0x5fc36a){const _0x20044a=a130_0x638f14;return _0x14f2e0===_0x20044a(0x9d)?await this[_0x20044a(0xad)][_0x20044a(0xa7)](_0x41457d,_0x5d73fa,_0x5fc36a):await this['client'][_0x20044a(0x9b)](_0x41457d,_0x5d73fa,_0x5fc36a);}async[a130_0x638f14(0xa2)](_0x5e0674){const _0x4334f9=a130_0x638f14;return await this[_0x4334f9(0xad)]['getJobResult'](_0x5e0674);}async[a130_0x638f14(0x9a)](){const _0x53e868=a130_0x638f14;return await this[_0x53e868(0xad)][_0x53e868(0x9a)]();}}
|
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0xf51ff9=a131_0x52cf;(function(_0x6b64d9,_0x246525){const _0x58d0bb=a131_0x52cf,_0x555dab=_0x6b64d9();while(!![]){try{const _0x30e8cd=-parseInt(_0x58d0bb(0x248))/0x1+-parseInt(_0x58d0bb(0x1de))/0x2*(-parseInt(_0x58d0bb(0x216))/0x3)+-parseInt(_0x58d0bb(0x242))/0x4+parseInt(_0x58d0bb(0x1f6))/0x5+parseInt(_0x58d0bb(0x1fb))/0x6*(parseInt(_0x58d0bb(0x1ea))/0x7)+parseInt(_0x58d0bb(0x24b))/0x8*(-parseInt(_0x58d0bb(0x238))/0x9)+parseInt(_0x58d0bb(0x22c))/0xa;if(_0x30e8cd===_0x246525)break;else _0x555dab['push'](_0x555dab['shift']());}catch(_0x31a858){_0x555dab['push'](_0x555dab['shift']());}}}(a131_0x4ed0,0xa1f3d));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function a131_0x4ed0(){const _0x254f66=['activation','42558Gjsfqg','_variant_','has','create','isArray','ABTest','listSegmentFolders','updatedAt','goalSize','segmentFolderId','listJourneyActivations','get','84868eJvZks','steps','getLatestJourneyId','createActivation','listEntitiesByFolder','listJourneys','goal','description','resolveJourneyId','exitOrJumpRate','outtime_journey','listJourneysWithFolders','1160470fXmqvI','latestJourneyId','intime_goal','branch','listActivationsFlat','72uuAAJK','pause','branches','includeHistory','set','getActivationSankeyChart','createJourneyVersion','flat','journeyStages','createdAt','variants','enteredSize','outtime_stage_','launched','size','simulation','pauseJourney','string','intime_stage_','exitInflux','paused','data','from','draft','step','attributes','add','132TEHVVl','stage','listJourneysWithDetailsFromParentSegment','getActivation','createVersion','exitCriterias','_milestone','getJourneyStatistics','includeAllVersions','conditionSegmentId','JOURNEY_NOT_FOUND','fixed','replace','name','listJourneysWithDetails','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','NOT_FOUND','cdp_audience_','relationships','all','rootFolderId','client','18453260DcVPsO','resumeJourney','conditions','intime_journey','INVALID_ARGUMENT','map','Journey\x20not\x20found:\x20','folder-segment','applyVersionDeduplication','type','checkJourneyAppendable','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','3798027UPpgIz','journeyBundleId','getBundle','push','journeyBundleName','resume','values','milestoneInflux','entryCriteria','milestone','3542708NZwUQP','audienceId','createJourneyActivation','getConversionSankeyChart','limit','journey','1188147XGBwDa','getJourney','entries','8IwsDiI','state','parentFolder','reduce','segmentId','createJourney','filter','toLowerCase','length','listActivations','conversion','listJourneysFromParentSegment','jumpInflux','goalInflux','\x20in\x20journey\x20','getJourneyBundle','no-bundle-','completionRate','getJourneyActivation','_exit_','out','cdp_customer_id','journeys','waitCondition','activationStepsById','journeyId','update','history','Journey\x20activation\x20step\x20not\x20found:\x20','listVersions','journeyStageId','WaitStep','versionNumber'];a131_0x4ed0=function(){return _0x254f66;};return a131_0x4ed0();}function getBundleId(_0x21b4a7){const _0x28087c=a131_0x52cf;return _0x21b4a7[_0x28087c(0x239)]??_0x21b4a7[_0x28087c(0x214)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0xcb9a0d){const _0x51e676=a131_0x52cf;return _0xcb9a0d[_0x51e676(0x1dc)]??_0xcb9a0d['attributes']?.[_0x51e676(0x1dc)]??0x0;}function getState(_0x4be1c0){const _0x37e9ad=a131_0x52cf;return _0x4be1c0[_0x37e9ad(0x24c)]??_0x4be1c0[_0x37e9ad(0x214)]?.[_0x37e9ad(0x24c)];}function a131_0x52cf(_0x3e487b,_0x142565){_0x3e487b=_0x3e487b-0x1cf;const _0x4ed08c=a131_0x4ed0();let _0x52cf1d=_0x4ed08c[_0x3e487b];return _0x52cf1d;}export function deduplicateJourneysByBundle(_0x4b7c9e){const _0x281cad=a131_0x52cf,_0x53cf08=new Map();let _0x588cdc=0x0;for(const _0x4fb059 of _0x4b7c9e){const _0x128b13=getBundleId(_0x4fb059);if(!_0x128b13){const _0x33d69b=_0x281cad(0x25b)+(_0x4fb059['id']??'idx-'+_0x588cdc++);_0x53cf08[_0x281cad(0x1ff)](_0x33d69b,_0x4fb059);continue;}const _0x332a47=_0x53cf08[_0x281cad(0x1e9)](_0x128b13);if(!_0x332a47)_0x53cf08[_0x281cad(0x1ff)](_0x128b13,_0x4fb059);else{const _0x4fc69f=getState(_0x332a47)==='launched',_0x187531=getState(_0x4fb059)===_0x281cad(0x208);if(_0x187531&&!_0x4fc69f)_0x53cf08['set'](_0x128b13,_0x4fb059);else{if(!_0x187531&&_0x4fc69f){}else{const _0x2459c0=getVersionNumber(_0x332a47),_0x2d961a=getVersionNumber(_0x4fb059);_0x2d961a>_0x2459c0&&_0x53cf08[_0x281cad(0x1ff)](_0x128b13,_0x4fb059);}}}}return Array[_0x281cad(0x211)](_0x53cf08[_0x281cad(0x23e)]());}const VALID_JOURNEY_STATES=new Set([a131_0xf51ff9(0x212),a131_0xf51ff9(0x20a),a131_0xf51ff9(0x208)]);export function parseJourneyState(_0x511b03){const _0x10d246=a131_0xf51ff9;if(typeof _0x511b03===_0x10d246(0x20c)&&VALID_JOURNEY_STATES[_0x10d246(0x1e0)](_0x511b03))return _0x511b03;return _0x10d246(0x212);}export function entityToJourneyListItem(_0x3521af,_0x281bfb){const _0x54cf08=a131_0xf51ff9,_0x492f9f=_0x3521af[_0x54cf08(0x214)];return{'id':_0x3521af['id'],'name':_0x492f9f[_0x54cf08(0x223)]??'','journeyBundleName':_0x492f9f[_0x54cf08(0x23c)]??_0x492f9f[_0x54cf08(0x223)]??'','journeyBundleId':_0x492f9f['journeyBundleId']??'','versionNumber':_0x492f9f[_0x54cf08(0x1dc)],'description':_0x492f9f[_0x54cf08(0x1f1)]??null,'state':parseJourneyState(_0x492f9f[_0x54cf08(0x24c)]),'paused':_0x492f9f[_0x54cf08(0x20f)]??![],'audienceId':_0x281bfb,'folderId':_0x492f9f[_0x54cf08(0x1e7)]??_0x3521af[_0x54cf08(0x228)]?.[_0x54cf08(0x24d)]?.[_0x54cf08(0x210)]?.['id']??null,'createdAt':_0x492f9f[_0x54cf08(0x204)]??'','updatedAt':_0x492f9f[_0x54cf08(0x1e5)]??''};}function convertToColumnId(_0x234d8f){const _0x56c836=a131_0xf51ff9;return _0x234d8f[_0x56c836(0x222)](/-/g,'_');}function getStepEntries(_0x309156){const _0x428ee7=a131_0xf51ff9;if(!_0x309156)return[];if(Array[_0x428ee7(0x1e2)](_0x309156))return _0x309156['map'](_0x28c93f=>[_0x28c93f['id'],_0x28c93f]);return Object[_0x428ee7(0x24a)](_0x309156);}export function flattenJourneyActivation(_0x1a3665){const _0x1a0daa=a131_0xf51ff9,{activationParams:_0x10cc15,activationId:_0x3d3853,runAfterJourneyRefresh:_0x2e72dd}=_0x1a3665[_0x1a0daa(0x214)];return{'id':_0x1a3665['id'],'activationId':_0x3d3853,'runAfterJourneyRefresh':_0x2e72dd,..._0x10cc15};}function col(_0x52e41b,_0x18a56f={}){const _0xf517a=a131_0xf51ff9;return{'column':_0x52e41b,'direction':null,'stageIndex':null,'stageName':null,'category':_0xf517a(0x221),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x18a56f};}export function generateColumnMapping(_0x236cc0){const _0x24fb20=a131_0xf51ff9,_0x384131=[];_0x384131[_0x24fb20(0x23b)](col(_0x24fb20(0x1d1))),_0x384131['push'](col(_0x24fb20(0x22f),{'direction':'in','category':'journey'})),_0x384131['push'](col(_0x24fb20(0x1f4),{'direction':_0x24fb20(0x1d0),'category':_0x24fb20(0x247)}));_0x236cc0[_0x24fb20(0x214)][_0x24fb20(0x1f0)]&&_0x384131['push'](col(_0x24fb20(0x1f8),{'direction':'in','category':_0x24fb20(0x1f0),'detail':_0x236cc0[_0x24fb20(0x214)][_0x24fb20(0x1f0)]['name']||null}));const _0x192bfc=_0x236cc0[_0x24fb20(0x214)][_0x24fb20(0x203)]||[];for(let _0x578923=0x0;_0x578923<_0x192bfc[_0x24fb20(0x253)];_0x578923++){const _0x141de7=_0x192bfc[_0x578923],_0x1cd487=_0x141de7[_0x24fb20(0x223)],_0x3e3685={'stageIndex':_0x578923,'stageName':_0x1cd487},_0x4ffb1d=_0x141de7[_0x24fb20(0x240)]?.['name']||null;_0x384131['push'](col(_0x24fb20(0x20d)+_0x578923,{..._0x3e3685,'direction':'in','category':'stage','detail':_0x4ffb1d})),_0x384131[_0x24fb20(0x23b)](col(_0x24fb20(0x207)+_0x578923,{..._0x3e3685,'direction':_0x24fb20(0x1d0),'category':_0x24fb20(0x217),'detail':_0x4ffb1d}));_0x141de7['milestone']&&_0x384131['push'](col(_0x24fb20(0x20d)+_0x578923+_0x24fb20(0x21c),{..._0x3e3685,'direction':'in','category':_0x24fb20(0x241),'detail':_0x141de7[_0x24fb20(0x241)][_0x24fb20(0x223)]||null}));const _0x45b966=_0x141de7[_0x24fb20(0x21b)]||_0x141de7['exitCriteria']||[];for(let _0xc4ecda=0x0;_0xc4ecda<_0x45b966[_0x24fb20(0x253)];_0xc4ecda++){_0x384131[_0x24fb20(0x23b)](col(_0x24fb20(0x20d)+_0x578923+_0x24fb20(0x1cf)+_0xc4ecda,{..._0x3e3685,'direction':'in','category':'exit_criteria','detail':_0x45b966[_0xc4ecda][_0x24fb20(0x223)]||null}));}const _0x340d08=getStepEntries(_0x141de7[_0x24fb20(0x1eb)]);for(const [_0x7818d3,_0xe3aabb]of _0x340d08){const _0x427b3e=convertToColumnId(_0x7818d3),_0x1e221c=_0xe3aabb['type']||null,_0x1995f3=_0xe3aabb['name']||null,_0x490cc4={..._0x3e3685,'stepType':_0x1e221c,'stepName':_0x1995f3,'stepId':_0x7818d3};_0x384131['push'](col('intime_stage_'+_0x578923+'_'+_0x427b3e,{..._0x490cc4,'direction':'in','category':_0x24fb20(0x213)})),_0x384131['push'](col('outtime_stage_'+_0x578923+'_'+_0x427b3e,{..._0x490cc4,'direction':_0x24fb20(0x1d0),'category':_0x24fb20(0x213)}));if(_0xe3aabb[_0x24fb20(0x235)]==='DecisionPoint'&&_0xe3aabb['branches'])for(const _0xcd72d3 of _0xe3aabb[_0x24fb20(0x1fd)]){_0xcd72d3[_0x24fb20(0x24f)]&&_0x384131[_0x24fb20(0x23b)](col(_0x24fb20(0x20d)+_0x578923+'_'+_0x427b3e+'_'+_0xcd72d3['segmentId'],{..._0x490cc4,'direction':'in','category':'branch','detail':_0xcd72d3[_0x24fb20(0x223)]||(_0xcd72d3['excluded']?'Excluded\x20profiles':null)}));}if((_0xe3aabb['type']==='AbTest'||_0xe3aabb[_0x24fb20(0x235)]===_0x24fb20(0x1e3))&&_0xe3aabb[_0x24fb20(0x205)])for(const _0x599c86 of _0xe3aabb['variants']){_0x599c86['id']&&_0x384131[_0x24fb20(0x23b)](col(_0x24fb20(0x20d)+_0x578923+'_'+_0x427b3e+_0x24fb20(0x1df)+convertToColumnId(_0x599c86['id']),{..._0x490cc4,'direction':'in','category':'variant','detail':_0x599c86[_0x24fb20(0x223)]||null}));}if(_0xe3aabb[_0x24fb20(0x235)]===_0x24fb20(0x1db)||_0xe3aabb[_0x24fb20(0x235)]==='Wait'){const _0x351ec0=[];if(_0xe3aabb[_0x24fb20(0x21f)])_0x351ec0[_0x24fb20(0x23b)](_0xe3aabb['conditionSegmentId']);else{if(Array[_0x24fb20(0x1e2)](_0xe3aabb[_0x24fb20(0x22e)]))for(const _0x28fa65 of _0xe3aabb[_0x24fb20(0x22e)]){_0x28fa65[_0x24fb20(0x24f)]&&!_0x28fa65['timedOutPath']&&_0x351ec0[_0x24fb20(0x23b)](_0x28fa65[_0x24fb20(0x24f)]);}else _0xe3aabb[_0x24fb20(0x1d3)]?.[_0x24fb20(0x24f)]&&_0x351ec0[_0x24fb20(0x23b)](_0xe3aabb[_0x24fb20(0x1d3)]['segmentId']);}for(const _0x2e58df of _0x351ec0){_0x384131[_0x24fb20(0x23b)](col('intime_stage_'+_0x578923+'_'+_0x427b3e+'_'+_0x2e58df,{..._0x490cc4,'direction':'in','category':_0x24fb20(0x1f9)}));}}}}return _0x384131[_0x24fb20(0x23b)](col('time')),_0x384131;}export function aggregateJourneyHistory(_0x2b3240){const _0x236781=a131_0xf51ff9,_0x38ade4=_0x2b3240['reduce']((_0x16b9f1,_0xaa3b07)=>_0x16b9f1+(_0xaa3b07['entryInflux']??0x0),0x0),_0x4c9faf=_0x2b3240[_0x236781(0x24e)]((_0x5c1bfe,_0x55689a)=>_0x5c1bfe+(_0x55689a[_0x236781(0x258)]??0x0),0x0),_0x36e916=_0x2b3240[_0x236781(0x24e)]((_0x2b608c,_0x534949)=>_0x2b608c+((_0x534949[_0x236781(0x20e)]??0x0)+(_0x534949['jumpInflux']??0x0)),0x0),_0x50dc0f=_0x2b3240[_0x2b3240[_0x236781(0x253)]-0x1];return{'size':_0x50dc0f?.['size']??0x0,'entered':_0x38ade4,'goal_achieved':_0x4c9faf,'completion_rate':_0x4c9faf&&_0x38ade4?_0x4c9faf/_0x38ade4*0x64:0x0,'exit_or_jump':_0x36e916,'exit_or_jump_rate':_0x36e916&&_0x38ade4?_0x36e916/_0x38ade4*0x64:0x0};}export function aggregateStageHistory(_0x422bd0){const _0x11cd4d=a131_0xf51ff9,_0x500639=_0x422bd0['reduce']((_0x301998,_0x3aa951)=>_0x301998+(_0x3aa951['entryInflux']??0x0),0x0),_0x27cb81=_0x422bd0['reduce']((_0x5b7af2,_0x13658a)=>_0x5b7af2+(_0x13658a[_0x11cd4d(0x23f)]??0x0),0x0),_0x287d5c=_0x422bd0[_0x11cd4d(0x24e)]((_0x450736,_0x5cce7e)=>_0x450736+((_0x5cce7e['exitInflux']??0x0)+(_0x5cce7e[_0x11cd4d(0x257)]??0x0)),0x0),_0x16d921=_0x422bd0[_0x422bd0[_0x11cd4d(0x253)]-0x1];return{'size':_0x16d921?.[_0x11cd4d(0x209)]??0x0,'entered':_0x500639,'milestone':_0x27cb81,'milestone_rate':_0x27cb81&&_0x500639?_0x27cb81/_0x500639*0x64:0x0,'exit_or_jump':_0x287d5c,'exit_or_jump_rate':_0x287d5c&&_0x500639?_0x287d5c/_0x500639*0x64:0x0};}export function assembleJourneyStats(_0xc2671f,_0x4b7e9d){const _0x23175e=a131_0xf51ff9,_0x423ee1=!!(_0x4b7e9d?.[_0x23175e(0x211)]||_0x4b7e9d?.['to'])&&!!_0xc2671f[_0x23175e(0x1d7)]?.[_0x23175e(0x253)];if(_0x423ee1){const _0x3db1d7=aggregateJourneyHistory(_0xc2671f['history']),_0x3dbbee={'journey_id':_0xc2671f['journeyId'],..._0x4b7e9d?.[_0x23175e(0x211)]&&{'from':_0x4b7e9d['from']},..._0x4b7e9d?.['to']&&{'to':_0x4b7e9d['to']},..._0x3db1d7};return _0x4b7e9d?.[_0x23175e(0x1fe)]&&(_0x3dbbee[_0x23175e(0x1d7)]=_0xc2671f['history']),_0x3dbbee;}return{'journey_id':_0xc2671f[_0x23175e(0x1d5)],'size':_0xc2671f[_0x23175e(0x209)],'entered':_0xc2671f[_0x23175e(0x206)],'goal_achieved':_0xc2671f[_0x23175e(0x1e6)],'completion_rate':_0xc2671f[_0x23175e(0x25c)],'exit_or_jump':_0xc2671f['exitOrJumpSize'],'exit_or_jump_rate':_0xc2671f[_0x23175e(0x1f3)]};}export function formatVersionsFromBundle(_0x1d4330){const _0x141e41=a131_0xf51ff9,_0x271732=_0x1d4330[_0x141e41(0x1d2)][_0x141e41(0x231)](_0x271768=>({'journeyId':_0x271768['id'],'versionNumber':_0x271768[_0x141e41(0x214)][_0x141e41(0x1dc)]??0x0,'name':_0x271768['attributes'][_0x141e41(0x223)],'state':_0x271768[_0x141e41(0x214)][_0x141e41(0x24c)],'paused':_0x271768[_0x141e41(0x214)][_0x141e41(0x20f)],'createdAt':_0x271768[_0x141e41(0x214)][_0x141e41(0x204)],'updatedAt':_0x271768[_0x141e41(0x214)][_0x141e41(0x1e5)]}));return _0x271732['sort']((_0x361d72,_0x16eea4)=>_0x361d72[_0x141e41(0x1dc)]-_0x16eea4['versionNumber']),_0x271732;}export function synthesizePreBundleVersion(_0x21469b){const _0x428fcb=a131_0xf51ff9;return{'journeyId':_0x21469b['id'],'versionNumber':0x1,'name':_0x21469b[_0x428fcb(0x214)][_0x428fcb(0x223)],'state':_0x21469b[_0x428fcb(0x214)][_0x428fcb(0x24c)],'paused':_0x21469b[_0x428fcb(0x214)][_0x428fcb(0x20f)],'createdAt':_0x21469b[_0x428fcb(0x214)][_0x428fcb(0x204)],'updatedAt':_0x21469b[_0x428fcb(0x214)][_0x428fcb(0x1e5)]};}export function buildStageNameMap(_0x17383b){const _0x17d788=a131_0xf51ff9;return new Map(_0x17383b[_0x17d788(0x214)][_0x17d788(0x203)]?.['map'](_0x524afd=>[_0x524afd['id'],_0x524afd[_0x17d788(0x223)]])??[]);}export class JourneySDK{[a131_0xf51ff9(0x22b)];constructor(_0x59e5a8){this['client']=new CDPApiClient(_0x59e5a8);}[a131_0xf51ff9(0x234)](_0x308fd1,_0x11eb75){return _0x11eb75?_0x308fd1:deduplicateJourneysByBundle(_0x308fd1);}async[a131_0xf51ff9(0x224)](_0xe8014c,_0x58a731){const _0x1176c6=a131_0xf51ff9;try{const _0x3d6d0c=await this[_0x1176c6(0x22b)]['listJourneysWithDetails'](_0xe8014c);return{'journeys':this[_0x1176c6(0x234)](_0x3d6d0c[_0x1176c6(0x1d2)],_0x58a731),'activationStepsById':_0x3d6d0c['activationStepsById']};}catch(_0x428378){if(isHttp404Error(_0x428378))return{'journeys':[],'activationStepsById':new Map()};throw _0x428378;}}async[a131_0xf51ff9(0x256)](_0x4e36a9,_0x370816,_0x10d9f5){const _0x28c2a4=a131_0xf51ff9;let _0x2cc745=_0x370816;if(!_0x2cc745)try{const _0x583a7c=await this[_0x28c2a4(0x22b)]['getParentSegmentFull'](_0x4e36a9);_0x2cc745=_0x583a7c[_0x28c2a4(0x22a)]??undefined;}catch(_0x37e8ad){if(isHttp404Error(_0x37e8ad))return[];throw _0x37e8ad;}if(!_0x2cc745)return[];let _0x2e173b;if(_0x10d9f5?.[_0x28c2a4(0x21e)]){const _0x13b3a1=await this['client']['listSegmentFolders'](_0x4e36a9),_0x45c20c=_0x13b3a1['map'](_0x1807b1=>this[_0x28c2a4(0x22b)][_0x28c2a4(0x1ef)](_0x1807b1['id'])),_0x483fa0=await Promise['all'](_0x45c20c),_0x46b276=new Set();_0x2e173b=_0x483fa0[_0x28c2a4(0x202)]()[_0x28c2a4(0x251)](_0x36c936=>{const _0x5acdfe=_0x28c2a4;if(_0x46b276['has'](_0x36c936['id']))return![];return _0x46b276[_0x5acdfe(0x215)](_0x36c936['id']),!![];});}else{const _0xf4e24f=await this[_0x28c2a4(0x22b)][_0x28c2a4(0x1ee)](_0x2cc745,0x20,![]),_0x3dbea9=_0xf4e24f['data'],_0x5310f4=_0x3dbea9[_0x28c2a4(0x251)](_0x3ded46=>_0x3ded46[_0x28c2a4(0x235)]===_0x28c2a4(0x247));_0x2e173b=_0x5310f4[_0x28c2a4(0x231)](_0x1d6035=>entityToJourneyListItem(_0x1d6035,_0x4e36a9));}return this[_0x28c2a4(0x234)](_0x2e173b,_0x10d9f5?.[_0x28c2a4(0x21e)]);}async[a131_0xf51ff9(0x1f5)](_0x197743,_0x4bd44f,_0x3ba763){const _0x2ba3fc=a131_0xf51ff9;if(!_0x4bd44f)return{'journeys':[],'folders':[]};const _0x459b28=await this[_0x2ba3fc(0x22b)][_0x2ba3fc(0x1ee)](_0x4bd44f,0x20,![]),_0x52162f=_0x459b28[_0x2ba3fc(0x210)],_0x59b1c6=_0x52162f['filter'](_0x541099=>_0x541099[_0x2ba3fc(0x235)]===_0x2ba3fc(0x233)&&_0x541099['id']!==_0x4bd44f),_0x545f38=_0x59b1c6[_0x2ba3fc(0x231)](_0x2911cf=>({'id':_0x2911cf['id'],'name':_0x2911cf['attributes'][_0x2ba3fc(0x223)]})),_0x5ce2b6=_0x52162f[_0x2ba3fc(0x251)](_0x1a0311=>_0x1a0311[_0x2ba3fc(0x235)]===_0x2ba3fc(0x247)),_0x21afe9=_0x5ce2b6['map'](_0x17f58c=>entityToJourneyListItem(_0x17f58c,_0x197743));return{'journeys':this[_0x2ba3fc(0x234)](_0x21afe9,_0x3ba763?.[_0x2ba3fc(0x21e)]),'folders':_0x545f38};}async[a131_0xf51ff9(0x218)](_0x4cb02f,_0x21f6e4){const _0x1b85a3=a131_0xf51ff9;let _0x39d5dc;try{_0x39d5dc=await this[_0x1b85a3(0x22b)][_0x1b85a3(0x1e4)](_0x4cb02f);}catch(_0x56f67e){if(isHttp404Error(_0x56f67e))return{'journeys':[],'activationStepsById':new Map()};throw _0x56f67e;}const _0x286f70=_0x39d5dc[_0x1b85a3(0x231)](async _0x55f1de=>{const _0x37e59b=_0x1b85a3;return await this['listJourneysWithDetails'](_0x55f1de['id'],_0x21f6e4?.[_0x37e59b(0x21e)]);}),_0x18462c=await Promise[_0x1b85a3(0x229)](_0x286f70),_0x105d30=new Map(),_0x3665c2=[];for(const _0x365f8d of _0x18462c){_0x3665c2[_0x1b85a3(0x23b)](..._0x365f8d[_0x1b85a3(0x1d2)]);for(const [_0x1842fd,_0x53bd28]of _0x365f8d[_0x1b85a3(0x1d4)]){_0x105d30[_0x1b85a3(0x1ff)](_0x1842fd,_0x53bd28);}}const _0x2ce28c=new Set(),_0x4455d3=_0x3665c2[_0x1b85a3(0x251)](_0x442ce3=>{const _0x53568f=_0x1b85a3;if(_0x2ce28c[_0x53568f(0x1e0)](_0x442ce3['id']))return![];return _0x2ce28c[_0x53568f(0x215)](_0x442ce3['id']),!![];});return{'journeys':this[_0x1b85a3(0x234)](_0x4455d3,_0x21f6e4?.[_0x1b85a3(0x21e)]),'activationStepsById':_0x105d30};}async[a131_0xf51ff9(0x249)](_0x141e12){const _0x251a68=a131_0xf51ff9;try{return await this[_0x251a68(0x22b)][_0x251a68(0x249)](_0x141e12);}catch(_0x509389){if(isHttp404Error(_0x509389))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x251a68(0x232)+_0x141e12,_0x509389);throw _0x509389;}}async[a131_0xf51ff9(0x1f2)](_0x2b5fa4,_0x515804){const _0x1d12d3=a131_0xf51ff9,_0x4a0234=await this[_0x1d12d3(0x256)](_0x2b5fa4),_0x37dbf8=_0x4a0234['find'](_0x3410c6=>_0x3410c6[_0x1d12d3(0x23c)]['toLowerCase']()===_0x515804[_0x1d12d3(0x252)]());if(!_0x37dbf8)throw new SDKError(ErrorCode[_0x1d12d3(0x220)],_0x1d12d3(0x232)+_0x515804,undefined,{'helpText':_0x1d12d3(0x237)});return _0x37dbf8['id'];}async['getStatistics'](_0x4cafae,_0x1565a4){const _0x378da7=a131_0xf51ff9;try{return await this[_0x378da7(0x22b)][_0x378da7(0x21d)](_0x4cafae,_0x1565a4);}catch(_0x16fb5d){if(isHttp404Error(_0x16fb5d))throw new SDKError(ErrorCode[_0x378da7(0x220)],_0x378da7(0x232)+_0x4cafae,_0x16fb5d);throw _0x16fb5d;}}async['getTrafficData'](_0x4f523f,_0x238fad){const _0x3f626c=a131_0xf51ff9,_0xdda17={'from':_0x238fad?.[_0x3f626c(0x211)],'to':_0x238fad?.['to'],'limit':_0x238fad?.[_0x3f626c(0x246)]},_0x18e3d8=_0x238fad?.[_0x3f626c(0x235)]!==_0x3f626c(0x255);try{const [_0x2ffac0,_0x107ba2]=await Promise['all']([this['fetchTrafficRaw'](_0x4f523f,_0x238fad?.[_0x3f626c(0x235)],_0xdda17),_0x18e3d8?this[_0x3f626c(0x249)](_0x4f523f):undefined]);if(_0x2ffac0[_0x3f626c(0x1dd)]&&_0x107ba2){const _0x2e39d0=buildStageNameMap(_0x107ba2);_0x2ffac0[_0x3f626c(0x1dd)]=_0x2ffac0['activation'][_0x3f626c(0x231)](_0x56c4a0=>({..._0x56c4a0,'journeyStageName':_0x2e39d0[_0x3f626c(0x1e9)](_0x56c4a0[_0x3f626c(0x1da)])??_0x56c4a0[_0x3f626c(0x1da)]}));}return _0x2ffac0;}catch(_0x3a552f){if(isHttp404Error(_0x3a552f))throw new SDKError(ErrorCode[_0x3f626c(0x220)],_0x3f626c(0x232)+_0x4f523f,_0x3a552f);throw _0x3a552f;}}async['fetchTrafficRaw'](_0x3f94d8,_0x16281a,_0x5580fe){const _0x4db81a=a131_0xf51ff9;if(_0x16281a===_0x4db81a(0x255)){const _0x5526df=await this['client'][_0x4db81a(0x245)](_0x3f94d8,_0x5580fe);return{'conversion':_0x5526df};}if(_0x16281a===_0x4db81a(0x1dd)){const _0x42ccc5=await this[_0x4db81a(0x22b)][_0x4db81a(0x200)](_0x3f94d8,_0x5580fe);return{'activation':_0x42ccc5};}const [_0x1b1f60,_0x15b8ef]=await Promise['all']([this[_0x4db81a(0x22b)][_0x4db81a(0x245)](_0x3f94d8,_0x5580fe),this['client'][_0x4db81a(0x200)](_0x3f94d8,_0x5580fe)]);return{'conversion':_0x1b1f60,'activation':_0x15b8ef};}async[a131_0xf51ff9(0x1fc)](_0xd42194){const _0x5a7fc0=a131_0xf51ff9;try{return await this[_0x5a7fc0(0x22b)][_0x5a7fc0(0x20b)](_0xd42194);}catch(_0x4000ab){if(isHttp404Error(_0x4000ab))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x5a7fc0(0x232)+_0xd42194,_0x4000ab);throw _0x4000ab;}}async[a131_0xf51ff9(0x23d)](_0x3395fe){const _0x248500=a131_0xf51ff9;try{return await this[_0x248500(0x22b)][_0x248500(0x22d)](_0x3395fe);}catch(_0x4af99a){if(isHttp404Error(_0x4af99a))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x248500(0x232)+_0x3395fe,_0x4af99a);throw _0x4af99a;}}async[a131_0xf51ff9(0x1e1)](_0x13d9b7){const _0x565b57=a131_0xf51ff9;return await this[_0x565b57(0x22b)][_0x565b57(0x250)](_0x13d9b7);}async[a131_0xf51ff9(0x1d6)](_0x2717a7,_0x4ba692){const _0x44b96a=a131_0xf51ff9;try{return await this[_0x44b96a(0x22b)]['updateJourney'](_0x2717a7,_0x4ba692);}catch(_0x2598dc){if(isHttp404Error(_0x2598dc))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x44b96a(0x232)+_0x2717a7,_0x2598dc);throw _0x2598dc;}}async[a131_0xf51ff9(0x219)](_0x5c382f,_0x1617d0){const _0x46284c=a131_0xf51ff9;try{return await this[_0x46284c(0x22b)][_0x46284c(0x25d)](_0x5c382f,_0x1617d0);}catch(_0x2bc296){if(isHttp404Error(_0x2bc296))throw new SDKError(ErrorCode[_0x46284c(0x226)],_0x46284c(0x1d8)+_0x1617d0+_0x46284c(0x259)+_0x5c382f,_0x2bc296);throw _0x2bc296;}}async['listActivations'](_0x55cce9){const _0x20d718=a131_0xf51ff9;try{return await this[_0x20d718(0x22b)][_0x20d718(0x1e8)](_0x55cce9);}catch(_0x5ba452){if(isHttp404Error(_0x5ba452))return[];throw _0x5ba452;}}async[a131_0xf51ff9(0x1fa)](_0x2b1005){const _0x28ec95=a131_0xf51ff9,_0x50d0a7=await this[_0x28ec95(0x254)](_0x2b1005);return _0x50d0a7['map'](flattenJourneyActivation);}async[a131_0xf51ff9(0x1ed)](_0xc03779,_0x38c853){const _0x1c2dae=a131_0xf51ff9;return await this['client'][_0x1c2dae(0x244)](_0xc03779,_0x38c853);}async['getColumnMapping'](_0x294039){const _0x1b1658=a131_0xf51ff9,_0x239e8c=await this[_0x1b1658(0x249)](_0x294039),_0x11cc3d=generateColumnMapping(_0x239e8c);return{'journeyId':_0x239e8c['id'],'journeyName':_0x239e8c[_0x1b1658(0x214)][_0x1b1658(0x223)],'database':_0x1b1658(0x227)+_0x239e8c[_0x1b1658(0x214)][_0x1b1658(0x243)],'table':'journey_'+_0x239e8c['id'],'columns':_0x11cc3d};}async[a131_0xf51ff9(0x23a)](_0x3e9ee0){const _0x111dd5=a131_0xf51ff9;return this[_0x111dd5(0x22b)][_0x111dd5(0x25a)](_0x3e9ee0);}async[a131_0xf51ff9(0x1ec)](_0x2427c0){if(!_0x2427c0)return undefined;try{const _0x4e520d=await this['getBundle'](_0x2427c0);return _0x4e520d['latestJourneyId'];}catch{return undefined;}}async[a131_0xf51ff9(0x1d9)](_0x3ad510){const _0x1ddc3b=a131_0xf51ff9,_0x4b2fb1=await this[_0x1ddc3b(0x249)](_0x3ad510),_0x4bf796=_0x4b2fb1[_0x1ddc3b(0x214)][_0x1ddc3b(0x239)];if(!_0x4bf796)return{'bundleId':'','bundleName':_0x4b2fb1[_0x1ddc3b(0x214)][_0x1ddc3b(0x223)],'bundleDescription':_0x4b2fb1['attributes'][_0x1ddc3b(0x1f1)]??null,'latestJourneyId':_0x4b2fb1['id'],'versions':[synthesizePreBundleVersion(_0x4b2fb1)]};const _0x3c025a=await this[_0x1ddc3b(0x23a)](_0x4bf796);return{'bundleId':_0x4bf796,'bundleName':_0x3c025a['name'],'bundleDescription':_0x3c025a[_0x1ddc3b(0x1f1)]??null,'latestJourneyId':_0x3c025a[_0x1ddc3b(0x1f7)],'versions':formatVersionsFromBundle(_0x3c025a)};}async[a131_0xf51ff9(0x21a)](_0x4ae3a0){const _0x249ccb=a131_0xf51ff9,_0x415786=await this[_0x249ccb(0x249)](_0x4ae3a0),_0x58b8bb=_0x415786[_0x249ccb(0x214)][_0x249ccb(0x239)];if(!_0x58b8bb)throw new SDKError(ErrorCode[_0x249ccb(0x230)],_0x249ccb(0x225));await this[_0x249ccb(0x22b)][_0x249ccb(0x236)](_0x58b8bb);const _0x3afbd4=await this[_0x249ccb(0x22b)][_0x249ccb(0x25a)](_0x58b8bb),_0x3c38bb=_0x3afbd4['name']+'\x20v'+(_0x3afbd4['lastVersionNumber']+0x1);return this[_0x249ccb(0x22b)][_0x249ccb(0x201)](_0x58b8bb,{'sourceId':_0x4ae3a0,'attributes':{'name':_0x3c38bb}});}}
|
|
1
|
+
const a131_0x48d0c9=a131_0x38d9;(function(_0xdd4eb5,_0x5d6ec5){const _0x3facd7=a131_0x38d9,_0x2b8fe2=_0xdd4eb5();while(!![]){try{const _0x11ca98=parseInt(_0x3facd7(0xe0))/0x1*(parseInt(_0x3facd7(0xf0))/0x2)+parseInt(_0x3facd7(0x115))/0x3+-parseInt(_0x3facd7(0x13d))/0x4+parseInt(_0x3facd7(0x122))/0x5*(parseInt(_0x3facd7(0xdf))/0x6)+-parseInt(_0x3facd7(0x11c))/0x7*(-parseInt(_0x3facd7(0x107))/0x8)+parseInt(_0x3facd7(0x12c))/0x9*(parseInt(_0x3facd7(0x109))/0xa)+parseInt(_0x3facd7(0x146))/0xb*(-parseInt(_0x3facd7(0xe5))/0xc);if(_0x11ca98===_0x5d6ec5)break;else _0x2b8fe2['push'](_0x2b8fe2['shift']());}catch(_0xc7be81){_0x2b8fe2['push'](_0x2b8fe2['shift']());}}}(a131_0x1c05,0x2ba28));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function a131_0x38d9(_0x37f671,_0x3e2053){_0x37f671=_0x37f671-0xde;const _0x1c05c5=a131_0x1c05();let _0x38d9a1=_0x1c05c5[_0x37f671];return _0x38d9a1;}function getBundleId(_0x443e36){const _0xc03108=a131_0x38d9;return _0x443e36['journeyBundleId']??_0x443e36['attributes']?.[_0xc03108(0x148)]??undefined;}function getVersionNumber(_0x3bf62d){const _0x4865ee=a131_0x38d9;return _0x3bf62d[_0x4865ee(0xf4)]??_0x3bf62d[_0x4865ee(0x15d)]?.[_0x4865ee(0xf4)]??0x0;}function a131_0x1c05(){const _0x34a6e2=['folder-segment','all','exitOrJumpRate','sort','length','3088sihVEU','goal','542210ZVDlvv','stage','audienceId','_milestone','Journey\x20not\x20found:\x20','entryCriteria','add','data','milestone','milestoneInflux','cdp_audience_','conditionSegmentId','569796dublPd','listActivationsFlat','excluded','AbTest','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','DecisionPoint','Excluded\x20profiles','763WrMZWV','includeAllVersions','getTrafficData','listEntitiesByFolder','limit','steps','335110GAnoLb','journey_','listJourneysWithFolders','getJourneyActivation','toLowerCase','getBundle','intime_stage_','activationStepsById','push','\x20in\x20journey\x20','18wFspNh','out','journeyId','getActivationSankeyChart','segmentId','_exit_','createJourneyVersion','activation','listSegmentFolders','no-bundle-','listJourneysWithDetails','waitCondition','fetchTrafficRaw','has','getJourneyStatistics','branches','client','23024DoWxvi','journeys','listJourneyActivations','latestJourneyId','journey','journeyStageId','filter','updateJourney','listActivations','47157LTArAD','flat','journeyBundleId','paused','map','listJourneysFromParentSegment','description','segmentFolderId','step','exit_criteria','getActivation','createdAt','NOT_FOUND','name','pause','getLatestJourneyId','Wait','getJourney','type','branch','create','string','applyVersionDeduplication','attributes','ABTest','rootFolderId','resumeJourney','reduce','exitOrJumpSize','conditions','goalInflux','cdp_customer_id','updatedAt','exitCriteria','JOURNEY_NOT_FOUND','resume','outtime_stage_','history','listVersions','goalSize','_variant_','createJourneyActivation','isArray','getStatistics','idx-','30QyBjnf','142JPXAMG','createActivation','entryInflux','jumpInflux','draft','2352POtxUf','resolveJourneyId','variants','listJourneysWithDetailsFromParentSegment','getJourneyBundle','from','variant','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','fixed','set','outtime_journey','4918EKLIap','pauseJourney','size','relationships','versionNumber','Journey\x20activation\x20step\x20not\x20found:\x20','launched','WaitStep','state','conversion','get','time','intime_journey','createVersion','exitInflux','enteredSize','replace','journeyBundleName'];a131_0x1c05=function(){return _0x34a6e2;};return a131_0x1c05();}function getState(_0x4a094b){const _0x42aa15=a131_0x38d9;return _0x4a094b[_0x42aa15(0xf8)]??_0x4a094b[_0x42aa15(0x15d)]?.[_0x42aa15(0xf8)];}export function deduplicateJourneysByBundle(_0x21b735){const _0x123a0b=a131_0x38d9,_0x1a23a9=new Map();let _0x10b372=0x0;for(const _0x314244 of _0x21b735){const _0x3a9611=getBundleId(_0x314244);if(!_0x3a9611){const _0x3a031e=_0x123a0b(0x135)+(_0x314244['id']??_0x123a0b(0xde)+_0x10b372++);_0x1a23a9[_0x123a0b(0xee)](_0x3a031e,_0x314244);continue;}const _0x3867d4=_0x1a23a9[_0x123a0b(0xfa)](_0x3a9611);if(!_0x3867d4)_0x1a23a9[_0x123a0b(0xee)](_0x3a9611,_0x314244);else{const _0x3f82a9=getState(_0x3867d4)===_0x123a0b(0xf6),_0x3a86b1=getState(_0x314244)===_0x123a0b(0xf6);if(_0x3a86b1&&!_0x3f82a9)_0x1a23a9[_0x123a0b(0xee)](_0x3a9611,_0x314244);else{if(!_0x3a86b1&&_0x3f82a9){}else{const _0x109187=getVersionNumber(_0x3867d4),_0x5f1daa=getVersionNumber(_0x314244);_0x5f1daa>_0x109187&&_0x1a23a9['set'](_0x3a9611,_0x314244);}}}}return Array['from'](_0x1a23a9['values']());}const VALID_JOURNEY_STATES=new Set(['draft','simulation','launched']);export function parseJourneyState(_0x24ac87){const _0x4ef90a=a131_0x38d9;if(typeof _0x24ac87===_0x4ef90a(0x15b)&&VALID_JOURNEY_STATES[_0x4ef90a(0x139)](_0x24ac87))return _0x24ac87;return _0x4ef90a(0xe4);}export function entityToJourneyListItem(_0x9367ae,_0x2bd5ca){const _0x285b23=a131_0x38d9,_0x4fa7ff=_0x9367ae[_0x285b23(0x15d)];return{'id':_0x9367ae['id'],'name':_0x4fa7ff['name']??'','journeyBundleName':_0x4fa7ff[_0x285b23(0x101)]??_0x4fa7ff[_0x285b23(0x153)]??'','journeyBundleId':_0x4fa7ff[_0x285b23(0x148)]??'','versionNumber':_0x4fa7ff[_0x285b23(0xf4)],'description':_0x4fa7ff[_0x285b23(0x14c)]??null,'state':parseJourneyState(_0x4fa7ff[_0x285b23(0xf8)]),'paused':_0x4fa7ff[_0x285b23(0x149)]??![],'audienceId':_0x2bd5ca,'folderId':_0x4fa7ff[_0x285b23(0x14d)]??_0x9367ae[_0x285b23(0xf3)]?.['parentFolder']?.[_0x285b23(0x110)]?.['id']??null,'createdAt':_0x4fa7ff[_0x285b23(0x151)]??'','updatedAt':_0x4fa7ff[_0x285b23(0x166)]??''};}function convertToColumnId(_0x57df54){const _0x46c6ce=a131_0x38d9;return _0x57df54[_0x46c6ce(0x100)](/-/g,'_');}function getStepEntries(_0x3f7f86){const _0x313fec=a131_0x38d9;if(!_0x3f7f86)return[];if(Array[_0x313fec(0x170)](_0x3f7f86))return _0x3f7f86[_0x313fec(0x14a)](_0x3705a2=>[_0x3705a2['id'],_0x3705a2]);return Object['entries'](_0x3f7f86);}export function flattenJourneyActivation(_0x2a38d8){const {activationParams:_0x143b43,activationId:_0x152f7d,runAfterJourneyRefresh:_0x5df168}=_0x2a38d8['attributes'];return{'id':_0x2a38d8['id'],'activationId':_0x152f7d,'runAfterJourneyRefresh':_0x5df168,..._0x143b43};}function col(_0x515123,_0x554989={}){const _0x3fb93d=a131_0x38d9;return{'column':_0x515123,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3fb93d(0xed),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x554989};}export function generateColumnMapping(_0x23eeca){const _0x2a3def=a131_0x38d9,_0x4e7bcc=[];_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x165))),_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0xfc),{'direction':'in','category':_0x2a3def(0x141)})),_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0xef),{'direction':_0x2a3def(0x12d),'category':_0x2a3def(0x141)}));_0x23eeca['attributes'][_0x2a3def(0x108)]&&_0x4e7bcc[_0x2a3def(0x12a)](col('intime_goal',{'direction':'in','category':_0x2a3def(0x108),'detail':_0x23eeca[_0x2a3def(0x15d)][_0x2a3def(0x108)][_0x2a3def(0x153)]||null}));const _0xaa7375=_0x23eeca['attributes']['journeyStages']||[];for(let _0x53931f=0x0;_0x53931f<_0xaa7375[_0x2a3def(0x106)];_0x53931f++){const _0xfe7813=_0xaa7375[_0x53931f],_0x5091b1=_0xfe7813['name'],_0x463245={'stageIndex':_0x53931f,'stageName':_0x5091b1},_0x35c902=_0xfe7813[_0x2a3def(0x10e)]?.['name']||null;_0x4e7bcc['push'](col('intime_stage_'+_0x53931f,{..._0x463245,'direction':'in','category':_0x2a3def(0x10a),'detail':_0x35c902})),_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x16a)+_0x53931f,{..._0x463245,'direction':_0x2a3def(0x12d),'category':_0x2a3def(0x10a),'detail':_0x35c902}));_0xfe7813[_0x2a3def(0x111)]&&_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x128)+_0x53931f+_0x2a3def(0x10c),{..._0x463245,'direction':'in','category':'milestone','detail':_0xfe7813[_0x2a3def(0x111)][_0x2a3def(0x153)]||null}));const _0x136467=_0xfe7813['exitCriterias']||_0xfe7813[_0x2a3def(0x167)]||[];for(let _0x4781ab=0x0;_0x4781ab<_0x136467[_0x2a3def(0x106)];_0x4781ab++){_0x4e7bcc['push'](col(_0x2a3def(0x128)+_0x53931f+_0x2a3def(0x131)+_0x4781ab,{..._0x463245,'direction':'in','category':_0x2a3def(0x14f),'detail':_0x136467[_0x4781ab]['name']||null}));}const _0x360732=getStepEntries(_0xfe7813[_0x2a3def(0x121)]);for(const [_0x4c9128,_0x2e2ae6]of _0x360732){const _0x415755=convertToColumnId(_0x4c9128),_0x3fde16=_0x2e2ae6[_0x2a3def(0x158)]||null,_0x1e3a43=_0x2e2ae6[_0x2a3def(0x153)]||null,_0x460323={..._0x463245,'stepType':_0x3fde16,'stepName':_0x1e3a43,'stepId':_0x4c9128};_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x128)+_0x53931f+'_'+_0x415755,{..._0x460323,'direction':'in','category':_0x2a3def(0x14e)})),_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x16a)+_0x53931f+'_'+_0x415755,{..._0x460323,'direction':_0x2a3def(0x12d),'category':_0x2a3def(0x14e)}));if(_0x2e2ae6[_0x2a3def(0x158)]===_0x2a3def(0x11a)&&_0x2e2ae6['branches'])for(const _0x2b62b5 of _0x2e2ae6[_0x2a3def(0x13b)]){_0x2b62b5[_0x2a3def(0x130)]&&_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x128)+_0x53931f+'_'+_0x415755+'_'+_0x2b62b5[_0x2a3def(0x130)],{..._0x460323,'direction':'in','category':_0x2a3def(0x159),'detail':_0x2b62b5[_0x2a3def(0x153)]||(_0x2b62b5[_0x2a3def(0x117)]?_0x2a3def(0x11b):null)}));}if((_0x2e2ae6['type']===_0x2a3def(0x118)||_0x2e2ae6[_0x2a3def(0x158)]===_0x2a3def(0x15e))&&_0x2e2ae6[_0x2a3def(0xe7)])for(const _0x28ca1e of _0x2e2ae6['variants']){_0x28ca1e['id']&&_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x128)+_0x53931f+'_'+_0x415755+_0x2a3def(0x16e)+convertToColumnId(_0x28ca1e['id']),{..._0x460323,'direction':'in','category':_0x2a3def(0xeb),'detail':_0x28ca1e[_0x2a3def(0x153)]||null}));}if(_0x2e2ae6['type']===_0x2a3def(0xf7)||_0x2e2ae6[_0x2a3def(0x158)]===_0x2a3def(0x156)){const _0x3ebc4b=[];if(_0x2e2ae6[_0x2a3def(0x114)])_0x3ebc4b[_0x2a3def(0x12a)](_0x2e2ae6['conditionSegmentId']);else{if(Array[_0x2a3def(0x170)](_0x2e2ae6[_0x2a3def(0x163)]))for(const _0x48b0c7 of _0x2e2ae6[_0x2a3def(0x163)]){_0x48b0c7[_0x2a3def(0x130)]&&!_0x48b0c7['timedOutPath']&&_0x3ebc4b[_0x2a3def(0x12a)](_0x48b0c7[_0x2a3def(0x130)]);}else _0x2e2ae6[_0x2a3def(0x137)]?.[_0x2a3def(0x130)]&&_0x3ebc4b[_0x2a3def(0x12a)](_0x2e2ae6['waitCondition'][_0x2a3def(0x130)]);}for(const _0x1c4184 of _0x3ebc4b){_0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0x128)+_0x53931f+'_'+_0x415755+'_'+_0x1c4184,{..._0x460323,'direction':'in','category':'branch'}));}}}}return _0x4e7bcc[_0x2a3def(0x12a)](col(_0x2a3def(0xfb))),_0x4e7bcc;}export function aggregateJourneyHistory(_0x497372){const _0x4a8447=a131_0x38d9,_0x3b7c31=_0x497372[_0x4a8447(0x161)]((_0x4450fe,_0x276d7f)=>_0x4450fe+(_0x276d7f[_0x4a8447(0xe2)]??0x0),0x0),_0x499ee5=_0x497372[_0x4a8447(0x161)]((_0x4fc5bb,_0xe03e55)=>_0x4fc5bb+(_0xe03e55[_0x4a8447(0x164)]??0x0),0x0),_0x26c025=_0x497372['reduce']((_0x1c9b48,_0x28b3e6)=>_0x1c9b48+((_0x28b3e6[_0x4a8447(0xfe)]??0x0)+(_0x28b3e6[_0x4a8447(0xe3)]??0x0)),0x0),_0xb3010c=_0x497372[_0x497372[_0x4a8447(0x106)]-0x1];return{'size':_0xb3010c?.[_0x4a8447(0xf2)]??0x0,'entered':_0x3b7c31,'goal_achieved':_0x499ee5,'completion_rate':_0x499ee5&&_0x3b7c31?_0x499ee5/_0x3b7c31*0x64:0x0,'exit_or_jump':_0x26c025,'exit_or_jump_rate':_0x26c025&&_0x3b7c31?_0x26c025/_0x3b7c31*0x64:0x0};}export function aggregateStageHistory(_0x463fa6){const _0x5547d0=a131_0x38d9,_0x18450e=_0x463fa6[_0x5547d0(0x161)]((_0x185507,_0x5274da)=>_0x185507+(_0x5274da[_0x5547d0(0xe2)]??0x0),0x0),_0x17f2cb=_0x463fa6[_0x5547d0(0x161)]((_0xf96a12,_0x3ccde4)=>_0xf96a12+(_0x3ccde4[_0x5547d0(0x112)]??0x0),0x0),_0x247a3a=_0x463fa6[_0x5547d0(0x161)]((_0x2b60d6,_0x5c0880)=>_0x2b60d6+((_0x5c0880[_0x5547d0(0xfe)]??0x0)+(_0x5c0880[_0x5547d0(0xe3)]??0x0)),0x0),_0x145811=_0x463fa6[_0x463fa6[_0x5547d0(0x106)]-0x1];return{'size':_0x145811?.[_0x5547d0(0xf2)]??0x0,'entered':_0x18450e,'milestone':_0x17f2cb,'milestone_rate':_0x17f2cb&&_0x18450e?_0x17f2cb/_0x18450e*0x64:0x0,'exit_or_jump':_0x247a3a,'exit_or_jump_rate':_0x247a3a&&_0x18450e?_0x247a3a/_0x18450e*0x64:0x0};}export function assembleJourneyStats(_0x1b96bf,_0x5d2574){const _0x18e545=a131_0x38d9,_0xc87a3e=!!(_0x5d2574?.['from']||_0x5d2574?.['to'])&&!!_0x1b96bf['history']?.[_0x18e545(0x106)];if(_0xc87a3e){const _0x3dfac0=aggregateJourneyHistory(_0x1b96bf[_0x18e545(0x16b)]),_0x3d1af4={'journey_id':_0x1b96bf[_0x18e545(0x12e)],..._0x5d2574?.['from']&&{'from':_0x5d2574[_0x18e545(0xea)]},..._0x5d2574?.['to']&&{'to':_0x5d2574['to']},..._0x3dfac0};return _0x5d2574?.['includeHistory']&&(_0x3d1af4[_0x18e545(0x16b)]=_0x1b96bf[_0x18e545(0x16b)]),_0x3d1af4;}return{'journey_id':_0x1b96bf[_0x18e545(0x12e)],'size':_0x1b96bf[_0x18e545(0xf2)],'entered':_0x1b96bf[_0x18e545(0xff)],'goal_achieved':_0x1b96bf[_0x18e545(0x16d)],'completion_rate':_0x1b96bf['completionRate'],'exit_or_jump':_0x1b96bf[_0x18e545(0x162)],'exit_or_jump_rate':_0x1b96bf[_0x18e545(0x104)]};}export function formatVersionsFromBundle(_0x2d10af){const _0x41e1bb=a131_0x38d9,_0x2392bd=_0x2d10af[_0x41e1bb(0x13e)][_0x41e1bb(0x14a)](_0x13a0b6=>({'journeyId':_0x13a0b6['id'],'versionNumber':_0x13a0b6[_0x41e1bb(0x15d)]['versionNumber']??0x0,'name':_0x13a0b6['attributes'][_0x41e1bb(0x153)],'state':_0x13a0b6[_0x41e1bb(0x15d)][_0x41e1bb(0xf8)],'paused':_0x13a0b6['attributes'][_0x41e1bb(0x149)],'createdAt':_0x13a0b6[_0x41e1bb(0x15d)][_0x41e1bb(0x151)],'updatedAt':_0x13a0b6['attributes'][_0x41e1bb(0x166)]}));return _0x2392bd[_0x41e1bb(0x105)]((_0x393e04,_0x34fd32)=>_0x393e04[_0x41e1bb(0xf4)]-_0x34fd32[_0x41e1bb(0xf4)]),_0x2392bd;}export function synthesizePreBundleVersion(_0x116077){const _0x47cd57=a131_0x38d9;return{'journeyId':_0x116077['id'],'versionNumber':0x1,'name':_0x116077[_0x47cd57(0x15d)]['name'],'state':_0x116077[_0x47cd57(0x15d)][_0x47cd57(0xf8)],'paused':_0x116077['attributes'][_0x47cd57(0x149)],'createdAt':_0x116077[_0x47cd57(0x15d)][_0x47cd57(0x151)],'updatedAt':_0x116077[_0x47cd57(0x15d)][_0x47cd57(0x166)]};}export function buildStageNameMap(_0x1ba2a0){const _0x370f9e=a131_0x38d9;return new Map(_0x1ba2a0['attributes']['journeyStages']?.[_0x370f9e(0x14a)](_0x11f397=>[_0x11f397['id'],_0x11f397[_0x370f9e(0x153)]])??[]);}export class JourneySDK{['client'];constructor(_0x2069df){const _0x53d3d9=a131_0x38d9;this[_0x53d3d9(0x13c)]=new CDPApiClient(_0x2069df);}[a131_0x48d0c9(0x15c)](_0x552eb2,_0x363426){return _0x363426?_0x552eb2:deduplicateJourneysByBundle(_0x552eb2);}async[a131_0x48d0c9(0x136)](_0x6db0aa,_0x24a3ff){const _0x24e18d=a131_0x48d0c9;try{const _0x1ef91f=await this[_0x24e18d(0x13c)][_0x24e18d(0x136)](_0x6db0aa);return{'journeys':this[_0x24e18d(0x15c)](_0x1ef91f['journeys'],_0x24a3ff),'activationStepsById':_0x1ef91f[_0x24e18d(0x129)]};}catch(_0x732c19){if(isHttp404Error(_0x732c19))return{'journeys':[],'activationStepsById':new Map()};throw _0x732c19;}}async[a131_0x48d0c9(0x14b)](_0x5b9178,_0x337af9,_0x5bb286){const _0x2af5c4=a131_0x48d0c9;let _0x52911e=_0x337af9;if(!_0x52911e)try{const _0x2f8eb9=await this['client']['getParentSegmentFull'](_0x5b9178);_0x52911e=_0x2f8eb9[_0x2af5c4(0x15f)]??undefined;}catch(_0x217886){if(isHttp404Error(_0x217886))return[];throw _0x217886;}if(!_0x52911e)return[];let _0x2994a7;if(_0x5bb286?.[_0x2af5c4(0x11d)]){const _0x47d9d8=await this[_0x2af5c4(0x13c)][_0x2af5c4(0x134)](_0x5b9178),_0x47a139=_0x47d9d8['map'](_0x25a215=>this[_0x2af5c4(0x13c)]['listJourneys'](_0x25a215['id'])),_0x24ed9f=await Promise['all'](_0x47a139),_0x4eba5f=new Set();_0x2994a7=_0x24ed9f[_0x2af5c4(0x147)]()[_0x2af5c4(0x143)](_0x5b09ed=>{const _0x28244f=_0x2af5c4;if(_0x4eba5f[_0x28244f(0x139)](_0x5b09ed['id']))return![];return _0x4eba5f[_0x28244f(0x10f)](_0x5b09ed['id']),!![];});}else{const _0x17e630=await this[_0x2af5c4(0x13c)][_0x2af5c4(0x11f)](_0x52911e,0x20,![]),_0x1b63e5=_0x17e630[_0x2af5c4(0x110)],_0x3ef662=_0x1b63e5[_0x2af5c4(0x143)](_0x16abc0=>_0x16abc0[_0x2af5c4(0x158)]===_0x2af5c4(0x141));_0x2994a7=_0x3ef662[_0x2af5c4(0x14a)](_0xbc204d=>entityToJourneyListItem(_0xbc204d,_0x5b9178));}return this[_0x2af5c4(0x15c)](_0x2994a7,_0x5bb286?.[_0x2af5c4(0x11d)]);}async[a131_0x48d0c9(0x124)](_0x40efab,_0x21b9ab,_0x47b6b2){const _0x33228b=a131_0x48d0c9;if(!_0x21b9ab)return{'journeys':[],'folders':[]};const _0x3af169=await this[_0x33228b(0x13c)][_0x33228b(0x11f)](_0x21b9ab,0x20,![]),_0x201126=_0x3af169[_0x33228b(0x110)],_0x1ab30b=_0x201126['filter'](_0x4e519a=>_0x4e519a['type']===_0x33228b(0x102)&&_0x4e519a['id']!==_0x21b9ab),_0x5dc58c=_0x1ab30b[_0x33228b(0x14a)](_0x2630bc=>({'id':_0x2630bc['id'],'name':_0x2630bc[_0x33228b(0x15d)]['name']})),_0x294ed1=_0x201126[_0x33228b(0x143)](_0x2121cc=>_0x2121cc[_0x33228b(0x158)]===_0x33228b(0x141)),_0x5f222e=_0x294ed1[_0x33228b(0x14a)](_0x793743=>entityToJourneyListItem(_0x793743,_0x40efab));return{'journeys':this[_0x33228b(0x15c)](_0x5f222e,_0x47b6b2?.[_0x33228b(0x11d)]),'folders':_0x5dc58c};}async[a131_0x48d0c9(0xe8)](_0x1a713d,_0x2531bf){const _0x17d667=a131_0x48d0c9;let _0x11ceee;try{_0x11ceee=await this[_0x17d667(0x13c)]['listSegmentFolders'](_0x1a713d);}catch(_0x2b8fba){if(isHttp404Error(_0x2b8fba))return{'journeys':[],'activationStepsById':new Map()};throw _0x2b8fba;}const _0x2bd9c9=_0x11ceee[_0x17d667(0x14a)](async _0x5f163f=>{const _0xa96675=_0x17d667;return await this['listJourneysWithDetails'](_0x5f163f['id'],_0x2531bf?.[_0xa96675(0x11d)]);}),_0x555e26=await Promise[_0x17d667(0x103)](_0x2bd9c9),_0x2be023=new Map(),_0x314f2e=[];for(const _0x3d8c14 of _0x555e26){_0x314f2e[_0x17d667(0x12a)](..._0x3d8c14['journeys']);for(const [_0xb8d51b,_0x342258]of _0x3d8c14[_0x17d667(0x129)]){_0x2be023[_0x17d667(0xee)](_0xb8d51b,_0x342258);}}const _0x34503=new Set(),_0xe5b58e=_0x314f2e[_0x17d667(0x143)](_0x396e13=>{const _0x584890=_0x17d667;if(_0x34503[_0x584890(0x139)](_0x396e13['id']))return![];return _0x34503['add'](_0x396e13['id']),!![];});return{'journeys':this[_0x17d667(0x15c)](_0xe5b58e,_0x2531bf?.[_0x17d667(0x11d)]),'activationStepsById':_0x2be023};}async[a131_0x48d0c9(0x157)](_0x31cb4a){const _0x57213e=a131_0x48d0c9;try{return await this[_0x57213e(0x13c)][_0x57213e(0x157)](_0x31cb4a);}catch(_0x4fbc36){if(isHttp404Error(_0x4fbc36))throw new SDKError(ErrorCode[_0x57213e(0x168)],_0x57213e(0x10d)+_0x31cb4a,_0x4fbc36);throw _0x4fbc36;}}async[a131_0x48d0c9(0xe6)](_0x1e47ab,_0xd1065){const _0x48efde=a131_0x48d0c9,_0x3a5609=await this[_0x48efde(0x14b)](_0x1e47ab),_0x3865c9=_0x3a5609['find'](_0x28c502=>_0x28c502[_0x48efde(0x101)][_0x48efde(0x126)]()===_0xd1065['toLowerCase']());if(!_0x3865c9)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x48efde(0x10d)+_0xd1065,undefined,{'helpText':_0x48efde(0x119)});return _0x3865c9['id'];}async[a131_0x48d0c9(0x171)](_0x321461,_0xcbb1a0){const _0x36f9f2=a131_0x48d0c9;try{return await this[_0x36f9f2(0x13c)][_0x36f9f2(0x13a)](_0x321461,_0xcbb1a0);}catch(_0x27d788){if(isHttp404Error(_0x27d788))throw new SDKError(ErrorCode[_0x36f9f2(0x168)],_0x36f9f2(0x10d)+_0x321461,_0x27d788);throw _0x27d788;}}async[a131_0x48d0c9(0x11e)](_0x5efc7e,_0x555139){const _0x62e2f6=a131_0x48d0c9,_0x468f21={'from':_0x555139?.[_0x62e2f6(0xea)],'to':_0x555139?.['to'],'limit':_0x555139?.[_0x62e2f6(0x120)]},_0x154642=_0x555139?.[_0x62e2f6(0x158)]!==_0x62e2f6(0xf9);try{const [_0x4a6b87,_0x595755]=await Promise['all']([this[_0x62e2f6(0x138)](_0x5efc7e,_0x555139?.[_0x62e2f6(0x158)],_0x468f21),_0x154642?this[_0x62e2f6(0x157)](_0x5efc7e):undefined]);if(_0x4a6b87[_0x62e2f6(0x133)]&&_0x595755){const _0x52cb33=buildStageNameMap(_0x595755);_0x4a6b87[_0x62e2f6(0x133)]=_0x4a6b87[_0x62e2f6(0x133)][_0x62e2f6(0x14a)](_0x585ab4=>({..._0x585ab4,'journeyStageName':_0x52cb33['get'](_0x585ab4[_0x62e2f6(0x142)])??_0x585ab4[_0x62e2f6(0x142)]}));}return _0x4a6b87;}catch(_0x1c563b){if(isHttp404Error(_0x1c563b))throw new SDKError(ErrorCode[_0x62e2f6(0x168)],'Journey\x20not\x20found:\x20'+_0x5efc7e,_0x1c563b);throw _0x1c563b;}}async[a131_0x48d0c9(0x138)](_0x2484c3,_0x33c542,_0x25dd5c){const _0x35e87d=a131_0x48d0c9;if(_0x33c542===_0x35e87d(0xf9)){const _0x43018b=await this[_0x35e87d(0x13c)]['getConversionSankeyChart'](_0x2484c3,_0x25dd5c);return{'conversion':_0x43018b};}if(_0x33c542===_0x35e87d(0x133)){const _0x29f134=await this[_0x35e87d(0x13c)][_0x35e87d(0x12f)](_0x2484c3,_0x25dd5c);return{'activation':_0x29f134};}const [_0x77e2a0,_0x44f385]=await Promise[_0x35e87d(0x103)]([this[_0x35e87d(0x13c)]['getConversionSankeyChart'](_0x2484c3,_0x25dd5c),this[_0x35e87d(0x13c)]['getActivationSankeyChart'](_0x2484c3,_0x25dd5c)]);return{'conversion':_0x77e2a0,'activation':_0x44f385};}async[a131_0x48d0c9(0x154)](_0x496a06){const _0x4ad276=a131_0x48d0c9;try{return await this[_0x4ad276(0x13c)][_0x4ad276(0xf1)](_0x496a06);}catch(_0x5181e4){if(isHttp404Error(_0x5181e4))throw new SDKError(ErrorCode[_0x4ad276(0x168)],_0x4ad276(0x10d)+_0x496a06,_0x5181e4);throw _0x5181e4;}}async[a131_0x48d0c9(0x169)](_0x4fba9d){const _0x34902b=a131_0x48d0c9;try{return await this[_0x34902b(0x13c)][_0x34902b(0x160)](_0x4fba9d);}catch(_0x27944d){if(isHttp404Error(_0x27944d))throw new SDKError(ErrorCode[_0x34902b(0x168)],_0x34902b(0x10d)+_0x4fba9d,_0x27944d);throw _0x27944d;}}async[a131_0x48d0c9(0x15a)](_0x4f6786){return await this['client']['createJourney'](_0x4f6786);}async['update'](_0xcd142a,_0x43bf7b){const _0x4e7e72=a131_0x48d0c9;try{return await this['client'][_0x4e7e72(0x144)](_0xcd142a,_0x43bf7b);}catch(_0x292c03){if(isHttp404Error(_0x292c03))throw new SDKError(ErrorCode[_0x4e7e72(0x168)],_0x4e7e72(0x10d)+_0xcd142a,_0x292c03);throw _0x292c03;}}async[a131_0x48d0c9(0x150)](_0x20e874,_0x18ea76){const _0x135372=a131_0x48d0c9;try{return await this['client'][_0x135372(0x125)](_0x20e874,_0x18ea76);}catch(_0x14fff7){if(isHttp404Error(_0x14fff7))throw new SDKError(ErrorCode[_0x135372(0x152)],_0x135372(0xf5)+_0x18ea76+_0x135372(0x12b)+_0x20e874,_0x14fff7);throw _0x14fff7;}}async[a131_0x48d0c9(0x145)](_0x12b56c){const _0x259b39=a131_0x48d0c9;try{return await this[_0x259b39(0x13c)][_0x259b39(0x13f)](_0x12b56c);}catch(_0x26f53e){if(isHttp404Error(_0x26f53e))return[];throw _0x26f53e;}}async[a131_0x48d0c9(0x116)](_0x499246){const _0x1051dc=await this['listActivations'](_0x499246);return _0x1051dc['map'](flattenJourneyActivation);}async[a131_0x48d0c9(0xe1)](_0x4d547a,_0x518694){const _0x52a3e9=a131_0x48d0c9;return await this[_0x52a3e9(0x13c)][_0x52a3e9(0x16f)](_0x4d547a,_0x518694);}async['getColumnMapping'](_0x4a3a62){const _0x310f83=a131_0x48d0c9,_0x2e3d97=await this['getJourney'](_0x4a3a62),_0x17ed01=generateColumnMapping(_0x2e3d97);return{'journeyId':_0x2e3d97['id'],'journeyName':_0x2e3d97['attributes'][_0x310f83(0x153)],'database':_0x310f83(0x113)+_0x2e3d97['attributes'][_0x310f83(0x10b)],'table':_0x310f83(0x123)+_0x2e3d97['id'],'columns':_0x17ed01};}async[a131_0x48d0c9(0x127)](_0x5f4e08){const _0x916847=a131_0x48d0c9;return this[_0x916847(0x13c)][_0x916847(0xe9)](_0x5f4e08);}async[a131_0x48d0c9(0x155)](_0x4b3983){const _0x2bfa11=a131_0x48d0c9;if(!_0x4b3983)return undefined;try{const _0x12a3f6=await this[_0x2bfa11(0x127)](_0x4b3983);return _0x12a3f6[_0x2bfa11(0x140)];}catch{return undefined;}}async[a131_0x48d0c9(0x16c)](_0x549bdb){const _0x3eddac=a131_0x48d0c9,_0x5d4f00=await this[_0x3eddac(0x157)](_0x549bdb),_0x2b5664=_0x5d4f00[_0x3eddac(0x15d)][_0x3eddac(0x148)];if(!_0x2b5664)return{'bundleId':'','bundleName':_0x5d4f00[_0x3eddac(0x15d)][_0x3eddac(0x153)],'bundleDescription':_0x5d4f00[_0x3eddac(0x15d)]['description']??null,'latestJourneyId':_0x5d4f00['id'],'versions':[synthesizePreBundleVersion(_0x5d4f00)]};const _0x279a0e=await this[_0x3eddac(0x127)](_0x2b5664);return{'bundleId':_0x2b5664,'bundleName':_0x279a0e[_0x3eddac(0x153)],'bundleDescription':_0x279a0e[_0x3eddac(0x14c)]??null,'latestJourneyId':_0x279a0e[_0x3eddac(0x140)],'versions':formatVersionsFromBundle(_0x279a0e)};}async[a131_0x48d0c9(0xfd)](_0x37a71d){const _0x1f551b=a131_0x48d0c9,_0xabc93b=await this[_0x1f551b(0x157)](_0x37a71d),_0x286b14=_0xabc93b[_0x1f551b(0x15d)]['journeyBundleId'];if(!_0x286b14)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1f551b(0xec));await this[_0x1f551b(0x13c)]['checkJourneyAppendable'](_0x286b14);const _0x2f1422=await this[_0x1f551b(0x13c)]['getJourneyBundle'](_0x286b14),_0x18b0f3=_0x2f1422[_0x1f551b(0x153)]+'\x20v'+(_0x2f1422['lastVersionNumber']+0x1);return this['client'][_0x1f551b(0x132)](_0x286b14,{'sourceId':_0x37a71d,'attributes':{'name':_0x18b0f3}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x542ab3=a132_0x100c;(function(_0x24f6e0,_0x15af97){const _0x25edbb=a132_0x100c,_0x5e9fd0=_0x24f6e0();while(!![]){try{const _0x27ebb3=-parseInt(_0x25edbb(0x10e))/0x1+parseInt(_0x25edbb(0x110))/0x2+-parseInt(_0x25edbb(0x107))/0x3*(parseInt(_0x25edbb(0x10a))/0x4)+-parseInt(_0x25edbb(0x111))/0x5+-parseInt(_0x25edbb(0x113))/0x6*(-parseInt(_0x25edbb(0x109))/0x7)+-parseInt(_0x25edbb(0x10b))/0x8+parseInt(_0x25edbb(0x10d))/0x9*(parseInt(_0x25edbb(0x10c))/0xa);if(_0x27ebb3===_0x15af97)break;else _0x5e9fd0['push'](_0x5e9fd0['shift']());}catch(_0x180a9f){_0x5e9fd0['push'](_0x5e9fd0['shift']());}}}(a132_0x1a21,0xef868));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x542ab3(0x10f),a132_0x542ab3(0x112));function a132_0x100c(_0x37f448,_0x37e3ab){_0x37f448=_0x37f448-0x107;const _0x1a21b7=a132_0x1a21();let _0x100cca=_0x1a21b7[_0x37f448];return _0x100cca;}export function saveLastChatId(_0x490971){chatIdCache['write'](_0x490971);}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x2d1b10=a132_0x542ab3;chatIdCache[_0x2d1b10(0x108)]();}function a132_0x1a21(){const _0x5b5176=['32249OXIvHY','1000XlDyWt','11580080xYFnvd','10yJYtev','28120383AQcOFw','1222147vmBkcd','last_chat_id','1564600UhHpgB','359380LfFWfn','llm/chat','636tjybos','8070jtJRLf','clear'];a132_0x1a21=function(){return _0x5b5176;};return a132_0x1a21();}
|