@treasuredata/tdx 2026.8.1 → 2026.8.3
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/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-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.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-move-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/table-deleted.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/site-mismatch.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/tools/work-create-item.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/auth-token.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +9 -3
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.d.ts +2 -0
- package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.d.ts +10 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js.map +1 -1
- package/dist/sdk/cas/types.d.ts +2 -0
- package/dist/sdk/cas/types.d.ts.map +1 -1
- package/dist/sdk/cas/validate-files.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/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.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/always-on-campaign-schema.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/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.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/cas.d.ts +4 -0
- package/dist/sdk/types/cas.d.ts.map +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/util/tree-search.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/task-graph.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/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +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/claude-code-state.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/proxy-fetch.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58a770,_0x4fbe91){const _0x310cac=a129_0x1f3b,_0x369404=_0x58a770();while(!![]){try{const _0x366d20=parseInt(_0x310cac(0xe5))/0x1+-parseInt(_0x310cac(0xd8))/0x2*(parseInt(_0x310cac(0xd2))/0x3)+-parseInt(_0x310cac(0xe9))/0x4+parseInt(_0x310cac(0xd4))/0x5*(-parseInt(_0x310cac(0xf1))/0x6)+parseInt(_0x310cac(0xe6))/0x7*(parseInt(_0x310cac(0xd9))/0x8)+-parseInt(_0x310cac(0xda))/0x9*(parseInt(_0x310cac(0xe3))/0xa)+parseInt(_0x310cac(0xed))/0xb;if(_0x366d20===_0x4fbe91)break;else _0x369404['push'](_0x369404['shift']());}catch(_0x57411b){_0x369404['push'](_0x369404['shift']());}}}(a129_0x378f,0xd43e1));import{CampaignDefSchema}from'./types/campaign-def.js';import{formatZodPath,getLocationFromPath}from'../segment/yaml-validator.js';export function validateCampaignDef(_0x34933c,_0x463d09={}){const _0x24a2e2=a129_0x1f3b,_0x2a7b96=CampaignDefSchema[_0x24a2e2(0xdb)](_0x34933c);if(_0x2a7b96[_0x24a2e2(0xf6)]){const _0x147b7b=runSemanticChecks(_0x2a7b96[_0x24a2e2(0xfb)],_0x463d09),_0x4d2a25=_0x147b7b[_0x24a2e2(0x105)](_0x22c2e3=>_0x22c2e3[_0x24a2e2(0xe7)]===_0x24a2e2(0xe2)),_0x4b069b=_0x147b7b[_0x24a2e2(0x105)](_0x1b0605=>_0x1b0605[_0x24a2e2(0xe7)]==='warning');return{'valid':_0x4d2a25[_0x24a2e2(0xf8)]===0x0,'errors':_0x4d2a25,'warnings':_0x4b069b};}return zodErrorsToValidationResult(_0x2a7b96['error'],_0x463d09);}function a129_0x1f3b(_0x358f55,_0x328fe7){_0x358f55=_0x358f55-0xce;const _0x378fba=a129_0x378f();let _0x1f3b9a=_0x378fba[_0x358f55];return _0x1f3b9a;}function zodErrorsToValidationResult(_0xc329c2,_0x1488b6){const _0x130872=_0xc329c2['issues']['map'](_0x44fce8=>{const _0x356d1f=a129_0x1f3b,_0x4ce46d=formatZodPath(_0x44fce8[_0x356d1f(0xe8)]),_0x429194=mapZodIssueToCode(_0x44fce8,_0x4ce46d),_0x327412=getLocationFromPath(_0x1488b6['document'],_0x1488b6[_0x356d1f(0x102)],_0x44fce8[_0x356d1f(0xe8)][_0x356d1f(0xfa)](_0x303d27=>typeof _0x303d27===_0x356d1f(0x101)?String(_0x303d27):_0x303d27));return{'level':_0x356d1f(0xe2),'path':_0x4ce46d,'code':_0x429194,'message':_0x44fce8['message'],..._0x327412&&{'location':_0x327412}};});return{'valid':![],'errors':_0x130872,'warnings':[]};}function mapZodIssueToCode(_0x5b59dc,_0x197e7d){const _0x1727ef=a129_0x1f3b;if(_0x197e7d===_0x1727ef(0xe4))return'CAMPAIGN_MISSING_NAME';if(_0x197e7d===_0x1727ef(0xe1))return _0x1727ef(0xde);if(_0x197e7d[_0x1727ef(0xd7)](_0x1727ef(0xd0)))return _0x1727ef(0xef);return _0x1727ef(0xce);}function a129_0x378f(){const _0x175857=['email.sender_id','type','error','1900cBLNTW','name','1320217Wddibw','631253OBbXhr','level','path','5862696bBVtGb','CAMPAIGN_MISSING_CONTENT','CAMPAIGN_MISSING_SENDER_ID','Email\x20campaign\x20requires\x20html_file\x20—\x20path\x20to\x20the\x20HTML\x20file\x20for\x20email\x20content','3913492vUArQy','line.line_sender_account_id','CAMPAIGN_INVALID_CONNECTOR','Email\x20campaign\x20requires\x20email.template\x20—\x20use\x20ref:Template_Name\x20to\x20reference\x20an\x20existing\x20template','33486CUFDVO','html_file','line_sender_account_id','Email\x20campaign\x20requires\x20email.sender_id\x20for\x20launch\x20—\x20sender\x20profile\x20UUID\x20from\x20delivery-api','email','success','LINE\x20campaign\x20requires\x20a\x20line\x20section','length','CAMPAIGN_CONTENT_MISMATCH','map','data','Push\x20campaign\x20requires\x20a\x20push\x20section','CAMPAIGN_INVALID_REF','warning','ref:','template','symbol','source','audience','segment','filter','\x20must\x20use\x20ref:\x20prefix\x20(e.g.,\x20ref:Name)\x20—\x20got\x20\x22','line','CAMPAIGN_SCHEMA_ERROR','email.template','connector','campaign_type','75jwEZoE','sender_id','275bNTbhH','document','value','startsWith','9428GYqucg','120CxjfeY','12735PsoaYY','safeParse','push','email.html_file','CAMPAIGN_INVALID_TYPE','Email\x20campaign\x20has\x20a\x20push\x20section\x20but\x20no\x20email\x20section'];a129_0x378f=function(){return _0x175857;};return a129_0x378f();}function runSemanticChecks(_0x58eff6,_0x1bd080){const _0x206980=a129_0x1f3b,_0x36c870=[];_0x58eff6[_0x206980(0xd1)]===_0x206980(0xf5)&&!_0x58eff6[_0x206980(0xf5)]&&_0x36c870[_0x206980(0xdc)]({'level':'error','path':_0x206980(0xf5),'code':_0x206980(0xea),'message':'Email\x20campaign\x20requires\x20an\x20email\x20section','location':getLocationFromPath(_0x1bd080['document'],_0x1bd080[_0x206980(0x102)],[_0x206980(0xd1)])});_0x58eff6[_0x206980(0xd1)]===_0x206980(0xdc)&&!_0x58eff6[_0x206980(0xdc)]&&_0x36c870[_0x206980(0xdc)]({'level':'error','path':_0x206980(0xdc),'code':_0x206980(0xea),'message':_0x206980(0xfc),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xd1)])});_0x58eff6[_0x206980(0xd1)]===_0x206980(0x107)&&!_0x58eff6[_0x206980(0x107)]&&_0x36c870[_0x206980(0xdc)]({'level':_0x206980(0xe2),'path':_0x206980(0x107),'code':'CAMPAIGN_MISSING_CONTENT','message':_0x206980(0xf7),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xd1)])});_0x58eff6[_0x206980(0xd1)]===_0x206980(0x107)&&_0x58eff6['line']&&!_0x58eff6['line'][_0x206980(0xf3)]&&_0x36c870[_0x206980(0xdc)]({'level':'warning','path':_0x206980(0xee),'code':_0x206980(0xeb),'message':'LINE\x20campaign\x20requires\x20line.line_sender_account_id\x20for\x20launch\x20—\x20UUID\x20of\x20the\x20LINE\x20sender\x20account','location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0x107)])});_0x58eff6[_0x206980(0xd1)]===_0x206980(0xf5)&&_0x58eff6['email']&&!_0x58eff6[_0x206980(0xf5)][_0x206980(0xf2)]&&_0x36c870[_0x206980(0xdc)]({'level':'error','path':_0x206980(0xdd),'code':'CAMPAIGN_MISSING_HTML_FILE','message':_0x206980(0xec),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xf5)])});_0x58eff6['campaign_type']===_0x206980(0xf5)&&_0x58eff6[_0x206980(0xf5)]&&!_0x58eff6[_0x206980(0xf5)][_0x206980(0x100)]&&_0x36c870['push']({'level':'error','path':_0x206980(0xcf),'code':'CAMPAIGN_MISSING_TEMPLATE','message':_0x206980(0xf0),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xf5)])});_0x58eff6[_0x206980(0xd1)]==='email'&&_0x58eff6[_0x206980(0xf5)]&&!_0x58eff6[_0x206980(0xf5)][_0x206980(0xd3)]&&_0x36c870[_0x206980(0xdc)]({'level':'warning','path':_0x206980(0xe0),'code':_0x206980(0xeb),'message':_0x206980(0xf4),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080['source'],['email'])});const _0x248b35=[{'path':_0x206980(0xcf),'value':_0x58eff6[_0x206980(0xf5)]?.['template'],'yamlPath':[_0x206980(0xf5),'template']},{'path':_0x206980(0x103),'value':_0x58eff6[_0x206980(0x103)],'yamlPath':[_0x206980(0x103)]},{'path':_0x206980(0x104),'value':_0x58eff6['segment'],'yamlPath':[_0x206980(0x104)]}];for(const _0x6cec45 of _0x248b35){_0x6cec45['value']&&!_0x6cec45[_0x206980(0xd6)][_0x206980(0xd7)](_0x206980(0xff))&&_0x36c870['push']({'level':_0x206980(0xe2),'path':_0x6cec45[_0x206980(0xe8)],'code':_0x206980(0xfd),'message':_0x6cec45[_0x206980(0xe8)]+_0x206980(0x106)+_0x6cec45[_0x206980(0xd6)]+'\x22','location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],_0x6cec45['yamlPath'])});}return _0x58eff6['campaign_type']===_0x206980(0xf5)&&_0x58eff6[_0x206980(0xdc)]&&!_0x58eff6['email']&&_0x36c870['push']({'level':_0x206980(0xfe),'path':_0x206980(0xdc),'code':'CAMPAIGN_CONTENT_MISMATCH','message':_0x206980(0xdf),'location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xdc)])}),_0x58eff6['campaign_type']===_0x206980(0xdc)&&_0x58eff6[_0x206980(0xf5)]&&!_0x58eff6[_0x206980(0xdc)]&&_0x36c870[_0x206980(0xdc)]({'level':'warning','path':_0x206980(0xf5),'code':_0x206980(0xf9),'message':'Push\x20campaign\x20has\x20an\x20email\x20section\x20but\x20no\x20push\x20section','location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xf5)])}),_0x58eff6['campaign_type']===_0x206980(0x107)&&(_0x58eff6[_0x206980(0xf5)]||_0x58eff6[_0x206980(0xdc)])&&_0x36c870[_0x206980(0xdc)]({'level':_0x206980(0xfe),'path':_0x206980(0x107),'code':_0x206980(0xf9),'message':'LINE\x20campaign\x20has\x20unexpected\x20email/push\x20section\x20—\x20remove\x20it\x20or\x20change\x20campaign_type','location':getLocationFromPath(_0x1bd080[_0x206980(0xd5)],_0x1bd080[_0x206980(0x102)],[_0x206980(0xd1)])}),_0x36c870;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3de186,_0x368988){const _0x18053a=a130_0x1137,_0x182f0f=_0x3de186();while(!![]){try{const _0x13b823=-parseInt(_0x18053a(0x19b))/0x1+parseInt(_0x18053a(0x16d))/0x2*(parseInt(_0x18053a(0x1a2))/0x3)+parseInt(_0x18053a(0x1bd))/0x4+parseInt(_0x18053a(0x185))/0x5*(-parseInt(_0x18053a(0x164))/0x6)+parseInt(_0x18053a(0x1ba))/0x7*(-parseInt(_0x18053a(0x1be))/0x8)+parseInt(_0x18053a(0x1c9))/0x9*(parseInt(_0x18053a(0x160))/0xa)+-parseInt(_0x18053a(0x1c7))/0xb*(-parseInt(_0x18053a(0x175))/0xc);if(_0x13b823===_0x368988)break;else _0x182f0f['push'](_0x182f0f['shift']());}catch(_0x1b7f75){_0x182f0f['push'](_0x182f0f['shift']());}}}(a130_0x264c,0xf3808));import*as a130_0x417c85 from'yaml';import{safeParseYaml}from'../segment/yaml-validator.js';import{CampaignDefSchema}from'./types/campaign-def.js';const REF_PREFIX='ref:';function toRef(_0x4b5318){return''+REF_PREFIX+_0x4b5318;}function a130_0x264c(){const _0x43f535=['on_click_behavior','37276YELcLx','connectorConfig','utm','workflowProjectName','push:','lineSenderAccountId','push_type','email','12nCiRpx','workspaceId','connectionId','text','connector:','timezone','column','templateVariables','variables','preview_value','linkUri','source_platform','recipients','displayName','area','trimStart','60yrzuWu','subjectTemplate','workflow_project','baseSize','imageUrl','audience','medium','activation','push','utmParameters','emailRecipients','keys','default_value','segmentFolderPath','some','type','resolveTemplateId','utmMedium','sourceEmailTemplateName','imagemap','emailContent','pushContent','223501yvbVPF','line:','baseUrl','campaignType','.txt','actions','utm:','3dmilCO','messages','display_name','altText','utmSourcePlatform','link_uri','all_columns','workspace','workflowName','defaultValue','name','notifications:','activation:','segment','enableUtmTracking','parse','pushType','stringify','htmlTemplate','segmentName','clipboardText','startAt','on_click_behavior_url','enabled','5310403ZAFgmS','startsWith','audienceName','5279196yIhjza','8fldepP','allColumns','line','replace','utmSource','utmMarketingTactic','columns','line_sender_account_id','description','2229667XpvaRu','emailSenderId','1116yhxScB','readFile','marketing_tactic','uri','schedule','notifications','plaintext_file','alt_text','template','textV2','events','notifyOn','.html','html_file','onClickBehaviorUrl','base_url','utmId','onClickBehavior','subject','email:','attributes','segmentId','title','base_size','plaintextTemplate','sender_id','label','start_at','image_url','connector','message','resolveWorkspaceId','utmCampaign','slice','lineContent','split','join','48710pnuEod','audienceId','map','resolveSegmentPath','82812JvlZml','previewValue','clipboard','source','length','workspaceName','workflow_name','campaign'];a130_0x264c=function(){return _0x43f535;};return a130_0x264c();}function isRef(_0x2967e2){const _0x43db2d=a130_0x1137;return _0x2967e2[_0x43db2d(0x1bb)](REF_PREFIX);}function parseRef(_0x30ad8f){const _0x5c225b=a130_0x1137;if(!isRef(_0x30ad8f))return _0x30ad8f;return _0x30ad8f[_0x5c225b(0x1ea)](REF_PREFIX[_0x5c225b(0x168)]);}export function campaignToDef(_0x3bb3c9,_0x24b25e){const _0x3a5d1f=a130_0x1137,_0x3806d9=_0x3bb3c9[_0x3a5d1f(0x1dd)],_0x6cefb0=sanitizeCampaignFileName(_0x3806d9[_0x3a5d1f(0x1ac)]),_0x1f2d0c={'type':'campaign','name':_0x3806d9[_0x3a5d1f(0x1ac)],'campaign_type':_0x3806d9[_0x3a5d1f(0x19e)],..._0x3806d9[_0x3a5d1f(0x1c6)]&&{'description':_0x3806d9[_0x3a5d1f(0x1c6)]},..._0x24b25e[_0x3a5d1f(0x169)]&&{'workspace':_0x24b25e[_0x3a5d1f(0x169)]}};_0x3806d9[_0x3a5d1f(0x1bc)]&&(_0x1f2d0c[_0x3a5d1f(0x18a)]=toRef(_0x3806d9[_0x3a5d1f(0x1bc)]));if(_0x3806d9[_0x3a5d1f(0x1b5)]){const _0x13c6d7=_0x24b25e[_0x3a5d1f(0x192)]?_0x24b25e['segmentFolderPath']+'/'+_0x3806d9[_0x3a5d1f(0x1b5)]:_0x3806d9[_0x3a5d1f(0x1b5)];_0x1f2d0c[_0x3a5d1f(0x1af)]=toRef(_0x13c6d7);}let _0x588345,_0x99b192;if(_0x3806d9[_0x3a5d1f(0x199)]){const _0x1c0390={};_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x197)]&&(_0x1c0390['template']=toRef(_0x3806d9['emailContent'][_0x3a5d1f(0x197)])),_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x186)]&&(_0x1c0390[_0x3a5d1f(0x1db)]=_0x3806d9[_0x3a5d1f(0x199)]['subjectTemplate']),_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x1c8)]&&(_0x1c0390['sender_id']=_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x1c8)]),_0x3806d9['emailContent'][_0x3a5d1f(0x1b4)]&&(_0x1c0390[_0x3a5d1f(0x1d6)]=_0x6cefb0+_0x3a5d1f(0x1d5),_0x588345=_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x1b4)]),_0x3806d9[_0x3a5d1f(0x199)]['plaintextTemplate']&&(_0x1c0390['plaintext_file']=_0x6cefb0+_0x3a5d1f(0x19f),_0x99b192=_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x1e1)]),_0x3806d9['emailContent'][_0x3a5d1f(0x17c)]&&_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x17c)][_0x3a5d1f(0x168)]>0x0&&(_0x1c0390[_0x3a5d1f(0x17d)]=_0x3806d9[_0x3a5d1f(0x199)][_0x3a5d1f(0x17c)][_0x3a5d1f(0x162)](templateVariableToYaml)),Object[_0x3a5d1f(0x190)](_0x1c0390)[_0x3a5d1f(0x168)]>0x0&&(_0x1f2d0c[_0x3a5d1f(0x174)]=_0x1c0390);}if(_0x3806d9[_0x3a5d1f(0x19a)]){const _0xb2a3e1=pushContentToYaml(_0x3806d9['pushContent']);Object[_0x3a5d1f(0x190)](_0xb2a3e1)[_0x3a5d1f(0x168)]>0x0&&(_0x1f2d0c[_0x3a5d1f(0x18d)]=_0xb2a3e1);}_0x3806d9[_0x3a5d1f(0x1eb)]&&(_0x1f2d0c[_0x3a5d1f(0x1c0)]=lineContentToYaml(_0x3806d9[_0x3a5d1f(0x1eb)]));if(_0x3806d9[_0x3a5d1f(0x1b7)]||_0x3806d9['timezone']){const _0x3a4499={};if(_0x3806d9[_0x3a5d1f(0x1b7)])_0x3a4499[_0x3a5d1f(0x1e4)]=_0x3806d9['startAt'];if(_0x3806d9['timezone'])_0x3a4499[_0x3a5d1f(0x17a)]=_0x3806d9[_0x3a5d1f(0x17a)];_0x1f2d0c[_0x3a5d1f(0x1cd)]=_0x3a4499;}const _0x28c5bb=connectorToYaml(_0x3806d9);_0x28c5bb&&(_0x1f2d0c['connector']=_0x28c5bb);const _0x15d685=activationSettingsToYaml(_0x3806d9);_0x15d685&&(_0x1f2d0c[_0x3a5d1f(0x18c)]=_0x15d685);_0x3806d9[_0x3a5d1f(0x1b0)]&&_0x3806d9[_0x3a5d1f(0x18e)]&&(_0x1f2d0c[_0x3a5d1f(0x16f)]=utmToYaml(_0x3806d9[_0x3a5d1f(0x18e)],_0x3806d9[_0x3a5d1f(0x1b0)]));if(_0x3806d9[_0x3a5d1f(0x1d4)]&&_0x3806d9[_0x3a5d1f(0x1d4)][_0x3a5d1f(0x168)]>0x0||_0x3806d9['emailRecipients']&&_0x3806d9[_0x3a5d1f(0x18f)]['length']>0x0){const _0xb64f8c={};if(_0x3806d9[_0x3a5d1f(0x1d4)]&&_0x3806d9[_0x3a5d1f(0x1d4)][_0x3a5d1f(0x168)]>0x0)_0xb64f8c['events']=_0x3806d9[_0x3a5d1f(0x1d4)];if(_0x3806d9[_0x3a5d1f(0x18f)]&&_0x3806d9[_0x3a5d1f(0x18f)]['length']>0x0)_0xb64f8c[_0x3a5d1f(0x181)]=_0x3806d9['emailRecipients'];_0x1f2d0c[_0x3a5d1f(0x1ce)]=_0xb64f8c;}return{'def':_0x1f2d0c,'htmlContent':_0x588345,'plaintextContent':_0x99b192};}export async function defToCreateInput(_0x1b3f83,_0x57e58b){const _0x4385d5=a130_0x1137,_0x16d4cf={'name':_0x1b3f83[_0x4385d5(0x1ac)],'campaignType':_0x1b3f83['campaign_type']};_0x1b3f83[_0x4385d5(0x1a9)]&&(_0x16d4cf[_0x4385d5(0x176)]=await _0x57e58b[_0x4385d5(0x1e8)](_0x1b3f83[_0x4385d5(0x1a9)]));_0x1b3f83['description']&&(_0x16d4cf[_0x4385d5(0x1c6)]=_0x1b3f83[_0x4385d5(0x1c6)]);await resolveSegmentRefs(_0x1b3f83,_0x16d4cf,_0x57e58b);_0x1b3f83[_0x4385d5(0x174)]&&(_0x16d4cf[_0x4385d5(0x199)]=await emailDefToApi(_0x1b3f83[_0x4385d5(0x174)],_0x16d4cf[_0x4385d5(0x176)],_0x57e58b));_0x1b3f83[_0x4385d5(0x18d)]&&(_0x16d4cf['pushContent']=pushDefToApi(_0x1b3f83[_0x4385d5(0x18d)]));_0x1b3f83[_0x4385d5(0x1c0)]&&(_0x16d4cf[_0x4385d5(0x1eb)]=lineDefToApi(_0x1b3f83[_0x4385d5(0x1c0)]));_0x1b3f83['connector']&&(_0x16d4cf[_0x4385d5(0x16e)]=connectorDefToApi(_0x1b3f83[_0x4385d5(0x1e6)]),_0x1b3f83['connector']['all_columns']!==undefined&&(_0x16d4cf[_0x4385d5(0x1bf)]=_0x1b3f83[_0x4385d5(0x1e6)]['all_columns']),_0x1b3f83['connector'][_0x4385d5(0x1c4)]&&(_0x16d4cf['columns']=_0x1b3f83['connector'][_0x4385d5(0x1c4)][_0x4385d5(0x162)](_0x50de68=>({'column':_0x50de68['column'],'source':{'column':_0x50de68[_0x4385d5(0x167)]}}))));if(_0x1b3f83[_0x4385d5(0x1cd)]){if(_0x1b3f83[_0x4385d5(0x1cd)][_0x4385d5(0x1e4)])_0x16d4cf[_0x4385d5(0x1b7)]=_0x1b3f83[_0x4385d5(0x1cd)][_0x4385d5(0x1e4)];if(_0x1b3f83[_0x4385d5(0x1cd)][_0x4385d5(0x17a)])_0x16d4cf[_0x4385d5(0x17a)]=_0x1b3f83[_0x4385d5(0x1cd)][_0x4385d5(0x17a)];}return _0x1b3f83[_0x4385d5(0x16f)]&&(_0x16d4cf[_0x4385d5(0x1b0)]=_0x1b3f83[_0x4385d5(0x16f)]['enabled']??![]),_0x16d4cf;}export async function defToUpdateInput(_0x41b41a,_0x21e05f){const _0x4616b8=a130_0x1137,_0xf4ee1e={};if(_0x41b41a['name'])_0xf4ee1e[_0x4616b8(0x1ac)]=_0x41b41a[_0x4616b8(0x1ac)];if(_0x41b41a[_0x4616b8(0x1c6)]!==undefined)_0xf4ee1e[_0x4616b8(0x1c6)]=_0x41b41a[_0x4616b8(0x1c6)];await resolveSegmentRefs(_0x41b41a,_0xf4ee1e,_0x21e05f);if(_0x41b41a[_0x4616b8(0x174)]){const _0x57f014=_0x41b41a[_0x4616b8(0x1a9)]?await _0x21e05f[_0x4616b8(0x1e8)](_0x41b41a[_0x4616b8(0x1a9)]):undefined;_0xf4ee1e[_0x4616b8(0x199)]=await emailDefToApi(_0x41b41a[_0x4616b8(0x174)],_0x57f014,_0x21e05f);}_0x41b41a['push']&&(_0xf4ee1e[_0x4616b8(0x19a)]=pushDefToApi(_0x41b41a[_0x4616b8(0x18d)]));_0x41b41a[_0x4616b8(0x1c0)]&&(_0xf4ee1e[_0x4616b8(0x1eb)]=lineDefToApi(_0x41b41a['line']));_0x41b41a[_0x4616b8(0x1e6)]&&(_0xf4ee1e['connectorConfig']=connectorDefToApi(_0x41b41a[_0x4616b8(0x1e6)]),_0x41b41a['connector']['all_columns']!==undefined&&(_0xf4ee1e[_0x4616b8(0x1bf)]=_0x41b41a['connector'][_0x4616b8(0x1a8)]),_0x41b41a['connector'][_0x4616b8(0x1c4)]&&(_0xf4ee1e[_0x4616b8(0x1c4)]=_0x41b41a[_0x4616b8(0x1e6)]['columns'][_0x4616b8(0x162)](_0x3ba5d5=>({'column':_0x3ba5d5['column'],'source':{'column':_0x3ba5d5[_0x4616b8(0x167)]}}))));if(_0x41b41a['schedule']){if(_0x41b41a['schedule']['start_at'])_0xf4ee1e['startAt']=_0x41b41a[_0x4616b8(0x1cd)][_0x4616b8(0x1e4)];if(_0x41b41a[_0x4616b8(0x1cd)][_0x4616b8(0x17a)])_0xf4ee1e[_0x4616b8(0x17a)]=_0x41b41a[_0x4616b8(0x1cd)][_0x4616b8(0x17a)];}return _0x41b41a[_0x4616b8(0x16f)]&&(_0xf4ee1e['enableUtmTracking']=_0x41b41a['utm'][_0x4616b8(0x1b9)]??![]),_0xf4ee1e;}export function toYamlString(_0x5ef3ed){const _0x129208=a130_0x1137,_0x34d116=JSON[_0x129208(0x1b1)](JSON[_0x129208(0x1b3)](_0x5ef3ed)),_0x2f65af=a130_0x417c85[_0x129208(0x1b3)](_0x34d116,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x4a6ce0=['audience:',_0x129208(0x1dc),_0x129208(0x171),_0x129208(0x19c),'schedule:',_0x129208(0x179),_0x129208(0x1ae),_0x129208(0x1a1),_0x129208(0x1ad)],_0x52f67c=_0x2f65af[_0x129208(0x1ec)]('\x0a'),_0x4fd055=[];for(let _0x3b7a98=0x0;_0x3b7a98<_0x52f67c[_0x129208(0x168)];_0x3b7a98++){const _0x4f6784=_0x52f67c[_0x3b7a98][_0x129208(0x184)]();_0x3b7a98>0x0&&_0x4a6ce0[_0x129208(0x193)](_0xbd44cf=>_0x4f6784['startsWith'](_0xbd44cf))&&_0x4fd055[_0x129208(0x168)]>0x0&&_0x4fd055[_0x4fd055[_0x129208(0x168)]-0x1]!==''&&_0x4fd055[_0x129208(0x18d)](''),_0x4fd055[_0x129208(0x18d)](_0x52f67c[_0x3b7a98]);}return _0x4fd055[_0x129208(0x1ed)]('\x0a');}export function parseYamlString(_0x22d771){return safeParseYaml(_0x22d771,CampaignDefSchema);}export function normalizeDef(_0x82e501){const _0x4a1c82=a130_0x1137;return{'type':_0x4a1c82(0x16b),'name':_0x82e501['name'],'campaign_type':_0x82e501['campaign_type'],..._0x82e501[_0x4a1c82(0x1c6)]!==undefined&&{'description':_0x82e501['description']},..._0x82e501['workspace']!==undefined&&{'workspace':_0x82e501[_0x4a1c82(0x1a9)]},..._0x82e501[_0x4a1c82(0x18a)]!==undefined&&{'audience':_0x82e501['audience']},..._0x82e501['segment']!==undefined&&{'segment':_0x82e501['segment']},..._0x82e501[_0x4a1c82(0x174)]&&{'email':normalizeEmailDef(_0x82e501['email'])},..._0x82e501[_0x4a1c82(0x18d)]&&{'push':normalizePushDef(_0x82e501['push'])},..._0x82e501[_0x4a1c82(0x1c0)]&&{'line':normalizeLineContentDef(_0x82e501[_0x4a1c82(0x1c0)])},..._0x82e501[_0x4a1c82(0x1cd)]&&{'schedule':normalizeScheduleDef(_0x82e501[_0x4a1c82(0x1cd)])},..._0x82e501[_0x4a1c82(0x1e6)]&&{'connector':normalizeConnectorDef(_0x82e501['connector'])},..._0x82e501[_0x4a1c82(0x18c)]&&{'activation':normalizeActivationDef(_0x82e501[_0x4a1c82(0x18c)])},..._0x82e501[_0x4a1c82(0x16f)]&&{'utm':normalizeUtmDef(_0x82e501[_0x4a1c82(0x16f)])},..._0x82e501[_0x4a1c82(0x1ce)]&&{'notifications':normalizeNotificationsDef(_0x82e501['notifications'])}};}function templateVariableToYaml(_0x2c19cb){const _0x130b88=a130_0x1137;return{'name':_0x2c19cb['name'],..._0x2c19cb[_0x130b88(0x182)]&&{'display_name':_0x2c19cb['displayName']},..._0x2c19cb[_0x130b88(0x165)]&&{'preview_value':_0x2c19cb['previewValue']},..._0x2c19cb[_0x130b88(0x1ab)]&&{'default_value':_0x2c19cb[_0x130b88(0x1ab)]}};}function pushContentToYaml(_0x51e59d){const _0x51dabd=a130_0x1137;return{..._0x51e59d[_0x51dabd(0x1df)]&&{'title':_0x51e59d[_0x51dabd(0x1df)]},..._0x51e59d[_0x51dabd(0x1e7)]&&{'message':_0x51e59d[_0x51dabd(0x1e7)]},..._0x51e59d[_0x51dabd(0x1b2)]&&{'push_type':_0x51e59d['pushType']},..._0x51e59d[_0x51dabd(0x189)]&&{'image_url':_0x51e59d[_0x51dabd(0x189)]},..._0x51e59d['onClickBehavior']&&{'on_click_behavior':_0x51e59d[_0x51dabd(0x1da)]},..._0x51e59d[_0x51dabd(0x1d7)]&&{'on_click_behavior_url':_0x51e59d[_0x51dabd(0x1d7)]}};}function lineContentToYaml(_0x19444e){const _0x17c769=a130_0x1137;return{..._0x19444e[_0x17c769(0x172)]&&{'line_sender_account_id':_0x19444e[_0x17c769(0x172)]},'messages':_0x19444e[_0x17c769(0x1a3)][_0x17c769(0x162)](_0x1fde3d=>{const _0x101d5c=_0x17c769;if(_0x1fde3d[_0x101d5c(0x194)]==='textV2')return{'type':_0x101d5c(0x1d2),'text':_0x1fde3d[_0x101d5c(0x178)]};return{'type':_0x101d5c(0x198),'base_url':_0x1fde3d[_0x101d5c(0x19d)],'alt_text':_0x1fde3d[_0x101d5c(0x1a5)],..._0x1fde3d[_0x101d5c(0x188)]!==undefined&&{'base_size':_0x1fde3d['baseSize']},'actions':_0x1fde3d['actions'][_0x101d5c(0x162)](_0xb0568f=>{const _0x2e9330=_0x101d5c;if(_0xb0568f[_0x2e9330(0x194)]===_0x2e9330(0x1cc))return{'type':_0x2e9330(0x1cc),'link_uri':_0xb0568f[_0x2e9330(0x17f)],'area':_0xb0568f[_0x2e9330(0x183)],..._0xb0568f[_0x2e9330(0x1e3)]&&{'label':_0xb0568f[_0x2e9330(0x1e3)]}};if(_0xb0568f[_0x2e9330(0x194)]===_0x2e9330(0x1e7))return{'type':_0x2e9330(0x1e7),'text':_0xb0568f[_0x2e9330(0x178)],'area':_0xb0568f[_0x2e9330(0x183)],..._0xb0568f[_0x2e9330(0x1e3)]&&{'label':_0xb0568f[_0x2e9330(0x1e3)]}};return{'type':_0x2e9330(0x166),'clipboard_text':_0xb0568f[_0x2e9330(0x1b6)],'area':_0xb0568f['area'],..._0xb0568f['label']&&{'label':_0xb0568f[_0x2e9330(0x1e3)]}};})};})};}function a130_0x1137(_0x1bdbd9,_0x4fa661){_0x1bdbd9=_0x1bdbd9-0x160;const _0x264c61=a130_0x264c();let _0x11374a=_0x264c61[_0x1bdbd9];return _0x11374a;}function connectorToYaml(_0x1674e9){const _0x3679ac=a130_0x1137,_0xb70ce0=_0x1674e9[_0x3679ac(0x177)],_0x1669c8=_0x1674e9[_0x3679ac(0x1c4)]&&_0x1674e9[_0x3679ac(0x1c4)][_0x3679ac(0x168)]>0x0;if(!_0xb70ce0&&!_0x1669c8&&!_0x1674e9[_0x3679ac(0x1bf)])return undefined;const _0x37fd17={};return _0x1674e9[_0x3679ac(0x1bf)]!==undefined&&(_0x37fd17['all_columns']=_0x1674e9['allColumns']),_0x1674e9[_0x3679ac(0x1c4)]&&_0x1674e9[_0x3679ac(0x1c4)]['length']>0x0&&(_0x37fd17[_0x3679ac(0x1c4)]=_0x1674e9['columns']['map'](columnMappingToYaml)),_0x37fd17;}function columnMappingToYaml(_0xb2a9b2){const _0x4e72d6=a130_0x1137;return{'column':_0xb2a9b2[_0x4e72d6(0x17b)],'source':_0xb2a9b2[_0x4e72d6(0x167)][_0x4e72d6(0x17b)]};}function activationSettingsToYaml(_0xe605de){const _0x372bc4=a130_0x1137;if(!_0xe605de['activationActionsEnabled']&&!_0xe605de['workflowProjectName']&&!_0xe605de[_0x372bc4(0x1aa)])return undefined;return{..._0xe605de['activationActionsEnabled']!==undefined&&{'enabled':_0xe605de['activationActionsEnabled']},..._0xe605de[_0x372bc4(0x170)]&&{'workflow_project':_0xe605de['workflowProjectName']},..._0xe605de[_0x372bc4(0x1aa)]&&{'workflow_name':_0xe605de[_0x372bc4(0x1aa)]}};}function utmToYaml(_0x1d959d,_0x292643){const _0x6bf567=a130_0x1137;return{'enabled':_0x292643,..._0x1d959d[_0x6bf567(0x1d9)]&&{'id':_0x1d959d[_0x6bf567(0x1d9)]},..._0x1d959d[_0x6bf567(0x196)]&&{'medium':_0x1d959d[_0x6bf567(0x196)]},..._0x1d959d[_0x6bf567(0x1c2)]&&{'source':_0x1d959d[_0x6bf567(0x1c2)]},..._0x1d959d[_0x6bf567(0x1a6)]&&{'source_platform':_0x1d959d[_0x6bf567(0x1a6)]},..._0x1d959d[_0x6bf567(0x1e9)]&&{'campaign':_0x1d959d[_0x6bf567(0x1e9)]},..._0x1d959d[_0x6bf567(0x1c3)]&&{'marketing_tactic':_0x1d959d[_0x6bf567(0x1c3)]}};}async function resolveSegmentRefs(_0x3f64ef,_0x1fae01,_0x20dc22){const _0x264035=a130_0x1137;if(_0x3f64ef[_0x264035(0x18a)]){const _0x5ed3a9=parseRef(_0x3f64ef['audience']),_0x331983=_0x3f64ef[_0x264035(0x1af)]?parseRef(_0x3f64ef[_0x264035(0x1af)]):undefined,_0x3bebe1=_0x331983?_0x5ed3a9+'/'+_0x331983:_0x5ed3a9,_0x480bf7=await _0x20dc22[_0x264035(0x163)](_0x3bebe1);_0x1fae01[_0x264035(0x161)]=_0x480bf7[_0x264035(0x161)],_0x1fae01[_0x264035(0x1bc)]=_0x480bf7[_0x264035(0x1bc)],_0x480bf7[_0x264035(0x1de)]&&(_0x1fae01[_0x264035(0x1de)]=_0x480bf7[_0x264035(0x1de)],_0x1fae01['segmentName']=_0x480bf7[_0x264035(0x1b5)]);}}async function emailDefToApi(_0x114c4a,_0x2a7d0e,_0xfa22f9){const _0x19247e=a130_0x1137;let _0x1e8f2f='',_0x52429a;if(_0x114c4a[_0x19247e(0x1d1)]){const _0x101096=parseRef(_0x114c4a[_0x19247e(0x1d1)]),_0x402519=await _0xfa22f9[_0x19247e(0x195)](_0x101096,_0x2a7d0e);_0x1e8f2f=_0x402519['id'],_0x52429a=_0x402519['name'];}let _0x5cd585;_0x114c4a[_0x19247e(0x1d6)]&&(_0x5cd585=await _0xfa22f9[_0x19247e(0x1ca)](_0x114c4a[_0x19247e(0x1d6)]));let _0x555a7d;return _0x114c4a[_0x19247e(0x1cf)]&&(_0x555a7d=await _0xfa22f9[_0x19247e(0x1ca)](_0x114c4a[_0x19247e(0x1cf)])),{'sourceEmailTemplateId':_0x1e8f2f,..._0x52429a&&{'sourceEmailTemplateName':_0x52429a},..._0x114c4a[_0x19247e(0x1db)]&&{'subjectTemplate':_0x114c4a[_0x19247e(0x1db)]},..._0x5cd585&&{'htmlTemplate':_0x5cd585},..._0x555a7d&&{'plaintextTemplate':_0x555a7d},..._0x114c4a['sender_id']&&{'emailSenderId':_0x114c4a[_0x19247e(0x1e2)]}};}function pushDefToApi(_0x40c1ca){const _0x32f2c1=a130_0x1137;return{..._0x40c1ca[_0x32f2c1(0x1df)]&&{'title':_0x40c1ca[_0x32f2c1(0x1df)]},..._0x40c1ca[_0x32f2c1(0x1e7)]&&{'message':_0x40c1ca[_0x32f2c1(0x1e7)]},..._0x40c1ca[_0x32f2c1(0x173)]&&{'pushType':_0x40c1ca[_0x32f2c1(0x173)]},..._0x40c1ca[_0x32f2c1(0x1e5)]&&{'imageUrl':_0x40c1ca[_0x32f2c1(0x1e5)]},..._0x40c1ca[_0x32f2c1(0x16c)]&&{'onClickBehavior':_0x40c1ca['on_click_behavior']},..._0x40c1ca[_0x32f2c1(0x1b8)]&&{'onClickBehaviorUrl':_0x40c1ca[_0x32f2c1(0x1b8)]}};}function lineDefToApi(_0x369ea7){const _0x355345=a130_0x1137;return{..._0x369ea7[_0x355345(0x1c5)]&&{'lineSenderAccountId':_0x369ea7[_0x355345(0x1c5)]},'messages':_0x369ea7[_0x355345(0x1a3)]['map'](_0x9b3e70=>{const _0x4a2bf8=_0x355345;if(_0x9b3e70[_0x4a2bf8(0x194)]==='textV2')return{'type':_0x4a2bf8(0x1d2),'text':_0x9b3e70[_0x4a2bf8(0x178)]};return{'type':_0x4a2bf8(0x198),'baseUrl':_0x9b3e70[_0x4a2bf8(0x1d8)],'altText':_0x9b3e70[_0x4a2bf8(0x1d0)],..._0x9b3e70[_0x4a2bf8(0x1e0)]!==undefined&&{'baseSize':_0x9b3e70[_0x4a2bf8(0x1e0)]},'actions':_0x9b3e70[_0x4a2bf8(0x1a0)]['map'](_0x529dee=>{const _0x4d00be=_0x4a2bf8;if(_0x529dee[_0x4d00be(0x194)]===_0x4d00be(0x1cc))return{'type':_0x4d00be(0x1cc),'linkUri':_0x529dee[_0x4d00be(0x1a7)],'area':_0x529dee[_0x4d00be(0x183)],..._0x529dee[_0x4d00be(0x1e3)]&&{'label':_0x529dee[_0x4d00be(0x1e3)]}};if(_0x529dee[_0x4d00be(0x194)]===_0x4d00be(0x1e7))return{'type':_0x4d00be(0x1e7),'text':_0x529dee[_0x4d00be(0x178)],'area':_0x529dee[_0x4d00be(0x183)],..._0x529dee[_0x4d00be(0x1e3)]&&{'label':_0x529dee[_0x4d00be(0x1e3)]}};return{'type':_0x4d00be(0x166),'clipboardText':_0x529dee['clipboard_text'],'area':_0x529dee[_0x4d00be(0x183)],..._0x529dee['label']&&{'label':_0x529dee[_0x4d00be(0x1e3)]}};})};})};}function connectorDefToApi(_0x14b1c9){return{};}function normalizeEmailDef(_0x79b3d6){const _0x431f24=a130_0x1137;return{..._0x79b3d6[_0x431f24(0x1d1)]!==undefined&&{'template':_0x79b3d6[_0x431f24(0x1d1)]},..._0x79b3d6[_0x431f24(0x1db)]!==undefined&&{'subject':_0x79b3d6[_0x431f24(0x1db)]},..._0x79b3d6[_0x431f24(0x1d6)]!==undefined&&{'html_file':_0x79b3d6[_0x431f24(0x1d6)]},..._0x79b3d6[_0x431f24(0x1cf)]!==undefined&&{'plaintext_file':_0x79b3d6['plaintext_file']},..._0x79b3d6[_0x431f24(0x1e2)]!==undefined&&{'sender_id':_0x79b3d6['sender_id']},..._0x79b3d6[_0x431f24(0x17d)]&&{'variables':_0x79b3d6[_0x431f24(0x17d)][_0x431f24(0x162)](_0x4a49a8=>({'name':_0x4a49a8[_0x431f24(0x1ac)],..._0x4a49a8['display_name']!==undefined&&{'display_name':_0x4a49a8[_0x431f24(0x1a4)]},..._0x4a49a8['preview_value']!==undefined&&{'preview_value':_0x4a49a8[_0x431f24(0x17e)]},..._0x4a49a8[_0x431f24(0x191)]!==undefined&&{'default_value':_0x4a49a8[_0x431f24(0x191)]}}))}};}function normalizePushDef(_0x18e901){const _0x33147d=a130_0x1137;return{..._0x18e901['title']!==undefined&&{'title':_0x18e901[_0x33147d(0x1df)]},..._0x18e901[_0x33147d(0x1e7)]!==undefined&&{'message':_0x18e901['message']},..._0x18e901['push_type']!==undefined&&{'push_type':_0x18e901[_0x33147d(0x173)]},..._0x18e901[_0x33147d(0x1e5)]!==undefined&&{'image_url':_0x18e901[_0x33147d(0x1e5)]},..._0x18e901['on_click_behavior']!==undefined&&{'on_click_behavior':_0x18e901['on_click_behavior']},..._0x18e901['on_click_behavior_url']!==undefined&&{'on_click_behavior_url':_0x18e901[_0x33147d(0x1b8)]}};}function normalizeLineAction(_0x3d5f27){const _0x19762f=a130_0x1137,_0x2f3039={'area':_0x3d5f27[_0x19762f(0x183)],..._0x3d5f27[_0x19762f(0x1e3)]!==undefined&&{'label':_0x3d5f27['label']}};if(_0x3d5f27[_0x19762f(0x194)]==='uri')return{'type':_0x19762f(0x1cc),'link_uri':_0x3d5f27[_0x19762f(0x1a7)],..._0x2f3039};if(_0x3d5f27[_0x19762f(0x194)]===_0x19762f(0x1e7))return{'type':'message','text':_0x3d5f27[_0x19762f(0x178)],..._0x2f3039};return{'type':_0x19762f(0x166),'clipboard_text':_0x3d5f27['clipboard_text'],..._0x2f3039};}function normalizeLineContentDef(_0x2c8153){const _0x1446d6=a130_0x1137;return{..._0x2c8153[_0x1446d6(0x1c5)]!==undefined&&{'line_sender_account_id':_0x2c8153[_0x1446d6(0x1c5)]},'messages':_0x2c8153[_0x1446d6(0x1a3)]['map'](_0x27baab=>{const _0x247173=_0x1446d6;if(_0x27baab[_0x247173(0x194)]==='textV2')return{'type':_0x247173(0x1d2),'text':_0x27baab[_0x247173(0x178)]};return{'type':_0x247173(0x198),'base_url':_0x27baab[_0x247173(0x1d8)],'alt_text':_0x27baab[_0x247173(0x1d0)],..._0x27baab[_0x247173(0x1e0)]!==undefined&&{'base_size':_0x27baab[_0x247173(0x1e0)]},'actions':_0x27baab[_0x247173(0x1a0)][_0x247173(0x162)](normalizeLineAction)};})};}function normalizeScheduleDef(_0x125ed9){const _0x5afb67=a130_0x1137;return{..._0x125ed9['start_at']!==undefined&&{'start_at':_0x125ed9[_0x5afb67(0x1e4)]},..._0x125ed9[_0x5afb67(0x17a)]!==undefined&&{'timezone':_0x125ed9['timezone']}};}function normalizeConnectorDef(_0x1ff85d){const _0xe6a6ff=a130_0x1137;return{..._0x1ff85d[_0xe6a6ff(0x1a8)]!==undefined&&{'all_columns':_0x1ff85d[_0xe6a6ff(0x1a8)]},..._0x1ff85d[_0xe6a6ff(0x1c4)]&&{'columns':_0x1ff85d[_0xe6a6ff(0x1c4)]['map'](_0x54fd2a=>({'column':_0x54fd2a[_0xe6a6ff(0x17b)],'source':_0x54fd2a[_0xe6a6ff(0x167)]}))}};}function normalizeActivationDef(_0x4abd6c){const _0x3f0ba3=a130_0x1137;return{..._0x4abd6c['enabled']!==undefined&&{'enabled':_0x4abd6c['enabled']},..._0x4abd6c[_0x3f0ba3(0x187)]!==undefined&&{'workflow_project':_0x4abd6c[_0x3f0ba3(0x187)]},..._0x4abd6c[_0x3f0ba3(0x16a)]!==undefined&&{'workflow_name':_0x4abd6c['workflow_name']}};}function normalizeUtmDef(_0x45db41){const _0xb16a63=a130_0x1137;return{..._0x45db41[_0xb16a63(0x1b9)]!==undefined&&{'enabled':_0x45db41[_0xb16a63(0x1b9)]},..._0x45db41['id']!==undefined&&{'id':_0x45db41['id']},..._0x45db41[_0xb16a63(0x18b)]!==undefined&&{'medium':_0x45db41[_0xb16a63(0x18b)]},..._0x45db41[_0xb16a63(0x167)]!==undefined&&{'source':_0x45db41[_0xb16a63(0x167)]},..._0x45db41[_0xb16a63(0x180)]!==undefined&&{'source_platform':_0x45db41[_0xb16a63(0x180)]},..._0x45db41[_0xb16a63(0x16b)]!==undefined&&{'campaign':_0x45db41['campaign']},..._0x45db41[_0xb16a63(0x1cb)]!==undefined&&{'marketing_tactic':_0x45db41[_0xb16a63(0x1cb)]}};}function normalizeNotificationsDef(_0x4453a7){const _0x89932f=a130_0x1137;return{..._0x4453a7['events']&&{'events':[..._0x4453a7[_0x89932f(0x1d3)]]},..._0x4453a7[_0x89932f(0x181)]&&{'recipients':[..._0x4453a7[_0x89932f(0x181)]]}};}export function sanitizeCampaignFileName(_0x33ab0c){const _0x4fad9a=a130_0x1137;return _0x33ab0c['toLowerCase']()[_0x4fad9a(0x1c1)](/[/\\:*?"<>|]/g,'-')[_0x4fad9a(0x1c1)](/\s+/g,'-')[_0x4fad9a(0x1c1)](/-+/g,'-')[_0x4fad9a(0x1c1)](/^-|-$/g,'');}
|
|
1
|
+
const a130_0x5b3e92=a130_0x2404;(function(_0x3a8fbc,_0x890abd){const _0x327692=a130_0x2404,_0x3621c1=_0x3a8fbc();while(!![]){try{const _0x3cf355=-parseInt(_0x327692(0x1b4))/0x1+-parseInt(_0x327692(0x22b))/0x2+parseInt(_0x327692(0x1f4))/0x3+-parseInt(_0x327692(0x20a))/0x4*(-parseInt(_0x327692(0x1ea))/0x5)+-parseInt(_0x327692(0x21d))/0x6*(parseInt(_0x327692(0x1ed))/0x7)+parseInt(_0x327692(0x235))/0x8+parseInt(_0x327692(0x224))/0x9*(parseInt(_0x327692(0x208))/0xa);if(_0x3cf355===_0x890abd)break;else _0x3621c1['push'](_0x3621c1['shift']());}catch(_0x478ed1){_0x3621c1['push'](_0x3621c1['shift']());}}}(a130_0x5fcf,0x9eae6));import*as a130_0x3c73f0 from'yaml';import{safeParseYaml}from'../segment/yaml-validator.js';import{CampaignDefSchema}from'./types/campaign-def.js';const REF_PREFIX=a130_0x5b3e92(0x1d6);function toRef(_0x3b8a04){return''+REF_PREFIX+_0x3b8a04;}function a130_0x2404(_0x1688b7,_0xa3209e){_0x1688b7=_0x1688b7-0x1b1;const _0x5fcf96=a130_0x5fcf();let _0x24048e=_0x5fcf96[_0x1688b7];return _0x24048e;}function isRef(_0x434524){const _0x24b244=a130_0x5b3e92;return _0x434524[_0x24b244(0x1d9)](REF_PREFIX);}function parseRef(_0x1e2698){const _0x300f7c=a130_0x5b3e92;if(!isRef(_0x1e2698))return _0x1e2698;return _0x1e2698[_0x300f7c(0x20c)](REF_PREFIX[_0x300f7c(0x220)]);}export function campaignToDef(_0x7e92ab,_0x367845){const _0x4107fe=a130_0x5b3e92,_0x344c7e=_0x7e92ab[_0x4107fe(0x1cb)],_0x4b4f29=sanitizeCampaignFileName(_0x344c7e[_0x4107fe(0x1c6)]),_0x56511d={'type':_0x4107fe(0x1b1),'name':_0x344c7e['name'],'campaign_type':_0x344c7e['campaignType'],..._0x344c7e[_0x4107fe(0x210)]&&{'description':_0x344c7e[_0x4107fe(0x210)]},..._0x367845[_0x4107fe(0x223)]&&{'workspace':_0x367845[_0x4107fe(0x223)]}};_0x344c7e[_0x4107fe(0x1e5)]&&(_0x56511d[_0x4107fe(0x236)]=toRef(_0x344c7e[_0x4107fe(0x1e5)]));if(_0x344c7e[_0x4107fe(0x1c5)]){const _0x2eee74=_0x367845['segmentFolderPath']?_0x367845[_0x4107fe(0x1b9)]+'/'+_0x344c7e[_0x4107fe(0x1c5)]:_0x344c7e[_0x4107fe(0x1c5)];_0x56511d[_0x4107fe(0x1e6)]=toRef(_0x2eee74);}let _0x37c407,_0x5db5a0;if(_0x344c7e['emailContent']){const _0x524d00={};_0x344c7e[_0x4107fe(0x1bc)]['sourceEmailTemplateName']&&(_0x524d00['template']=toRef(_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x230)])),_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1fe)]&&(_0x524d00[_0x4107fe(0x22e)]=_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1fe)]),_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x239)]&&(_0x524d00[_0x4107fe(0x20e)]=_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x239)]),_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1e9)]&&(_0x524d00[_0x4107fe(0x1d7)]=_0x4b4f29+_0x4107fe(0x1ca),_0x37c407=_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1e9)]),_0x344c7e['emailContent'][_0x4107fe(0x1fc)]&&(_0x524d00[_0x4107fe(0x1ff)]=_0x4b4f29+_0x4107fe(0x1d5),_0x5db5a0=_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1fc)]),_0x344c7e[_0x4107fe(0x1bc)]['templateVariables']&&_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1c0)][_0x4107fe(0x220)]>0x0&&(_0x524d00[_0x4107fe(0x1ce)]=_0x344c7e[_0x4107fe(0x1bc)][_0x4107fe(0x1c0)][_0x4107fe(0x1cf)](templateVariableToYaml)),Object['keys'](_0x524d00)[_0x4107fe(0x220)]>0x0&&(_0x56511d[_0x4107fe(0x1c8)]=_0x524d00);}if(_0x344c7e[_0x4107fe(0x207)]){const _0x3e7710=pushContentToYaml(_0x344c7e['pushContent']);Object[_0x4107fe(0x215)](_0x3e7710)[_0x4107fe(0x220)]>0x0&&(_0x56511d['push']=_0x3e7710);}_0x344c7e['lineContent']&&(_0x56511d[_0x4107fe(0x232)]=lineContentToYaml(_0x344c7e[_0x4107fe(0x222)]));if(_0x344c7e[_0x4107fe(0x1e4)]||_0x344c7e['timezone']){const _0x170b18={};if(_0x344c7e[_0x4107fe(0x1e4)])_0x170b18[_0x4107fe(0x1d8)]=_0x344c7e[_0x4107fe(0x1e4)];if(_0x344c7e[_0x4107fe(0x1b8)])_0x170b18[_0x4107fe(0x1b8)]=_0x344c7e[_0x4107fe(0x1b8)];_0x56511d['schedule']=_0x170b18;}const _0x4ab906=connectorToYaml(_0x344c7e);_0x4ab906&&(_0x56511d[_0x4107fe(0x1f7)]=_0x4ab906);const _0x354f3a=activationSettingsToYaml(_0x344c7e);_0x354f3a&&(_0x56511d['activation']=_0x354f3a);_0x344c7e[_0x4107fe(0x1bf)]&&_0x344c7e['utmParameters']&&(_0x56511d[_0x4107fe(0x22d)]=utmToYaml(_0x344c7e[_0x4107fe(0x217)],_0x344c7e['enableUtmTracking']));if(_0x344c7e[_0x4107fe(0x22f)]&&_0x344c7e[_0x4107fe(0x22f)][_0x4107fe(0x220)]>0x0||_0x344c7e[_0x4107fe(0x1d4)]&&_0x344c7e[_0x4107fe(0x1d4)][_0x4107fe(0x220)]>0x0){const _0x5bedbf={};if(_0x344c7e[_0x4107fe(0x22f)]&&_0x344c7e[_0x4107fe(0x22f)][_0x4107fe(0x220)]>0x0)_0x5bedbf[_0x4107fe(0x1f5)]=_0x344c7e[_0x4107fe(0x22f)];if(_0x344c7e['emailRecipients']&&_0x344c7e[_0x4107fe(0x1d4)][_0x4107fe(0x220)]>0x0)_0x5bedbf['recipients']=_0x344c7e['emailRecipients'];_0x56511d[_0x4107fe(0x203)]=_0x5bedbf;}return{'def':_0x56511d,'htmlContent':_0x37c407,'plaintextContent':_0x5db5a0};}export async function defToCreateInput(_0x5abe62,_0x26d2eb){const _0x473a17=a130_0x5b3e92,_0x35fa9a={'name':_0x5abe62[_0x473a17(0x1c6)],'campaignType':_0x5abe62[_0x473a17(0x1bd)]};_0x5abe62[_0x473a17(0x23a)]&&(_0x35fa9a[_0x473a17(0x205)]=await _0x26d2eb[_0x473a17(0x1c7)](_0x5abe62[_0x473a17(0x23a)]));_0x5abe62[_0x473a17(0x210)]&&(_0x35fa9a[_0x473a17(0x210)]=_0x5abe62[_0x473a17(0x210)]);await resolveSegmentRefs(_0x5abe62,_0x35fa9a,_0x26d2eb);_0x5abe62[_0x473a17(0x1c8)]&&(_0x35fa9a[_0x473a17(0x1bc)]=await emailDefToApi(_0x5abe62[_0x473a17(0x1c8)],_0x35fa9a[_0x473a17(0x205)],_0x26d2eb));_0x5abe62['push']&&(_0x35fa9a[_0x473a17(0x207)]=pushDefToApi(_0x5abe62[_0x473a17(0x200)]));_0x5abe62[_0x473a17(0x232)]&&(_0x35fa9a[_0x473a17(0x222)]=lineDefToApi(_0x5abe62['line']));_0x5abe62['connector']&&(_0x35fa9a[_0x473a17(0x1dd)]=connectorDefToApi(_0x5abe62['connector']),_0x5abe62[_0x473a17(0x1f7)][_0x473a17(0x218)]!==undefined&&(_0x35fa9a['allColumns']=_0x5abe62[_0x473a17(0x1f7)][_0x473a17(0x218)]),_0x5abe62[_0x473a17(0x1f7)]['columns']&&(_0x35fa9a[_0x473a17(0x212)]=_0x5abe62[_0x473a17(0x1f7)]['columns'][_0x473a17(0x1cf)](_0x5d4480=>({'column':_0x5d4480[_0x473a17(0x21c)],'source':{'column':_0x5d4480[_0x473a17(0x226)]}}))));if(_0x5abe62['schedule']){if(_0x5abe62[_0x473a17(0x1df)][_0x473a17(0x1d8)])_0x35fa9a[_0x473a17(0x1e4)]=_0x5abe62['schedule']['start_at'];if(_0x5abe62[_0x473a17(0x1df)]['timezone'])_0x35fa9a['timezone']=_0x5abe62[_0x473a17(0x1df)][_0x473a17(0x1b8)];}return _0x5abe62[_0x473a17(0x22d)]&&(_0x35fa9a[_0x473a17(0x1bf)]=_0x5abe62['utm'][_0x473a17(0x20f)]??![]),_0x35fa9a;}export async function defToUpdateInput(_0x34fc80,_0x1523ef){const _0x426961=a130_0x5b3e92,_0xcf764f={};if(_0x34fc80['name'])_0xcf764f[_0x426961(0x1c6)]=_0x34fc80[_0x426961(0x1c6)];if(_0x34fc80[_0x426961(0x210)]!==undefined)_0xcf764f[_0x426961(0x210)]=_0x34fc80[_0x426961(0x210)];await resolveSegmentRefs(_0x34fc80,_0xcf764f,_0x1523ef);if(_0x34fc80[_0x426961(0x1c8)]){const _0x2bfe82=_0x34fc80['workspace']?await _0x1523ef[_0x426961(0x1c7)](_0x34fc80[_0x426961(0x23a)]):undefined;_0xcf764f[_0x426961(0x1bc)]=await emailDefToApi(_0x34fc80['email'],_0x2bfe82,_0x1523ef);}_0x34fc80[_0x426961(0x200)]&&(_0xcf764f[_0x426961(0x207)]=pushDefToApi(_0x34fc80[_0x426961(0x200)]));_0x34fc80[_0x426961(0x232)]&&(_0xcf764f[_0x426961(0x222)]=lineDefToApi(_0x34fc80[_0x426961(0x232)]));_0x34fc80[_0x426961(0x1f7)]&&(_0xcf764f[_0x426961(0x1dd)]=connectorDefToApi(_0x34fc80[_0x426961(0x1f7)]),_0x34fc80[_0x426961(0x1f7)][_0x426961(0x218)]!==undefined&&(_0xcf764f[_0x426961(0x1e3)]=_0x34fc80[_0x426961(0x1f7)][_0x426961(0x218)]),_0x34fc80[_0x426961(0x1f7)][_0x426961(0x212)]&&(_0xcf764f[_0x426961(0x212)]=_0x34fc80[_0x426961(0x1f7)][_0x426961(0x212)][_0x426961(0x1cf)](_0x3af7dd=>({'column':_0x3af7dd[_0x426961(0x21c)],'source':{'column':_0x3af7dd[_0x426961(0x226)]}}))));if(_0x34fc80[_0x426961(0x1df)]){if(_0x34fc80[_0x426961(0x1df)][_0x426961(0x1d8)])_0xcf764f[_0x426961(0x1e4)]=_0x34fc80['schedule'][_0x426961(0x1d8)];if(_0x34fc80[_0x426961(0x1df)][_0x426961(0x1b8)])_0xcf764f[_0x426961(0x1b8)]=_0x34fc80[_0x426961(0x1df)][_0x426961(0x1b8)];}return _0x34fc80['utm']&&(_0xcf764f[_0x426961(0x1bf)]=_0x34fc80[_0x426961(0x22d)][_0x426961(0x20f)]??![]),_0xcf764f;}export function toYamlString(_0x1f779d){const _0x3dc98d=a130_0x5b3e92,_0xf33ef3=JSON['parse'](JSON[_0x3dc98d(0x22a)](_0x1f779d)),_0x59ae83=a130_0x3c73f0[_0x3dc98d(0x22a)](_0xf33ef3,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x384e5c=[_0x3dc98d(0x204),_0x3dc98d(0x1c1),_0x3dc98d(0x1cd),'line:',_0x3dc98d(0x219),_0x3dc98d(0x1b5),_0x3dc98d(0x1d0),_0x3dc98d(0x1c2),_0x3dc98d(0x1f8)],_0x3cd568=_0x59ae83[_0x3dc98d(0x1b6)]('\x0a'),_0x4a585a=[];for(let _0x559e29=0x0;_0x559e29<_0x3cd568[_0x3dc98d(0x220)];_0x559e29++){const _0x531d91=_0x3cd568[_0x559e29][_0x3dc98d(0x229)]();_0x559e29>0x0&&_0x384e5c[_0x3dc98d(0x1f1)](_0x57e035=>_0x531d91[_0x3dc98d(0x1d9)](_0x57e035))&&_0x4a585a[_0x3dc98d(0x220)]>0x0&&_0x4a585a[_0x4a585a[_0x3dc98d(0x220)]-0x1]!==''&&_0x4a585a[_0x3dc98d(0x200)](''),_0x4a585a['push'](_0x3cd568[_0x559e29]);}return _0x4a585a[_0x3dc98d(0x21a)]('\x0a');}export function parseYamlString(_0x171f94){return safeParseYaml(_0x171f94,CampaignDefSchema);}export function normalizeDef(_0xde0d64){const _0x15b56d=a130_0x5b3e92;return{'type':_0x15b56d(0x1b1),'name':_0xde0d64[_0x15b56d(0x1c6)],'campaign_type':_0xde0d64['campaign_type'],..._0xde0d64['description']!==undefined&&{'description':_0xde0d64[_0x15b56d(0x210)]},..._0xde0d64[_0x15b56d(0x23a)]!==undefined&&{'workspace':_0xde0d64[_0x15b56d(0x23a)]},..._0xde0d64[_0x15b56d(0x236)]!==undefined&&{'audience':_0xde0d64[_0x15b56d(0x236)]},..._0xde0d64['segment']!==undefined&&{'segment':_0xde0d64['segment']},..._0xde0d64[_0x15b56d(0x1c8)]&&{'email':normalizeEmailDef(_0xde0d64[_0x15b56d(0x1c8)])},..._0xde0d64[_0x15b56d(0x200)]&&{'push':normalizePushDef(_0xde0d64[_0x15b56d(0x200)])},..._0xde0d64[_0x15b56d(0x232)]&&{'line':normalizeLineContentDef(_0xde0d64[_0x15b56d(0x232)])},..._0xde0d64[_0x15b56d(0x1df)]&&{'schedule':normalizeScheduleDef(_0xde0d64[_0x15b56d(0x1df)])},..._0xde0d64[_0x15b56d(0x1f7)]&&{'connector':normalizeConnectorDef(_0xde0d64[_0x15b56d(0x1f7)])},..._0xde0d64[_0x15b56d(0x23b)]&&{'activation':normalizeActivationDef(_0xde0d64[_0x15b56d(0x23b)])},..._0xde0d64[_0x15b56d(0x22d)]&&{'utm':normalizeUtmDef(_0xde0d64[_0x15b56d(0x22d)])},..._0xde0d64[_0x15b56d(0x203)]&&{'notifications':normalizeNotificationsDef(_0xde0d64['notifications'])}};}function templateVariableToYaml(_0x155ad3){const _0x1d0733=a130_0x5b3e92;return{'name':_0x155ad3[_0x1d0733(0x1c6)],..._0x155ad3['displayName']&&{'display_name':_0x155ad3['displayName']},..._0x155ad3['previewValue']&&{'preview_value':_0x155ad3[_0x1d0733(0x1bb)]},..._0x155ad3['defaultValue']&&{'default_value':_0x155ad3[_0x1d0733(0x1ba)]}};}function pushContentToYaml(_0x2263cd){const _0x338427=a130_0x5b3e92;return{..._0x2263cd[_0x338427(0x1f9)]&&{'title':_0x2263cd[_0x338427(0x1f9)]},..._0x2263cd[_0x338427(0x1b7)]&&{'message':_0x2263cd[_0x338427(0x1b7)]},..._0x2263cd[_0x338427(0x211)]&&{'push_type':_0x2263cd['pushType']},..._0x2263cd[_0x338427(0x1cc)]&&{'image_url':_0x2263cd[_0x338427(0x1cc)]},..._0x2263cd[_0x338427(0x1eb)]&&{'on_click_behavior':_0x2263cd[_0x338427(0x1eb)]},..._0x2263cd[_0x338427(0x201)]&&{'on_click_behavior_url':_0x2263cd[_0x338427(0x201)]}};}function lineContentToYaml(_0x231a63){const _0x45df4e=a130_0x5b3e92;return{..._0x231a63['lineSenderAccountId']&&{'line_sender_account_id':_0x231a63['lineSenderAccountId']},'messages':_0x231a63[_0x45df4e(0x1ee)][_0x45df4e(0x1cf)](_0x25dc2e=>{const _0x4b4baf=_0x45df4e;if(_0x25dc2e[_0x4b4baf(0x21b)]===_0x4b4baf(0x21e))return{'type':'textV2','text':_0x25dc2e[_0x4b4baf(0x209)]};return{'type':_0x4b4baf(0x221),'base_url':_0x25dc2e[_0x4b4baf(0x214)],'alt_text':_0x25dc2e['altText'],..._0x25dc2e[_0x4b4baf(0x21f)]!==undefined&&{'base_size':_0x25dc2e['baseSize']},'actions':_0x25dc2e[_0x4b4baf(0x1c4)][_0x4b4baf(0x1cf)](_0x52c5fe=>{const _0x45c6d7=_0x4b4baf;if(_0x52c5fe[_0x45c6d7(0x21b)]===_0x45c6d7(0x1d3))return{'type':_0x45c6d7(0x1d3),'link_uri':_0x52c5fe[_0x45c6d7(0x1dc)],'area':_0x52c5fe[_0x45c6d7(0x238)],..._0x52c5fe[_0x45c6d7(0x206)]&&{'label':_0x52c5fe['label']}};if(_0x52c5fe[_0x45c6d7(0x21b)]==='message')return{'type':_0x45c6d7(0x1b7),'text':_0x52c5fe[_0x45c6d7(0x209)],'area':_0x52c5fe['area'],..._0x52c5fe[_0x45c6d7(0x206)]&&{'label':_0x52c5fe[_0x45c6d7(0x206)]}};return{'type':_0x45c6d7(0x1e1),'clipboard_text':_0x52c5fe['clipboardText'],'area':_0x52c5fe[_0x45c6d7(0x238)],..._0x52c5fe['label']&&{'label':_0x52c5fe[_0x45c6d7(0x206)]}};})};})};}function connectorToYaml(_0x296d02){const _0x1fec0d=a130_0x5b3e92,_0x3a433e=_0x296d02[_0x1fec0d(0x1d2)],_0x4bc6e4=_0x296d02[_0x1fec0d(0x212)]&&_0x296d02[_0x1fec0d(0x212)][_0x1fec0d(0x220)]>0x0;if(!_0x3a433e&&!_0x4bc6e4&&!_0x296d02[_0x1fec0d(0x1e3)])return undefined;const _0x122105={};return _0x296d02['allColumns']!==undefined&&(_0x122105[_0x1fec0d(0x218)]=_0x296d02[_0x1fec0d(0x1e3)]),_0x296d02[_0x1fec0d(0x212)]&&_0x296d02[_0x1fec0d(0x212)][_0x1fec0d(0x220)]>0x0&&(_0x122105['columns']=_0x296d02[_0x1fec0d(0x212)][_0x1fec0d(0x1cf)](columnMappingToYaml)),_0x122105;}function columnMappingToYaml(_0x4aa2b9){const _0x35c8bf=a130_0x5b3e92;return{'column':_0x4aa2b9['column'],'source':_0x4aa2b9[_0x35c8bf(0x226)][_0x35c8bf(0x21c)]};}function activationSettingsToYaml(_0x59cfbf){const _0x32d8a6=a130_0x5b3e92;if(!_0x59cfbf[_0x32d8a6(0x1e0)]&&!_0x59cfbf['workflowProjectName']&&!_0x59cfbf[_0x32d8a6(0x1fb)])return undefined;return{..._0x59cfbf['activationActionsEnabled']!==undefined&&{'enabled':_0x59cfbf['activationActionsEnabled']},..._0x59cfbf[_0x32d8a6(0x225)]&&{'workflow_project':_0x59cfbf[_0x32d8a6(0x225)]},..._0x59cfbf[_0x32d8a6(0x1fb)]&&{'workflow_name':_0x59cfbf['workflowName']}};}function utmToYaml(_0x14b5ba,_0x1244b7){const _0x23ea6=a130_0x5b3e92;return{'enabled':_0x1244b7,..._0x14b5ba['utmId']&&{'id':_0x14b5ba[_0x23ea6(0x1ec)]},..._0x14b5ba[_0x23ea6(0x234)]&&{'medium':_0x14b5ba[_0x23ea6(0x234)]},..._0x14b5ba[_0x23ea6(0x1c9)]&&{'source':_0x14b5ba[_0x23ea6(0x1c9)]},..._0x14b5ba['utmSourcePlatform']&&{'source_platform':_0x14b5ba[_0x23ea6(0x1d1)]},..._0x14b5ba[_0x23ea6(0x1fa)]&&{'campaign':_0x14b5ba[_0x23ea6(0x1fa)]},..._0x14b5ba[_0x23ea6(0x213)]&&{'marketing_tactic':_0x14b5ba[_0x23ea6(0x213)]}};}async function resolveSegmentRefs(_0x248bd0,_0x1ac449,_0xe02ebf){const _0x265515=a130_0x5b3e92;if(_0x248bd0[_0x265515(0x236)]){const _0x666ac=parseRef(_0x248bd0[_0x265515(0x236)]),_0x4c55f9=_0x248bd0[_0x265515(0x1e6)]?parseRef(_0x248bd0[_0x265515(0x1e6)]):undefined,_0x1bbfbd=_0x4c55f9?_0x666ac+'/'+_0x4c55f9:_0x666ac,_0x493ba2=await _0xe02ebf['resolveSegmentPath'](_0x1bbfbd);_0x1ac449[_0x265515(0x1c3)]=_0x493ba2[_0x265515(0x1c3)],_0x1ac449['audienceName']=_0x493ba2[_0x265515(0x1e5)],_0x493ba2[_0x265515(0x1fd)]&&(_0x1ac449[_0x265515(0x1fd)]=_0x493ba2['segmentId'],_0x1ac449[_0x265515(0x1c5)]=_0x493ba2[_0x265515(0x1c5)]);}}async function emailDefToApi(_0x41d1cc,_0x10f865,_0x2ce6a6){const _0x2c18a7=a130_0x5b3e92;let _0x380cad='',_0x41eb4e;if(_0x41d1cc['template']){const _0x586344=parseRef(_0x41d1cc[_0x2c18a7(0x1f3)]),_0x3425d4=await _0x2ce6a6[_0x2c18a7(0x231)](_0x586344,_0x10f865);_0x380cad=_0x3425d4['id'],_0x41eb4e=_0x3425d4['name'];}let _0xc08995;_0x41d1cc['html_file']&&(_0xc08995=await _0x2ce6a6['readFile'](_0x41d1cc[_0x2c18a7(0x1d7)]));let _0x5625ff;return _0x41d1cc[_0x2c18a7(0x1ff)]&&(_0x5625ff=await _0x2ce6a6[_0x2c18a7(0x1b3)](_0x41d1cc[_0x2c18a7(0x1ff)])),{'sourceEmailTemplateId':_0x380cad,..._0x41eb4e&&{'sourceEmailTemplateName':_0x41eb4e},..._0x41d1cc[_0x2c18a7(0x22e)]&&{'subjectTemplate':_0x41d1cc[_0x2c18a7(0x22e)]},..._0xc08995&&{'htmlTemplate':_0xc08995},..._0x5625ff&&{'plaintextTemplate':_0x5625ff},..._0x41d1cc[_0x2c18a7(0x20e)]&&{'emailSenderId':_0x41d1cc['sender_id']}};}function pushDefToApi(_0x13719b){const _0x43df47=a130_0x5b3e92;return{..._0x13719b[_0x43df47(0x1f9)]&&{'title':_0x13719b['title']},..._0x13719b[_0x43df47(0x1b7)]&&{'message':_0x13719b[_0x43df47(0x1b7)]},..._0x13719b[_0x43df47(0x233)]&&{'pushType':_0x13719b[_0x43df47(0x233)]},..._0x13719b[_0x43df47(0x1e8)]&&{'imageUrl':_0x13719b[_0x43df47(0x1e8)]},..._0x13719b[_0x43df47(0x1f2)]&&{'onClickBehavior':_0x13719b[_0x43df47(0x1f2)]},..._0x13719b[_0x43df47(0x1e7)]&&{'onClickBehaviorUrl':_0x13719b[_0x43df47(0x1e7)]}};}function lineDefToApi(_0x353b71){const _0x261635=a130_0x5b3e92;return{..._0x353b71[_0x261635(0x237)]&&{'lineSenderAccountId':_0x353b71[_0x261635(0x237)]},'messages':_0x353b71[_0x261635(0x1ee)][_0x261635(0x1cf)](_0x5e54e4=>{const _0xfd32e2=_0x261635;if(_0x5e54e4['type']==='textV2')return{'type':_0xfd32e2(0x21e),'text':_0x5e54e4[_0xfd32e2(0x209)]};return{'type':'imagemap','baseUrl':_0x5e54e4[_0xfd32e2(0x227)],'altText':_0x5e54e4['alt_text'],..._0x5e54e4[_0xfd32e2(0x1f0)]!==undefined&&{'baseSize':_0x5e54e4[_0xfd32e2(0x1f0)]},'actions':_0x5e54e4['actions'][_0xfd32e2(0x1cf)](_0x53fa9d=>{const _0x5ad38c=_0xfd32e2;if(_0x53fa9d['type']==='uri')return{'type':_0x5ad38c(0x1d3),'linkUri':_0x53fa9d[_0x5ad38c(0x216)],'area':_0x53fa9d[_0x5ad38c(0x238)],..._0x53fa9d[_0x5ad38c(0x206)]&&{'label':_0x53fa9d['label']}};if(_0x53fa9d[_0x5ad38c(0x21b)]===_0x5ad38c(0x1b7))return{'type':'message','text':_0x53fa9d[_0x5ad38c(0x209)],'area':_0x53fa9d['area'],..._0x53fa9d[_0x5ad38c(0x206)]&&{'label':_0x53fa9d[_0x5ad38c(0x206)]}};return{'type':_0x5ad38c(0x1e1),'clipboardText':_0x53fa9d['clipboard_text'],'area':_0x53fa9d['area'],..._0x53fa9d[_0x5ad38c(0x206)]&&{'label':_0x53fa9d[_0x5ad38c(0x206)]}};})};})};}function connectorDefToApi(_0x38b423){return{};}function normalizeEmailDef(_0x1861b9){const _0x5334b5=a130_0x5b3e92;return{..._0x1861b9[_0x5334b5(0x1f3)]!==undefined&&{'template':_0x1861b9[_0x5334b5(0x1f3)]},..._0x1861b9['subject']!==undefined&&{'subject':_0x1861b9[_0x5334b5(0x22e)]},..._0x1861b9[_0x5334b5(0x1d7)]!==undefined&&{'html_file':_0x1861b9[_0x5334b5(0x1d7)]},..._0x1861b9[_0x5334b5(0x1ff)]!==undefined&&{'plaintext_file':_0x1861b9[_0x5334b5(0x1ff)]},..._0x1861b9[_0x5334b5(0x20e)]!==undefined&&{'sender_id':_0x1861b9[_0x5334b5(0x20e)]},..._0x1861b9[_0x5334b5(0x1ce)]&&{'variables':_0x1861b9[_0x5334b5(0x1ce)][_0x5334b5(0x1cf)](_0x43717d=>({'name':_0x43717d[_0x5334b5(0x1c6)],..._0x43717d[_0x5334b5(0x1b2)]!==undefined&&{'display_name':_0x43717d['display_name']},..._0x43717d[_0x5334b5(0x228)]!==undefined&&{'preview_value':_0x43717d[_0x5334b5(0x228)]},..._0x43717d[_0x5334b5(0x20b)]!==undefined&&{'default_value':_0x43717d[_0x5334b5(0x20b)]}}))}};}function normalizePushDef(_0x1081d0){const _0x475992=a130_0x5b3e92;return{..._0x1081d0[_0x475992(0x1f9)]!==undefined&&{'title':_0x1081d0[_0x475992(0x1f9)]},..._0x1081d0[_0x475992(0x1b7)]!==undefined&&{'message':_0x1081d0['message']},..._0x1081d0['push_type']!==undefined&&{'push_type':_0x1081d0['push_type']},..._0x1081d0[_0x475992(0x1e8)]!==undefined&&{'image_url':_0x1081d0[_0x475992(0x1e8)]},..._0x1081d0[_0x475992(0x1f2)]!==undefined&&{'on_click_behavior':_0x1081d0[_0x475992(0x1f2)]},..._0x1081d0[_0x475992(0x1e7)]!==undefined&&{'on_click_behavior_url':_0x1081d0[_0x475992(0x1e7)]}};}function normalizeLineAction(_0x1ff60e){const _0x5e5299=a130_0x5b3e92,_0x456ade={'area':_0x1ff60e[_0x5e5299(0x238)],..._0x1ff60e[_0x5e5299(0x206)]!==undefined&&{'label':_0x1ff60e['label']}};if(_0x1ff60e[_0x5e5299(0x21b)]===_0x5e5299(0x1d3))return{'type':_0x5e5299(0x1d3),'link_uri':_0x1ff60e[_0x5e5299(0x216)],..._0x456ade};if(_0x1ff60e[_0x5e5299(0x21b)]===_0x5e5299(0x1b7))return{'type':_0x5e5299(0x1b7),'text':_0x1ff60e[_0x5e5299(0x209)],..._0x456ade};return{'type':'clipboard','clipboard_text':_0x1ff60e[_0x5e5299(0x20d)],..._0x456ade};}function normalizeLineContentDef(_0xaa662){const _0x9764be=a130_0x5b3e92;return{..._0xaa662[_0x9764be(0x237)]!==undefined&&{'line_sender_account_id':_0xaa662['line_sender_account_id']},'messages':_0xaa662[_0x9764be(0x1ee)]['map'](_0x1775c6=>{const _0x3b8283=_0x9764be;if(_0x1775c6['type']===_0x3b8283(0x21e))return{'type':_0x3b8283(0x21e),'text':_0x1775c6[_0x3b8283(0x209)]};return{'type':'imagemap','base_url':_0x1775c6['base_url'],'alt_text':_0x1775c6[_0x3b8283(0x1e2)],..._0x1775c6['base_size']!==undefined&&{'base_size':_0x1775c6[_0x3b8283(0x1f0)]},'actions':_0x1775c6[_0x3b8283(0x1c4)][_0x3b8283(0x1cf)](normalizeLineAction)};})};}function normalizeScheduleDef(_0x3e667e){const _0x57240f=a130_0x5b3e92;return{..._0x3e667e[_0x57240f(0x1d8)]!==undefined&&{'start_at':_0x3e667e[_0x57240f(0x1d8)]},..._0x3e667e[_0x57240f(0x1b8)]!==undefined&&{'timezone':_0x3e667e[_0x57240f(0x1b8)]}};}function normalizeConnectorDef(_0x55339d){const _0x47acfe=a130_0x5b3e92;return{..._0x55339d[_0x47acfe(0x218)]!==undefined&&{'all_columns':_0x55339d[_0x47acfe(0x218)]},..._0x55339d['columns']&&{'columns':_0x55339d['columns']['map'](_0x2b5d7b=>({'column':_0x2b5d7b[_0x47acfe(0x21c)],'source':_0x2b5d7b[_0x47acfe(0x226)]}))}};}function a130_0x5fcf(){const _0x3793e7=['activation','campaign','display_name','readFile','1029247znizXh','connector:','split','message','timezone','segmentFolderPath','defaultValue','previewValue','emailContent','campaign_type','replace','enableUtmTracking','templateVariables','email:','utm:','audienceId','actions','segmentName','name','resolveWorkspaceId','email','utmSource','.html','attributes','imageUrl','push:','variables','map','activation:','utmSourcePlatform','connectionId','uri','emailRecipients','.txt','ref:','html_file','start_at','startsWith','source_platform','workflow_project','linkUri','connectorConfig','recipients','schedule','activationActionsEnabled','clipboard','alt_text','allColumns','startAt','audienceName','segment','on_click_behavior_url','image_url','htmlTemplate','1948295lbLDjS','onClickBehavior','utmId','7MwlSRf','messages','medium','base_size','some','on_click_behavior','template','2348046nSjJze','events','toLowerCase','connector','notifications:','title','utmCampaign','workflowName','plaintextTemplate','segmentId','subjectTemplate','plaintext_file','push','onClickBehaviorUrl','marketing_tactic','notifications','audience:','workspaceId','label','pushContent','10BHStAf','text','4rqGltW','default_value','slice','clipboard_text','sender_id','enabled','description','pushType','columns','utmMarketingTactic','baseUrl','keys','link_uri','utmParameters','all_columns','schedule:','join','type','column','2832222vzSPqH','textV2','baseSize','length','imagemap','lineContent','workspaceName','8818569WsIIWZ','workflowProjectName','source','base_url','preview_value','trimStart','stringify','1063468ldsOBO','workflow_name','utm','subject','notifyOn','sourceEmailTemplateName','resolveTemplateId','line','push_type','utmMedium','4246352fJCkbV','audience','line_sender_account_id','area','emailSenderId','workspace'];a130_0x5fcf=function(){return _0x3793e7;};return a130_0x5fcf();}function normalizeActivationDef(_0x526eff){const _0x122c35=a130_0x5b3e92;return{..._0x526eff['enabled']!==undefined&&{'enabled':_0x526eff[_0x122c35(0x20f)]},..._0x526eff['workflow_project']!==undefined&&{'workflow_project':_0x526eff[_0x122c35(0x1db)]},..._0x526eff[_0x122c35(0x22c)]!==undefined&&{'workflow_name':_0x526eff['workflow_name']}};}function normalizeUtmDef(_0x556b35){const _0x24ed6c=a130_0x5b3e92;return{..._0x556b35[_0x24ed6c(0x20f)]!==undefined&&{'enabled':_0x556b35[_0x24ed6c(0x20f)]},..._0x556b35['id']!==undefined&&{'id':_0x556b35['id']},..._0x556b35['medium']!==undefined&&{'medium':_0x556b35[_0x24ed6c(0x1ef)]},..._0x556b35['source']!==undefined&&{'source':_0x556b35[_0x24ed6c(0x226)]},..._0x556b35[_0x24ed6c(0x1da)]!==undefined&&{'source_platform':_0x556b35[_0x24ed6c(0x1da)]},..._0x556b35[_0x24ed6c(0x1b1)]!==undefined&&{'campaign':_0x556b35[_0x24ed6c(0x1b1)]},..._0x556b35[_0x24ed6c(0x202)]!==undefined&&{'marketing_tactic':_0x556b35[_0x24ed6c(0x202)]}};}function normalizeNotificationsDef(_0xf2b450){const _0x5a2473=a130_0x5b3e92;return{..._0xf2b450[_0x5a2473(0x1f5)]&&{'events':[..._0xf2b450[_0x5a2473(0x1f5)]]},..._0xf2b450['recipients']&&{'recipients':[..._0xf2b450[_0x5a2473(0x1de)]]}};}export function sanitizeCampaignFileName(_0x8757f9){const _0x40ad3e=a130_0x5b3e92;return _0x8757f9[_0x40ad3e(0x1f6)]()[_0x40ad3e(0x1be)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x40ad3e(0x1be)](/-+/g,'-')[_0x40ad3e(0x1be)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x3c5bde=a131_0x69c2;(function(_0x1cf538,_0x4bba94){const _0x5d64d1=a131_0x69c2,_0x190882=_0x1cf538();while(!![]){try{const _0x1722b9=-parseInt(_0x5d64d1(0x1cf))/0x1*(parseInt(_0x5d64d1(0x1ba))/0x2)+parseInt(_0x5d64d1(0x1b5))/0x3+-parseInt(_0x5d64d1(0x1cd))/0x4+parseInt(_0x5d64d1(0x1c7))/0x5*(parseInt(_0x5d64d1(0x1b3))/0x6)+-parseInt(_0x5d64d1(0x1b0))/0x7+parseInt(_0x5d64d1(0x1c0))/0x8*(parseInt(_0x5d64d1(0x1b8))/0x9)+parseInt(_0x5d64d1(0x1b9))/0xa*(-parseInt(_0x5d64d1(0x1c4))/0xb);if(_0x1722b9===_0x4bba94)break;else _0x190882['push'](_0x190882['shift']());}catch(_0x56f9fb){_0x190882['push'](_0x190882['shift']());}}}(a131_0x2fdd,0xdb312));function a131_0x2fdd(){const _0x4a9428=['progress','\x20so\x20far)...','3873786PAxGDw','isNew','.yaml','2118deucJb','update','4477242iqysNq','push','Fetching\x20templates\x20(','504DAcldi','13263220YtpiCN','3242UgrXZn','name','.html','targetDir','getWorkspace','hasChanges','112472VOuFzT','Resolving\x20workspace...','length','join','11HArcoE','cwd','utf-8','17420wyvntW','templateName','tdx.json','templates','.txt','filter','1235836WLLAIe','Fetching\x20templates...','261kCynJH'];a131_0x2fdd=function(){return _0x4a9428;};return a131_0x2fdd();}import a131_0x43851e from'path';import{existsSync,readFileSync}from'fs';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{sanitizeTemplateFileName,templateToDef,toYamlString,normalizeDef}from'./template-yaml.js';function a131_0x69c2(_0x1cab6d,_0x22a7b4){_0x1cab6d=_0x1cab6d-0x1b0;const _0x2fdd68=a131_0x2fdd();let _0x69c2d0=_0x2fdd68[_0x1cab6d];return _0x69c2d0;}import{createEngageTdxConfigContent}from'../segment/tdx-config.js';const TEMPLATES_DIR=a131_0x3c5bde(0x1ca),API_PAGE_LIMIT=0x64;export async function pullTemplates(_0x2a056c,_0x487654,_0x4a38e={}){const _0x2e950d=a131_0x3c5bde,{engage:_0x2c8cdb}=_0x2a056c;_0x4a38e[_0x2e950d(0x1d0)]?.[_0x2e950d(0x1b4)](_0x2e950d(0x1c1));const _0x24ec23=await _0x2c8cdb[_0x2e950d(0x1be)](_0x487654),_0x20b0b8=_0x24ec23[_0x2e950d(0x1bb)],_0x225949=_0x24ec23['id'],_0x8db9b4=_0x4a38e[_0x2e950d(0x1bd)]||a131_0x43851e[_0x2e950d(0x1c3)](process[_0x2e950d(0x1c5)](),TEMPLATES_DIR,sanitizeTemplateFileName(_0x20b0b8));_0x4a38e[_0x2e950d(0x1d0)]?.[_0x2e950d(0x1b4)](_0x2e950d(0x1ce));const _0x5eb40c=await listAllTemplates(_0x2c8cdb,{'workspaceId':_0x225949,'progress':_0x4a38e[_0x2e950d(0x1d0)]});let _0x533489=_0x5eb40c;_0x4a38e[_0x2e950d(0x1c8)]&&(_0x533489=_0x533489[_0x2e950d(0x1cc)](_0x46d57b=>_0x46d57b[_0x2e950d(0x1bb)]===_0x4a38e[_0x2e950d(0x1c8)]));const _0x377194=[];let _0x302446=0x0;for(const _0x5abc72 of _0x533489){_0x302446++,_0x4a38e[_0x2e950d(0x1d0)]?.[_0x2e950d(0x1b4)]('Processing\x20template\x20'+_0x302446+'/'+_0x533489[_0x2e950d(0x1c2)]+':\x20'+_0x5abc72[_0x2e950d(0x1bb)]);const _0x2d8992=await _0x2c8cdb['getTemplateFull'](_0x5abc72['id']),{def:_0x511684,htmlContent:_0x1b8a31,plaintextContent:_0x1e1975}=templateToDef(_0x2d8992,{'workspaceName':_0x20b0b8}),_0x2c55c3=normalizeDef(_0x511684),_0x36128d=sanitizeTemplateFileName(_0x2c55c3[_0x2e950d(0x1bb)]),_0x339d0c=toYamlString(_0x2c55c3);_0x377194[_0x2e950d(0x1b6)](prepareFile(_0x8db9b4,_0x36128d+_0x2e950d(0x1b2),_0x339d0c)),_0x1b8a31&&_0x377194[_0x2e950d(0x1b6)](prepareFile(_0x8db9b4,_0x36128d+_0x2e950d(0x1bc),_0x1b8a31)),_0x1e1975&&_0x377194[_0x2e950d(0x1b6)](prepareFile(_0x8db9b4,_0x36128d+_0x2e950d(0x1cb),_0x1e1975));}const _0x3f90ef=createEngageTdxConfigContent(_0x20b0b8);_0x377194['push'](prepareFile(_0x8db9b4,_0x2e950d(0x1c9),_0x3f90ef));const _0x35e872=_0x377194[_0x2e950d(0x1cc)](_0x23bd5a=>_0x23bd5a[_0x2e950d(0x1b1)])[_0x2e950d(0x1c2)],_0x3f2045=_0x377194[_0x2e950d(0x1cc)](_0x2f3a04=>!_0x2f3a04[_0x2e950d(0x1b1)]&&_0x2f3a04[_0x2e950d(0x1bf)])['length'],_0xb14cfa=_0x377194[_0x2e950d(0x1cc)](_0x430c7a=>!_0x430c7a[_0x2e950d(0x1b1)]&&!_0x430c7a[_0x2e950d(0x1bf)])[_0x2e950d(0x1c2)];return{'workspaceName':_0x20b0b8,'workspaceId':_0x225949,'targetDir':_0x8db9b4,'files':_0x377194,'counts':{'templates':_0x533489[_0x2e950d(0x1c2)]},'newFiles':_0x35e872,'changedFiles':_0x3f2045,'unchangedFiles':_0xb14cfa};}function prepareFile(_0x5be513,_0x4d5ed5,_0x3d8114){const _0x152e23=a131_0x3c5bde,_0x49ae97=a131_0x43851e[_0x152e23(0x1c3)](_0x5be513,_0x4d5ed5),_0x34a0a8=!existsSync(_0x49ae97);let _0x14399e=_0x34a0a8,_0x5ce26d;if(!_0x34a0a8){const _0x2e795a=readFileSync(_0x49ae97,_0x152e23(0x1c6)),_0x1d0766=generateDiff(_0x2e795a,_0x3d8114);_0x14399e=hasChanges(_0x1d0766),_0x14399e&&(_0x5ce26d=formatDiffWithColors(_0x1d0766));}return{'relativePath':_0x4d5ed5,'absolutePath':_0x49ae97,'content':_0x3d8114,'isNew':_0x34a0a8,'hasChanges':_0x14399e,'diff':_0x5ce26d};}export async function listAllTemplates(_0x1ecaa7,_0x1bfec5){const _0x316336=a131_0x3c5bde,_0x520e7a=[];let _0x1f1f19=0x0;while(!![]){const _0xfbb5f7=await _0x1ecaa7['listTemplates']({'workspaceId':_0x1bfec5['workspaceId'],'limit':API_PAGE_LIMIT,'offset':_0x1f1f19});_0x520e7a[_0x316336(0x1b6)](..._0xfbb5f7);if(_0xfbb5f7[_0x316336(0x1c2)]<API_PAGE_LIMIT)break;_0x1f1f19+=API_PAGE_LIMIT,_0x1bfec5['progress']?.[_0x316336(0x1b4)](_0x316336(0x1b7)+_0x520e7a['length']+_0x316336(0x1d1));}return _0x520e7a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a132_0x4250(){const _0x543ed9=['createTemplate','action','workspaceId','684394BgkzcY','message','updateTemplate','update','196445rWQOlE','createInput','name','Fetching\x20existing\x20templates...','546171ARZdKC','length','707427oJylDa','engage','10ifEqry','create','3217159LllNsB','27UEdkWB','fileDir','280761YwWMQv','utf-8','updated','created','6rxsPQt','40dPTunS','push','results','def','updateInput','join','set','dirname','1816EFsvfu','errors','get','relative','progress','type'];a132_0x4250=function(){return _0x543ed9;};return a132_0x4250();}(function(_0x3d4324,_0x352b48){const _0x149b4c=a132_0x2702,_0x3877b5=_0x3d4324();while(!![]){try{const _0x4d3a1b=parseInt(_0x149b4c(0xaa))/0x1+-parseInt(_0x149b4c(0xa2))/0x2+parseInt(_0x149b4c(0x8c))/0x3+parseInt(_0x149b4c(0x91))/0x4*(-parseInt(_0x149b4c(0xa6))/0x5)+-parseInt(_0x149b4c(0x90))/0x6*(-parseInt(_0x149b4c(0xac))/0x7)+-parseInt(_0x149b4c(0x99))/0x8*(parseInt(_0x149b4c(0x8a))/0x9)+-parseInt(_0x149b4c(0xae))/0xa*(-parseInt(_0x149b4c(0xb0))/0xb);if(_0x4d3a1b===_0x352b48)break;else _0x3877b5['push'](_0x3877b5['shift']());}catch(_0x33ebfa){_0x3877b5['push'](_0x3877b5['shift']());}}}(a132_0x4250,0x48a30));import a132_0x37e017 from'path';import{readFileSync}from'fs';import{parseYamlString,defToCreateInput,defToUpdateInput}from'./template-yaml.js';function a132_0x2702(_0xb7f7bb,_0x5cabab){_0xb7f7bb=_0xb7f7bb-0x8a;const _0x425056=a132_0x4250();let _0x270258=_0x425056[_0xb7f7bb];return _0x270258;}import{findYamlFiles}from'../segment/file-discovery.js';import{listAllTemplates}from'./template-pull.js';export function discoverAndParseTemplateFiles(_0x4b9dee){const _0x509eeb=a132_0x2702,_0x1f01a5=findYamlFiles(_0x4b9dee),_0x4be6b3=[];for(const _0x145079 of _0x1f01a5){try{const _0xed1f05=readFileSync(_0x145079,_0x509eeb(0x8d)),_0x27da90=parseYamlString(_0xed1f05);_0x27da90[_0x509eeb(0x9e)]==='template'&&_0x4be6b3[_0x509eeb(0x92)]({'yamlPath':_0x145079,'relativePath':a132_0x37e017['relative'](_0x4b9dee,_0x145079),'def':_0x27da90,'dir':a132_0x37e017[_0x509eeb(0x98)](_0x145079)});}catch{}}return _0x4be6b3;}export function parseTemplateFile(_0x10e5b8,_0x7018f9){const _0xfe89a7=a132_0x2702,_0x5bf67a=readFileSync(_0x10e5b8,'utf-8'),_0x430bf0=parseYamlString(_0x5bf67a),_0x4b932d=a132_0x37e017[_0xfe89a7(0x9c)](_0x7018f9,_0x10e5b8),_0x3c7586=a132_0x37e017['dirname'](_0x10e5b8);return{'yamlPath':_0x10e5b8,'relativePath':_0x4b932d,'def':_0x430bf0,'dir':_0x3c7586};}export async function preparePush(_0x158e8e,_0x3932d2,_0x10b1c7,_0x218902={}){const _0x58fdf0=a132_0x2702,{engage:_0x3d05da}=_0x158e8e;_0x218902['progress']?.['update'](_0x58fdf0(0xa9));const _0x517e9a=await listAllTemplates(_0x3d05da,{'workspaceId':_0x10b1c7}),_0x1ecdc8=new Map();for(const _0x3b1512 of _0x517e9a){_0x1ecdc8[_0x58fdf0(0x97)](_0x3b1512[_0x58fdf0(0xa8)],_0x3b1512);}const _0x35f916=[];for(const _0x5085e7 of _0x3932d2){const _0x47e709=_0x1ecdc8[_0x58fdf0(0x9b)](_0x5085e7[_0x58fdf0(0x94)][_0x58fdf0(0xa8)]);_0x35f916[_0x58fdf0(0x92)]({'def':_0x5085e7[_0x58fdf0(0x94)],'fileDir':_0x5085e7['dir'],'action':_0x47e709?_0x58fdf0(0xa5):_0x58fdf0(0xaf),'existingId':_0x47e709?.['id']});}return _0x35f916;}export async function resolveAndBuildInputs(_0x342a7c,_0x5af1a5,_0x3a61c5,_0x277d04={}){const _0x53f24f=a132_0x2702;for(let _0x2d219b=0x0;_0x2d219b<_0x5af1a5[_0x53f24f(0xab)];_0x2d219b++){const _0x530b3c=_0x5af1a5[_0x2d219b];_0x277d04[_0x53f24f(0x9d)]?.[_0x53f24f(0xa5)]('Resolving\x20references\x20'+(_0x2d219b+0x1)+'/'+_0x5af1a5['length']+':\x20'+_0x530b3c['def'][_0x53f24f(0xa8)]);const _0x546af7=createResolveContext(_0x342a7c,_0x3a61c5,_0x530b3c[_0x53f24f(0x8b)]);_0x530b3c[_0x53f24f(0xa0)]==='create'?(_0x530b3c['createInput']=await defToCreateInput(_0x530b3c[_0x53f24f(0x94)],_0x546af7),!_0x530b3c[_0x53f24f(0xa7)][_0x53f24f(0xa1)]&&(_0x530b3c[_0x53f24f(0xa7)][_0x53f24f(0xa1)]=_0x3a61c5)):_0x530b3c[_0x53f24f(0x95)]=await defToUpdateInput(_0x530b3c[_0x53f24f(0x94)],_0x546af7);}}export async function executePush(_0xe8a7d7,_0x24dd61,_0x65afa9={}){const _0x5dc6ee=a132_0x2702,_0x323635={'results':[],'created':0x0,'updated':0x0,'unchanged':0x0,'errors':[]};if(_0x65afa9['dryRun']){for(const _0x54dbbd of _0x24dd61){_0x54dbbd['action']===_0x5dc6ee(0xaf)?(_0x323635[_0x5dc6ee(0x93)][_0x5dc6ee(0x92)]({'name':_0x54dbbd[_0x5dc6ee(0x94)][_0x5dc6ee(0xa8)],'action':_0x5dc6ee(0x8f)}),_0x323635[_0x5dc6ee(0x8f)]++):(_0x323635[_0x5dc6ee(0x93)][_0x5dc6ee(0x92)]({'name':_0x54dbbd['def'][_0x5dc6ee(0xa8)],'action':_0x5dc6ee(0x8e)}),_0x323635[_0x5dc6ee(0x8e)]++);}return _0x323635;}const {engage:_0x313eaf}=_0xe8a7d7;for(let _0x2d5b66=0x0;_0x2d5b66<_0x24dd61['length'];_0x2d5b66++){const _0x229adc=_0x24dd61[_0x2d5b66];_0x65afa9[_0x5dc6ee(0x9d)]?.[_0x5dc6ee(0xa5)]('Pushing\x20'+(_0x2d5b66+0x1)+'/'+_0x24dd61[_0x5dc6ee(0xab)]+':\x20'+_0x229adc[_0x5dc6ee(0x94)]['name']);try{if(_0x229adc[_0x5dc6ee(0xa0)]==='create'&&_0x229adc[_0x5dc6ee(0xa7)]){const _0x21bee3=await _0x313eaf[_0x5dc6ee(0x9f)](_0x229adc['createInput']);_0x323635[_0x5dc6ee(0x93)][_0x5dc6ee(0x92)]({'name':_0x229adc['def'][_0x5dc6ee(0xa8)],'action':'created','templateId':_0x21bee3['id']}),_0x323635[_0x5dc6ee(0x8f)]++;}else{if(_0x229adc['action']===_0x5dc6ee(0xa5)&&_0x229adc[_0x5dc6ee(0x95)]&&_0x229adc['existingId']){const _0x40ece3=await _0x313eaf[_0x5dc6ee(0xa4)](_0x229adc['existingId'],_0x229adc['updateInput']);_0x323635['results'][_0x5dc6ee(0x92)]({'name':_0x229adc[_0x5dc6ee(0x94)][_0x5dc6ee(0xa8)],'action':_0x5dc6ee(0x8e),'templateId':_0x40ece3['id']}),_0x323635[_0x5dc6ee(0x8e)]++;}}}catch(_0x41c91b){const _0x471c8c=_0x41c91b instanceof Error?_0x41c91b[_0x5dc6ee(0xa3)]:String(_0x41c91b);_0x323635[_0x5dc6ee(0x9a)]['push']({'name':_0x229adc[_0x5dc6ee(0x94)][_0x5dc6ee(0xa8)],'error':_0x471c8c});}}return _0x323635;}function createResolveContext(_0x706386,_0x18f202,_0x354f79){return{'resolveWorkspaceId':async _0x3ba8ef=>{const _0x15d1f7=a132_0x2702;return await _0x706386[_0x15d1f7(0xad)]['resolveWorkspaceId'](_0x3ba8ef);},'readFile':async _0x45a63a=>{const _0x56bd66=a132_0x2702,_0x2c647b=a132_0x37e017[_0x56bd66(0x96)](_0x354f79,_0x45a63a);return readFileSync(_0x2c647b,_0x56bd66(0x8d));}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28367b,_0xd616e7){const _0x17eea7=a133_0x53bf,_0x3a3460=_0x28367b();while(!![]){try{const _0x4d7a3a=-parseInt(_0x17eea7(0x161))/0x1+parseInt(_0x17eea7(0x14b))/0x2*(parseInt(_0x17eea7(0x157))/0x3)+parseInt(_0x17eea7(0x16a))/0x4*(-parseInt(_0x17eea7(0x159))/0x5)+-parseInt(_0x17eea7(0x15d))/0x6+-parseInt(_0x17eea7(0x16c))/0x7*(-parseInt(_0x17eea7(0x166))/0x8)+parseInt(_0x17eea7(0x169))/0x9+parseInt(_0x17eea7(0x173))/0xa*(parseInt(_0x17eea7(0x16e))/0xb);if(_0x4d7a3a===_0xd616e7)break;else _0x3a3460['push'](_0x3a3460['shift']());}catch(_0x26428d){_0x3a3460['push'](_0x3a3460['shift']());}}}(a133_0x230f,0x78384));import{TemplateDefSchema}from'./types/template-schema.js';import{formatZodPath,getLocationFromPath}from'../segment/yaml-validator.js';function a133_0x230f(){const _0x17ca7b=['variables','341wnZdod','safeParse','source','path','Template\x20requires\x20subject\x20—\x20email\x20subject\x20line\x20template','3490vNXIUo','html_file','subject','warning','document','map','230668gVMUNf','name','issues','length','TEMPLATE_INVALID_TYPE','test','TEMPLATE_SCHEMA_ERROR','filter','success','type','Variable\x20name\x20\x22','TEMPLATE_MISSING_HTML_FILE','15YSDBqD','\x22\x20must\x20not\x20contain\x20whitespace','8790NFPjnH','error','startsWith','].name','1955898kDIrnP','TEMPLATE_MISSING_SUBJECT','symbol','TEMPLATE_INVALID_VARIABLES','678102rEgIzL','No\x20workspace\x20specified\x20—\x20template\x20will\x20use\x20workspace\x20from\x20context\x20or\x20CLI\x20option','workspace','TEMPLATE_INVALID_VARIABLE_NAME','level','1496STkTBn','TEMPLATE_MISSING_WORKSPACE','push','6408009fEARfW','164KmDrfm','variables[','10073BfhAcH'];a133_0x230f=function(){return _0x17ca7b;};return a133_0x230f();}export function validateTemplateDef(_0x4fc8a1,_0x177a02={}){const _0x5339ab=a133_0x53bf,_0x414521=TemplateDefSchema[_0x5339ab(0x16f)](_0x4fc8a1);if(_0x414521[_0x5339ab(0x153)]){const _0x106892=runSemanticChecks(_0x414521['data'],_0x177a02),_0x32adaa=_0x106892[_0x5339ab(0x152)](_0x392f77=>_0x392f77[_0x5339ab(0x165)]===_0x5339ab(0x15a)),_0x36ca8b=_0x106892[_0x5339ab(0x152)](_0x1000db=>_0x1000db[_0x5339ab(0x165)]===_0x5339ab(0x148));return{'valid':_0x32adaa[_0x5339ab(0x14e)]===0x0,'errors':_0x32adaa,'warnings':_0x36ca8b};}return zodErrorsToValidationResult(_0x414521[_0x5339ab(0x15a)],_0x177a02);}function a133_0x53bf(_0x28b1fa,_0x2114ba){_0x28b1fa=_0x28b1fa-0x147;const _0x230ff9=a133_0x230f();let _0x53bff8=_0x230ff9[_0x28b1fa];return _0x53bff8;}function zodErrorsToValidationResult(_0x3aaeec,_0x4efdee){const _0x12846e=a133_0x53bf,_0x4f4e6d=_0x3aaeec[_0x12846e(0x14d)][_0x12846e(0x14a)](_0x1bacc0=>{const _0x14102f=_0x12846e,_0x14e5db=formatZodPath(_0x1bacc0[_0x14102f(0x171)]),_0x227c85=mapZodIssueToCode(_0x1bacc0,_0x14e5db),_0x51d216=getLocationFromPath(_0x4efdee['document'],_0x4efdee[_0x14102f(0x170)],_0x1bacc0[_0x14102f(0x171)]['map'](_0x2d352f=>typeof _0x2d352f===_0x14102f(0x15f)?String(_0x2d352f):_0x2d352f));return{'level':_0x14102f(0x15a),'path':_0x14e5db,'code':_0x227c85,'message':_0x1bacc0['message'],..._0x51d216&&{'location':_0x51d216}};});return{'valid':![],'errors':_0x4f4e6d,'warnings':[]};}function mapZodIssueToCode(_0x3490e9,_0x5e14e8){const _0x234484=a133_0x53bf;if(_0x5e14e8===_0x234484(0x14c))return'TEMPLATE_MISSING_NAME';if(_0x5e14e8===_0x234484(0x154))return _0x234484(0x14f);if(_0x5e14e8===_0x234484(0x16d)||_0x5e14e8[_0x234484(0x15b)](_0x234484(0x16d)))return _0x234484(0x160);return _0x234484(0x151);}function runSemanticChecks(_0x50e916,_0x3de217){const _0x37cfbf=a133_0x53bf,_0x3f089f=[];!_0x50e916['html_file']&&_0x3f089f[_0x37cfbf(0x168)]({'level':_0x37cfbf(0x15a),'path':_0x37cfbf(0x174),'code':_0x37cfbf(0x156),'message':'Template\x20requires\x20html_file\x20—\x20path\x20to\x20the\x20HTML\x20file\x20for\x20email\x20content','location':getLocationFromPath(_0x3de217[_0x37cfbf(0x149)],_0x3de217[_0x37cfbf(0x170)],[_0x37cfbf(0x14c)])});!_0x50e916[_0x37cfbf(0x147)]&&_0x3f089f['push']({'level':'error','path':_0x37cfbf(0x147),'code':_0x37cfbf(0x15e),'message':_0x37cfbf(0x172),'location':getLocationFromPath(_0x3de217[_0x37cfbf(0x149)],_0x3de217[_0x37cfbf(0x170)],[_0x37cfbf(0x14c)])});!_0x50e916['workspace']&&_0x3f089f[_0x37cfbf(0x168)]({'level':_0x37cfbf(0x148),'path':_0x37cfbf(0x163),'code':_0x37cfbf(0x167),'message':_0x37cfbf(0x162),'location':getLocationFromPath(_0x3de217['document'],_0x3de217['source'],[_0x37cfbf(0x14c)])});for(let _0x3eb3dd=0x0;_0x3eb3dd<_0x50e916[_0x37cfbf(0x16d)][_0x37cfbf(0x14e)];_0x3eb3dd++){const _0x557d73=_0x50e916[_0x37cfbf(0x16d)][_0x3eb3dd];/\s/[_0x37cfbf(0x150)](_0x557d73[_0x37cfbf(0x14c)])&&_0x3f089f[_0x37cfbf(0x168)]({'level':_0x37cfbf(0x15a),'path':_0x37cfbf(0x16b)+_0x3eb3dd+_0x37cfbf(0x15c),'code':_0x37cfbf(0x164),'message':_0x37cfbf(0x155)+_0x557d73[_0x37cfbf(0x14c)]+_0x37cfbf(0x158),'location':getLocationFromPath(_0x3de217[_0x37cfbf(0x149)],_0x3de217[_0x37cfbf(0x170)],[_0x37cfbf(0x16d),_0x3eb3dd,_0x37cfbf(0x14c)])});}return _0x3f089f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fc085,_0x3c9058){const _0x32d3d0=a134_0x3d79,_0x29a017=_0x3fc085();while(!![]){try{const _0x5294c0=-parseInt(_0x32d3d0(0x9b))/0x1*(-parseInt(_0x32d3d0(0xa3))/0x2)+-parseInt(_0x32d3d0(0x8a))/0x3*(parseInt(_0x32d3d0(0x9d))/0x4)+-parseInt(_0x32d3d0(0xa5))/0x5+parseInt(_0x32d3d0(0x8f))/0x6*(parseInt(_0x32d3d0(0x85))/0x7)+-parseInt(_0x32d3d0(0x92))/0x8+parseInt(_0x32d3d0(0x84))/0x9+parseInt(_0x32d3d0(0x83))/0xa;if(_0x5294c0===_0x3c9058)break;else _0x29a017['push'](_0x29a017['shift']());}catch(_0x430f46){_0x29a017['push'](_0x29a017['shift']());}}}(a134_0x5790,0xf296a));import*as a134_0x5ed8fc from'yaml';import{safeParseYaml}from'../segment/yaml-validator.js';import{sanitizeFileName}from'../../utils/string-utils.js';import{TemplateDefSchema}from'./types/template-schema.js';function a134_0x5790(){const _0x35a33c=['15tzryKH','length','.html','attributes','workspace','5220RUOFIK','join','subjectTemplate','10915112CkuKKL','previewValue','subject','templateVariables','trimStart','preview_value','workspaceName','variables','display_name','2779KjiAwX','editor_type','1169864XajBGF','map','template','name','readFile','null','1096IAMakj','stringify','3066195lVemkL','plaintextTemplate','plaintext_file','htmlTemplate','split','default_value','push','parse','19211900WcTrCl','3941442OyHFdt','4438QxGRze','workspaceId','html_file','editorType','defaultValue'];a134_0x5790=function(){return _0x35a33c;};return a134_0x5790();}export function templateToDef(_0x51d0a0,_0x573011){const _0x653d59=a134_0x3d79,_0x5c6029=_0x51d0a0[_0x653d59(0x8d)],_0x57aa97=sanitizeTemplateFileName(_0x5c6029['name']);let _0x491f87,_0x173012,_0x8e1904,_0x45a23e;_0x5c6029[_0x653d59(0xa8)]&&(_0x8e1904=_0x57aa97+_0x653d59(0x8c),_0x491f87=_0x5c6029[_0x653d59(0xa8)]);_0x5c6029[_0x653d59(0xa6)]&&(_0x45a23e=_0x57aa97+'.txt',_0x173012=_0x5c6029[_0x653d59(0xa6)]);const _0x1b2b09=_0x5c6029[_0x653d59(0x95)]&&_0x5c6029[_0x653d59(0x95)][_0x653d59(0x8b)]>0x0,_0x165a2c={'type':_0x653d59(0x9f),'name':_0x5c6029[_0x653d59(0xa0)],..._0x5c6029[_0x653d59(0x91)]&&{'subject':_0x5c6029[_0x653d59(0x91)]},..._0x573011[_0x653d59(0x98)]&&{'workspace':_0x573011[_0x653d59(0x98)]},..._0x5c6029[_0x653d59(0x88)]&&{'editor_type':_0x5c6029[_0x653d59(0x88)]},..._0x8e1904&&{'html_file':_0x8e1904},..._0x45a23e&&{'plaintext_file':_0x45a23e},'variables':_0x1b2b09?_0x5c6029[_0x653d59(0x95)][_0x653d59(0x9e)](templateVariableToYaml):[]};return{'def':_0x165a2c,'htmlContent':_0x491f87,'plaintextContent':_0x173012};}export async function defToCreateInput(_0x2413b0,_0x549e2a){const _0x4b5aab=a134_0x3d79,_0x848225={'name':_0x2413b0[_0x4b5aab(0xa0)],'subjectTemplate':_0x2413b0[_0x4b5aab(0x94)]??'','htmlTemplate':''};return _0x2413b0[_0x4b5aab(0x8e)]&&(_0x848225[_0x4b5aab(0x86)]=await _0x549e2a['resolveWorkspaceId'](_0x2413b0[_0x4b5aab(0x8e)])),_0x2413b0[_0x4b5aab(0x9c)]&&(_0x848225[_0x4b5aab(0x88)]=_0x2413b0[_0x4b5aab(0x9c)]),_0x2413b0[_0x4b5aab(0x87)]&&(_0x848225['htmlTemplate']=await _0x549e2a['readFile'](_0x2413b0[_0x4b5aab(0x87)])),_0x2413b0[_0x4b5aab(0xa7)]&&(_0x848225[_0x4b5aab(0xa6)]=await _0x549e2a[_0x4b5aab(0xa1)](_0x2413b0[_0x4b5aab(0xa7)])),_0x2413b0['variables'][_0x4b5aab(0x8b)]>0x0&&(_0x848225[_0x4b5aab(0x95)]=_0x2413b0[_0x4b5aab(0x99)][_0x4b5aab(0x9e)](variableDefToApi)),_0x848225;}export async function defToUpdateInput(_0xf2d6ca,_0x1a90de){const _0x30f06d=a134_0x3d79,_0x5f0442={};if(_0xf2d6ca[_0x30f06d(0xa0)])_0x5f0442[_0x30f06d(0xa0)]=_0xf2d6ca[_0x30f06d(0xa0)];if(_0xf2d6ca[_0x30f06d(0x94)])_0x5f0442['subjectTemplate']=_0xf2d6ca[_0x30f06d(0x94)];return _0xf2d6ca[_0x30f06d(0x87)]&&(_0x5f0442[_0x30f06d(0xa8)]=await _0x1a90de[_0x30f06d(0xa1)](_0xf2d6ca[_0x30f06d(0x87)])),_0xf2d6ca[_0x30f06d(0xa7)]&&(_0x5f0442[_0x30f06d(0xa6)]=await _0x1a90de[_0x30f06d(0xa1)](_0xf2d6ca[_0x30f06d(0xa7)])),_0xf2d6ca[_0x30f06d(0x99)][_0x30f06d(0x8b)]>0x0&&(_0x5f0442[_0x30f06d(0x95)]=_0xf2d6ca[_0x30f06d(0x99)][_0x30f06d(0x9e)](variableDefToApi)),_0x5f0442;}export function toYamlString(_0x1a7170){const _0x52fff2=a134_0x3d79,_0x45742a=JSON[_0x52fff2(0x82)](JSON[_0x52fff2(0xa4)](_0x1a7170)),_0x2a3a9b=a134_0x5ed8fc[_0x52fff2(0xa4)](_0x45742a,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x52fff2(0xa2)}),_0x490b4c=['variables:'],_0x456de6=_0x2a3a9b[_0x52fff2(0x7f)]('\x0a'),_0x56d8d6=[];for(let _0x48a286=0x0;_0x48a286<_0x456de6[_0x52fff2(0x8b)];_0x48a286++){const _0x3f5669=_0x456de6[_0x48a286][_0x52fff2(0x96)]();_0x48a286>0x0&&_0x490b4c['some'](_0x4aa1b4=>_0x3f5669['startsWith'](_0x4aa1b4))&&_0x56d8d6[_0x52fff2(0x8b)]>0x0&&_0x56d8d6[_0x56d8d6['length']-0x1]!==''&&_0x56d8d6['push'](''),_0x56d8d6[_0x52fff2(0x81)](_0x456de6[_0x48a286]);}return _0x56d8d6[_0x52fff2(0x90)]('\x0a');}export function parseYamlString(_0x3f6b0f){return safeParseYaml(_0x3f6b0f,TemplateDefSchema);}export function normalizeDef(_0x1186e9){const _0x989d32=a134_0x3d79;return{'type':_0x989d32(0x9f),'name':_0x1186e9[_0x989d32(0xa0)],..._0x1186e9['subject']!==undefined&&{'subject':_0x1186e9['subject']},..._0x1186e9['workspace']!==undefined&&{'workspace':_0x1186e9[_0x989d32(0x8e)]},..._0x1186e9[_0x989d32(0x9c)]!==undefined&&{'editor_type':_0x1186e9[_0x989d32(0x9c)]},..._0x1186e9['html_file']!==undefined&&{'html_file':_0x1186e9['html_file']},..._0x1186e9[_0x989d32(0xa7)]!==undefined&&{'plaintext_file':_0x1186e9[_0x989d32(0xa7)]},'variables':_0x1186e9['variables'][_0x989d32(0x8b)]>0x0?_0x1186e9[_0x989d32(0x99)][_0x989d32(0x9e)](_0x6075c=>({'name':_0x6075c[_0x989d32(0xa0)],'display_name':_0x6075c['display_name'],'preview_value':_0x6075c[_0x989d32(0x97)],..._0x6075c[_0x989d32(0x80)]!==undefined&&{'default_value':_0x6075c['default_value']}})):[]};}function variableDefToApi(_0x5728dd){const _0x44e0d8=a134_0x3d79;return{'name':_0x5728dd[_0x44e0d8(0xa0)],'displayName':_0x5728dd[_0x44e0d8(0x9a)],'previewValue':_0x5728dd[_0x44e0d8(0x97)],..._0x5728dd['default_value']!==undefined&&{'defaultValue':_0x5728dd[_0x44e0d8(0x80)]}};}function templateVariableToYaml(_0x4bfbba){const _0x4a2216=a134_0x3d79;return{'name':_0x4bfbba['name'],'display_name':_0x4bfbba['displayName'],'preview_value':_0x4bfbba[_0x4a2216(0x93)],..._0x4bfbba[_0x4a2216(0x89)]!==undefined&&{'default_value':_0x4bfbba[_0x4a2216(0x89)]}};}function a134_0x3d79(_0x3c88f1,_0x45d945){_0x3c88f1=_0x3c88f1-0x7f;const _0x579033=a134_0x5790();let _0x3d7930=_0x579033[_0x3c88f1];return _0x3d7930;}export const sanitizeTemplateFileName=sanitizeFileName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a135_0x120f71=a135_0x53de;function a135_0x53de(_0x3eedac,_0x4f1f24){_0x3eedac=_0x3eedac-0x1a7;const _0x33f009=a135_0x33f0();let _0x53de5d=_0x33f009[_0x3eedac];return _0x53de5d;}(function(_0x3d2ce8,_0x498a3a){const _0x2c1966=a135_0x53de,_0x1a6926=_0x3d2ce8();while(!![]){try{const _0x35507a=-parseInt(_0x2c1966(0x1b0))/0x1*(-parseInt(_0x2c1966(0x1ba))/0x2)+parseInt(_0x2c1966(0x1b9))/0x3+parseInt(_0x2c1966(0x1bf))/0x4+parseInt(_0x2c1966(0x1b1))/0x5*(parseInt(_0x2c1966(0x1bc))/0x6)+parseInt(_0x2c1966(0x1b2))/0x7+parseInt(_0x2c1966(0x1aa))/0x8*(parseInt(_0x2c1966(0x1b8))/0x9)+-parseInt(_0x2c1966(0x1af))/0xa*(parseInt(_0x2c1966(0x1bb))/0xb);if(_0x35507a===_0x498a3a)break;else _0x1a6926['push'](_0x1a6926['shift']());}catch(_0x2a0a83){_0x1a6926['push'](_0x1a6926['shift']());}}}(a135_0x33f0,0xb3897));import{z}from'zod';function a135_0x33f0(){const _0xa913d4=['2917854aTBRJq','222euoLxc','8263134eocQla','6HmKyDb','boolean','literal','4576560FfGkrz','optional','push','record','1808216sAgTqH','always_on_campaign','enum','email','object','40uOjXzB','10499InRyZS','516370CaHCsf','900977cKmvem','default','line','min','array','string','9cQVPoN'];a135_0x33f0=function(){return _0xa913d4;};return a135_0x33f0();}import{EmailDefSchema,PushContentDefSchema,LineContentDefSchema,UtmDefSchema}from'./campaign-schema.js';export const SmsContentDefSchema=z['object']({'sender_id':z[a135_0x120f71(0x1b7)]()[a135_0x120f71(0x1a7)](),'text':z[a135_0x120f71(0x1b7)]()['optional'](),'send_window_timezone':z['string']()[a135_0x120f71(0x1a7)](),'send_window_start':z[a135_0x120f71(0x1b7)]()[a135_0x120f71(0x1a7)](),'send_window_end':z[a135_0x120f71(0x1b7)]()[a135_0x120f71(0x1a7)](),'send_window_overrides':z[a135_0x120f71(0x1a9)](z[a135_0x120f71(0x1b7)](),z['object']({'start':z['string'](),'end':z['string']()}))['optional'](),'send_window_blocked_weekdays':z[a135_0x120f71(0x1b6)](z['string']())[a135_0x120f71(0x1a7)](),'enable_link_shortening':z[a135_0x120f71(0x1bd)]()[a135_0x120f71(0x1a7)]()});export const AlwaysOnCampaignDefSchema=z[a135_0x120f71(0x1ae)]({'type':z[a135_0x120f71(0x1be)](a135_0x120f71(0x1ab))[a135_0x120f71(0x1b3)](a135_0x120f71(0x1ab)),'name':z[a135_0x120f71(0x1b7)]()[a135_0x120f71(0x1b5)](0x1,'Campaign\x20name\x20is\x20required'),'campaign_type':z[a135_0x120f71(0x1ac)]([a135_0x120f71(0x1ad),a135_0x120f71(0x1a8),a135_0x120f71(0x1b4),'sms']),'description':z['string']()['optional'](),'workspace':z[a135_0x120f71(0x1b7)]()[a135_0x120f71(0x1a7)](),'audience':z['string']()[a135_0x120f71(0x1a7)](),'email':EmailDefSchema['optional'](),'push':PushContentDefSchema['optional'](),'line':LineContentDefSchema[a135_0x120f71(0x1a7)](),'sms':SmsContentDefSchema[a135_0x120f71(0x1a7)](),'utm':UtmDefSchema[a135_0x120f71(0x1a7)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a136_0x3ec8(_0x4d1790,_0x2cfbb){_0x4d1790=_0x4d1790-0x1b9;var _0x17bef3=a136_0x17be();var _0x3ec875=_0x17bef3[_0x4d1790];return _0x3ec875;}(function(_0x2be548,_0x518c0c){var _0x5e736b=a136_0x3ec8,_0x271280=_0x2be548();while(!![]){try{var _0x1f4f9e=parseInt(_0x5e736b(0x1bf))/0x1+-parseInt(_0x5e736b(0x1bd))/0x2+parseInt(_0x5e736b(0x1be))/0x3+parseInt(_0x5e736b(0x1ba))/0x4+parseInt(_0x5e736b(0x1b9))/0x5+-parseInt(_0x5e736b(0x1bb))/0x6+-parseInt(_0x5e736b(0x1bc))/0x7*(-parseInt(_0x5e736b(0x1c0))/0x8);if(_0x1f4f9e===_0x518c0c)break;else _0x271280['push'](_0x271280['shift']());}catch(_0x7e508f){_0x271280['push'](_0x271280['shift']());}}}(a136_0x17be,0xec7f1));function a136_0x17be(){var _0x278918=['1896275egvDrZ','3877440uBPeGW','10631220jUBRZc','35MuQYcO','1582026bFqbhA','580038QCIBrQ','714096FinOBX','2040824peledJ'];a136_0x17be=function(){return _0x278918;};return a136_0x17be();}export{CampaignDefSchema,EmailDefSchema,PushContentDefSchema,LineContentDefSchema,LineMessageDefSchema,LineTextV2MessageDefSchema,LineImagemapMessageDefSchema,LineImagemapActionDefSchema,ScheduleDefSchema,ColumnMappingDefSchema,ConnectorDefSchema,ActivationSettingsDefSchema,UtmDefSchema,NotificationsDefSchema,TemplateVariableDefSchema}from'./campaign-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x52bd21=a137_0x4b6e;(function(_0x573567,_0xc439e9){const _0x4bed0b=a137_0x4b6e,_0x378827=_0x573567();while(!![]){try{const _0xf01bd9=-parseInt(_0x4bed0b(0x7b))/0x1+-parseInt(_0x4bed0b(0x83))/0x2+-parseInt(_0x4bed0b(0x7f))/0x3+parseInt(_0x4bed0b(0x8f))/0x4*(parseInt(_0x4bed0b(0x85))/0x5)+parseInt(_0x4bed0b(0x8b))/0x6+-parseInt(_0x4bed0b(0x74))/0x7*(-parseInt(_0x4bed0b(0x7e))/0x8)+-parseInt(_0x4bed0b(0x87))/0x9;if(_0xf01bd9===_0xc439e9)break;else _0x378827['push'](_0x378827['shift']());}catch(_0x1eecc7){_0x378827['push'](_0x378827['shift']());}}}(a137_0x51f1,0xc6cd6));import{z}from'zod';export const TemplateVariableDefSchema=z[a137_0x52bd21(0x7a)]({'name':z['string'](),'display_name':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'preview_value':z['string']()[a137_0x52bd21(0x8a)](),'default_value':z['string']()['optional']()});export const EmailDefSchema=z[a137_0x52bd21(0x7a)]({'template':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'subject':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'html_file':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'plaintext_file':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'sender_id':z[a137_0x52bd21(0x76)]()['optional'](),'variables':z['array'](TemplateVariableDefSchema)[a137_0x52bd21(0x8a)]()});export const PushContentDefSchema=z['object']({'title':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'message':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'push_type':z['string']()[a137_0x52bd21(0x8a)](),'image_url':z['string']()[a137_0x52bd21(0x8a)](),'on_click_behavior':z[a137_0x52bd21(0x76)]()['optional'](),'on_click_behavior_url':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});export const LineImagemapAreaDefSchema=z[a137_0x52bd21(0x7a)]({'x':z['number'](),'y':z['number'](),'width':z[a137_0x52bd21(0x86)](),'height':z['number']()});export const LineImagemapUriActionDefSchema=z[a137_0x52bd21(0x7a)]({'type':z['literal'](a137_0x52bd21(0x79)),'link_uri':z['string'](),'area':LineImagemapAreaDefSchema,'label':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});export const LineImagemapMessageActionDefSchema=z[a137_0x52bd21(0x7a)]({'type':z[a137_0x52bd21(0x80)](a137_0x52bd21(0x78)),'text':z[a137_0x52bd21(0x76)](),'area':LineImagemapAreaDefSchema,'label':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});export const LineImagemapClipboardActionDefSchema=z[a137_0x52bd21(0x7a)]({'type':z[a137_0x52bd21(0x80)](a137_0x52bd21(0x8c)),'clipboard_text':z['string'](),'area':LineImagemapAreaDefSchema,'label':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});export const LineImagemapActionDefSchema=z[a137_0x52bd21(0x90)](a137_0x52bd21(0x7c),[LineImagemapUriActionDefSchema,LineImagemapMessageActionDefSchema,LineImagemapClipboardActionDefSchema]);export const LineTextV2MessageDefSchema=z[a137_0x52bd21(0x7a)]({'type':z[a137_0x52bd21(0x80)](a137_0x52bd21(0x91)),'text':z['string']()});export const LineImagemapMessageDefSchema=z[a137_0x52bd21(0x7a)]({'type':z[a137_0x52bd21(0x80)](a137_0x52bd21(0x84)),'base_url':z['string'](),'alt_text':z[a137_0x52bd21(0x76)](),'base_size':z[a137_0x52bd21(0x7a)]({'width':z[a137_0x52bd21(0x86)](),'height':z[a137_0x52bd21(0x86)]()})[a137_0x52bd21(0x8a)](),'actions':z[a137_0x52bd21(0x88)](LineImagemapActionDefSchema)[a137_0x52bd21(0x82)](0x1)[a137_0x52bd21(0x77)](0x32)});export const LineMessageDefSchema=z['discriminatedUnion'](a137_0x52bd21(0x7c),[LineTextV2MessageDefSchema,LineImagemapMessageDefSchema]);export const LineContentDefSchema=z[a137_0x52bd21(0x7a)]({'line_sender_account_id':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'messages':z[a137_0x52bd21(0x88)](LineMessageDefSchema)['min'](0x1)[a137_0x52bd21(0x77)](0x5)});export const ScheduleDefSchema=z[a137_0x52bd21(0x7a)]({'start_at':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'timezone':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});export const ColumnMappingDefSchema=z['object']({'column':z[a137_0x52bd21(0x76)](),'source':z[a137_0x52bd21(0x76)]()});function a137_0x4b6e(_0x1b76e9,_0x1c7432){_0x1b76e9=_0x1b76e9-0x74;const _0x51f116=a137_0x51f1();let _0x4b6e74=_0x51f116[_0x1b76e9];return _0x4b6e74;}export const ConnectorDefSchema=z[a137_0x52bd21(0x7a)]({'all_columns':z[a137_0x52bd21(0x89)]()[a137_0x52bd21(0x8a)](),'columns':z[a137_0x52bd21(0x88)](ColumnMappingDefSchema)[a137_0x52bd21(0x8a)]()});export const ActivationSettingsDefSchema=z['object']({'enabled':z['boolean']()['optional'](),'workflow_project':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'workflow_name':z['string']()[a137_0x52bd21(0x8a)]()});export const UtmDefSchema=z[a137_0x52bd21(0x7a)]({'enabled':z[a137_0x52bd21(0x89)]()[a137_0x52bd21(0x8a)](),'id':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'medium':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'source':z['string']()[a137_0x52bd21(0x8a)](),'source_platform':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'campaign':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'marketing_tactic':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)]()});function a137_0x51f1(){const _0x599487=['16cPlEvF','2158101XKDGrL','literal','enum','min','587012xJLMhO','imagemap','5HAkkYi','number','13738743axEWRl','array','boolean','optional','9176712BqSEdS','clipboard','default','email','4217384tcPrZP','discriminatedUnion','textV2','4731559NZJWzp','campaign','string','max','message','uri','object','581978dVAHqI','type','line'];a137_0x51f1=function(){return _0x599487;};return a137_0x51f1();}export const NotificationsDefSchema=z['object']({'events':z[a137_0x52bd21(0x88)](z[a137_0x52bd21(0x76)]())[a137_0x52bd21(0x8a)](),'recipients':z[a137_0x52bd21(0x88)](z['number']())[a137_0x52bd21(0x8a)]()});export const CampaignDefSchema=z['object']({'type':z[a137_0x52bd21(0x80)](a137_0x52bd21(0x75))[a137_0x52bd21(0x8d)](a137_0x52bd21(0x75)),'name':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x82)](0x1,'Campaign\x20name\x20is\x20required'),'campaign_type':z[a137_0x52bd21(0x81)]([a137_0x52bd21(0x8e),'push',a137_0x52bd21(0x7d)]),'description':z[a137_0x52bd21(0x76)]()[a137_0x52bd21(0x8a)](),'workspace':z['string']()[a137_0x52bd21(0x8a)](),'audience':z['string']()['optional'](),'segment':z['string']()['optional'](),'email':EmailDefSchema[a137_0x52bd21(0x8a)](),'push':PushContentDefSchema[a137_0x52bd21(0x8a)](),'line':LineContentDefSchema[a137_0x52bd21(0x8a)](),'schedule':ScheduleDefSchema[a137_0x52bd21(0x8a)](),'connector':ConnectorDefSchema[a137_0x52bd21(0x8a)](),'activation':ActivationSettingsDefSchema[a137_0x52bd21(0x8a)](),'utm':UtmDefSchema[a137_0x52bd21(0x8a)](),'notifications':NotificationsDefSchema[a137_0x52bd21(0x8a)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x93cfd2=a138_0x2084;(function(_0x49d960,_0x4fb2b2){const _0x28d051=a138_0x2084,_0x39080a=_0x49d960();while(!![]){try{const _0x1b4c1a=parseInt(_0x28d051(0xf8))/0x1+-parseInt(_0x28d051(0xff))/0x2+-parseInt(_0x28d051(0xf0))/0x3+-parseInt(_0x28d051(0xf2))/0x4*(-parseInt(_0x28d051(0xf3))/0x5)+parseInt(_0x28d051(0xf9))/0x6*(parseInt(_0x28d051(0xf7))/0x7)+-parseInt(_0x28d051(0xf4))/0x8*(parseInt(_0x28d051(0xfa))/0x9)+parseInt(_0x28d051(0xfb))/0xa;if(_0x1b4c1a===_0x4fb2b2)break;else _0x39080a['push'](_0x39080a['shift']());}catch(_0x199f28){_0x39080a['push'](_0x39080a['shift']());}}}(a138_0x1999,0x9bfd6));import{z}from'zod';export const TemplateVariableDefSchema=z[a138_0x93cfd2(0xf1)]({'name':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0x100)](0x1,'Variable\x20name\x20is\x20required'),'display_name':z['string']()[a138_0x93cfd2(0x100)](0x1,a138_0x93cfd2(0xfd)),'preview_value':z['string']()[a138_0x93cfd2(0x100)](0x1,a138_0x93cfd2(0xed)),'default_value':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)]()});function a138_0x1999(){const _0x115903=['27jLQKvL','11905560leDblF','Template\x20name\x20is\x20required','Variable\x20display_name\x20is\x20required','optional','1650248noyNZw','min','Variable\x20preview_value\x20is\x20required','literal','string','671301ycWkLM','object','284yPHRel','24300ycnycT','1461496vQJiLC','default','template','7ttfqfz','528774MrzWLq','1028976yBjINx'];a138_0x1999=function(){return _0x115903;};return a138_0x1999();}function a138_0x2084(_0x497721,_0x2a138f){_0x497721=_0x497721-0xed;const _0x19994e=a138_0x1999();let _0x2084d7=_0x19994e[_0x497721];return _0x2084d7;}export const TemplateDefSchema=z[a138_0x93cfd2(0xf1)]({'type':z[a138_0x93cfd2(0xee)](a138_0x93cfd2(0xf6))[a138_0x93cfd2(0xf5)](a138_0x93cfd2(0xf6)),'name':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0x100)](0x1,a138_0x93cfd2(0xfc)),'subject':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)](),'html_file':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)](),'plaintext_file':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)](),'workspace':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)](),'editor_type':z[a138_0x93cfd2(0xef)]()[a138_0x93cfd2(0xfe)](),'variables':z['array'](TemplateVariableDefSchema)[a138_0x93cfd2(0xf5)]([])});
|