@treasuredata/tdx 0.26.3 → 0.26.4

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.
Files changed (169) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-validator.js +1 -1
  108. package/dist/sdk/segment/journey-yaml.js +1 -1
  109. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  110. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  111. package/dist/sdk/segment/pull-workflow.js +1 -1
  112. package/dist/sdk/segment/push-recovery.js +1 -1
  113. package/dist/sdk/segment/push-workflow.js +1 -1
  114. package/dist/sdk/segment/resolution-context.js +1 -1
  115. package/dist/sdk/segment/segment-path-parser.js +1 -1
  116. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  117. package/dist/sdk/segment/target-resolution.js +1 -1
  118. package/dist/sdk/segment/tdx-config.js +1 -1
  119. package/dist/sdk/segment/validate-files.js +1 -1
  120. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  121. package/dist/sdk/segment/yaml-validator.js +1 -1
  122. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  123. package/dist/sdk/segment.js +1 -1
  124. package/dist/sdk/types/index.js +1 -1
  125. package/dist/sdk/types/progress.js +1 -1
  126. package/dist/sdk/user.js +1 -1
  127. package/dist/sdk/util/format-detector.js +1 -1
  128. package/dist/sdk/util/formatters.js +1 -1
  129. package/dist/sdk/util/index.js +1 -1
  130. package/dist/sdk/util/tree-formatter.js +1 -1
  131. package/dist/sdk/workflow/archive-validation.js +1 -1
  132. package/dist/sdk/workflow/clone-workflow.js +1 -1
  133. package/dist/sdk/workflow/index.js +1 -1
  134. package/dist/sdk/workflow/pull-workflow.js +1 -1
  135. package/dist/sdk/workflow/push-workflow.js +1 -1
  136. package/dist/sdk/workflow/tdx-config.js +1 -1
  137. package/dist/sdk/workflow/workflow-utils.js +1 -1
  138. package/dist/test-utils/command-runner.js +1 -1
  139. package/dist/test-utils/factories.js +1 -1
  140. package/dist/test-utils/fixtures.js +1 -1
  141. package/dist/test-utils/http-mock.js +1 -1
  142. package/dist/test-utils/index.js +1 -1
  143. package/dist/utils/async.js +1 -1
  144. package/dist/utils/colors.js +1 -1
  145. package/dist/utils/diff.js +1 -1
  146. package/dist/utils/file-permissions.js +1 -1
  147. package/dist/utils/global-cache.js +1 -1
  148. package/dist/utils/json-loader.js +1 -1
  149. package/dist/utils/local-cache.js +1 -1
  150. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  151. package/dist/utils/logger/formatters/index.js +1 -1
  152. package/dist/utils/logger/handlers/console-handler.js +1 -1
  153. package/dist/utils/logger/handlers/file-handler.js +1 -1
  154. package/dist/utils/logger/handlers/index.js +1 -1
  155. package/dist/utils/logger/handlers/null-handler.js +1 -1
  156. package/dist/utils/logger/index.js +1 -1
  157. package/dist/utils/logger/logger.js +1 -1
  158. package/dist/utils/logger/types.js +1 -1
  159. package/dist/utils/option-validation.js +1 -1
  160. package/dist/utils/port.js +1 -1
  161. package/dist/utils/process.js +1 -1
  162. package/dist/utils/prompt.js +1 -1
  163. package/dist/utils/spinner.js +1 -1
  164. package/dist/utils/sse-parser.js +1 -1
  165. package/dist/utils/string-utils.js +1 -1
  166. package/dist/utils/table-ref-parser.js +1 -1
  167. package/dist/utils/tdx-logger.js +1 -1
  168. package/dist/utils/version-check.js +1 -1
  169. package/package.json +1 -1
