@treasuredata/tdx 2026.3.46 → 2026.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +5 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32f123,_0x525cde){const _0x169630=a119_0x1d35,_0x383716=_0x32f123();while(!![]){try{const _0x72eb0a=-parseInt(_0x169630(0x1b7))/0x1*(-parseInt(_0x169630(0x1b8))/0x2)+-parseInt(_0x169630(0x1bb))/0x3+parseInt(_0x169630(0x1a1))/0x4*(-parseInt(_0x169630(0x1a5))/0x5)+-parseInt(_0x169630(0x1b9))/0x6*(-parseInt(_0x169630(0x1b4))/0x7)+parseInt(_0x169630(0x1a0))/0x8+parseInt(_0x169630(0x1a7))/0x9+-parseInt(_0x169630(0x199))/0xa;if(_0x72eb0a===_0x525cde)break;else _0x383716['push'](_0x383716['shift']());}catch(_0x2c75d9){_0x383716['push'](_0x383716['shift']());}}}(a119_0x3629,0x7554c));function a119_0x1d35(_0x3ad43d,_0x2f2940){_0x3ad43d=_0x3ad43d-0x198;const _0x362914=a119_0x3629();let _0x1d357f=_0x362914[_0x3ad43d];return _0x1d357f;}import{TemplateDefSchema}from'./types/template-schema.js';import{formatZodPath,getLocationFromPath}from'../segment/yaml-validator.js';export function validateTemplateDef(_0x172dfd,_0x1c2fd1={}){const _0x7b9873=a119_0x1d35,_0x38d3a7=TemplateDefSchema['safeParse'](_0x172dfd);if(_0x38d3a7[_0x7b9873(0x1ad)]){const _0x54aba9=runSemanticChecks(_0x38d3a7['data'],_0x1c2fd1),_0x4ed64=_0x54aba9['filter'](_0x57f817=>_0x57f817[_0x7b9873(0x1b1)]==='error'),_0x1cb6ab=_0x54aba9[_0x7b9873(0x1af)](_0x329ae2=>_0x329ae2[_0x7b9873(0x1b1)]===_0x7b9873(0x1a9));return{'valid':_0x4ed64['length']===0x0,'errors':_0x4ed64,'warnings':_0x1cb6ab};}return zodErrorsToValidationResult(_0x38d3a7['error'],_0x1c2fd1);}function zodErrorsToValidationResult(_0x47b58e,_0x3f2bbc){const _0x323f4e=_0x47b58e['issues']['map'](_0x1803ce=>{const _0x580fb5=a119_0x1d35,_0x164bf6=formatZodPath(_0x1803ce[_0x580fb5(0x1b0)]),_0x198646=mapZodIssueToCode(_0x1803ce,_0x164bf6),_0x5a9766=getLocationFromPath(_0x3f2bbc[_0x580fb5(0x19d)],_0x3f2bbc[_0x580fb5(0x1b3)],_0x1803ce[_0x580fb5(0x1b0)]['map'](_0x3e0d02=>typeof _0x3e0d02===_0x580fb5(0x1bd)?String(_0x3e0d02):_0x3e0d02));return{'level':_0x580fb5(0x19f),'path':_0x164bf6,'code':_0x198646,'message':_0x1803ce[_0x580fb5(0x1ac)],..._0x5a9766&&{'location':_0x5a9766}};});return{'valid':![],'errors':_0x323f4e,'warnings':[]};}function mapZodIssueToCode(_0x3543cd,_0x3f51df){const _0xf17f79=a119_0x1d35;if(_0x3f51df===_0xf17f79(0x1b5))return _0xf17f79(0x1c0);if(_0x3f51df===_0xf17f79(0x1be))return'TEMPLATE_INVALID_TYPE';if(_0x3f51df==='variables'||_0x3f51df[_0xf17f79(0x1a3)](_0xf17f79(0x1ae)))return _0xf17f79(0x19c);return _0xf17f79(0x1b2);}function runSemanticChecks(_0x4a2f99,_0x11cd5b){const _0x45f1cd=a119_0x1d35,_0x42ee6f=[];!_0x4a2f99[_0x45f1cd(0x1aa)]&&_0x42ee6f[_0x45f1cd(0x1bf)]({'level':_0x45f1cd(0x19f),'path':'html_file','code':_0x45f1cd(0x19e),'message':'Template\x20requires\x20html_file\x20—\x20path\x20to\x20the\x20HTML\x20file\x20for\x20email\x20content','location':getLocationFromPath(_0x11cd5b['document'],_0x11cd5b[_0x45f1cd(0x1b3)],['name'])});!_0x4a2f99['subject']&&_0x42ee6f[_0x45f1cd(0x1bf)]({'level':'error','path':_0x45f1cd(0x1a8),'code':_0x45f1cd(0x1ba),'message':_0x45f1cd(0x198),'location':getLocationFromPath(_0x11cd5b[_0x45f1cd(0x19d)],_0x11cd5b[_0x45f1cd(0x1b3)],[_0x45f1cd(0x1b5)])});!_0x4a2f99[_0x45f1cd(0x1a4)]&&_0x42ee6f['push']({'level':_0x45f1cd(0x1a9),'path':_0x45f1cd(0x1a4),'code':_0x45f1cd(0x19a),'message':_0x45f1cd(0x19b),'location':getLocationFromPath(_0x11cd5b['document'],_0x11cd5b['source'],[_0x45f1cd(0x1b5)])});for(let _0x57105a=0x0;_0x57105a<_0x4a2f99[_0x45f1cd(0x1ae)][_0x45f1cd(0x1ab)];_0x57105a++){const _0x205b5a=_0x4a2f99[_0x45f1cd(0x1ae)][_0x57105a];/\s/['test'](_0x205b5a[_0x45f1cd(0x1b5)])&&_0x42ee6f[_0x45f1cd(0x1bf)]({'level':_0x45f1cd(0x19f),'path':'variables['+_0x57105a+_0x45f1cd(0x1bc),'code':_0x45f1cd(0x1b6),'message':_0x45f1cd(0x1a2)+_0x205b5a[_0x45f1cd(0x1b5)]+_0x45f1cd(0x1a6),'location':getLocationFromPath(_0x11cd5b['document'],_0x11cd5b[_0x45f1cd(0x1b3)],['variables',_0x57105a,'name'])});}return _0x42ee6f;}function a119_0x3629(){const _0x188ab8=['12nWvPwM','Variable\x20name\x20\x22','startsWith','workspace','1387005BDDoMT','\x22\x20must\x20not\x20contain\x20whitespace','4022874ErQHSB','subject','warning','html_file','length','message','success','variables','filter','path','level','TEMPLATE_SCHEMA_ERROR','source','13286USPQCr','name','TEMPLATE_INVALID_VARIABLE_NAME','743614urWAYB','2dZYyRp','2430YHiTtO','TEMPLATE_MISSING_SUBJECT','689247qRIEbM','].name','symbol','type','push','TEMPLATE_MISSING_NAME','Template\x20requires\x20subject\x20—\x20email\x20subject\x20line\x20template','12227010atjKYj','TEMPLATE_MISSING_WORKSPACE','No\x20workspace\x20specified\x20—\x20template\x20will\x20use\x20workspace\x20from\x20context\x20or\x20CLI\x20option','TEMPLATE_INVALID_VARIABLES','document','TEMPLATE_MISSING_HTML_FILE','error','6447608iZJmbV'];a119_0x3629=function(){return _0x188ab8;};return a119_0x3629();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fe5bf,_0x4f3e43){const _0x2e3598=a120_0x5817,_0x16aace=_0x1fe5bf();while(!![]){try{const _0x39d563=-parseInt(_0x2e3598(0x73))/0x1*(-parseInt(_0x2e3598(0x79))/0x2)+parseInt(_0x2e3598(0x7b))/0x3*(-parseInt(_0x2e3598(0x77))/0x4)+-parseInt(_0x2e3598(0x8a))/0x5+parseInt(_0x2e3598(0x75))/0x6+parseInt(_0x2e3598(0x6e))/0x7*(parseInt(_0x2e3598(0x93))/0x8)+-parseInt(_0x2e3598(0x8d))/0x9+parseInt(_0x2e3598(0x71))/0xa;if(_0x39d563===_0x4f3e43)break;else _0x16aace['push'](_0x16aace['shift']());}catch(_0x3a5dd9){_0x16aace['push'](_0x16aace['shift']());}}}(a120_0x4cda,0xaaa51));import*as a120_0x2cf4ce from'yaml';import{safeParseYaml}from'../segment/yaml-validator.js';import{sanitizeFileName}from'../../utils/string-utils.js';import{TemplateDefSchema}from'./types/template-schema.js';export function templateToDef(_0x4c8608,_0xe7059c){const _0x2bf182=a120_0x5817,_0x342439=_0x4c8608[_0x2bf182(0x89)],_0x4b5216=sanitizeTemplateFileName(_0x342439[_0x2bf182(0x6b)]);let _0x5157b0,_0x2273b9,_0x2bbacf,_0x14ec4b;_0x342439[_0x2bf182(0x7f)]&&(_0x2bbacf=_0x4b5216+_0x2bf182(0x88),_0x5157b0=_0x342439[_0x2bf182(0x7f)]);_0x342439[_0x2bf182(0x72)]&&(_0x14ec4b=_0x4b5216+_0x2bf182(0x87),_0x2273b9=_0x342439['plaintextTemplate']);const _0x3dd87c=_0x342439['templateVariables']&&_0x342439[_0x2bf182(0x82)]['length']>0x0,_0x3a6943={'type':_0x2bf182(0x70),'name':_0x342439[_0x2bf182(0x6b)],..._0x342439[_0x2bf182(0x8e)]&&{'subject':_0x342439[_0x2bf182(0x8e)]},..._0xe7059c[_0x2bf182(0x8c)]&&{'workspace':_0xe7059c['workspaceName']},..._0x342439[_0x2bf182(0x91)]&&{'editor_type':_0x342439['editorType']},..._0x2bbacf&&{'html_file':_0x2bbacf},..._0x14ec4b&&{'plaintext_file':_0x14ec4b},'variables':_0x3dd87c?_0x342439[_0x2bf182(0x82)][_0x2bf182(0x92)](templateVariableToYaml):[]};return{'def':_0x3a6943,'htmlContent':_0x5157b0,'plaintextContent':_0x2273b9};}export async function defToCreateInput(_0x48c5d6,_0x391df2){const _0x5cc0a3=a120_0x5817,_0x271299={'name':_0x48c5d6['name'],'subjectTemplate':_0x48c5d6['subject']??'','htmlTemplate':''};return _0x48c5d6[_0x5cc0a3(0x6d)]&&(_0x271299['workspaceId']=await _0x391df2[_0x5cc0a3(0x6c)](_0x48c5d6[_0x5cc0a3(0x6d)])),_0x48c5d6[_0x5cc0a3(0x8f)]&&(_0x271299[_0x5cc0a3(0x91)]=_0x48c5d6[_0x5cc0a3(0x8f)]),_0x48c5d6[_0x5cc0a3(0x67)]&&(_0x271299[_0x5cc0a3(0x7f)]=await _0x391df2[_0x5cc0a3(0x6f)](_0x48c5d6[_0x5cc0a3(0x67)])),_0x48c5d6[_0x5cc0a3(0x84)]&&(_0x271299[_0x5cc0a3(0x72)]=await _0x391df2[_0x5cc0a3(0x6f)](_0x48c5d6[_0x5cc0a3(0x84)])),_0x48c5d6[_0x5cc0a3(0x7a)][_0x5cc0a3(0x76)]>0x0&&(_0x271299[_0x5cc0a3(0x82)]=_0x48c5d6[_0x5cc0a3(0x7a)][_0x5cc0a3(0x92)](variableDefToApi)),_0x271299;}export async function defToUpdateInput(_0x793556,_0x1258a0){const _0x4fbbea=a120_0x5817,_0x38f01b={};if(_0x793556['name'])_0x38f01b[_0x4fbbea(0x6b)]=_0x793556[_0x4fbbea(0x6b)];if(_0x793556[_0x4fbbea(0x86)])_0x38f01b[_0x4fbbea(0x8e)]=_0x793556[_0x4fbbea(0x86)];return _0x793556[_0x4fbbea(0x67)]&&(_0x38f01b[_0x4fbbea(0x7f)]=await _0x1258a0['readFile'](_0x793556[_0x4fbbea(0x67)])),_0x793556['plaintext_file']&&(_0x38f01b[_0x4fbbea(0x72)]=await _0x1258a0[_0x4fbbea(0x6f)](_0x793556['plaintext_file'])),_0x793556[_0x4fbbea(0x7a)]['length']>0x0&&(_0x38f01b[_0x4fbbea(0x82)]=_0x793556[_0x4fbbea(0x7a)][_0x4fbbea(0x92)](variableDefToApi)),_0x38f01b;}export function toYamlString(_0x47d0ad){const _0x13406b=a120_0x5817,_0x503afb=JSON[_0x13406b(0x74)](JSON[_0x13406b(0x85)](_0x47d0ad)),_0xc28575=a120_0x2cf4ce[_0x13406b(0x85)](_0x503afb,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x13406b(0x66)}),_0x3941c2=[_0x13406b(0x7d)],_0x37c8eb=_0xc28575[_0x13406b(0x68)]('\x0a'),_0x205ba7=[];for(let _0x323fec=0x0;_0x323fec<_0x37c8eb[_0x13406b(0x76)];_0x323fec++){const _0x3dc0eb=_0x37c8eb[_0x323fec][_0x13406b(0x6a)]();_0x323fec>0x0&&_0x3941c2[_0x13406b(0x80)](_0x1ab7f1=>_0x3dc0eb['startsWith'](_0x1ab7f1))&&_0x205ba7[_0x13406b(0x76)]>0x0&&_0x205ba7[_0x205ba7[_0x13406b(0x76)]-0x1]!==''&&_0x205ba7[_0x13406b(0x90)](''),_0x205ba7[_0x13406b(0x90)](_0x37c8eb[_0x323fec]);}return _0x205ba7[_0x13406b(0x81)]('\x0a');}function a120_0x5817(_0x367ad9,_0x122af1){_0x367ad9=_0x367ad9-0x66;const _0x4cda09=a120_0x4cda();let _0x581736=_0x4cda09[_0x367ad9];return _0x581736;}export function parseYamlString(_0x43dce5){return safeParseYaml(_0x43dce5,TemplateDefSchema);}function a120_0x4cda(){const _0xab9e4c=['10823031FIohpN','subjectTemplate','editor_type','push','editorType','map','608ZfAaqW','null','html_file','split','display_name','trimStart','name','resolveWorkspaceId','workspace','60123fDLRbR','readFile','template','20269990INiaTQ','plaintextTemplate','3GXREPP','parse','1634310mnldVB','length','7592BpZGrH','preview_value','546292FLsKEM','variables','885CbZMMm','displayName','variables:','default_value','htmlTemplate','some','join','templateVariables','previewValue','plaintext_file','stringify','subject','.txt','.html','attributes','6550780RidHKV','defaultValue','workspaceName'];a120_0x4cda=function(){return _0xab9e4c;};return a120_0x4cda();}export function normalizeDef(_0x34c39a){const _0x212deb=a120_0x5817;return{'type':'template','name':_0x34c39a[_0x212deb(0x6b)],..._0x34c39a[_0x212deb(0x86)]!==undefined&&{'subject':_0x34c39a[_0x212deb(0x86)]},..._0x34c39a[_0x212deb(0x6d)]!==undefined&&{'workspace':_0x34c39a[_0x212deb(0x6d)]},..._0x34c39a[_0x212deb(0x8f)]!==undefined&&{'editor_type':_0x34c39a[_0x212deb(0x8f)]},..._0x34c39a[_0x212deb(0x67)]!==undefined&&{'html_file':_0x34c39a[_0x212deb(0x67)]},..._0x34c39a['plaintext_file']!==undefined&&{'plaintext_file':_0x34c39a[_0x212deb(0x84)]},'variables':_0x34c39a['variables'][_0x212deb(0x76)]>0x0?_0x34c39a[_0x212deb(0x7a)]['map'](_0x306f19=>({'name':_0x306f19['name'],'display_name':_0x306f19[_0x212deb(0x69)],'preview_value':_0x306f19['preview_value'],..._0x306f19[_0x212deb(0x7e)]!==undefined&&{'default_value':_0x306f19[_0x212deb(0x7e)]}})):[]};}function variableDefToApi(_0x37d874){const _0x415c59=a120_0x5817;return{'name':_0x37d874[_0x415c59(0x6b)],'displayName':_0x37d874[_0x415c59(0x69)],'previewValue':_0x37d874[_0x415c59(0x78)],..._0x37d874['default_value']!==undefined&&{'defaultValue':_0x37d874[_0x415c59(0x7e)]}};}function templateVariableToYaml(_0x4654fc){const _0x59f151=a120_0x5817;return{'name':_0x4654fc[_0x59f151(0x6b)],'display_name':_0x4654fc[_0x59f151(0x7c)],'preview_value':_0x4654fc[_0x59f151(0x83)],..._0x4654fc[_0x59f151(0x8b)]!==undefined&&{'default_value':_0x4654fc[_0x59f151(0x8b)]}};}export const sanitizeTemplateFileName=sanitizeFileName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e8e41,_0x49f8de){var _0x4eb68b=a121_0x53e7,_0x18f1f7=_0x1e8e41();while(!![]){try{var _0xcae92=parseInt(_0x4eb68b(0x15a))/0x1+-parseInt(_0x4eb68b(0x15b))/0x2+-parseInt(_0x4eb68b(0x153))/0x3+-parseInt(_0x4eb68b(0x158))/0x4*(parseInt(_0x4eb68b(0x154))/0x5)+-parseInt(_0x4eb68b(0x155))/0x6+parseInt(_0x4eb68b(0x156))/0x7+parseInt(_0x4eb68b(0x157))/0x8*(parseInt(_0x4eb68b(0x159))/0x9);if(_0xcae92===_0x49f8de)break;else _0x18f1f7['push'](_0x18f1f7['shift']());}catch(_0x1c585b){_0x18f1f7['push'](_0x18f1f7['shift']());}}}(a121_0x3208,0x4e71e));function a121_0x53e7(_0x13cc80,_0x48e269){_0x13cc80=_0x13cc80-0x153;var _0x320892=a121_0x3208();var _0x53e73a=_0x320892[_0x13cc80];return _0x53e73a;}export{CampaignDefSchema,EmailDefSchema,PushContentDefSchema,ScheduleDefSchema,ColumnMappingDefSchema,ConnectorDefSchema,ActivationSettingsDefSchema,UtmDefSchema,NotificationsDefSchema,TemplateVariableDefSchema}from'./campaign-schema.js';function a121_0x3208(){var _0xaba8b6=['440514wLysfo','4159582gcqGcH','4879664jdkyGg','8FFHgyU','9llGqGV','191315lPNiNi','484954tLkaUh','419271ErgFlu','1546340AabhNv'];a121_0x3208=function(){return _0xaba8b6;};return a121_0x3208();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a122_0x4babb2=a122_0x4e64;(function(_0x1e243d,_0x15966d){const _0x57c09a=a122_0x4e64,_0x1f4056=_0x1e243d();while(!![]){try{const _0x2f41c9=-parseInt(_0x57c09a(0x182))/0x1+-parseInt(_0x57c09a(0x17d))/0x2*(parseInt(_0x57c09a(0x17f))/0x3)+parseInt(_0x57c09a(0x181))/0x4+parseInt(_0x57c09a(0x17c))/0x5+parseInt(_0x57c09a(0x185))/0x6+-parseInt(_0x57c09a(0x184))/0x7+parseInt(_0x57c09a(0x18a))/0x8*(parseInt(_0x57c09a(0x17a))/0x9);if(_0x2f41c9===_0x15966d)break;else _0x1f4056['push'](_0x1f4056['shift']());}catch(_0x22deb5){_0x1f4056['push'](_0x1f4056['shift']());}}}(a122_0x3d00,0x236b4));import{z}from'zod';export const TemplateVariableDefSchema=z['object']({'name':z['string'](),'display_name':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'preview_value':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'default_value':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)]()});function a122_0x3d00(){const _0x2add42=['campaign','email','45uHYqyr','literal','91890vYEebP','25006bcVOGE','min','57sddtMo','number','263312ilVLVW','244221WzQqOs','optional','1670417bQFRiG','1075224zSvJUu','push','string','array','default','963320yKXgAb','enum','boolean','object'];a122_0x3d00=function(){return _0x2add42;};return a122_0x3d00();}export const EmailDefSchema=z['object']({'template':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'subject':z[a122_0x4babb2(0x187)]()['optional'](),'html_file':z[a122_0x4babb2(0x187)]()['optional'](),'plaintext_file':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'sender_id':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'variables':z['array'](TemplateVariableDefSchema)['optional']()});export const PushContentDefSchema=z[a122_0x4babb2(0x177)]({'title':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'message':z['string']()['optional'](),'push_type':z[a122_0x4babb2(0x187)]()['optional'](),'image_url':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'on_click_behavior':z['string']()[a122_0x4babb2(0x183)](),'on_click_behavior_url':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)]()});export const ScheduleDefSchema=z[a122_0x4babb2(0x177)]({'start_at':z[a122_0x4babb2(0x187)]()['optional'](),'timezone':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)]()});function a122_0x4e64(_0x33d17e,_0x2c4399){_0x33d17e=_0x33d17e-0x177;const _0x3d00ae=a122_0x3d00();let _0x4e640b=_0x3d00ae[_0x33d17e];return _0x4e640b;}export const ColumnMappingDefSchema=z[a122_0x4babb2(0x177)]({'column':z[a122_0x4babb2(0x187)](),'source':z[a122_0x4babb2(0x187)]()});export const ConnectorDefSchema=z[a122_0x4babb2(0x177)]({'all_columns':z['boolean']()[a122_0x4babb2(0x183)](),'columns':z[a122_0x4babb2(0x188)](ColumnMappingDefSchema)[a122_0x4babb2(0x183)]()});export const ActivationSettingsDefSchema=z['object']({'enabled':z[a122_0x4babb2(0x18c)]()[a122_0x4babb2(0x183)](),'workflow_project':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'workflow_name':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)]()});export const UtmDefSchema=z[a122_0x4babb2(0x177)]({'enabled':z[a122_0x4babb2(0x18c)]()[a122_0x4babb2(0x183)](),'id':z['string']()[a122_0x4babb2(0x183)](),'medium':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'source':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'source_platform':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'campaign':z[a122_0x4babb2(0x187)]()['optional'](),'marketing_tactic':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)]()});export const NotificationsDefSchema=z[a122_0x4babb2(0x177)]({'events':z[a122_0x4babb2(0x188)](z[a122_0x4babb2(0x187)]())['optional'](),'recipients':z['array'](z[a122_0x4babb2(0x180)]())[a122_0x4babb2(0x183)]()});export const CampaignDefSchema=z[a122_0x4babb2(0x177)]({'type':z[a122_0x4babb2(0x17b)](a122_0x4babb2(0x178))[a122_0x4babb2(0x189)](a122_0x4babb2(0x178)),'name':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x17e)](0x1,'Campaign\x20name\x20is\x20required'),'campaign_type':z[a122_0x4babb2(0x18b)]([a122_0x4babb2(0x179),a122_0x4babb2(0x186)]),'description':z[a122_0x4babb2(0x187)]()['optional'](),'workspace':z['string']()[a122_0x4babb2(0x183)](),'audience':z[a122_0x4babb2(0x187)]()['optional'](),'segment':z[a122_0x4babb2(0x187)]()[a122_0x4babb2(0x183)](),'email':EmailDefSchema['optional'](),'push':PushContentDefSchema['optional'](),'schedule':ScheduleDefSchema[a122_0x4babb2(0x183)](),'connector':ConnectorDefSchema['optional'](),'activation':ActivationSettingsDefSchema[a122_0x4babb2(0x183)](),'utm':UtmDefSchema[a122_0x4babb2(0x183)](),'notifications':NotificationsDefSchema[a122_0x4babb2(0x183)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a123_0x296328=a123_0x3f31;(function(_0x11762e,_0x1fca21){const _0x275929=a123_0x3f31,_0x45442c=_0x11762e();while(!![]){try{const _0x1a3df8=parseInt(_0x275929(0xc1))/0x1+parseInt(_0x275929(0xbb))/0x2+parseInt(_0x275929(0xc7))/0x3+-parseInt(_0x275929(0xc0))/0x4*(-parseInt(_0x275929(0xb9))/0x5)+parseInt(_0x275929(0xbe))/0x6*(parseInt(_0x275929(0xb7))/0x7)+-parseInt(_0x275929(0xb8))/0x8+-parseInt(_0x275929(0xbd))/0x9;if(_0x1a3df8===_0x1fca21)break;else _0x45442c['push'](_0x45442c['shift']());}catch(_0x707452){_0x45442c['push'](_0x45442c['shift']());}}}(a123_0x53c8,0x9cc5d));import{z}from'zod';function a123_0x53c8(){const _0x2d069c=['template','393981VUVzuN','2053528aPhLdd','5109865lkXvwH','array','1175382HNSfzh','Variable\x20name\x20is\x20required','22509567LmzMvN','102qrwxdi','min','4xQXoLI','136379BKLiwR','string','Variable\x20preview_value\x20is\x20required','Variable\x20display_name\x20is\x20required','default','optional','2091123dzlqPE'];a123_0x53c8=function(){return _0x2d069c;};return a123_0x53c8();}export const TemplateVariableDefSchema=z['object']({'name':z[a123_0x296328(0xc2)]()[a123_0x296328(0xbf)](0x1,a123_0x296328(0xbc)),'display_name':z[a123_0x296328(0xc2)]()['min'](0x1,a123_0x296328(0xc4)),'preview_value':z[a123_0x296328(0xc2)]()['min'](0x1,a123_0x296328(0xc3)),'default_value':z['string']()[a123_0x296328(0xc6)]()});function a123_0x3f31(_0x1ac234,_0x31fbdb){_0x1ac234=_0x1ac234-0xb7;const _0x53c893=a123_0x53c8();let _0x3f3174=_0x53c893[_0x1ac234];return _0x3f3174;}export const TemplateDefSchema=z['object']({'type':z['literal'](a123_0x296328(0xc8))[a123_0x296328(0xc5)](a123_0x296328(0xc8)),'name':z[a123_0x296328(0xc2)]()['min'](0x1,'Template\x20name\x20is\x20required'),'subject':z['string']()[a123_0x296328(0xc6)](),'html_file':z[a123_0x296328(0xc2)]()[a123_0x296328(0xc6)](),'plaintext_file':z['string']()[a123_0x296328(0xc6)](),'workspace':z[a123_0x296328(0xc2)]()[a123_0x296328(0xc6)](),'editor_type':z[a123_0x296328(0xc2)]()[a123_0x296328(0xc6)](),'variables':z[a123_0x296328(0xba)](TemplateVariableDefSchema)[a123_0x296328(0xc5)]([])});
|
package/dist/sdk/engage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a124_0x3e0b(){const _0x37f540=['workspaceId','isUUID','enableUtmTracking','Multiple\x20templates\x20found\x20with\x20name\x20\x22','finishAlwaysOnCampaign','normalizeCampaign','2toGBtQ','test','pauseAlwaysOnCampaign','createTemplate','Always-on\x20campaign\x20not\x20found\x20with\x20ID:\x20','audienceId','duplicateAlwaysOnCampaign','resumeCampaign','listAllCampaigns','updateWorkspace','resumeAlwaysOnCampaign','performAlwaysOnCampaignAction','offset','campaignType','audienceName','attributes','34706LdUmdw','createWorkspace','889485BsbJVC','deleteTemplate','length','createCampaign','client','launchAlwaysOnCampaign','filter','88vPjhsc','trim','Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.','createdAt','name','getWorkspaceFull','workspaceConfig','listAlwaysOnCampaigns','limit','152170DuOcnU','editorType','listWorkspaces','getCampaign','applicableDomains','listCampaigns','resolveWorkspaceId','INVALID_ARGUMENT','678668GMbziL','ownerUser','map','24WMFHpE','ensureArray','getWorkspace','\x22:\x20','normalizeTemplate','pausedAt','launchCampaign','updateCampaign','listAllTemplates','Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.','NOT_FOUND','Multiple\x20always-on\x20campaigns\x20found\x20with\x20name\x20\x22','description','resolveTemplateId','applicableParentSegments','Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.','Email\x20template\x20not\x20found\x20with\x20ID:\x20','subjectTemplate','updatedAt','Email\x20template\x20not\x20found:\x20','listTemplates','deleteWorkspace','pauseCampaign','launchedAt','type','deleteCampaign','7829892uMhiJr','normalizeWorkspace','code','92979dbBNPy','deleteAlwaysOnCampaign','getTemplateFull','Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.','resolveCampaignId','status','Always-on\x20campaign\x20not\x20found:\x20','5SSYCjG','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','104319qSSFHT','data','getAlwaysOnCampaign','getTemplate','normalizeAlwaysOnCampaign','Multiple\x20workspaces\x20found\x20with\x20name\x20\x22','join','264yPeuNd','Use\x20the\x20campaign\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20campaign.','updateTemplate','resolveAlwaysOnCampaignId','duplicateCampaign','updateAlwaysOnCampaign'];a124_0x3e0b=function(){return _0x37f540;};return a124_0x3e0b();}const a124_0x3f32b8=a124_0x578d;function a124_0x578d(_0x4e359e,_0x192d64){_0x4e359e=_0x4e359e-0x1c1;const _0x3e0b19=a124_0x3e0b();let _0x578d6d=_0x3e0b19[_0x4e359e];return _0x578d6d;}(function(_0xcc21d3,_0x281440){const _0x49a5ce=a124_0x578d,_0x5e2063=_0xcc21d3();while(!![]){try{const _0x549e37=parseInt(_0x49a5ce(0x1ca))/0x1*(-parseInt(_0x49a5ce(0x1e6))/0x2)+parseInt(_0x49a5ce(0x1f8))/0x3+parseInt(_0x49a5ce(0x210))/0x4*(-parseInt(_0x49a5ce(0x1d1))/0x5)+parseInt(_0x49a5ce(0x213))/0x6*(parseInt(_0x49a5ce(0x1f6))/0x7)+parseInt(_0x49a5ce(0x1da))/0x8*(-parseInt(_0x49a5ce(0x1d3))/0x9)+-parseInt(_0x49a5ce(0x208))/0xa*(parseInt(_0x49a5ce(0x1ff))/0xb)+parseInt(_0x49a5ce(0x1c7))/0xc;if(_0x549e37===_0x281440)break;else _0x5e2063['push'](_0x5e2063['shift']());}catch(_0x55c76b){_0x5e2063['push'](_0x5e2063['shift']());}}}(a124_0x3e0b,0x314cd));import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{paginate}from'./util/paginate.js';export class EngageSDK{[a124_0x3f32b8(0x1fc)];constructor(_0x33ef10){const _0x742ea2=a124_0x3f32b8;this[_0x742ea2(0x1fc)]=new EngageApiClient(_0x33ef10);}['ensureArray'](_0x2635f2){return Array['isArray'](_0x2635f2)?_0x2635f2:[_0x2635f2];}[a124_0x3f32b8(0x1e1)](_0x151f3f){const _0x25e236=a124_0x3f32b8;return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x25e236(0x1e7)](_0x151f3f);}async[a124_0x3f32b8(0x21b)](_0x2735f8){const _0x1b479e=a124_0x3f32b8;return paginate((_0x467034,_0x28c04c)=>this[_0x1b479e(0x1fc)][_0x1b479e(0x1c1)]({'workspaceId':_0x2735f8,'limit':_0x467034,'offset':_0x28c04c}));}async[a124_0x3f32b8(0x1ee)](_0x5b971f){const _0x4dacd0=a124_0x3f32b8;return paginate((_0x38cf3b,_0x43ffcc)=>this[_0x4dacd0(0x1fc)]['listCampaigns']({'workspaceId':_0x5b971f,'limit':_0x38cf3b,'offset':_0x43ffcc}));}['normalizeCampaign'](_0x117531){const _0x55b836=a124_0x3f32b8;return{'id':_0x117531['id'],'name':_0x117531['attributes'][_0x55b836(0x203)],'campaignType':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x1f3)],'status':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x1cf)],'description':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x21f)],'workspaceId':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x1e0)],'audienceId':_0x117531['attributes'][_0x55b836(0x1eb)],'audienceName':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x1f4)],'segmentId':_0x117531['attributes']['segmentId'],'segmentName':_0x117531['attributes']['segmentName'],'enableUtmTracking':_0x117531[_0x55b836(0x1f5)]['enableUtmTracking'],'createdAt':_0x117531['attributes'][_0x55b836(0x202)],'updatedAt':_0x117531['attributes']['updatedAt'],'launchedAt':_0x117531[_0x55b836(0x1f5)][_0x55b836(0x1c4)]};}[a124_0x3f32b8(0x217)](_0x3dff17){const _0x20ceb9=a124_0x3f32b8;return{'id':_0x3dff17['id'],'name':_0x3dff17['attributes'][_0x20ceb9(0x203)],'subjectTemplate':_0x3dff17[_0x20ceb9(0x1f5)][_0x20ceb9(0x224)],'workspaceId':_0x3dff17[_0x20ceb9(0x1f5)]['workspaceId'],'editorType':_0x3dff17['attributes'][_0x20ceb9(0x209)],'createdAt':_0x3dff17['attributes'][_0x20ceb9(0x202)],'updatedAt':_0x3dff17[_0x20ceb9(0x1f5)][_0x20ceb9(0x225)]};}[a124_0x3f32b8(0x1c8)](_0x1bb2d5){const _0x3d39eb=a124_0x3f32b8;return{'id':_0x1bb2d5['id'],'name':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x203)],'description':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x21f)],'ownerName':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x211)][_0x3d39eb(0x203)],'domainCount':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x205)][_0x3d39eb(0x20c)][_0x3d39eb(0x1fa)],'segmentCount':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x205)][_0x3d39eb(0x221)][_0x3d39eb(0x1fa)],'createdAt':_0x1bb2d5[_0x3d39eb(0x1f5)]['createdAt'],'updatedAt':_0x1bb2d5[_0x3d39eb(0x1f5)][_0x3d39eb(0x225)]};}async[a124_0x3f32b8(0x1ce)](_0x507df2,_0x348019){const _0x2fbd95=a124_0x3f32b8;if(this[_0x2fbd95(0x1e1)](_0x507df2))try{return await this['client'][_0x2fbd95(0x20b)](_0x507df2),_0x507df2;}catch(_0x35e209){if(_0x35e209 instanceof SDKError&&_0x35e209['code']===ErrorCode[_0x2fbd95(0x21d)])throw new SDKError(ErrorCode[_0x2fbd95(0x21d)],'Campaign\x20not\x20found\x20with\x20ID:\x20'+_0x507df2,_0x35e209,{'helpText':_0x2fbd95(0x1d2)});throw _0x35e209;}const _0x16388a=await this[_0x2fbd95(0x1ee)](_0x348019),_0x46350a=_0x507df2['trim'](),_0x3fc587=_0x16388a[_0x2fbd95(0x1fe)](_0x35f7f2=>_0x35f7f2[_0x2fbd95(0x1f5)][_0x2fbd95(0x203)]['trim']()===_0x46350a);if(_0x3fc587[_0x2fbd95(0x1fa)]===0x0)throw new SDKError(ErrorCode['NOT_FOUND'],'Campaign\x20not\x20found:\x20'+_0x507df2,undefined,{'helpText':_0x2fbd95(0x1d2)});if(_0x3fc587[_0x2fbd95(0x1fa)]>0x1){const _0x26d3de=_0x3fc587[_0x2fbd95(0x212)](_0x14d4e7=>_0x14d4e7['id'])[_0x2fbd95(0x1d9)](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20campaigns\x20found\x20with\x20name\x20\x22'+_0x507df2+_0x2fbd95(0x216)+_0x26d3de,undefined,{'helpText':'Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.'});}return _0x3fc587[0x0]['id'];}async[a124_0x3f32b8(0x220)](_0x3b4fae,_0x2a059a){const _0x2b038f=a124_0x3f32b8;if(this[_0x2b038f(0x1e1)](_0x3b4fae))try{const _0x474851=await this[_0x2b038f(0x1fc)][_0x2b038f(0x1d6)](_0x3b4fae),_0xb75fb9=this[_0x2b038f(0x214)](_0x474851['data'])[0x0];return{'id':_0x3b4fae,'name':_0xb75fb9['attributes']['name']};}catch(_0x3556eb){if(_0x3556eb instanceof SDKError&&_0x3556eb[_0x2b038f(0x1c9)]===ErrorCode[_0x2b038f(0x21d)])throw new SDKError(ErrorCode[_0x2b038f(0x21d)],_0x2b038f(0x223)+_0x3b4fae,_0x3556eb,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});throw _0x3556eb;}const _0x385ec0=await this[_0x2b038f(0x21b)](_0x2a059a),_0x392173=_0x3b4fae[_0x2b038f(0x200)](),_0x34eac0=_0x385ec0[_0x2b038f(0x1fe)](_0x5cec78=>_0x5cec78[_0x2b038f(0x1f5)][_0x2b038f(0x203)]['trim']()===_0x392173);if(_0x34eac0[_0x2b038f(0x1fa)]===0x0)throw new SDKError(ErrorCode[_0x2b038f(0x21d)],_0x2b038f(0x226)+_0x3b4fae,undefined,{'helpText':_0x2b038f(0x1cd)});if(_0x34eac0[_0x2b038f(0x1fa)]>0x1){const _0x10d041=_0x34eac0['map'](_0x3ed417=>_0x3ed417['id'])[_0x2b038f(0x1d9)](',\x20');throw new SDKError(ErrorCode[_0x2b038f(0x20f)],_0x2b038f(0x1e3)+_0x3b4fae+'\x22:\x20'+_0x10d041,undefined,{'helpText':'Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.'});}return{'id':_0x34eac0[0x0]['id'],'name':_0x34eac0[0x0]['attributes']['name']};}async[a124_0x3f32b8(0x20e)](_0x94c95){const _0x4b67da=a124_0x3f32b8;if(this[_0x4b67da(0x1e1)](_0x94c95))try{return await this[_0x4b67da(0x1fc)][_0x4b67da(0x215)](_0x94c95),_0x94c95;}catch(_0x333482){if(_0x333482 instanceof SDKError&&_0x333482['code']===ErrorCode[_0x4b67da(0x21d)])throw new SDKError(ErrorCode['NOT_FOUND'],'Workspace\x20not\x20found\x20with\x20ID:\x20'+_0x94c95,_0x333482,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});throw _0x333482;}const _0x5e43df=await this[_0x4b67da(0x1fc)]['listWorkspaces']({'name':_0x94c95}),_0x36604c=this[_0x4b67da(0x214)](_0x5e43df[_0x4b67da(0x1d4)]),_0x2d1b52=_0x94c95[_0x4b67da(0x200)](),_0x58e605=_0x36604c['filter'](_0x524c32=>_0x524c32['attributes'][_0x4b67da(0x203)][_0x4b67da(0x200)]()===_0x2d1b52);if(_0x58e605[_0x4b67da(0x1fa)]===0x0)throw new SDKError(ErrorCode[_0x4b67da(0x21d)],'Workspace\x20not\x20found:\x20'+_0x94c95,undefined,{'helpText':_0x4b67da(0x21c)});if(_0x58e605[_0x4b67da(0x1fa)]>0x1){const _0x16ec32=_0x58e605['map'](_0x2b56a1=>_0x2b56a1['id'])['join'](',\x20');throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4b67da(0x1d8)+_0x94c95+_0x4b67da(0x216)+_0x16ec32,undefined,{'helpText':_0x4b67da(0x222)});}return _0x58e605[0x0]['id'];}async[a124_0x3f32b8(0x20d)](_0x2e81a2){const _0x311246=a124_0x3f32b8,_0x26d884=await paginate((_0x24a45b,_0x56e567)=>this['client']['listCampaigns']({'campaignType':_0x2e81a2?.[_0x311246(0x1c5)],'status':_0x2e81a2?.[_0x311246(0x1cf)],'workspaceId':_0x2e81a2?.['workspaceId'],'limit':_0x24a45b,'offset':_0x56e567}),_0x2e81a2?.[_0x311246(0x207)],_0x2e81a2?.[_0x311246(0x1f2)]);return _0x26d884[_0x311246(0x212)](_0xaa3acf=>this[_0x311246(0x1e5)](_0xaa3acf));}async[a124_0x3f32b8(0x20b)](_0x3d3d1b,_0x59f32e){const _0x48dea2=a124_0x3f32b8,_0xcb320e=await this['resolveCampaignId'](_0x3d3d1b,_0x59f32e),_0x5e1126=await this[_0x48dea2(0x1fc)][_0x48dea2(0x20b)](_0xcb320e);return this[_0x48dea2(0x1e5)](_0x5e1126[_0x48dea2(0x1d4)]);}async['getCampaignFull'](_0x1f2b59,_0x1b7592){const _0x5bcbf5=a124_0x3f32b8,_0x296f28=await this[_0x5bcbf5(0x1ce)](_0x1f2b59,_0x1b7592),_0x1f2df5=await this[_0x5bcbf5(0x1fc)][_0x5bcbf5(0x20b)](_0x296f28);return _0x1f2df5[_0x5bcbf5(0x1d4)];}async[a124_0x3f32b8(0x1fb)](_0x3ae527){const _0x1dcea2=a124_0x3f32b8,_0x244389=await this[_0x1dcea2(0x1fc)][_0x1dcea2(0x1fb)](_0x3ae527);return this[_0x1dcea2(0x1e5)](_0x244389['data']);}async[a124_0x3f32b8(0x21a)](_0x474520,_0x351183,_0x3ea7b2){const _0x2869aa=a124_0x3f32b8,_0x4a6e9f=await this[_0x2869aa(0x1ce)](_0x474520,_0x3ea7b2),_0x5d7a9b=await this[_0x2869aa(0x1fc)][_0x2869aa(0x21a)](_0x4a6e9f,_0x351183);return this[_0x2869aa(0x1e5)](_0x5d7a9b['data']);}async[a124_0x3f32b8(0x1c6)](_0x5c9ddc,_0x1f92ad){const _0x4e5523=a124_0x3f32b8,_0x4644aa=await this[_0x4e5523(0x1ce)](_0x5c9ddc,_0x1f92ad);await this['client']['deleteCampaign'](_0x4644aa);}async[a124_0x3f32b8(0x219)](_0x2626f7,_0x410f73){const _0x526065=await this['resolveCampaignId'](_0x2626f7,_0x410f73);await this['client']['launchCampaign'](_0x526065);}async[a124_0x3f32b8(0x1c3)](_0x20776b,_0x500604){const _0x4279a7=a124_0x3f32b8,_0x52e7da=await this['resolveCampaignId'](_0x20776b,_0x500604);await this[_0x4279a7(0x1fc)]['pauseCampaign'](_0x52e7da);}async[a124_0x3f32b8(0x1ed)](_0x2e7ef5,_0x2ad42f){const _0x4bfb8a=a124_0x3f32b8,_0x3b01bc=await this[_0x4bfb8a(0x1ce)](_0x2e7ef5,_0x2ad42f);await this[_0x4bfb8a(0x1fc)][_0x4bfb8a(0x1ed)](_0x3b01bc);}async[a124_0x3f32b8(0x1de)](_0x39bac9,_0x10327c){const _0x5f3584=a124_0x3f32b8,_0xcc0a3d=await this[_0x5f3584(0x1ce)](_0x39bac9,_0x10327c),_0x26123c=await this[_0x5f3584(0x1fc)][_0x5f3584(0x1de)](_0xcc0a3d);return this[_0x5f3584(0x1e5)](_0x26123c[_0x5f3584(0x1d4)]);}async[a124_0x3f32b8(0x1c1)](_0x247189){const _0x39043a=a124_0x3f32b8,_0x580227=await paginate((_0x3dbd23,_0x286bba)=>this[_0x39043a(0x1fc)]['listTemplates']({'workspaceId':_0x247189?.[_0x39043a(0x1e0)],'limit':_0x3dbd23,'offset':_0x286bba,'sort':'-updatedAt'}),_0x247189?.[_0x39043a(0x207)],_0x247189?.[_0x39043a(0x1f2)]);return _0x580227[_0x39043a(0x212)](_0x5c6b3b=>this['normalizeTemplate'](_0x5c6b3b));}async['getTemplate'](_0x4c6298,_0x18656a){const _0x55b100=a124_0x3f32b8,{id:_0x41448f}=await this[_0x55b100(0x220)](_0x4c6298,_0x18656a),_0x3f762b=await this['client']['getTemplate'](_0x41448f);return this[_0x55b100(0x217)](_0x3f762b[_0x55b100(0x1d4)]);}async[a124_0x3f32b8(0x1cc)](_0x446614,_0x483d72){const _0x2e1f84=a124_0x3f32b8,{id:_0x1449b9}=await this['resolveTemplateId'](_0x446614,_0x483d72),_0x3c4213=await this[_0x2e1f84(0x1fc)][_0x2e1f84(0x1d6)](_0x1449b9);return _0x3c4213['data'];}async[a124_0x3f32b8(0x1e9)](_0x26bb08){const _0x5d1ac6=a124_0x3f32b8,_0x4bcf07=await this[_0x5d1ac6(0x1fc)][_0x5d1ac6(0x1e9)](_0x26bb08);return this[_0x5d1ac6(0x217)](_0x4bcf07[_0x5d1ac6(0x1d4)]);}async[a124_0x3f32b8(0x1dc)](_0x3b4a6e,_0x2ebf66,_0x6ad553){const _0x4c8ef0=a124_0x3f32b8,{id:_0x19890a}=await this[_0x4c8ef0(0x220)](_0x3b4a6e,_0x6ad553),_0x525cef=await this[_0x4c8ef0(0x1fc)][_0x4c8ef0(0x1dc)](_0x19890a,_0x2ebf66);return this['normalizeTemplate'](_0x525cef[_0x4c8ef0(0x1d4)]);}async[a124_0x3f32b8(0x1f9)](_0x1a848e,_0x29ac9b){const _0x2f5a74=a124_0x3f32b8,{id:_0x2c8835}=await this[_0x2f5a74(0x220)](_0x1a848e,_0x29ac9b);await this[_0x2f5a74(0x1fc)][_0x2f5a74(0x1f9)](_0x2c8835);}async[a124_0x3f32b8(0x20a)](_0x1dfad3){const _0x56464d=a124_0x3f32b8,_0x1a5630=await paginate((_0x517029,_0x1f62f6)=>this[_0x56464d(0x1fc)][_0x56464d(0x20a)]({'name':_0x1dfad3?.[_0x56464d(0x203)],'limit':_0x517029,'offset':_0x1f62f6}),_0x1dfad3?.[_0x56464d(0x207)],_0x1dfad3?.[_0x56464d(0x1f2)]);return _0x1a5630[_0x56464d(0x212)](_0x3f54ee=>this[_0x56464d(0x1c8)](_0x3f54ee));}async[a124_0x3f32b8(0x215)](_0x1178b5){const _0x56436a=a124_0x3f32b8,_0x3b1d=await this['resolveWorkspaceId'](_0x1178b5),_0x541bcd=await this['client']['getWorkspace'](_0x3b1d);return this[_0x56436a(0x1c8)](_0x541bcd[_0x56436a(0x1d4)]);}async[a124_0x3f32b8(0x204)](_0x1f845d){const _0x46e00a=a124_0x3f32b8,_0x278dc0=await this[_0x46e00a(0x20e)](_0x1f845d),_0x236bce=await this[_0x46e00a(0x1fc)][_0x46e00a(0x215)](_0x278dc0);return _0x236bce[_0x46e00a(0x1d4)];}async[a124_0x3f32b8(0x1f7)](_0x1e9fe1){const _0x423973=a124_0x3f32b8,_0x1648c5=await this[_0x423973(0x1fc)][_0x423973(0x1f7)](_0x1e9fe1);return this['normalizeWorkspace'](_0x1648c5['data']);}async[a124_0x3f32b8(0x1ef)](_0x44a3f5,_0x49c872){const _0x50b617=a124_0x3f32b8,_0x54df64=await this[_0x50b617(0x20e)](_0x44a3f5),_0x4f60ea=await this[_0x50b617(0x1fc)][_0x50b617(0x1ef)](_0x54df64,_0x49c872);return this['normalizeWorkspace'](_0x4f60ea[_0x50b617(0x1d4)]);}async[a124_0x3f32b8(0x1c2)](_0x418f4d){const _0xe5e022=a124_0x3f32b8,_0x5f0ebd=await this['resolveWorkspaceId'](_0x418f4d);await this[_0xe5e022(0x1fc)][_0xe5e022(0x1c2)](_0x5f0ebd);}async['listAllAlwaysOnCampaigns'](_0x21eade){const _0x159a29=a124_0x3f32b8;return paginate((_0x1b19b0,_0x3ce92b)=>this[_0x159a29(0x1fc)][_0x159a29(0x206)](_0x21eade,{'limit':_0x1b19b0,'offset':_0x3ce92b}));}['normalizeAlwaysOnCampaign'](_0x415b7){const _0x1690ea=a124_0x3f32b8;return{'id':_0x415b7['id'],'name':_0x415b7[_0x1690ea(0x1f5)]['name'],'campaignType':_0x415b7[_0x1690ea(0x1f5)]['campaignType'],'status':_0x415b7['attributes'][_0x1690ea(0x1cf)],'description':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x21f)],'workspaceId':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x1e0)],'audienceId':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x1eb)],'audienceName':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x1f4)],'enableUtmTracking':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x1e2)],'createdAt':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x202)],'updatedAt':_0x415b7['attributes'][_0x1690ea(0x225)],'launchedAt':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x1c4)],'pausedAt':_0x415b7[_0x1690ea(0x1f5)][_0x1690ea(0x218)],'resumedAt':_0x415b7['attributes']['resumedAt'],'finishedAt':_0x415b7[_0x1690ea(0x1f5)]['finishedAt']};}async[a124_0x3f32b8(0x1dd)](_0x2a73a3,_0xeaea7d){const _0x36c5c8=a124_0x3f32b8;if(this['isUUID'](_0xeaea7d))try{return await this[_0x36c5c8(0x1fc)]['getAlwaysOnCampaign'](_0x2a73a3,_0xeaea7d),_0xeaea7d;}catch(_0x2c0477){if(_0x2c0477 instanceof SDKError&&_0x2c0477[_0x36c5c8(0x1c9)]===ErrorCode[_0x36c5c8(0x21d)])throw new SDKError(ErrorCode[_0x36c5c8(0x21d)],_0x36c5c8(0x1ea)+_0xeaea7d,_0x2c0477,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.'});throw _0x2c0477;}const _0x19a325=await this['listAllAlwaysOnCampaigns'](_0x2a73a3),_0x5b3600=_0xeaea7d['trim'](),_0x514a5d=_0x19a325[_0x36c5c8(0x1fe)](_0x1d787=>_0x1d787['attributes'][_0x36c5c8(0x203)][_0x36c5c8(0x200)]()===_0x5b3600);if(_0x514a5d[_0x36c5c8(0x1fa)]===0x0)throw new SDKError(ErrorCode[_0x36c5c8(0x21d)],_0x36c5c8(0x1d0)+_0xeaea7d,undefined,{'helpText':_0x36c5c8(0x201)});if(_0x514a5d['length']>0x1){const _0x5dee9c=_0x514a5d[_0x36c5c8(0x212)](_0x55bc85=>_0x55bc85['id'])[_0x36c5c8(0x1d9)](',\x20');throw new SDKError(ErrorCode[_0x36c5c8(0x20f)],_0x36c5c8(0x21e)+_0xeaea7d+_0x36c5c8(0x216)+_0x5dee9c,undefined,{'helpText':_0x36c5c8(0x1db)});}return _0x514a5d[0x0]['id'];}async['listAlwaysOnCampaigns'](_0x4fef68){const _0x48a10d=a124_0x3f32b8,_0x2b697f=await paginate((_0x5f5ce7,_0x11e21f)=>this[_0x48a10d(0x1fc)][_0x48a10d(0x206)](_0x4fef68[_0x48a10d(0x1e0)],{'campaignType':_0x4fef68[_0x48a10d(0x1c5)],'status':_0x4fef68[_0x48a10d(0x1cf)],'limit':_0x5f5ce7,'offset':_0x11e21f}),_0x4fef68[_0x48a10d(0x207)],_0x4fef68[_0x48a10d(0x1f2)]);return _0x2b697f[_0x48a10d(0x212)](_0x53daf5=>this[_0x48a10d(0x1d7)](_0x53daf5));}async['getAlwaysOnCampaign'](_0x200afe,_0x4a6177){const _0x5b520d=a124_0x3f32b8,_0x47e3c4=await this[_0x5b520d(0x1dd)](_0x200afe,_0x4a6177),_0x46ec58=await this[_0x5b520d(0x1fc)][_0x5b520d(0x1d5)](_0x200afe,_0x47e3c4);return this[_0x5b520d(0x1d7)](_0x46ec58[_0x5b520d(0x1d4)]);}async['getAlwaysOnCampaignFull'](_0x201c65,_0x4b552d){const _0x3e253f=a124_0x3f32b8,_0x533259=await this[_0x3e253f(0x1dd)](_0x201c65,_0x4b552d),_0x12a137=await this['client']['getAlwaysOnCampaign'](_0x201c65,_0x533259);return _0x12a137[_0x3e253f(0x1d4)];}async['createAlwaysOnCampaign'](_0x184488,_0x3f0152){const _0x4ebf60=a124_0x3f32b8,_0x12faf4=await this[_0x4ebf60(0x1fc)]['createAlwaysOnCampaign'](_0x184488,_0x3f0152);return this[_0x4ebf60(0x1d7)](_0x12faf4[_0x4ebf60(0x1d4)]);}async[a124_0x3f32b8(0x1df)](_0x50f1ff,_0x5d36c7,_0x554ad1){const _0x332de3=a124_0x3f32b8,_0x591e27=await this['resolveAlwaysOnCampaignId'](_0x50f1ff,_0x5d36c7),_0x596a5e=await this[_0x332de3(0x1fc)][_0x332de3(0x1df)](_0x50f1ff,_0x591e27,_0x554ad1);return this['normalizeAlwaysOnCampaign'](_0x596a5e[_0x332de3(0x1d4)]);}async[a124_0x3f32b8(0x1cb)](_0x4c5413,_0x2cec63){const _0x252242=a124_0x3f32b8,_0x166bbf=await this[_0x252242(0x1dd)](_0x4c5413,_0x2cec63);await this[_0x252242(0x1fc)][_0x252242(0x1cb)](_0x4c5413,_0x166bbf);}async[a124_0x3f32b8(0x1f1)](_0x32a7d7,_0x5b913d,_0x1b3944){const _0x16fb6f=await this['resolveAlwaysOnCampaignId'](_0x32a7d7,_0x5b913d);await _0x1b3944(_0x32a7d7,_0x16fb6f);}async['launchAlwaysOnCampaign'](_0x48018a,_0x2592d2){const _0x230f94=a124_0x3f32b8;await this[_0x230f94(0x1f1)](_0x48018a,_0x2592d2,(_0x203729,_0x40c4d1)=>this[_0x230f94(0x1fc)][_0x230f94(0x1fd)](_0x203729,_0x40c4d1));}async[a124_0x3f32b8(0x1e8)](_0x325e21,_0x3881f8){const _0x50e420=a124_0x3f32b8;await this[_0x50e420(0x1f1)](_0x325e21,_0x3881f8,(_0x1661fa,_0x4878ce)=>this[_0x50e420(0x1fc)][_0x50e420(0x1e8)](_0x1661fa,_0x4878ce));}async[a124_0x3f32b8(0x1f0)](_0x359b79,_0x29cbf2){const _0x2ca801=a124_0x3f32b8;await this[_0x2ca801(0x1f1)](_0x359b79,_0x29cbf2,(_0x6815a1,_0x3853f8)=>this[_0x2ca801(0x1fc)]['resumeAlwaysOnCampaign'](_0x6815a1,_0x3853f8));}async[a124_0x3f32b8(0x1e4)](_0x349cb8,_0x567dfd){const _0x566521=a124_0x3f32b8;await this[_0x566521(0x1f1)](_0x349cb8,_0x567dfd,(_0x59e6cf,_0x46618c)=>this[_0x566521(0x1fc)][_0x566521(0x1e4)](_0x59e6cf,_0x46618c));}async[a124_0x3f32b8(0x1ec)](_0x27f654,_0x34dc42,_0x23d636){const _0x56ed9f=a124_0x3f32b8,_0x5871c7=await this[_0x56ed9f(0x1dd)](_0x27f654,_0x34dc42),_0xfcad22=await this[_0x56ed9f(0x1fc)][_0x56ed9f(0x1ec)](_0x27f654,_0x5871c7,_0x23d636);return this[_0x56ed9f(0x1d7)](_0xfcad22[_0x56ed9f(0x1d4)]);}}
|
|
1
|
+
const a124_0x1ec2f4=a124_0x1d33;function a124_0x1d33(_0x1144b1,_0x588384){_0x1144b1=_0x1144b1-0x79;const _0x44e67b=a124_0x44e6();let _0x1d3385=_0x44e67b[_0x1144b1];return _0x1d3385;}(function(_0x20f0a6,_0x54e20b){const _0x3ac021=a124_0x1d33,_0x30206b=_0x20f0a6();while(!![]){try{const _0x1e33e9=parseInt(_0x3ac021(0xc4))/0x1*(-parseInt(_0x3ac021(0x8b))/0x2)+-parseInt(_0x3ac021(0xd7))/0x3*(-parseInt(_0x3ac021(0xdc))/0x4)+parseInt(_0x3ac021(0xe4))/0x5*(-parseInt(_0x3ac021(0xca))/0x6)+parseInt(_0x3ac021(0xb4))/0x7*(-parseInt(_0x3ac021(0x9b))/0x8)+-parseInt(_0x3ac021(0xdb))/0x9+-parseInt(_0x3ac021(0xaf))/0xa*(parseInt(_0x3ac021(0xb0))/0xb)+parseInt(_0x3ac021(0xad))/0xc;if(_0x1e33e9===_0x54e20b)break;else _0x30206b['push'](_0x30206b['shift']());}catch(_0x41cdbd){_0x30206b['push'](_0x30206b['shift']());}}}(a124_0x44e6,0x36ae5));function a124_0x44e6(){const _0x48bbf7=['normalizeWorkspace','limit','data','Campaign\x20not\x20found\x20with\x20ID:\x20','name','trim','description','duplicateAlwaysOnCampaign','pauseCampaign','14336448GvjsDv','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20campaign\x20UUID\x20directly.','70vedktJ','226963CiOpXx','listAllCampaigns','Use\x20--workspace-id\x20to\x20narrow\x20the\x20search,\x20or\x20use\x20the\x20template\x20UUID\x20directly.','getCampaignFull','2583DApNCx','getTemplateFull','listCampaigns','Always-on\x20campaign\x20not\x20found\x20with\x20ID:\x20','Multiple\x20campaigns\x20found\x20with\x20name\x20\x22','resumeAlwaysOnCampaign','test','offset','audienceName','createdAt','resolveAlwaysOnCampaignId','filter','attributes','isArray','map','NOT_FOUND','3PqBnYT','createAlwaysOnCampaign','getAlwaysOnCampaignFull','Multiple\x20workspaces\x20found\x20with\x20name\x20\x22','Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.','duplicateCampaign','6rfmmQd','Email\x20template\x20not\x20found:\x20','join','Workspace\x20not\x20found\x20with\x20ID:\x20','updatedAt','Multiple\x20templates\x20found\x20with\x20name\x20\x22','Always-on\x20campaign\x20not\x20found:\x20','getWorkspaceFull','createCampaign','getTemplate','updateCampaign','deleteTemplate','updateAlwaysOnCampaign','465lYIPoP','length','normalizeAlwaysOnCampaign','ensureArray','295227OXcHAG','188lvXNxP','listAlwaysOnCampaigns','Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.','updateTemplate','listTemplates','INVALID_ARGUMENT','\x22:\x20','workspaceConfig','1402355jDKbZs','launchAlwaysOnCampaign','getCampaign','Email\x20template\x20not\x20found\x20with\x20ID:\x20','deleteWorkspace','Use\x20the\x20campaign\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20campaign.','segmentName','workspaceId','code','type','performAlwaysOnCampaignAction','normalizeTemplate','Multiple\x20always-on\x20campaigns\x20found\x20with\x20name\x20\x22','resumeCampaign','pausedAt','createWorkspace','updateWorkspace','resolveWorkspaceId','listAllAlwaysOnCampaigns','deleteCampaign','status','isUUID','233468stsTMq','campaignType','enableUtmTracking','applicableParentSegments','createTemplate','getAlwaysOnCampaign','Workspace\x20not\x20found:\x20','launchCampaign','resolveCampaignId','ownerUser','audienceId','editorType','client','getWorkspace','resolveTemplateId','listAllTemplates','3688wbBifs','finishAlwaysOnCampaign','normalizeCampaign','listWorkspaces','finishedAt','deleteAlwaysOnCampaign','Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.','segmentId','pauseAlwaysOnCampaign'];a124_0x44e6=function(){return _0x48bbf7;};return a124_0x44e6();}import{EngageApiClient}from'./client/engage-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{paginate}from'./util/paginate.js';export class EngageSDK{[a124_0x1ec2f4(0x97)];constructor(_0x47e651){const _0x971329=a124_0x1ec2f4;this[_0x971329(0x97)]=new EngageApiClient(_0x47e651);}[a124_0x1ec2f4(0xda)](_0x5489b8){const _0x2bcbda=a124_0x1ec2f4;return Array[_0x2bcbda(0xc1)](_0x5489b8)?_0x5489b8:[_0x5489b8];}[a124_0x1ec2f4(0x8a)](_0x159ef5){const _0x230880=a124_0x1ec2f4;return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x230880(0xba)](_0x159ef5);}async[a124_0x1ec2f4(0x9a)](_0x128585){const _0x2c530d=a124_0x1ec2f4;return paginate((_0x323334,_0x445355)=>this['client'][_0x2c530d(0xe0)]({'workspaceId':_0x128585,'limit':_0x323334,'offset':_0x445355}));}async[a124_0x1ec2f4(0xb1)](_0x45120b){const _0x2f71b2=a124_0x1ec2f4;return paginate((_0x157ac4,_0x113d44)=>this['client'][_0x2f71b2(0xb6)]({'workspaceId':_0x45120b,'limit':_0x157ac4,'offset':_0x113d44}));}[a124_0x1ec2f4(0x9d)](_0x3d9854){const _0x203e0b=a124_0x1ec2f4;return{'id':_0x3d9854['id'],'name':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0xa8)],'campaignType':_0x3d9854['attributes']['campaignType'],'status':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0x89)],'description':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0xaa)],'workspaceId':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0x7c)],'audienceId':_0x3d9854[_0x203e0b(0xc0)]['audienceId'],'audienceName':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0xbc)],'segmentId':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0xa2)],'segmentName':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0x7b)],'enableUtmTracking':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0x8d)],'createdAt':_0x3d9854[_0x203e0b(0xc0)][_0x203e0b(0xbd)],'updatedAt':_0x3d9854['attributes'][_0x203e0b(0xce)],'launchedAt':_0x3d9854[_0x203e0b(0xc0)]['launchedAt']};}['normalizeTemplate'](_0x3230d4){const _0x29e548=a124_0x1ec2f4;return{'id':_0x3230d4['id'],'name':_0x3230d4['attributes'][_0x29e548(0xa8)],'subjectTemplate':_0x3230d4[_0x29e548(0xc0)]['subjectTemplate'],'workspaceId':_0x3230d4[_0x29e548(0xc0)][_0x29e548(0x7c)],'editorType':_0x3230d4[_0x29e548(0xc0)][_0x29e548(0x96)],'createdAt':_0x3230d4[_0x29e548(0xc0)]['createdAt'],'updatedAt':_0x3230d4[_0x29e548(0xc0)]['updatedAt']};}[a124_0x1ec2f4(0xa4)](_0x14507b){const _0xbf819a=a124_0x1ec2f4;return{'id':_0x14507b['id'],'name':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0xa8)],'description':_0x14507b[_0xbf819a(0xc0)]['description'],'ownerName':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0x94)]['name'],'domainCount':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0xe3)]['applicableDomains']['length'],'segmentCount':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0xe3)][_0xbf819a(0x8e)][_0xbf819a(0xd8)],'createdAt':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0xbd)],'updatedAt':_0x14507b[_0xbf819a(0xc0)][_0xbf819a(0xce)]};}async[a124_0x1ec2f4(0x93)](_0x561cc5,_0x401092){const _0xb7403b=a124_0x1ec2f4;if(this['isUUID'](_0x561cc5))try{return await this[_0xb7403b(0x97)][_0xb7403b(0xe6)](_0x561cc5),_0x561cc5;}catch(_0x4f020d){if(_0x4f020d instanceof SDKError&&_0x4f020d[_0xb7403b(0x7d)]===ErrorCode[_0xb7403b(0xc3)])throw new SDKError(ErrorCode[_0xb7403b(0xc3)],_0xb7403b(0xa7)+_0x561cc5,_0x4f020d,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x22\x20to\x20see\x20available\x20campaigns.'});throw _0x4f020d;}const _0x9bbcac=await this[_0xb7403b(0xb1)](_0x401092),_0x5f27bd=_0x561cc5[_0xb7403b(0xa9)](),_0x4a9491=_0x9bbcac[_0xb7403b(0xbf)](_0x4d3f5d=>_0x4d3f5d[_0xb7403b(0xc0)]['name']['trim']()===_0x5f27bd);if(_0x4a9491[_0xb7403b(0xd8)]===0x0)throw new SDKError(ErrorCode['NOT_FOUND'],'Campaign\x20not\x20found:\x20'+_0x561cc5,undefined,{'helpText':_0xb7403b(0xc8)});if(_0x4a9491[_0xb7403b(0xd8)]>0x1){const _0x2a8438=_0x4a9491['map'](_0xdd0240=>_0xdd0240['id'])[_0xb7403b(0xcc)](',\x20');throw new SDKError(ErrorCode[_0xb7403b(0xe1)],_0xb7403b(0xb8)+_0x561cc5+_0xb7403b(0xe2)+_0x2a8438,undefined,{'helpText':_0xb7403b(0xae)});}return _0x4a9491[0x0]['id'];}async['resolveTemplateId'](_0x4918b3,_0x1cbd33){const _0x4b001d=a124_0x1ec2f4;if(this[_0x4b001d(0x8a)](_0x4918b3))try{const _0x291c58=await this[_0x4b001d(0x97)][_0x4b001d(0xd3)](_0x4918b3),_0x4e213a=this[_0x4b001d(0xda)](_0x291c58[_0x4b001d(0xa6)])[0x0];return{'id':_0x4918b3,'name':_0x4e213a[_0x4b001d(0xc0)]['name']};}catch(_0x101dba){if(_0x101dba instanceof SDKError&&_0x101dba[_0x4b001d(0x7d)]===ErrorCode[_0x4b001d(0xc3)])throw new SDKError(ErrorCode['NOT_FOUND'],_0x4b001d(0xe7)+_0x4918b3,_0x101dba,{'helpText':'Use\x20\x22tdx\x20engage\x20template\x20list\x22\x20to\x20see\x20available\x20templates.'});throw _0x101dba;}const _0x4a74fd=await this['listAllTemplates'](_0x1cbd33),_0x425411=_0x4918b3[_0x4b001d(0xa9)](),_0x18da82=_0x4a74fd[_0x4b001d(0xbf)](_0xdb1a5b=>_0xdb1a5b[_0x4b001d(0xc0)][_0x4b001d(0xa8)][_0x4b001d(0xa9)]()===_0x425411);if(_0x18da82[_0x4b001d(0xd8)]===0x0)throw new SDKError(ErrorCode['NOT_FOUND'],_0x4b001d(0xcb)+_0x4918b3,undefined,{'helpText':_0x4b001d(0xde)});if(_0x18da82['length']>0x1){const _0x571e24=_0x18da82[_0x4b001d(0xc2)](_0x22b86c=>_0x22b86c['id'])[_0x4b001d(0xcc)](',\x20');throw new SDKError(ErrorCode[_0x4b001d(0xe1)],_0x4b001d(0xcf)+_0x4918b3+_0x4b001d(0xe2)+_0x571e24,undefined,{'helpText':_0x4b001d(0xb2)});}return{'id':_0x18da82[0x0]['id'],'name':_0x18da82[0x0][_0x4b001d(0xc0)][_0x4b001d(0xa8)]};}async[a124_0x1ec2f4(0x86)](_0x2dd0d5){const _0x48b559=a124_0x1ec2f4;if(this[_0x48b559(0x8a)](_0x2dd0d5))try{return await this[_0x48b559(0x97)][_0x48b559(0x98)](_0x2dd0d5),_0x2dd0d5;}catch(_0x4acb92){if(_0x4acb92 instanceof SDKError&&_0x4acb92[_0x48b559(0x7d)]===ErrorCode[_0x48b559(0xc3)])throw new SDKError(ErrorCode[_0x48b559(0xc3)],_0x48b559(0xcd)+_0x2dd0d5,_0x4acb92,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});throw _0x4acb92;}const _0x336b61=await this[_0x48b559(0x97)][_0x48b559(0x9e)]({'name':_0x2dd0d5}),_0xbc6d63=this[_0x48b559(0xda)](_0x336b61[_0x48b559(0xa6)]),_0x25d8ee=_0x2dd0d5[_0x48b559(0xa9)](),_0x147f9f=_0xbc6d63[_0x48b559(0xbf)](_0x3e6111=>_0x3e6111[_0x48b559(0xc0)][_0x48b559(0xa8)][_0x48b559(0xa9)]()===_0x25d8ee);if(_0x147f9f[_0x48b559(0xd8)]===0x0)throw new SDKError(ErrorCode[_0x48b559(0xc3)],_0x48b559(0x91)+_0x2dd0d5,undefined,{'helpText':'Use\x20\x22tdx\x20engage\x20workspace\x20list\x22\x20to\x20see\x20available\x20workspaces.'});if(_0x147f9f[_0x48b559(0xd8)]>0x1){const _0x19a49a=_0x147f9f[_0x48b559(0xc2)](_0x21bd02=>_0x21bd02['id'])[_0x48b559(0xcc)](',\x20');throw new SDKError(ErrorCode[_0x48b559(0xe1)],_0x48b559(0xc7)+_0x2dd0d5+_0x48b559(0xe2)+_0x19a49a,undefined,{'helpText':'Use\x20the\x20workspace\x20UUID\x20directly\x20to\x20select\x20a\x20specific\x20workspace.'});}return _0x147f9f[0x0]['id'];}async['listCampaigns'](_0x2027e9){const _0x147bca=a124_0x1ec2f4,_0x141765=await paginate((_0x52df9a,_0xf3f4d9)=>this[_0x147bca(0x97)]['listCampaigns']({'campaignType':_0x2027e9?.[_0x147bca(0x7e)],'status':_0x2027e9?.['status'],'workspaceId':_0x2027e9?.[_0x147bca(0x7c)],'limit':_0x52df9a,'offset':_0xf3f4d9}),_0x2027e9?.[_0x147bca(0xa5)],_0x2027e9?.[_0x147bca(0xbb)]);return _0x141765['map'](_0x3348af=>this[_0x147bca(0x9d)](_0x3348af));}async[a124_0x1ec2f4(0xe6)](_0x154a0d,_0x4dbf51){const _0x1a4ad9=a124_0x1ec2f4,_0x49e837=await this['resolveCampaignId'](_0x154a0d,_0x4dbf51),_0x359565=await this[_0x1a4ad9(0x97)]['getCampaign'](_0x49e837);return this[_0x1a4ad9(0x9d)](_0x359565[_0x1a4ad9(0xa6)]);}async[a124_0x1ec2f4(0xb3)](_0x3eefea,_0x258742){const _0x101301=a124_0x1ec2f4,_0x23c93f=await this[_0x101301(0x93)](_0x3eefea,_0x258742),_0x32d711=await this[_0x101301(0x97)][_0x101301(0xe6)](_0x23c93f);return _0x32d711[_0x101301(0xa6)];}async[a124_0x1ec2f4(0xd2)](_0x37e3f5){const _0x2a6104=a124_0x1ec2f4,_0x24da38=await this[_0x2a6104(0x97)][_0x2a6104(0xd2)](_0x37e3f5);return this[_0x2a6104(0x9d)](_0x24da38[_0x2a6104(0xa6)]);}async[a124_0x1ec2f4(0xd4)](_0x74bded,_0x523e2f,_0x1eaa71){const _0x1ebdc8=a124_0x1ec2f4,_0x532990=await this[_0x1ebdc8(0x93)](_0x74bded,_0x1eaa71),_0x527bdf=await this[_0x1ebdc8(0x97)][_0x1ebdc8(0xd4)](_0x532990,_0x523e2f);return this[_0x1ebdc8(0x9d)](_0x527bdf[_0x1ebdc8(0xa6)]);}async[a124_0x1ec2f4(0x88)](_0x17ac3f,_0x28fa8e){const _0x41c94d=a124_0x1ec2f4,_0x2ded56=await this[_0x41c94d(0x93)](_0x17ac3f,_0x28fa8e);await this[_0x41c94d(0x97)]['deleteCampaign'](_0x2ded56);}async[a124_0x1ec2f4(0x92)](_0x371089,_0x359388){const _0x26c7f6=a124_0x1ec2f4,_0x57ebe3=await this[_0x26c7f6(0x93)](_0x371089,_0x359388);await this[_0x26c7f6(0x97)]['launchCampaign'](_0x57ebe3);}async[a124_0x1ec2f4(0xac)](_0x9f35c6,_0x12a7e4){const _0x44cdbb=a124_0x1ec2f4,_0x4ba666=await this[_0x44cdbb(0x93)](_0x9f35c6,_0x12a7e4);await this['client'][_0x44cdbb(0xac)](_0x4ba666);}async[a124_0x1ec2f4(0x82)](_0x7624f,_0x4c190f){const _0x3b805e=a124_0x1ec2f4,_0x14246f=await this[_0x3b805e(0x93)](_0x7624f,_0x4c190f);await this['client'][_0x3b805e(0x82)](_0x14246f);}async['duplicateCampaign'](_0x36acfd,_0x270516){const _0x2d1c7c=a124_0x1ec2f4,_0x4e4ad6=await this[_0x2d1c7c(0x93)](_0x36acfd,_0x270516),_0x517f68=await this[_0x2d1c7c(0x97)][_0x2d1c7c(0xc9)](_0x4e4ad6);return this[_0x2d1c7c(0x9d)](_0x517f68[_0x2d1c7c(0xa6)]);}async[a124_0x1ec2f4(0xe0)](_0x4caca6){const _0x4b7d71=a124_0x1ec2f4,_0x42aaa9=await paginate((_0x44b91b,_0x2a1ef3)=>this[_0x4b7d71(0x97)][_0x4b7d71(0xe0)]({'workspaceId':_0x4caca6?.[_0x4b7d71(0x7c)],'limit':_0x44b91b,'offset':_0x2a1ef3,'sort':'-updatedAt'}),_0x4caca6?.[_0x4b7d71(0xa5)],_0x4caca6?.['offset']);return _0x42aaa9[_0x4b7d71(0xc2)](_0x3afaa8=>this[_0x4b7d71(0x80)](_0x3afaa8));}async[a124_0x1ec2f4(0xd3)](_0x2b7a06,_0x3e8e0c){const _0x4c621f=a124_0x1ec2f4,{id:_0x6a3763}=await this[_0x4c621f(0x99)](_0x2b7a06,_0x3e8e0c),_0x4c038b=await this[_0x4c621f(0x97)][_0x4c621f(0xd3)](_0x6a3763);return this[_0x4c621f(0x80)](_0x4c038b[_0x4c621f(0xa6)]);}async[a124_0x1ec2f4(0xb5)](_0x3a5553,_0x5509f){const _0x3725f9=a124_0x1ec2f4,{id:_0x24dfa8}=await this[_0x3725f9(0x99)](_0x3a5553,_0x5509f),_0x435ebd=await this[_0x3725f9(0x97)][_0x3725f9(0xd3)](_0x24dfa8);return _0x435ebd['data'];}async[a124_0x1ec2f4(0x8f)](_0xd6c62a){const _0x21d4c7=a124_0x1ec2f4,_0x14835c=await this[_0x21d4c7(0x97)][_0x21d4c7(0x8f)](_0xd6c62a);return this[_0x21d4c7(0x80)](_0x14835c[_0x21d4c7(0xa6)]);}async[a124_0x1ec2f4(0xdf)](_0x5e3224,_0x52db8c,_0x4e0a1d){const _0x42b45f=a124_0x1ec2f4,{id:_0x5029b9}=await this[_0x42b45f(0x99)](_0x5e3224,_0x4e0a1d),_0x4f6fbd=await this[_0x42b45f(0x97)]['updateTemplate'](_0x5029b9,_0x52db8c);return this[_0x42b45f(0x80)](_0x4f6fbd[_0x42b45f(0xa6)]);}async[a124_0x1ec2f4(0xd5)](_0x1bf507,_0x11c1a7){const _0x444ea4=a124_0x1ec2f4,{id:_0x98a150}=await this[_0x444ea4(0x99)](_0x1bf507,_0x11c1a7);await this[_0x444ea4(0x97)][_0x444ea4(0xd5)](_0x98a150);}async[a124_0x1ec2f4(0x9e)](_0x25ff52){const _0xa5624e=a124_0x1ec2f4,_0x2d20b4=await paginate((_0x5dd71b,_0x55bdec)=>this['client'][_0xa5624e(0x9e)]({'name':_0x25ff52?.[_0xa5624e(0xa8)],'limit':_0x5dd71b,'offset':_0x55bdec}),_0x25ff52?.[_0xa5624e(0xa5)],_0x25ff52?.['offset']);return _0x2d20b4[_0xa5624e(0xc2)](_0x4108a1=>this[_0xa5624e(0xa4)](_0x4108a1));}async[a124_0x1ec2f4(0x98)](_0x1f1aab){const _0x21a29f=a124_0x1ec2f4,_0x2c62c4=await this['resolveWorkspaceId'](_0x1f1aab),_0x360b3f=await this[_0x21a29f(0x97)][_0x21a29f(0x98)](_0x2c62c4);return this[_0x21a29f(0xa4)](_0x360b3f[_0x21a29f(0xa6)]);}async[a124_0x1ec2f4(0xd1)](_0x58fcfa){const _0x2a0d79=a124_0x1ec2f4,_0x2ff1cb=await this['resolveWorkspaceId'](_0x58fcfa),_0x3bab5e=await this['client'][_0x2a0d79(0x98)](_0x2ff1cb);return _0x3bab5e[_0x2a0d79(0xa6)];}async[a124_0x1ec2f4(0x84)](_0x3bdb2e){const _0x3896d5=a124_0x1ec2f4,_0x33b057=await this[_0x3896d5(0x97)][_0x3896d5(0x84)](_0x3bdb2e);return this[_0x3896d5(0xa4)](_0x33b057[_0x3896d5(0xa6)]);}async['updateWorkspace'](_0x5da891,_0x563ee1){const _0x57eba0=a124_0x1ec2f4,_0x36dfae=await this[_0x57eba0(0x86)](_0x5da891),_0x10d486=await this[_0x57eba0(0x97)][_0x57eba0(0x85)](_0x36dfae,_0x563ee1);return this[_0x57eba0(0xa4)](_0x10d486[_0x57eba0(0xa6)]);}async[a124_0x1ec2f4(0x79)](_0x10d4c9){const _0x57ea40=a124_0x1ec2f4,_0x523df4=await this[_0x57ea40(0x86)](_0x10d4c9);await this[_0x57ea40(0x97)][_0x57ea40(0x79)](_0x523df4);}async[a124_0x1ec2f4(0x87)](_0x7dcec7){const _0x38306d=a124_0x1ec2f4;return paginate((_0x56274a,_0x5b0b11)=>this[_0x38306d(0x97)][_0x38306d(0xdd)](_0x7dcec7,{'limit':_0x56274a,'offset':_0x5b0b11}));}[a124_0x1ec2f4(0xd9)](_0xaf5ffe){const _0x35a98c=a124_0x1ec2f4;return{'id':_0xaf5ffe['id'],'name':_0xaf5ffe['attributes']['name'],'campaignType':_0xaf5ffe[_0x35a98c(0xc0)][_0x35a98c(0x8c)],'status':_0xaf5ffe['attributes'][_0x35a98c(0x89)],'description':_0xaf5ffe['attributes'][_0x35a98c(0xaa)],'workspaceId':_0xaf5ffe[_0x35a98c(0xc0)]['workspaceId'],'audienceId':_0xaf5ffe['attributes'][_0x35a98c(0x95)],'audienceName':_0xaf5ffe[_0x35a98c(0xc0)][_0x35a98c(0xbc)],'enableUtmTracking':_0xaf5ffe[_0x35a98c(0xc0)][_0x35a98c(0x8d)],'createdAt':_0xaf5ffe[_0x35a98c(0xc0)]['createdAt'],'updatedAt':_0xaf5ffe[_0x35a98c(0xc0)]['updatedAt'],'launchedAt':_0xaf5ffe[_0x35a98c(0xc0)]['launchedAt'],'pausedAt':_0xaf5ffe[_0x35a98c(0xc0)][_0x35a98c(0x83)],'resumedAt':_0xaf5ffe['attributes']['resumedAt'],'finishedAt':_0xaf5ffe[_0x35a98c(0xc0)][_0x35a98c(0x9f)]};}async[a124_0x1ec2f4(0xbe)](_0x125b2f,_0xa30dfb){const _0x59f235=a124_0x1ec2f4;if(this[_0x59f235(0x8a)](_0xa30dfb))try{return await this[_0x59f235(0x97)][_0x59f235(0x90)](_0x125b2f,_0xa30dfb),_0xa30dfb;}catch(_0x4bda95){if(_0x4bda95 instanceof SDKError&&_0x4bda95[_0x59f235(0x7d)]===ErrorCode['NOT_FOUND'])throw new SDKError(ErrorCode[_0x59f235(0xc3)],_0x59f235(0xb7)+_0xa30dfb,_0x4bda95,{'helpText':'Use\x20\x22tdx\x20engage\x20campaign\x20list\x20--type\x20always-on\x22\x20to\x20see\x20available\x20campaigns.'});throw _0x4bda95;}const _0x3ab006=await this['listAllAlwaysOnCampaigns'](_0x125b2f),_0x5a41ec=_0xa30dfb[_0x59f235(0xa9)](),_0x19e9cc=_0x3ab006[_0x59f235(0xbf)](_0x423842=>_0x423842[_0x59f235(0xc0)][_0x59f235(0xa8)]['trim']()===_0x5a41ec);if(_0x19e9cc[_0x59f235(0xd8)]===0x0)throw new SDKError(ErrorCode[_0x59f235(0xc3)],_0x59f235(0xd0)+_0xa30dfb,undefined,{'helpText':_0x59f235(0xa1)});if(_0x19e9cc[_0x59f235(0xd8)]>0x1){const _0x3d791f=_0x19e9cc['map'](_0x188a68=>_0x188a68['id'])[_0x59f235(0xcc)](',\x20');throw new SDKError(ErrorCode[_0x59f235(0xe1)],_0x59f235(0x81)+_0xa30dfb+_0x59f235(0xe2)+_0x3d791f,undefined,{'helpText':_0x59f235(0x7a)});}return _0x19e9cc[0x0]['id'];}async['listAlwaysOnCampaigns'](_0x3576b7){const _0x921c88=a124_0x1ec2f4,_0x3e82ff=await paginate((_0x4f95e,_0x40068f)=>this[_0x921c88(0x97)][_0x921c88(0xdd)](_0x3576b7[_0x921c88(0x7c)],{'campaignType':_0x3576b7[_0x921c88(0x7e)],'status':_0x3576b7[_0x921c88(0x89)],'limit':_0x4f95e,'offset':_0x40068f}),_0x3576b7[_0x921c88(0xa5)],_0x3576b7[_0x921c88(0xbb)]);return _0x3e82ff[_0x921c88(0xc2)](_0x183fda=>this['normalizeAlwaysOnCampaign'](_0x183fda));}async['getAlwaysOnCampaign'](_0x20266b,_0x447061){const _0x292ca3=a124_0x1ec2f4,_0x7115ac=await this[_0x292ca3(0xbe)](_0x20266b,_0x447061),_0x19764c=await this[_0x292ca3(0x97)][_0x292ca3(0x90)](_0x20266b,_0x7115ac);return this[_0x292ca3(0xd9)](_0x19764c[_0x292ca3(0xa6)]);}async[a124_0x1ec2f4(0xc6)](_0x40871b,_0x4ad4e2){const _0x2d5024=a124_0x1ec2f4,_0x432ac5=await this[_0x2d5024(0xbe)](_0x40871b,_0x4ad4e2),_0x2bb3be=await this[_0x2d5024(0x97)][_0x2d5024(0x90)](_0x40871b,_0x432ac5);return _0x2bb3be[_0x2d5024(0xa6)];}async[a124_0x1ec2f4(0xc5)](_0xfe3cb7,_0x502e4e){const _0x4f76d2=a124_0x1ec2f4,_0x3447f5=await this[_0x4f76d2(0x97)]['createAlwaysOnCampaign'](_0xfe3cb7,_0x502e4e);return this[_0x4f76d2(0xd9)](_0x3447f5[_0x4f76d2(0xa6)]);}async[a124_0x1ec2f4(0xd6)](_0x1a2a3c,_0x28563b,_0x316afc){const _0x4e9a34=a124_0x1ec2f4,_0x3866bb=await this[_0x4e9a34(0xbe)](_0x1a2a3c,_0x28563b),_0x22844d=await this['client']['updateAlwaysOnCampaign'](_0x1a2a3c,_0x3866bb,_0x316afc);return this[_0x4e9a34(0xd9)](_0x22844d[_0x4e9a34(0xa6)]);}async[a124_0x1ec2f4(0xa0)](_0x40412d,_0x5127a9){const _0x16e061=a124_0x1ec2f4,_0x7a9508=await this[_0x16e061(0xbe)](_0x40412d,_0x5127a9);await this['client'][_0x16e061(0xa0)](_0x40412d,_0x7a9508);}async[a124_0x1ec2f4(0x7f)](_0x426fcc,_0x59f1e9,_0x153a8e){const _0x53d35b=a124_0x1ec2f4,_0x530a78=await this[_0x53d35b(0xbe)](_0x426fcc,_0x59f1e9);await _0x153a8e(_0x426fcc,_0x530a78);}async[a124_0x1ec2f4(0xe5)](_0x20d3c8,_0x57a13f){const _0x56dc3c=a124_0x1ec2f4;await this[_0x56dc3c(0x7f)](_0x20d3c8,_0x57a13f,(_0x2b26f7,_0xab8b97)=>this[_0x56dc3c(0x97)]['launchAlwaysOnCampaign'](_0x2b26f7,_0xab8b97));}async[a124_0x1ec2f4(0xa3)](_0x189089,_0x273490){const _0x22468b=a124_0x1ec2f4;await this[_0x22468b(0x7f)](_0x189089,_0x273490,(_0x4ab55f,_0x10ff81)=>this[_0x22468b(0x97)][_0x22468b(0xa3)](_0x4ab55f,_0x10ff81));}async['resumeAlwaysOnCampaign'](_0x36248f,_0x363318){const _0x3dc632=a124_0x1ec2f4;await this[_0x3dc632(0x7f)](_0x36248f,_0x363318,(_0xcf46ac,_0x33788f)=>this[_0x3dc632(0x97)][_0x3dc632(0xb9)](_0xcf46ac,_0x33788f));}async[a124_0x1ec2f4(0x9c)](_0x48c46b,_0x2f3487){const _0x378939=a124_0x1ec2f4;await this[_0x378939(0x7f)](_0x48c46b,_0x2f3487,(_0xf40491,_0x5cef90)=>this[_0x378939(0x97)][_0x378939(0x9c)](_0xf40491,_0x5cef90));}async['duplicateAlwaysOnCampaign'](_0x4a6891,_0xb7e583,_0x5709a5){const _0x20bfc7=a124_0x1ec2f4,_0x385dfd=await this['resolveAlwaysOnCampaignId'](_0x4a6891,_0xb7e583),_0xd6eb9d=await this[_0x20bfc7(0x97)][_0x20bfc7(0xab)](_0x4a6891,_0x385dfd,_0x5709a5);return this[_0x20bfc7(0xd9)](_0xd6eb9d[_0x20bfc7(0xa6)]);}}
|
package/dist/sdk/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a125_0x5e8887=a125_0x80be;(function(_0xaa1645,_0x4e8082){const _0x2960b1=a125_0x80be,_0x4ed604=_0xaa1645();while(!![]){try{const _0x254c87=-parseInt(_0x2960b1(0x1df))/0x1+parseInt(_0x2960b1(0x1d3))/0x2*(-parseInt(_0x2960b1(0x201))/0x3)+parseInt(_0x2960b1(0x1dc))/0x4*(-parseInt(_0x2960b1(0x1cb))/0x5)+parseInt(_0x2960b1(0x1d9))/0x6*(parseInt(_0x2960b1(0x1e0))/0x7)+parseInt(_0x2960b1(0x1e3))/0x8*(parseInt(_0x2960b1(0x1d0))/0x9)+parseInt(_0x2960b1(0x1e2))/0xa*(parseInt(_0x2960b1(0x206))/0xb)+parseInt(_0x2960b1(0x1e5))/0xc;if(_0x254c87===_0x4e8082)break;else _0x4ed604['push'](_0x4ed604['shift']());}catch(_0x3a2d2b){_0x4ed604['push'](_0x4ed604['shift']());}}}(a125_0x5de1,0xc7b98));export var ErrorCategory;(function(_0x437e72){const _0x13f24f=a125_0x80be;_0x437e72[_0x13f24f(0x215)]=_0x13f24f(0x215),_0x437e72[_0x13f24f(0x20e)]='INTERNAL_ERROR';}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;function a125_0x80be(_0x360fa8,_0x12855b){_0x360fa8=_0x360fa8-0x1c6;const _0x5de18e=a125_0x5de1();let _0x80be64=_0x5de18e[_0x360fa8];return _0x80be64;}(function(_0x77298f){const _0x18399e=a125_0x80be;_0x77298f[_0x18399e(0x1c9)]=_0x18399e(0x1c9),_0x77298f[_0x18399e(0x1ee)]=_0x18399e(0x1ee),_0x77298f[_0x18399e(0x1fe)]=_0x18399e(0x1fe),_0x77298f[_0x18399e(0x1f0)]='DATABASE_NOT_FOUND',_0x77298f[_0x18399e(0x1fb)]=_0x18399e(0x1fb),_0x77298f['LLM_PROJECT_NOT_FOUND']=_0x18399e(0x1da),_0x77298f[_0x18399e(0x20a)]=_0x18399e(0x20a),_0x77298f[_0x18399e(0x1e8)]='WORKFLOW_PROJECT_NOT_FOUND',_0x77298f[_0x18399e(0x20c)]='WORKFLOW_SECRET_NOT_FOUND',_0x77298f['WORKFLOW_SECRET_SET_FAILED']=_0x18399e(0x218),_0x77298f['WORKFLOW_ARCHIVE_CORRUPTED']=_0x18399e(0x20d),_0x77298f[_0x18399e(0x1d5)]='CHAT_NOT_FOUND',_0x77298f['CONNECTION_NOT_FOUND']=_0x18399e(0x1fc),_0x77298f[_0x18399e(0x1cd)]=_0x18399e(0x1cd),_0x77298f[_0x18399e(0x1d1)]=_0x18399e(0x1d1),_0x77298f[_0x18399e(0x1d2)]=_0x18399e(0x1d2),_0x77298f[_0x18399e(0x216)]='SEGMENT_UPDATE_ERROR',_0x77298f[_0x18399e(0x1f3)]=_0x18399e(0x1f3),_0x77298f[_0x18399e(0x213)]=_0x18399e(0x213),_0x77298f[_0x18399e(0x1ff)]=_0x18399e(0x1ff),_0x77298f[_0x18399e(0x1f9)]='CONNECTOR_SCHEMA_NOT_FOUND',_0x77298f[_0x18399e(0x1fa)]=_0x18399e(0x1fa),_0x77298f[_0x18399e(0x209)]=_0x18399e(0x209),_0x77298f[_0x18399e(0x1eb)]=_0x18399e(0x1eb),_0x77298f['AGENT_SYNTAX_ERROR']='AGENT_SYNTAX_ERROR',_0x77298f[_0x18399e(0x211)]=_0x18399e(0x211),_0x77298f[_0x18399e(0x1e9)]=_0x18399e(0x1e9),_0x77298f[_0x18399e(0x1d4)]='LLM_EMPTY_MESSAGE',_0x77298f[_0x18399e(0x1ce)]=_0x18399e(0x1ce),_0x77298f['CLAUDE_CODE_NOT_FOUND']=_0x18399e(0x1d6),_0x77298f[_0x18399e(0x1f6)]=_0x18399e(0x1f6),_0x77298f[_0x18399e(0x205)]=_0x18399e(0x205),_0x77298f[_0x18399e(0x1ca)]=_0x18399e(0x1ca),_0x77298f[_0x18399e(0x1fd)]=_0x18399e(0x1fd),_0x77298f[_0x18399e(0x204)]=_0x18399e(0x204),_0x77298f[_0x18399e(0x1dd)]=_0x18399e(0x1dd),_0x77298f[_0x18399e(0x21a)]=_0x18399e(0x21a),_0x77298f['INVALID_PROFILE_CONFIG']=_0x18399e(0x207),_0x77298f[_0x18399e(0x20b)]=_0x18399e(0x20b),_0x77298f['TRINO_NOT_FOUND']='TRINO_NOT_FOUND',_0x77298f['TRINO_INVALID_ARGUMENT']=_0x18399e(0x208),_0x77298f[_0x18399e(0x1ea)]=_0x18399e(0x1ea),_0x77298f[_0x18399e(0x1db)]='UNAVAILABLE',_0x77298f[_0x18399e(0x1d7)]=_0x18399e(0x1d7),_0x77298f[_0x18399e(0x1cc)]=_0x18399e(0x1cc),_0x77298f['PROXY_CONNECTION_FAILURE']='PROXY_CONNECTION_FAILURE',_0x77298f[_0x18399e(0x214)]=_0x18399e(0x214),_0x77298f[_0x18399e(0x1f2)]=_0x18399e(0x1f2),_0x77298f['TRINO_INTERNAL_ERROR']=_0x18399e(0x1e1),_0x77298f['TRINO_INSUFFICIENT_RESOURCES']=_0x18399e(0x20f),_0x77298f[_0x18399e(0x1ef)]=_0x18399e(0x1ef),_0x77298f[_0x18399e(0x1cf)]='LLM_STREAM_ERROR',_0x77298f[_0x18399e(0x1c8)]=_0x18399e(0x1c8);}(ErrorCode||(ErrorCode={})));function a125_0x5de1(){const _0x23977a=['CLAUDE_CODE_UNSUPPORTED_VERSION','name','isRetryable','CONNECTOR_SCHEMA_NOT_FOUND','JOURNEY_NOT_FOUND','TABLE_NOT_FOUND','CONNECTION_NOT_FOUND','UNAUTHENTICATED','NOT_FOUND','CONNECTOR_INVALID_CONFIG','originalMessage','3wdmjLI','stack','message','ALREADY_EXISTS','INSTALLATION_FAILED','649PHBwvX','INVALID_PROFILE_CONFIG','TRINO_INVALID_ARGUMENT','JOURNEY_SYNTAX_ERROR','AGENT_NOT_FOUND','TRINO_SYNTAX_ERROR','WORKFLOW_SECRET_NOT_FOUND','WORKFLOW_ARCHIVE_CORRUPTED','INTERNAL_ERROR','TRINO_INSUFFICIENT_RESOURCES','PROXY_CONNECTION_FAILURE','AGENT_UPDATE_ERROR','replace','ACTIVATION_UPDATE_ERROR','INTERNAL','USER_ERROR','SEGMENT_UPDATE_ERROR','TRINO_NOT_FOUND','WORKFLOW_SECRET_SET_FAILED','category','INVALID_REQUEST','status','isInternalError','LLM_CHAT_CREATION_FAILURE','MISSING_ARGUMENT','PERMISSION_DENIED','572335HQctiz','HTTP_REQUEST_FAILURE','SEGMENT_NOT_FOUND','COMMAND_NOT_FOUND','LLM_STREAM_ERROR','18JYLMII','SEGMENT_FOLDER_NOT_FOUND','SEGMENT_SYNTAX_ERROR','1049350wABKdG','LLM_EMPTY_MESSAGE','CHAT_NOT_FOUND','CLAUDE_CODE_NOT_FOUND','TIMEOUT','404','1645686HPeRWJ','LLM_PROJECT_NOT_FOUND','UNAVAILABLE','20uXgYcS','CANCELLED','code','402539FcYLPY','7bhpeHg','TRINO_INTERNAL_ERROR','192310hNodfX','2999848hmqpDG','helpText','1904988TTIuZQ','\x0aCaused\x20by:\x20','cause','WORKFLOW_PROJECT_NOT_FOUND','AGENT_EVALUATION_ERROR','TRINO_USER_CANCELLED','JOURNEY_UPDATE_ERROR','isUserError','HTTP\x20400','INVALID_ARGUMENT','LLM_MALFORMED_MESSAGE','DATABASE_NOT_FOUND','Unknown\x20error','RATE_LIMITED','ACTIVATION_SYNTAX_ERROR','SDKError','includes'];a125_0x5de1=function(){return _0x23977a;};return a125_0x5de1();}const ERROR_CODE_CATEGORY={[ErrorCode[a125_0x5e8887(0x1c9)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1ee)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['NOT_FOUND']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1f0)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1fb)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['LLM_PROJECT_NOT_FOUND']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x20a)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1e8)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x20c)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['WORKFLOW_SECRET_SET_FAILED']]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x20d)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x1d5)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1fc)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1cd)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1d1)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1d2)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x5e8887(0x216)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1f3)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x213)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1ff)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x5e8887(0x1f9)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1fa)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x209)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1eb)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['AGENT_SYNTAX_ERROR']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['AGENT_UPDATE_ERROR']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1e9)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x5e8887(0x1d4)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['COMMAND_NOT_FOUND']]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x5e8887(0x1d6)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1f6)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x205)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1ca)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1fd)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x204)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1dd)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x21a)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x207)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['TRINO_SYNTAX_ERROR']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x217)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x208)]]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode['TRINO_USER_CANCELLED']]:ErrorCategory[a125_0x5e8887(0x215)],[ErrorCode[a125_0x5e8887(0x1db)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x1d7)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x5e8887(0x1cc)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x210)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x5e8887(0x214)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x1f2)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode['TRINO_INTERNAL_ERROR']]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x5e8887(0x20f)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode[a125_0x5e8887(0x1ef)]]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode['LLM_STREAM_ERROR']]:ErrorCategory[a125_0x5e8887(0x20e)],[ErrorCode['LLM_CHAT_CREATION_FAILURE']]:ErrorCategory['INTERNAL_ERROR']};export function getErrorCategory(_0x1407c4){return ERROR_CODE_CATEGORY[_0x1407c4];}export function isRetryableError(_0x36e9ba){const _0x2d68d9=a125_0x5e8887;return getErrorCategory(_0x36e9ba)===ErrorCategory[_0x2d68d9(0x20e)];}export class SDKError extends Error{[a125_0x5e8887(0x1de)];['helpText'];[a125_0x5e8887(0x1e7)];constructor(_0x18f0f8,_0x153766,_0x118028,_0x245ec5){const _0x260e7a=a125_0x5e8887;super('['+_0x18f0f8+']\x20'+_0x153766),this[_0x260e7a(0x1f7)]=_0x260e7a(0x1f4),this[_0x260e7a(0x1de)]=_0x18f0f8,this[_0x260e7a(0x1e4)]=_0x245ec5?.[_0x260e7a(0x1e4)],this[_0x260e7a(0x1e7)]=_0x118028,_0x118028 instanceof Error&&(this[_0x260e7a(0x202)]=this[_0x260e7a(0x202)]+_0x260e7a(0x1e6)+_0x118028[_0x260e7a(0x202)]);}get['category'](){const _0x20bf45=a125_0x5e8887;return getErrorCategory(this[_0x20bf45(0x1de)]);}[a125_0x5e8887(0x1f8)](){return isRetryableError(this['code']);}[a125_0x5e8887(0x1ec)](){const _0x32b9fb=a125_0x5e8887;return this[_0x32b9fb(0x219)]===ErrorCategory[_0x32b9fb(0x215)];}[a125_0x5e8887(0x1c7)](){const _0x4e334f=a125_0x5e8887;return this['category']===ErrorCategory[_0x4e334f(0x20e)];}get[a125_0x5e8887(0x200)](){const _0xe83d93=a125_0x5e8887;return this[_0xe83d93(0x203)][_0xe83d93(0x212)](/^\[.*?\]\s*/,'');}}export function isHttp400Error(_0x4b172c){const _0x322bdc=a125_0x5e8887;if(!_0x4b172c)return![];const _0x41a430=_0x4b172c;if(_0x41a430[_0x322bdc(0x1c6)]===0x190)return!![];const _0x1e73aa=_0x4b172c?.['message']||'';if(_0x1e73aa[_0x322bdc(0x1f5)](_0x322bdc(0x1ed)))return!![];const _0xde97f6=_0x4b172c;if(_0xde97f6['cause'])return isHttp400Error(_0xde97f6[_0x322bdc(0x1e7)]);return![];}export function isHttp404Error(_0x1c594f){const _0x3a2629=a125_0x5e8887;if(!_0x1c594f)return![];const _0x5b48a3=_0x1c594f;if(_0x5b48a3[_0x3a2629(0x1c6)]===0x194)return!![];const _0x270240=_0x1c594f?.['message']||'';if(_0x270240[_0x3a2629(0x1f5)](_0x3a2629(0x1d8))||_0x270240['includes']('Record\x20not\x20found'))return!![];const _0x575ce7=_0x1c594f;if(_0x575ce7[_0x3a2629(0x1e7)])return isHttp404Error(_0x575ce7[_0x3a2629(0x1e7)]);return![];}export function getErrorMessage(_0x25cba3){const _0x4ffe5b=a125_0x5e8887;if(!_0x25cba3)return _0x4ffe5b(0x1f1);if(_0x25cba3 instanceof SDKError)return _0x25cba3[_0x4ffe5b(0x200)];if(_0x25cba3 instanceof Error)return _0x25cba3[_0x4ffe5b(0x203)][_0x4ffe5b(0x212)](/^\[.*?\]\s*/,'');return String(_0x25cba3);}export function errorContains(_0x3eaa12,..._0x319ada){const _0x4c304d=a125_0x5e8887,_0x2f07de=_0x3eaa12?.[_0x4c304d(0x203)]||'',_0x2655b5=_0x3eaa12?.['cause'],_0x3370f1=_0x2655b5?.[_0x4c304d(0x203)]||'';return _0x319ada['some'](_0x1739f3=>_0x2f07de[_0x4c304d(0x1f5)](_0x1739f3)||_0x3370f1[_0x4c304d(0x1f5)](_0x1739f3));}
|
|
1
|
+
const a125_0x2d3e85=a125_0x2b53;(function(_0x38d819,_0x48651c){const _0x2e686f=a125_0x2b53,_0x214ac7=_0x38d819();while(!![]){try{const _0x2f1300=parseInt(_0x2e686f(0x124))/0x1+parseInt(_0x2e686f(0x118))/0x2+parseInt(_0x2e686f(0x13d))/0x3*(parseInt(_0x2e686f(0x132))/0x4)+-parseInt(_0x2e686f(0x13e))/0x5*(-parseInt(_0x2e686f(0x10b))/0x6)+-parseInt(_0x2e686f(0x102))/0x7*(-parseInt(_0x2e686f(0x131))/0x8)+parseInt(_0x2e686f(0x116))/0x9+-parseInt(_0x2e686f(0x123))/0xa;if(_0x2f1300===_0x48651c)break;else _0x214ac7['push'](_0x214ac7['shift']());}catch(_0x176fca){_0x214ac7['push'](_0x214ac7['shift']());}}}(a125_0x24a2,0xb2c67));export var ErrorCategory;function a125_0x24a2(){const _0x1eb35a=['TIMEOUT','NOT_FOUND','HTTP\x20400','10063585gmFfff','AGENT_SYNTAX_ERROR','\x0aCaused\x20by:\x20','WORKFLOW_SECRET_NOT_FOUND','message','INSTALLATION_FAILED','LLM_CHAT_CREATION_FAILURE','ALREADY_EXISTS','UNAUTHENTICATED','173916ourwmZ','INTERNAL_ERROR','LLM_MALFORMED_MESSAGE','WORKFLOW_ARCHIVE_CORRUPTED','TABLE_NOT_FOUND','ACTIVATION_UPDATE_ERROR','MISSING_ARGUMENT','INVALID_REQUEST','isInternalError','SEGMENT_SYNTAX_ERROR','COMMAND_NOT_FOUND','8012970jZVoRF','isRetryable','321778CgrffL','DATABASE_NOT_FOUND','CONNECTION_NOT_FOUND','RATE_LIMITED','PROXY_CONNECTION_FAILURE','TRINO_INTERNAL_ERROR','LLM_EMPTY_MESSAGE','USER_ERROR','CANCELLED','SEGMENT_UPDATE_ERROR','SEGMENT_FOLDER_NOT_FOUND','42122610YqSPuy','418130PSWeSR','TRINO_USER_CANCELLED','JOURNEY_NOT_FOUND','AGENT_NOT_FOUND','JOURNEY_SYNTAX_ERROR','Record\x20not\x20found','CHAT_NOT_FOUND','TRINO_INSUFFICIENT_RESOURCES','LLM_STREAM_ERROR','TRINO_NOT_FOUND','helpText','AGENT_UPDATE_ERROR','AGENT_EVALUATION_ERROR','8zkaZfM','16736KadKTN','includes','SEGMENT_NOT_FOUND','some','Unknown\x20error','isUserError','originalMessage','JOURNEY_UPDATE_ERROR','CLAUDE_CODE_UNSUPPORTED_VERSION','INVALID_PROFILE_CONFIG','cause','879MRjYmv','140cjfLBJ','ACTIVATION_SYNTAX_ERROR','category','CLAUDE_CODE_NOT_FOUND','WORKFLOW_SECRET_SET_FAILED','LLM_PROJECT_NOT_FOUND','INVALID_ARGUMENT','replace','CONNECTOR_SCHEMA_NOT_FOUND','INTERNAL','TRINO_INVALID_ARGUMENT','stack','UNAVAILABLE','TRINO_SYNTAX_ERROR','code','status','404','PERMISSION_DENIED','CONNECTOR_INVALID_CONFIG','WORKFLOW_PROJECT_NOT_FOUND','HTTP_REQUEST_FAILURE'];a125_0x24a2=function(){return _0x1eb35a;};return a125_0x24a2();}(function(_0x564ac1){const _0x5f2dc8=a125_0x2b53;_0x564ac1[_0x5f2dc8(0x11f)]=_0x5f2dc8(0x11f),_0x564ac1['INTERNAL_ERROR']=_0x5f2dc8(0x10c);}(ErrorCategory||(ErrorCategory={})));export var ErrorCode;(function(_0xaf6508){const _0x96bf91=a125_0x2b53;_0xaf6508[_0x96bf91(0x111)]=_0x96bf91(0x111),_0xaf6508['INVALID_ARGUMENT']=_0x96bf91(0x144),_0xaf6508['NOT_FOUND']=_0x96bf91(0x100),_0xaf6508[_0x96bf91(0x119)]=_0x96bf91(0x119),_0xaf6508[_0x96bf91(0x10f)]=_0x96bf91(0x10f),_0xaf6508[_0x96bf91(0x143)]=_0x96bf91(0x143),_0xaf6508['AGENT_NOT_FOUND']=_0x96bf91(0x127),_0xaf6508['WORKFLOW_PROJECT_NOT_FOUND']=_0x96bf91(0xfd),_0xaf6508[_0x96bf91(0x105)]=_0x96bf91(0x105),_0xaf6508[_0x96bf91(0x142)]='WORKFLOW_SECRET_SET_FAILED',_0xaf6508['WORKFLOW_ARCHIVE_CORRUPTED']='WORKFLOW_ARCHIVE_CORRUPTED',_0xaf6508[_0x96bf91(0x12a)]=_0x96bf91(0x12a),_0xaf6508[_0x96bf91(0x11a)]='CONNECTION_NOT_FOUND',_0xaf6508['SEGMENT_NOT_FOUND']='SEGMENT_NOT_FOUND',_0xaf6508['SEGMENT_FOLDER_NOT_FOUND']=_0x96bf91(0x122),_0xaf6508['SEGMENT_SYNTAX_ERROR']=_0x96bf91(0x114),_0xaf6508[_0x96bf91(0x121)]=_0x96bf91(0x121),_0xaf6508[_0x96bf91(0x13f)]=_0x96bf91(0x13f),_0xaf6508['ACTIVATION_UPDATE_ERROR']='ACTIVATION_UPDATE_ERROR',_0xaf6508[_0x96bf91(0xfc)]=_0x96bf91(0xfc),_0xaf6508[_0x96bf91(0xf2)]=_0x96bf91(0xf2),_0xaf6508[_0x96bf91(0x126)]=_0x96bf91(0x126),_0xaf6508[_0x96bf91(0x128)]=_0x96bf91(0x128),_0xaf6508['JOURNEY_UPDATE_ERROR']=_0x96bf91(0x139),_0xaf6508[_0x96bf91(0x103)]=_0x96bf91(0x103),_0xaf6508['AGENT_UPDATE_ERROR']=_0x96bf91(0x12f),_0xaf6508['AGENT_EVALUATION_ERROR']=_0x96bf91(0x130),_0xaf6508[_0x96bf91(0x11e)]=_0x96bf91(0x11e),_0xaf6508[_0x96bf91(0x115)]='COMMAND_NOT_FOUND',_0xaf6508[_0x96bf91(0x141)]='CLAUDE_CODE_NOT_FOUND',_0xaf6508['CLAUDE_CODE_UNSUPPORTED_VERSION']=_0x96bf91(0x13a),_0xaf6508['INSTALLATION_FAILED']=_0x96bf91(0x107),_0xaf6508[_0x96bf91(0xfb)]='PERMISSION_DENIED',_0xaf6508[_0x96bf91(0x10a)]=_0x96bf91(0x10a),_0xaf6508[_0x96bf91(0x109)]=_0x96bf91(0x109),_0xaf6508[_0x96bf91(0x120)]=_0x96bf91(0x120),_0xaf6508['INVALID_REQUEST']=_0x96bf91(0x112),_0xaf6508[_0x96bf91(0x13b)]=_0x96bf91(0x13b),_0xaf6508[_0x96bf91(0xf7)]=_0x96bf91(0xf7),_0xaf6508[_0x96bf91(0x12d)]=_0x96bf91(0x12d),_0xaf6508[_0x96bf91(0xf4)]=_0x96bf91(0xf4),_0xaf6508[_0x96bf91(0x125)]=_0x96bf91(0x125),_0xaf6508['UNAVAILABLE']=_0x96bf91(0xf6),_0xaf6508[_0x96bf91(0xff)]='TIMEOUT',_0xaf6508['HTTP_REQUEST_FAILURE']=_0x96bf91(0xfe),_0xaf6508[_0x96bf91(0x11c)]=_0x96bf91(0x11c),_0xaf6508[_0x96bf91(0xf3)]='INTERNAL',_0xaf6508[_0x96bf91(0x11b)]='RATE_LIMITED',_0xaf6508[_0x96bf91(0x11d)]=_0x96bf91(0x11d),_0xaf6508[_0x96bf91(0x12b)]=_0x96bf91(0x12b),_0xaf6508['LLM_MALFORMED_MESSAGE']=_0x96bf91(0x10d),_0xaf6508[_0x96bf91(0x12c)]=_0x96bf91(0x12c),_0xaf6508[_0x96bf91(0x108)]=_0x96bf91(0x108);}(ErrorCode||(ErrorCode={})));const ERROR_CODE_CATEGORY={[ErrorCode[a125_0x2d3e85(0x111)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['INVALID_ARGUMENT']]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x100)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['DATABASE_NOT_FOUND']]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['TABLE_NOT_FOUND']]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x143)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x127)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xfd)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x105)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x142)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x10e)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x12a)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x11a)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x134)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x122)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['SEGMENT_SYNTAX_ERROR']]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x121)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x13f)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x110)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xfc)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xf2)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x126)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['JOURNEY_SYNTAX_ERROR']]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x139)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x103)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x12f)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['AGENT_EVALUATION_ERROR']]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode['LLM_EMPTY_MESSAGE']]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x115)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x141)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x13a)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode['INSTALLATION_FAILED']]:ErrorCategory['USER_ERROR'],[ErrorCode['PERMISSION_DENIED']]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x10a)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x109)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x120)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x112)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x13b)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xf7)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0x12d)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xf4)]]:ErrorCategory['USER_ERROR'],[ErrorCode[a125_0x2d3e85(0x125)]]:ErrorCategory[a125_0x2d3e85(0x11f)],[ErrorCode[a125_0x2d3e85(0xf6)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0xff)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0xfe)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x11c)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x2d3e85(0xf3)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x2d3e85(0x11b)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x11d)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x12b)]]:ErrorCategory[a125_0x2d3e85(0x10c)],[ErrorCode[a125_0x2d3e85(0x10d)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x2d3e85(0x12c)]]:ErrorCategory['INTERNAL_ERROR'],[ErrorCode[a125_0x2d3e85(0x108)]]:ErrorCategory[a125_0x2d3e85(0x10c)]};export function getErrorCategory(_0x184639){return ERROR_CODE_CATEGORY[_0x184639];}export function isRetryableError(_0x4dbb8d){const _0x27b2cc=a125_0x2d3e85;return getErrorCategory(_0x4dbb8d)===ErrorCategory[_0x27b2cc(0x10c)];}export class SDKError extends Error{[a125_0x2d3e85(0xf8)];[a125_0x2d3e85(0x12e)];[a125_0x2d3e85(0x13c)];constructor(_0x21b46b,_0x764334,_0x470697,_0x588f06){const _0x3c8299=a125_0x2d3e85;super('['+_0x21b46b+']\x20'+_0x764334),this['name']='SDKError',this[_0x3c8299(0xf8)]=_0x21b46b,this[_0x3c8299(0x12e)]=_0x588f06?.['helpText'],this[_0x3c8299(0x13c)]=_0x470697,_0x470697 instanceof Error&&(this['stack']=this[_0x3c8299(0xf5)]+_0x3c8299(0x104)+_0x470697['stack']);}get[a125_0x2d3e85(0x140)](){const _0x256fb7=a125_0x2d3e85;return getErrorCategory(this[_0x256fb7(0xf8)]);}[a125_0x2d3e85(0x117)](){const _0x1d02f2=a125_0x2d3e85;return isRetryableError(this[_0x1d02f2(0xf8)]);}[a125_0x2d3e85(0x137)](){const _0x47cacb=a125_0x2d3e85;return this[_0x47cacb(0x140)]===ErrorCategory[_0x47cacb(0x11f)];}[a125_0x2d3e85(0x113)](){const _0x344b94=a125_0x2d3e85;return this[_0x344b94(0x140)]===ErrorCategory['INTERNAL_ERROR'];}get[a125_0x2d3e85(0x138)](){const _0x8e67b9=a125_0x2d3e85;return this[_0x8e67b9(0x106)][_0x8e67b9(0xf1)](/^\[.*?\]\s*/,'');}}export function isHttp400Error(_0x254d75){const _0x486d69=a125_0x2d3e85;if(!_0x254d75)return![];const _0x4fcd0a=_0x254d75;if(_0x4fcd0a[_0x486d69(0xf9)]===0x190)return!![];const _0x229edf=_0x254d75?.['message']||'';if(_0x229edf[_0x486d69(0x133)](_0x486d69(0x101)))return!![];const _0x592ccf=_0x254d75;if(_0x592ccf[_0x486d69(0x13c)])return isHttp400Error(_0x592ccf[_0x486d69(0x13c)]);return![];}export function isHttp404Error(_0x5f576c){const _0x1ba8ad=a125_0x2d3e85;if(!_0x5f576c)return![];const _0x5e6465=_0x5f576c;if(_0x5e6465['status']===0x194)return!![];const _0x17ebfe=_0x5f576c?.[_0x1ba8ad(0x106)]||'';if(_0x17ebfe['includes'](_0x1ba8ad(0xfa))||_0x17ebfe['includes'](_0x1ba8ad(0x129)))return!![];const _0x678c93=_0x5f576c;if(_0x678c93[_0x1ba8ad(0x13c)])return isHttp404Error(_0x678c93['cause']);return![];}export function getErrorMessage(_0x542b70){const _0xe4e930=a125_0x2d3e85;if(!_0x542b70)return _0xe4e930(0x136);if(_0x542b70 instanceof SDKError)return _0x542b70[_0xe4e930(0x138)];if(_0x542b70 instanceof Error)return _0x542b70[_0xe4e930(0x106)][_0xe4e930(0xf1)](/^\[.*?\]\s*/,'');return String(_0x542b70);}function a125_0x2b53(_0x3c104f,_0x5b220e){_0x3c104f=_0x3c104f-0xf1;const _0x24a27b=a125_0x24a2();let _0x2b5364=_0x24a27b[_0x3c104f];return _0x2b5364;}export function errorContains(_0x802217,..._0x5186d7){const _0x2fef0c=a125_0x2d3e85,_0x2336e9=_0x802217?.[_0x2fef0c(0x106)]||'',_0x4bc7dd=_0x802217?.['cause'],_0x5d4c9d=_0x4bc7dd?.[_0x2fef0c(0x106)]||'';return _0x5186d7[_0x2fef0c(0x135)](_0x54afc3=>_0x2336e9['includes'](_0x54afc3)||_0x5d4c9d[_0x2fef0c(0x133)](_0x54afc3));}
|
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x40ce6d=a126_0x1eb1;(function(_0x19c4be,_0x7d42b4){const _0x58a69b=a126_0x1eb1,_0x37f106=_0x19c4be();while(!![]){try{const _0x193d91=parseInt(_0x58a69b(0x85))/0x1*(parseInt(_0x58a69b(0x6b))/0x2)+parseInt(_0x58a69b(0x75))/0x3*(parseInt(_0x58a69b(0x68))/0x4)+parseInt(_0x58a69b(0x7a))/0x5+-parseInt(_0x58a69b(0x84))/0x6+-parseInt(_0x58a69b(0x7f))/0x7+parseInt(_0x58a69b(0x87))/0x8+-parseInt(_0x58a69b(0x74))/0x9;if(_0x193d91===_0x7d42b4)break;else _0x37f106['push'](_0x37f106['shift']());}catch(_0x131dec){_0x37f106['push'](_0x37f106['shift']());}}}(a126_0x31e0,0x7a4a9));import{loadUserConfigOnce,getAPIKey,getAccessToken,loadGlobalProxy,resolveSite}from'../core/config.js';import{SegmentSDK}from'./segment.js';import{JourneySDK}from'./journey.js';import{WorkflowSDK}from'./workflow/index.js';import{LLMSDK}from'./llm/index.js';import{JobSDK}from'./job.js';import{UserSDK}from'./user.js';import{RawAPI}from'./api.js';import{QuerySDK}from'./query/index.js';import{EngageSDK}from'./engage.js';import{DeliverySDK}from'./delivery.js';import{ConnectionSDK}from'./connection.js';import{ScheduleSDK}from'./schedule.js';import{RealtimeSDK}from'./realtime.js';import{PersonalizationSDK}from'./personalization.js';import{PolicySDK}from'./policy.js';import{CASSDK}from'./cas/index.js';import{Logger,LogLevel,FileHandler,DefaultLogFormatter}from'../utils/logger/index.js';export*from'./errors.js';export*from'./segment.js';export*from'./segment/parent-segment-preview.js';export*from'./journey.js';export*from'./workflow/index.js';export*from'./llm/index.js';export*from'./job.js';export*from'./user.js';export*from'./api.js';export*from'./query/index.js';export*from'./engage.js';export*from'./delivery.js';export*from'./connection.js';function a126_0x1eb1(_0x1c30a2,_0x2f32d1){_0x1c30a2=_0x1c30a2-0x67;const _0x31e031=a126_0x31e0();let _0x1eb1d9=_0x31e031[_0x1c30a2];return _0x1eb1d9;}export*from'./schedule.js';export*from'./realtime.js';export*from'./personalization.js';export*from'./policy.js';export*from'./cas/index.js';export{Logger,LogLevel}from'../utils/logger/index.js';export{WorkspaceSDK,resolveWorkspacePath}from'./workspace/index.js';export{getLLMProxyEndpoint,getConsoleUrl,getEndpoint,LLM_PROXY_ENDPOINTS}from'./client/endpoints.js';export class TDX{['context'];[a126_0x40ce6d(0x6c)];[a126_0x40ce6d(0x77)];[a126_0x40ce6d(0x7d)];[a126_0x40ce6d(0x72)];[a126_0x40ce6d(0x7e)];['jobs'];[a126_0x40ce6d(0x6a)];[a126_0x40ce6d(0x79)];[a126_0x40ce6d(0x82)];[a126_0x40ce6d(0x6d)];[a126_0x40ce6d(0x73)];[a126_0x40ce6d(0x80)];['personalization'];[a126_0x40ce6d(0x69)];[a126_0x40ce6d(0x81)];[a126_0x40ce6d(0x76)];static[a126_0x40ce6d(0x86)](_0x1a08b9={}){const _0xfd4a54=a126_0x40ce6d,_0x147a26=resolveSite(_0x1a08b9[_0xfd4a54(0x88)]||'us01'),_0x11e821=_0x1a08b9['logLevel']??LogLevel[_0xfd4a54(0x83)],_0x9ef4f2=_0x1a08b9[_0xfd4a54(0x6e)];let _0x54bf2b=_0x1a08b9[_0xfd4a54(0x67)];!_0x54bf2b&&(_0x54bf2b=getAccessToken(_0x9ef4f2));let _0x2caecb=_0x1a08b9[_0xfd4a54(0x78)];!_0x2caecb&&(loadUserConfigOnce(),_0x2caecb=getAPIKey(_0x9ef4f2));let _0x2e74ed=_0x1a08b9[_0xfd4a54(0x7c)];return!_0x2e74ed&&(_0x2e74ed=loadGlobalProxy()||process.env.HTTPS_PROXY||process.env.HTTP_PROXY),!Logger['isInitialized']()&&Logger['init']({'defaultLevel':_0x11e821,'handlers':[new FileHandler()],'formatter':new DefaultLogFormatter({'colors':!![]})})[_0xfd4a54(0x70)](()=>{}),new TDX({'site':_0x147a26,'apiKey':_0x2caecb,'accessToken':_0x54bf2b,'logLevel':_0x11e821,'profile':_0x9ef4f2,'proxy':_0x2e74ed,'timeout':_0x1a08b9['timeout']});}constructor(_0x193458){const _0x5b6813=a126_0x40ce6d;this[_0x5b6813(0x7b)]=_0x193458,this[_0x5b6813(0x6c)]=new QuerySDK(_0x193458),this[_0x5b6813(0x77)]=new SegmentSDK(_0x193458),this['journey']=new JourneySDK(_0x193458),this['workflow']=new WorkflowSDK(_0x193458),this[_0x5b6813(0x7e)]=new LLMSDK(_0x193458),this[_0x5b6813(0x71)]=new JobSDK(_0x193458),this[_0x5b6813(0x6a)]=new UserSDK(_0x193458),this[_0x5b6813(0x79)]=new EngageSDK(_0x193458),this['delivery']=new DeliverySDK(_0x193458),this['connection']=new ConnectionSDK(_0x193458),this['schedules']=new ScheduleSDK(_0x193458),this[_0x5b6813(0x80)]=new RealtimeSDK(_0x193458),this['personalization']=new PersonalizationSDK(_0x193458),this[_0x5b6813(0x69)]=new PolicySDK(_0x193458),this[_0x5b6813(0x81)]=new CASSDK(_0x193458),this['api']=new RawAPI(_0x193458),this[_0x5b6813(0x77)][_0x5b6813(0x6f)]=this,this[_0x5b6813(0x81)]['_connectionSDK']=this[_0x5b6813(0x6d)];}}function a126_0x31e0(){const _0x2db8e2=['1534220YZWBpE','context','proxy','journey','llm','4802812FPDIxb','realtime','cas','delivery','INFO','1720776dLnPZX','314073KFszMo','create','4494680jusqTU','site','accessToken','12QfnwFG','policy','user','4ggmXlh','query','connection','profile','_tdxInstance','catch','jobs','workflow','schedules','8072010IpFlGC','873882jsxDYC','api','segment','apiKey','engage'];a126_0x31e0=function(){return _0x2db8e2;};return a126_0x31e0();}
|
package/dist/sdk/io/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a127_0x3030(_0x386199,_0x1a28e8){_0x386199=_0x386199-0xd4;var _0x319d17=a127_0x319d();var _0x30308c=_0x319d17[_0x386199];return _0x30308c;}(function(_0x544f94,_0x315f1a){var _0x2d2b29=a127_0x3030,_0x2e0b17=_0x544f94();while(!![]){try{var _0x4c5a2a=-parseInt(_0x2d2b29(0xd7))/0x1*(-parseInt(_0x2d2b29(0xdc))/0x2)+parseInt(_0x2d2b29(0xdd))/0x3+parseInt(_0x2d2b29(0xda))/0x4*(-parseInt(_0x2d2b29(0xd8))/0x5)+-parseInt(_0x2d2b29(0xd6))/0x6+parseInt(_0x2d2b29(0xd5))/0x7+parseInt(_0x2d2b29(0xdb))/0x8+parseInt(_0x2d2b29(0xd4))/0x9*(-parseInt(_0x2d2b29(0xd9))/0xa);if(_0x4c5a2a===_0x315f1a)break;else _0x2e0b17['push'](_0x2e0b17['shift']());}catch(_0x3c61ed){_0x2e0b17['push'](_0x2e0b17['shift']());}}}(a127_0x319d,0x98aa8));function a127_0x319d(){var _0x237417=['1043292trbJZg','11997HjiPuh','3143798ibDNdL','5304228seRjPx','137CFqHEc','5uSHAud','2390jUZgLT','996756ngCARt','5547880bhtQBN','8566pwfHSs'];a127_0x319d=function(){return _0x237417;};return a127_0x319d();}export{nodeFileSystem,nodeFileSystemSync}from'./node-filesystem.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0xdb76df=a128_0x51c0;function a128_0x51c0(_0x29fa59,_0x1c682b){_0x29fa59=_0x29fa59-0x1b6;const _0x18428d=a128_0x1842();let _0x51c0e7=_0x18428d[_0x29fa59];return _0x51c0e7;}(function(_0x14b30b,_0x2b68c4){const _0x31b357=a128_0x51c0,_0x363a08=_0x14b30b();while(!![]){try{const _0x44bcdf=parseInt(_0x31b357(0x1b6))/0x1*(parseInt(_0x31b357(0x1b7))/0x2)+-parseInt(_0x31b357(0x1b9))/0x3*(-parseInt(_0x31b357(0x1bf))/0x4)+-parseInt(_0x31b357(0x1cc))/0x5+-parseInt(_0x31b357(0x1bc))/0x6+parseInt(_0x31b357(0x1c8))/0x7+parseInt(_0x31b357(0x1cb))/0x8*(parseInt(_0x31b357(0x1cf))/0x9)+-parseInt(_0x31b357(0x1c3))/0xa*(parseInt(_0x31b357(0x1c9))/0xb);if(_0x44bcdf===_0x2b68c4)break;else _0x363a08['push'](_0x363a08['shift']());}catch(_0xcb3a24){_0x363a08['push'](_0x363a08['shift']());}}}(a128_0x1842,0x7ecae));import*as a128_0x2cb6c1 from'node:fs';import*as a128_0x52b605 from'node:fs/promises';export const nodeFileSystem={'readFile':_0x4508bf=>a128_0x52b605[a128_0xdb76df(0x1c4)](_0x4508bf,a128_0xdb76df(0x1c1)),'writeFile':(_0x5e1b35,_0x42a603)=>a128_0x52b605[a128_0xdb76df(0x1c0)](_0x5e1b35,_0x42a603,a128_0xdb76df(0x1c1)),'exists':async _0x306d71=>{const _0x12611f=a128_0xdb76df;try{return await a128_0x52b605[_0x12611f(0x1ce)](_0x306d71),!![];}catch{return![];}},'mkdir':async(_0x38ced6,_0x1d9cf7)=>{const _0x340069=a128_0xdb76df;await a128_0x52b605[_0x340069(0x1c7)](_0x38ced6,_0x1d9cf7);},'readdir':_0x36f74e=>a128_0x52b605[a128_0xdb76df(0x1bb)](_0x36f74e),'stat':async _0xc94257=>{const _0x27d5b5=a128_0xdb76df,_0x355d7d=await a128_0x52b605[_0x27d5b5(0x1c5)](_0xc94257);return{'isDirectory':()=>_0x355d7d[_0x27d5b5(0x1d0)](),'isFile':()=>_0x355d7d[_0x27d5b5(0x1cd)]()};},'unlink':_0x5502e9=>a128_0x52b605[a128_0xdb76df(0x1ca)](_0x5502e9)};export const nodeFileSystemSync={'readFileSync':_0x2a9d7b=>a128_0x2cb6c1[a128_0xdb76df(0x1c2)](_0x2a9d7b,a128_0xdb76df(0x1c1)),'writeFileSync':(_0x14d57e,_0x2af70b)=>a128_0x2cb6c1['writeFileSync'](_0x14d57e,_0x2af70b,a128_0xdb76df(0x1c1)),'existsSync':_0x28e364=>a128_0x2cb6c1[a128_0xdb76df(0x1bd)](_0x28e364),'mkdirSync':(_0x55e2b9,_0x55c39f)=>{const _0x1431df=a128_0xdb76df;a128_0x2cb6c1[_0x1431df(0x1ba)](_0x55e2b9,_0x55c39f);},'readdirSync':_0x10dd68=>a128_0x2cb6c1[a128_0xdb76df(0x1c6)](_0x10dd68),'statSync':_0x26b7cc=>{const _0xe6f8=a128_0xdb76df,_0x231f5e=a128_0x2cb6c1[_0xe6f8(0x1b8)](_0x26b7cc);return{'isDirectory':()=>_0x231f5e[_0xe6f8(0x1d0)](),'isFile':()=>_0x231f5e['isFile']()};},'unlinkSync':_0x479266=>a128_0x2cb6c1[a128_0xdb76df(0x1be)](_0x479266)};function a128_0x1842(){const _0x48a8f5=['mkdir','6036450viErbM','1375fsMHEo','unlink','656392cePGDc','717780XZOixT','isFile','access','63royobw','isDirectory','713AndUBm','1958FunGMV','statSync','2721mZLnjx','mkdirSync','readdir','3478572azXTnq','existsSync','unlinkSync','4180EHQcPF','writeFile','utf-8','readFileSync','147190bJGnjZ','readFile','stat','readdirSync'];a128_0x1842=function(){return _0x48a8f5;};return a128_0x1842();}
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a130_0x593449=a130_0x6c7b;(function(_0x28f3d6,_0xf877d5){const _0x17e0b0=a130_0x6c7b,_0x2061f1=_0x28f3d6();while(!![]){try{const _0x5a1a4a=parseInt(_0x17e0b0(0x16a))/0x1+parseInt(_0x17e0b0(0x15d))/0x2+-parseInt(_0x17e0b0(0x158))/0x3*(-parseInt(_0x17e0b0(0x167))/0x4)+parseInt(_0x17e0b0(0x162))/0x5*(parseInt(_0x17e0b0(0x160))/0x6)+parseInt(_0x17e0b0(0x165))/0x7+-parseInt(_0x17e0b0(0x152))/0x8*(-parseInt(_0x17e0b0(0x153))/0x9)+-parseInt(_0x17e0b0(0x161))/0xa*(parseInt(_0x17e0b0(0x16f))/0xb);if(_0x5a1a4a===_0xf877d5)break;else _0x2061f1['push'](_0x2061f1['shift']());}catch(_0x3f2260){_0x2061f1['push'](_0x2061f1['shift']());}}}(a130_0x10a3,0xce64b));function a130_0x6c7b(_0x5aab23,_0x5f937){_0x5aab23=_0x5aab23-0x151;const _0x10a3d9=a130_0x10a3();let _0x6c7bee=_0x10a3d9[_0x5aab23];return _0x6c7bee;}import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x5972cb){const _0x159f15=a130_0x6c7b;if(!_0x5972cb)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x159f15(0x166)](_0x5972cb))return _0x5972cb;return _0x5972cb[_0x159f15(0x155)](_0x159f15(0x157),'Z')[_0x159f15(0x155)]('\x20','T');}function a130_0x10a3(){const _0x4b167e=['8453858UUbACG','test','2036740iKEEGF','end_at','listJobs','1124452AJDriL','result','created_at','hive','getJobResult','11WqOUiK','submitHiveJob','10757416WQdVET','9xgpBjM','trino','replace','getUserInfo','\x20UTC','3rqiCQj','start_at','updated_at','list','kill','546206XtNKEO','cancelJob','submitPrestoJob','9396iEkloL','40725620mzQRmR','1465pmUhbY','map','client'];a130_0x10a3=function(){return _0x4b167e;};return a130_0x10a3();}export class JobSDK{[a130_0x593449(0x164)];constructor(_0x5bd17b){const _0x2976b4=a130_0x593449;this[_0x2976b4(0x164)]=new TDApiClient(_0x5bd17b);}async[a130_0x593449(0x15b)](_0x6e7279){const _0x23d7f5=a130_0x593449,_0x1b871e=await this[_0x23d7f5(0x164)][_0x23d7f5(0x169)](_0x6e7279);return _0x1b871e[_0x23d7f5(0x163)](_0x1e44d0=>({..._0x1e44d0,'created_at':normalizeTimestamp(_0x1e44d0[_0x23d7f5(0x16c)]),'updated_at':normalizeTimestamp(_0x1e44d0[_0x23d7f5(0x15a)]),'start_at':normalizeTimestamp(_0x1e44d0[_0x23d7f5(0x159)]),'end_at':normalizeTimestamp(_0x1e44d0[_0x23d7f5(0x168)])}));}async['show'](_0x4a5fd3){const _0x3aee33=a130_0x593449,_0x4deb8c=await this[_0x3aee33(0x164)]['showJob'](_0x4a5fd3);return{..._0x4deb8c,'created_at':normalizeTimestamp(_0x4deb8c[_0x3aee33(0x16c)]),'updated_at':normalizeTimestamp(_0x4deb8c['updated_at']),'start_at':normalizeTimestamp(_0x4deb8c['start_at']),'end_at':normalizeTimestamp(_0x4deb8c['end_at'])};}async[a130_0x593449(0x15c)](_0x43b933){const _0x241e6c=a130_0x593449;await this[_0x241e6c(0x164)][_0x241e6c(0x15e)](_0x43b933);}async['submit'](_0x493386,_0x574a23,_0xf7dcd3=a130_0x593449(0x154),_0x39061d){const _0xdd5df5=a130_0x593449;return _0xf7dcd3===_0xdd5df5(0x16d)?await this['client'][_0xdd5df5(0x151)](_0x493386,_0x574a23,_0x39061d):await this[_0xdd5df5(0x164)][_0xdd5df5(0x15f)](_0x493386,_0x574a23,_0x39061d);}async[a130_0x593449(0x16b)](_0x36cfd1){const _0x1370e5=a130_0x593449;return await this['client'][_0x1370e5(0x16e)](_0x36cfd1);}async[a130_0x593449(0x156)](){const _0xf62225=a130_0x593449;return await this[_0xf62225(0x164)][_0xf62225(0x156)]();}}
|