@treasuredata/tdx 0.26.1 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.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_0x359b87=a94_0x55c7;function a94_0x4bc6(){const _0x4118b3=['folder-segment','parentFolder','includeAllVersions','relationships','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listEntitiesByFolder','has','journeyBundleName','listActivations','name','values','pauseJourney','14qjWOtw','3145095VKUfMD','727600bwEpXf','from','journeys','Journey\x20not\x20found:\x20','journey','flat','set','createdAt','2drzYXP','JOURNEY_NOT_FOUND','updateJourney','client','getJourney','listJourneyActivations','4mRrPOs','29137320lHDdrC','idx-','2269608PBUEGE','8354052zQSRby','create','toLowerCase','attributes','launched','applyVersionDeduplication','listSegmentFolders','filter','253BtCzbl','get','draft','createActivation','state','string','paused','getStatistics','journeyBundleId','pause','description','280930DyFmMt','type','update','resume','add','getJourneyStatistics','versionNumber','all','rootFolderId','simulation','no-bundle-','resumeJourney','5uCvxqL','getJourneyActivation','12432PrdDKy','listJourneysWithDetails','segmentFolderId','map','NOT_FOUND','find','activationStepsById','data','listJourneysWithDetailsFromParentSegment'];a94_0x4bc6=function(){return _0x4118b3;};return a94_0x4bc6();}(function(_0x230bfe,_0x4b01ab){const _0x2090ba=a94_0x55c7,_0x472c01=_0x230bfe();while(!![]){try{const _0x1142e3=-parseInt(_0x2090ba(0x1d3))/0x1*(parseInt(_0x2090ba(0x1cb))/0x2)+-parseInt(_0x2090ba(0x1ca))/0x3*(-parseInt(_0x2090ba(0x1d9))/0x4)+parseInt(_0x2090ba(0x1fc))/0x5*(-parseInt(_0x2090ba(0x1fe))/0x6)+-parseInt(_0x2090ba(0x1c9))/0x7*(parseInt(_0x2090ba(0x1dc))/0x8)+-parseInt(_0x2090ba(0x1dd))/0x9+parseInt(_0x2090ba(0x1f0))/0xa*(-parseInt(_0x2090ba(0x1e5))/0xb)+parseInt(_0x2090ba(0x1da))/0xc;if(_0x1142e3===_0x4b01ab)break;else _0x472c01['push'](_0x472c01['shift']());}catch(_0x4738c1){_0x472c01['push'](_0x472c01['shift']());}}}(a94_0x4bc6,0x93b6a));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x21f31f){const _0x2a66a9=a94_0x55c7;return _0x21f31f[_0x2a66a9(0x1ed)]??_0x21f31f['attributes']?.[_0x2a66a9(0x1ed)]??undefined;}function getVersionNumber(_0x231253){const _0x47af78=a94_0x55c7;return _0x231253[_0x47af78(0x1f6)]??_0x231253[_0x47af78(0x1e0)]?.[_0x47af78(0x1f6)]??0x0;}export function deduplicateJourneysByBundle(_0x313aa3){const _0xc05fae=a94_0x55c7,_0x4fe2a3=new Map();let _0xff89e5=0x0;for(const _0x5929e8 of _0x313aa3){const _0x5811f4=getBundleId(_0x5929e8);if(!_0x5811f4){const _0x131e87=_0xc05fae(0x1fa)+(_0x5929e8['id']??_0xc05fae(0x1db)+_0xff89e5++);_0x4fe2a3[_0xc05fae(0x1d1)](_0x131e87,_0x5929e8);continue;}const _0x252ed2=_0x4fe2a3[_0xc05fae(0x1e6)](_0x5811f4);if(!_0x252ed2)_0x4fe2a3[_0xc05fae(0x1d1)](_0x5811f4,_0x5929e8);else{const _0xa0c195=getVersionNumber(_0x252ed2),_0x2b181b=getVersionNumber(_0x5929e8);_0x2b181b>_0xa0c195&&_0x4fe2a3[_0xc05fae(0x1d1)](_0x5811f4,_0x5929e8);}}return Array[_0xc05fae(0x1cc)](_0x4fe2a3[_0xc05fae(0x1c7)]());}const VALID_JOURNEY_STATES=new Set([a94_0x359b87(0x1e7),a94_0x359b87(0x1f9),a94_0x359b87(0x1e1)]);function a94_0x55c7(_0x281ff4,_0x50bc28){_0x281ff4=_0x281ff4-0x1b5;const _0x4bc62c=a94_0x4bc6();let _0x55c799=_0x4bc62c[_0x281ff4];return _0x55c799;}export function parseJourneyState(_0x386c6a){const _0x4547f3=a94_0x359b87;if(typeof _0x386c6a===_0x4547f3(0x1ea)&&VALID_JOURNEY_STATES[_0x4547f3(0x1c3)](_0x386c6a))return _0x386c6a;return _0x4547f3(0x1e7);}export function entityToJourneyListItem(_0x4a9f6f,_0xfe7f45){const _0x155166=a94_0x359b87,_0x429f8b=_0x4a9f6f[_0x155166(0x1e0)];return{'id':_0x4a9f6f['id'],'name':_0x429f8b[_0x155166(0x1c6)]??'','journeyBundleName':_0x429f8b[_0x155166(0x1c4)]??_0x429f8b[_0x155166(0x1c6)]??'','journeyBundleId':_0x429f8b['journeyBundleId']??'','versionNumber':_0x429f8b[_0x155166(0x1f6)],'description':_0x429f8b[_0x155166(0x1ef)]??null,'state':parseJourneyState(_0x429f8b[_0x155166(0x1e9)]),'paused':_0x429f8b[_0x155166(0x1eb)]??![],'audienceId':_0xfe7f45,'folderId':_0x429f8b[_0x155166(0x1b6)]??_0x4a9f6f[_0x155166(0x1c0)]?.[_0x155166(0x1be)]?.[_0x155166(0x1bb)]?.['id']??null,'createdAt':_0x429f8b[_0x155166(0x1d2)]??'','updatedAt':_0x429f8b['updatedAt']??''};}export class JourneySDK{[a94_0x359b87(0x1d6)];constructor(_0x1c2c19){const _0x3cd267=a94_0x359b87;this[_0x3cd267(0x1d6)]=new CDPApiClient(_0x1c2c19);}['applyVersionDeduplication'](_0x5d9e44,_0x51ad96){return _0x51ad96?_0x5d9e44:deduplicateJourneysByBundle(_0x5d9e44);}async['listJourneysWithDetails'](_0x1c707a,_0x47f623){const _0x50cd19=a94_0x359b87;try{const _0x2e87a7=await this['client'][_0x50cd19(0x1b5)](_0x1c707a);return{'journeys':this[_0x50cd19(0x1e2)](_0x2e87a7[_0x50cd19(0x1cd)],_0x47f623),'activationStepsById':_0x2e87a7['activationStepsById']};}catch(_0xd4624b){if(isHttp404Error(_0xd4624b))return{'journeys':[],'activationStepsById':new Map()};throw _0xd4624b;}}async['listJourneysFromParentSegment'](_0x15b0a7,_0x2ab82d,_0x5cbe89){const _0x2a4ded=a94_0x359b87;let _0xeb8565=_0x2ab82d;if(!_0xeb8565)try{const _0xc72dfe=await this['client']['getParentSegmentFull'](_0x15b0a7);_0xeb8565=_0xc72dfe[_0x2a4ded(0x1f8)]??undefined;}catch(_0x13c333){if(isHttp404Error(_0x13c333))return[];throw _0x13c333;}if(!_0xeb8565)return[];let _0x14570f;if(_0x5cbe89?.[_0x2a4ded(0x1bf)]){const _0x60f814=await this[_0x2a4ded(0x1d6)]['listSegmentFolders'](_0x15b0a7),_0x4c60e6=_0x60f814[_0x2a4ded(0x1b7)](_0x1634ee=>this['client']['listJourneys'](_0x1634ee['id'])),_0x1217ca=await Promise[_0x2a4ded(0x1f7)](_0x4c60e6);_0x14570f=_0x1217ca[_0x2a4ded(0x1d0)]();}else{const _0x53005d=await this[_0x2a4ded(0x1d6)][_0x2a4ded(0x1c2)](_0xeb8565,0x20,![]),_0x6dcd4a=_0x53005d[_0x2a4ded(0x1bb)],_0x5c1043=_0x6dcd4a[_0x2a4ded(0x1e4)](_0x12f30d=>_0x12f30d[_0x2a4ded(0x1f1)]==='journey');_0x14570f=_0x5c1043[_0x2a4ded(0x1b7)](_0x3d75df=>entityToJourneyListItem(_0x3d75df,_0x15b0a7));}return this['applyVersionDeduplication'](_0x14570f,_0x5cbe89?.[_0x2a4ded(0x1bf)]);}async['listJourneysWithFolders'](_0x323530,_0x209010,_0x2c43e1){const _0x4835cc=a94_0x359b87;if(!_0x209010)return{'journeys':[],'folders':[]};const _0x36c948=await this[_0x4835cc(0x1d6)][_0x4835cc(0x1c2)](_0x209010,0x20,![]),_0x2a47ff=_0x36c948[_0x4835cc(0x1bb)],_0x397db4=_0x2a47ff[_0x4835cc(0x1e4)](_0x15550e=>_0x15550e[_0x4835cc(0x1f1)]===_0x4835cc(0x1bd)&&_0x15550e['id']!==_0x209010),_0x2352a5=_0x397db4[_0x4835cc(0x1b7)](_0x116daa=>({'id':_0x116daa['id'],'name':_0x116daa[_0x4835cc(0x1e0)][_0x4835cc(0x1c6)]})),_0x32ff6e=_0x2a47ff[_0x4835cc(0x1e4)](_0x4bd6e2=>_0x4bd6e2[_0x4835cc(0x1f1)]===_0x4835cc(0x1cf)),_0x484dd2=_0x32ff6e[_0x4835cc(0x1b7)](_0x48d6f9=>entityToJourneyListItem(_0x48d6f9,_0x323530));return{'journeys':this[_0x4835cc(0x1e2)](_0x484dd2,_0x2c43e1?.[_0x4835cc(0x1bf)]),'folders':_0x2352a5};}async[a94_0x359b87(0x1bc)](_0xc88e30,_0x3422e2){const _0x5a270a=a94_0x359b87;let _0x1f61fb;try{_0x1f61fb=await this[_0x5a270a(0x1d6)][_0x5a270a(0x1e3)](_0xc88e30);}catch(_0x4247b3){if(isHttp404Error(_0x4247b3))return{'journeys':[],'activationStepsById':new Map()};throw _0x4247b3;}const _0x484def=_0x1f61fb[_0x5a270a(0x1b7)](async _0x1c427b=>{const _0x1747ea=_0x5a270a;return await this[_0x1747ea(0x1b5)](_0x1c427b['id'],_0x3422e2?.[_0x1747ea(0x1bf)]);}),_0x196b9f=await Promise['all'](_0x484def),_0x5d46ac=new Map(),_0x3516a3=[];for(const _0x406db3 of _0x196b9f){_0x3516a3['push'](..._0x406db3[_0x5a270a(0x1cd)]);for(const [_0x2220c3,_0x47c9b7]of _0x406db3[_0x5a270a(0x1ba)]){_0x5d46ac[_0x5a270a(0x1d1)](_0x2220c3,_0x47c9b7);}}const _0x41ce53=new Set(),_0x3daef2=_0x3516a3[_0x5a270a(0x1e4)](_0x5a7900=>{const _0x16af33=_0x5a270a;if(_0x41ce53['has'](_0x5a7900['id']))return![];return _0x41ce53[_0x16af33(0x1f4)](_0x5a7900['id']),!![];});return{'journeys':this[_0x5a270a(0x1e2)](_0x3daef2,_0x3422e2?.['includeAllVersions']),'activationStepsById':_0x5d46ac};}async[a94_0x359b87(0x1d7)](_0x59de3f){const _0x3d2cf4=a94_0x359b87;try{return await this[_0x3d2cf4(0x1d6)]['getJourney'](_0x59de3f);}catch(_0x186a75){if(isHttp404Error(_0x186a75))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x59de3f,_0x186a75);throw _0x186a75;}}async['resolveJourneyId'](_0x50c771,_0x1e6e2e){const _0xb07f6f=a94_0x359b87,_0x459b7b=await this['listJourneysFromParentSegment'](_0x50c771),_0x1606f1=_0x459b7b[_0xb07f6f(0x1b9)](_0x16553f=>_0x16553f[_0xb07f6f(0x1c4)][_0xb07f6f(0x1df)]()===_0x1e6e2e['toLowerCase']());if(!_0x1606f1)throw new SDKError(ErrorCode[_0xb07f6f(0x1d4)],'Journey\x20not\x20found:\x20'+_0x1e6e2e,undefined,{'helpText':_0xb07f6f(0x1c1)});return _0x1606f1['id'];}async[a94_0x359b87(0x1ec)](_0x2338bc){const _0x5244a1=a94_0x359b87;try{return await this[_0x5244a1(0x1d6)][_0x5244a1(0x1f5)](_0x2338bc);}catch(_0x355780){if(isHttp404Error(_0x355780))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x5244a1(0x1ce)+_0x2338bc,_0x355780);throw _0x355780;}}async[a94_0x359b87(0x1ee)](_0x23bb0e){const _0x45d411=a94_0x359b87;try{return await this['client'][_0x45d411(0x1c8)](_0x23bb0e);}catch(_0x6481ca){if(isHttp404Error(_0x6481ca))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x23bb0e,_0x6481ca);throw _0x6481ca;}}async[a94_0x359b87(0x1f3)](_0xfccbdf){const _0x45139b=a94_0x359b87;try{return await this[_0x45139b(0x1d6)][_0x45139b(0x1fb)](_0xfccbdf);}catch(_0x5ce986){if(isHttp404Error(_0x5ce986))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x45139b(0x1ce)+_0xfccbdf,_0x5ce986);throw _0x5ce986;}}async[a94_0x359b87(0x1de)](_0x51bb0d){const _0x31d3e2=a94_0x359b87;return await this[_0x31d3e2(0x1d6)]['createJourney'](_0x51bb0d);}async[a94_0x359b87(0x1f2)](_0x520c4b,_0x4628bd){const _0x208fa1=a94_0x359b87;try{return await this[_0x208fa1(0x1d6)][_0x208fa1(0x1d5)](_0x520c4b,_0x4628bd);}catch(_0x59d86f){if(isHttp404Error(_0x59d86f))throw new SDKError(ErrorCode[_0x208fa1(0x1d4)],_0x208fa1(0x1ce)+_0x520c4b,_0x59d86f);throw _0x59d86f;}}async['getActivation'](_0x39cc74,_0x571f81){const _0x4512cd=a94_0x359b87;try{return await this[_0x4512cd(0x1d6)][_0x4512cd(0x1fd)](_0x39cc74,_0x571f81);}catch(_0x393816){if(isHttp404Error(_0x393816))throw new SDKError(ErrorCode[_0x4512cd(0x1b8)],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x571f81+'\x20in\x20journey\x20'+_0x39cc74,_0x393816);throw _0x393816;}}async[a94_0x359b87(0x1c5)](_0x2ab448){const _0x2dd94d=a94_0x359b87;try{return await this[_0x2dd94d(0x1d6)][_0x2dd94d(0x1d8)](_0x2ab448);}catch(_0x307936){if(isHttp404Error(_0x307936))return[];throw _0x307936;}}async[a94_0x359b87(0x1e8)](_0x1cc837,_0x4f79c8){return await this['client']['createJourneyActivation'](_0x1cc837,_0x4f79c8);}}
|
|
1
|
+
const a94_0x1f435b=a94_0x247e;(function(_0x22b858,_0x32db14){const _0x3ce207=a94_0x247e,_0x5cd3a3=_0x22b858();while(!![]){try{const _0x26ffdd=-parseInt(_0x3ce207(0x114))/0x1*(-parseInt(_0x3ce207(0x105))/0x2)+-parseInt(_0x3ce207(0x113))/0x3*(parseInt(_0x3ce207(0xe8))/0x4)+parseInt(_0x3ce207(0xdf))/0x5+parseInt(_0x3ce207(0xf8))/0x6+parseInt(_0x3ce207(0x118))/0x7+-parseInt(_0x3ce207(0xe3))/0x8*(-parseInt(_0x3ce207(0x111))/0x9)+parseInt(_0x3ce207(0xf4))/0xa*(-parseInt(_0x3ce207(0xde))/0xb);if(_0x26ffdd===_0x32db14)break;else _0x5cd3a3['push'](_0x5cd3a3['shift']());}catch(_0x97c261){_0x5cd3a3['push'](_0x5cd3a3['shift']());}}}(a94_0x30e0,0x8b224));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x889233){const _0x35a4d5=a94_0x247e;return _0x889233[_0x35a4d5(0xea)]??_0x889233['attributes']?.[_0x35a4d5(0xea)]??undefined;}function getVersionNumber(_0x31c336){const _0x2474a6=a94_0x247e;return _0x31c336['versionNumber']??_0x31c336['attributes']?.[_0x2474a6(0xf9)]??0x0;}export function deduplicateJourneysByBundle(_0x3061e3){const _0x5e9f05=a94_0x247e,_0x787482=new Map();let _0x2b51c1=0x0;for(const _0x2a7909 of _0x3061e3){const _0x1902a1=getBundleId(_0x2a7909);if(!_0x1902a1){const _0x43bb77='no-bundle-'+(_0x2a7909['id']??'idx-'+_0x2b51c1++);_0x787482['set'](_0x43bb77,_0x2a7909);continue;}const _0x904c79=_0x787482[_0x5e9f05(0xf7)](_0x1902a1);if(!_0x904c79)_0x787482[_0x5e9f05(0xdb)](_0x1902a1,_0x2a7909);else{const _0x273696=getVersionNumber(_0x904c79),_0xe1c8eb=getVersionNumber(_0x2a7909);_0xe1c8eb>_0x273696&&_0x787482[_0x5e9f05(0xdb)](_0x1902a1,_0x2a7909);}}return Array[_0x5e9f05(0xe5)](_0x787482[_0x5e9f05(0x115)]());}const VALID_JOURNEY_STATES=new Set(['draft',a94_0x1f435b(0xf2),a94_0x1f435b(0xe6)]);function a94_0x30e0(){const _0x5ae6ca=['2752930jkQyde','includeAllVersions','getStatistics','find','104hTZKjr','listJourneyActivations','from','launched','add','4084548AQEGmg','activationStepsById','journeyBundleId','applyVersionDeduplication','NOT_FOUND','listJourneysWithFolders','listActivations','listJourneys','pauseJourney','listJourneysWithDetails','simulation','resolveJourneyId','515650ndoXfZ','all','filter','get','1677522bJsjXQ','versionNumber','journey','getActivation','journeys','Journey\x20activation\x20step\x20not\x20found:\x20','description','data','createActivation','listEntitiesByFolder','segmentFolderId','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','state','2azxzEn','createJourney','push','Journey\x20not\x20found:\x20','journeyBundleName','update','type','paused','toLowerCase','parentFolder','attributes','client','484047wrkKnO','map','3HPdrPx','505738sYxwon','values','has','flat','6637358zSGprD','getJourney','getJourneyStatistics','updateJourney','name','relationships','\x20in\x20journey\x20','JOURNEY_NOT_FOUND','resumeJourney','createJourneyActivation','listJourneysWithDetailsFromParentSegment','set','updatedAt','listJourneysFromParentSegment','297JaJXlt'];a94_0x30e0=function(){return _0x5ae6ca;};return a94_0x30e0();}export function parseJourneyState(_0x29ffec){if(typeof _0x29ffec==='string'&&VALID_JOURNEY_STATES['has'](_0x29ffec))return _0x29ffec;return'draft';}export function entityToJourneyListItem(_0x43e8a9,_0x237219){const _0x2e3a60=a94_0x1f435b,_0x54a479=_0x43e8a9[_0x2e3a60(0x10f)];return{'id':_0x43e8a9['id'],'name':_0x54a479[_0x2e3a60(0xd4)]??'','journeyBundleName':_0x54a479[_0x2e3a60(0x109)]??_0x54a479[_0x2e3a60(0xd4)]??'','journeyBundleId':_0x54a479[_0x2e3a60(0xea)]??'','versionNumber':_0x54a479['versionNumber'],'description':_0x54a479[_0x2e3a60(0xfe)]??null,'state':parseJourneyState(_0x54a479[_0x2e3a60(0x104)]),'paused':_0x54a479[_0x2e3a60(0x10c)]??![],'audienceId':_0x237219,'folderId':_0x54a479[_0x2e3a60(0x102)]??_0x43e8a9[_0x2e3a60(0xd5)]?.[_0x2e3a60(0x10e)]?.[_0x2e3a60(0xff)]?.['id']??null,'createdAt':_0x54a479['createdAt']??'','updatedAt':_0x54a479[_0x2e3a60(0xdc)]??''};}function a94_0x247e(_0x648002,_0x1a80fa){_0x648002=_0x648002-0xd4;const _0x30e03c=a94_0x30e0();let _0x247e33=_0x30e03c[_0x648002];return _0x247e33;}export class JourneySDK{[a94_0x1f435b(0x110)];constructor(_0x5116b9){const _0x3fdac1=a94_0x1f435b;this[_0x3fdac1(0x110)]=new CDPApiClient(_0x5116b9);}[a94_0x1f435b(0xeb)](_0x559375,_0x2eb49c){return _0x2eb49c?_0x559375:deduplicateJourneysByBundle(_0x559375);}async['listJourneysWithDetails'](_0x2f77d6,_0x2cd370){const _0x163879=a94_0x1f435b;try{const _0x3831ed=await this['client'][_0x163879(0xf1)](_0x2f77d6);return{'journeys':this['applyVersionDeduplication'](_0x3831ed['journeys'],_0x2cd370),'activationStepsById':_0x3831ed['activationStepsById']};}catch(_0x555d5c){if(isHttp404Error(_0x555d5c))return{'journeys':[],'activationStepsById':new Map()};throw _0x555d5c;}}async[a94_0x1f435b(0xdd)](_0x2a19de,_0x58ff25,_0x27c1f0){const _0x4da6ab=a94_0x1f435b;let _0x5e8e32=_0x58ff25;if(!_0x5e8e32)try{const _0x3a0263=await this['client']['getParentSegmentFull'](_0x2a19de);_0x5e8e32=_0x3a0263['rootFolderId']??undefined;}catch(_0xb071c){if(isHttp404Error(_0xb071c))return[];throw _0xb071c;}if(!_0x5e8e32)return[];let _0x17a321;if(_0x27c1f0?.['includeAllVersions']){const _0x4a8f59=await this[_0x4da6ab(0x110)]['listSegmentFolders'](_0x2a19de),_0x3a18f4=_0x4a8f59[_0x4da6ab(0x112)](_0x43aaff=>this[_0x4da6ab(0x110)][_0x4da6ab(0xef)](_0x43aaff['id'])),_0x40f017=await Promise['all'](_0x3a18f4);_0x17a321=_0x40f017[_0x4da6ab(0x117)]();}else{const _0x32c163=await this[_0x4da6ab(0x110)][_0x4da6ab(0x101)](_0x5e8e32,0x20,![]),_0x30803b=_0x32c163['data'],_0x5cc101=_0x30803b[_0x4da6ab(0xf6)](_0x59531f=>_0x59531f[_0x4da6ab(0x10b)]==='journey');_0x17a321=_0x5cc101[_0x4da6ab(0x112)](_0x5b4d3a=>entityToJourneyListItem(_0x5b4d3a,_0x2a19de));}return this[_0x4da6ab(0xeb)](_0x17a321,_0x27c1f0?.['includeAllVersions']);}async[a94_0x1f435b(0xed)](_0x262bc4,_0x373232,_0x28ff5a){const _0x141fa7=a94_0x1f435b;if(!_0x373232)return{'journeys':[],'folders':[]};const _0xc94400=await this[_0x141fa7(0x110)][_0x141fa7(0x101)](_0x373232,0x20,![]),_0x32330e=_0xc94400[_0x141fa7(0xff)],_0x2dc630=_0x32330e[_0x141fa7(0xf6)](_0x1b3574=>_0x1b3574[_0x141fa7(0x10b)]==='folder-segment'&&_0x1b3574['id']!==_0x373232),_0x266a65=_0x2dc630['map'](_0x26508e=>({'id':_0x26508e['id'],'name':_0x26508e[_0x141fa7(0x10f)][_0x141fa7(0xd4)]})),_0x4c405d=_0x32330e[_0x141fa7(0xf6)](_0x289de1=>_0x289de1[_0x141fa7(0x10b)]===_0x141fa7(0xfa)),_0x529eaa=_0x4c405d[_0x141fa7(0x112)](_0x3966ad=>entityToJourneyListItem(_0x3966ad,_0x262bc4));return{'journeys':this[_0x141fa7(0xeb)](_0x529eaa,_0x28ff5a?.[_0x141fa7(0xe0)]),'folders':_0x266a65};}async[a94_0x1f435b(0xda)](_0x5cb3ee,_0x2f8b5b){const _0xe8bbbb=a94_0x1f435b;let _0x37c21c;try{_0x37c21c=await this[_0xe8bbbb(0x110)]['listSegmentFolders'](_0x5cb3ee);}catch(_0x3c1875){if(isHttp404Error(_0x3c1875))return{'journeys':[],'activationStepsById':new Map()};throw _0x3c1875;}const _0x573e9a=_0x37c21c[_0xe8bbbb(0x112)](async _0x5ae7e0=>{const _0x1eca1d=_0xe8bbbb;return await this['listJourneysWithDetails'](_0x5ae7e0['id'],_0x2f8b5b?.[_0x1eca1d(0xe0)]);}),_0x4e51ed=await Promise[_0xe8bbbb(0xf5)](_0x573e9a),_0x9c8810=new Map(),_0x15cc68=[];for(const _0x5468f4 of _0x4e51ed){_0x15cc68[_0xe8bbbb(0x107)](..._0x5468f4[_0xe8bbbb(0xfc)]);for(const [_0x2957cb,_0x4bc7e8]of _0x5468f4[_0xe8bbbb(0xe9)]){_0x9c8810[_0xe8bbbb(0xdb)](_0x2957cb,_0x4bc7e8);}}const _0x30b42b=new Set(),_0x2dd497=_0x15cc68[_0xe8bbbb(0xf6)](_0x5e5ff6=>{const _0x194e9a=_0xe8bbbb;if(_0x30b42b[_0x194e9a(0x116)](_0x5e5ff6['id']))return![];return _0x30b42b[_0x194e9a(0xe7)](_0x5e5ff6['id']),!![];});return{'journeys':this[_0xe8bbbb(0xeb)](_0x2dd497,_0x2f8b5b?.[_0xe8bbbb(0xe0)]),'activationStepsById':_0x9c8810};}async[a94_0x1f435b(0x119)](_0x7bf27f){const _0x1a57c8=a94_0x1f435b;try{return await this['client'][_0x1a57c8(0x119)](_0x7bf27f);}catch(_0x3958f2){if(isHttp404Error(_0x3958f2))throw new SDKError(ErrorCode[_0x1a57c8(0xd7)],'Journey\x20not\x20found:\x20'+_0x7bf27f,_0x3958f2);throw _0x3958f2;}}async[a94_0x1f435b(0xf3)](_0x132eda,_0x4e9ca6){const _0x3cbf89=a94_0x1f435b,_0x19e257=await this['listJourneysFromParentSegment'](_0x132eda),_0x186d4d=_0x19e257[_0x3cbf89(0xe2)](_0x1c76ff=>_0x1c76ff[_0x3cbf89(0x109)]['toLowerCase']()===_0x4e9ca6[_0x3cbf89(0x10d)]());if(!_0x186d4d)throw new SDKError(ErrorCode[_0x3cbf89(0xd7)],_0x3cbf89(0x108)+_0x4e9ca6,undefined,{'helpText':_0x3cbf89(0x103)});return _0x186d4d['id'];}async[a94_0x1f435b(0xe1)](_0x42f4fd){const _0x4b3a26=a94_0x1f435b;try{return await this['client'][_0x4b3a26(0x11a)](_0x42f4fd);}catch(_0x49e4e2){if(isHttp404Error(_0x49e4e2))throw new SDKError(ErrorCode[_0x4b3a26(0xd7)],_0x4b3a26(0x108)+_0x42f4fd,_0x49e4e2);throw _0x49e4e2;}}async['pause'](_0x35b358){const _0x1e44f8=a94_0x1f435b;try{return await this[_0x1e44f8(0x110)][_0x1e44f8(0xf0)](_0x35b358);}catch(_0x3158cd){if(isHttp404Error(_0x3158cd))throw new SDKError(ErrorCode[_0x1e44f8(0xd7)],_0x1e44f8(0x108)+_0x35b358,_0x3158cd);throw _0x3158cd;}}async['resume'](_0x1fd6d4){const _0x486a50=a94_0x1f435b;try{return await this[_0x486a50(0x110)][_0x486a50(0xd8)](_0x1fd6d4);}catch(_0x10504e){if(isHttp404Error(_0x10504e))throw new SDKError(ErrorCode[_0x486a50(0xd7)],_0x486a50(0x108)+_0x1fd6d4,_0x10504e);throw _0x10504e;}}async['create'](_0x8eac51){const _0x9bf0bf=a94_0x1f435b;return await this[_0x9bf0bf(0x110)][_0x9bf0bf(0x106)](_0x8eac51);}async[a94_0x1f435b(0x10a)](_0xe097dd,_0x222f26){const _0x4972f5=a94_0x1f435b;try{return await this[_0x4972f5(0x110)][_0x4972f5(0x11b)](_0xe097dd,_0x222f26);}catch(_0x1fdb68){if(isHttp404Error(_0x1fdb68))throw new SDKError(ErrorCode[_0x4972f5(0xd7)],_0x4972f5(0x108)+_0xe097dd,_0x1fdb68);throw _0x1fdb68;}}async[a94_0x1f435b(0xfb)](_0x3f6f76,_0x23bdf9){const _0x4874f8=a94_0x1f435b;try{return await this[_0x4874f8(0x110)]['getJourneyActivation'](_0x3f6f76,_0x23bdf9);}catch(_0x388226){if(isHttp404Error(_0x388226))throw new SDKError(ErrorCode[_0x4874f8(0xec)],_0x4874f8(0xfd)+_0x23bdf9+_0x4874f8(0xd6)+_0x3f6f76,_0x388226);throw _0x388226;}}async[a94_0x1f435b(0xee)](_0x4841e6){const _0x355b92=a94_0x1f435b;try{return await this[_0x355b92(0x110)][_0x355b92(0xe4)](_0x4841e6);}catch(_0x2d19da){if(isHttp404Error(_0x2d19da))return[];throw _0x2d19da;}}async[a94_0x1f435b(0x100)](_0x7c61fe,_0x4e5fe0){const _0x25d192=a94_0x1f435b;return await this[_0x25d192(0x110)][_0x25d192(0xd9)](_0x7c61fe,_0x4e5fe0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x3397(){const _0x3bb6b5=['348238yKpWHX','56WOqyqT','101754WbAFpL','8EPLhnA','187675vwodqj','14120aNhEwr','llm/chat','last_chat_id','9324900CPRIgA','15758HqbbhE','325230emVzBD','29HLxlIL','write','450JukwXY','clear','40QaXPol'];a95_0x3397=function(){return _0x3bb6b5;};return a95_0x3397();}const a95_0x58719a=a95_0x286f;(function(_0x8d4117,_0x13647e){const _0x312c80=a95_0x286f,_0x11fdec=_0x8d4117();while(!![]){try{const _0x52e4c9=parseInt(_0x312c80(0x117))/0x1*(-parseInt(_0x312c80(0x115))/0x2)+-parseInt(_0x312c80(0x116))/0x3*(parseInt(_0x312c80(0x10f))/0x4)+-parseInt(_0x312c80(0x110))/0x5+parseInt(_0x312c80(0x10e))/0x6*(-parseInt(_0x312c80(0x10d))/0x7)+-parseInt(_0x312c80(0x111))/0x8*(-parseInt(_0x312c80(0x109))/0x9)+parseInt(_0x312c80(0x10b))/0xa*(-parseInt(_0x312c80(0x10c))/0xb)+parseInt(_0x312c80(0x114))/0xc;if(_0x52e4c9===_0x13647e)break;else _0x11fdec['push'](_0x11fdec['shift']());}catch(_0x27dc3d){_0x11fdec['push'](_0x11fdec['shift']());}}}(a95_0x3397,0x1d56f));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a95_0x58719a(0x113),a95_0x58719a(0x112));export function saveLastChatId(_0x1cf6f0){const _0x5b06e8=a95_0x58719a;chatIdCache[_0x5b06e8(0x108)](_0x1cf6f0);}export function loadLastChatId(){return chatIdCache['read']();}function a95_0x286f(_0x317fd7,_0x58a10e){_0x317fd7=_0x317fd7-0x108;const _0x3397ee=a95_0x3397();let _0x286fec=_0x3397ee[_0x317fd7];return _0x286fec;}export function clearLastChatId(){const _0x3deb5f=a95_0x58719a;chatIdCache[_0x3deb5f(0x10a)]();}
|