@@ -1 +1 @@
1
- function a94_0x5d70(){const _0x23392e=['162465TKPnKe','flat','16OuqFdC','no-bundle-','getJourneyStatistics','updateJourney','resumeJourney','includeAllVersions','913266aoGBCB','versionNumber','idx-','3195510noNHMv','pauseJourney','simulation','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','from','getJourney','values','all','14928980WouxKm','name','map','journeys','7381465lYvjHE','journeyBundleId','filter','399735dTFwUj','state','listJourneysWithDetailsFromParentSegment','data','1810216WcWdtp','update','listEntitiesByFolder','listJourneysWithDetails','getParentSegmentFull','updatedAt','push','216pWVidA','applyVersionDeduplication','getStatistics','folder-segment','listJourneysWithFolders','find','createJourney','set','get','add','client','draft','journey','Journey\x20activation\x20step\x20not\x20found:\x20','activationStepsById','resume','listSegmentFolders','Journey\x20not\x20found:\x20','journeyBundleName','createActivation','has','string','createdAt','listJourneysFromParentSegment','getActivation','attributes','segmentFolderId','parentFolder','NOT_FOUND','toLowerCase','listJourneyActivations','27WzSlzg','createJourneyActivation','type','JOURNEY_NOT_FOUND'];a94_0x5d70=function(){return _0x23392e;};return a94_0x5d70();}function a94_0x30c9(_0x11b8f2,_0x30067b){_0x11b8f2=_0x11b8f2-0x12d;const _0x5d70ac=a94_0x5d70();let _0x30c91b=_0x5d70ac[_0x11b8f2];return _0x30c91b;}const a94_0x4c208f=a94_0x30c9;(function(_0x3c5750,_0x257d22){const _0x422377=a94_0x30c9,_0x5d51e1=_0x3c5750();while(!![]){try{const _0x481945=-parseInt(_0x422377(0x159))/0x1+parseInt(_0x422377(0x14a))/0x2+parseInt(_0x422377(0x147))/0x3*(-parseInt(_0x422377(0x141))/0x4)+parseInt(_0x422377(0x13f))/0x5*(parseInt(_0x422377(0x164))/0x6)+-parseInt(_0x422377(0x156))/0x7+parseInt(_0x422377(0x15d))/0x8*(-parseInt(_0x422377(0x13b))/0x9)+parseInt(_0x422377(0x152))/0xa;if(_0x481945===_0x257d22)break;else _0x5d51e1['push'](_0x5d51e1['shift']());}catch(_0x4e6456){_0x5d51e1['push'](_0x5d51e1['shift']());}}}(a94_0x5d70,0xde154));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x255820){const _0x1a571a=a94_0x30c9;return _0x255820[_0x1a571a(0x157)]??_0x255820[_0x1a571a(0x135)]?.[_0x1a571a(0x157)]??undefined;}function getVersionNumber(_0x5961bf){const _0x4b1930=a94_0x30c9;return _0x5961bf[_0x4b1930(0x148)]??_0x5961bf['attributes']?.[_0x4b1930(0x148)]??0x0;}export function deduplicateJourneysByBundle(_0x5c66ef){const _0x3e9976=a94_0x30c9,_0x58e085=new Map();let _0x33ef4b=0x0;for(const _0xfad20d of _0x5c66ef){const _0x4f7e66=getBundleId(_0xfad20d);if(!_0x4f7e66){const _0xfab263=_0x3e9976(0x142)+(_0xfad20d['id']??_0x3e9976(0x149)+_0x33ef4b++);_0x58e085[_0x3e9976(0x16b)](_0xfab263,_0xfad20d);continue;}const _0x1f9ca2=_0x58e085[_0x3e9976(0x16c)](_0x4f7e66);if(!_0x1f9ca2)_0x58e085[_0x3e9976(0x16b)](_0x4f7e66,_0xfad20d);else{const _0x135316=getVersionNumber(_0x1f9ca2),_0x19fb50=getVersionNumber(_0xfad20d);_0x19fb50>_0x135316&&_0x58e085['set'](_0x4f7e66,_0xfad20d);}}return Array[_0x3e9976(0x14e)](_0x58e085[_0x3e9976(0x150)]());}const VALID_JOURNEY_STATES=new Set([a94_0x4c208f(0x16f),a94_0x4c208f(0x14c),'launched']);export function parseJourneyState(_0x3857f1){const _0xc95038=a94_0x4c208f;if(typeof _0x3857f1===_0xc95038(0x131)&&VALID_JOURNEY_STATES[_0xc95038(0x130)](_0x3857f1))return _0x3857f1;return _0xc95038(0x16f);}export function entityToJourneyListItem(_0x41900e,_0x396ba3){const _0x99f04d=a94_0x4c208f,_0x39dd9d=_0x41900e[_0x99f04d(0x135)];return{'id':_0x41900e['id'],'name':_0x39dd9d[_0x99f04d(0x153)]??'','journeyBundleName':_0x39dd9d[_0x99f04d(0x12e)]??_0x39dd9d[_0x99f04d(0x153)]??'','journeyBundleId':_0x39dd9d[_0x99f04d(0x157)]??'','versionNumber':_0x39dd9d[_0x99f04d(0x148)],'description':_0x39dd9d['description']??null,'state':parseJourneyState(_0x39dd9d[_0x99f04d(0x15a)]),'paused':_0x39dd9d['paused']??![],'audienceId':_0x396ba3,'folderId':_0x39dd9d[_0x99f04d(0x136)]??_0x41900e['relationships']?.[_0x99f04d(0x137)]?.[_0x99f04d(0x15c)]?.['id']??null,'createdAt':_0x39dd9d[_0x99f04d(0x132)]??'','updatedAt':_0x39dd9d[_0x99f04d(0x162)]??''};}export class JourneySDK{[a94_0x4c208f(0x16e)];constructor(_0x433088){this['client']=new CDPApiClient(_0x433088);}[a94_0x4c208f(0x165)](_0x25eaa3,_0x478b25){return _0x478b25?_0x25eaa3:deduplicateJourneysByBundle(_0x25eaa3);}async['listJourneysWithDetails'](_0x25ec81,_0x2cb9ba){const _0x3c78d3=a94_0x4c208f;try{const _0x311d2e=await this[_0x3c78d3(0x16e)][_0x3c78d3(0x160)](_0x25ec81);return{'journeys':this['applyVersionDeduplication'](_0x311d2e[_0x3c78d3(0x155)],_0x2cb9ba),'activationStepsById':_0x311d2e[_0x3c78d3(0x172)]};}catch(_0x75d0e5){if(isHttp404Error(_0x75d0e5))return{'journeys':[],'activationStepsById':new Map()};throw _0x75d0e5;}}async[a94_0x4c208f(0x133)](_0x36ce7d,_0x32d592,_0x3d88b5){const _0x4e703e=a94_0x4c208f;let _0x56db3a=_0x32d592;if(!_0x56db3a)try{const _0x49cc76=await this['client'][_0x4e703e(0x161)](_0x36ce7d);_0x56db3a=_0x49cc76['rootFolderId']??undefined;}catch(_0x47b182){if(isHttp404Error(_0x47b182))return[];throw _0x47b182;}if(!_0x56db3a)return[];let _0x27f8b3;if(_0x3d88b5?.[_0x4e703e(0x146)]){const _0x29c814=await this[_0x4e703e(0x16e)][_0x4e703e(0x174)](_0x36ce7d),_0x4a15c7=_0x29c814[_0x4e703e(0x154)](_0x55a09c=>this['client']['listJourneys'](_0x55a09c['id'])),_0x35ca3b=await Promise['all'](_0x4a15c7);_0x27f8b3=_0x35ca3b[_0x4e703e(0x140)]();}else{const _0x2fb86b=await this['client'][_0x4e703e(0x15f)](_0x56db3a,0x20,![]),_0x531708=_0x2fb86b[_0x4e703e(0x15c)],_0x5b7a02=_0x531708[_0x4e703e(0x158)](_0x12dd0c=>_0x12dd0c[_0x4e703e(0x13d)]===_0x4e703e(0x170));_0x27f8b3=_0x5b7a02[_0x4e703e(0x154)](_0x1d58b1=>entityToJourneyListItem(_0x1d58b1,_0x36ce7d));}return this[_0x4e703e(0x165)](_0x27f8b3,_0x3d88b5?.[_0x4e703e(0x146)]);}async[a94_0x4c208f(0x168)](_0x57b3d0,_0x22d1e1,_0x2a37ee){const _0x374754=a94_0x4c208f;if(!_0x22d1e1)return{'journeys':[],'folders':[]};const _0x4a6f90=await this[_0x374754(0x16e)]['listEntitiesByFolder'](_0x22d1e1,0x20,![]),_0x4d39bc=_0x4a6f90[_0x374754(0x15c)],_0x46e986=_0x4d39bc[_0x374754(0x158)](_0x484748=>_0x484748[_0x374754(0x13d)]===_0x374754(0x167)&&_0x484748['id']!==_0x22d1e1),_0x1d2428=_0x46e986[_0x374754(0x154)](_0x3e9086=>({'id':_0x3e9086['id'],'name':_0x3e9086[_0x374754(0x135)]['name']})),_0x515deb=_0x4d39bc[_0x374754(0x158)](_0x4b8d9e=>_0x4b8d9e[_0x374754(0x13d)]===_0x374754(0x170)),_0x5e32e5=_0x515deb[_0x374754(0x154)](_0x20402a=>entityToJourneyListItem(_0x20402a,_0x57b3d0));return{'journeys':this[_0x374754(0x165)](_0x5e32e5,_0x2a37ee?.[_0x374754(0x146)]),'folders':_0x1d2428};}async[a94_0x4c208f(0x15b)](_0x33581a,_0x4fe97c){const _0x499364=a94_0x4c208f;let _0x2e1b1e;try{_0x2e1b1e=await this[_0x499364(0x16e)][_0x499364(0x174)](_0x33581a);}catch(_0x41606d){if(isHttp404Error(_0x41606d))return{'journeys':[],'activationStepsById':new Map()};throw _0x41606d;}const _0x773425=_0x2e1b1e[_0x499364(0x154)](async _0x16d117=>{const _0x3f6073=_0x499364;return await this[_0x3f6073(0x160)](_0x16d117['id'],_0x4fe97c?.[_0x3f6073(0x146)]);}),_0x54ed83=await Promise[_0x499364(0x151)](_0x773425),_0x3e9cd1=new Map(),_0x3a32d4=[];for(const _0x3075c6 of _0x54ed83){_0x3a32d4[_0x499364(0x163)](..._0x3075c6[_0x499364(0x155)]);for(const [_0x33c347,_0x29b841]of _0x3075c6[_0x499364(0x172)]){_0x3e9cd1[_0x499364(0x16b)](_0x33c347,_0x29b841);}}const _0x2ada39=new Set(),_0x5b49f9=_0x3a32d4[_0x499364(0x158)](_0x3d1001=>{const _0x497629=_0x499364;if(_0x2ada39[_0x497629(0x130)](_0x3d1001['id']))return![];return _0x2ada39[_0x497629(0x16d)](_0x3d1001['id']),!![];});return{'journeys':this[_0x499364(0x165)](_0x5b49f9,_0x4fe97c?.[_0x499364(0x146)]),'activationStepsById':_0x3e9cd1};}async[a94_0x4c208f(0x14f)](_0x32f5e6){const _0x6de784=a94_0x4c208f;try{return await this['client'][_0x6de784(0x14f)](_0x32f5e6);}catch(_0xabcd5c){if(isHttp404Error(_0xabcd5c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x6de784(0x12d)+_0x32f5e6,_0xabcd5c);throw _0xabcd5c;}}async['resolveJourneyId'](_0x5c1e19,_0xe7b811){const _0x12435c=a94_0x4c208f,_0x3bfff0=await this[_0x12435c(0x133)](_0x5c1e19),_0x309ae3=_0x3bfff0[_0x12435c(0x169)](_0x1c29cb=>_0x1c29cb[_0x12435c(0x12e)][_0x12435c(0x139)]()===_0xe7b811['toLowerCase']());if(!_0x309ae3)throw new SDKError(ErrorCode[_0x12435c(0x13e)],_0x12435c(0x12d)+_0xe7b811,undefined,{'helpText':_0x12435c(0x14d)});return _0x309ae3['id'];}async[a94_0x4c208f(0x166)](_0x1bc890){const _0x19b57a=a94_0x4c208f;try{return await this[_0x19b57a(0x16e)][_0x19b57a(0x143)](_0x1bc890);}catch(_0x359c12){if(isHttp404Error(_0x359c12))throw new SDKError(ErrorCode[_0x19b57a(0x13e)],'Journey\x20not\x20found:\x20'+_0x1bc890,_0x359c12);throw _0x359c12;}}async['pause'](_0x485ca3){const _0x4c8f4b=a94_0x4c208f;try{return await this[_0x4c8f4b(0x16e)][_0x4c8f4b(0x14b)](_0x485ca3);}catch(_0x118781){if(isHttp404Error(_0x118781))throw new SDKError(ErrorCode[_0x4c8f4b(0x13e)],_0x4c8f4b(0x12d)+_0x485ca3,_0x118781);throw _0x118781;}}async[a94_0x4c208f(0x173)](_0x388665){const _0x3f0b64=a94_0x4c208f;try{return await this[_0x3f0b64(0x16e)][_0x3f0b64(0x145)](_0x388665);}catch(_0xe17b5c){if(isHttp404Error(_0xe17b5c))throw new SDKError(ErrorCode[_0x3f0b64(0x13e)],'Journey\x20not\x20found:\x20'+_0x388665,_0xe17b5c);throw _0xe17b5c;}}async['create'](_0x39648d){const _0x41040e=a94_0x4c208f;return await this['client'][_0x41040e(0x16a)](_0x39648d);}async[a94_0x4c208f(0x15e)](_0x3cb2c4,_0x2f86e5){const _0x55a9c=a94_0x4c208f;try{return await this[_0x55a9c(0x16e)][_0x55a9c(0x144)](_0x3cb2c4,_0x2f86e5);}catch(_0x11b2b3){if(isHttp404Error(_0x11b2b3))throw new SDKError(ErrorCode[_0x55a9c(0x13e)],_0x55a9c(0x12d)+_0x3cb2c4,_0x11b2b3);throw _0x11b2b3;}}async[a94_0x4c208f(0x134)](_0x1ac1fc,_0x39c113){const _0x48aa11=a94_0x4c208f;try{return await this['client']['getJourneyActivation'](_0x1ac1fc,_0x39c113);}catch(_0x489229){if(isHttp404Error(_0x489229))throw new SDKError(ErrorCode[_0x48aa11(0x138)],_0x48aa11(0x171)+_0x39c113+'\x20in\x20journey\x20'+_0x1ac1fc,_0x489229);throw _0x489229;}}async['listActivations'](_0x3588fb){const _0xfd4b6d=a94_0x4c208f;try{return await this[_0xfd4b6d(0x16e)][_0xfd4b6d(0x13a)](_0x3588fb);}catch(_0x166892){if(isHttp404Error(_0x166892))return[];throw _0x166892;}}async[a94_0x4c208f(0x12f)](_0x5bb737,_0x408689){const _0x56d783=a94_0x4c208f;return await this[_0x56d783(0x16e)][_0x56d783(0x13c)](_0x5bb737,_0x408689);}}
1
+ const a94_0x49b202=a94_0x1695;(function(_0x536a07,_0xc70253){const _0x2a6f36=a94_0x1695,_0x35f13f=_0x536a07();while(!![]){try{const _0x1c35c4=parseInt(_0x2a6f36(0x1fe))/0x1+parseInt(_0x2a6f36(0x208))/0x2+parseInt(_0x2a6f36(0x21d))/0x3+-parseInt(_0x2a6f36(0x20b))/0x4+-parseInt(_0x2a6f36(0x1f8))/0x5*(parseInt(_0x2a6f36(0x1ef))/0x6)+parseInt(_0x2a6f36(0x221))/0x7+-parseInt(_0x2a6f36(0x202))/0x8;if(_0x1c35c4===_0xc70253)break;else _0x35f13f['push'](_0x35f13f['shift']());}catch(_0x3ed3b3){_0x35f13f['push'](_0x35f13f['shift']());}}}(a94_0x1214,0xc7ace));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2392ca){const _0x3f1b0b=a94_0x1695;return _0x2392ca[_0x3f1b0b(0x227)]??_0x2392ca[_0x3f1b0b(0x212)]?.[_0x3f1b0b(0x227)]??undefined;}function getVersionNumber(_0xaa7213){const _0x129b70=a94_0x1695;return _0xaa7213[_0x129b70(0x230)]??_0xaa7213[_0x129b70(0x212)]?.[_0x129b70(0x230)]??0x0;}function a94_0x1695(_0x318397,_0x53e87c){_0x318397=_0x318397-0x1ec;const _0x1214e6=a94_0x1214();let _0x169533=_0x1214e6[_0x318397];return _0x169533;}export function deduplicateJourneysByBundle(_0x4a3190){const _0x260c61=a94_0x1695,_0x32a651=new Map();let _0x34ad79=0x0;for(const _0x34537f of _0x4a3190){const _0xcba81a=getBundleId(_0x34537f);if(!_0xcba81a){const _0x1de1d6=_0x260c61(0x201)+(_0x34537f['id']??_0x260c61(0x21b)+_0x34ad79++);_0x32a651['set'](_0x1de1d6,_0x34537f);continue;}const _0x12c189=_0x32a651['get'](_0xcba81a);if(!_0x12c189)_0x32a651[_0x260c61(0x205)](_0xcba81a,_0x34537f);else{const _0x1a29e7=getVersionNumber(_0x12c189),_0x3ef9eb=getVersionNumber(_0x34537f);_0x3ef9eb>_0x1a29e7&&_0x32a651[_0x260c61(0x205)](_0xcba81a,_0x34537f);}}return Array['from'](_0x32a651[_0x260c61(0x223)]());}const VALID_JOURNEY_STATES=new Set([a94_0x49b202(0x218),'simulation',a94_0x49b202(0x209)]);function a94_0x1214(){const _0x237c63=['resolveJourneyId','toLowerCase','5VDWPvi','name','push','listSegmentFolders','update','pause','1084430uLQEJb','createdAt','listJourneysWithDetailsFromParentSegment','no-bundle-','5713928fdlBkj','\x20in\x20journey\x20','listJourneysFromParentSegment','set','listEntitiesByFolder','journeyBundleName','750572sHxlKV','launched','getJourneyStatistics','1133500IRHORF','parentFolder','filter','folder-segment','applyVersionDeduplication','listJourneyActivations','JOURNEY_NOT_FOUND','attributes','find','state','paused','all','string','draft','segmentFolderId','add','idx-','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','188829cCxMks','rootFolderId','updateJourney','map','6913592gfvqZj','resumeJourney','values','updatedAt','listJourneysWithDetails','create','journeyBundleId','getStatistics','journey','Journey\x20activation\x20step\x20not\x20found:\x20','data','pauseJourney','getJourney','getParentSegmentFull','type','versionNumber','has','Journey\x20not\x20found:\x20','listJourneys','listJourneysWithFolders','4168974kFaPJX','listActivations','client','includeAllVersions','createJourneyActivation','activationStepsById','journeys'];a94_0x1214=function(){return _0x237c63;};return a94_0x1214();}export function parseJourneyState(_0x93f298){const _0x596455=a94_0x49b202;if(typeof _0x93f298===_0x596455(0x217)&&VALID_JOURNEY_STATES[_0x596455(0x231)](_0x93f298))return _0x93f298;return _0x596455(0x218);}export function entityToJourneyListItem(_0x2782b6,_0x37ef66){const _0x58bb66=a94_0x49b202,_0x1c30f0=_0x2782b6[_0x58bb66(0x212)];return{'id':_0x2782b6['id'],'name':_0x1c30f0['name']??'','journeyBundleName':_0x1c30f0['journeyBundleName']??_0x1c30f0[_0x58bb66(0x1f9)]??'','journeyBundleId':_0x1c30f0[_0x58bb66(0x227)]??'','versionNumber':_0x1c30f0[_0x58bb66(0x230)],'description':_0x1c30f0['description']??null,'state':parseJourneyState(_0x1c30f0[_0x58bb66(0x214)]),'paused':_0x1c30f0[_0x58bb66(0x215)]??![],'audienceId':_0x37ef66,'folderId':_0x1c30f0[_0x58bb66(0x219)]??_0x2782b6['relationships']?.[_0x58bb66(0x20c)]?.[_0x58bb66(0x22b)]?.['id']??null,'createdAt':_0x1c30f0[_0x58bb66(0x1ff)]??'','updatedAt':_0x1c30f0[_0x58bb66(0x224)]??''};}export class JourneySDK{[a94_0x49b202(0x1f1)];constructor(_0x20a280){this['client']=new CDPApiClient(_0x20a280);}[a94_0x49b202(0x20f)](_0x5009b3,_0x7de8ea){return _0x7de8ea?_0x5009b3:deduplicateJourneysByBundle(_0x5009b3);}async[a94_0x49b202(0x225)](_0x46f2de,_0x56ccaf){const _0x5d39d1=a94_0x49b202;try{const _0x5cde90=await this[_0x5d39d1(0x1f1)][_0x5d39d1(0x225)](_0x46f2de);return{'journeys':this[_0x5d39d1(0x20f)](_0x5cde90['journeys'],_0x56ccaf),'activationStepsById':_0x5cde90[_0x5d39d1(0x1f4)]};}catch(_0x2b2f4d){if(isHttp404Error(_0x2b2f4d))return{'journeys':[],'activationStepsById':new Map()};throw _0x2b2f4d;}}async[a94_0x49b202(0x204)](_0x31464c,_0x5f3255,_0x3f3863){const _0x19732d=a94_0x49b202;let _0x291035=_0x5f3255;if(!_0x291035)try{const _0x4a55ac=await this[_0x19732d(0x1f1)][_0x19732d(0x22e)](_0x31464c);_0x291035=_0x4a55ac[_0x19732d(0x21e)]??undefined;}catch(_0x81216d){if(isHttp404Error(_0x81216d))return[];throw _0x81216d;}if(!_0x291035)return[];let _0x12c05a;if(_0x3f3863?.[_0x19732d(0x1f2)]){const _0x54fcd7=await this[_0x19732d(0x1f1)][_0x19732d(0x1fb)](_0x31464c),_0x2e9cd4=_0x54fcd7[_0x19732d(0x220)](_0x3c51e2=>this[_0x19732d(0x1f1)][_0x19732d(0x1ed)](_0x3c51e2['id'])),_0x36690a=await Promise[_0x19732d(0x216)](_0x2e9cd4);_0x12c05a=_0x36690a['flat']();}else{const _0x499c1d=await this[_0x19732d(0x1f1)][_0x19732d(0x206)](_0x291035,0x20,![]),_0x5c9890=_0x499c1d[_0x19732d(0x22b)],_0x116bf6=_0x5c9890[_0x19732d(0x20d)](_0x48f9cf=>_0x48f9cf['type']===_0x19732d(0x229));_0x12c05a=_0x116bf6[_0x19732d(0x220)](_0x5891ba=>entityToJourneyListItem(_0x5891ba,_0x31464c));}return this[_0x19732d(0x20f)](_0x12c05a,_0x3f3863?.['includeAllVersions']);}async[a94_0x49b202(0x1ee)](_0x491435,_0x3fbae3,_0x3639e1){const _0x59d1ab=a94_0x49b202;if(!_0x3fbae3)return{'journeys':[],'folders':[]};const _0x56a00b=await this[_0x59d1ab(0x1f1)][_0x59d1ab(0x206)](_0x3fbae3,0x20,![]),_0x5e7370=_0x56a00b[_0x59d1ab(0x22b)],_0x7833ff=_0x5e7370[_0x59d1ab(0x20d)](_0x5306f8=>_0x5306f8[_0x59d1ab(0x22f)]===_0x59d1ab(0x20e)&&_0x5306f8['id']!==_0x3fbae3),_0x4bbeb3=_0x7833ff[_0x59d1ab(0x220)](_0x14d4ac=>({'id':_0x14d4ac['id'],'name':_0x14d4ac['attributes'][_0x59d1ab(0x1f9)]})),_0x513936=_0x5e7370[_0x59d1ab(0x20d)](_0x54a9e0=>_0x54a9e0['type']===_0x59d1ab(0x229)),_0x241fd8=_0x513936['map'](_0x4aac18=>entityToJourneyListItem(_0x4aac18,_0x491435));return{'journeys':this[_0x59d1ab(0x20f)](_0x241fd8,_0x3639e1?.[_0x59d1ab(0x1f2)]),'folders':_0x4bbeb3};}async[a94_0x49b202(0x200)](_0x1b2b1a,_0x313ddf){const _0x2b5270=a94_0x49b202;let _0x5edbb5;try{_0x5edbb5=await this[_0x2b5270(0x1f1)]['listSegmentFolders'](_0x1b2b1a);}catch(_0x5953e9){if(isHttp404Error(_0x5953e9))return{'journeys':[],'activationStepsById':new Map()};throw _0x5953e9;}const _0x5bea7b=_0x5edbb5[_0x2b5270(0x220)](async _0x27ce67=>{const _0x204e55=_0x2b5270;return await this[_0x204e55(0x225)](_0x27ce67['id'],_0x313ddf?.[_0x204e55(0x1f2)]);}),_0x4c514a=await Promise[_0x2b5270(0x216)](_0x5bea7b),_0x43f91a=new Map(),_0x3a3e8c=[];for(const _0xd8ced0 of _0x4c514a){_0x3a3e8c[_0x2b5270(0x1fa)](..._0xd8ced0[_0x2b5270(0x1f5)]);for(const [_0x557739,_0x29e0e2]of _0xd8ced0[_0x2b5270(0x1f4)]){_0x43f91a['set'](_0x557739,_0x29e0e2);}}const _0x5ccd0b=new Set(),_0x4a815d=_0x3a3e8c[_0x2b5270(0x20d)](_0xd06b6e=>{const _0x2b4e91=_0x2b5270;if(_0x5ccd0b['has'](_0xd06b6e['id']))return![];return _0x5ccd0b[_0x2b4e91(0x21a)](_0xd06b6e['id']),!![];});return{'journeys':this[_0x2b5270(0x20f)](_0x4a815d,_0x313ddf?.[_0x2b5270(0x1f2)]),'activationStepsById':_0x43f91a};}async[a94_0x49b202(0x22d)](_0x20d167){const _0x264fa6=a94_0x49b202;try{return await this[_0x264fa6(0x1f1)][_0x264fa6(0x22d)](_0x20d167);}catch(_0x165338){if(isHttp404Error(_0x165338))throw new SDKError(ErrorCode[_0x264fa6(0x211)],_0x264fa6(0x1ec)+_0x20d167,_0x165338);throw _0x165338;}}async[a94_0x49b202(0x1f6)](_0x33839f,_0x330ca1){const _0x3cbc18=a94_0x49b202,_0x3e3bed=await this[_0x3cbc18(0x204)](_0x33839f),_0x5ce8ac=_0x3e3bed[_0x3cbc18(0x213)](_0x2bb4e5=>_0x2bb4e5[_0x3cbc18(0x207)][_0x3cbc18(0x1f7)]()===_0x330ca1[_0x3cbc18(0x1f7)]());if(!_0x5ce8ac)throw new SDKError(ErrorCode[_0x3cbc18(0x211)],_0x3cbc18(0x1ec)+_0x330ca1,undefined,{'helpText':_0x3cbc18(0x21c)});return _0x5ce8ac['id'];}async[a94_0x49b202(0x228)](_0x14519a){const _0x1ec3cb=a94_0x49b202;try{return await this['client'][_0x1ec3cb(0x20a)](_0x14519a);}catch(_0x9daefc){if(isHttp404Error(_0x9daefc))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x14519a,_0x9daefc);throw _0x9daefc;}}async[a94_0x49b202(0x1fd)](_0x1eac7f){const _0x4918cd=a94_0x49b202;try{return await this[_0x4918cd(0x1f1)][_0x4918cd(0x22c)](_0x1eac7f);}catch(_0x28d4b9){if(isHttp404Error(_0x28d4b9))throw new SDKError(ErrorCode[_0x4918cd(0x211)],_0x4918cd(0x1ec)+_0x1eac7f,_0x28d4b9);throw _0x28d4b9;}}async['resume'](_0x573fb3){const _0x342253=a94_0x49b202;try{return await this[_0x342253(0x1f1)][_0x342253(0x222)](_0x573fb3);}catch(_0x451b34){if(isHttp404Error(_0x451b34))throw new SDKError(ErrorCode[_0x342253(0x211)],_0x342253(0x1ec)+_0x573fb3,_0x451b34);throw _0x451b34;}}async[a94_0x49b202(0x226)](_0x39a540){const _0x369ac1=a94_0x49b202;return await this[_0x369ac1(0x1f1)]['createJourney'](_0x39a540);}async[a94_0x49b202(0x1fc)](_0x32743b,_0x208e04){const _0x45dd7b=a94_0x49b202;try{return await this[_0x45dd7b(0x1f1)][_0x45dd7b(0x21f)](_0x32743b,_0x208e04);}catch(_0xa70503){if(isHttp404Error(_0xa70503))throw new SDKError(ErrorCode[_0x45dd7b(0x211)],_0x45dd7b(0x1ec)+_0x32743b,_0xa70503);throw _0xa70503;}}async['getActivation'](_0xdb4f29,_0x452c5c){const _0x5a3ebd=a94_0x49b202;try{return await this[_0x5a3ebd(0x1f1)]['getJourneyActivation'](_0xdb4f29,_0x452c5c);}catch(_0x119320){if(isHttp404Error(_0x119320))throw new SDKError(ErrorCode['NOT_FOUND'],_0x5a3ebd(0x22a)+_0x452c5c+_0x5a3ebd(0x203)+_0xdb4f29,_0x119320);throw _0x119320;}}async[a94_0x49b202(0x1f0)](_0x3ab00d){const _0x3d47df=a94_0x49b202;try{return await this[_0x3d47df(0x1f1)][_0x3d47df(0x210)](_0x3ab00d);}catch(_0x15d72a){if(isHttp404Error(_0x15d72a))return[];throw _0x15d72a;}}async['createActivation'](_0x3ac0c0,_0x314b26){const _0x359137=a94_0x49b202;return await this[_0x359137(0x1f1)][_0x359137(0x1f3)](_0x3ac0c0,_0x314b26);}}
@@ -1 +1 @@
1
- function a95_0xca8c(){const _0x468ac4=['8ptBreK','clear','11nmZoFX','last_chat_id','8884440czMAlI','2176520NeoWcI','9912seuhqN','1974GETsBs','write','read','141467opoaPq','21dMRZZb','133736MhPSfQ','5507136ktGlEv','3896388JwPXvY'];a95_0xca8c=function(){return _0x468ac4;};return a95_0xca8c();}const a95_0xd68b89=a95_0x4216;(function(_0x430602,_0x3076fc){const _0x470b66=a95_0x4216,_0x2fd627=_0x430602();while(!![]){try{const _0x704891=-parseInt(_0x470b66(0x181))/0x1+-parseInt(_0x470b66(0x183))/0x2*(parseInt(_0x470b66(0x182))/0x3)+-parseInt(_0x470b66(0x186))/0x4*(-parseInt(_0x470b66(0x18b))/0x5)+parseInt(_0x470b66(0x17d))/0x6*(parseInt(_0x470b66(0x17e))/0x7)+-parseInt(_0x470b66(0x184))/0x8+-parseInt(_0x470b66(0x185))/0x9+-parseInt(_0x470b66(0x18a))/0xa*(-parseInt(_0x470b66(0x188))/0xb);if(_0x704891===_0x3076fc)break;else _0x2fd627['push'](_0x2fd627['shift']());}catch(_0x3df339){_0x2fd627['push'](_0x2fd627['shift']());}}}(a95_0xca8c,0x789e1));function a95_0x4216(_0x34de0b,_0x239355){_0x34de0b=_0x34de0b-0x17d;const _0xca8caa=a95_0xca8c();let _0x4216f1=_0xca8caa[_0x34de0b];return _0x4216f1;}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a95_0xd68b89(0x189),'llm/chat');export function saveLastChatId(_0x3036cb){const _0x5b0fe1=a95_0xd68b89;chatIdCache[_0x5b0fe1(0x17f)](_0x3036cb);}export function loadLastChatId(){const _0x3e49a8=a95_0xd68b89;return chatIdCache[_0x3e49a8(0x180)]();}export function clearLastChatId(){const _0x11a050=a95_0xd68b89;chatIdCache[_0x11a050(0x187)]();}
1
+ const a95_0x3aa2c2=a95_0x54ca;(function(_0x387671,_0x34e011){const _0x248300=a95_0x54ca,_0x4e93f9=_0x387671();while(!![]){try{const _0x31e6bc=-parseInt(_0x248300(0x1ad))/0x1*(-parseInt(_0x248300(0x1af))/0x2)+-parseInt(_0x248300(0x1b1))/0x3*(-parseInt(_0x248300(0x1a4))/0x4)+-parseInt(_0x248300(0x1b0))/0x5*(parseInt(_0x248300(0x1ac))/0x6)+-parseInt(_0x248300(0x1a7))/0x7+parseInt(_0x248300(0x1ae))/0x8+parseInt(_0x248300(0x1aa))/0x9+parseInt(_0x248300(0x1a5))/0xa;if(_0x31e6bc===_0x34e011)break;else _0x4e93f9['push'](_0x4e93f9['shift']());}catch(_0xed64ab){_0x4e93f9['push'](_0x4e93f9['shift']());}}}(a95_0x4e9a,0xe75e7));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a95_0x3aa2c2(0x1a9),a95_0x3aa2c2(0x1ab));export function saveLastChatId(_0x3f83a2){const _0x1dca40=a95_0x3aa2c2;chatIdCache[_0x1dca40(0x1a8)](_0x3f83a2);}export function loadLastChatId(){const _0x444a4b=a95_0x3aa2c2;return chatIdCache[_0x444a4b(0x1a6)]();}export function clearLastChatId(){chatIdCache['clear']();}function a95_0x54ca(_0x8e296,_0x464426){_0x8e296=_0x8e296-0x1a4;const _0x4e9aef=a95_0x4e9a();let _0x54ca42=_0x4e9aef[_0x8e296];return _0x54ca42;}function a95_0x4e9a(){const _0x559c54=['12GJCZbA','120uObRJD','129sIGLGS','40052UHhjNN','10422810GawUfx','read','7844473IeDwKN','write','last_chat_id','3849138PCxWOy','llm/chat','315954vyXAlT','218054jtkLnm','986368zsTHns'];a95_0x4e9a=function(){return _0x559c54;};return a95_0x4e9a();}