@treasuredata/tdx 2026.4.9 → 2026.4.11
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.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +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.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +52 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +14 -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.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 +2 -1
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x56e677=a126_0x1368;(function(_0x12194a,_0x654ae2){const _0x4150e1=a126_0x1368,_0x9753c5=_0x12194a();while(!![]){try{const _0x4b317c=-parseInt(_0x4150e1(0x1c3))/0x1+parseInt(_0x4150e1(0x1df))/0x2*(parseInt(_0x4150e1(0x1d9))/0x3)+parseInt(_0x4150e1(0x1bd))/0x4*(parseInt(_0x4150e1(0x1d2))/0x5)+parseInt(_0x4150e1(0x1de))/0x6+-parseInt(_0x4150e1(0x1db))/0x7*(-parseInt(_0x4150e1(0x1e0))/0x8)+-parseInt(_0x4150e1(0x1d6))/0x9+parseInt(_0x4150e1(0x1bf))/0xa*(parseInt(_0x4150e1(0x1c0))/0xb);if(_0x4b317c===_0x654ae2)break;else _0x9753c5['push'](_0x9753c5['shift']());}catch(_0x19b9e1){_0x9753c5['push'](_0x9753c5['shift']());}}}(a126_0x4165,0x8d8d5));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';function a126_0x1368(_0x557a3a,_0x4019b6){_0x557a3a=_0x557a3a-0x1bd;const _0x4165c6=a126_0x4165();let _0x1368af=_0x4165c6[_0x557a3a];return _0x1368af;}import{EngageSDK}from'./engage.js';import{DeliverySDK}from'./delivery.js';import{ConnectionSDK}from'./connection.js';import{ScheduleSDK}from'./schedule.js';function a126_0x4165(){const _0x18d33e=['realtime','4632VWVdOt','catch','30eDjLfR','129547XIqClM','logLevel','segment','560978amFKsl','jobs','llm','policy','_tdxInstance','accessToken','apiKey','context','proxy','schedules','delivery','init','api','isInitialized','cas','1935iZjAvI','_connectionSDK','create','personalization','7623801sCqiOp','query','connection','9fHqGuP','timeout','263410zJNzQX','workflow','site','4593864EcNNab','291802UUaTKa','64ftejnG','profile'];a126_0x4165=function(){return _0x18d33e;};return a126_0x4165();}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';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_0x56e677(0x1ca)];['query'];[a126_0x56e677(0x1c2)];['journey'];[a126_0x56e677(0x1dc)];[a126_0x56e677(0x1c5)];[a126_0x56e677(0x1c4)];['user'];['engage'];[a126_0x56e677(0x1cd)];['connection'];[a126_0x56e677(0x1cc)];['realtime'];[a126_0x56e677(0x1d5)];[a126_0x56e677(0x1c6)];[a126_0x56e677(0x1d1)];[a126_0x56e677(0x1cf)];static[a126_0x56e677(0x1d4)](_0x569861={}){const _0x54ef44=a126_0x56e677,_0x203e84=resolveSite(_0x569861[_0x54ef44(0x1dd)]||'us01'),_0x298cc1=_0x569861[_0x54ef44(0x1c1)]??LogLevel['INFO'],_0x6090c=_0x569861[_0x54ef44(0x1e1)];let _0x364b63=_0x569861[_0x54ef44(0x1c8)];!_0x364b63&&(_0x364b63=getAccessToken(_0x6090c));let _0x21113e=_0x569861[_0x54ef44(0x1c9)];!_0x21113e&&(loadUserConfigOnce(),_0x21113e=getAPIKey(_0x6090c));let _0x1caaf6=_0x569861[_0x54ef44(0x1cb)];return!_0x1caaf6&&(_0x1caaf6=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger[_0x54ef44(0x1d0)]()&&Logger[_0x54ef44(0x1ce)]({'defaultLevel':_0x298cc1,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0x54ef44(0x1be)](()=>{}),new TDX({'site':_0x203e84,'apiKey':_0x21113e,'accessToken':_0x364b63,'logLevel':_0x298cc1,'profile':_0x6090c,'proxy':_0x1caaf6,'timeout':_0x569861[_0x54ef44(0x1da)]});}constructor(_0x199eb9){const _0x3c3385=a126_0x56e677;this[_0x3c3385(0x1ca)]=_0x199eb9,this[_0x3c3385(0x1d7)]=new QuerySDK(_0x199eb9),this[_0x3c3385(0x1c2)]=new SegmentSDK(_0x199eb9),this['journey']=new JourneySDK(_0x199eb9),this[_0x3c3385(0x1dc)]=new WorkflowSDK(_0x199eb9),this[_0x3c3385(0x1c5)]=new LLMSDK(_0x199eb9),this[_0x3c3385(0x1c4)]=new JobSDK(_0x199eb9),this['user']=new UserSDK(_0x199eb9),this['engage']=new EngageSDK(_0x199eb9),this['delivery']=new DeliverySDK(_0x199eb9),this[_0x3c3385(0x1d8)]=new ConnectionSDK(_0x199eb9),this[_0x3c3385(0x1cc)]=new ScheduleSDK(_0x199eb9),this[_0x3c3385(0x1e2)]=new RealtimeSDK(_0x199eb9),this[_0x3c3385(0x1d5)]=new PersonalizationSDK(_0x199eb9),this[_0x3c3385(0x1c6)]=new PolicySDK(_0x199eb9),this['cas']=new CASSDK(_0x199eb9),this[_0x3c3385(0x1cf)]=new RawAPI(_0x199eb9),this['segment'][_0x3c3385(0x1c7)]=this,this[_0x3c3385(0x1d1)][_0x3c3385(0x1d3)]=this[_0x3c3385(0x1d8)];}}
|
package/dist/sdk/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a127_0x4f20(_0x390a28,_0x48cdf9){_0x390a28=_0x390a28-0x1d7;var _0x4991d2=a127_0x4991();var _0x4f201f=_0x4991d2[_0x390a28];return _0x4f201f;}function a127_0x4991(){var _0x183f35=['21FzzRkZ','3138470mbsxxV','20780ptkuyI','1251511ZzVxAp','15697592xEOxDK','3ugMDnK','4031284VyqTvm','1790205UzstLi','666wjgSQz','1351764pGVmJK'];a127_0x4991=function(){return _0x183f35;};return a127_0x4991();}(function(_0x76872a,_0x541206){var _0x2f1c8f=a127_0x4f20,_0x120450=_0x76872a();while(!![]){try{var _0x34b2c4=parseInt(_0x2f1c8f(0x1da))/0x1+parseInt(_0x2f1c8f(0x1d8))/0x2+parseInt(_0x2f1c8f(0x1dc))/0x3*(parseInt(_0x2f1c8f(0x1dd))/0x4)+-parseInt(_0x2f1c8f(0x1de))/0x5+parseInt(_0x2f1c8f(0x1e0))/0x6*(-parseInt(_0x2f1c8f(0x1d7))/0x7)+-parseInt(_0x2f1c8f(0x1db))/0x8+parseInt(_0x2f1c8f(0x1df))/0x9*(parseInt(_0x2f1c8f(0x1d9))/0xa);if(_0x34b2c4===_0x541206)break;else _0x120450['push'](_0x120450['shift']());}catch(_0x239efd){_0x120450['push'](_0x120450['shift']());}}}(a127_0x4991,0xf0c69));export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x71fcc2=a128_0x3cd0;(function(_0x34334e,_0x2513cd){const _0x47e1b1=a128_0x3cd0,_0x571dab=_0x34334e();while(!![]){try{const _0xb831f0=-parseInt(_0x47e1b1(0x12b))/0x1*(-parseInt(_0x47e1b1(0x126))/0x2)+parseInt(_0x47e1b1(0x127))/0x3+parseInt(_0x47e1b1(0x135))/0x4+-parseInt(_0x47e1b1(0x136))/0x5+parseInt(_0x47e1b1(0x134))/0x6+parseInt(_0x47e1b1(0x131))/0x7+-parseInt(_0x47e1b1(0x12f))/0x8;if(_0xb831f0===_0x2513cd)break;else _0x571dab['push'](_0x571dab['shift']());}catch(_0x49842b){_0x571dab['push'](_0x571dab['shift']());}}}(a128_0x6720,0x91c7f));import*as a128_0x440062 from'node:fs';function a128_0x3cd0(_0x31e9c3,_0x548a5a){_0x31e9c3=_0x31e9c3-0x122;const _0x67204c=a128_0x6720();let _0x3cd0ee=_0x67204c[_0x31e9c3];return _0x3cd0ee;}function a128_0x6720(){const _0x56955b=['readFileSync','readdir','statSync','302FsPBbn','878781FWoBTK','readFile','utf-8','access','6221IeYFRk','unlink','isFile','mkdirSync','24461168bafRxt','writeFileSync','8251705usyJIE','stat','isDirectory','4668990yrxkJd','2777136drecSq','1143985niuWGY','existsSync','unlinkSync','readdirSync','writeFile'];a128_0x6720=function(){return _0x56955b;};return a128_0x6720();}import*as a128_0x2dc647 from'node:fs/promises';export const nodeFileSystem={'readFile':_0x3a851d=>a128_0x2dc647[a128_0x71fcc2(0x128)](_0x3a851d,'utf-8'),'writeFile':(_0x5a1df1,_0x4b87a9)=>a128_0x2dc647[a128_0x71fcc2(0x122)](_0x5a1df1,_0x4b87a9,a128_0x71fcc2(0x129)),'exists':async _0x526baf=>{const _0x33f66f=a128_0x71fcc2;try{return await a128_0x2dc647[_0x33f66f(0x12a)](_0x526baf),!![];}catch{return![];}},'mkdir':async(_0x1afad1,_0x15a781)=>{await a128_0x2dc647['mkdir'](_0x1afad1,_0x15a781);},'readdir':_0x2808bf=>a128_0x2dc647[a128_0x71fcc2(0x124)](_0x2808bf),'stat':async _0x2b5b09=>{const _0x158a44=a128_0x71fcc2,_0x2a380a=await a128_0x2dc647[_0x158a44(0x132)](_0x2b5b09);return{'isDirectory':()=>_0x2a380a[_0x158a44(0x133)](),'isFile':()=>_0x2a380a[_0x158a44(0x12d)]()};},'unlink':_0x43c3f8=>a128_0x2dc647[a128_0x71fcc2(0x12c)](_0x43c3f8)};export const nodeFileSystemSync={'readFileSync':_0x192cc8=>a128_0x440062[a128_0x71fcc2(0x123)](_0x192cc8,'utf-8'),'writeFileSync':(_0x5b9c2b,_0x5632c7)=>a128_0x440062[a128_0x71fcc2(0x130)](_0x5b9c2b,_0x5632c7,a128_0x71fcc2(0x129)),'existsSync':_0x2963c2=>a128_0x440062[a128_0x71fcc2(0x137)](_0x2963c2),'mkdirSync':(_0x483112,_0x53ccf8)=>{const _0x1a31cb=a128_0x71fcc2;a128_0x440062[_0x1a31cb(0x12e)](_0x483112,_0x53ccf8);},'readdirSync':_0x5257dc=>a128_0x440062[a128_0x71fcc2(0x139)](_0x5257dc),'statSync':_0x4dfa82=>{const _0x38a7ce=a128_0x71fcc2,_0x4913ef=a128_0x440062[_0x38a7ce(0x125)](_0x4dfa82);return{'isDirectory':()=>_0x4913ef['isDirectory'](),'isFile':()=>_0x4913ef[_0x38a7ce(0x12d)]()};},'unlinkSync':_0x11c889=>a128_0x440062[a128_0x71fcc2(0x138)](_0x11c889)};
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x351c02=a130_0x20e2;(function(_0x731f87,_0x15ee99){const _0x36806d=a130_0x20e2,_0x1692b5=_0x731f87();while(!![]){try{const _0x356e4d=parseInt(_0x36806d(0x117))/0x1+parseInt(_0x36806d(0x116))/0x2+parseInt(_0x36806d(0x107))/0x3*(-parseInt(_0x36806d(0x111))/0x4)+parseInt(_0x36806d(0x102))/0x5*(-parseInt(_0x36806d(0x10a))/0x6)+parseInt(_0x36806d(0x10f))/0x7*(parseInt(_0x36806d(0x106))/0x8)+parseInt(_0x36806d(0xfd))/0x9*(-parseInt(_0x36806d(0x104))/0xa)+-parseInt(_0x36806d(0xfe))/0xb;if(_0x356e4d===_0x15ee99)break;else _0x1692b5['push'](_0x1692b5['shift']());}catch(_0x6159ca){_0x1692b5['push'](_0x1692b5['shift']());}}}(a130_0x4c60,0x7f820));import{TDApiClient}from'./client/td-api-client.js';function a130_0x4c60(){const _0x2bad98=['listJobs','map','9WYDUGs','2600939NbldWR','cancelJob','list','kill','5aCPYMB','getUserInfo','3054950VZVjNt','result','10352nemEYL','3uyWpUx','client','updated_at','2067024rsmyIP','submitPrestoJob','getJobResult','show','submit','56DDKwWq','created_at','942052UcTNTo','end_at','showJob','start_at','trino','1912844qNlWst','677459DqJlpV','replace'];a130_0x4c60=function(){return _0x2bad98;};return a130_0x4c60();}function a130_0x20e2(_0x5b67a6,_0x4a5e28){_0x5b67a6=_0x5b67a6-0xfa;const _0x4c6048=a130_0x4c60();let _0x20e2df=_0x4c6048[_0x5b67a6];return _0x20e2df;}function normalizeTimestamp(_0x519090){const _0x372afa=a130_0x20e2;if(!_0x519090)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x519090))return _0x519090;return _0x519090[_0x372afa(0xfa)]('\x20UTC','Z')[_0x372afa(0xfa)]('\x20','T');}export class JobSDK{[a130_0x351c02(0x108)];constructor(_0x49be17){const _0x2620f4=a130_0x351c02;this[_0x2620f4(0x108)]=new TDApiClient(_0x49be17);}async[a130_0x351c02(0x100)](_0xc311a8){const _0x23d8ab=a130_0x351c02,_0x448584=await this[_0x23d8ab(0x108)][_0x23d8ab(0xfb)](_0xc311a8);return _0x448584[_0x23d8ab(0xfc)](_0x1bd325=>({..._0x1bd325,'created_at':normalizeTimestamp(_0x1bd325['created_at']),'updated_at':normalizeTimestamp(_0x1bd325[_0x23d8ab(0x109)]),'start_at':normalizeTimestamp(_0x1bd325['start_at']),'end_at':normalizeTimestamp(_0x1bd325[_0x23d8ab(0x112)])}));}async[a130_0x351c02(0x10d)](_0x2fd0ab){const _0x5ba6d6=a130_0x351c02,_0xc84aa9=await this[_0x5ba6d6(0x108)][_0x5ba6d6(0x113)](_0x2fd0ab);return{..._0xc84aa9,'created_at':normalizeTimestamp(_0xc84aa9[_0x5ba6d6(0x110)]),'updated_at':normalizeTimestamp(_0xc84aa9['updated_at']),'start_at':normalizeTimestamp(_0xc84aa9[_0x5ba6d6(0x114)]),'end_at':normalizeTimestamp(_0xc84aa9[_0x5ba6d6(0x112)])};}async[a130_0x351c02(0x101)](_0x10712e){const _0x145ff7=a130_0x351c02;await this['client'][_0x145ff7(0xff)](_0x10712e);}async[a130_0x351c02(0x10e)](_0x57ad3e,_0x5d9798,_0x1b1e8b=a130_0x351c02(0x115),_0x342871){const _0x36779f=a130_0x351c02;return _0x1b1e8b==='hive'?await this[_0x36779f(0x108)]['submitHiveJob'](_0x57ad3e,_0x5d9798,_0x342871):await this[_0x36779f(0x108)][_0x36779f(0x10b)](_0x57ad3e,_0x5d9798,_0x342871);}async[a130_0x351c02(0x105)](_0x35a8e8){const _0x2aeda7=a130_0x351c02;return await this[_0x2aeda7(0x108)][_0x2aeda7(0x10c)](_0x35a8e8);}async[a130_0x351c02(0x103)](){const _0x3786c9=a130_0x351c02;return await this[_0x3786c9(0x108)][_0x3786c9(0x103)]();}}
|
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
const a131_0x4e6f92=a131_0x195e;(function(_0x381931,_0x2ee3e6){const _0x401c5c=a131_0x195e,_0x3800b1=_0x381931();while(!![]){try{const _0x32af6d=parseInt(_0x401c5c(0x20d))/0x1+parseInt(_0x401c5c(0x1c8))/0x2+-parseInt(_0x401c5c(0x1eb))/0x3*(parseInt(_0x401c5c(0x1ea))/0x4)+parseInt(_0x401c5c(0x1c4))/0x5*(parseInt(_0x401c5c(0x1b4))/0x6)+-parseInt(_0x401c5c(0x1fe))/0x7*(parseInt(_0x401c5c(0x1c3))/0x8)+parseInt(_0x401c5c(0x221))/0x9+parseInt(_0x401c5c(0x1fa))/0xa*(-parseInt(_0x401c5c(0x22d))/0xb);if(_0x32af6d===_0x2ee3e6)break;else _0x3800b1['push'](_0x3800b1['shift']());}catch(_0x595420){_0x3800b1['push'](_0x3800b1['shift']());}}}(a131_0x4027,0x67230));import{CDPApiClient}from'./client/cdp-api-client.js';function a131_0x195e(_0x5034ac,_0x4c39d4){_0x5034ac=_0x5034ac-0x1ab;const _0x402709=a131_0x4027();let _0x195e5d=_0x402709[_0x5034ac];return _0x195e5d;}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x5719bf){const _0x2531e5=a131_0x195e;return _0x5719bf[_0x2531e5(0x1f1)]??_0x5719bf['attributes']?.[_0x2531e5(0x1f1)]??undefined;}function getVersionNumber(_0x20978d){const _0x356d3d=a131_0x195e;return _0x20978d['versionNumber']??_0x20978d[_0x356d3d(0x20c)]?.['versionNumber']??0x0;}function getState(_0x57bf86){const _0x2fb5a5=a131_0x195e;return _0x57bf86['state']??_0x57bf86[_0x2fb5a5(0x20c)]?.[_0x2fb5a5(0x1de)];}export function deduplicateJourneysByBundle(_0x15deed){const _0x2c7870=a131_0x195e,_0x5384e3=new Map();let _0x2fff45=0x0;for(const _0x2b5959 of _0x15deed){const _0x329acd=getBundleId(_0x2b5959);if(!_0x329acd){const _0x45e024='no-bundle-'+(_0x2b5959['id']??_0x2c7870(0x21c)+_0x2fff45++);_0x5384e3[_0x2c7870(0x1c1)](_0x45e024,_0x2b5959);continue;}const _0x264738=_0x5384e3['get'](_0x329acd);if(!_0x264738)_0x5384e3['set'](_0x329acd,_0x2b5959);else{const _0x238c75=getState(_0x264738)===_0x2c7870(0x1bd),_0xc970b7=getState(_0x2b5959)==='launched';if(_0xc970b7&&!_0x238c75)_0x5384e3['set'](_0x329acd,_0x2b5959);else{if(!_0xc970b7&&_0x238c75){}else{const _0x45ba04=getVersionNumber(_0x264738),_0x4898af=getVersionNumber(_0x2b5959);_0x4898af>_0x45ba04&&_0x5384e3[_0x2c7870(0x1c1)](_0x329acd,_0x2b5959);}}}}return Array[_0x2c7870(0x206)](_0x5384e3[_0x2c7870(0x1cd)]());}const VALID_JOURNEY_STATES=new Set([a131_0x4e6f92(0x1dc),'simulation',a131_0x4e6f92(0x1bd)]);export function parseJourneyState(_0x4e4004){const _0x281457=a131_0x4e6f92;if(typeof _0x4e4004===_0x281457(0x1b7)&&VALID_JOURNEY_STATES[_0x281457(0x1ec)](_0x4e4004))return _0x4e4004;return _0x281457(0x1dc);}export function entityToJourneyListItem(_0x5db532,_0x1cb90d){const _0x542819=a131_0x4e6f92,_0x2425aa=_0x5db532[_0x542819(0x20c)];return{'id':_0x5db532['id'],'name':_0x2425aa[_0x542819(0x229)]??'','journeyBundleName':_0x2425aa[_0x542819(0x1dd)]??_0x2425aa[_0x542819(0x229)]??'','journeyBundleId':_0x2425aa['journeyBundleId']??'','versionNumber':_0x2425aa[_0x542819(0x213)],'description':_0x2425aa[_0x542819(0x1b8)]??null,'state':parseJourneyState(_0x2425aa[_0x542819(0x1de)]),'paused':_0x2425aa['paused']??![],'audienceId':_0x1cb90d,'folderId':_0x2425aa[_0x542819(0x1c6)]??_0x5db532[_0x542819(0x225)]?.[_0x542819(0x1b0)]?.[_0x542819(0x1b6)]?.['id']??null,'createdAt':_0x2425aa[_0x542819(0x1f8)]??'','updatedAt':_0x2425aa[_0x542819(0x1c9)]??''};}function convertToColumnId(_0x1405d4){const _0x1a612=a131_0x4e6f92;return _0x1405d4[_0x1a612(0x227)](/-/g,'_');}function getStepEntries(_0x111ab0){const _0xce6989=a131_0x4e6f92;if(!_0x111ab0)return[];if(Array[_0xce6989(0x22a)](_0x111ab0))return _0x111ab0[_0xce6989(0x1b1)](_0x409594=>[_0x409594['id'],_0x409594]);return Object[_0xce6989(0x220)](_0x111ab0);}export function flattenJourneyActivation(_0x4e847d){const _0x3b9a2a=a131_0x4e6f92,{activationParams:_0x9266ad,activationId:_0x35b19d,runAfterJourneyRefresh:_0x5f2d67}=_0x4e847d[_0x3b9a2a(0x20c)];return{'id':_0x4e847d['id'],'activationId':_0x35b19d,'runAfterJourneyRefresh':_0x5f2d67,..._0x9266ad};}function col(_0x3080fc,_0x320bc7={}){return{'column':_0x3080fc,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x320bc7};}export function generateColumnMapping(_0x29f85f){const _0x1d76c6=a131_0x4e6f92,_0x31984b=[];_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x1cb))),_0x31984b[_0x1d76c6(0x1f2)](col('intime_journey',{'direction':'in','category':_0x1d76c6(0x210)})),_0x31984b['push'](col(_0x1d76c6(0x215),{'direction':_0x1d76c6(0x1e3),'category':'journey'}));_0x29f85f['attributes'][_0x1d76c6(0x1b5)]&&_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x1e2),{'direction':'in','category':_0x1d76c6(0x1b5),'detail':_0x29f85f[_0x1d76c6(0x20c)]['goal'][_0x1d76c6(0x229)]||null}));const _0x1d5fdb=_0x29f85f[_0x1d76c6(0x20c)][_0x1d76c6(0x22e)]||[];for(let _0x5848e7=0x0;_0x5848e7<_0x1d5fdb[_0x1d76c6(0x233)];_0x5848e7++){const _0x369420=_0x1d5fdb[_0x5848e7],_0x6fc45a=_0x369420[_0x1d76c6(0x229)],_0xc77717={'stageIndex':_0x5848e7,'stageName':_0x6fc45a},_0x24932e=_0x369420[_0x1d76c6(0x226)]?.[_0x1d76c6(0x229)]||null;_0x31984b['push'](col('intime_stage_'+_0x5848e7,{..._0xc77717,'direction':'in','category':_0x1d76c6(0x1cf),'detail':_0x24932e})),_0x31984b[_0x1d76c6(0x1f2)](col('outtime_stage_'+_0x5848e7,{..._0xc77717,'direction':_0x1d76c6(0x1e3),'category':_0x1d76c6(0x1cf),'detail':_0x24932e}));_0x369420[_0x1d76c6(0x212)]&&_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x1e8)+_0x5848e7+_0x1d76c6(0x1d9),{..._0xc77717,'direction':'in','category':'milestone','detail':_0x369420[_0x1d76c6(0x212)]['name']||null}));const _0x13f63c=_0x369420[_0x1d76c6(0x1fc)]||_0x369420[_0x1d76c6(0x1d8)]||[];for(let _0x19f7ae=0x0;_0x19f7ae<_0x13f63c[_0x1d76c6(0x233)];_0x19f7ae++){_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x1e8)+_0x5848e7+_0x1d76c6(0x22c)+_0x19f7ae,{..._0xc77717,'direction':'in','category':_0x1d76c6(0x218),'detail':_0x13f63c[_0x19f7ae][_0x1d76c6(0x229)]||null}));}const _0x17dba4=getStepEntries(_0x369420[_0x1d76c6(0x222)]);for(const [_0x4251c5,_0x35afa2]of _0x17dba4){const _0x4164e7=convertToColumnId(_0x4251c5),_0xc94f68=_0x35afa2['type']||null,_0x3b01aa=_0x35afa2[_0x1d76c6(0x229)]||null,_0x5c542d={..._0xc77717,'stepType':_0xc94f68,'stepName':_0x3b01aa,'stepId':_0x4251c5};_0x31984b[_0x1d76c6(0x1f2)](col('intime_stage_'+_0x5848e7+'_'+_0x4164e7,{..._0x5c542d,'direction':'in','category':_0x1d76c6(0x1f3)})),_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x205)+_0x5848e7+'_'+_0x4164e7,{..._0x5c542d,'direction':_0x1d76c6(0x1e3),'category':'step'}));if(_0x35afa2[_0x1d76c6(0x20f)]===_0x1d76c6(0x224)&&_0x35afa2[_0x1d76c6(0x1c2)])for(const _0x8817ad of _0x35afa2[_0x1d76c6(0x1c2)]){_0x8817ad['segmentId']&&_0x31984b['push'](col('intime_stage_'+_0x5848e7+'_'+_0x4164e7+'_'+_0x8817ad['segmentId'],{..._0x5c542d,'direction':'in','category':_0x1d76c6(0x1ac),'detail':_0x8817ad[_0x1d76c6(0x229)]||(_0x8817ad['excluded']?'Excluded\x20profiles':null)}));}if((_0x35afa2[_0x1d76c6(0x20f)]===_0x1d76c6(0x1e4)||_0x35afa2[_0x1d76c6(0x20f)]===_0x1d76c6(0x231))&&_0x35afa2[_0x1d76c6(0x1d5)])for(const _0x5cf51a of _0x35afa2['variants']){_0x5cf51a['id']&&_0x31984b[_0x1d76c6(0x1f2)](col(_0x1d76c6(0x1e8)+_0x5848e7+'_'+_0x4164e7+'_variant_'+convertToColumnId(_0x5cf51a['id']),{..._0x5c542d,'direction':'in','category':'variant','detail':_0x5cf51a[_0x1d76c6(0x229)]||null}));}if(_0x35afa2[_0x1d76c6(0x20f)]===_0x1d76c6(0x1ca)||_0x35afa2['type']===_0x1d76c6(0x1ae)){const _0x449b07=[];if(_0x35afa2[_0x1d76c6(0x216)])_0x449b07['push'](_0x35afa2[_0x1d76c6(0x216)]);else{if(Array[_0x1d76c6(0x22a)](_0x35afa2[_0x1d76c6(0x1bc)]))for(const _0x3be355 of _0x35afa2[_0x1d76c6(0x1bc)]){_0x3be355[_0x1d76c6(0x1cc)]&&!_0x3be355[_0x1d76c6(0x217)]&&_0x449b07[_0x1d76c6(0x1f2)](_0x3be355[_0x1d76c6(0x1cc)]);}else _0x35afa2['waitCondition']?.[_0x1d76c6(0x1cc)]&&_0x449b07[_0x1d76c6(0x1f2)](_0x35afa2[_0x1d76c6(0x21a)][_0x1d76c6(0x1cc)]);}for(const _0x1f31c9 of _0x449b07){_0x31984b[_0x1d76c6(0x1f2)](col('intime_stage_'+_0x5848e7+'_'+_0x4164e7+'_'+_0x1f31c9,{..._0x5c542d,'direction':'in','category':_0x1d76c6(0x1ac)}));}}}}return _0x31984b['push'](col(_0x1d76c6(0x208))),_0x31984b;}export function aggregateJourneyHistory(_0x4105a8){const _0x2f32cf=a131_0x4e6f92,_0x3e9e1f=_0x4105a8[_0x2f32cf(0x232)]((_0x288e50,_0x5bddb1)=>_0x288e50+(_0x5bddb1[_0x2f32cf(0x219)]??0x0),0x0),_0x468071=_0x4105a8[_0x2f32cf(0x232)]((_0x5ab758,_0x143937)=>_0x5ab758+(_0x143937[_0x2f32cf(0x209)]??0x0),0x0),_0x34f0ff=_0x4105a8[_0x2f32cf(0x232)]((_0x15892e,_0x4119a0)=>_0x15892e+((_0x4119a0['exitInflux']??0x0)+(_0x4119a0['jumpInflux']??0x0)),0x0),_0x499898=_0x4105a8[_0x4105a8[_0x2f32cf(0x233)]-0x1];return{'size':_0x499898?.[_0x2f32cf(0x1fd)]??0x0,'entered':_0x3e9e1f,'goal_achieved':_0x468071,'completion_rate':_0x468071&&_0x3e9e1f?_0x468071/_0x3e9e1f*0x64:0x0,'exit_or_jump':_0x34f0ff,'exit_or_jump_rate':_0x34f0ff&&_0x3e9e1f?_0x34f0ff/_0x3e9e1f*0x64:0x0};}export function aggregateStageHistory(_0x417436){const _0x45a0fa=a131_0x4e6f92,_0x2f6889=_0x417436[_0x45a0fa(0x232)]((_0x4fe5a2,_0x1c508f)=>_0x4fe5a2+(_0x1c508f[_0x45a0fa(0x219)]??0x0),0x0),_0x92c4f7=_0x417436[_0x45a0fa(0x232)]((_0x56a9cd,_0x55a5e3)=>_0x56a9cd+(_0x55a5e3[_0x45a0fa(0x1ee)]??0x0),0x0),_0x52ebf8=_0x417436['reduce']((_0x27b9bd,_0x60734)=>_0x27b9bd+((_0x60734['exitInflux']??0x0)+(_0x60734[_0x45a0fa(0x1e9)]??0x0)),0x0),_0x268be4=_0x417436[_0x417436[_0x45a0fa(0x233)]-0x1];return{'size':_0x268be4?.[_0x45a0fa(0x1fd)]??0x0,'entered':_0x2f6889,'milestone':_0x92c4f7,'milestone_rate':_0x92c4f7&&_0x2f6889?_0x92c4f7/_0x2f6889*0x64:0x0,'exit_or_jump':_0x52ebf8,'exit_or_jump_rate':_0x52ebf8&&_0x2f6889?_0x52ebf8/_0x2f6889*0x64:0x0};}function a131_0x4027(){const _0x3ff212=['create','history','outtime_stage_','from','all','time','goalInflux','listSegmentFolders','resolveJourneyId','attributes','262644IISZmL','INVALID_ARGUMENT','type','journey','listEntitiesByFolder','milestone','versionNumber','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','outtime_journey','conditionSegmentId','timedOutPath','exit_criteria','entryInflux','waitCondition','journeyId','idx-','getBundle','update','listActivationsFlat','entries','7513740TxERUt','steps','limit','DecisionPoint','relationships','entryCriteria','replace','add','name','isArray','rootFolderId','_exit_','1844788kOekHQ','journeyStages','listJourneysWithDetailsFromParentSegment','activationStepsById','ABTest','reduce','length','flat','getParentSegmentFull','toLowerCase','branch','journeys','Wait','listJourneyActivations','parentFolder','map','journeyStageId','lastVersionNumber','54ckHoJV','goal','data','string','description','getJourneyBundle','getLatestJourneyId','createActivation','conditions','launched','listJourneys','listVersions','applyVersionDeduplication','set','branches','255608gXEpOW','42215XorRMi','completionRate','segmentFolderId','activation','6468xntybo','updatedAt','WaitStep','cdp_customer_id','segmentId','values','createVersion','stage','Journey\x20not\x20found:\x20','find','latestJourneyId','listJourneysFromParentSegment','getActivationSankeyChart','variants','getTrafficData','getJourneyActivation','exitCriteria','_milestone','listActivations','pause','draft','journeyBundleName','state','getConversionSankeyChart','listJourneysWithDetails','paused','intime_goal','out','AbTest','includeAllVersions','enteredSize','conversion','intime_stage_','jumpInflux','8872jfAVdy','318nliypq','has','resume','milestoneInflux','JOURNEY_NOT_FOUND','journey_','journeyBundleId','push','step','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','client','checkJourneyAppendable','getJourney','createdAt','cdp_audience_','10wSHLNw','fetchTrafficRaw','exitCriterias','size','77WKTdCV','includeHistory','getActivation','goalSize','filter'];a131_0x4027=function(){return _0x3ff212;};return a131_0x4027();}export function assembleJourneyStats(_0x40c1a9,_0x2db46e){const _0x7cfd76=a131_0x4e6f92,_0x42b40b=!!(_0x2db46e?.[_0x7cfd76(0x206)]||_0x2db46e?.['to'])&&!!_0x40c1a9[_0x7cfd76(0x204)]?.['length'];if(_0x42b40b){const _0xa76858=aggregateJourneyHistory(_0x40c1a9[_0x7cfd76(0x204)]),_0x501979={'journey_id':_0x40c1a9[_0x7cfd76(0x21b)],..._0x2db46e?.['from']&&{'from':_0x2db46e[_0x7cfd76(0x206)]},..._0x2db46e?.['to']&&{'to':_0x2db46e['to']},..._0xa76858};return _0x2db46e?.[_0x7cfd76(0x1ff)]&&(_0x501979[_0x7cfd76(0x204)]=_0x40c1a9['history']),_0x501979;}return{'journey_id':_0x40c1a9[_0x7cfd76(0x21b)],'size':_0x40c1a9[_0x7cfd76(0x1fd)],'entered':_0x40c1a9[_0x7cfd76(0x1e6)],'goal_achieved':_0x40c1a9[_0x7cfd76(0x201)],'completion_rate':_0x40c1a9[_0x7cfd76(0x1c5)],'exit_or_jump':_0x40c1a9['exitOrJumpSize'],'exit_or_jump_rate':_0x40c1a9['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x4dda6a){const _0x3a8b00=a131_0x4e6f92,_0x3c3ee4=_0x4dda6a[_0x3a8b00(0x1ad)][_0x3a8b00(0x1b1)](_0xd5109c=>({'journeyId':_0xd5109c['id'],'versionNumber':_0xd5109c['attributes'][_0x3a8b00(0x213)]??0x0,'name':_0xd5109c[_0x3a8b00(0x20c)][_0x3a8b00(0x229)],'state':_0xd5109c[_0x3a8b00(0x20c)][_0x3a8b00(0x1de)],'paused':_0xd5109c[_0x3a8b00(0x20c)][_0x3a8b00(0x1e1)],'createdAt':_0xd5109c[_0x3a8b00(0x20c)][_0x3a8b00(0x1f8)],'updatedAt':_0xd5109c[_0x3a8b00(0x20c)][_0x3a8b00(0x1c9)]}));return _0x3c3ee4['sort']((_0x57c59d,_0x1ed0ef)=>_0x57c59d[_0x3a8b00(0x213)]-_0x1ed0ef[_0x3a8b00(0x213)]),_0x3c3ee4;}export function synthesizePreBundleVersion(_0x3f54d9){const _0x1a74d5=a131_0x4e6f92;return{'journeyId':_0x3f54d9['id'],'versionNumber':0x1,'name':_0x3f54d9[_0x1a74d5(0x20c)][_0x1a74d5(0x229)],'state':_0x3f54d9[_0x1a74d5(0x20c)][_0x1a74d5(0x1de)],'paused':_0x3f54d9[_0x1a74d5(0x20c)][_0x1a74d5(0x1e1)],'createdAt':_0x3f54d9['attributes'][_0x1a74d5(0x1f8)],'updatedAt':_0x3f54d9[_0x1a74d5(0x20c)][_0x1a74d5(0x1c9)]};}export function buildStageNameMap(_0x39a98b){const _0x4e5113=a131_0x4e6f92;return new Map(_0x39a98b[_0x4e5113(0x20c)]['journeyStages']?.[_0x4e5113(0x1b1)](_0x280274=>[_0x280274['id'],_0x280274[_0x4e5113(0x229)]])??[]);}export class JourneySDK{['client'];constructor(_0x188063){const _0x4e0e66=a131_0x4e6f92;this[_0x4e0e66(0x1f5)]=new CDPApiClient(_0x188063);}['applyVersionDeduplication'](_0x1fbf80,_0x5c66f4){return _0x5c66f4?_0x1fbf80:deduplicateJourneysByBundle(_0x1fbf80);}async[a131_0x4e6f92(0x1e0)](_0x3c80e3,_0xd9907b){const _0x229124=a131_0x4e6f92;try{const _0x398dcb=await this[_0x229124(0x1f5)][_0x229124(0x1e0)](_0x3c80e3);return{'journeys':this['applyVersionDeduplication'](_0x398dcb['journeys'],_0xd9907b),'activationStepsById':_0x398dcb[_0x229124(0x230)]};}catch(_0x4c1db2){if(isHttp404Error(_0x4c1db2))return{'journeys':[],'activationStepsById':new Map()};throw _0x4c1db2;}}async[a131_0x4e6f92(0x1d3)](_0x1f5c8a,_0x3c3a13,_0x5c5c2e){const _0x4b89b0=a131_0x4e6f92;let _0x34195f=_0x3c3a13;if(!_0x34195f)try{const _0x363702=await this[_0x4b89b0(0x1f5)][_0x4b89b0(0x235)](_0x1f5c8a);_0x34195f=_0x363702[_0x4b89b0(0x22b)]??undefined;}catch(_0x44c726){if(isHttp404Error(_0x44c726))return[];throw _0x44c726;}if(!_0x34195f)return[];let _0x3f9ce1;if(_0x5c5c2e?.[_0x4b89b0(0x1e5)]){const _0x534a04=await this[_0x4b89b0(0x1f5)][_0x4b89b0(0x20a)](_0x1f5c8a),_0x22b1d9=_0x534a04[_0x4b89b0(0x1b1)](_0x3bdfaa=>this[_0x4b89b0(0x1f5)][_0x4b89b0(0x1be)](_0x3bdfaa['id'])),_0x598f10=await Promise[_0x4b89b0(0x207)](_0x22b1d9),_0x20fbae=new Set();_0x3f9ce1=_0x598f10[_0x4b89b0(0x234)]()['filter'](_0x4b1490=>{const _0x2a6351=_0x4b89b0;if(_0x20fbae['has'](_0x4b1490['id']))return![];return _0x20fbae[_0x2a6351(0x228)](_0x4b1490['id']),!![];});}else{const _0x1259e1=await this['client'][_0x4b89b0(0x211)](_0x34195f,0x20,![]),_0x5d23e3=_0x1259e1['data'],_0xd3242c=_0x5d23e3[_0x4b89b0(0x202)](_0x44a61e=>_0x44a61e[_0x4b89b0(0x20f)]===_0x4b89b0(0x210));_0x3f9ce1=_0xd3242c['map'](_0x5bf558=>entityToJourneyListItem(_0x5bf558,_0x1f5c8a));}return this[_0x4b89b0(0x1c0)](_0x3f9ce1,_0x5c5c2e?.[_0x4b89b0(0x1e5)]);}async['listJourneysWithFolders'](_0x5eb83d,_0x5f4db7,_0x19a059){const _0x4376e1=a131_0x4e6f92;if(!_0x5f4db7)return{'journeys':[],'folders':[]};const _0x3e55bf=await this['client'][_0x4376e1(0x211)](_0x5f4db7,0x20,![]),_0xd45ccd=_0x3e55bf[_0x4376e1(0x1b6)],_0x646f44=_0xd45ccd[_0x4376e1(0x202)](_0x22f558=>_0x22f558[_0x4376e1(0x20f)]==='folder-segment'&&_0x22f558['id']!==_0x5f4db7),_0x2d4021=_0x646f44[_0x4376e1(0x1b1)](_0x302de9=>({'id':_0x302de9['id'],'name':_0x302de9[_0x4376e1(0x20c)]['name']})),_0x5631b6=_0xd45ccd[_0x4376e1(0x202)](_0x297328=>_0x297328[_0x4376e1(0x20f)]===_0x4376e1(0x210)),_0x42be6a=_0x5631b6[_0x4376e1(0x1b1)](_0x4335d5=>entityToJourneyListItem(_0x4335d5,_0x5eb83d));return{'journeys':this[_0x4376e1(0x1c0)](_0x42be6a,_0x19a059?.[_0x4376e1(0x1e5)]),'folders':_0x2d4021};}async[a131_0x4e6f92(0x22f)](_0x194a13,_0x215da2){const _0x477ffb=a131_0x4e6f92;let _0x386553;try{_0x386553=await this[_0x477ffb(0x1f5)][_0x477ffb(0x20a)](_0x194a13);}catch(_0xcb7325){if(isHttp404Error(_0xcb7325))return{'journeys':[],'activationStepsById':new Map()};throw _0xcb7325;}const _0x2874a6=_0x386553[_0x477ffb(0x1b1)](async _0x2b0b2f=>{const _0x3e4e37=_0x477ffb;return await this[_0x3e4e37(0x1e0)](_0x2b0b2f['id'],_0x215da2?.[_0x3e4e37(0x1e5)]);}),_0xee269e=await Promise['all'](_0x2874a6),_0x2002f3=new Map(),_0x45693d=[];for(const _0x53f06d of _0xee269e){_0x45693d[_0x477ffb(0x1f2)](..._0x53f06d[_0x477ffb(0x1ad)]);for(const [_0x47977c,_0x59cdeb]of _0x53f06d['activationStepsById']){_0x2002f3[_0x477ffb(0x1c1)](_0x47977c,_0x59cdeb);}}const _0x1cdc16=new Set(),_0x249009=_0x45693d[_0x477ffb(0x202)](_0x15deb9=>{const _0x544558=_0x477ffb;if(_0x1cdc16['has'](_0x15deb9['id']))return![];return _0x1cdc16[_0x544558(0x228)](_0x15deb9['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x249009,_0x215da2?.[_0x477ffb(0x1e5)]),'activationStepsById':_0x2002f3};}async['getJourney'](_0x8c5144){const _0x2cd1e4=a131_0x4e6f92;try{return await this[_0x2cd1e4(0x1f5)][_0x2cd1e4(0x1f7)](_0x8c5144);}catch(_0x341680){if(isHttp404Error(_0x341680))throw new SDKError(ErrorCode[_0x2cd1e4(0x1ef)],_0x2cd1e4(0x1d0)+_0x8c5144,_0x341680);throw _0x341680;}}async[a131_0x4e6f92(0x20b)](_0x191daf,_0x2714b9){const _0x490df0=a131_0x4e6f92,_0x3ae65c=await this[_0x490df0(0x1d3)](_0x191daf),_0x57bedd=_0x3ae65c[_0x490df0(0x1d1)](_0x24af17=>_0x24af17[_0x490df0(0x1dd)][_0x490df0(0x1ab)]()===_0x2714b9['toLowerCase']());if(!_0x57bedd)throw new SDKError(ErrorCode[_0x490df0(0x1ef)],_0x490df0(0x1d0)+_0x2714b9,undefined,{'helpText':_0x490df0(0x1f4)});return _0x57bedd['id'];}async['getStatistics'](_0x5d0789,_0x112505){const _0xc14a83=a131_0x4e6f92;try{return await this[_0xc14a83(0x1f5)]['getJourneyStatistics'](_0x5d0789,_0x112505);}catch(_0x44198b){if(isHttp404Error(_0x44198b))throw new SDKError(ErrorCode[_0xc14a83(0x1ef)],_0xc14a83(0x1d0)+_0x5d0789,_0x44198b);throw _0x44198b;}}async[a131_0x4e6f92(0x1d6)](_0x1cd0aa,_0x47c083){const _0x41214b=a131_0x4e6f92,_0x2f0822={'from':_0x47c083?.[_0x41214b(0x206)],'to':_0x47c083?.['to'],'limit':_0x47c083?.[_0x41214b(0x223)]},_0x224408=_0x47c083?.[_0x41214b(0x20f)]!==_0x41214b(0x1e7);try{const [_0xf772f3,_0x3d4a6e]=await Promise['all']([this['fetchTrafficRaw'](_0x1cd0aa,_0x47c083?.[_0x41214b(0x20f)],_0x2f0822),_0x224408?this[_0x41214b(0x1f7)](_0x1cd0aa):undefined]);if(_0xf772f3[_0x41214b(0x1c7)]&&_0x3d4a6e){const _0x380d8c=buildStageNameMap(_0x3d4a6e);_0xf772f3[_0x41214b(0x1c7)]=_0xf772f3['activation'][_0x41214b(0x1b1)](_0x2a3cc6=>({..._0x2a3cc6,'journeyStageName':_0x380d8c['get'](_0x2a3cc6[_0x41214b(0x1b2)])??_0x2a3cc6[_0x41214b(0x1b2)]}));}return _0xf772f3;}catch(_0x291bf2){if(isHttp404Error(_0x291bf2))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x1cd0aa,_0x291bf2);throw _0x291bf2;}}async[a131_0x4e6f92(0x1fb)](_0x501644,_0x5f45c9,_0x1fbaa9){const _0x50aa91=a131_0x4e6f92;if(_0x5f45c9==='conversion'){const _0x448fc4=await this[_0x50aa91(0x1f5)][_0x50aa91(0x1df)](_0x501644,_0x1fbaa9);return{'conversion':_0x448fc4};}if(_0x5f45c9===_0x50aa91(0x1c7)){const _0x49dd8b=await this['client'][_0x50aa91(0x1d4)](_0x501644,_0x1fbaa9);return{'activation':_0x49dd8b};}const [_0x33da05,_0x279e6b]=await Promise[_0x50aa91(0x207)]([this[_0x50aa91(0x1f5)][_0x50aa91(0x1df)](_0x501644,_0x1fbaa9),this['client'][_0x50aa91(0x1d4)](_0x501644,_0x1fbaa9)]);return{'conversion':_0x33da05,'activation':_0x279e6b};}async[a131_0x4e6f92(0x1db)](_0x248451){const _0x44f3a6=a131_0x4e6f92;try{return await this[_0x44f3a6(0x1f5)]['pauseJourney'](_0x248451);}catch(_0x47be51){if(isHttp404Error(_0x47be51))throw new SDKError(ErrorCode[_0x44f3a6(0x1ef)],_0x44f3a6(0x1d0)+_0x248451,_0x47be51);throw _0x47be51;}}async[a131_0x4e6f92(0x1ed)](_0x2d2af){const _0x5f4448=a131_0x4e6f92;try{return await this[_0x5f4448(0x1f5)]['resumeJourney'](_0x2d2af);}catch(_0x23527c){if(isHttp404Error(_0x23527c))throw new SDKError(ErrorCode[_0x5f4448(0x1ef)],_0x5f4448(0x1d0)+_0x2d2af,_0x23527c);throw _0x23527c;}}async[a131_0x4e6f92(0x203)](_0x4e1c33){const _0x1165ca=a131_0x4e6f92;return await this[_0x1165ca(0x1f5)]['createJourney'](_0x4e1c33);}async[a131_0x4e6f92(0x21e)](_0xa3947,_0xee1645){const _0x5e4713=a131_0x4e6f92;try{return await this['client']['updateJourney'](_0xa3947,_0xee1645);}catch(_0x4b89cc){if(isHttp404Error(_0x4b89cc))throw new SDKError(ErrorCode[_0x5e4713(0x1ef)],_0x5e4713(0x1d0)+_0xa3947,_0x4b89cc);throw _0x4b89cc;}}async[a131_0x4e6f92(0x200)](_0xdc6a88,_0x24928a){const _0x52859d=a131_0x4e6f92;try{return await this[_0x52859d(0x1f5)][_0x52859d(0x1d7)](_0xdc6a88,_0x24928a);}catch(_0x47f29a){if(isHttp404Error(_0x47f29a))throw new SDKError(ErrorCode['NOT_FOUND'],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x24928a+'\x20in\x20journey\x20'+_0xdc6a88,_0x47f29a);throw _0x47f29a;}}async[a131_0x4e6f92(0x1da)](_0x17f63c){const _0x1c1f64=a131_0x4e6f92;try{return await this[_0x1c1f64(0x1f5)][_0x1c1f64(0x1af)](_0x17f63c);}catch(_0x1fd8e8){if(isHttp404Error(_0x1fd8e8))return[];throw _0x1fd8e8;}}async[a131_0x4e6f92(0x21f)](_0x5cd4d1){const _0x59644b=a131_0x4e6f92,_0x22aac4=await this[_0x59644b(0x1da)](_0x5cd4d1);return _0x22aac4[_0x59644b(0x1b1)](flattenJourneyActivation);}async[a131_0x4e6f92(0x1bb)](_0x2d5c53,_0xb34fad){const _0x144cc7=a131_0x4e6f92;return await this[_0x144cc7(0x1f5)]['createJourneyActivation'](_0x2d5c53,_0xb34fad);}async['getColumnMapping'](_0x304589){const _0xe09726=a131_0x4e6f92,_0x1a83cd=await this[_0xe09726(0x1f7)](_0x304589),_0x2ab19d=generateColumnMapping(_0x1a83cd);return{'journeyId':_0x1a83cd['id'],'journeyName':_0x1a83cd['attributes'][_0xe09726(0x229)],'database':_0xe09726(0x1f9)+_0x1a83cd['attributes']['audienceId'],'table':_0xe09726(0x1f0)+_0x1a83cd['id'],'columns':_0x2ab19d};}async[a131_0x4e6f92(0x21d)](_0x35cd8e){const _0x9e9be8=a131_0x4e6f92;return this[_0x9e9be8(0x1f5)][_0x9e9be8(0x1b9)](_0x35cd8e);}async[a131_0x4e6f92(0x1ba)](_0x42a3e5){const _0x4253b5=a131_0x4e6f92;if(!_0x42a3e5)return undefined;try{const _0x36a619=await this['getBundle'](_0x42a3e5);return _0x36a619[_0x4253b5(0x1d2)];}catch{return undefined;}}async[a131_0x4e6f92(0x1bf)](_0x25240d){const _0x2d0afd=a131_0x4e6f92,_0x20020e=await this[_0x2d0afd(0x1f7)](_0x25240d),_0x2cecc1=_0x20020e[_0x2d0afd(0x20c)][_0x2d0afd(0x1f1)];if(!_0x2cecc1)return{'bundleId':'','bundleName':_0x20020e[_0x2d0afd(0x20c)]['name'],'bundleDescription':_0x20020e[_0x2d0afd(0x20c)][_0x2d0afd(0x1b8)]??null,'latestJourneyId':_0x20020e['id'],'versions':[synthesizePreBundleVersion(_0x20020e)]};const _0x7b74fb=await this['getBundle'](_0x2cecc1);return{'bundleId':_0x2cecc1,'bundleName':_0x7b74fb['name'],'bundleDescription':_0x7b74fb['description']??null,'latestJourneyId':_0x7b74fb[_0x2d0afd(0x1d2)],'versions':formatVersionsFromBundle(_0x7b74fb)};}async[a131_0x4e6f92(0x1ce)](_0x273c5b){const _0x58f590=a131_0x4e6f92,_0x15a780=await this['getJourney'](_0x273c5b),_0x106b52=_0x15a780['attributes'][_0x58f590(0x1f1)];if(!_0x106b52)throw new SDKError(ErrorCode[_0x58f590(0x20e)],_0x58f590(0x214));await this[_0x58f590(0x1f5)][_0x58f590(0x1f6)](_0x106b52);const _0x4f0681=await this[_0x58f590(0x1f5)]['getJourneyBundle'](_0x106b52),_0x3353f3=_0x4f0681[_0x58f590(0x229)]+'\x20v'+(_0x4f0681[_0x58f590(0x1b3)]+0x1);return this[_0x58f590(0x1f5)]['createJourneyVersion'](_0x106b52,{'sourceId':_0x273c5b,'attributes':{'name':_0x3353f3}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x179f30=a132_0x4dd5;function a132_0x4dd5(_0x2f5af2,_0x1f371f){_0x2f5af2=_0x2f5af2-0x192;const _0x2442cb=a132_0x2442();let _0x4dd579=_0x2442cb[_0x2f5af2];return _0x4dd579;}(function(_0x36446e,_0x2e502b){const _0xbd1286=a132_0x4dd5,_0x100a23=_0x36446e();while(!![]){try{const _0x5b2183=parseInt(_0xbd1286(0x19e))/0x1+parseInt(_0xbd1286(0x197))/0x2+-parseInt(_0xbd1286(0x19a))/0x3+parseInt(_0xbd1286(0x192))/0x4*(parseInt(_0xbd1286(0x198))/0x5)+-parseInt(_0xbd1286(0x19c))/0x6+-parseInt(_0xbd1286(0x196))/0x7*(-parseInt(_0xbd1286(0x195))/0x8)+-parseInt(_0xbd1286(0x19b))/0x9;if(_0x5b2183===_0x2e502b)break;else _0x100a23['push'](_0x100a23['shift']());}catch(_0x57d99f){_0x100a23['push'](_0x100a23['shift']());}}}(a132_0x2442,0xe0c54));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a132_0x179f30(0x19d));export function saveLastChatId(_0x48cdc3){const _0x45685b=a132_0x179f30;chatIdCache[_0x45685b(0x194)](_0x48cdc3);}export function loadLastChatId(){const _0x969ea8=a132_0x179f30;return chatIdCache[_0x969ea8(0x199)]();}function a132_0x2442(){const _0xbc66b0=['2870xydriI','2679352cTCecT','890bldwUY','read','4035162ANDRjM','5870412RidrbM','1106802wsXjwt','llm/chat','155715jtJMcH','4364oSCWir','clear','write','27568tNvRsd'];a132_0x2442=function(){return _0xbc66b0;};return a132_0x2442();}export function clearLastChatId(){const _0x826538=a132_0x179f30;chatIdCache[_0x826538(0x193)]();}
|