@treasuredata/tdx 0.8.12 → 0.9.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.
Files changed (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/client/cdp-api-client.js +1 -1
  10. package/dist/client/engage-api-client.js +1 -1
  11. package/dist/client/http-client.js +1 -1
  12. package/dist/client/llm-api-client.d.ts +88 -0
  13. package/dist/client/llm-api-client.d.ts.map +1 -1
  14. package/dist/client/llm-api-client.js +1 -1
  15. package/dist/client/llm-api-client.js.map +1 -1
  16. package/dist/client/rate-limiter.js +1 -1
  17. package/dist/client/td-api-client.js +1 -1
  18. package/dist/client/trino-api-client.js +1 -1
  19. package/dist/client/workflow-client.js +1 -1
  20. package/dist/commands/activations.js +1 -1
  21. package/dist/commands/agent-command.d.ts +32 -0
  22. package/dist/commands/agent-command.d.ts.map +1 -0
  23. package/dist/commands/agent-command.js +1 -0
  24. package/dist/commands/agent-command.js.map +1 -0
  25. package/dist/commands/api-command.js +1 -1
  26. package/dist/commands/auth-command.js +1 -1
  27. package/dist/commands/chat-command.d.ts +3 -2
  28. package/dist/commands/chat-command.d.ts.map +1 -1
  29. package/dist/commands/chat-command.js +1 -1
  30. package/dist/commands/chat-command.js.map +1 -1
  31. package/dist/commands/claude-command.js +1 -1
  32. package/dist/commands/claude-statusline-command.js +1 -1
  33. package/dist/commands/claude-usage-command.js +1 -1
  34. package/dist/commands/command.js +1 -1
  35. package/dist/commands/connection-command.js +1 -1
  36. package/dist/commands/context-command.js +1 -1
  37. package/dist/commands/databases.js +1 -1
  38. package/dist/commands/describe.js +1 -1
  39. package/dist/commands/engage-command.js +1 -1
  40. package/dist/commands/job-command.js +1 -1
  41. package/dist/commands/journey-command.js +1 -1
  42. package/dist/commands/llm-command.d.ts +8 -4
  43. package/dist/commands/llm-command.d.ts.map +1 -1
  44. package/dist/commands/llm-command.js +1 -1
  45. package/dist/commands/llm-command.js.map +1 -1
  46. package/dist/commands/llm-proxy.js +1 -1
  47. package/dist/commands/parent-segment-command.js +1 -1
  48. package/dist/commands/profiles-command.js +1 -1
  49. package/dist/commands/query-command.js +1 -1
  50. package/dist/commands/segment-command.js +1 -1
  51. package/dist/commands/segment-create-command.js +1 -1
  52. package/dist/commands/segment-fields-command.js +1 -1
  53. package/dist/commands/segment-pull-command.js +1 -1
  54. package/dist/commands/segment-push-command.js +1 -1
  55. package/dist/commands/segment-update-command.js +1 -1
  56. package/dist/commands/segment-use-command.js +1 -1
  57. package/dist/commands/segments.js +1 -1
  58. package/dist/commands/show.js +1 -1
  59. package/dist/commands/tables.js +1 -1
  60. package/dist/commands/use-command.d.ts +1 -0
  61. package/dist/commands/use-command.d.ts.map +1 -1
  62. package/dist/commands/use-command.js +1 -1
  63. package/dist/commands/use-command.js.map +1 -1
  64. package/dist/commands/user-command.js +1 -1
  65. package/dist/commands/workflow-command.js +1 -1
  66. package/dist/core/auth.js +1 -1
  67. package/dist/core/config.d.ts +32 -0
  68. package/dist/core/config.d.ts.map +1 -1
  69. package/dist/core/config.js +1 -1
  70. package/dist/core/config.js.map +1 -1
  71. package/dist/core/connection-cache.js +1 -1
  72. package/dist/core/credential-cache.js +1 -1
  73. package/dist/core/global-context.d.ts +1 -0
  74. package/dist/core/global-context.d.ts.map +1 -1
  75. package/dist/core/global-context.js +1 -1
  76. package/dist/core/global-context.js.map +1 -1
  77. package/dist/core/keychain.js +1 -1
  78. package/dist/core/profile.js +1 -1
  79. package/dist/core/project-config.js +1 -1
  80. package/dist/core/session.d.ts +1 -0
  81. package/dist/core/session.d.ts.map +1 -1
  82. package/dist/core/session.js +1 -1
  83. package/dist/core/session.js.map +1 -1
  84. package/dist/core/user-cache.js +1 -1
  85. package/dist/index.js +1 -1
  86. package/dist/proxy/anthropic-adapter.js +1 -1
  87. package/dist/proxy/claude-usage-tracker.js +1 -1
  88. package/dist/proxy/context-signature.js +1 -1
  89. package/dist/proxy/conversation-utils.js +1 -1
  90. package/dist/proxy/server.js +1 -1
  91. package/dist/proxy/session-cache.js +1 -1
  92. package/dist/sdk/agent/agent-yaml.d.ts +386 -0
  93. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -0
  94. package/dist/sdk/agent/agent-yaml.js +1 -0
  95. package/dist/sdk/agent/agent-yaml.js.map +1 -0
  96. package/dist/sdk/api.js +1 -1
  97. package/dist/sdk/connection.js +1 -1
  98. package/dist/sdk/engage.js +1 -1
  99. package/dist/sdk/errors.d.ts +4 -0
  100. package/dist/sdk/errors.d.ts.map +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/errors.js.map +1 -1
  103. package/dist/sdk/index.js +1 -1
  104. package/dist/sdk/job.js +1 -1
  105. package/dist/sdk/journey.js +1 -1
  106. package/dist/sdk/llm.d.ts +114 -0
  107. package/dist/sdk/llm.d.ts.map +1 -1
  108. package/dist/sdk/llm.js +1 -1
  109. package/dist/sdk/llm.js.map +1 -1
  110. package/dist/sdk/query.js +1 -1
  111. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  112. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  113. package/dist/sdk/segment/journey-yaml.js +1 -1
  114. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  115. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  116. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/user.js +1 -1
  119. package/dist/sdk/workflow.js +1 -1
  120. package/dist/types/endpoints.d.ts +17 -0
  121. package/dist/types/endpoints.d.ts.map +1 -1
  122. package/dist/types/endpoints.js +1 -1
  123. package/dist/types/endpoints.js.map +1 -1
  124. package/dist/types/index.js +1 -1
  125. package/dist/types/llm.d.ts +203 -0
  126. package/dist/types/llm.d.ts.map +1 -1
  127. package/dist/utils/agent-config.d.ts +124 -0
  128. package/dist/utils/agent-config.d.ts.map +1 -0
  129. package/dist/utils/agent-config.js +1 -0
  130. package/dist/utils/agent-config.js.map +1 -0
  131. package/dist/utils/agent-ref-parser.js +1 -1
  132. package/dist/utils/async.js +1 -1
  133. package/dist/utils/chat-cache.js +1 -1
  134. package/dist/utils/colors.js +1 -1
  135. package/dist/utils/command-output.js +1 -1
  136. package/dist/utils/constants.js +1 -1
  137. package/dist/utils/diff.js +1 -1
  138. package/dist/utils/fields-display.js +1 -1
  139. package/dist/utils/file-permissions.js +1 -1
  140. package/dist/utils/format-detector.js +1 -1
  141. package/dist/utils/formatters.js +1 -1
  142. package/dist/utils/journey-utils.js +1 -1
  143. package/dist/utils/json-loader.js +1 -1
  144. package/dist/utils/llm-backup-utils.js +1 -1
  145. package/dist/utils/model-aliases.js +1 -1
  146. package/dist/utils/model-factors.js +1 -1
  147. package/dist/utils/option-validation.js +1 -1
  148. package/dist/utils/port.js +1 -1
  149. package/dist/utils/process.js +1 -1
  150. package/dist/utils/prompt.js +1 -1
  151. package/dist/utils/segment-path-parser.js +1 -1
  152. package/dist/utils/segment-ref-parser.js +1 -1
  153. package/dist/utils/spinner.js +1 -1
  154. package/dist/utils/sql-parser.js +1 -1
  155. package/dist/utils/sse-parser.js +1 -1
  156. package/dist/utils/string-utils.js +1 -1
  157. package/dist/utils/table-ref-parser.js +1 -1
  158. package/dist/utils/tdx-config.js +1 -1
  159. package/dist/utils/tdx-logger.js +1 -1
  160. package/dist/utils/tree-formatter.js +1 -1
  161. package/dist/utils/version-check.js +1 -1
  162. package/dist/utils/workflow-utils.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- const a17_0x449df4=a17_0x15ff;(function(_0x13003d,_0x300d31){const _0x3636c7=a17_0x15ff,_0x506cf7=_0x13003d();while(!![]){try{const _0xc6e5f2=-parseInt(_0x3636c7(0x22e))/0x1*(-parseInt(_0x3636c7(0x20f))/0x2)+-parseInt(_0x3636c7(0x217))/0x3*(parseInt(_0x3636c7(0x202))/0x4)+parseInt(_0x3636c7(0x1f5))/0x5+-parseInt(_0x3636c7(0x1f9))/0x6*(-parseInt(_0x3636c7(0x219))/0x7)+parseInt(_0x3636c7(0x1fb))/0x8*(parseInt(_0x3636c7(0x209))/0x9)+-parseInt(_0x3636c7(0x227))/0xa*(parseInt(_0x3636c7(0x204))/0xb)+-parseInt(_0x3636c7(0x20b))/0xc;if(_0xc6e5f2===_0x300d31)break;else _0x506cf7['push'](_0x506cf7['shift']());}catch(_0x29857f){_0x506cf7['push'](_0x506cf7['shift']());}}}(a17_0x110a,0x7addd));import a17_0xd455e7 from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function a17_0x15ff(_0x5943f4,_0x2c983b){_0x5943f4=_0x5943f4-0x1f0;const _0x110a21=a17_0x110a();let _0x15ffa4=_0x110a21[_0x5943f4];return _0x15ffa4;}function a17_0x110a(){const _0x357578=['all','error','38JHqiBV','json','entryCount','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','profile','Requests','numeric','Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile','1481196OgDGzX','totalCredits','7vpwbmZ','monthCredits','en-CA','2-digit','lastUsedAt','toFixed','Error:\x20','(default)','name','\x20days\x20ago','execute','dim','en-US','Credits','370310XmstbU','repeat','getTime','message','log','\x20\x20Today:\x20\x20\x20','\x20credits','36457fIMKmr','jsonl','credits','usage','today\x20','length','outputTable','cyan','1619030jUrNGO','profileCount','toLocaleDateString','description','4525506OseSgl','Usage\x20by\x20Profile','2528RlXZNQ','format','padStart','round','short','map','default','4ycgvPc','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','286wooYsl','outputStructured','padEnd','bold','toLocaleTimeString','18360JKktac','Profile','5466972DOqDeP','todayCredits'];a17_0x110a=function(){return _0x357578;};return a17_0x110a();}function formatCredits(_0x176cc2){const _0x28b92d=a17_0x15ff;return _0x176cc2[_0x28b92d(0x21e)](0x2);}function formatLastUsed(_0x48cf51){const _0x3653c5=a17_0x15ff;if(!_0x48cf51)return'never';const _0x2c27a7=new Date(_0x48cf51),_0x589f09=new Date(),_0x3c7852=_0x2c27a7[_0x3653c5(0x1f7)]('en-CA'),_0x2bde96=_0x589f09[_0x3653c5(0x1f7)](_0x3653c5(0x21b));if(_0x3c7852===_0x2bde96)return _0x3653c5(0x1f1)+_0x2c27a7[_0x3653c5(0x208)]('en-US',{'hour':'2-digit','minute':_0x3653c5(0x21c)});const _0x3c508f=new Date(_0x3c7852),_0x5ce2c1=new Date(_0x2bde96),_0x4cd881=Math[_0x3653c5(0x1fe)]((_0x5ce2c1['getTime']()-_0x3c508f[_0x3653c5(0x229)]())/(0x18*0x3c*0x3c*0x3e8));if(_0x4cd881===0x1)return'yesterday';else return _0x4cd881>0x1&&_0x4cd881<0x7?_0x4cd881+_0x3653c5(0x222):_0x2c27a7[_0x3653c5(0x1f7)](_0x3653c5(0x225),{'month':_0x3653c5(0x1ff),'day':_0x3653c5(0x215)});}export class ClaudeUsageCommand extends BaseCommand{[a17_0x449df4(0x221)]=a17_0x449df4(0x1f0);[a17_0x449df4(0x1f8)]=a17_0x449df4(0x216);async[a17_0x449df4(0x223)](_0x503a0e){const _0x131213=a17_0x449df4,{options:_0x938416}=_0x503a0e,_0x64f213=_0x938416[_0x131213(0x1fc)]===_0x131213(0x210)||_0x938416[_0x131213(0x1fc)]===_0x131213(0x22f)||_0x938416[_0x131213(0x210)];try{const [_0x3e4431,_0x1f2987]=await Promise[_0x131213(0x20d)]([getAllProfileStats(),getUsageSummary()]);return _0x64f213?await this['outputStructured'](_0x3e4431,_0x1f2987,_0x938416):this[_0x131213(0x1f3)](_0x3e4431,_0x1f2987),0x0;}catch(_0x551a8f){const _0xb20e59=_0x551a8f instanceof Error?_0x551a8f[_0x131213(0x22a)]:'Unknown\x20error';return console[_0x131213(0x20e)](a17_0xd455e7['red'](_0x131213(0x21f)+_0xb20e59)),0x1;}}async[a17_0x449df4(0x205)](_0x4d6c65,_0x46bdaa,_0x152daa){const _0x4ff581=a17_0x449df4,_0x581f52={'summary':{'todayCredits':_0x46bdaa[_0x4ff581(0x20c)],'monthCredits':_0x46bdaa[_0x4ff581(0x21a)],'totalCredits':_0x46bdaa[_0x4ff581(0x218)],'profileCount':_0x46bdaa[_0x4ff581(0x1f6)]},'profiles':_0x4d6c65['map'](_0x18465d=>({'profile':_0x18465d[_0x4ff581(0x213)],'credits':_0x18465d[_0x4ff581(0x230)],'requests':_0x18465d[_0x4ff581(0x211)],'lastUsedAt':_0x18465d['lastUsedAt']}))};await handleSDKOutput([_0x581f52],_0x152daa);}['outputTable'](_0x164945,_0x23abc2){const _0x3ae308=a17_0x449df4;console[_0x3ae308(0x22b)](a17_0xd455e7['bold']('\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary')),console[_0x3ae308(0x22b)](a17_0xd455e7['dim']('─'[_0x3ae308(0x228)](0x32))),console[_0x3ae308(0x22b)](_0x3ae308(0x22c)+a17_0xd455e7[_0x3ae308(0x1f4)](formatCredits(_0x23abc2[_0x3ae308(0x20c)]))+_0x3ae308(0x22d)),console[_0x3ae308(0x22b)]('\x20\x20Month:\x20\x20\x20'+a17_0xd455e7[_0x3ae308(0x1f4)](formatCredits(_0x23abc2[_0x3ae308(0x21a)]))+_0x3ae308(0x22d)),console[_0x3ae308(0x22b)]('\x20\x20Total:\x20\x20\x20'+a17_0xd455e7['cyan'](formatCredits(_0x23abc2[_0x3ae308(0x218)]))+_0x3ae308(0x22d)),console[_0x3ae308(0x22b)]();if(_0x164945[_0x3ae308(0x1f2)]===0x0){console[_0x3ae308(0x22b)](a17_0xd455e7[_0x3ae308(0x224)](_0x3ae308(0x212))),console[_0x3ae308(0x22b)](a17_0xd455e7[_0x3ae308(0x224)](_0x3ae308(0x203)));return;}console[_0x3ae308(0x22b)](a17_0xd455e7[_0x3ae308(0x207)](_0x3ae308(0x1fa))),console['log'](a17_0xd455e7[_0x3ae308(0x224)]('─'[_0x3ae308(0x228)](0x3c)));const _0x3b3749=Math['max'](0xc,..._0x164945[_0x3ae308(0x200)](_0x2d2eb7=>_0x2d2eb7[_0x3ae308(0x213)]===_0x3ae308(0x201)?_0x3ae308(0x220)[_0x3ae308(0x1f2)]:_0x2d2eb7[_0x3ae308(0x213)]['length'])),_0x3cc7c0=0xa,_0x2907f5=0xa;console[_0x3ae308(0x22b)]('\x20\x20'+_0x3ae308(0x20a)[_0x3ae308(0x206)](_0x3b3749)+'\x20\x20'+_0x3ae308(0x226)['padStart'](_0x3cc7c0)+'\x20\x20'+_0x3ae308(0x214)['padStart'](_0x2907f5)+'\x20\x20'+'Last\x20Used');for(const _0x13df98 of _0x164945){const _0x57b6b4=_0x13df98[_0x3ae308(0x213)]===_0x3ae308(0x201)?_0x3ae308(0x220):_0x13df98[_0x3ae308(0x213)],_0x4fd115=_0x57b6b4[_0x3ae308(0x206)](_0x3b3749),_0x1f9013=_0x13df98['profile']==='default'?a17_0xd455e7['dim'](_0x4fd115):_0x4fd115;console[_0x3ae308(0x22b)]('\x20\x20'+_0x1f9013+'\x20\x20'+a17_0xd455e7['cyan'](formatCredits(_0x13df98['credits'])['padStart'](_0x3cc7c0))+'\x20\x20'+String(_0x13df98[_0x3ae308(0x211)])[_0x3ae308(0x1fd)](_0x2907f5)+'\x20\x20'+a17_0xd455e7['dim'](formatLastUsed(_0x13df98[_0x3ae308(0x21d)])));}console['log'](),console[_0x3ae308(0x22b)](a17_0xd455e7[_0x3ae308(0x224)]('Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.')),console[_0x3ae308(0x22b)]();}}
1
+ const a18_0x28aa77=a18_0x3df0;(function(_0x25bc7c,_0xaddfba){const _0x351510=a18_0x3df0,_0x1a7d21=_0x25bc7c();while(!![]){try{const _0x5e77e8=-parseInt(_0x351510(0x1a5))/0x1+-parseInt(_0x351510(0x188))/0x2*(-parseInt(_0x351510(0x197))/0x3)+-parseInt(_0x351510(0x18e))/0x4*(parseInt(_0x351510(0x1ae))/0x5)+-parseInt(_0x351510(0x199))/0x6+-parseInt(_0x351510(0x1af))/0x7+-parseInt(_0x351510(0x194))/0x8*(-parseInt(_0x351510(0x19f))/0x9)+parseInt(_0x351510(0x195))/0xa;if(_0x5e77e8===_0xaddfba)break;else _0x1a7d21['push'](_0x1a7d21['shift']());}catch(_0x37eee8){_0x1a7d21['push'](_0x1a7d21['shift']());}}}(a18_0x5614,0xef9d8));import a18_0x38457e from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function a18_0x5614(){const _0x5908cd=['en-CA','padEnd','(default)','outputTable','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','11138TfrhRg','red','jsonl','never','toLocaleDateString','bold','1065932qmsVmg','today\x20','\x20\x20Total:\x20\x20\x20','execute','map','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','43184ucAOLm','9267780KLiavp','\x20days\x20ago','849MgmdwI','totalCredits','800922gyBvzV','Unknown\x20error','credits','cyan','en-US','log','2961thkKgt','name','dim','json','toLocaleTimeString','usage','1257355QgFazI','default','padStart','lastUsedAt','Credits','round','length','profile','all','30yryACC','2152801HLIfRz','getTime','\x20\x20Today:\x20\x20\x20','short','message','2-digit','Last\x20Used','max','todayCredits','outputStructured','\x20credits','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','error','Usage\x20by\x20Profile','format','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','repeat','entryCount','monthCredits','profileCount'];a18_0x5614=function(){return _0x5908cd;};return a18_0x5614();}function formatCredits(_0x107c4e){return _0x107c4e['toFixed'](0x2);}function formatLastUsed(_0x576c81){const _0x31092e=a18_0x3df0;if(!_0x576c81)return _0x31092e(0x18b);const _0x1a0247=new Date(_0x576c81),_0x35113b=new Date(),_0x22627f=_0x1a0247[_0x31092e(0x18c)]('en-CA'),_0x35af44=_0x35113b['toLocaleDateString'](_0x31092e(0x183));if(_0x22627f===_0x35af44)return _0x31092e(0x18f)+_0x1a0247[_0x31092e(0x1a3)](_0x31092e(0x19d),{'hour':_0x31092e(0x1b4),'minute':'2-digit'});const _0x1b880a=new Date(_0x22627f),_0x2ad32f=new Date(_0x35af44),_0xd6c6ee=Math[_0x31092e(0x1aa)]((_0x2ad32f[_0x31092e(0x1b0)]()-_0x1b880a[_0x31092e(0x1b0)]())/(0x18*0x3c*0x3c*0x3e8));if(_0xd6c6ee===0x1)return'yesterday';else return _0xd6c6ee>0x1&&_0xd6c6ee<0x7?_0xd6c6ee+_0x31092e(0x196):_0x1a0247['toLocaleDateString'](_0x31092e(0x19d),{'month':_0x31092e(0x1b2),'day':'numeric'});}function a18_0x3df0(_0x422267,_0x41cdd2){_0x422267=_0x422267-0x177;const _0x5614d1=a18_0x5614();let _0x3df08e=_0x5614d1[_0x422267];return _0x3df08e;}export class ClaudeUsageCommand extends BaseCommand{[a18_0x28aa77(0x1a0)]=a18_0x28aa77(0x1a4);['description']='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a18_0x28aa77(0x191)](_0x2935f7){const _0x390276=a18_0x28aa77,{options:_0x32a5d8}=_0x2935f7,_0x5e456b=_0x32a5d8[_0x390276(0x17d)]===_0x390276(0x1a2)||_0x32a5d8[_0x390276(0x17d)]===_0x390276(0x18a)||_0x32a5d8[_0x390276(0x1a2)];try{const [_0x25bc36,_0x22c11f]=await Promise[_0x390276(0x1ad)]([getAllProfileStats(),getUsageSummary()]);return _0x5e456b?await this['outputStructured'](_0x25bc36,_0x22c11f,_0x32a5d8):this[_0x390276(0x186)](_0x25bc36,_0x22c11f),0x0;}catch(_0x3d38fc){const _0x476a9e=_0x3d38fc instanceof Error?_0x3d38fc[_0x390276(0x1b3)]:_0x390276(0x19a);return console[_0x390276(0x17b)](a18_0x38457e[_0x390276(0x189)]('Error:\x20'+_0x476a9e)),0x1;}}async[a18_0x28aa77(0x178)](_0x503b78,_0x367f56,_0x1fa131){const _0x17cc44=a18_0x28aa77,_0x1b704d={'summary':{'todayCredits':_0x367f56[_0x17cc44(0x177)],'monthCredits':_0x367f56[_0x17cc44(0x181)],'totalCredits':_0x367f56['totalCredits'],'profileCount':_0x367f56[_0x17cc44(0x182)]},'profiles':_0x503b78[_0x17cc44(0x192)](_0x36fc84=>({'profile':_0x36fc84[_0x17cc44(0x1ac)],'credits':_0x36fc84['credits'],'requests':_0x36fc84[_0x17cc44(0x180)],'lastUsedAt':_0x36fc84[_0x17cc44(0x1a8)]}))};await handleSDKOutput([_0x1b704d],_0x1fa131);}[a18_0x28aa77(0x186)](_0x3f4909,_0x24f524){const _0x276e13=a18_0x28aa77;console[_0x276e13(0x19e)](a18_0x38457e[_0x276e13(0x18d)](_0x276e13(0x187))),console[_0x276e13(0x19e)](a18_0x38457e[_0x276e13(0x1a1)]('─'[_0x276e13(0x17f)](0x32))),console[_0x276e13(0x19e)](_0x276e13(0x1b1)+a18_0x38457e['cyan'](formatCredits(_0x24f524[_0x276e13(0x177)]))+_0x276e13(0x179)),console[_0x276e13(0x19e)]('\x20\x20Month:\x20\x20\x20'+a18_0x38457e[_0x276e13(0x19c)](formatCredits(_0x24f524[_0x276e13(0x181)]))+'\x20credits'),console[_0x276e13(0x19e)](_0x276e13(0x190)+a18_0x38457e[_0x276e13(0x19c)](formatCredits(_0x24f524[_0x276e13(0x198)]))+_0x276e13(0x179)),console[_0x276e13(0x19e)]();if(_0x3f4909[_0x276e13(0x1ab)]===0x0){console[_0x276e13(0x19e)](a18_0x38457e[_0x276e13(0x1a1)](_0x276e13(0x17e))),console[_0x276e13(0x19e)](a18_0x38457e[_0x276e13(0x1a1)](_0x276e13(0x17a)));return;}console[_0x276e13(0x19e)](a18_0x38457e[_0x276e13(0x18d)](_0x276e13(0x17c))),console['log'](a18_0x38457e['dim']('─'[_0x276e13(0x17f)](0x3c)));const _0x225f77=Math[_0x276e13(0x1b6)](0xc,..._0x3f4909['map'](_0x89efdc=>_0x89efdc[_0x276e13(0x1ac)]==='default'?_0x276e13(0x185)[_0x276e13(0x1ab)]:_0x89efdc[_0x276e13(0x1ac)][_0x276e13(0x1ab)])),_0x103396=0xa,_0x4db185=0xa;console['log']('\x20\x20'+'Profile'[_0x276e13(0x184)](_0x225f77)+'\x20\x20'+_0x276e13(0x1a9)['padStart'](_0x103396)+'\x20\x20'+'Requests'[_0x276e13(0x1a7)](_0x4db185)+'\x20\x20'+_0x276e13(0x1b5));for(const _0x359b2d of _0x3f4909){const _0x432e54=_0x359b2d[_0x276e13(0x1ac)]===_0x276e13(0x1a6)?_0x276e13(0x185):_0x359b2d['profile'],_0x481187=_0x432e54[_0x276e13(0x184)](_0x225f77),_0x5f1bf4=_0x359b2d[_0x276e13(0x1ac)]===_0x276e13(0x1a6)?a18_0x38457e[_0x276e13(0x1a1)](_0x481187):_0x481187;console['log']('\x20\x20'+_0x5f1bf4+'\x20\x20'+a18_0x38457e[_0x276e13(0x19c)](formatCredits(_0x359b2d[_0x276e13(0x19b)])[_0x276e13(0x1a7)](_0x103396))+'\x20\x20'+String(_0x359b2d['entryCount'])[_0x276e13(0x1a7)](_0x4db185)+'\x20\x20'+a18_0x38457e[_0x276e13(0x1a1)](formatLastUsed(_0x359b2d['lastUsedAt'])));}console['log'](),console[_0x276e13(0x19e)](a18_0x38457e['dim'](_0x276e13(0x193))),console['log']();}}
@@ -1 +1 @@
1
- const a18_0x1ed980=a18_0x5e19;(function(_0x148162,_0x515491){const _0x416ef4=a18_0x5e19,_0x56a350=_0x148162();while(!![]){try{const _0x1c264d=parseInt(_0x416ef4(0x16e))/0x1+-parseInt(_0x416ef4(0x178))/0x2*(parseInt(_0x416ef4(0x172))/0x3)+-parseInt(_0x416ef4(0x17e))/0x4+-parseInt(_0x416ef4(0x179))/0x5+parseInt(_0x416ef4(0x164))/0x6*(-parseInt(_0x416ef4(0x17d))/0x7)+parseInt(_0x416ef4(0x162))/0x8+parseInt(_0x416ef4(0x17f))/0x9*(parseInt(_0x416ef4(0x166))/0xa);if(_0x1c264d===_0x515491)break;else _0x56a350['push'](_0x56a350['shift']());}catch(_0x33189d){_0x56a350['push'](_0x56a350['shift']());}}}(a18_0x3215,0xe2dd6));function a18_0x3215(){const _0x4855c2=['tdx','\x20\x20tdx\x20auth','get','message','limit','name','status','To\x20check\x20your\x20current\x20auth\x20status:','set','.\x20Must\x20be\x20a\x20number.','Invalid\x20limit\x20value:\x20','error','from','1056336dhkarQ','profile','6BRWaxo','detail','30642470DVhfcR','helpText','has','yellow','run','getAll','logger','Authentication\x20failed','1093723MCBHVL','options','validateGlobalOptions','Reason:\x20','2506593MZrBTr','category','Error:\x20','Command\x20\x27','\x27\x20is\x20already\x20registered','red','4IIecST','2096535BzyBaD','\x20--profile\x20','\x0aStack\x20trace:\x0a','\x0aTo\x20set\x20up\x20authentication:','3213070otmrkJ','3245580EPyJBf','9iJqcxM','debug','register','validate','stack','commands','test'];a18_0x3215=function(){return _0x4855c2;};return a18_0x3215();}import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a18_0x3c986a from'chalk';export function printAuthError(_0x249b65,_0x18b60e=![],_0x4715e2){const _0xfdaf36=a18_0x5e19,_0x29775f=_0x249b65['problemDetails']?.[_0xfdaf36(0x165)]||_0x249b65[_0xfdaf36(0x158)];console[_0xfdaf36(0x160)](a18_0x3c986a['red'](_0xfdaf36(0x16d))),console[_0xfdaf36(0x160)](a18_0x3c986a[_0xfdaf36(0x177)](_0xfdaf36(0x171)+_0x29775f));if(_0x18b60e){const _0x33ebe2=_0x4715e2?_0xfdaf36(0x17a)+_0x4715e2:'';console[_0xfdaf36(0x160)](_0xfdaf36(0x17c)),console['error']('\x20\x20tdx\x20auth\x20setup'+_0x33ebe2+'\x0a'),console[_0xfdaf36(0x160)](_0xfdaf36(0x15c)),console[_0xfdaf36(0x160)](_0xfdaf36(0x156)+_0x33ebe2);}}export class BaseCommand{[a18_0x1ed980(0x170)](_0x5ee4c8){const _0x4718f6=a18_0x1ed980,{options:_0x4775f7}=_0x5ee4c8,_0x181576=_0x4775f7[_0x4718f6(0x159)];if(_0x181576!==undefined){const _0x4f1f03=typeof _0x181576==='number'?_0x181576:parseInt(_0x181576,0xa);if(isNaN(_0x4f1f03))return _0x4718f6(0x15f)+_0x181576+_0x4718f6(0x15e);const _0x290a74=validateLimitOption(_0x4f1f03);if(!_0x290a74['isValid'])return _0x290a74[_0x4718f6(0x160)];_0x5ee4c8[_0x4718f6(0x16f)][_0x4718f6(0x159)]=_0x290a74['value'];}return undefined;}[a18_0x1ed980(0x182)](_0xbb689b){return undefined;}async[a18_0x1ed980(0x16a)](_0x232f6a){const _0x21a836=a18_0x1ed980;try{const _0x2313ef=this[_0x21a836(0x170)](_0x232f6a);if(_0x2313ef)return console[_0x21a836(0x160)](_0x21a836(0x174)+_0x2313ef),0x1;const _0x5685ec=this[_0x21a836(0x182)](_0x232f6a);if(_0x5685ec){const _0x44c5cd=/^\s*(Usage|Note|Warning|Error):/i[_0x21a836(0x185)](_0x5685ec);return _0x44c5cd?console['error'](_0x5685ec):console[_0x21a836(0x160)](_0x21a836(0x174)+_0x5685ec),0x1;}const _0x1485e3=await this['execute'](_0x232f6a);return _0x1485e3??0x0;}catch(_0x23051f){if(_0x23051f instanceof Error){if(_0x23051f instanceof HTTPClientError&&_0x23051f[_0x21a836(0x15b)]===0x191){const _0x32d2eb=_0x232f6a[_0x21a836(0x16f)][_0x21a836(0x163)];return printAuthError(_0x23051f,!![],_0x32d2eb),_0x23051f[_0x21a836(0x183)]&&_0x232f6a[_0x21a836(0x186)]&&(_0x232f6a[_0x21a836(0x186)][_0x21a836(0x16c)]['debug']('Authentication\x20error\x20stack\x20trace:'),_0x232f6a['tdx'][_0x21a836(0x16c)][_0x21a836(0x180)](_0x23051f[_0x21a836(0x183)])),0x1;}console['error'](a18_0x3c986a[_0x21a836(0x177)](_0x21a836(0x174)+_0x23051f[_0x21a836(0x158)]));_0x23051f instanceof SDKError&&_0x23051f[_0x21a836(0x167)]&&console[_0x21a836(0x160)](a18_0x3c986a[_0x21a836(0x169)](_0x23051f[_0x21a836(0x167)]));const _0xe3e9c8=_0x23051f instanceof SDKError&&_0x23051f[_0x21a836(0x173)]===ErrorCategory['USER_ERROR'];_0x23051f[_0x21a836(0x183)]&&!_0xe3e9c8&&console[_0x21a836(0x160)](_0x21a836(0x17b)+_0x23051f[_0x21a836(0x183)]);}else console[_0x21a836(0x160)]('Error:\x20'+String(_0x23051f));return 0x1;}}}function a18_0x5e19(_0x145896,_0x18392b){_0x145896=_0x145896-0x156;const _0x3215e2=a18_0x3215();let _0x5e195d=_0x3215e2[_0x145896];return _0x5e195d;}export class CommandRegistry{[a18_0x1ed980(0x184)]=new Map();[a18_0x1ed980(0x181)](_0x255143){const _0x87a7ba=a18_0x1ed980;if(this[_0x87a7ba(0x184)]['has'](_0x255143[_0x87a7ba(0x15a)]))throw new Error(_0x87a7ba(0x175)+_0x255143[_0x87a7ba(0x15a)]+_0x87a7ba(0x176));this[_0x87a7ba(0x184)][_0x87a7ba(0x15d)](_0x255143[_0x87a7ba(0x15a)],_0x255143);}[a18_0x1ed980(0x157)](_0x1ebe8a){const _0xe7c87c=a18_0x1ed980;return this[_0xe7c87c(0x184)]['get'](_0x1ebe8a);}[a18_0x1ed980(0x16b)](){const _0x3528aa=a18_0x1ed980;return Array[_0x3528aa(0x161)](this[_0x3528aa(0x184)]['values']());}[a18_0x1ed980(0x168)](_0x104bc4){const _0x44ee0b=a18_0x1ed980;return this[_0x44ee0b(0x184)]['has'](_0x104bc4);}}export const registry=new CommandRegistry();
1
+ const a19_0x1fecf2=a19_0x5e1c;(function(_0x314eea,_0x261e21){const _0x5c5b4c=a19_0x5e1c,_0x12ef63=_0x314eea();while(!![]){try{const _0x4967cc=parseInt(_0x5c5b4c(0x95))/0x1+-parseInt(_0x5c5b4c(0xa6))/0x2+-parseInt(_0x5c5b4c(0xae))/0x3+-parseInt(_0x5c5b4c(0x9c))/0x4*(parseInt(_0x5c5b4c(0xb1))/0x5)+parseInt(_0x5c5b4c(0x9d))/0x6+-parseInt(_0x5c5b4c(0x92))/0x7+parseInt(_0x5c5b4c(0xb0))/0x8*(parseInt(_0x5c5b4c(0x9e))/0x9);if(_0x4967cc===_0x261e21)break;else _0x12ef63['push'](_0x12ef63['shift']());}catch(_0x1df2ed){_0x12ef63['push'](_0x12ef63['shift']());}}}(a19_0x560c,0x27b8b));function a19_0x560c(){const _0x2e8f13=['yellow','name','limit','To\x20check\x20your\x20current\x20auth\x20status:','execute','220284AiqsrE','options','tdx','has','message','red','test','register','278619sHrelD','error','11456NDHsWZ','15685BxjqCN','value','\x20\x20tdx\x20auth','from','set','\x27\x20is\x20already\x20registered','\x20\x20tdx\x20auth\x20setup','run','profile','isValid','getAll','stack','commands','Error:\x20','debug','11627TRBrqB','Authentication\x20error\x20stack\x20trace:','problemDetails','7267cfvruk','logger','get','USER_ERROR','validateGlobalOptions','category','\x0aStack\x20trace:\x0a','244JNVJkc','310182VTnljE','3141ibpgTL','\x0aTo\x20set\x20up\x20authentication:','detail'];a19_0x560c=function(){return _0x2e8f13;};return a19_0x560c();}function a19_0x5e1c(_0x505182,_0x4bb9d9){_0x505182=_0x505182-0x90;const _0x560c64=a19_0x560c();let _0x5e1c88=_0x560c64[_0x505182];return _0x5e1c88;}import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a19_0x2a81ef from'chalk';export function printAuthError(_0x514ed8,_0x1a653d=![],_0x16c60f){const _0x222267=a19_0x5e1c,_0x36e3a9=_0x514ed8[_0x222267(0x94)]?.[_0x222267(0xa0)]||_0x514ed8[_0x222267(0xaa)];console[_0x222267(0xaf)](a19_0x2a81ef[_0x222267(0xab)]('Authentication\x20failed')),console[_0x222267(0xaf)](a19_0x2a81ef[_0x222267(0xab)]('Reason:\x20'+_0x36e3a9));if(_0x1a653d){const _0x3f68ed=_0x16c60f?'\x20--profile\x20'+_0x16c60f:'';console[_0x222267(0xaf)](_0x222267(0x9f)),console[_0x222267(0xaf)](_0x222267(0xb7)+_0x3f68ed+'\x0a'),console[_0x222267(0xaf)](_0x222267(0xa4)),console['error'](_0x222267(0xb3)+_0x3f68ed);}}export class BaseCommand{[a19_0x1fecf2(0x99)](_0x40a38a){const _0x3cf9e8=a19_0x1fecf2,{options:_0x539395}=_0x40a38a,_0x2d5a6c=_0x539395['limit'];if(_0x2d5a6c!==undefined){const _0x66893c=typeof _0x2d5a6c==='number'?_0x2d5a6c:parseInt(_0x2d5a6c,0xa);if(isNaN(_0x66893c))return'Invalid\x20limit\x20value:\x20'+_0x2d5a6c+'.\x20Must\x20be\x20a\x20number.';const _0x1f0583=validateLimitOption(_0x66893c);if(!_0x1f0583[_0x3cf9e8(0xba)])return _0x1f0583[_0x3cf9e8(0xaf)];_0x40a38a[_0x3cf9e8(0xa7)][_0x3cf9e8(0xa3)]=_0x1f0583[_0x3cf9e8(0xb2)];}return undefined;}['validate'](_0x26ac97){return undefined;}async[a19_0x1fecf2(0xb8)](_0x43a393){const _0x1db9ab=a19_0x1fecf2;try{const _0xafeeaa=this['validateGlobalOptions'](_0x43a393);if(_0xafeeaa)return console[_0x1db9ab(0xaf)](_0x1db9ab(0x90)+_0xafeeaa),0x1;const _0x5f273b=this['validate'](_0x43a393);if(_0x5f273b){const _0x258a0c=/^\s*(Usage|Note|Warning|Error):/i[_0x1db9ab(0xac)](_0x5f273b);return _0x258a0c?console[_0x1db9ab(0xaf)](_0x5f273b):console[_0x1db9ab(0xaf)](_0x1db9ab(0x90)+_0x5f273b),0x1;}const _0x4d6d0f=await this[_0x1db9ab(0xa5)](_0x43a393);return _0x4d6d0f??0x0;}catch(_0x439d1c){if(_0x439d1c instanceof Error){if(_0x439d1c instanceof HTTPClientError&&_0x439d1c['status']===0x191){const _0x4797b5=_0x43a393[_0x1db9ab(0xa7)][_0x1db9ab(0xb9)];return printAuthError(_0x439d1c,!![],_0x4797b5),_0x439d1c[_0x1db9ab(0xbc)]&&_0x43a393[_0x1db9ab(0xa8)]&&(_0x43a393['tdx'][_0x1db9ab(0x96)][_0x1db9ab(0x91)](_0x1db9ab(0x93)),_0x43a393[_0x1db9ab(0xa8)][_0x1db9ab(0x96)][_0x1db9ab(0x91)](_0x439d1c[_0x1db9ab(0xbc)])),0x1;}console[_0x1db9ab(0xaf)](a19_0x2a81ef[_0x1db9ab(0xab)](_0x1db9ab(0x90)+_0x439d1c[_0x1db9ab(0xaa)]));_0x439d1c instanceof SDKError&&_0x439d1c['helpText']&&console[_0x1db9ab(0xaf)](a19_0x2a81ef[_0x1db9ab(0xa1)](_0x439d1c['helpText']));const _0x155b14=_0x439d1c instanceof SDKError&&_0x439d1c[_0x1db9ab(0x9a)]===ErrorCategory[_0x1db9ab(0x98)];_0x439d1c[_0x1db9ab(0xbc)]&&!_0x155b14&&console[_0x1db9ab(0xaf)](_0x1db9ab(0x9b)+_0x439d1c[_0x1db9ab(0xbc)]);}else console[_0x1db9ab(0xaf)](_0x1db9ab(0x90)+String(_0x439d1c));return 0x1;}}}export class CommandRegistry{['commands']=new Map();[a19_0x1fecf2(0xad)](_0x591db3){const _0x3d50d6=a19_0x1fecf2;if(this[_0x3d50d6(0xbd)][_0x3d50d6(0xa9)](_0x591db3[_0x3d50d6(0xa2)]))throw new Error('Command\x20\x27'+_0x591db3['name']+_0x3d50d6(0xb6));this[_0x3d50d6(0xbd)][_0x3d50d6(0xb5)](_0x591db3[_0x3d50d6(0xa2)],_0x591db3);}['get'](_0x16e988){const _0xd9281b=a19_0x1fecf2;return this[_0xd9281b(0xbd)][_0xd9281b(0x97)](_0x16e988);}[a19_0x1fecf2(0xbb)](){const _0x3ae2bb=a19_0x1fecf2;return Array[_0x3ae2bb(0xb4)](this['commands']['values']());}['has'](_0x4b9226){const _0x15bc66=a19_0x1fecf2;return this[_0x15bc66(0xbd)][_0x15bc66(0xa9)](_0x4b9226);}}export const registry=new CommandRegistry();
@@ -1 +1 @@
1
- const a19_0x3fde61=a19_0x53ff;(function(_0x560849,_0x1e76c7){const _0x24873e=a19_0x53ff,_0x19415e=_0x560849();while(!![]){try{const _0x4fdfc2=-parseInt(_0x24873e(0x187))/0x1*(parseInt(_0x24873e(0x1a7))/0x2)+parseInt(_0x24873e(0x19f))/0x3+parseInt(_0x24873e(0x19c))/0x4*(parseInt(_0x24873e(0x1a1))/0x5)+-parseInt(_0x24873e(0x19d))/0x6*(parseInt(_0x24873e(0x1aa))/0x7)+parseInt(_0x24873e(0x198))/0x8+-parseInt(_0x24873e(0x192))/0x9+parseInt(_0x24873e(0x1a6))/0xa*(parseInt(_0x24873e(0x190))/0xb);if(_0x4fdfc2===_0x1e76c7)break;else _0x19415e['push'](_0x19415e['shift']());}catch(_0x48af97){_0x19415e['push'](_0x19415e['shift']());}}}(a19_0x54f6,0x77b44));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../utils/command-output.js';function a19_0x53ff(_0x41c219,_0x280032){_0x41c219=_0x41c219-0x184;const _0x54f62a=a19_0x54f6();let _0x53ffa8=_0x54f62a[_0x41c219];return _0x53ffa8;}import{withSpinner}from'../utils/spinner.js';function a19_0x54f6(){const _0xc0d0af=['33BFxkQi','Site:\x20','573291nvpUyl','verbose','limit','cyan','Listing\x20connections...','execute','2223960qhTTuL','Show\x20connection\x20details','owner','name','4mIiFfT','372nJWWxO','push','2422224ancFiS','dim','645965eaZHCh','map','site','slice','connection:show','1591860hEkDks','6Qnkfbh','data','Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22','83384JncHVl','connection','type','output','\x20connection','validate','resolve','✔\x20Found\x20connection:\x20','133201TsEOPn','✔\x20Found\x20','List\x20all\x20result\x20output\x20connections','description','length','connection:list','error','list','join'];a19_0x54f6=function(){return _0xc0d0af;};return a19_0x54f6();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import a19_0x3a7d41 from'chalk';export class ConnectionListCommand extends BaseCommand{['name']=a19_0x3fde61(0x18c);['description']=a19_0x3fde61(0x189);async['execute'](_0xa42820){const _0x25db77=a19_0x3fde61,{options:_0x2e8326,tdx:_0x5a91cb}=_0xa42820;_0x2e8326[_0x25db77(0x193)]&&console[_0x25db77(0x18d)](_0x25db77(0x191)+_0x2e8326[_0x25db77(0x1a3)]);const _0x519f96=resolveLimit(_0x2e8326[_0x25db77(0x194)],DEFAULT_LISTING_LIMIT),_0x4ae3a3=await withSpinner(_0x25db77(0x196),()=>_0x5a91cb[_0x25db77(0x1ab)][_0x25db77(0x18e)](),{'verbose':_0x2e8326[_0x25db77(0x193)]}),_0x2d05bb=_0x4ae3a3[_0x25db77(0x1a8)];console[_0x25db77(0x18d)](_0x25db77(0x188)+_0x2d05bb[_0x25db77(0x18b)]+_0x25db77(0x1ae)+(_0x2d05bb[_0x25db77(0x18b)]!==0x1?'s':''));if(isStructuredFormat(_0x2e8326)){const _0x167686=_0x2d05bb[_0x25db77(0x1a4)](0x0,_0x519f96);await handleSDKOutput(_0x167686,{..._0x2e8326,'limit':_0x519f96});}else{const _0x4bddcb=_0x2d05bb[_0x25db77(0x18b)]>0x0?Math['max'](..._0x2d05bb[_0x25db77(0x1a2)](_0x2b3f35=>_0x2b3f35[_0x25db77(0x1ac)][_0x25db77(0x18b)])):0x0,_0x1f4d53=[];for(const _0x9fdecc of _0x2d05bb){const _0xdb851a=a19_0x3a7d41[_0x25db77(0x195)](_0x9fdecc['type']['padStart'](_0x4bddcb)),_0x5dcd8f=_0x9fdecc[_0x25db77(0x19a)]?.[_0x25db77(0x19b)]?'\x20-\x20'+a19_0x3a7d41[_0x25db77(0x1a0)](_0x9fdecc['owner'][_0x25db77(0x19b)]):'';_0x1f4d53[_0x25db77(0x19e)](_0xdb851a+'\x20\x20'+_0x9fdecc[_0x25db77(0x19b)]+_0x5dcd8f);}await writeOutput(_0x1f4d53[_0x25db77(0x18f)]('\x0a'),_0x2e8326[_0x25db77(0x1ad)],'table');}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{[a19_0x3fde61(0x19b)]=a19_0x3fde61(0x1a5);[a19_0x3fde61(0x18a)]=a19_0x3fde61(0x199);[a19_0x3fde61(0x184)](_0x410ca2){const _0x1c93c6=a19_0x3fde61,{args:_0x3a48c6}=_0x410ca2;if(!_0x3a48c6[0x0])return _0x1c93c6(0x1a9);return undefined;}async[a19_0x3fde61(0x197)](_0xa89040){const _0x7415f=a19_0x3fde61,{options:_0x36f50f,args:_0x556914,tdx:_0x416036}=_0xa89040,_0x1d5202=_0x556914[0x0];_0x36f50f[_0x7415f(0x193)]&&(console[_0x7415f(0x18d)](_0x7415f(0x191)+_0x36f50f[_0x7415f(0x1a3)]),console[_0x7415f(0x18d)]('Looking\x20up\x20connection:\x20'+_0x1d5202));const _0x4a0cf9=await withSpinner('Fetching\x20connection\x20\x27'+_0x1d5202+'\x27...',()=>_0x416036[_0x7415f(0x1ab)][_0x7415f(0x185)](_0x1d5202),{'verbose':_0x36f50f[_0x7415f(0x193)]}),_0x2367a6=_0x4a0cf9[_0x7415f(0x1a8)];return console[_0x7415f(0x18d)](_0x7415f(0x186)+_0x2367a6[_0x7415f(0x19b)]),await handleSingleObjectOutput(_0x2367a6,_0x36f50f),0x0;}}
1
+ const a20_0x15fb58=a20_0x2260;(function(_0x41c4c3,_0x5bcf98){const _0x3cfb04=a20_0x2260,_0x504037=_0x41c4c3();while(!![]){try{const _0x435e86=parseInt(_0x3cfb04(0x133))/0x1+parseInt(_0x3cfb04(0x13c))/0x2*(parseInt(_0x3cfb04(0x12d))/0x3)+-parseInt(_0x3cfb04(0x12e))/0x4+-parseInt(_0x3cfb04(0x139))/0x5*(parseInt(_0x3cfb04(0x143))/0x6)+-parseInt(_0x3cfb04(0x131))/0x7+-parseInt(_0x3cfb04(0x11e))/0x8+parseInt(_0x3cfb04(0x120))/0x9;if(_0x435e86===_0x5bcf98)break;else _0x504037['push'](_0x504037['shift']());}catch(_0x391f8c){_0x504037['push'](_0x504037['shift']());}}}(a20_0x336e,0x4df9c));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import a20_0x441fbc from'chalk';export class ConnectionListCommand extends BaseCommand{['name']=a20_0x15fb58(0x132);[a20_0x15fb58(0x127)]=a20_0x15fb58(0x11d);async[a20_0x15fb58(0x142)](_0x412ebd){const _0x332335=a20_0x15fb58,{options:_0xe8fe27,tdx:_0x12101b}=_0x412ebd;_0xe8fe27[_0x332335(0x144)]&&console[_0x332335(0x145)](_0x332335(0x13b)+_0xe8fe27[_0x332335(0x11f)]);const _0x4f9c65=resolveLimit(_0xe8fe27[_0x332335(0x128)],DEFAULT_LISTING_LIMIT),_0x27cb1a=await withSpinner(_0x332335(0x141),()=>_0x12101b[_0x332335(0x126)][_0x332335(0x135)](),{'verbose':_0xe8fe27[_0x332335(0x144)]}),_0x6a876=_0x27cb1a[_0x332335(0x13d)];console[_0x332335(0x145)]('✔\x20Found\x20'+_0x6a876[_0x332335(0x12a)]+_0x332335(0x13e)+(_0x6a876[_0x332335(0x12a)]!==0x1?'s':''));if(isStructuredFormat(_0xe8fe27)){const _0x14e787=_0x6a876[_0x332335(0x136)](0x0,_0x4f9c65);await handleSDKOutput(_0x14e787,{..._0xe8fe27,'limit':_0x4f9c65});}else{const _0x5de560=_0x6a876['length']>0x0?Math['max'](..._0x6a876['map'](_0x65c93c=>_0x65c93c[_0x332335(0x140)][_0x332335(0x12a)])):0x0,_0xed4047=[];for(const _0x3dc7ac of _0x6a876){const _0x463778=a20_0x441fbc[_0x332335(0x137)](_0x3dc7ac[_0x332335(0x140)][_0x332335(0x13a)](_0x5de560)),_0x19b8cb=_0x3dc7ac[_0x332335(0x12b)]?.[_0x332335(0x124)]?_0x332335(0x148)+a20_0x441fbc[_0x332335(0x129)](_0x3dc7ac[_0x332335(0x12b)]['name']):'';_0xed4047[_0x332335(0x122)](_0x463778+'\x20\x20'+_0x3dc7ac['name']+_0x19b8cb);}await writeOutput(_0xed4047[_0x332335(0x138)]('\x0a'),_0xe8fe27[_0x332335(0x121)],_0x332335(0x134));}return 0x0;}}function a20_0x336e(){const _0x6b5537=['Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22','connection','description','limit','dim','length','owner','connection:show','3ejoYAG','671972sgNAIQ','Looking\x20up\x20connection:\x20','Fetching\x20connection\x20\x27','21595MYIahd','connection:list','203110kLQdLk','table','list','slice','cyan','join','1142905dfQZLZ','padStart','Site:\x20','322378eYAsee','data','\x20connection','resolve','type','Listing\x20connections...','execute','6LfHZvf','verbose','error','Show\x20connection\x20details','✔\x20Found\x20connection:\x20','\x20-\x20','List\x20all\x20result\x20output\x20connections','4890952SAiCjH','site','8695053jweDDh','output','push','\x27...','name'];a20_0x336e=function(){return _0x6b5537;};return a20_0x336e();}function a20_0x2260(_0x24bce4,_0x324d04){_0x24bce4=_0x24bce4-0x11d;const _0x336ea8=a20_0x336e();let _0x2260da=_0x336ea8[_0x24bce4];return _0x2260da;}export class ConnectionShowCommand extends BaseCommand{[a20_0x15fb58(0x124)]=a20_0x15fb58(0x12c);[a20_0x15fb58(0x127)]=a20_0x15fb58(0x146);['validate'](_0x52b49f){const _0x23fe07=a20_0x15fb58,{args:_0x1e169b}=_0x52b49f;if(!_0x1e169b[0x0])return _0x23fe07(0x125);return undefined;}async[a20_0x15fb58(0x142)](_0x5b33c1){const _0x249635=a20_0x15fb58,{options:_0x3e1fa8,args:_0x2513f2,tdx:_0x28fbcf}=_0x5b33c1,_0x5c8481=_0x2513f2[0x0];_0x3e1fa8['verbose']&&(console[_0x249635(0x145)](_0x249635(0x13b)+_0x3e1fa8[_0x249635(0x11f)]),console['error'](_0x249635(0x12f)+_0x5c8481));const _0x3f26a7=await withSpinner(_0x249635(0x130)+_0x5c8481+_0x249635(0x123),()=>_0x28fbcf[_0x249635(0x126)][_0x249635(0x13f)](_0x5c8481),{'verbose':_0x3e1fa8[_0x249635(0x144)]}),_0x54fa2b=_0x3f26a7['data'];return console['error'](_0x249635(0x147)+_0x54fa2b[_0x249635(0x124)]),await handleSingleObjectOutput(_0x54fa2b,_0x3e1fa8),0x0;}}
@@ -1 +1 @@
1
- const a20_0x20f340=a20_0x551d;(function(_0x53c94e,_0x2a42e6){const _0x9ed955=a20_0x551d,_0x2e6d34=_0x53c94e();while(!![]){try{const _0x1a46de=parseInt(_0x9ed955(0xd4))/0x1+-parseInt(_0x9ed955(0xe7))/0x2+parseInt(_0x9ed955(0xe4))/0x3+-parseInt(_0x9ed955(0xd5))/0x4*(-parseInt(_0x9ed955(0xd6))/0x5)+-parseInt(_0x9ed955(0xde))/0x6+parseInt(_0x9ed955(0xe3))/0x7+-parseInt(_0x9ed955(0xd2))/0x8*(parseInt(_0x9ed955(0xe9))/0x9);if(_0x1a46de===_0x2a42e6)break;else _0x2e6d34['push'](_0x2e6d34['shift']());}catch(_0x512b5e){_0x2e6d34['push'](_0x2e6d34['shift']());}}}(a20_0x54e2,0x777cc));function a20_0x54e2(){const _0x5883d9=['log','toString','2995209NreGjV','1703022ryBJgs','Session\x20context\x20cleared\x20(session:\x20','Error:\x20','935830ouDTDk','description','89766YrShzE','Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.','\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a','displayWithSources','248wKWcWh','yellow','93887KolJIC','37100HpuhBN','155nFpRtG','Show\x20current\x20resolved\x20context','warn','session','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','display','context','debug','662664DHdbsK','name','message'];a20_0x54e2=function(){return _0x5883d9;};return a20_0x54e2();}import{BaseCommand}from'./command.js';function a20_0x551d(_0x573aa6,_0x9645d1){_0x573aa6=_0x573aa6-0xd1;const _0x54e2a6=a20_0x54e2();let _0x551dfc=_0x54e2a6[_0x573aa6];return _0x551dfc;}import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a20_0x2c9cf5 from'chalk';export class ContextCommand extends BaseCommand{[a20_0x20f340(0xdf)]=a20_0x20f340(0xdc);[a20_0x20f340(0xe8)]=a20_0x20f340(0xd7);async['execute'](_0x264787){const _0x5cce47=a20_0x20f340,{options:_0x21e769}=_0x264787,_0x48d41f=_0x21e769[_0x5cce47(0xdd)],_0x51e704=_0x21e769['clear'];console['warn'](a20_0x2c9cf5[_0x5cce47(0xd3)](_0x5cce47(0xea))),console[_0x5cce47(0xd8)](a20_0x2c9cf5[_0x5cce47(0xd3)](_0x5cce47(0xda))),console['warn'](a20_0x2c9cf5[_0x5cce47(0xd3)](_0x5cce47(0xeb))),cleanExpiredSessions();try{if(_0x51e704){clearSessionContext(_0x21e769[_0x5cce47(0xd9)]);const _0xd1fdc4=_0x21e769[_0x5cce47(0xd9)]||getCurrentSessionPID()[_0x5cce47(0xe2)]();return console[_0x5cce47(0xe1)](_0x5cce47(0xe5)+_0xd1fdc4+')'),0x0;}const _0xe83608=new GlobalContext(_0x21e769);return _0x48d41f?_0xe83608[_0x5cce47(0xd1)]():_0xe83608[_0x5cce47(0xdb)](),0x0;}catch(_0x2759d0){return _0x2759d0 instanceof Error&&console['error'](_0x5cce47(0xe6)+_0x2759d0[_0x5cce47(0xe0)]),0x1;}}}
1
+ function a21_0x83bd(_0x5a495f,_0x6b9365){_0x5a495f=_0x5a495f-0x1f3;const _0x1f3a43=a21_0x1f3a();let _0x83bd59=_0x1f3a43[_0x5a495f];return _0x83bd59;}const a21_0x287d95=a21_0x83bd;(function(_0x4314b6,_0x140cea){const _0x17b3e8=a21_0x83bd,_0x6e1103=_0x4314b6();while(!![]){try{const _0x192c01=parseInt(_0x17b3e8(0x200))/0x1*(parseInt(_0x17b3e8(0x206))/0x2)+parseInt(_0x17b3e8(0x1ff))/0x3*(parseInt(_0x17b3e8(0x20c))/0x4)+-parseInt(_0x17b3e8(0x1fc))/0x5*(parseInt(_0x17b3e8(0x203))/0x6)+-parseInt(_0x17b3e8(0x1f7))/0x7*(parseInt(_0x17b3e8(0x20a))/0x8)+-parseInt(_0x17b3e8(0x1f4))/0x9+parseInt(_0x17b3e8(0x20b))/0xa*(parseInt(_0x17b3e8(0x207))/0xb)+-parseInt(_0x17b3e8(0x1f9))/0xc*(parseInt(_0x17b3e8(0x202))/0xd);if(_0x192c01===_0x140cea)break;else _0x6e1103['push'](_0x6e1103['shift']());}catch(_0x553040){_0x6e1103['push'](_0x6e1103['shift']());}}}(a21_0x1f3a,0x725af));function a21_0x1f3a(){const _0x7aa57e=['12NVLqtd','Show\x20current\x20resolved\x20context','message','145FObAnp','Error:\x20','yellow','2637483ucIxsK','33rUnDkT','name','14262131GNuLQg','3774PzDMzW','toString','debug','46266piBtXv','3498022gAtHoS','Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.','displayWithSources','8Elpwln','10ecEiNA','4tpcQrf','error','display','clear','log','1250100EjYXic','session','execute','1665475KnCbpr','warn'];a21_0x1f3a=function(){return _0x7aa57e;};return a21_0x1f3a();}import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a21_0x3ba020 from'chalk';export class ContextCommand extends BaseCommand{[a21_0x287d95(0x201)]='context';['description']=a21_0x287d95(0x1fa);async[a21_0x287d95(0x1f6)](_0x4e0a1a){const _0x10f157=a21_0x287d95,{options:_0x303769}=_0x4e0a1a,_0x4a24bb=_0x303769[_0x10f157(0x205)],_0x5777da=_0x303769[_0x10f157(0x20f)];console[_0x10f157(0x1f8)](a21_0x3ba020[_0x10f157(0x1fe)](_0x10f157(0x208))),console['warn'](a21_0x3ba020[_0x10f157(0x1fe)]('\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context')),console[_0x10f157(0x1f8)](a21_0x3ba020['yellow']('\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a')),cleanExpiredSessions();try{if(_0x5777da){clearSessionContext(_0x303769[_0x10f157(0x1f5)]);const _0x15c943=_0x303769[_0x10f157(0x1f5)]||getCurrentSessionPID()[_0x10f157(0x204)]();return console[_0x10f157(0x1f3)]('Session\x20context\x20cleared\x20(session:\x20'+_0x15c943+')'),0x0;}const _0x2a6c19=new GlobalContext(_0x303769);return _0x4a24bb?_0x2a6c19[_0x10f157(0x209)]():_0x2a6c19[_0x10f157(0x20e)](),0x0;}catch(_0x23972f){return _0x23972f instanceof Error&&console[_0x10f157(0x20d)](_0x10f157(0x1fd)+_0x23972f[_0x10f157(0x1fb)]),0x1;}}}
@@ -1 +1 @@
1
- const a21_0x4dd486=a21_0x35de;(function(_0x45b27f,_0x1cca92){const _0x41eac2=a21_0x35de,_0x3de9c0=_0x45b27f();while(!![]){try{const _0x4b2dd6=-parseInt(_0x41eac2(0x1ff))/0x1+parseInt(_0x41eac2(0x1e8))/0x2+parseInt(_0x41eac2(0x200))/0x3*(-parseInt(_0x41eac2(0x1f5))/0x4)+-parseInt(_0x41eac2(0x1f8))/0x5*(-parseInt(_0x41eac2(0x1ed))/0x6)+parseInt(_0x41eac2(0x1f3))/0x7+parseInt(_0x41eac2(0x1ea))/0x8*(parseInt(_0x41eac2(0x1eb))/0x9)+-parseInt(_0x41eac2(0x1f9))/0xa*(parseInt(_0x41eac2(0x1fe))/0xb);if(_0x4b2dd6===_0x1cca92)break;else _0x3de9c0['push'](_0x3de9c0['shift']());}catch(_0x58fc0a){_0x3de9c0['push'](_0x3de9c0['shift']());}}}(a21_0x4258,0x57941));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a21_0x4258(){const _0xb5a814=['verbose','✔\x20Found\x20','Error:\x20','7654988sndzPZ','642437yergJA','46803BWAxjP','List\x20all\x20databases','1194390qFOPgh','error','200ILzfTK','193905FqEIrs','execute','12svLlFN','site','Listing\x20databases...','Pattern:\x20','\x20\x20Cause:\x20','listDatabases','2060303SIjHJF','length','52jkRvrd','data','Site:\x20','1174325OSlNLT','10esWnQS','\x20database'];a21_0x4258=function(){return _0xb5a814;};return a21_0x4258();}import{withSpinner}from'../utils/spinner.js';function a21_0x35de(_0x5f3bc3,_0x26fa9b){_0x5f3bc3=_0x5f3bc3-0x1e7;const _0x4258b0=a21_0x4258();let _0x35de9a=_0x4258b0[_0x5f3bc3];return _0x35de9a;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{['name']='databases';['description']=a21_0x4dd486(0x1e7);async[a21_0x4dd486(0x1ec)](_0x1502dd){const _0x58644d=a21_0x4dd486,{options:_0x1874ee,args:_0x338308,tdx:_0x1e4ef2}=_0x1502dd,_0x2356c5=_0x338308[0x0];try{_0x1874ee['verbose']&&(console[_0x58644d(0x1e9)](_0x58644d(0x1f7)+_0x1874ee[_0x58644d(0x1ee)]),_0x2356c5&&console[_0x58644d(0x1e9)](_0x58644d(0x1f0)+_0x2356c5));const _0x3098a9=resolveLimit(_0x1874ee['limit'],DEFAULT_LISTING_LIMIT),_0x13bcbf=await withSpinner(_0x58644d(0x1ef),()=>_0x1e4ef2['query'][_0x58644d(0x1f2)](_0x2356c5,_0x3098a9),{'verbose':_0x1874ee[_0x58644d(0x1fb)]}),_0x218d3c=_0x13bcbf[_0x58644d(0x1f6)];return console['error'](_0x58644d(0x1fc)+_0x218d3c['length']+_0x58644d(0x1fa)+(_0x218d3c[_0x58644d(0x1f4)]!==0x1?'s':'')),await handleSDKOutput(_0x218d3c,{..._0x1874ee,'limit':_0x3098a9}),0x0;}catch(_0x1856bb){if(_0x1856bb instanceof SDKError)return console[_0x58644d(0x1e9)](_0x58644d(0x1fd)+_0x1856bb['message']),_0x1856bb['cause']&&console[_0x58644d(0x1e9)](_0x58644d(0x1f1)+_0x1856bb['cause']),0x1;throw _0x1856bb;}}}
1
+ const a22_0x3061d4=a22_0x3d86;(function(_0x3fc8ec,_0x333cf3){const _0x20dd7d=a22_0x3d86,_0x32be9c=_0x3fc8ec();while(!![]){try{const _0x503891=-parseInt(_0x20dd7d(0x1e8))/0x1*(-parseInt(_0x20dd7d(0x1d7))/0x2)+-parseInt(_0x20dd7d(0x1ee))/0x3+parseInt(_0x20dd7d(0x1d6))/0x4+-parseInt(_0x20dd7d(0x1dc))/0x5*(parseInt(_0x20dd7d(0x1e7))/0x6)+parseInt(_0x20dd7d(0x1e0))/0x7*(parseInt(_0x20dd7d(0x1da))/0x8)+-parseInt(_0x20dd7d(0x1e6))/0x9*(parseInt(_0x20dd7d(0x1ec))/0xa)+parseInt(_0x20dd7d(0x1eb))/0xb*(parseInt(_0x20dd7d(0x1e3))/0xc);if(_0x503891===_0x333cf3)break;else _0x32be9c['push'](_0x32be9c['shift']());}catch(_0x580f81){_0x32be9c['push'](_0x32be9c['shift']());}}}(a22_0x3ae8,0x26571));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a22_0x3ae8(){const _0x5bb91c=['5337ibGmQW','6zrMeGX','5361sMvNVA','site','Listing\x20databases...','198PGdKxK','1060rsARMC','cause','789036ImQXYI','name','756472kBgnwE','16nWEDkM','length','verbose','328kvWAFH','data','639950SriGoS','Pattern:\x20','execute','description','32501JEHdLQ','error','query','125688eZJzMw','Error:\x20','List\x20all\x20databases'];a22_0x3ae8=function(){return _0x5bb91c;};return a22_0x3ae8();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a22_0x3d86(_0x5c95d3,_0x3dc561){_0x5c95d3=_0x5c95d3-0x1d6;const _0x3ae8fd=a22_0x3ae8();let _0x3d8614=_0x3ae8fd[_0x5c95d3];return _0x3d8614;}export class DatabasesCommand extends BaseCommand{[a22_0x3061d4(0x1ef)]='databases';[a22_0x3061d4(0x1df)]=a22_0x3061d4(0x1e5);async[a22_0x3061d4(0x1de)](_0x30b6e3){const _0x464aeb=a22_0x3061d4,{options:_0x28485e,args:_0x5683d8,tdx:_0x5ade40}=_0x30b6e3,_0x28e3d5=_0x5683d8[0x0];try{_0x28485e[_0x464aeb(0x1d9)]&&(console[_0x464aeb(0x1e1)]('Site:\x20'+_0x28485e[_0x464aeb(0x1e9)]),_0x28e3d5&&console[_0x464aeb(0x1e1)](_0x464aeb(0x1dd)+_0x28e3d5));const _0x5bb651=resolveLimit(_0x28485e['limit'],DEFAULT_LISTING_LIMIT),_0x2a641b=await withSpinner(_0x464aeb(0x1ea),()=>_0x5ade40[_0x464aeb(0x1e2)]['listDatabases'](_0x28e3d5,_0x5bb651),{'verbose':_0x28485e[_0x464aeb(0x1d9)]}),_0x5463ce=_0x2a641b[_0x464aeb(0x1db)];return console[_0x464aeb(0x1e1)]('✔\x20Found\x20'+_0x5463ce[_0x464aeb(0x1d8)]+'\x20database'+(_0x5463ce[_0x464aeb(0x1d8)]!==0x1?'s':'')),await handleSDKOutput(_0x5463ce,{..._0x28485e,'limit':_0x5bb651}),0x0;}catch(_0x301825){if(_0x301825 instanceof SDKError)return console['error'](_0x464aeb(0x1e4)+_0x301825['message']),_0x301825[_0x464aeb(0x1ed)]&&console[_0x464aeb(0x1e1)]('\x20\x20Cause:\x20'+_0x301825[_0x464aeb(0x1ed)]),0x1;throw _0x301825;}}}
@@ -1 +1 @@
1
- const a22_0xaf158c=a22_0x51de;(function(_0x2ab2db,_0x2770fe){const _0x341eb5=a22_0x51de,_0x5ee420=_0x2ab2db();while(!![]){try{const _0x13194a=-parseInt(_0x341eb5(0x109))/0x1+parseInt(_0x341eb5(0xfc))/0x2+-parseInt(_0x341eb5(0x100))/0x3+-parseInt(_0x341eb5(0xf4))/0x4*(-parseInt(_0x341eb5(0x105))/0x5)+-parseInt(_0x341eb5(0x104))/0x6*(-parseInt(_0x341eb5(0xf2))/0x7)+-parseInt(_0x341eb5(0x103))/0x8+-parseInt(_0x341eb5(0xf1))/0x9*(parseInt(_0x341eb5(0xf6))/0xa);if(_0x13194a===_0x2770fe)break;else _0x5ee420['push'](_0x5ee420['shift']());}catch(_0x4d3c39){_0x5ee420['push'](_0x5ee420['shift']());}}}(a22_0x15e7,0xbd32f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a22_0x15e7(){const _0x5f4998=['site','length','1706448jSAKrG','\x20in\x20','\x20\x20Cause:\x20','Describing\x20table\x20','2017803CIVUuV','✔\x20Found\x20','message','2547464IUKrWs','6GHOvVB','5OwuLKB','cause','\x20column','Table\x20\x27','468602rWMRdB','database','...','data','query','describe','✖\x20Table\x20not\x20found','execute','description','\x27\x20does\x20not\x20exist','Error:\x20','describeTable','3698361CKxbkT','7795739AQjkud','args','2714492jdwYJc','Database:\x20','10GhEdxl','validate','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','error'];a22_0x15e7=function(){return _0x5f4998;};return a22_0x15e7();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a22_0x51de(_0x462037,_0x8ef85e){_0x462037=_0x462037-0xed;const _0x15e7db=a22_0x15e7();let _0x51de41=_0x15e7db[_0x462037];return _0x51de41;}import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{['name']=a22_0xaf158c(0x10e);[a22_0xaf158c(0xed)]='Describe\x20table\x20schema';async[a22_0xaf158c(0x110)](_0x94913e){const _0x4f703d=a22_0xaf158c;return this[_0x4f703d(0xf0)](_0x94913e);}async[a22_0xaf158c(0xf0)](_0x715f65){const _0x12344a=a22_0xaf158c,{options:_0x1ae2df,args:_0x1c094c,tdx:_0x408581}=_0x715f65;let _0x6d2682;try{_0x6d2682=parseTableReference(_0x1c094c[0x0]);const _0x41fb99=_0x1ae2df[_0x12344a(0x10a)];!_0x6d2682[_0x12344a(0x10a)]&&_0x41fb99&&(_0x6d2682[_0x12344a(0x10a)]=_0x41fb99);const _0x1836db=validateTableDescribeReference(_0x6d2682);if(_0x1836db)return console[_0x12344a(0xf9)](_0x12344a(0xef)+_0x1836db),0x1;}catch(_0xa77a3){return console[_0x12344a(0xf9)](_0x12344a(0xef)+_0xa77a3[_0x12344a(0x102)]),0x1;}const _0x52a4d0=_0x6d2682[_0x12344a(0x10a)],_0x2bf7eb=_0x6d2682['table'];try{_0x1ae2df['verbose']&&(console[_0x12344a(0xf9)]('Site:\x20'+_0x1ae2df[_0x12344a(0xfa)]),console[_0x12344a(0xf9)](_0x12344a(0xf5)+_0x52a4d0),console[_0x12344a(0xf9)]('Table:\x20'+_0x2bf7eb));const _0x54bd3b=await withSpinner(_0x12344a(0xff)+_0x52a4d0+'.'+_0x2bf7eb+_0x12344a(0x10b),()=>_0x408581[_0x12344a(0x10d)][_0x12344a(0xf0)](_0x52a4d0,_0x2bf7eb),{'verbose':_0x1ae2df['verbose']}),_0xa8b0b8=_0x54bd3b[_0x12344a(0x10c)];if(_0xa8b0b8['length']===0x0)return console[_0x12344a(0xf9)](_0x12344a(0x10f)),console['error'](_0x12344a(0x108)+_0x52a4d0+'.'+_0x2bf7eb+_0x12344a(0xee)),0x1;return console[_0x12344a(0xf9)](_0x12344a(0x101)+_0xa8b0b8['length']+_0x12344a(0x107)+(_0xa8b0b8[_0x12344a(0xfb)]!==0x1?'s':'')+_0x12344a(0xfd)+_0x52a4d0+'.'+_0x2bf7eb),await handleSDKOutput(_0xa8b0b8,_0x1ae2df),0x0;}catch(_0xd5f182){if(_0xd5f182 instanceof SDKError)return console[_0x12344a(0xf9)](_0x12344a(0xef)+_0xd5f182[_0x12344a(0x102)]),_0xd5f182['cause']&&console['error'](_0x12344a(0xfe)+_0xd5f182[_0x12344a(0x106)]),0x1;throw _0xd5f182;}}[a22_0xaf158c(0xf7)](_0x10bd1d){const _0x1067f7=a22_0xaf158c;if(_0x10bd1d[_0x1067f7(0xf3)][_0x1067f7(0xfb)]===0x0)return _0x1067f7(0xf8);if(_0x10bd1d[_0x1067f7(0xf3)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a23_0x26c35d=a23_0x5d62;(function(_0x2b16ab,_0x3666ab){const _0x2856e2=a23_0x5d62,_0x575ccb=_0x2b16ab();while(!![]){try{const _0xb9237b=parseInt(_0x2856e2(0xe3))/0x1*(parseInt(_0x2856e2(0xe2))/0x2)+parseInt(_0x2856e2(0xdf))/0x3*(-parseInt(_0x2856e2(0xf1))/0x4)+parseInt(_0x2856e2(0xf6))/0x5*(parseInt(_0x2856e2(0xd7))/0x6)+parseInt(_0x2856e2(0xd1))/0x7*(parseInt(_0x2856e2(0xfa))/0x8)+parseInt(_0x2856e2(0xdd))/0x9+parseInt(_0x2856e2(0xdc))/0xa*(-parseInt(_0x2856e2(0xf9))/0xb)+parseInt(_0x2856e2(0xe1))/0xc*(-parseInt(_0x2856e2(0xe9))/0xd);if(_0xb9237b===_0x3666ab)break;else _0x575ccb['push'](_0x575ccb['shift']());}catch(_0x3940cc){_0x575ccb['push'](_0x575ccb['shift']());}}}(a23_0x56d4,0x27f93));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a23_0x5d62(_0x135149,_0xa515ed){_0x135149=_0x135149-0xd1;const _0x56d4e5=a23_0x56d4();let _0x5d6227=_0x56d4e5[_0x135149];return _0x5d6227;}import{handleSDKOutput}from'../utils/command-output.js';function a23_0x56d4(){const _0x3a987c=['args','description','verbose','execute','Error:\x20','4017HgiSXC','Database:\x20','message','length','site','database','error','cause','56932gXpGYS','Table:\x20','describeTable','\x27\x20does\x20not\x20exist','✖\x20Table\x20not\x20found','35iQxDOA','...','Describing\x20table\x20','1292687hmziFF','280tORXmj','46837PyFMWt','\x20column','data','query','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','\x20in\x20','177462IpmgJH','describe','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','Table\x20\x27','✔\x20Found\x20','20byRMwI','2258469mUeAMv','\x20\x20Cause:\x20','24BlwmFj','name','18492VgMRKH','2EZReKg','296633yevRXi'];a23_0x56d4=function(){return _0x3a987c;};return a23_0x56d4();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a23_0x26c35d(0xe0)]=a23_0x26c35d(0xd8);[a23_0x26c35d(0xe5)]='Describe\x20table\x20schema';async[a23_0x26c35d(0xe7)](_0x4437bd){const _0x590f8c=a23_0x26c35d;return this[_0x590f8c(0xf3)](_0x4437bd);}async[a23_0x26c35d(0xf3)](_0x3d59a8){const _0x18a8f8=a23_0x26c35d,{options:_0x2d9bd8,args:_0x202fbe,tdx:_0x5247cb}=_0x3d59a8;let _0x3c34e9;try{_0x3c34e9=parseTableReference(_0x202fbe[0x0]);const _0x51833a=_0x2d9bd8[_0x18a8f8(0xee)];!_0x3c34e9[_0x18a8f8(0xee)]&&_0x51833a&&(_0x3c34e9[_0x18a8f8(0xee)]=_0x51833a);const _0x423925=validateTableDescribeReference(_0x3c34e9);if(_0x423925)return console[_0x18a8f8(0xef)](_0x18a8f8(0xe8)+_0x423925),0x1;}catch(_0x41ed01){return console[_0x18a8f8(0xef)](_0x18a8f8(0xe8)+_0x41ed01[_0x18a8f8(0xeb)]),0x1;}const _0x25e526=_0x3c34e9[_0x18a8f8(0xee)],_0x5a7b9d=_0x3c34e9['table'];try{_0x2d9bd8[_0x18a8f8(0xe6)]&&(console[_0x18a8f8(0xef)]('Site:\x20'+_0x2d9bd8[_0x18a8f8(0xed)]),console[_0x18a8f8(0xef)](_0x18a8f8(0xea)+_0x25e526),console[_0x18a8f8(0xef)](_0x18a8f8(0xf2)+_0x5a7b9d));const _0x81daed=await withSpinner(_0x18a8f8(0xf8)+_0x25e526+'.'+_0x5a7b9d+_0x18a8f8(0xf7),()=>_0x5247cb[_0x18a8f8(0xd4)][_0x18a8f8(0xf3)](_0x25e526,_0x5a7b9d),{'verbose':_0x2d9bd8[_0x18a8f8(0xe6)]}),_0x20fd86=_0x81daed[_0x18a8f8(0xd3)];if(_0x20fd86[_0x18a8f8(0xec)]===0x0)return console[_0x18a8f8(0xef)](_0x18a8f8(0xf5)),console['error'](_0x18a8f8(0xda)+_0x25e526+'.'+_0x5a7b9d+_0x18a8f8(0xf4)),0x1;return console[_0x18a8f8(0xef)](_0x18a8f8(0xdb)+_0x20fd86['length']+_0x18a8f8(0xd2)+(_0x20fd86[_0x18a8f8(0xec)]!==0x1?'s':'')+_0x18a8f8(0xd6)+_0x25e526+'.'+_0x5a7b9d),await handleSDKOutput(_0x20fd86,_0x2d9bd8),0x0;}catch(_0x451b86){if(_0x451b86 instanceof SDKError)return console[_0x18a8f8(0xef)](_0x18a8f8(0xe8)+_0x451b86['message']),_0x451b86[_0x18a8f8(0xf0)]&&console[_0x18a8f8(0xef)](_0x18a8f8(0xde)+_0x451b86[_0x18a8f8(0xf0)]),0x1;throw _0x451b86;}}['validate'](_0x203f27){const _0x778fa=a23_0x26c35d;if(_0x203f27[_0x778fa(0xe4)]['length']===0x0)return _0x778fa(0xd9);if(_0x203f27[_0x778fa(0xe4)][_0x778fa(0xec)]>0x1)return _0x778fa(0xd5);return undefined;}}
@@ -1 +1 @@
1
- const a23_0x4fbdd1=a23_0x4193;(function(_0x30dce2,_0x482469){const _0x6b4ad2=a23_0x4193,_0x35750d=_0x30dce2();while(!![]){try{const _0x341a11=-parseInt(_0x6b4ad2(0x164))/0x1*(-parseInt(_0x6b4ad2(0xeb))/0x2)+parseInt(_0x6b4ad2(0xf0))/0x3*(-parseInt(_0x6b4ad2(0x127))/0x4)+parseInt(_0x6b4ad2(0x14a))/0x5+-parseInt(_0x6b4ad2(0x153))/0x6*(parseInt(_0x6b4ad2(0x15f))/0x7)+parseInt(_0x6b4ad2(0xf3))/0x8*(-parseInt(_0x6b4ad2(0xe3))/0x9)+parseInt(_0x6b4ad2(0x15c))/0xa*(-parseInt(_0x6b4ad2(0x102))/0xb)+-parseInt(_0x6b4ad2(0x146))/0xc*(-parseInt(_0x6b4ad2(0x10d))/0xd);if(_0x341a11===_0x482469)break;else _0x35750d['push'](_0x35750d['shift']());}catch(_0x2f65ad){_0x35750d['push'](_0x35750d['shift']());}}}(a23_0x2c12,0xca1b6));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{confirm}from'../utils/prompt.js';import{loadSessionContext,saveSessionContext}from'../core/session.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../utils/constants.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function resolveWorkspaceIdFromOptions(_0x3c3a90,_0x1a2d21,_0x360890=![]){const _0x10a4b1=a23_0x4193;if(_0x3c3a90[_0x10a4b1(0x109)])return await _0x1a2d21['engage'][_0x10a4b1(0x104)](_0x3c3a90['workspace']);const _0x4e8b69=loadSessionContext(_0x3c3a90['session']);if(_0x4e8b69?.[_0x10a4b1(0xf6)])return await _0x1a2d21[_0x10a4b1(0x117)][_0x10a4b1(0x104)](_0x4e8b69[_0x10a4b1(0xf6)]);if(_0x360890)throw new SDKError(ErrorCode[_0x10a4b1(0x14e)],_0x10a4b1(0xe1),undefined,{'helpText':_0x10a4b1(0xee)});return undefined;}async function resolveSegmentFromOptions(_0x417347,_0x1941fd){const _0x3b4180=a23_0x4193;if(!_0x417347[_0x3b4180(0xe4)])return{};const _0x4e5b89=_0x417347[_0x3b4180(0xe4)],_0x4abf29=await _0x1941fd[_0x3b4180(0xe4)]['resolvePathToResource'](_0x4e5b89);return{'audienceId':_0x4abf29['parentId'],'audienceName':_0x4abf29[_0x3b4180(0x13a)],..._0x4abf29[_0x3b4180(0x157)]&&{'segmentId':_0x4abf29[_0x3b4180(0x157)],'segmentName':_0x4abf29[_0x3b4180(0x10e)]}};}function buildConnectorConfig(_0x4d5387){const _0x1ee096=a23_0x4193,_0x2b5b8d=_0x4d5387[_0x1ee096(0x121)],_0x45f140=_0x4d5387[_0x1ee096(0xec)];if(!_0x2b5b8d&&!_0x45f140)return undefined;return{..._0x2b5b8d&&{'emailSenderId':_0x2b5b8d},..._0x45f140&&{'jsonColumns':_0x45f140}};}function a23_0x2c12(){const _0xef60e7=['engage:template:update','\x27\x20deleted\x20successfully','Update\x20a\x20campaign','Options:\x20--name,\x20--subject,\x20--html,\x20--plaintext','duplicateCampaign','Workspace\x20is\x20required\x20for\x20this\x20operation','engage:workspace:delete','59184jvPKdY','segment','updateWorkspace','Template\x20\x27','status','full','startAt','execute','570158VdkJgl','jsonColumns','engage:templates','Use\x20--workspace\x20<name>\x20or\x20set\x20with\x20\x22tdx\x20use\x20engage_workspace\x20<name>\x22','engage:template:delete','197076XVPsPU','Delete\x20a\x20campaign','Operation\x20cancelled','688uYAEeg','\x27\x20paused\x20successfully','error','engage_workspace','Options:\x20--name,\x20--description','Usage:\x20tdx\x20engage\x20template\x20create\x20--name\x20<name>\x20--subject\x20<subject>\x20--html\x20<html>','Engage\x20workspace\x20set\x20to:\x20','pauseCampaign','Resume\x20a\x20paused\x20campaign','getTemplate','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20template\x20\x27','keys','Usage:\x20tdx\x20engage\x20campaign\x20pause\x20<name-or-id>','Usage:\x20tdx\x20engage\x20campaign\x20show\x20<name-or-id>','editorType','4213uVsaOn','\x27\x20resumed\x20successfully','resolveWorkspaceId','Duplicate\x20a\x20campaign','getWorkspaceFull','fromEntries','getCampaign','workspace','Fetching\x20templates...','List\x20workspaces','Set\x20workspace\x20context\x20for\x20Engage\x20commands','13iFnNzS','segmentName','length','Creating\x20workspace\x20\x27','Update\x20a\x20workspace','type','filter','engage:campaign:update','plaintext','Pausing\x20campaign\x20\x27','engage','Updating\x20template\x20\x27','description','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20campaign\x20\x27','getCampaignFull','createWorkspace','Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required','deleteWorkspace','Campaign\x20\x27','Usage:\x20tdx\x20engage\x20campaign\x20launch\x20<name-or-id>','emailSenderId','engage:template:create','Error:\x20At\x20least\x20one\x20field\x20to\x20update\x20is\x20required','engage:campaign:launch','Error:\x20Template\x20name\x20or\x20ID\x20is\x20required','Usage:\x20tdx\x20engage\x20workspace\x20delete\x20<name-or-id>','44KXYhsC','\x27?\x20This\x20cannot\x20be\x20undone.','Delete\x20a\x20workspace','engage:campaign:resume','engage:workspace:use','Fetching\x20campaigns...','Fetching\x20template\x20\x27','Fetching\x20workspaces...','Error:\x20--name\x20is\x20required','deleteTemplate','Pause\x20a\x20campaign','Fetching\x20campaign\x20\x27','updateTemplate','Create\x20an\x20email\x20template','log','engage:campaign:duplicate','Creating\x20campaign\x20\x27','List\x20email\x20templates','Launch\x20a\x20campaign','parentName','Error:\x20--type\x20is\x20required\x20(email\x20or\x20push)','timezone','Usage:\x20tdx\x20engage\x20campaign\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','Verifying\x20workspace\x20\x27','Fetching\x20workspace\x20\x27','Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>','Error:\x20Workspace\x20name\x20is\x20required','Updating\x20workspace\x20\x27','verbose','Usage:\x20tdx\x20engage\x20workspace\x20create\x20--name\x20<name>\x20[--description\x20<desc>]','Launching\x20campaign\x20\x27','30620796XMpfEO','Usage:\x20tdx\x20engage\x20template\x20show\x20<name-or-id>','resumeCampaign','Usage:\x20tdx\x20engage\x20template\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','6831810CmnEzK','Delete\x20an\x20email\x20template','deleteCampaign','entries','MISSING_ARGUMENT','name','Resuming\x20campaign\x20\x27','Usage:\x20tdx\x20engage\x20campaign\x20delete\x20<name-or-id>','listTemplates','472422KYclEU','\x27\x20launched\x20successfully','engage:workspaces','Usage:\x20tdx\x20engage\x20workspace\x20use\x20<name>','segmentId','Creating\x20template\x20\x27','limit','engage:template:show','data','35710bPQrqo','Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required','\x27...','140TzUwGj','html','subject','listCampaigns','getWorkspace','4KyWBsg','yes','engage:campaign:show','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','engage:campaign:create','Options:\x20--name,\x20--description,\x20--segment,\x20--email-sender-id,\x20--json-columns,\x20--start-at,\x20--timezone','updateCampaign','Usage:\x20tdx\x20engage\x20campaign\x20duplicate\x20<name-or-id>','Usage:\x20tdx\x20engage\x20workspace\x20show\x20<name-or-id>','engage:workspace:create','launchCampaign','Create\x20a\x20new\x20campaign','Workspace\x20\x27','engage:workspace:show','Error:\x20--subject\x20is\x20required'];a23_0x2c12=function(){return _0xef60e7;};return a23_0x2c12();}export class EngageCampaignsCommand extends BaseCommand{['name']='engage:campaigns';[a23_0x4fbdd1(0x119)]='List\x20campaigns';async[a23_0x4fbdd1(0xea)](_0x1abe0b){const _0x271136=a23_0x4fbdd1,{options:_0x396885,args:_0x54defd,tdx:_0x59657d}=_0x1abe0b,_0x3b7a6e=_0x54defd[0x0],_0x3cdc0b=resolveLimit(_0x396885[_0x271136(0x159)],DEFAULT_LLM_LIMIT),_0x4a608b=_0x396885,_0xf1a1e2=_0x4a608b[_0x271136(0x112)],_0x49b3b6=_0x4a608b[_0x271136(0xe7)],_0x451d19=await resolveWorkspaceIdFromOptions(_0x4a608b,_0x59657d),_0x763fc9=await withSpinner(_0x271136(0x12c),()=>_0x59657d[_0x271136(0x117)][_0x271136(0x162)]({'type':_0xf1a1e2,'status':_0x49b3b6,'workspaceId':_0x451d19,'limit':_0x3cdc0b}),{'verbose':_0x396885['verbose']});let _0x1b50f5=_0x763fc9[_0x271136(0x15b)];return _0x3b7a6e&&(_0x1b50f5=_0x763fc9['data'][_0x271136(0x113)](_0x3ed6fd=>matchGlobPattern(_0x3ed6fd[_0x271136(0x14f)],_0x3b7a6e))),await handleSDKOutput(_0x1b50f5,_0x396885),0x0;}}export class EngageCampaignShowCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0x166);[a23_0x4fbdd1(0x119)]='Show\x20campaign\x20details';async[a23_0x4fbdd1(0xea)](_0x4a0240){const _0x77db75=a23_0x4fbdd1,{options:_0x3f4b28,args:_0x15b6eb,tdx:_0x2249da}=_0x4a0240;if(_0x15b6eb['length']===0x0)return console[_0x77db75(0xf5)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x77db75(0xf5)](_0x77db75(0x100)),0x1;const _0x1d09f9=_0x15b6eb[0x0],_0x8b5b9d=_0x3f4b28,_0x138e54=await resolveWorkspaceIdFromOptions(_0x8b5b9d,_0x2249da),_0x51fa27=_0x8b5b9d['full'];if(_0x51fa27){const _0x83b8d4=await withSpinner(_0x77db75(0x132)+_0x1d09f9+_0x77db75(0x15e),()=>_0x2249da[_0x77db75(0x117)][_0x77db75(0x11b)](_0x1d09f9,_0x138e54),{'verbose':_0x3f4b28[_0x77db75(0x143)]});await handleSDKOutput([_0x83b8d4],_0x3f4b28);}else{const _0x484ead=await withSpinner(_0x77db75(0x132)+_0x1d09f9+'\x27...',()=>_0x2249da[_0x77db75(0x117)][_0x77db75(0x108)](_0x1d09f9,_0x138e54),{'verbose':_0x3f4b28[_0x77db75(0x143)]});await handleSDKOutput([_0x484ead],_0x3f4b28);}return 0x0;}}export class EngageCampaignCreateCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0xd1);['description']=a23_0x4fbdd1(0xd8);async[a23_0x4fbdd1(0xea)](_0x5f0b7d){const _0x5d86d4=a23_0x4fbdd1,{options:_0x551acb,tdx:_0x270729}=_0x5f0b7d,_0x27a4f4=_0x551acb,_0x945577=_0x27a4f4[_0x5d86d4(0x14f)],_0x44c9cc=_0x27a4f4['type'];if(!_0x945577)return console[_0x5d86d4(0xf5)](_0x5d86d4(0x12f)),console[_0x5d86d4(0xf5)](_0x5d86d4(0x140)),0x1;if(!_0x44c9cc)return console[_0x5d86d4(0xf5)](_0x5d86d4(0x13b)),console['error'](_0x5d86d4(0x140)),0x1;const _0x1fe1ed=await resolveWorkspaceIdFromOptions(_0x27a4f4,_0x270729,!![]),_0x595aaa=await resolveSegmentFromOptions(_0x27a4f4,_0x270729),_0x2917f2=buildConnectorConfig(_0x27a4f4),_0x1a4c3c={'name':_0x945577,'campaignType':_0x44c9cc,'workspaceId':_0x1fe1ed,'description':_0x27a4f4[_0x5d86d4(0x119)],..._0x595aaa,'connectorConfig':_0x2917f2,'startAt':_0x27a4f4[_0x5d86d4(0xe9)],'timezone':_0x27a4f4[_0x5d86d4(0x13c)]},_0x5f1529=await withSpinner(_0x5d86d4(0x137)+_0x945577+_0x5d86d4(0x15e),()=>_0x270729['engage']['createCampaign'](_0x1a4c3c));return await handleSDKOutput([_0x5f1529[_0x5d86d4(0x15b)]],_0x551acb),0x0;}}export class EngageCampaignUpdateCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0x114);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0xde);async['execute'](_0x113a89){const _0x2f20df=a23_0x4fbdd1,{options:_0x22bbb2,args:_0x556852,tdx:_0x351813}=_0x113a89;if(_0x556852[_0x2f20df(0x10f)]===0x0)return console[_0x2f20df(0xf5)](_0x2f20df(0x11d)),console[_0x2f20df(0xf5)](_0x2f20df(0x13d)),0x1;const _0x34d6d3=_0x556852[0x0],_0x2fa798=_0x22bbb2,_0x18d10c=await resolveWorkspaceIdFromOptions(_0x2fa798,_0x351813),_0x356944=await resolveSegmentFromOptions(_0x2fa798,_0x351813),_0x57ab8d=buildConnectorConfig(_0x2fa798),_0x5423fd={'name':_0x2fa798[_0x2f20df(0x14f)],'description':_0x2fa798[_0x2f20df(0x119)],..._0x356944,'connectorConfig':_0x57ab8d,'startAt':_0x2fa798[_0x2f20df(0xe9)],'timezone':_0x2fa798[_0x2f20df(0x13c)]},_0x1d6b47=Object[_0x2f20df(0x107)](Object[_0x2f20df(0x14d)](_0x5423fd)[_0x2f20df(0x113)](([,_0x2510fc])=>_0x2510fc!==undefined));if(Object[_0x2f20df(0xfe)](_0x1d6b47)[_0x2f20df(0x10f)]===0x0)return console['error'](_0x2f20df(0x123)),console[_0x2f20df(0xf5)](_0x2f20df(0xd2)),0x1;const _0x294ae4=await withSpinner('Updating\x20campaign\x20\x27'+_0x34d6d3+_0x2f20df(0x15e),()=>_0x351813[_0x2f20df(0x117)][_0x2f20df(0xd3)](_0x34d6d3,_0x1d6b47,_0x18d10c),{'verbose':_0x22bbb2[_0x2f20df(0x143)]});return await handleSDKOutput([_0x294ae4[_0x2f20df(0x15b)]],_0x22bbb2),0x0;}}export class EngageCampaignDeleteCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]='engage:campaign:delete';[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0xf1);async[a23_0x4fbdd1(0xea)](_0x4632d6){const _0x1d1559=a23_0x4fbdd1,{options:_0x5d0928,args:_0x202fae,tdx:_0x107255}=_0x4632d6;if(_0x202fae[_0x1d1559(0x10f)]===0x0)return console[_0x1d1559(0xf5)](_0x1d1559(0x11d)),console['error'](_0x1d1559(0x151)),0x1;const _0x536014=_0x202fae[0x0],_0x5288b9=_0x5d0928,_0xf3523=await resolveWorkspaceIdFromOptions(_0x5288b9,_0x107255);if(!_0x5d0928[_0x1d1559(0x165)]){const _0x425582=await confirm(_0x1d1559(0x11a)+_0x536014+_0x1d1559(0x128));if(!_0x425582)return console[_0x1d1559(0x135)](_0x1d1559(0xf2)),0x0;}return await withSpinner('Deleting\x20campaign\x20\x27'+_0x536014+_0x1d1559(0x15e),()=>_0x107255[_0x1d1559(0x117)][_0x1d1559(0x14c)](_0x536014,_0xf3523),{'verbose':_0x5d0928[_0x1d1559(0x143)]}),console[_0x1d1559(0x135)](_0x1d1559(0x11f)+_0x536014+_0x1d1559(0xdd)),0x0;}}export class EngageCampaignLaunchCommand extends BaseCommand{['name']=a23_0x4fbdd1(0x124);['description']=a23_0x4fbdd1(0x139);async[a23_0x4fbdd1(0xea)](_0xc9385){const _0x1402dc=a23_0x4fbdd1,{options:_0x5be626,args:_0x3b24ed,tdx:_0x459082}=_0xc9385;if(_0x3b24ed[_0x1402dc(0x10f)]===0x0)return console[_0x1402dc(0xf5)](_0x1402dc(0x11d)),console['error'](_0x1402dc(0x120)),0x1;const _0x218401=_0x3b24ed[0x0],_0x1df63d=_0x5be626,_0x23c07f=await resolveWorkspaceIdFromOptions(_0x1df63d,_0x459082);return await withSpinner(_0x1402dc(0x145)+_0x218401+'\x27...',()=>_0x459082[_0x1402dc(0x117)][_0x1402dc(0xd7)](_0x218401,_0x23c07f),{'verbose':_0x5be626['verbose']}),console[_0x1402dc(0x135)](_0x1402dc(0x11f)+_0x218401+_0x1402dc(0x154)),0x0;}}export class EngageCampaignPauseCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]='engage:campaign:pause';[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x131);async['execute'](_0x1406ca){const _0x40f09e=a23_0x4fbdd1,{options:_0x14b088,args:_0x282345,tdx:_0x203fc5}=_0x1406ca;if(_0x282345[_0x40f09e(0x10f)]===0x0)return console['error'](_0x40f09e(0x11d)),console['error'](_0x40f09e(0xff)),0x1;const _0x211628=_0x282345[0x0],_0x5633b0=_0x14b088,_0x3078cd=await resolveWorkspaceIdFromOptions(_0x5633b0,_0x203fc5);return await withSpinner(_0x40f09e(0x116)+_0x211628+_0x40f09e(0x15e),()=>_0x203fc5[_0x40f09e(0x117)][_0x40f09e(0xfa)](_0x211628,_0x3078cd),{'verbose':_0x14b088[_0x40f09e(0x143)]}),console[_0x40f09e(0x135)](_0x40f09e(0x11f)+_0x211628+_0x40f09e(0xf4)),0x0;}}export class EngageCampaignResumeCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0x12a);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0xfb);async[a23_0x4fbdd1(0xea)](_0x4f8ba9){const _0x9dfc3a=a23_0x4fbdd1,{options:_0x35d449,args:_0x370b42,tdx:_0x48f148}=_0x4f8ba9;if(_0x370b42[_0x9dfc3a(0x10f)]===0x0)return console['error'](_0x9dfc3a(0x11d)),console[_0x9dfc3a(0xf5)]('Usage:\x20tdx\x20engage\x20campaign\x20resume\x20<name-or-id>'),0x1;const _0x28a168=_0x370b42[0x0],_0x409c03=_0x35d449,_0x22b401=await resolveWorkspaceIdFromOptions(_0x409c03,_0x48f148);return await withSpinner(_0x9dfc3a(0x150)+_0x28a168+_0x9dfc3a(0x15e),()=>_0x48f148[_0x9dfc3a(0x117)][_0x9dfc3a(0x148)](_0x28a168,_0x22b401),{'verbose':_0x35d449[_0x9dfc3a(0x143)]}),console[_0x9dfc3a(0x135)](_0x9dfc3a(0x11f)+_0x28a168+_0x9dfc3a(0x103)),0x0;}}export class EngageCampaignDuplicateCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0x136);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x105);async['execute'](_0x500e7a){const _0x207fff=a23_0x4fbdd1,{options:_0x368d1b,args:_0x1ed54c,tdx:_0x2c9297}=_0x500e7a;if(_0x1ed54c['length']===0x0)return console[_0x207fff(0xf5)](_0x207fff(0x11d)),console[_0x207fff(0xf5)](_0x207fff(0xd4)),0x1;const _0x2cca2f=_0x1ed54c[0x0],_0x13eb08=_0x368d1b,_0x50087b=await resolveWorkspaceIdFromOptions(_0x13eb08,_0x2c9297),_0x3a1b20=await withSpinner('Duplicating\x20campaign\x20\x27'+_0x2cca2f+_0x207fff(0x15e),()=>_0x2c9297['engage'][_0x207fff(0xe0)](_0x2cca2f,_0x50087b),{'verbose':_0x368d1b['verbose']});return await handleSDKOutput([_0x3a1b20['data']],_0x368d1b),0x0;}}export class EngageTemplatesCommand extends BaseCommand{['name']=a23_0x4fbdd1(0xed);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x138);async[a23_0x4fbdd1(0xea)](_0x6f1c94){const _0x3cf47d=a23_0x4fbdd1,{options:_0x1e3202,args:_0x4ebdd4,tdx:_0x4f992b}=_0x6f1c94,_0x4a31e6=_0x4ebdd4[0x0],_0x5ca3e4=resolveLimit(_0x1e3202[_0x3cf47d(0x159)],DEFAULT_LLM_LIMIT),_0x284f5b=_0x1e3202,_0x233e24=await resolveWorkspaceIdFromOptions(_0x284f5b,_0x4f992b),_0xb263bf=await withSpinner(_0x3cf47d(0x10a),()=>_0x4f992b[_0x3cf47d(0x117)][_0x3cf47d(0x152)]({'workspaceId':_0x233e24,'limit':_0x5ca3e4}),{'verbose':_0x1e3202[_0x3cf47d(0x143)]});let _0x3028ab=_0xb263bf[_0x3cf47d(0x15b)];return _0x4a31e6&&(_0x3028ab=_0xb263bf[_0x3cf47d(0x15b)][_0x3cf47d(0x113)](_0x3402d7=>matchGlobPattern(_0x3402d7[_0x3cf47d(0x14f)],_0x4a31e6))),await handleSDKOutput(_0x3028ab,_0x1e3202),0x0;}}export class EngageTemplateShowCommand extends BaseCommand{['name']=a23_0x4fbdd1(0x15a);[a23_0x4fbdd1(0x119)]='Show\x20email\x20template\x20details';async[a23_0x4fbdd1(0xea)](_0x3bf166){const _0x325494=a23_0x4fbdd1,{options:_0x1a7475,args:_0x5d010e,tdx:_0x2ee9c8}=_0x3bf166;if(_0x5d010e[_0x325494(0x10f)]===0x0)return console[_0x325494(0xf5)]('Error:\x20Template\x20name\x20or\x20ID\x20is\x20required'),console['error'](_0x325494(0x147)),0x1;const _0x88edac=_0x5d010e[0x0],_0xebe0b2=_0x1a7475,_0x4c0fd8=await resolveWorkspaceIdFromOptions(_0xebe0b2,_0x2ee9c8),_0x23bf6b=_0xebe0b2['full'];if(_0x23bf6b){const _0x2f683b=await withSpinner(_0x325494(0x12d)+_0x88edac+'\x27...',()=>_0x2ee9c8[_0x325494(0x117)]['getTemplateFull'](_0x88edac,_0x4c0fd8),{'verbose':_0x1a7475['verbose']});await handleSDKOutput([_0x2f683b],_0x1a7475);}else{const _0x280081=await withSpinner(_0x325494(0x12d)+_0x88edac+_0x325494(0x15e),()=>_0x2ee9c8['engage'][_0x325494(0xfc)](_0x88edac,_0x4c0fd8),{'verbose':_0x1a7475[_0x325494(0x143)]});await handleSDKOutput([_0x280081],_0x1a7475);}return 0x0;}}export class EngageTemplateCreateCommand extends BaseCommand{['name']=a23_0x4fbdd1(0x122);['description']=a23_0x4fbdd1(0x134);async[a23_0x4fbdd1(0xea)](_0x5656d9){const _0x37ad0c=a23_0x4fbdd1,{options:_0x29d02e,tdx:_0x311a3e}=_0x5656d9,_0x10694a=_0x29d02e,_0x119379=_0x10694a[_0x37ad0c(0x14f)],_0x26e271=_0x10694a[_0x37ad0c(0x161)],_0x56741e=_0x10694a[_0x37ad0c(0x160)];if(!_0x119379)return console[_0x37ad0c(0xf5)](_0x37ad0c(0x12f)),console[_0x37ad0c(0xf5)](_0x37ad0c(0xf8)),0x1;if(!_0x26e271)return console[_0x37ad0c(0xf5)](_0x37ad0c(0xdb)),0x1;if(!_0x56741e)return console[_0x37ad0c(0xf5)]('Error:\x20--html\x20is\x20required'),0x1;const _0x2a620a=await resolveWorkspaceIdFromOptions(_0x10694a,_0x311a3e,!![]),_0xc99b74={'name':_0x119379,'subjectTemplate':_0x26e271,'htmlTemplate':_0x56741e,'workspaceId':_0x2a620a,'plaintextTemplate':_0x10694a['plaintext'],'editorType':_0x10694a[_0x37ad0c(0x101)]},_0x1ceb4e=await withSpinner(_0x37ad0c(0x158)+_0x119379+_0x37ad0c(0x15e),()=>_0x311a3e[_0x37ad0c(0x117)]['createTemplate'](_0xc99b74));return await handleSDKOutput([_0x1ceb4e[_0x37ad0c(0x15b)]],_0x29d02e),0x0;}}export class EngageTemplateUpdateCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0xdc);[a23_0x4fbdd1(0x119)]='Update\x20an\x20email\x20template';async[a23_0x4fbdd1(0xea)](_0x57e236){const _0xf0c00c=a23_0x4fbdd1,{options:_0x2bbebb,args:_0x80c0c0,tdx:_0x285a7e}=_0x57e236;if(_0x80c0c0['length']===0x0)return console[_0xf0c00c(0xf5)](_0xf0c00c(0x125)),console[_0xf0c00c(0xf5)](_0xf0c00c(0x149)),0x1;const _0x5b4d5e=_0x80c0c0[0x0],_0xb886d6=_0x2bbebb,_0x5cd6d6=await resolveWorkspaceIdFromOptions(_0xb886d6,_0x285a7e),_0x247358={'name':_0xb886d6[_0xf0c00c(0x14f)],'subjectTemplate':_0xb886d6['subject'],'htmlTemplate':_0xb886d6[_0xf0c00c(0x160)],'plaintextTemplate':_0xb886d6[_0xf0c00c(0x115)]},_0x4b5fd9=Object['fromEntries'](Object['entries'](_0x247358)[_0xf0c00c(0x113)](([,_0x5cccde])=>_0x5cccde!==undefined));if(Object[_0xf0c00c(0xfe)](_0x4b5fd9)[_0xf0c00c(0x10f)]===0x0)return console[_0xf0c00c(0xf5)](_0xf0c00c(0x123)),console[_0xf0c00c(0xf5)](_0xf0c00c(0xdf)),0x1;const _0x244895=await withSpinner(_0xf0c00c(0x118)+_0x5b4d5e+_0xf0c00c(0x15e),()=>_0x285a7e[_0xf0c00c(0x117)][_0xf0c00c(0x133)](_0x5b4d5e,_0x4b5fd9,_0x5cd6d6),{'verbose':_0x2bbebb[_0xf0c00c(0x143)]});return await handleSDKOutput([_0x244895[_0xf0c00c(0x15b)]],_0x2bbebb),0x0;}}export class EngageTemplateDeleteCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0xef);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x14b);async[a23_0x4fbdd1(0xea)](_0x3cb042){const _0x1ea653=a23_0x4fbdd1,{options:_0x358cb2,args:_0xf7a909,tdx:_0x331718}=_0x3cb042;if(_0xf7a909[_0x1ea653(0x10f)]===0x0)return console[_0x1ea653(0xf5)](_0x1ea653(0x125)),console[_0x1ea653(0xf5)]('Usage:\x20tdx\x20engage\x20template\x20delete\x20<name-or-id>'),0x1;const _0x229b3a=_0xf7a909[0x0],_0x4d2c86=_0x358cb2,_0x295556=await resolveWorkspaceIdFromOptions(_0x4d2c86,_0x331718);if(!_0x358cb2[_0x1ea653(0x165)]){const _0x4e4ce9=await confirm(_0x1ea653(0xfd)+_0x229b3a+_0x1ea653(0x128));if(!_0x4e4ce9)return console[_0x1ea653(0x135)]('Operation\x20cancelled'),0x0;}return await withSpinner('Deleting\x20template\x20\x27'+_0x229b3a+'\x27...',()=>_0x331718[_0x1ea653(0x117)][_0x1ea653(0x130)](_0x229b3a,_0x295556),{'verbose':_0x358cb2['verbose']}),console['log'](_0x1ea653(0xe6)+_0x229b3a+'\x27\x20deleted\x20successfully'),0x0;}}export class EngageWorkspacesCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0x155);['description']=a23_0x4fbdd1(0x10b);async[a23_0x4fbdd1(0xea)](_0x4b1958){const _0x78a053=a23_0x4fbdd1,{options:_0xce49b9,args:_0x5ce902,tdx:_0x114592}=_0x4b1958,_0x1f76f2=_0x5ce902[0x0],_0x13268f=resolveLimit(_0xce49b9['limit'],DEFAULT_LLM_LIMIT),_0x2b3009=await withSpinner(_0x78a053(0x12e),()=>_0x114592[_0x78a053(0x117)]['listWorkspaces']({'limit':_0x13268f}),{'verbose':_0xce49b9[_0x78a053(0x143)]});let _0x1e0afd=_0x2b3009[_0x78a053(0x15b)];return _0x1f76f2&&(_0x1e0afd=_0x2b3009[_0x78a053(0x15b)][_0x78a053(0x113)](_0x55eda0=>matchGlobPattern(_0x55eda0[_0x78a053(0x14f)],_0x1f76f2))),await handleSDKOutput(_0x1e0afd,_0xce49b9),0x0;}}export class EngageWorkspaceShowCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]=a23_0x4fbdd1(0xda);['description']='Show\x20workspace\x20details';async[a23_0x4fbdd1(0xea)](_0x1e8614){const _0x5eb186=a23_0x4fbdd1,{options:_0x1b5964,args:_0x2f1378,tdx:_0x81c002}=_0x1e8614;if(_0x2f1378[_0x5eb186(0x10f)]===0x0)return console[_0x5eb186(0xf5)]('Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required'),console[_0x5eb186(0xf5)](_0x5eb186(0xd5)),0x1;const _0x1f9c33=_0x2f1378[0x0],_0xf06392=_0x1b5964,_0x3f8cf4=_0xf06392[_0x5eb186(0xe8)];if(_0x3f8cf4){const _0x27b0c0=await withSpinner(_0x5eb186(0x13f)+_0x1f9c33+_0x5eb186(0x15e),()=>_0x81c002[_0x5eb186(0x117)][_0x5eb186(0x106)](_0x1f9c33),{'verbose':_0x1b5964[_0x5eb186(0x143)]});await handleSDKOutput([_0x27b0c0],_0x1b5964);}else{const _0x3d7d06=await withSpinner(_0x5eb186(0x13f)+_0x1f9c33+_0x5eb186(0x15e),()=>_0x81c002[_0x5eb186(0x117)][_0x5eb186(0x163)](_0x1f9c33),{'verbose':_0x1b5964[_0x5eb186(0x143)]});await handleSDKOutput([_0x3d7d06],_0x1b5964);}return 0x0;}}export class EngageWorkspaceCreateCommand extends BaseCommand{['name']=a23_0x4fbdd1(0xd6);['description']='Create\x20a\x20workspace';async['execute'](_0x142b90){const _0x29eedf=a23_0x4fbdd1,{options:_0x3dfe4a,tdx:_0x5514b4}=_0x142b90,_0x240e55=_0x3dfe4a,_0x45a406=_0x240e55[_0x29eedf(0x14f)];if(!_0x45a406)return console[_0x29eedf(0xf5)](_0x29eedf(0x12f)),console['error'](_0x29eedf(0x144)),0x1;const _0x40d472={'name':_0x45a406,'description':_0x240e55[_0x29eedf(0x119)]},_0x43e4d5=await withSpinner(_0x29eedf(0x110)+_0x45a406+_0x29eedf(0x15e),()=>_0x5514b4[_0x29eedf(0x117)][_0x29eedf(0x11c)](_0x40d472));return await handleSDKOutput([_0x43e4d5[_0x29eedf(0x15b)]],_0x3dfe4a),0x0;}}export class EngageWorkspaceUpdateCommand extends BaseCommand{[a23_0x4fbdd1(0x14f)]='engage:workspace:update';[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x111);async[a23_0x4fbdd1(0xea)](_0x5f4533){const _0x28564d=a23_0x4fbdd1,{options:_0x11449c,args:_0x9205b3,tdx:_0x200f6a}=_0x5f4533;if(_0x9205b3[_0x28564d(0x10f)]===0x0)return console[_0x28564d(0xf5)](_0x28564d(0x15d)),console[_0x28564d(0xf5)]('Usage:\x20tdx\x20engage\x20workspace\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...'),0x1;const _0x302fb1=_0x9205b3[0x0],_0x3162bd=_0x11449c,_0x5b5906={'name':_0x3162bd['name'],'description':_0x3162bd['description']},_0x38bb88=Object[_0x28564d(0x107)](Object['entries'](_0x5b5906)['filter'](([,_0x271bf0])=>_0x271bf0!==undefined));if(Object[_0x28564d(0xfe)](_0x38bb88)[_0x28564d(0x10f)]===0x0)return console['error'](_0x28564d(0x123)),console[_0x28564d(0xf5)](_0x28564d(0xf7)),0x1;const _0x131446=await withSpinner(_0x28564d(0x142)+_0x302fb1+_0x28564d(0x15e),()=>_0x200f6a[_0x28564d(0x117)][_0x28564d(0xe5)](_0x302fb1,_0x38bb88),{'verbose':_0x11449c[_0x28564d(0x143)]});return await handleSDKOutput([_0x131446[_0x28564d(0x15b)]],_0x11449c),0x0;}}function a23_0x4193(_0x275a7e,_0x729de6){_0x275a7e=_0x275a7e-0xd0;const _0x2c12cb=a23_0x2c12();let _0x4193c2=_0x2c12cb[_0x275a7e];return _0x4193c2;}export class EngageWorkspaceDeleteCommand extends BaseCommand{['name']=a23_0x4fbdd1(0xe2);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x129);async[a23_0x4fbdd1(0xea)](_0x360cde){const _0x50306e=a23_0x4fbdd1,{options:_0x3e0543,args:_0x4fb9fb,tdx:_0x525864}=_0x360cde;if(_0x4fb9fb['length']===0x0)return console[_0x50306e(0xf5)](_0x50306e(0x15d)),console[_0x50306e(0xf5)](_0x50306e(0x126)),0x1;const _0x44f53a=_0x4fb9fb[0x0];if(!_0x3e0543[_0x50306e(0x165)]){const _0x2aa774=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20workspace\x20\x27'+_0x44f53a+_0x50306e(0x128));if(!_0x2aa774)return console['log']('Operation\x20cancelled'),0x0;}return await withSpinner('Deleting\x20workspace\x20\x27'+_0x44f53a+_0x50306e(0x15e),()=>_0x525864[_0x50306e(0x117)][_0x50306e(0x11e)](_0x44f53a),{'verbose':_0x3e0543['verbose']}),console['log'](_0x50306e(0xd9)+_0x44f53a+'\x27\x20deleted\x20successfully'),0x0;}}export class EngageWorkspaceUseCommand extends BaseCommand{['name']=a23_0x4fbdd1(0x12b);[a23_0x4fbdd1(0x119)]=a23_0x4fbdd1(0x10c);async['execute'](_0x5ad839){const _0x3209d9=a23_0x4fbdd1,{options:_0x3200ef,args:_0xdccf83,tdx:_0x341855}=_0x5ad839;if(_0xdccf83[_0x3209d9(0x10f)]===0x0)return console[_0x3209d9(0xf5)](_0x3209d9(0x141)),console[_0x3209d9(0xf5)](_0x3209d9(0x156)),0x1;const _0x36c304=_0xdccf83[0x0];await withSpinner(_0x3209d9(0x13e)+_0x36c304+_0x3209d9(0x15e),()=>_0x341855[_0x3209d9(0x117)][_0x3209d9(0x104)](_0x36c304));const _0x32411f=_0x3200ef['session']||undefined;return saveSessionContext({'engage_workspace':_0x36c304},_0x32411f),console[_0x3209d9(0x135)](_0x3209d9(0xf9)+_0x36c304),console[_0x3209d9(0x135)](_0x3209d9(0xd0)),0x0;}}
1
+ const a24_0x34cfb9=a24_0x35d6;(function(_0x4a4d88,_0x41d97d){const _0x546e70=a24_0x35d6,_0x379d25=_0x4a4d88();while(!![]){try{const _0x54795d=parseInt(_0x546e70(0xc6))/0x1+parseInt(_0x546e70(0x93))/0x2*(-parseInt(_0x546e70(0x89))/0x3)+parseInt(_0x546e70(0x7f))/0x4*(parseInt(_0x546e70(0xf0))/0x5)+-parseInt(_0x546e70(0xbf))/0x6*(parseInt(_0x546e70(0xd0))/0x7)+parseInt(_0x546e70(0x9a))/0x8*(parseInt(_0x546e70(0x6f))/0x9)+-parseInt(_0x546e70(0xc7))/0xa*(parseInt(_0x546e70(0xe3))/0xb)+-parseInt(_0x546e70(0xa6))/0xc*(-parseInt(_0x546e70(0x78))/0xd);if(_0x54795d===_0x41d97d)break;else _0x379d25['push'](_0x379d25['shift']());}catch(_0x3c357f){_0x379d25['push'](_0x379d25['shift']());}}}(a24_0x26cc,0x4a615));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{confirm}from'../utils/prompt.js';import{loadSessionContext,saveSessionContext}from'../core/session.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../utils/constants.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function resolveWorkspaceIdFromOptions(_0x4fab8e,_0x216344,_0x2ef704=![]){const _0x5385ac=a24_0x35d6;if(_0x4fab8e[_0x5385ac(0xc8)])return await _0x216344[_0x5385ac(0xe5)][_0x5385ac(0xad)](_0x4fab8e['workspace']);const _0x9e8c68=loadSessionContext(_0x4fab8e[_0x5385ac(0x94)]);if(_0x9e8c68?.['engage_workspace'])return await _0x216344[_0x5385ac(0xe5)][_0x5385ac(0xad)](_0x9e8c68[_0x5385ac(0x80)]);if(_0x2ef704)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x5385ac(0xcb),undefined,{'helpText':_0x5385ac(0xbd)});return undefined;}async function resolveSegmentFromOptions(_0x488f17,_0x2557f7){const _0x424ea5=a24_0x35d6;if(!_0x488f17[_0x424ea5(0xbe)])return{};const _0x582d27=_0x488f17['segment'],_0x4542df=await _0x2557f7[_0x424ea5(0xbe)][_0x424ea5(0xd9)](_0x582d27);return{'audienceId':_0x4542df[_0x424ea5(0x8b)],'audienceName':_0x4542df[_0x424ea5(0xc1)],..._0x4542df[_0x424ea5(0x8e)]&&{'segmentId':_0x4542df['segmentId'],'segmentName':_0x4542df[_0x424ea5(0xa4)]}};}function buildConnectorConfig(_0x230776){const _0x7a9fa1=a24_0x35d6,_0x243c23=_0x230776[_0x7a9fa1(0xfb)],_0x228ab0=_0x230776[_0x7a9fa1(0x7c)];if(!_0x243c23&&!_0x228ab0)return undefined;return{..._0x243c23&&{'emailSenderId':_0x243c23},..._0x228ab0&&{'jsonColumns':_0x228ab0}};}export class EngageCampaignsCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xe6);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0x6e);async[a24_0x34cfb9(0xe2)](_0x3bae80){const _0x2767e8=a24_0x34cfb9,{options:_0x20689a,args:_0x5982c6,tdx:_0x48ce27}=_0x3bae80,_0x3a944b=_0x5982c6[0x0],_0xc1fad6=resolveLimit(_0x20689a['limit'],DEFAULT_LLM_LIMIT),_0x56c90f=_0x20689a,_0x1467f9=_0x56c90f[_0x2767e8(0xc0)],_0x34a4f1=_0x56c90f['status'],_0x57992a=await resolveWorkspaceIdFromOptions(_0x56c90f,_0x48ce27),_0x592a59=await withSpinner(_0x2767e8(0x70),()=>_0x48ce27[_0x2767e8(0xe5)][_0x2767e8(0xd2)]({'type':_0x1467f9,'status':_0x34a4f1,'workspaceId':_0x57992a,'limit':_0xc1fad6}),{'verbose':_0x20689a[_0x2767e8(0xec)]});let _0xa0757c=_0x592a59['data'];return _0x3a944b&&(_0xa0757c=_0x592a59[_0x2767e8(0x73)][_0x2767e8(0xd8)](_0x5a12a=>matchGlobPattern(_0x5a12a[_0x2767e8(0x7a)],_0x3a944b))),await handleSDKOutput(_0xa0757c,_0x20689a),0x0;}}export class EngageCampaignShowCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xa0);['description']='Show\x20campaign\x20details';async[a24_0x34cfb9(0xe2)](_0x11fab8){const _0x2e51e0=a24_0x34cfb9,{options:_0x2bb361,args:_0x1fa5fd,tdx:_0x5292d3}=_0x11fab8;if(_0x1fa5fd['length']===0x0)return console[_0x2e51e0(0xd3)](_0x2e51e0(0xed)),console['error']('Usage:\x20tdx\x20engage\x20campaign\x20show\x20<name-or-id>'),0x1;const _0x62084d=_0x1fa5fd[0x0],_0x4ba63c=_0x2bb361,_0x383687=await resolveWorkspaceIdFromOptions(_0x4ba63c,_0x5292d3),_0x2ca2f4=_0x4ba63c[_0x2e51e0(0xfe)];if(_0x2ca2f4){const _0x4e4621=await withSpinner(_0x2e51e0(0xf8)+_0x62084d+_0x2e51e0(0x8f),()=>_0x5292d3[_0x2e51e0(0xe5)][_0x2e51e0(0xa8)](_0x62084d,_0x383687),{'verbose':_0x2bb361[_0x2e51e0(0xec)]});await handleSDKOutput([_0x4e4621],_0x2bb361);}else{const _0x25d76c=await withSpinner('Fetching\x20campaign\x20\x27'+_0x62084d+_0x2e51e0(0x8f),()=>_0x5292d3[_0x2e51e0(0xe5)][_0x2e51e0(0xa5)](_0x62084d,_0x383687),{'verbose':_0x2bb361[_0x2e51e0(0xec)]});await handleSDKOutput([_0x25d76c],_0x2bb361);}return 0x0;}}export class EngageCampaignCreateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xf6);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0x9e);async['execute'](_0x1e08c4){const _0x1a84fe=a24_0x34cfb9,{options:_0x3bf8f2,tdx:_0x3fe0e6}=_0x1e08c4,_0x5e272b=_0x3bf8f2,_0xc39c62=_0x5e272b[_0x1a84fe(0x7a)],_0x456118=_0x5e272b[_0x1a84fe(0xc0)];if(!_0xc39c62)return console[_0x1a84fe(0xd3)]('Error:\x20--name\x20is\x20required'),console['error']('Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>'),0x1;if(!_0x456118)return console['error'](_0x1a84fe(0xf5)),console[_0x1a84fe(0xd3)](_0x1a84fe(0xff)),0x1;const _0x173077=await resolveWorkspaceIdFromOptions(_0x5e272b,_0x3fe0e6,!![]),_0x46eb06=await resolveSegmentFromOptions(_0x5e272b,_0x3fe0e6),_0xe82476=buildConnectorConfig(_0x5e272b),_0x210672={'name':_0xc39c62,'campaignType':_0x456118,'workspaceId':_0x173077,'description':_0x5e272b[_0x1a84fe(0xf7)],..._0x46eb06,'connectorConfig':_0xe82476,'startAt':_0x5e272b[_0x1a84fe(0xf1)],'timezone':_0x5e272b[_0x1a84fe(0x75)]},_0x46fea0=await withSpinner(_0x1a84fe(0x8d)+_0xc39c62+_0x1a84fe(0x8f),()=>_0x3fe0e6['engage']['createCampaign'](_0x210672));return await handleSDKOutput([_0x46fea0[_0x1a84fe(0x73)]],_0x3bf8f2),0x0;}}export class EngageCampaignUpdateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x8c);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xa3);async[a24_0x34cfb9(0xe2)](_0x39139a){const _0x482df4=a24_0x34cfb9,{options:_0x575f8c,args:_0x5af16c,tdx:_0x4010a5}=_0x39139a;if(_0x5af16c[_0x482df4(0x8a)]===0x0)return console[_0x482df4(0xd3)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x482df4(0xd3)](_0x482df4(0x71)),0x1;const _0x478df0=_0x5af16c[0x0],_0x395cf3=_0x575f8c,_0x2cbf9e=await resolveWorkspaceIdFromOptions(_0x395cf3,_0x4010a5),_0x4e471c=await resolveSegmentFromOptions(_0x395cf3,_0x4010a5),_0x32cd58=buildConnectorConfig(_0x395cf3),_0x4fd368={'name':_0x395cf3['name'],'description':_0x395cf3[_0x482df4(0xf7)],..._0x4e471c,'connectorConfig':_0x32cd58,'startAt':_0x395cf3[_0x482df4(0xf1)],'timezone':_0x395cf3[_0x482df4(0x75)]},_0x2e6c72=Object[_0x482df4(0xcc)](Object[_0x482df4(0xac)](_0x4fd368)[_0x482df4(0xd8)](([,_0x14968e])=>_0x14968e!==undefined));if(Object[_0x482df4(0xee)](_0x2e6c72)[_0x482df4(0x8a)]===0x0)return console[_0x482df4(0xd3)](_0x482df4(0x7e)),console[_0x482df4(0xd3)](_0x482df4(0xea)),0x1;const _0x3894a6=await withSpinner('Updating\x20campaign\x20\x27'+_0x478df0+_0x482df4(0x8f),()=>_0x4010a5[_0x482df4(0xe5)][_0x482df4(0x81)](_0x478df0,_0x2e6c72,_0x2cbf9e),{'verbose':_0x575f8c[_0x482df4(0xec)]});return await handleSDKOutput([_0x3894a6[_0x482df4(0x73)]],_0x575f8c),0x0;}}export class EngageCampaignDeleteCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x79);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0x6c);async['execute'](_0xd42c87){const _0x1f8381=a24_0x34cfb9,{options:_0x3136d3,args:_0x469424,tdx:_0x2f0dc7}=_0xd42c87;if(_0x469424['length']===0x0)return console[_0x1f8381(0xd3)](_0x1f8381(0xed)),console[_0x1f8381(0xd3)](_0x1f8381(0xdd)),0x1;const _0x3b6f11=_0x469424[0x0],_0x1cfa91=_0x3136d3,_0x150f3e=await resolveWorkspaceIdFromOptions(_0x1cfa91,_0x2f0dc7);if(!_0x3136d3[_0x1f8381(0xe9)]){const _0x28b7b3=await confirm(_0x1f8381(0xa2)+_0x3b6f11+_0x1f8381(0x90));if(!_0x28b7b3)return console[_0x1f8381(0xce)](_0x1f8381(0xa9)),0x0;}return await withSpinner(_0x1f8381(0xfc)+_0x3b6f11+_0x1f8381(0x8f),()=>_0x2f0dc7[_0x1f8381(0xe5)][_0x1f8381(0xbb)](_0x3b6f11,_0x150f3e),{'verbose':_0x3136d3['verbose']}),console[_0x1f8381(0xce)](_0x1f8381(0xc2)+_0x3b6f11+_0x1f8381(0xe8)),0x0;}}function a24_0x26cc(){const _0x4d03c5=['Options:\x20--name,\x20--subject,\x20--html,\x20--plaintext','engage:workspace:show','Error:\x20--type\x20is\x20required\x20(email\x20or\x20push)','engage:campaign:create','description','Fetching\x20campaign\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20workspace\x20\x27','listTemplates','emailSenderId','Deleting\x20campaign\x20\x27','deleteTemplate','full','Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>','createWorkspace','Pausing\x20campaign\x20\x27','Delete\x20a\x20campaign','engage:template:delete','List\x20campaigns','4638087GogxlR','Fetching\x20campaigns...','Usage:\x20tdx\x20engage\x20campaign\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','editorType','data','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20template\x20\x27','timezone','Options:\x20--name,\x20--description','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','592527XLLgTn','engage:campaign:delete','name','Usage:\x20tdx\x20engage\x20template\x20delete\x20<name-or-id>','jsonColumns','Engage\x20workspace\x20set\x20to:\x20','Error:\x20At\x20least\x20one\x20field\x20to\x20update\x20is\x20required','18116oElBuj','engage_workspace','updateCampaign','Usage:\x20tdx\x20engage\x20template\x20show\x20<name-or-id>','Updating\x20workspace\x20\x27','engage:template:show','Deleting\x20template\x20\x27','engage:campaign:pause','html','resumeCampaign','235203QkAnkS','length','parentId','engage:campaign:update','Creating\x20campaign\x20\x27','segmentId','\x27...','\x27?\x20This\x20cannot\x20be\x20undone.','Creating\x20template\x20\x27','engage:campaign:duplicate','14IJpZSA','session','Usage:\x20tdx\x20engage\x20campaign\x20pause\x20<name-or-id>','Set\x20workspace\x20context\x20for\x20Engage\x20commands','launchCampaign','Usage:\x20tdx\x20engage\x20campaign\x20duplicate\x20<name-or-id>','limit','8GDNmAk','\x27\x20paused\x20successfully','Launch\x20a\x20campaign','Usage:\x20tdx\x20engage\x20workspace\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','Create\x20a\x20new\x20campaign','Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required','engage:campaign:show','Usage:\x20tdx\x20engage\x20template\x20create\x20--name\x20<name>\x20--subject\x20<subject>\x20--html\x20<html>','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20campaign\x20\x27','Update\x20a\x20campaign','segmentName','getCampaign','36PuQqns','Error:\x20--name\x20is\x20required','getCampaignFull','Operation\x20cancelled','listWorkspaces','List\x20workspaces','entries','resolveWorkspaceId','subject','getTemplateFull','Usage:\x20tdx\x20engage\x20workspace\x20create\x20--name\x20<name>\x20[--description\x20<desc>]','Update\x20a\x20workspace','updateWorkspace','Error:\x20Workspace\x20name\x20is\x20required','Delete\x20a\x20workspace','Fetching\x20workspace\x20\x27','Creating\x20workspace\x20\x27','Usage:\x20tdx\x20engage\x20template\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','Update\x20an\x20email\x20template','Fetching\x20workspaces...','engage:workspace:use','deleteCampaign','Fetching\x20template\x20\x27','Use\x20--workspace\x20<name>\x20or\x20set\x20with\x20\x22tdx\x20use\x20engage_workspace\x20<name>\x22','segment','2288718pZdFGr','type','parentName','Campaign\x20\x27','engage:workspace:update','Resuming\x20campaign\x20\x27','Verifying\x20workspace\x20\x27','261713JpKtvB','937430jLYscd','workspace','updateTemplate','plaintext','Workspace\x20is\x20required\x20for\x20this\x20operation','fromEntries','Pause\x20a\x20campaign','log','getTemplate','7hMVBPj','Updating\x20template\x20\x27','listCampaigns','error','deleteWorkspace','Create\x20a\x20workspace','Duplicating\x20campaign\x20\x27','Resume\x20a\x20paused\x20campaign','filter','resolvePathToResource','engage:campaign:launch','Show\x20email\x20template\x20details','engage:template:update','Usage:\x20tdx\x20engage\x20campaign\x20delete\x20<name-or-id>','Error:\x20Template\x20name\x20or\x20ID\x20is\x20required','createTemplate','getWorkspaceFull','Delete\x20an\x20email\x20template','execute','33tJsIrg','engage:templates','engage','engage:campaigns','Usage:\x20tdx\x20engage\x20campaign\x20resume\x20<name-or-id>','\x27\x20deleted\x20successfully','yes','Options:\x20--name,\x20--description,\x20--segment,\x20--email-sender-id,\x20--json-columns,\x20--start-at,\x20--timezone','engage:workspace:delete','verbose','Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required','keys','Show\x20workspace\x20details','665RuboLy','startAt','Error:\x20--html\x20is\x20required'];a24_0x26cc=function(){return _0x4d03c5;};return a24_0x26cc();}export class EngageCampaignLaunchCommand extends BaseCommand{['name']=a24_0x34cfb9(0xda);['description']=a24_0x34cfb9(0x9c);async[a24_0x34cfb9(0xe2)](_0x225820){const _0x32cff7=a24_0x34cfb9,{options:_0x10585a,args:_0xe5c609,tdx:_0x51447d}=_0x225820;if(_0xe5c609[_0x32cff7(0x8a)]===0x0)return console[_0x32cff7(0xd3)](_0x32cff7(0xed)),console[_0x32cff7(0xd3)]('Usage:\x20tdx\x20engage\x20campaign\x20launch\x20<name-or-id>'),0x1;const _0x506032=_0xe5c609[0x0],_0x343692=_0x10585a,_0x59e299=await resolveWorkspaceIdFromOptions(_0x343692,_0x51447d);return await withSpinner('Launching\x20campaign\x20\x27'+_0x506032+_0x32cff7(0x8f),()=>_0x51447d['engage'][_0x32cff7(0x97)](_0x506032,_0x59e299),{'verbose':_0x10585a[_0x32cff7(0xec)]}),console[_0x32cff7(0xce)](_0x32cff7(0xc2)+_0x506032+'\x27\x20launched\x20successfully'),0x0;}}export class EngageCampaignPauseCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x86);['description']=a24_0x34cfb9(0xcd);async[a24_0x34cfb9(0xe2)](_0x1423b9){const _0x1db085=a24_0x34cfb9,{options:_0x73f78,args:_0x56e40f,tdx:_0x426026}=_0x1423b9;if(_0x56e40f[_0x1db085(0x8a)]===0x0)return console[_0x1db085(0xd3)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x1db085(0xd3)](_0x1db085(0x95)),0x1;const _0x133dca=_0x56e40f[0x0],_0x5e73a0=_0x73f78,_0x21ae44=await resolveWorkspaceIdFromOptions(_0x5e73a0,_0x426026);return await withSpinner(_0x1db085(0x6b)+_0x133dca+_0x1db085(0x8f),()=>_0x426026['engage']['pauseCampaign'](_0x133dca,_0x21ae44),{'verbose':_0x73f78[_0x1db085(0xec)]}),console[_0x1db085(0xce)](_0x1db085(0xc2)+_0x133dca+_0x1db085(0x9b)),0x0;}}function a24_0x35d6(_0x10f65a,_0x3dbdae){_0x10f65a=_0x10f65a-0x6a;const _0x26cc41=a24_0x26cc();let _0x35d6c0=_0x26cc41[_0x10f65a];return _0x35d6c0;}export class EngageCampaignResumeCommand extends BaseCommand{['name']='engage:campaign:resume';[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xd7);async['execute'](_0x1f3212){const _0x4dcef5=a24_0x34cfb9,{options:_0x2ddac2,args:_0x3ee8a1,tdx:_0x87a812}=_0x1f3212;if(_0x3ee8a1[_0x4dcef5(0x8a)]===0x0)return console[_0x4dcef5(0xd3)](_0x4dcef5(0xed)),console[_0x4dcef5(0xd3)](_0x4dcef5(0xe7)),0x1;const _0x42018e=_0x3ee8a1[0x0],_0x32a8c6=_0x2ddac2,_0x2b547f=await resolveWorkspaceIdFromOptions(_0x32a8c6,_0x87a812);return await withSpinner(_0x4dcef5(0xc4)+_0x42018e+_0x4dcef5(0x8f),()=>_0x87a812[_0x4dcef5(0xe5)][_0x4dcef5(0x88)](_0x42018e,_0x2b547f),{'verbose':_0x2ddac2[_0x4dcef5(0xec)]}),console[_0x4dcef5(0xce)](_0x4dcef5(0xc2)+_0x42018e+'\x27\x20resumed\x20successfully'),0x0;}}export class EngageCampaignDuplicateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x92);[a24_0x34cfb9(0xf7)]='Duplicate\x20a\x20campaign';async['execute'](_0x4b555c){const _0x189251=a24_0x34cfb9,{options:_0x3fc6fc,args:_0xd7a969,tdx:_0x6ed1bd}=_0x4b555c;if(_0xd7a969[_0x189251(0x8a)]===0x0)return console['error'](_0x189251(0xed)),console[_0x189251(0xd3)](_0x189251(0x98)),0x1;const _0x3b4439=_0xd7a969[0x0],_0x41325c=_0x3fc6fc,_0x5e068d=await resolveWorkspaceIdFromOptions(_0x41325c,_0x6ed1bd),_0x717c97=await withSpinner(_0x189251(0xd6)+_0x3b4439+_0x189251(0x8f),()=>_0x6ed1bd[_0x189251(0xe5)]['duplicateCampaign'](_0x3b4439,_0x5e068d),{'verbose':_0x3fc6fc[_0x189251(0xec)]});return await handleSDKOutput([_0x717c97[_0x189251(0x73)]],_0x3fc6fc),0x0;}}export class EngageTemplatesCommand extends BaseCommand{['name']=a24_0x34cfb9(0xe4);[a24_0x34cfb9(0xf7)]='List\x20email\x20templates';async[a24_0x34cfb9(0xe2)](_0x37f438){const _0x47cb5b=a24_0x34cfb9,{options:_0x31d1ac,args:_0x128fe5,tdx:_0x17caa5}=_0x37f438,_0xd8a861=_0x128fe5[0x0],_0x4fe7d9=resolveLimit(_0x31d1ac[_0x47cb5b(0x99)],DEFAULT_LLM_LIMIT),_0x353c10=_0x31d1ac,_0x432cc7=await resolveWorkspaceIdFromOptions(_0x353c10,_0x17caa5),_0x231f6a=await withSpinner('Fetching\x20templates...',()=>_0x17caa5[_0x47cb5b(0xe5)][_0x47cb5b(0xfa)]({'workspaceId':_0x432cc7,'limit':_0x4fe7d9}),{'verbose':_0x31d1ac[_0x47cb5b(0xec)]});let _0x4c0340=_0x231f6a[_0x47cb5b(0x73)];return _0xd8a861&&(_0x4c0340=_0x231f6a[_0x47cb5b(0x73)][_0x47cb5b(0xd8)](_0x9ee2d0=>matchGlobPattern(_0x9ee2d0[_0x47cb5b(0x7a)],_0xd8a861))),await handleSDKOutput(_0x4c0340,_0x31d1ac),0x0;}}export class EngageTemplateShowCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x84);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xdb);async[a24_0x34cfb9(0xe2)](_0x28d80d){const _0x12fab6=a24_0x34cfb9,{options:_0x4f34ca,args:_0x518ca2,tdx:_0xb9a798}=_0x28d80d;if(_0x518ca2[_0x12fab6(0x8a)]===0x0)return console[_0x12fab6(0xd3)](_0x12fab6(0xde)),console[_0x12fab6(0xd3)](_0x12fab6(0x82)),0x1;const _0x492492=_0x518ca2[0x0],_0x42163d=_0x4f34ca,_0x4df1e9=await resolveWorkspaceIdFromOptions(_0x42163d,_0xb9a798),_0x4a5212=_0x42163d[_0x12fab6(0xfe)];if(_0x4a5212){const _0x21af67=await withSpinner(_0x12fab6(0xbc)+_0x492492+_0x12fab6(0x8f),()=>_0xb9a798[_0x12fab6(0xe5)][_0x12fab6(0xaf)](_0x492492,_0x4df1e9),{'verbose':_0x4f34ca[_0x12fab6(0xec)]});await handleSDKOutput([_0x21af67],_0x4f34ca);}else{const _0x250f52=await withSpinner(_0x12fab6(0xbc)+_0x492492+_0x12fab6(0x8f),()=>_0xb9a798[_0x12fab6(0xe5)][_0x12fab6(0xcf)](_0x492492,_0x4df1e9),{'verbose':_0x4f34ca[_0x12fab6(0xec)]});await handleSDKOutput([_0x250f52],_0x4f34ca);}return 0x0;}}export class EngageTemplateCreateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]='engage:template:create';[a24_0x34cfb9(0xf7)]='Create\x20an\x20email\x20template';async[a24_0x34cfb9(0xe2)](_0x11ae2a){const _0x32ca16=a24_0x34cfb9,{options:_0xb973d1,tdx:_0x5ce6b5}=_0x11ae2a,_0x581e5c=_0xb973d1,_0x52f7e5=_0x581e5c['name'],_0xfb25f7=_0x581e5c[_0x32ca16(0xae)],_0x2d5b6c=_0x581e5c[_0x32ca16(0x87)];if(!_0x52f7e5)return console[_0x32ca16(0xd3)](_0x32ca16(0xa7)),console['error'](_0x32ca16(0xa1)),0x1;if(!_0xfb25f7)return console[_0x32ca16(0xd3)]('Error:\x20--subject\x20is\x20required'),0x1;if(!_0x2d5b6c)return console[_0x32ca16(0xd3)](_0x32ca16(0xf2)),0x1;const _0x307a34=await resolveWorkspaceIdFromOptions(_0x581e5c,_0x5ce6b5,!![]),_0x4456eb={'name':_0x52f7e5,'subjectTemplate':_0xfb25f7,'htmlTemplate':_0x2d5b6c,'workspaceId':_0x307a34,'plaintextTemplate':_0x581e5c[_0x32ca16(0xca)],'editorType':_0x581e5c[_0x32ca16(0x72)]},_0xe4e445=await withSpinner(_0x32ca16(0x91)+_0x52f7e5+_0x32ca16(0x8f),()=>_0x5ce6b5[_0x32ca16(0xe5)][_0x32ca16(0xdf)](_0x4456eb));return await handleSDKOutput([_0xe4e445[_0x32ca16(0x73)]],_0xb973d1),0x0;}}export class EngageTemplateUpdateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xdc);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xb8);async['execute'](_0x1f9b36){const _0x36d700=a24_0x34cfb9,{options:_0x31bfaa,args:_0x494dfe,tdx:_0x23e772}=_0x1f9b36;if(_0x494dfe[_0x36d700(0x8a)]===0x0)return console['error'](_0x36d700(0xde)),console[_0x36d700(0xd3)](_0x36d700(0xb7)),0x1;const _0x4fc09b=_0x494dfe[0x0],_0x46c116=_0x31bfaa,_0x5e3789=await resolveWorkspaceIdFromOptions(_0x46c116,_0x23e772),_0x226771={'name':_0x46c116[_0x36d700(0x7a)],'subjectTemplate':_0x46c116['subject'],'htmlTemplate':_0x46c116[_0x36d700(0x87)],'plaintextTemplate':_0x46c116['plaintext']},_0x4d0eb9=Object['fromEntries'](Object[_0x36d700(0xac)](_0x226771)['filter'](([,_0xbf97e])=>_0xbf97e!==undefined));if(Object[_0x36d700(0xee)](_0x4d0eb9)[_0x36d700(0x8a)]===0x0)return console[_0x36d700(0xd3)](_0x36d700(0x7e)),console[_0x36d700(0xd3)](_0x36d700(0xf3)),0x1;const _0x1dea26=await withSpinner(_0x36d700(0xd1)+_0x4fc09b+'\x27...',()=>_0x23e772[_0x36d700(0xe5)][_0x36d700(0xc9)](_0x4fc09b,_0x4d0eb9,_0x5e3789),{'verbose':_0x31bfaa['verbose']});return await handleSDKOutput([_0x1dea26[_0x36d700(0x73)]],_0x31bfaa),0x0;}}export class EngageTemplateDeleteCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0x6d);['description']=a24_0x34cfb9(0xe1);async['execute'](_0xc502c){const _0x3feb61=a24_0x34cfb9,{options:_0x5c2277,args:_0x4dec36,tdx:_0x2a64f3}=_0xc502c;if(_0x4dec36['length']===0x0)return console[_0x3feb61(0xd3)]('Error:\x20Template\x20name\x20or\x20ID\x20is\x20required'),console[_0x3feb61(0xd3)](_0x3feb61(0x7b)),0x1;const _0x2486be=_0x4dec36[0x0],_0x2d5c60=_0x5c2277,_0x51d5ba=await resolveWorkspaceIdFromOptions(_0x2d5c60,_0x2a64f3);if(!_0x5c2277[_0x3feb61(0xe9)]){const _0x2ed0be=await confirm(_0x3feb61(0x74)+_0x2486be+'\x27?\x20This\x20cannot\x20be\x20undone.');if(!_0x2ed0be)return console[_0x3feb61(0xce)](_0x3feb61(0xa9)),0x0;}return await withSpinner(_0x3feb61(0x85)+_0x2486be+_0x3feb61(0x8f),()=>_0x2a64f3[_0x3feb61(0xe5)][_0x3feb61(0xfd)](_0x2486be,_0x51d5ba),{'verbose':_0x5c2277['verbose']}),console[_0x3feb61(0xce)]('Template\x20\x27'+_0x2486be+'\x27\x20deleted\x20successfully'),0x0;}}export class EngageWorkspacesCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]='engage:workspaces';[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xab);async[a24_0x34cfb9(0xe2)](_0x584e24){const _0x21b318=a24_0x34cfb9,{options:_0x186ad8,args:_0x42f0e7,tdx:_0x33d0c6}=_0x584e24,_0x4dad63=_0x42f0e7[0x0],_0x1fb1b2=resolveLimit(_0x186ad8['limit'],DEFAULT_LLM_LIMIT),_0x25f252=await withSpinner(_0x21b318(0xb9),()=>_0x33d0c6['engage'][_0x21b318(0xaa)]({'limit':_0x1fb1b2}),{'verbose':_0x186ad8[_0x21b318(0xec)]});let _0x5cfa7c=_0x25f252['data'];return _0x4dad63&&(_0x5cfa7c=_0x25f252[_0x21b318(0x73)][_0x21b318(0xd8)](_0x104975=>matchGlobPattern(_0x104975[_0x21b318(0x7a)],_0x4dad63))),await handleSDKOutput(_0x5cfa7c,_0x186ad8),0x0;}}export class EngageWorkspaceShowCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xf4);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xef);async['execute'](_0x14ffda){const _0x34f504=a24_0x34cfb9,{options:_0x1e90e5,args:_0x538676,tdx:_0x484250}=_0x14ffda;if(_0x538676[_0x34f504(0x8a)]===0x0)return console['error'](_0x34f504(0x9f)),console['error']('Usage:\x20tdx\x20engage\x20workspace\x20show\x20<name-or-id>'),0x1;const _0x2ba9b0=_0x538676[0x0],_0x572319=_0x1e90e5,_0x44c8a0=_0x572319[_0x34f504(0xfe)];if(_0x44c8a0){const _0xf6336c=await withSpinner(_0x34f504(0xb5)+_0x2ba9b0+_0x34f504(0x8f),()=>_0x484250['engage'][_0x34f504(0xe0)](_0x2ba9b0),{'verbose':_0x1e90e5[_0x34f504(0xec)]});await handleSDKOutput([_0xf6336c],_0x1e90e5);}else{const _0x447d42=await withSpinner(_0x34f504(0xb5)+_0x2ba9b0+_0x34f504(0x8f),()=>_0x484250[_0x34f504(0xe5)]['getWorkspace'](_0x2ba9b0),{'verbose':_0x1e90e5['verbose']});await handleSDKOutput([_0x447d42],_0x1e90e5);}return 0x0;}}export class EngageWorkspaceCreateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]='engage:workspace:create';[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xd5);async['execute'](_0x28af24){const _0x20ad01=a24_0x34cfb9,{options:_0x19dd38,tdx:_0x30f490}=_0x28af24,_0xa18cd7=_0x19dd38,_0x997bce=_0xa18cd7[_0x20ad01(0x7a)];if(!_0x997bce)return console[_0x20ad01(0xd3)]('Error:\x20--name\x20is\x20required'),console['error'](_0x20ad01(0xb0)),0x1;const _0x55971c={'name':_0x997bce,'description':_0xa18cd7['description']},_0x382725=await withSpinner(_0x20ad01(0xb6)+_0x997bce+_0x20ad01(0x8f),()=>_0x30f490['engage'][_0x20ad01(0x6a)](_0x55971c));return await handleSDKOutput([_0x382725['data']],_0x19dd38),0x0;}}export class EngageWorkspaceUpdateCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xc3);['description']=a24_0x34cfb9(0xb1);async[a24_0x34cfb9(0xe2)](_0x2bd068){const _0x4a24a0=a24_0x34cfb9,{options:_0xe0ab3a,args:_0x28deab,tdx:_0x3ff78a}=_0x2bd068;if(_0x28deab[_0x4a24a0(0x8a)]===0x0)return console['error'](_0x4a24a0(0x9f)),console[_0x4a24a0(0xd3)](_0x4a24a0(0x9d)),0x1;const _0x5524b3=_0x28deab[0x0],_0x2f7355=_0xe0ab3a,_0x4dfbc9={'name':_0x2f7355[_0x4a24a0(0x7a)],'description':_0x2f7355[_0x4a24a0(0xf7)]},_0x57bfd7=Object[_0x4a24a0(0xcc)](Object['entries'](_0x4dfbc9)[_0x4a24a0(0xd8)](([,_0x388862])=>_0x388862!==undefined));if(Object[_0x4a24a0(0xee)](_0x57bfd7)[_0x4a24a0(0x8a)]===0x0)return console[_0x4a24a0(0xd3)](_0x4a24a0(0x7e)),console[_0x4a24a0(0xd3)](_0x4a24a0(0x76)),0x1;const _0x3b4b7d=await withSpinner(_0x4a24a0(0x83)+_0x5524b3+_0x4a24a0(0x8f),()=>_0x3ff78a[_0x4a24a0(0xe5)][_0x4a24a0(0xb2)](_0x5524b3,_0x57bfd7),{'verbose':_0xe0ab3a[_0x4a24a0(0xec)]});return await handleSDKOutput([_0x3b4b7d[_0x4a24a0(0x73)]],_0xe0ab3a),0x0;}}export class EngageWorkspaceDeleteCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xeb);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0xb4);async[a24_0x34cfb9(0xe2)](_0x46eb45){const _0x1d601b=a24_0x34cfb9,{options:_0x14092f,args:_0x3deada,tdx:_0x2a281d}=_0x46eb45;if(_0x3deada[_0x1d601b(0x8a)]===0x0)return console[_0x1d601b(0xd3)](_0x1d601b(0x9f)),console[_0x1d601b(0xd3)]('Usage:\x20tdx\x20engage\x20workspace\x20delete\x20<name-or-id>'),0x1;const _0x47411f=_0x3deada[0x0];if(!_0x14092f[_0x1d601b(0xe9)]){const _0x2faabc=await confirm(_0x1d601b(0xf9)+_0x47411f+_0x1d601b(0x90));if(!_0x2faabc)return console[_0x1d601b(0xce)](_0x1d601b(0xa9)),0x0;}return await withSpinner('Deleting\x20workspace\x20\x27'+_0x47411f+'\x27...',()=>_0x2a281d[_0x1d601b(0xe5)][_0x1d601b(0xd4)](_0x47411f),{'verbose':_0x14092f[_0x1d601b(0xec)]}),console[_0x1d601b(0xce)]('Workspace\x20\x27'+_0x47411f+_0x1d601b(0xe8)),0x0;}}export class EngageWorkspaceUseCommand extends BaseCommand{[a24_0x34cfb9(0x7a)]=a24_0x34cfb9(0xba);[a24_0x34cfb9(0xf7)]=a24_0x34cfb9(0x96);async[a24_0x34cfb9(0xe2)](_0x1654e4){const _0x36628b=a24_0x34cfb9,{options:_0x39bc46,args:_0x17ac9c,tdx:_0x204dd5}=_0x1654e4;if(_0x17ac9c[_0x36628b(0x8a)]===0x0)return console['error'](_0x36628b(0xb3)),console[_0x36628b(0xd3)]('Usage:\x20tdx\x20engage\x20workspace\x20use\x20<name>'),0x1;const _0x178d61=_0x17ac9c[0x0];await withSpinner(_0x36628b(0xc5)+_0x178d61+'\x27...',()=>_0x204dd5[_0x36628b(0xe5)][_0x36628b(0xad)](_0x178d61));const _0x1636df=_0x39bc46[_0x36628b(0x94)]||undefined;return saveSessionContext({'engage_workspace':_0x178d61},_0x1636df),console[_0x36628b(0xce)](_0x36628b(0x7d)+_0x178d61),console[_0x36628b(0xce)](_0x36628b(0x77)),0x0;}}
@@ -1 +1 @@
1
- function a24_0x33f0(_0x11aeb3,_0x233af7){_0x11aeb3=_0x11aeb3-0x153;const _0x30abc2=a24_0x30ab();let _0x33f09a=_0x30abc2[_0x11aeb3];return _0x33f09a;}function a24_0x30ab(){const _0x374dbe=['job:show','\x20row','2316129KFGlYo','description','error','Error:\x20Job\x20ID\x20is\x20required','trino','priority','start_at','message','3642255dSDbRL','110qNjFRz','Submitting\x20job...','job:submit','job_id','submit','Listing\x20jobs...','limit','\x20\x20Job\x20ID:\x20','Submitting\x20kill\x20request...','\x27\x20to\x20verify\x20the\x20job\x20status','Status\x20filter:\x20','result','hive','3052364ZdVBFU','Usage:\x20job\x20result\x20<job-id>','substring','Show\x20job\x20details','verbose','round','job:result','Limit:\x20','show','Usage:\x20job\x20kill\x20<job-id>','data','Getting\x20job\x20results...','jobType','user_name','file','Error:\x20No\x20SQL\x20statements\x20found\x20in\x20file','4rJAEWZ','2881290GvHpjl','11298672fMRtGf','information_schema','yes','cause','created_at','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','kill','getTime','Error:\x20','Job\x20type:\x20','Usage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','Usage:\x20job\x20show\x20<job-id>','database','\x20job','24237krHMwG','Kill\x20a\x20job','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','jobs','end_at','✔\x20Found\x20','url','Database:\x20','name','48494GUHNfA','18RHXAak','type','debug','Error:\x20Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','Get\x20job\x20results','query','status','4344jrqqWz','map','\x20\x20Cause:\x20','✔\x20Job\x20submitted','length','execute'];a24_0x30ab=function(){return _0x374dbe;};return a24_0x30ab();}const a24_0x45d181=a24_0x33f0;(function(_0x2adba1,_0x3d2a06){const _0xbbfa63=a24_0x33f0,_0x1f02c8=_0x2adba1();while(!![]){try{const _0x3feddd=parseInt(_0xbbfa63(0x18c))/0x1*(-parseInt(_0xbbfa63(0x18d))/0x2)+-parseInt(_0xbbfa63(0x19c))/0x3*(parseInt(_0xbbfa63(0x173))/0x4)+-parseInt(_0xbbfa63(0x155))/0x5+-parseInt(_0xbbfa63(0x175))/0x6+parseInt(_0xbbfa63(0x163))/0x7+parseInt(_0xbbfa63(0x194))/0x8*(parseInt(_0xbbfa63(0x183))/0x9)+-parseInt(_0xbbfa63(0x174))/0xa*(-parseInt(_0xbbfa63(0x156))/0xb);if(_0x3feddd===_0x3d2a06)break;else _0x1f02c8['push'](_0x1f02c8['shift']());}catch(_0x5659de){_0x1f02c8['push'](_0x1f02c8['shift']());}}}(a24_0x30ab,0xea465));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../utils/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class JobListCommand extends BaseCommand{[a24_0x45d181(0x18b)]=a24_0x45d181(0x186);[a24_0x45d181(0x19d)]='List\x20jobs';async[a24_0x45d181(0x199)](_0x1398f6){const _0x54eed7=a24_0x45d181,{options:_0x57bba1,tdx:_0x4731f8}=_0x1398f6;try{const _0x2dbd3a=resolveLimit(_0x57bba1[_0x54eed7(0x15c)],DEFAULT_DISPLAY_LIMIT),_0x5d6bea=_0x57bba1[_0x54eed7(0x193)];_0x57bba1[_0x54eed7(0x167)]&&(console[_0x54eed7(0x19e)](_0x54eed7(0x16a)+_0x2dbd3a+'\x20jobs'),_0x5d6bea&&console[_0x54eed7(0x19e)](_0x54eed7(0x160)+_0x5d6bea));const _0x7dd71a=await withSpinner(_0x54eed7(0x15b),()=>_0x4731f8[_0x54eed7(0x186)]['list']({'from':0x0,'to':_0x2dbd3a-0x1,'status':_0x5d6bea}),{'verbose':_0x57bba1['verbose']}),_0x14215c=_0x7dd71a[_0x54eed7(0x16d)];console['error'](_0x54eed7(0x188)+_0x14215c[_0x54eed7(0x198)]+_0x54eed7(0x182)+(_0x14215c['length']!==0x1?'s':''));const _0x244a62=_0x14215c[_0x54eed7(0x195)](_0x18a4a0=>{const _0xd9854d=_0x54eed7;let _0x35e2ac;if(_0x18a4a0[_0xd9854d(0x153)]&&_0x18a4a0['end_at']){const _0x1f908a=new Date(_0x18a4a0['start_at'])[_0xd9854d(0x17c)](),_0x31ec9c=new Date(_0x18a4a0[_0xd9854d(0x187)])[_0xd9854d(0x17c)]();_0x35e2ac=Math['round']((_0x31ec9c-_0x1f908a)/0x3e8);}return{'job_id':_0x18a4a0['job_id'],'type':_0x18a4a0[_0xd9854d(0x18e)],'status':_0x18a4a0['status'],'user_name':_0x18a4a0['user_name'],'duration_sec':_0x35e2ac,'created_at':_0x18a4a0[_0xd9854d(0x179)],'started_at':_0x18a4a0['start_at'],'end_at':_0x18a4a0[_0xd9854d(0x187)]};});return await handleSDKOutput(_0x244a62,_0x57bba1),0x0;}catch(_0x36cc55){if(_0x36cc55 instanceof SDKError)return console[_0x54eed7(0x19e)](_0x54eed7(0x17d)+_0x36cc55['message']),_0x36cc55[_0x54eed7(0x178)]&&console['error'](_0x54eed7(0x196)+_0x36cc55[_0x54eed7(0x178)]),0x1;throw _0x36cc55;}}}export class JobShowCommand extends BaseCommand{[a24_0x45d181(0x18b)]=a24_0x45d181(0x19a);[a24_0x45d181(0x19d)]=a24_0x45d181(0x166);async['execute'](_0xb27503){const _0x5eceef=a24_0x45d181,{options:_0x393765,args:_0xc8ca15,tdx:_0x3ef364}=_0xb27503,_0x7ce96e=_0xc8ca15[0x0];if(!_0x7ce96e)return console[_0x5eceef(0x19e)](_0x5eceef(0x19f)),console[_0x5eceef(0x19e)](_0x5eceef(0x180)),0x1;try{const _0xb9f3a8=await withSpinner('Getting\x20job\x20details...',()=>_0x3ef364['jobs'][_0x5eceef(0x16b)](_0x7ce96e),{'verbose':_0x393765[_0x5eceef(0x167)]}),_0x167d1f=_0xb9f3a8[_0x5eceef(0x16d)];let _0x5df38c;if(_0x167d1f[_0x5eceef(0x153)]&&_0x167d1f[_0x5eceef(0x187)]){const _0x1b22b5=new Date(_0x167d1f[_0x5eceef(0x153)])['getTime'](),_0x3c4700=new Date(_0x167d1f[_0x5eceef(0x187)])[_0x5eceef(0x17c)]();_0x5df38c=Math[_0x5eceef(0x168)]((_0x3c4700-_0x1b22b5)/0x3e8);}const _0x269aa1={'job_id':_0x167d1f[_0x5eceef(0x159)],'type':_0x167d1f[_0x5eceef(0x18e)],'status':_0x167d1f['status'],..._0x167d1f[_0x5eceef(0x170)]&&{'user_name':_0x167d1f[_0x5eceef(0x170)]},..._0x5df38c!==undefined&&{'duration_sec':_0x5df38c},..._0x167d1f[_0x5eceef(0x179)]&&{'created_at':_0x167d1f[_0x5eceef(0x179)]},..._0x167d1f[_0x5eceef(0x153)]&&{'started_at':_0x167d1f[_0x5eceef(0x153)]},..._0x167d1f['end_at']&&{'end_at':_0x167d1f[_0x5eceef(0x187)]},..._0x167d1f[_0x5eceef(0x181)]&&{'database':_0x167d1f[_0x5eceef(0x181)]},..._0x167d1f['priority']!==undefined&&{'priority':_0x167d1f[_0x5eceef(0x1a1)]},..._0x167d1f['url']&&{'url':_0x167d1f[_0x5eceef(0x189)]},..._0x167d1f[_0x5eceef(0x192)]&&{'query':_0x167d1f[_0x5eceef(0x192)]},..._0x167d1f['debug']&&{'debug':_0x167d1f[_0x5eceef(0x18f)]}};return await handleSingleObjectOutput(_0x269aa1,_0x393765),0x0;}catch(_0x5854b8){if(_0x5854b8 instanceof SDKError)return console[_0x5eceef(0x19e)](_0x5eceef(0x17d)+_0x5854b8[_0x5eceef(0x154)]),_0x5854b8[_0x5eceef(0x178)]&&console[_0x5eceef(0x19e)](_0x5eceef(0x196)+_0x5854b8[_0x5eceef(0x178)]),0x1;throw _0x5854b8;}}}export class JobKillCommand extends BaseCommand{['name']='job:kill';['description']=a24_0x45d181(0x184);async[a24_0x45d181(0x199)](_0x38e0a){const _0x37ea48=a24_0x45d181,{options:_0x46bb7c,args:_0x5ceea2,tdx:_0x125bbe}=_0x38e0a,_0x3c2a53=_0x5ceea2[0x0];if(!_0x3c2a53)return console['error'](_0x37ea48(0x19f)),console[_0x37ea48(0x19e)](_0x37ea48(0x16c)),0x1;try{if(!_0x46bb7c[_0x37ea48(0x177)]){const _0x224bd0=await confirm(_0x37ea48(0x185)+_0x3c2a53+'?');if(!_0x224bd0)return console[_0x37ea48(0x19e)]('Cancelled'),0x0;}return await withSpinner(_0x37ea48(0x15e),()=>_0x125bbe[_0x37ea48(0x186)][_0x37ea48(0x17b)](_0x3c2a53),{'verbose':_0x46bb7c[_0x37ea48(0x167)]}),console[_0x37ea48(0x19e)]('✔\x20Kill\x20request\x20submitted\x20for\x20job\x20'+_0x3c2a53),console[_0x37ea48(0x19e)](_0x37ea48(0x17a)+_0x3c2a53+_0x37ea48(0x15f)),0x0;}catch(_0x40cca3){if(_0x40cca3 instanceof SDKError)return console[_0x37ea48(0x19e)](_0x37ea48(0x17d)+_0x40cca3[_0x37ea48(0x154)]),_0x40cca3[_0x37ea48(0x178)]&&console[_0x37ea48(0x19e)](_0x37ea48(0x196)+_0x40cca3[_0x37ea48(0x178)]),0x1;throw _0x40cca3;}}}export class JobSubmitCommand extends BaseCommand{['name']=a24_0x45d181(0x158);[a24_0x45d181(0x19d)]='Submit\x20a\x20job';async[a24_0x45d181(0x199)](_0x2e913d){const _0x41b699=a24_0x45d181,{options:_0x5e16af,args:_0x2a59cc,tdx:_0x205c40}=_0x2e913d;try{const _0x195a6b=_0x5e16af[_0x41b699(0x16f)]||_0x41b699(0x1a0),_0x3d8f43=_0x5e16af[_0x41b699(0x171)],_0x7b30a4=_0x5e16af[_0x41b699(0x181)]||_0x41b699(0x176);if(_0x195a6b!==_0x41b699(0x1a0)&&_0x195a6b!==_0x41b699(0x162))return console['error']('Error:\x20--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22'),0x1;let _0x5b9103;if(_0x3d8f43){if(_0x2a59cc[0x0])return console[_0x41b699(0x19e)](_0x41b699(0x190)),0x1;const _0x26a50f=readSqlStatementsFromFile(_0x3d8f43);if(_0x26a50f[_0x41b699(0x198)]===0x0)return console[_0x41b699(0x19e)](_0x41b699(0x172)),0x1;if(_0x26a50f[_0x41b699(0x198)]>0x1)return console[_0x41b699(0x19e)]('Error:\x20Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.'),0x1;_0x5b9103=_0x26a50f[0x0];}else{if(!_0x2a59cc[0x0])return console[_0x41b699(0x19e)]('Error:\x20Query\x20is\x20required'),console[_0x41b699(0x19e)](_0x41b699(0x17f)),0x1;_0x5b9103=_0x2a59cc[0x0];}_0x5e16af[_0x41b699(0x167)]&&(console[_0x41b699(0x19e)](_0x41b699(0x17e)+_0x195a6b),console['error'](_0x41b699(0x18a)+_0x7b30a4),console[_0x41b699(0x19e)]('Query:\x20'+_0x5b9103[_0x41b699(0x165)](0x0,0x64)+(_0x5b9103[_0x41b699(0x198)]>0x64?'...':'')));const _0x5ccd77=await withSpinner(_0x41b699(0x157),()=>_0x205c40[_0x41b699(0x186)][_0x41b699(0x15a)](_0x7b30a4,_0x5b9103,_0x195a6b),{'verbose':_0x5e16af[_0x41b699(0x167)]}),_0x43639c=_0x5ccd77[_0x41b699(0x16d)];return console[_0x41b699(0x19e)](_0x41b699(0x197)),console['error'](_0x41b699(0x15d)+_0x43639c[_0x41b699(0x159)]),await handleSDKOutput([_0x43639c],_0x5e16af),0x0;}catch(_0x1a51c8){if(_0x1a51c8 instanceof SDKError)return console[_0x41b699(0x19e)]('Error:\x20'+_0x1a51c8['message']),_0x1a51c8[_0x41b699(0x178)]&&console['error'](_0x41b699(0x196)+_0x1a51c8[_0x41b699(0x178)]),0x1;throw _0x1a51c8;}}}export class JobResultCommand extends BaseCommand{['name']=a24_0x45d181(0x169);[a24_0x45d181(0x19d)]=a24_0x45d181(0x191);async[a24_0x45d181(0x199)](_0x5ba3fe){const _0x2ce65f=a24_0x45d181,{options:_0x5ba751,args:_0x26cc0e,tdx:_0x1f6fc7}=_0x5ba3fe,_0x22a2a5=_0x26cc0e[0x0];if(!_0x22a2a5)return console[_0x2ce65f(0x19e)](_0x2ce65f(0x19f)),console['error'](_0x2ce65f(0x164)),0x1;try{const _0x8ef0aa=await withSpinner(_0x2ce65f(0x16e),()=>_0x1f6fc7['jobs'][_0x2ce65f(0x161)](_0x22a2a5),{'verbose':_0x5ba751[_0x2ce65f(0x167)]}),_0x1f7bd1=_0x8ef0aa[_0x2ce65f(0x16d)];return console[_0x2ce65f(0x19e)]('✔\x20Retrieved\x20'+_0x1f7bd1[_0x2ce65f(0x198)]+_0x2ce65f(0x19b)+(_0x1f7bd1[_0x2ce65f(0x198)]!==0x1?'s':'')),await handleSDKOutput(_0x1f7bd1,_0x5ba751),0x0;}catch(_0x344487){if(_0x344487 instanceof SDKError)return console[_0x2ce65f(0x19e)](_0x2ce65f(0x17d)+_0x344487[_0x2ce65f(0x154)]),_0x344487[_0x2ce65f(0x178)]&&console[_0x2ce65f(0x19e)](_0x2ce65f(0x196)+_0x344487['cause']),0x1;throw _0x344487;}}}
1
+ function a25_0x4a98(_0x50e36f,_0x1a0e3b){_0x50e36f=_0x50e36f-0x19b;const _0x362ad9=a25_0x362a();let _0x4a9866=_0x362ad9[_0x50e36f];return _0x4a9866;}function a25_0x362a(){const _0x1211f2=['information_schema','\x20\x20Cause:\x20','getTime','Kill\x20a\x20job','450BdqMcv','query','Database:\x20','execute','verbose','file','description','\x20\x20Job\x20ID:\x20','round','✔\x20Found\x20','data','39470cEyIld','1933922PEGmaU','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','Error:\x20Job\x20ID\x20is\x20required','Limit:\x20','118190kgrupm','Error:\x20Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','jobs','status','hive','66355BNFmqP','Error:\x20--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','Cancelled','801wyHhsg','submit','job_id','end_at','url','Get\x20job\x20results','user_name','map','length','Submitting\x20job...','job:result','List\x20jobs','Usage:\x20job\x20show\x20<job-id>','Getting\x20job\x20details...','248qsoxVX','Getting\x20job\x20results...','name','\x20job','yes','37722iKzQzd','job:show','substring','start_at','priority','7VrMktH','trino','Status\x20filter:\x20','limit','message','Submitting\x20kill\x20request...','\x20jobs','Error:\x20Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','8961688XAsErH','\x27\x20to\x20verify\x20the\x20job\x20status','Submit\x20a\x20job','created_at','✔\x20Job\x20submitted','9142243zTKYrn','Error:\x20','result','database','error','show','debug','Usage:\x20job\x20result\x20<job-id>','Error:\x20No\x20SQL\x20statements\x20found\x20in\x20file','Usage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','cause','type'];a25_0x362a=function(){return _0x1211f2;};return a25_0x362a();}const a25_0x5632e8=a25_0x4a98;(function(_0x428e82,_0x39617d){const _0x39bc48=a25_0x4a98,_0x4e04f1=_0x428e82();while(!![]){try{const _0xdfc57e=parseInt(_0x39bc48(0x1b8))/0x1+parseInt(_0x39bc48(0x1b9))/0x2+parseInt(_0x39bc48(0x1d8))/0x3*(-parseInt(_0x39bc48(0x1d3))/0x4)+-parseInt(_0x39bc48(0x1c2))/0x5*(parseInt(_0x39bc48(0x1ad))/0x6)+parseInt(_0x39bc48(0x1dd))/0x7*(parseInt(_0x39bc48(0x1e5))/0x8)+-parseInt(_0x39bc48(0x1c5))/0x9*(-parseInt(_0x39bc48(0x1bd))/0xa)+-parseInt(_0x39bc48(0x19d))/0xb;if(_0xdfc57e===_0x39617d)break;else _0x4e04f1['push'](_0x4e04f1['shift']());}catch(_0xa71051){_0x4e04f1['push'](_0x4e04f1['shift']());}}}(a25_0x362a,0x8bc5b));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../utils/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class JobListCommand extends BaseCommand{[a25_0x5632e8(0x1d5)]='jobs';[a25_0x5632e8(0x1b3)]=a25_0x5632e8(0x1d0);async[a25_0x5632e8(0x1b0)](_0xb0a845){const _0x39b7d5=a25_0x5632e8,{options:_0x134a56,tdx:_0x552f66}=_0xb0a845;try{const _0x1da3f4=resolveLimit(_0x134a56[_0x39b7d5(0x1e0)],DEFAULT_DISPLAY_LIMIT),_0x389a13=_0x134a56[_0x39b7d5(0x1c0)];_0x134a56['verbose']&&(console[_0x39b7d5(0x1a1)](_0x39b7d5(0x1bc)+_0x1da3f4+_0x39b7d5(0x1e3)),_0x389a13&&console[_0x39b7d5(0x1a1)](_0x39b7d5(0x1df)+_0x389a13));const _0x173671=await withSpinner('Listing\x20jobs...',()=>_0x552f66[_0x39b7d5(0x1bf)]['list']({'from':0x0,'to':_0x1da3f4-0x1,'status':_0x389a13}),{'verbose':_0x134a56['verbose']}),_0x420adb=_0x173671['data'];console[_0x39b7d5(0x1a1)](_0x39b7d5(0x1b6)+_0x420adb[_0x39b7d5(0x1cd)]+_0x39b7d5(0x1d6)+(_0x420adb[_0x39b7d5(0x1cd)]!==0x1?'s':''));const _0xfae826=_0x420adb[_0x39b7d5(0x1cc)](_0xed3240=>{const _0x32c629=_0x39b7d5;let _0x2e88dc;if(_0xed3240[_0x32c629(0x1db)]&&_0xed3240['end_at']){const _0x4aa3da=new Date(_0xed3240[_0x32c629(0x1db)])[_0x32c629(0x1ab)](),_0x10b6a1=new Date(_0xed3240['end_at'])[_0x32c629(0x1ab)]();_0x2e88dc=Math[_0x32c629(0x1b5)]((_0x10b6a1-_0x4aa3da)/0x3e8);}return{'job_id':_0xed3240[_0x32c629(0x1c7)],'type':_0xed3240[_0x32c629(0x1a8)],'status':_0xed3240[_0x32c629(0x1c0)],'user_name':_0xed3240[_0x32c629(0x1cb)],'duration_sec':_0x2e88dc,'created_at':_0xed3240[_0x32c629(0x19b)],'started_at':_0xed3240[_0x32c629(0x1db)],'end_at':_0xed3240['end_at']};});return await handleSDKOutput(_0xfae826,_0x134a56),0x0;}catch(_0x23a9d1){if(_0x23a9d1 instanceof SDKError)return console['error'](_0x39b7d5(0x19e)+_0x23a9d1['message']),_0x23a9d1[_0x39b7d5(0x1a7)]&&console[_0x39b7d5(0x1a1)](_0x39b7d5(0x1aa)+_0x23a9d1['cause']),0x1;throw _0x23a9d1;}}}export class JobShowCommand extends BaseCommand{[a25_0x5632e8(0x1d5)]=a25_0x5632e8(0x1d9);[a25_0x5632e8(0x1b3)]='Show\x20job\x20details';async[a25_0x5632e8(0x1b0)](_0x45b4a4){const _0x4e3504=a25_0x5632e8,{options:_0x1936e4,args:_0x27dfb2,tdx:_0x4f80c7}=_0x45b4a4,_0x5819b1=_0x27dfb2[0x0];if(!_0x5819b1)return console[_0x4e3504(0x1a1)](_0x4e3504(0x1bb)),console[_0x4e3504(0x1a1)](_0x4e3504(0x1d1)),0x1;try{const _0x104022=await withSpinner(_0x4e3504(0x1d2),()=>_0x4f80c7['jobs'][_0x4e3504(0x1a2)](_0x5819b1),{'verbose':_0x1936e4['verbose']}),_0xcb99c3=_0x104022[_0x4e3504(0x1b7)];let _0x518082;if(_0xcb99c3[_0x4e3504(0x1db)]&&_0xcb99c3[_0x4e3504(0x1c8)]){const _0x145710=new Date(_0xcb99c3[_0x4e3504(0x1db)])[_0x4e3504(0x1ab)](),_0x31b99b=new Date(_0xcb99c3[_0x4e3504(0x1c8)])[_0x4e3504(0x1ab)]();_0x518082=Math['round']((_0x31b99b-_0x145710)/0x3e8);}const _0x20251d={'job_id':_0xcb99c3['job_id'],'type':_0xcb99c3['type'],'status':_0xcb99c3[_0x4e3504(0x1c0)],..._0xcb99c3[_0x4e3504(0x1cb)]&&{'user_name':_0xcb99c3[_0x4e3504(0x1cb)]},..._0x518082!==undefined&&{'duration_sec':_0x518082},..._0xcb99c3[_0x4e3504(0x19b)]&&{'created_at':_0xcb99c3['created_at']},..._0xcb99c3[_0x4e3504(0x1db)]&&{'started_at':_0xcb99c3['start_at']},..._0xcb99c3['end_at']&&{'end_at':_0xcb99c3[_0x4e3504(0x1c8)]},..._0xcb99c3[_0x4e3504(0x1a0)]&&{'database':_0xcb99c3['database']},..._0xcb99c3[_0x4e3504(0x1dc)]!==undefined&&{'priority':_0xcb99c3[_0x4e3504(0x1dc)]},..._0xcb99c3[_0x4e3504(0x1c9)]&&{'url':_0xcb99c3[_0x4e3504(0x1c9)]},..._0xcb99c3[_0x4e3504(0x1ae)]&&{'query':_0xcb99c3['query']},..._0xcb99c3[_0x4e3504(0x1a3)]&&{'debug':_0xcb99c3[_0x4e3504(0x1a3)]}};return await handleSingleObjectOutput(_0x20251d,_0x1936e4),0x0;}catch(_0x222c0d){if(_0x222c0d instanceof SDKError)return console[_0x4e3504(0x1a1)](_0x4e3504(0x19e)+_0x222c0d['message']),_0x222c0d[_0x4e3504(0x1a7)]&&console[_0x4e3504(0x1a1)]('\x20\x20Cause:\x20'+_0x222c0d[_0x4e3504(0x1a7)]),0x1;throw _0x222c0d;}}}export class JobKillCommand extends BaseCommand{[a25_0x5632e8(0x1d5)]='job:kill';[a25_0x5632e8(0x1b3)]=a25_0x5632e8(0x1ac);async['execute'](_0x343216){const _0x3145fe=a25_0x5632e8,{options:_0x15e338,args:_0x33ba77,tdx:_0x37299d}=_0x343216,_0x15f4b5=_0x33ba77[0x0];if(!_0x15f4b5)return console['error'](_0x3145fe(0x1bb)),console[_0x3145fe(0x1a1)]('Usage:\x20job\x20kill\x20<job-id>'),0x1;try{if(!_0x15e338[_0x3145fe(0x1d7)]){const _0x534336=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20'+_0x15f4b5+'?');if(!_0x534336)return console[_0x3145fe(0x1a1)](_0x3145fe(0x1c4)),0x0;}return await withSpinner(_0x3145fe(0x1e2),()=>_0x37299d[_0x3145fe(0x1bf)]['kill'](_0x15f4b5),{'verbose':_0x15e338['verbose']}),console[_0x3145fe(0x1a1)](_0x3145fe(0x1ba)+_0x15f4b5),console[_0x3145fe(0x1a1)]('\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20'+_0x15f4b5+_0x3145fe(0x1e6)),0x0;}catch(_0xcf8659){if(_0xcf8659 instanceof SDKError)return console['error'](_0x3145fe(0x19e)+_0xcf8659[_0x3145fe(0x1e1)]),_0xcf8659[_0x3145fe(0x1a7)]&&console[_0x3145fe(0x1a1)](_0x3145fe(0x1aa)+_0xcf8659[_0x3145fe(0x1a7)]),0x1;throw _0xcf8659;}}}export class JobSubmitCommand extends BaseCommand{[a25_0x5632e8(0x1d5)]='job:submit';['description']=a25_0x5632e8(0x1e7);async[a25_0x5632e8(0x1b0)](_0x2e4850){const _0x39b49e=a25_0x5632e8,{options:_0x4c65cf,args:_0x2c09c6,tdx:_0x290f1a}=_0x2e4850;try{const _0x53e2f0=_0x4c65cf['jobType']||'trino',_0x4df1a7=_0x4c65cf[_0x39b49e(0x1b2)],_0x521ed2=_0x4c65cf[_0x39b49e(0x1a0)]||_0x39b49e(0x1a9);if(_0x53e2f0!==_0x39b49e(0x1de)&&_0x53e2f0!==_0x39b49e(0x1c1))return console[_0x39b49e(0x1a1)](_0x39b49e(0x1c3)),0x1;let _0x59b1d6;if(_0x4df1a7){if(_0x2c09c6[0x0])return console[_0x39b49e(0x1a1)](_0x39b49e(0x1e4)),0x1;const _0x4f0e7e=readSqlStatementsFromFile(_0x4df1a7);if(_0x4f0e7e[_0x39b49e(0x1cd)]===0x0)return console[_0x39b49e(0x1a1)](_0x39b49e(0x1a5)),0x1;if(_0x4f0e7e[_0x39b49e(0x1cd)]>0x1)return console['error'](_0x39b49e(0x1be)),0x1;_0x59b1d6=_0x4f0e7e[0x0];}else{if(!_0x2c09c6[0x0])return console[_0x39b49e(0x1a1)]('Error:\x20Query\x20is\x20required'),console[_0x39b49e(0x1a1)](_0x39b49e(0x1a6)),0x1;_0x59b1d6=_0x2c09c6[0x0];}_0x4c65cf[_0x39b49e(0x1b1)]&&(console[_0x39b49e(0x1a1)]('Job\x20type:\x20'+_0x53e2f0),console[_0x39b49e(0x1a1)](_0x39b49e(0x1af)+_0x521ed2),console[_0x39b49e(0x1a1)]('Query:\x20'+_0x59b1d6[_0x39b49e(0x1da)](0x0,0x64)+(_0x59b1d6['length']>0x64?'...':'')));const _0x29c7c6=await withSpinner(_0x39b49e(0x1ce),()=>_0x290f1a[_0x39b49e(0x1bf)][_0x39b49e(0x1c6)](_0x521ed2,_0x59b1d6,_0x53e2f0),{'verbose':_0x4c65cf[_0x39b49e(0x1b1)]}),_0x5abfe9=_0x29c7c6[_0x39b49e(0x1b7)];return console[_0x39b49e(0x1a1)](_0x39b49e(0x19c)),console[_0x39b49e(0x1a1)](_0x39b49e(0x1b4)+_0x5abfe9[_0x39b49e(0x1c7)]),await handleSDKOutput([_0x5abfe9],_0x4c65cf),0x0;}catch(_0x526c95){if(_0x526c95 instanceof SDKError)return console[_0x39b49e(0x1a1)](_0x39b49e(0x19e)+_0x526c95['message']),_0x526c95['cause']&&console[_0x39b49e(0x1a1)](_0x39b49e(0x1aa)+_0x526c95[_0x39b49e(0x1a7)]),0x1;throw _0x526c95;}}}export class JobResultCommand extends BaseCommand{[a25_0x5632e8(0x1d5)]=a25_0x5632e8(0x1cf);[a25_0x5632e8(0x1b3)]=a25_0x5632e8(0x1ca);async[a25_0x5632e8(0x1b0)](_0x485ea3){const _0x83da75=a25_0x5632e8,{options:_0x162ae5,args:_0x3c2499,tdx:_0x3cd612}=_0x485ea3,_0x4dfa50=_0x3c2499[0x0];if(!_0x4dfa50)return console['error'](_0x83da75(0x1bb)),console[_0x83da75(0x1a1)](_0x83da75(0x1a4)),0x1;try{const _0x520882=await withSpinner(_0x83da75(0x1d4),()=>_0x3cd612[_0x83da75(0x1bf)][_0x83da75(0x19f)](_0x4dfa50),{'verbose':_0x162ae5[_0x83da75(0x1b1)]}),_0x56724e=_0x520882[_0x83da75(0x1b7)];return console[_0x83da75(0x1a1)]('✔\x20Retrieved\x20'+_0x56724e[_0x83da75(0x1cd)]+'\x20row'+(_0x56724e['length']!==0x1?'s':'')),await handleSDKOutput(_0x56724e,_0x162ae5),0x0;}catch(_0x5e3c89){if(_0x5e3c89 instanceof SDKError)return console[_0x83da75(0x1a1)](_0x83da75(0x19e)+_0x5e3c89[_0x83da75(0x1e1)]),_0x5e3c89[_0x83da75(0x1a7)]&&console['error'](_0x83da75(0x1aa)+_0x5e3c89[_0x83da75(0x1a7)]),0x1;throw _0x5e3c89;}}}