@treasuredata/tdx 0.25.8 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.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/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a94_0x302933=a94_0x2805;function a94_0x2805(_0x1ed35c,_0x44eda3){_0x1ed35c=_0x1ed35c-0x97;const _0x998e9a=a94_0x998e();let _0x280523=_0x998e9a[_0x1ed35c];return _0x280523;}(function(_0x5cd244,_0x28e55b){const _0x2fa77c=a94_0x2805,_0x98ab9b=_0x5cd244();while(!![]){try{const _0x11ec71=parseInt(_0x2fa77c(0x97))/0x1*(parseInt(_0x2fa77c(0xb6))/0x2)+parseInt(_0x2fa77c(0x9c))/0x3+-parseInt(_0x2fa77c(0xad))/0x4+-parseInt(_0x2fa77c(0xc0))/0x5*(-parseInt(_0x2fa77c(0x9b))/0x6)+parseInt(_0x2fa77c(0xb5))/0x7+parseInt(_0x2fa77c(0xa2))/0x8+-parseInt(_0x2fa77c(0xda))/0x9*(parseInt(_0x2fa77c(0xb7))/0xa);if(_0x11ec71===_0x28e55b)break;else _0x98ab9b['push'](_0x98ab9b['shift']());}catch(_0xd1dac9){_0x98ab9b['push'](_0x98ab9b['shift']());}}}(a94_0x998e,0xb5ad1));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2ef401){const _0x21a393=a94_0x2805;return _0x2ef401['journeyBundleId']??_0x2ef401['attributes']?.[_0x21a393(0xba)]??undefined;}function getVersionNumber(_0x17c84c){const _0x50f13e=a94_0x2805;return _0x17c84c['versionNumber']??_0x17c84c[_0x50f13e(0xbd)]?.[_0x50f13e(0x99)]??0x0;}export function deduplicateJourneysByBundle(_0x2ac4fb){const _0x78af33=a94_0x2805,_0x7ea72=new Map();let _0x4cc40b=0x0;for(const _0x1e98c0 of _0x2ac4fb){const _0x51b8f2=getBundleId(_0x1e98c0);if(!_0x51b8f2){const _0x343bb5=_0x78af33(0xc1)+(_0x1e98c0['id']??'idx-'+_0x4cc40b++);_0x7ea72[_0x78af33(0xc6)](_0x343bb5,_0x1e98c0);continue;}const _0x2f503f=_0x7ea72[_0x78af33(0xa9)](_0x51b8f2);if(!_0x2f503f)_0x7ea72[_0x78af33(0xc6)](_0x51b8f2,_0x1e98c0);else{const _0x502121=getVersionNumber(_0x2f503f),_0x1c903d=getVersionNumber(_0x1e98c0);_0x1c903d>_0x502121&&_0x7ea72[_0x78af33(0xc6)](_0x51b8f2,_0x1e98c0);}}return Array['from'](_0x7ea72[_0x78af33(0xb9)]());}const VALID_JOURNEY_STATES=new Set([a94_0x302933(0xcb),'simulation','launched']);export function parseJourneyState(_0x2cfc4e){const _0x52224a=a94_0x302933;if(typeof _0x2cfc4e===_0x52224a(0xd7)&&VALID_JOURNEY_STATES[_0x52224a(0xd1)](_0x2cfc4e))return _0x2cfc4e;return'draft';}function a94_0x998e(){const _0x1ecfe9=['journeys','filter','1510NFawKO','no-bundle-','relationships','updateJourney','description','applyVersionDeduplication','set','listEntitiesByFolder','listJourneysWithDetails','getJourney','rootFolderId','draft','listSegmentFolders','paused','toLowerCase','listActivations','journey','has','Journey\x20activation\x20step\x20not\x20found:\x20','createJourney','getJourneyStatistics','update','pause','string','listJourneysWithFolders','listJourneysWithDetailsFromParentSegment','10071FnOTxu','createdAt','add','createActivation','getStatistics','data','811417nYhXrx','journeyBundleName','versionNumber','listJourneyActivations','17718yPJogB','2183925gsyNdl','parentFolder','map','folder-segment','Journey\x20not\x20found:\x20','listJourneysFromParentSegment','359360HetDmk','createJourneyActivation','type','JOURNEY_NOT_FOUND','getJourneyActivation','state','getParentSegmentFull','get','getActivation','create','activationStepsById','721568WgnLQb','includeAllVersions','find','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','push','client','NOT_FOUND','name','7992964UmnwUD','2sYsfIo','24070VzAujk','all','values','journeyBundleId','resume','flat','attributes'];a94_0x998e=function(){return _0x1ecfe9;};return a94_0x998e();}export function entityToJourneyListItem(_0x214580,_0x1cfc5e){const _0x5062e8=a94_0x302933,_0x3ea8f7=_0x214580[_0x5062e8(0xbd)];return{'id':_0x214580['id'],'name':_0x3ea8f7[_0x5062e8(0xb4)]??'','journeyBundleName':_0x3ea8f7[_0x5062e8(0x98)]??_0x3ea8f7[_0x5062e8(0xb4)]??'','journeyBundleId':_0x3ea8f7[_0x5062e8(0xba)]??'','versionNumber':_0x3ea8f7[_0x5062e8(0x99)],'description':_0x3ea8f7[_0x5062e8(0xc4)]??null,'state':parseJourneyState(_0x3ea8f7[_0x5062e8(0xa7)]),'paused':_0x3ea8f7[_0x5062e8(0xcd)]??![],'audienceId':_0x1cfc5e,'folderId':_0x3ea8f7['segmentFolderId']??_0x214580[_0x5062e8(0xc2)]?.[_0x5062e8(0x9d)]?.[_0x5062e8(0xdf)]?.['id']??null,'createdAt':_0x3ea8f7[_0x5062e8(0xdb)]??'','updatedAt':_0x3ea8f7['updatedAt']??''};}export class JourneySDK{['client'];constructor(_0x3ee8d5){const _0x319b60=a94_0x302933;this[_0x319b60(0xb2)]=new CDPApiClient(_0x3ee8d5);}[a94_0x302933(0xc5)](_0xdabc12,_0x54a59b){return _0x54a59b?_0xdabc12:deduplicateJourneysByBundle(_0xdabc12);}async[a94_0x302933(0xc8)](_0x558203,_0x51202d){const _0x30d139=a94_0x302933;try{const _0x262830=await this[_0x30d139(0xb2)][_0x30d139(0xc8)](_0x558203);return{'journeys':this[_0x30d139(0xc5)](_0x262830['journeys'],_0x51202d),'activationStepsById':_0x262830[_0x30d139(0xac)]};}catch(_0x589e78){if(isHttp404Error(_0x589e78))return{'journeys':[],'activationStepsById':new Map()};throw _0x589e78;}}async['listJourneysFromParentSegment'](_0x20f4f0,_0x5618e6,_0x497be2){const _0x2f8736=a94_0x302933;let _0x168875=_0x5618e6;if(!_0x168875)try{const _0x10cb43=await this[_0x2f8736(0xb2)][_0x2f8736(0xa8)](_0x20f4f0);_0x168875=_0x10cb43[_0x2f8736(0xca)]??undefined;}catch(_0x522ecf){if(isHttp404Error(_0x522ecf))return[];throw _0x522ecf;}if(!_0x168875)return[];let _0x5f281a;if(_0x497be2?.[_0x2f8736(0xae)]){const _0x341991=await this[_0x2f8736(0xb2)][_0x2f8736(0xcc)](_0x20f4f0),_0x4e3523=_0x341991[_0x2f8736(0x9e)](_0x5f4df0=>this[_0x2f8736(0xb2)]['listJourneys'](_0x5f4df0['id'])),_0x43bed0=await Promise['all'](_0x4e3523);_0x5f281a=_0x43bed0[_0x2f8736(0xbc)]();}else{const _0x36064c=await this[_0x2f8736(0xb2)][_0x2f8736(0xc7)](_0x168875,0x20,![]),_0x31d70d=_0x36064c[_0x2f8736(0xdf)],_0x34a549=_0x31d70d[_0x2f8736(0xbf)](_0x9bed8=>_0x9bed8[_0x2f8736(0xa4)]===_0x2f8736(0xd0));_0x5f281a=_0x34a549[_0x2f8736(0x9e)](_0x78e59a=>entityToJourneyListItem(_0x78e59a,_0x20f4f0));}return this['applyVersionDeduplication'](_0x5f281a,_0x497be2?.[_0x2f8736(0xae)]);}async[a94_0x302933(0xd8)](_0x4d1fa5,_0x4d69e0,_0x238201){const _0x4fb666=a94_0x302933;if(!_0x4d69e0)return{'journeys':[],'folders':[]};const _0x4a2678=await this['client'][_0x4fb666(0xc7)](_0x4d69e0,0x20,![]),_0x58f21d=_0x4a2678[_0x4fb666(0xdf)],_0x1ce349=_0x58f21d[_0x4fb666(0xbf)](_0x5248e0=>_0x5248e0[_0x4fb666(0xa4)]===_0x4fb666(0x9f)&&_0x5248e0['id']!==_0x4d69e0),_0x27c708=_0x1ce349[_0x4fb666(0x9e)](_0x2680b8=>({'id':_0x2680b8['id'],'name':_0x2680b8[_0x4fb666(0xbd)]['name']})),_0x16ca07=_0x58f21d['filter'](_0x541de3=>_0x541de3[_0x4fb666(0xa4)]===_0x4fb666(0xd0)),_0x14ec42=_0x16ca07[_0x4fb666(0x9e)](_0x8118df=>entityToJourneyListItem(_0x8118df,_0x4d1fa5));return{'journeys':this[_0x4fb666(0xc5)](_0x14ec42,_0x238201?.['includeAllVersions']),'folders':_0x27c708};}async[a94_0x302933(0xd9)](_0x343d14,_0x5cafec){const _0x5630e2=a94_0x302933;let _0x1b8f56;try{_0x1b8f56=await this['client'][_0x5630e2(0xcc)](_0x343d14);}catch(_0x27ef33){if(isHttp404Error(_0x27ef33))return{'journeys':[],'activationStepsById':new Map()};throw _0x27ef33;}const _0x2d393f=_0x1b8f56[_0x5630e2(0x9e)](async _0xaac2c3=>{const _0x2cd186=_0x5630e2;return await this[_0x2cd186(0xc8)](_0xaac2c3['id'],_0x5cafec?.[_0x2cd186(0xae)]);}),_0x3ebdde=await Promise[_0x5630e2(0xb8)](_0x2d393f),_0x6de891=new Map(),_0x41bfc4=[];for(const _0x498b7a of _0x3ebdde){_0x41bfc4[_0x5630e2(0xb1)](..._0x498b7a[_0x5630e2(0xbe)]);for(const [_0x1a0978,_0x21d93c]of _0x498b7a['activationStepsById']){_0x6de891['set'](_0x1a0978,_0x21d93c);}}const _0x12fa62=new Set(),_0x3203a1=_0x41bfc4['filter'](_0x56d0fd=>{const _0x36a964=_0x5630e2;if(_0x12fa62[_0x36a964(0xd1)](_0x56d0fd['id']))return![];return _0x12fa62[_0x36a964(0xdc)](_0x56d0fd['id']),!![];});return{'journeys':this[_0x5630e2(0xc5)](_0x3203a1,_0x5cafec?.['includeAllVersions']),'activationStepsById':_0x6de891};}async[a94_0x302933(0xc9)](_0x2b895b){const _0x37ac5b=a94_0x302933;try{return await this[_0x37ac5b(0xb2)]['getJourney'](_0x2b895b);}catch(_0x5c19da){if(isHttp404Error(_0x5c19da))throw new SDKError(ErrorCode[_0x37ac5b(0xa5)],'Journey\x20not\x20found:\x20'+_0x2b895b,_0x5c19da);throw _0x5c19da;}}async['resolveJourneyId'](_0x41d51f,_0x1c4e95){const _0x27df93=a94_0x302933,_0x511f3f=await this[_0x27df93(0xa1)](_0x41d51f),_0x22d852=_0x511f3f[_0x27df93(0xaf)](_0x53076d=>_0x53076d['journeyBundleName']['toLowerCase']()===_0x1c4e95[_0x27df93(0xce)]());if(!_0x22d852)throw new SDKError(ErrorCode[_0x27df93(0xa5)],_0x27df93(0xa0)+_0x1c4e95,undefined,{'helpText':_0x27df93(0xb0)});return _0x22d852['id'];}async[a94_0x302933(0xde)](_0x59edb3){const _0x42bdad=a94_0x302933;try{return await this[_0x42bdad(0xb2)][_0x42bdad(0xd4)](_0x59edb3);}catch(_0x4271e6){if(isHttp404Error(_0x4271e6))throw new SDKError(ErrorCode[_0x42bdad(0xa5)],_0x42bdad(0xa0)+_0x59edb3,_0x4271e6);throw _0x4271e6;}}async[a94_0x302933(0xd6)](_0x988953){const _0x4c8284=a94_0x302933;try{return await this[_0x4c8284(0xb2)]['pauseJourney'](_0x988953);}catch(_0x168e42){if(isHttp404Error(_0x168e42))throw new SDKError(ErrorCode[_0x4c8284(0xa5)],_0x4c8284(0xa0)+_0x988953,_0x168e42);throw _0x168e42;}}async[a94_0x302933(0xbb)](_0x31ddc1){const _0x583975=a94_0x302933;try{return await this[_0x583975(0xb2)]['resumeJourney'](_0x31ddc1);}catch(_0x3ecac0){if(isHttp404Error(_0x3ecac0))throw new SDKError(ErrorCode[_0x583975(0xa5)],_0x583975(0xa0)+_0x31ddc1,_0x3ecac0);throw _0x3ecac0;}}async[a94_0x302933(0xab)](_0xc2bf29){const _0x19cb3e=a94_0x302933;return await this['client'][_0x19cb3e(0xd3)](_0xc2bf29);}async[a94_0x302933(0xd5)](_0x458a35,_0x2e07ec){const _0x543733=a94_0x302933;try{return await this[_0x543733(0xb2)][_0x543733(0xc3)](_0x458a35,_0x2e07ec);}catch(_0x11f046){if(isHttp404Error(_0x11f046))throw new SDKError(ErrorCode[_0x543733(0xa5)],_0x543733(0xa0)+_0x458a35,_0x11f046);throw _0x11f046;}}async[a94_0x302933(0xaa)](_0x421186,_0x15e8a0){const _0x12cd55=a94_0x302933;try{return await this['client'][_0x12cd55(0xa6)](_0x421186,_0x15e8a0);}catch(_0x305c3a){if(isHttp404Error(_0x305c3a))throw new SDKError(ErrorCode[_0x12cd55(0xb3)],_0x12cd55(0xd2)+_0x15e8a0+'\x20in\x20journey\x20'+_0x421186,_0x305c3a);throw _0x305c3a;}}async[a94_0x302933(0xcf)](_0x75a98){const _0xd99fe=a94_0x302933;try{return await this['client'][_0xd99fe(0x9a)](_0x75a98);}catch(_0x4eaefd){if(isHttp404Error(_0x4eaefd))return[];throw _0x4eaefd;}}async[a94_0x302933(0xdd)](_0x5ce546,_0x229d2e){const _0xb6a0f7=a94_0x302933;return await this[_0xb6a0f7(0xb2)][_0xb6a0f7(0xa3)](_0x5ce546,_0x229d2e);}}
|
|
1
|
+
const a94_0x259005=a94_0x280d;(function(_0x157f12,_0x309f44){const _0x5ba760=a94_0x280d,_0x109e0e=_0x157f12();while(!![]){try{const _0x248c9d=parseInt(_0x5ba760(0x151))/0x1*(parseInt(_0x5ba760(0x15e))/0x2)+parseInt(_0x5ba760(0x182))/0x3+parseInt(_0x5ba760(0x15c))/0x4+-parseInt(_0x5ba760(0x17d))/0x5+parseInt(_0x5ba760(0x167))/0x6*(parseInt(_0x5ba760(0x145))/0x7)+parseInt(_0x5ba760(0x165))/0x8*(parseInt(_0x5ba760(0x164))/0x9)+-parseInt(_0x5ba760(0x175))/0xa;if(_0x248c9d===_0x309f44)break;else _0x109e0e['push'](_0x109e0e['shift']());}catch(_0x96eaef){_0x109e0e['push'](_0x109e0e['shift']());}}}(a94_0x3be1,0x35cd9));function a94_0x280d(_0x44e330,_0xc67063){_0x44e330=_0x44e330-0x144;const _0x3be175=a94_0x3be1();let _0x280d1d=_0x3be175[_0x44e330];return _0x280d1d;}import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x3c7682){const _0x221693=a94_0x280d;return _0x3c7682['journeyBundleId']??_0x3c7682[_0x221693(0x155)]?.[_0x221693(0x156)]??undefined;}function getVersionNumber(_0x3c784b){const _0x308f31=a94_0x280d;return _0x3c784b[_0x308f31(0x169)]??_0x3c784b[_0x308f31(0x155)]?.['versionNumber']??0x0;}export function deduplicateJourneysByBundle(_0x31744d){const _0x1b9da6=a94_0x280d,_0x38760b=new Map();let _0x4eb47a=0x0;for(const _0x26358e of _0x31744d){const _0x2403ec=getBundleId(_0x26358e);if(!_0x2403ec){const _0xe13d4e=_0x1b9da6(0x180)+(_0x26358e['id']??_0x1b9da6(0x184)+_0x4eb47a++);_0x38760b[_0x1b9da6(0x14d)](_0xe13d4e,_0x26358e);continue;}const _0x2276b9=_0x38760b['get'](_0x2403ec);if(!_0x2276b9)_0x38760b['set'](_0x2403ec,_0x26358e);else{const _0x3ee845=getVersionNumber(_0x2276b9),_0x1097e6=getVersionNumber(_0x26358e);_0x1097e6>_0x3ee845&&_0x38760b['set'](_0x2403ec,_0x26358e);}}return Array[_0x1b9da6(0x14c)](_0x38760b[_0x1b9da6(0x185)]());}const VALID_JOURNEY_STATES=new Set(['draft',a94_0x259005(0x159),a94_0x259005(0x18c)]);export function parseJourneyState(_0x475ba3){const _0x210b43=a94_0x259005;if(typeof _0x475ba3==='string'&&VALID_JOURNEY_STATES['has'](_0x475ba3))return _0x475ba3;return _0x210b43(0x170);}export function entityToJourneyListItem(_0x13c666,_0x38d2b4){const _0x233a2c=a94_0x259005,_0x50c63f=_0x13c666[_0x233a2c(0x155)];return{'id':_0x13c666['id'],'name':_0x50c63f[_0x233a2c(0x16b)]??'','journeyBundleName':_0x50c63f[_0x233a2c(0x17e)]??_0x50c63f['name']??'','journeyBundleId':_0x50c63f[_0x233a2c(0x156)]??'','versionNumber':_0x50c63f[_0x233a2c(0x169)],'description':_0x50c63f[_0x233a2c(0x14f)]??null,'state':parseJourneyState(_0x50c63f[_0x233a2c(0x171)]),'paused':_0x50c63f[_0x233a2c(0x183)]??![],'audienceId':_0x38d2b4,'folderId':_0x50c63f[_0x233a2c(0x148)]??_0x13c666[_0x233a2c(0x15a)]?.[_0x233a2c(0x146)]?.['data']?.['id']??null,'createdAt':_0x50c63f['createdAt']??'','updatedAt':_0x50c63f['updatedAt']??''};}export class JourneySDK{[a94_0x259005(0x188)];constructor(_0x471eb0){const _0x297689=a94_0x259005;this[_0x297689(0x188)]=new CDPApiClient(_0x471eb0);}[a94_0x259005(0x16f)](_0x4a7c3f,_0x737616){return _0x737616?_0x4a7c3f:deduplicateJourneysByBundle(_0x4a7c3f);}async[a94_0x259005(0x16a)](_0x474106,_0x32c2c4){const _0x19d688=a94_0x259005;try{const _0x1b2333=await this[_0x19d688(0x188)][_0x19d688(0x16a)](_0x474106);return{'journeys':this['applyVersionDeduplication'](_0x1b2333[_0x19d688(0x147)],_0x32c2c4),'activationStepsById':_0x1b2333[_0x19d688(0x17b)]};}catch(_0x52e893){if(isHttp404Error(_0x52e893))return{'journeys':[],'activationStepsById':new Map()};throw _0x52e893;}}async[a94_0x259005(0x18b)](_0x9ed6f8,_0x1516e4,_0x148eca){const _0x3f091f=a94_0x259005;let _0x17d41f=_0x1516e4;if(!_0x17d41f)try{const _0x47eea7=await this[_0x3f091f(0x188)][_0x3f091f(0x176)](_0x9ed6f8);_0x17d41f=_0x47eea7[_0x3f091f(0x150)]??undefined;}catch(_0x2ecb41){if(isHttp404Error(_0x2ecb41))return[];throw _0x2ecb41;}if(!_0x17d41f)return[];let _0x870473;if(_0x148eca?.[_0x3f091f(0x16e)]){const _0x3fa0b6=await this[_0x3f091f(0x188)][_0x3f091f(0x17c)](_0x9ed6f8),_0x11f10c=_0x3fa0b6[_0x3f091f(0x172)](_0x5ae04d=>this['client'][_0x3f091f(0x14a)](_0x5ae04d['id'])),_0x1f87bc=await Promise[_0x3f091f(0x187)](_0x11f10c);_0x870473=_0x1f87bc[_0x3f091f(0x15d)]();}else{const _0x103b0a=await this[_0x3f091f(0x188)][_0x3f091f(0x157)](_0x17d41f,0x20,![]),_0x3f60ac=_0x103b0a[_0x3f091f(0x166)],_0x2161d5=_0x3f60ac[_0x3f091f(0x15b)](_0x226202=>_0x226202['type']===_0x3f091f(0x16c));_0x870473=_0x2161d5[_0x3f091f(0x172)](_0x2556a9=>entityToJourneyListItem(_0x2556a9,_0x9ed6f8));}return this[_0x3f091f(0x16f)](_0x870473,_0x148eca?.[_0x3f091f(0x16e)]);}async[a94_0x259005(0x162)](_0x1be157,_0x1abbeb,_0x4b523d){const _0x1a794a=a94_0x259005;if(!_0x1abbeb)return{'journeys':[],'folders':[]};const _0x4ee1b8=await this[_0x1a794a(0x188)][_0x1a794a(0x157)](_0x1abbeb,0x20,![]),_0x32739c=_0x4ee1b8[_0x1a794a(0x166)],_0x37a0b8=_0x32739c[_0x1a794a(0x15b)](_0x139c4d=>_0x139c4d[_0x1a794a(0x15f)]===_0x1a794a(0x161)&&_0x139c4d['id']!==_0x1abbeb),_0x5f1762=_0x37a0b8[_0x1a794a(0x172)](_0x43744e=>({'id':_0x43744e['id'],'name':_0x43744e[_0x1a794a(0x155)][_0x1a794a(0x16b)]})),_0x47eda5=_0x32739c[_0x1a794a(0x15b)](_0x2d481b=>_0x2d481b[_0x1a794a(0x15f)]===_0x1a794a(0x16c)),_0x1102dd=_0x47eda5['map'](_0xe4de1=>entityToJourneyListItem(_0xe4de1,_0x1be157));return{'journeys':this['applyVersionDeduplication'](_0x1102dd,_0x4b523d?.['includeAllVersions']),'folders':_0x5f1762};}async['listJourneysWithDetailsFromParentSegment'](_0x530b56,_0x163d85){const _0x52c840=a94_0x259005;let _0x544d7b;try{_0x544d7b=await this[_0x52c840(0x188)]['listSegmentFolders'](_0x530b56);}catch(_0x25d505){if(isHttp404Error(_0x25d505))return{'journeys':[],'activationStepsById':new Map()};throw _0x25d505;}const _0x3287e6=_0x544d7b[_0x52c840(0x172)](async _0x1ff8df=>{const _0x4df6ef=_0x52c840;return await this[_0x4df6ef(0x16a)](_0x1ff8df['id'],_0x163d85?.[_0x4df6ef(0x16e)]);}),_0x467e33=await Promise[_0x52c840(0x187)](_0x3287e6),_0x4b9ce9=new Map(),_0x5483b1=[];for(const _0x5c36f6 of _0x467e33){_0x5483b1[_0x52c840(0x186)](..._0x5c36f6['journeys']);for(const [_0x5bb74e,_0xb8a200]of _0x5c36f6[_0x52c840(0x17b)]){_0x4b9ce9[_0x52c840(0x14d)](_0x5bb74e,_0xb8a200);}}const _0x19d37f=new Set(),_0x364952=_0x5483b1['filter'](_0x816807=>{const _0x153dac=_0x52c840;if(_0x19d37f[_0x153dac(0x168)](_0x816807['id']))return![];return _0x19d37f['add'](_0x816807['id']),!![];});return{'journeys':this[_0x52c840(0x16f)](_0x364952,_0x163d85?.[_0x52c840(0x16e)]),'activationStepsById':_0x4b9ce9};}async[a94_0x259005(0x18d)](_0x4a3de3){const _0x1def0c=a94_0x259005;try{return await this[_0x1def0c(0x188)][_0x1def0c(0x18d)](_0x4a3de3);}catch(_0x180b7e){if(isHttp404Error(_0x180b7e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x1def0c(0x18a)+_0x4a3de3,_0x180b7e);throw _0x180b7e;}}async[a94_0x259005(0x152)](_0x23bdf4,_0x544fd5){const _0x165605=a94_0x259005,_0x4f90a4=await this[_0x165605(0x18b)](_0x23bdf4),_0x4d8296=_0x4f90a4[_0x165605(0x160)](_0x589a5e=>_0x589a5e['journeyBundleName'][_0x165605(0x163)]()===_0x544fd5[_0x165605(0x163)]());if(!_0x4d8296)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x165605(0x18a)+_0x544fd5,undefined,{'helpText':'Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'});return _0x4d8296['id'];}async[a94_0x259005(0x181)](_0x502199){const _0x139934=a94_0x259005;try{return await this[_0x139934(0x188)][_0x139934(0x14b)](_0x502199);}catch(_0xa82ea4){if(isHttp404Error(_0xa82ea4))throw new SDKError(ErrorCode[_0x139934(0x14e)],_0x139934(0x18a)+_0x502199,_0xa82ea4);throw _0xa82ea4;}}async[a94_0x259005(0x173)](_0x22b51a){const _0xa9c112=a94_0x259005;try{return await this['client'][_0xa9c112(0x178)](_0x22b51a);}catch(_0x4f9f2f){if(isHttp404Error(_0x4f9f2f))throw new SDKError(ErrorCode[_0xa9c112(0x14e)],_0xa9c112(0x18a)+_0x22b51a,_0x4f9f2f);throw _0x4f9f2f;}}async[a94_0x259005(0x17a)](_0x3e8f99){const _0x5c09fd=a94_0x259005;try{return await this[_0x5c09fd(0x188)][_0x5c09fd(0x154)](_0x3e8f99);}catch(_0x852996){if(isHttp404Error(_0x852996))throw new SDKError(ErrorCode[_0x5c09fd(0x14e)],'Journey\x20not\x20found:\x20'+_0x3e8f99,_0x852996);throw _0x852996;}}async[a94_0x259005(0x144)](_0x57b38a){return await this['client']['createJourney'](_0x57b38a);}async[a94_0x259005(0x174)](_0x4ecc28,_0x3f0349){const _0x949bd4=a94_0x259005;try{return await this['client'][_0x949bd4(0x189)](_0x4ecc28,_0x3f0349);}catch(_0x18b5d6){if(isHttp404Error(_0x18b5d6))throw new SDKError(ErrorCode[_0x949bd4(0x14e)],_0x949bd4(0x18a)+_0x4ecc28,_0x18b5d6);throw _0x18b5d6;}}async[a94_0x259005(0x17f)](_0x6dde12,_0x40a915){const _0x1364e0=a94_0x259005;try{return await this[_0x1364e0(0x188)][_0x1364e0(0x153)](_0x6dde12,_0x40a915);}catch(_0x4f7cb1){if(isHttp404Error(_0x4f7cb1))throw new SDKError(ErrorCode[_0x1364e0(0x158)],_0x1364e0(0x16d)+_0x40a915+'\x20in\x20journey\x20'+_0x6dde12,_0x4f7cb1);throw _0x4f7cb1;}}async[a94_0x259005(0x149)](_0x533c9d){const _0xaf8db5=a94_0x259005;try{return await this[_0xaf8db5(0x188)][_0xaf8db5(0x179)](_0x533c9d);}catch(_0x5126e5){if(isHttp404Error(_0x5126e5))return[];throw _0x5126e5;}}async['createActivation'](_0x1c65eb,_0x51872f){const _0xb49c6d=a94_0x259005;return await this[_0xb49c6d(0x188)][_0xb49c6d(0x177)](_0x1c65eb,_0x51872f);}}function a94_0x3be1(){const _0x1acf07=['versionNumber','listJourneysWithDetails','name','journey','Journey\x20activation\x20step\x20not\x20found:\x20','includeAllVersions','applyVersionDeduplication','draft','state','map','pause','update','10126790OIMfqP','getParentSegmentFull','createJourneyActivation','pauseJourney','listJourneyActivations','resume','activationStepsById','listSegmentFolders','47635itwYrL','journeyBundleName','getActivation','no-bundle-','getStatistics','661641vDwycg','paused','idx-','values','push','all','client','updateJourney','Journey\x20not\x20found:\x20','listJourneysFromParentSegment','launched','getJourney','create','7WcfInA','parentFolder','journeys','segmentFolderId','listActivations','listJourneys','getJourneyStatistics','from','set','JOURNEY_NOT_FOUND','description','rootFolderId','1bxMMWk','resolveJourneyId','getJourneyActivation','resumeJourney','attributes','journeyBundleId','listEntitiesByFolder','NOT_FOUND','simulation','relationships','filter','1143348JpXFsa','flat','298036PVhWvy','type','find','folder-segment','listJourneysWithFolders','toLowerCase','2387601gcvTXd','8BAQDVS','data','1931352gFMIPH','has'];a94_0x3be1=function(){return _0x1acf07;};return a94_0x3be1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a95_0x5c035e=a95_0x121a;(function(_0x55ec0a,_0x10b4c6){const _0x9c79b6=a95_0x121a,_0x508e31=_0x55ec0a();while(!![]){try{const _0x828b86=-parseInt(_0x9c79b6(0x135))/0x1*(-parseInt(_0x9c79b6(0x130))/0x2)+parseInt(_0x9c79b6(0x12b))/0x3*(-parseInt(_0x9c79b6(0x136))/0x4)+-parseInt(_0x9c79b6(0x138))/0x5+-parseInt(_0x9c79b6(0x133))/0x6*(parseInt(_0x9c79b6(0x12e))/0x7)+-parseInt(_0x9c79b6(0x12c))/0x8*(-parseInt(_0x9c79b6(0x129))/0x9)+parseInt(_0x9c79b6(0x137))/0xa+-parseInt(_0x9c79b6(0x134))/0xb*(-parseInt(_0x9c79b6(0x131))/0xc);if(_0x828b86===_0x10b4c6)break;else _0x508e31['push'](_0x508e31['shift']());}catch(_0xc23578){_0x508e31['push'](_0x508e31['shift']());}}}(a95_0x340c,0x7aebe));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a95_0x5c035e(0x12f),a95_0x5c035e(0x12a));function a95_0x340c(){const _0x165222=['888pEWIun','write','7GKlNtm','last_chat_id','1466vMgfmB','20261100IVRaXe','clear','5620686einDrR','11qbJboJ','757MoASfj','1967012opQjCo','6856910ZTbBho','4335975yEPkxB','29349EWBUFW','llm/chat','6acfLAa'];a95_0x340c=function(){return _0x165222;};return a95_0x340c();}function a95_0x121a(_0x10a95e,_0x17c137){_0x10a95e=_0x10a95e-0x129;const _0x340cdb=a95_0x340c();let _0x121ac3=_0x340cdb[_0x10a95e];return _0x121ac3;}export function saveLastChatId(_0x271338){const _0x2bef8e=a95_0x5c035e;chatIdCache[_0x2bef8e(0x12d)](_0x271338);}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x52310b=a95_0x5c035e;chatIdCache[_0x52310b(0x132)]();}
|