@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(_0x592a32,_0x297929){const _0x241ca0=a174_0x2859,_0x414968=_0x592a32();while(!![]){try{const _0x1de717=parseInt(_0x241ca0(0x1bb))/0x1*(-parseInt(_0x241ca0(0x1b4))/0x2)+parseInt(_0x241ca0(0x1a6))/0x3+-parseInt(_0x241ca0(0x19d))/0x4+-parseInt(_0x241ca0(0x18e))/0x5*(-parseInt(_0x241ca0(0x191))/0x6)+-parseInt(_0x241ca0(0x190))/0x7+-parseInt(_0x241ca0(0x19f))/0x8+parseInt(_0x241ca0(0x199))/0x9*(parseInt(_0x241ca0(0x18c))/0xa);if(_0x1de717===_0x297929)break;else _0x414968['push'](_0x414968['shift']());}catch(_0x52a6ca){_0x414968['push'](_0x414968['shift']());}}}(a174_0x43d7,0xe27ba));import a174_0x2ffd17 from'path';function a174_0x43d7(){const _0x456b4e=['8510cRShuR','dirname','6579125CRENKx','exists','1629656rfLpkT','6dDXhIN','basename','no_parent','join','error','scopedFolderPath','file_not_found','replace','13077uDZIab','stat','isScoped','File\x20not\x20found','524400tWmWpi','cwd','11371616ErwOtU','invalid_yaml','segment','file','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','trim','journey','2860233KQsoyK','File\x20not\x20found:\x20','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','startsWith','tdx.json','root','Not\x20a\x20YAML\x20file:\x20','extname','parent_segment','resourceType','segmentName','match','directory','no_config','30sodHKR','No\x20tdx.json\x20found','context','readFile','parentSegment','Parent\x20segment\x20not\x20specified','isFile','52847KZjCdO','type','resolve','configDir','parent_name','string','includes','No\x20tdx.json\x20found\x20for\x20file:\x20','message','parse'];a174_0x43d7=function(){return _0x456b4e;};return a174_0x43d7();}import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5d93ea){const _0x276487=a174_0x2859;return _0x5d93ea[_0x276487(0x183)]!==_0x276487(0x195);}export function isScopedResolution(_0x515aa2){const _0x25728c=a174_0x2859;return _0x515aa2[_0x25728c(0x183)]===_0x25728c(0x1b2)||_0x515aa2['type']===_0x25728c(0x1a2)||_0x515aa2[_0x25728c(0x183)]===_0x25728c(0x1b6);}export function getScopedDetails(_0x256602){const _0x4aad28=a174_0x2859;if(isScopedResolution(_0x256602))return{'isScoped':_0x256602['isScoped'],'scopedFolderPath':_0x256602[_0x4aad28(0x196)]};return undefined;}function a174_0x2859(_0x224999,_0x30a350){_0x224999=_0x224999-0x183;const _0x43d768=a174_0x43d7();let _0x2859b5=_0x43d768[_0x224999];return _0x2859b5;}async function findTdxConfigAsync(_0x161769,_0x59dec2){const _0x107ba5=a174_0x2859;let _0xed5f31=a174_0x2ffd17[_0x107ba5(0x184)](_0x161769);const _0x24ea3c=a174_0x2ffd17[_0x107ba5(0x18b)](_0xed5f31)[_0x107ba5(0x1ab)];while(_0xed5f31!==_0x24ea3c){const _0xda6213=a174_0x2ffd17[_0x107ba5(0x194)](_0xed5f31,_0x107ba5(0x1aa));if(await _0x59dec2[_0x107ba5(0x18f)](_0xda6213))try{const _0x212f5d=await _0x59dec2[_0x107ba5(0x1b7)](_0xda6213),_0x5861a6=JSON['parse'](_0x212f5d);if(_0x5861a6['parent_segment']&&typeof _0x5861a6['parent_segment']===_0x107ba5(0x187))return{'configPath':_0xda6213,'configDir':_0xed5f31,'parentSegment':_0x5861a6[_0x107ba5(0x1ae)]};}catch{}_0xed5f31=a174_0x2ffd17[_0x107ba5(0x18d)](_0xed5f31);}return null;}function calculateScopedPath(_0xe893d1,_0x383db6){const _0x32dff4=a174_0x2859,_0x26e685=a174_0x2ffd17['relative'](_0x383db6,_0xe893d1),_0x2bc951=_0x26e685!==''&&_0x26e685!=='.'&&!_0x26e685[_0x32dff4(0x1a9)]('..');return{'isScoped':_0x2bc951,'scopedFolderPath':_0x2bc951?_0x26e685[_0x32dff4(0x198)](/\\/g,'/'):''};}export async function resolveTarget(_0x1ec362){const _0x4e8a3b=a174_0x2859,{arg:_0x1b3072,contextParent:_0x2d452d,cwd:cwd=process[_0x4e8a3b(0x19e)](),fs:fs=nodeFileSystem}=_0x1ec362;if(_0x1b3072&&isYamlFilePath(_0x1b3072))try{const _0x29df75=await resolveYamlFilePath(_0x1b3072,fs),_0x463e4f=a174_0x2ffd17[_0x4e8a3b(0x184)](_0x1b3072),_0x3618c0=a174_0x2ffd17[_0x4e8a3b(0x18d)](_0x463e4f),_0xb4c286=await findTdxConfigAsync(_0x3618c0,fs);if(!_0xb4c286){if(_0x2d452d){const _0x25e8e4=a174_0x2ffd17[_0x4e8a3b(0x18d)](_0x463e4f);return{'type':_0x4e8a3b(0x1a2),'parentName':_0x2d452d,'targetDir':_0x25e8e4,'configRoot':_0x25e8e4,'filePath':_0x463e4f,'resourceName':_0x29df75[_0x4e8a3b(0x1b0)],'folderPath':_0x29df75['folderPath'],'resourceType':_0x29df75[_0x4e8a3b(0x1af)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x1b3),'message':_0x4e8a3b(0x189)+_0x1b3072,'arg':_0x1b3072,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x2147bd=calculateScopedPath(_0x3618c0,_0xb4c286[_0x4e8a3b(0x185)]);return{'type':_0x4e8a3b(0x1a2),'parentName':_0xb4c286[_0x4e8a3b(0x1b8)],'targetDir':_0xb4c286[_0x4e8a3b(0x185)],'configRoot':_0xb4c286['configDir'],'filePath':_0x463e4f,'resourceName':_0x29df75[_0x4e8a3b(0x1b0)],'folderPath':_0x29df75['folderPath'],'resourceType':_0x29df75[_0x4e8a3b(0x1af)],'isScoped':_0x2147bd[_0x4e8a3b(0x19b)],'scopedFolderPath':_0x2147bd[_0x4e8a3b(0x196)]};}catch(_0x129654){const _0x245f42=_0x129654 instanceof Error?_0x129654[_0x4e8a3b(0x18a)]:String(_0x129654);if(_0x245f42[_0x4e8a3b(0x188)](_0x4e8a3b(0x19c)))return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x197),'message':_0x4e8a3b(0x1a7)+_0x1b3072,'arg':_0x1b3072};if(_0x245f42[_0x4e8a3b(0x188)](_0x4e8a3b(0x1b5))){if(_0x2d452d){const _0x42c300=a174_0x2ffd17[_0x4e8a3b(0x184)](_0x1b3072);if(await fs[_0x4e8a3b(0x18f)](_0x42c300)){const _0x311584=a174_0x2ffd17[_0x4e8a3b(0x18d)](_0x42c300),_0x897261=await fs[_0x4e8a3b(0x1b7)](_0x42c300),_0x47f2e4=_0x897261[_0x4e8a3b(0x1b1)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x303c29=_0x897261[_0x4e8a3b(0x1b1)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3ab72e=_0x47f2e4?_0x47f2e4[0x1][_0x4e8a3b(0x1a4)]():a174_0x2ffd17[_0x4e8a3b(0x192)](_0x1b3072,a174_0x2ffd17[_0x4e8a3b(0x1ad)](_0x1b3072)),_0x4eead1=_0x303c29&&_0x303c29[0x1][_0x4e8a3b(0x1a4)]()===_0x4e8a3b(0x1a5)?_0x4e8a3b(0x1a5):_0x4e8a3b(0x1a1);return{'type':_0x4e8a3b(0x1a2),'parentName':_0x2d452d,'targetDir':_0x311584,'configRoot':_0x311584,'filePath':_0x42c300,'resourceName':_0x3ab72e,'folderPath':'','resourceType':_0x4eead1,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x1b3),'message':_0x4e8a3b(0x189)+_0x1b3072,'arg':_0x1b3072,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x1a0),'message':_0x245f42,'arg':_0x1b3072};}if(_0x1b3072){const _0x444c81=a174_0x2ffd17[_0x4e8a3b(0x184)](cwd,_0x1b3072);let _0x54941e=null;try{_0x54941e=await fs[_0x4e8a3b(0x19a)](_0x444c81);}catch{}if(_0x54941e?.['isDirectory']()){const _0xc36e93=await findTdxConfigAsync(_0x444c81,fs);if(_0xc36e93){const _0x2eb425=calculateScopedPath(_0x444c81,_0xc36e93[_0x4e8a3b(0x185)]);return{'type':_0x4e8a3b(0x1b2),'parentName':_0xc36e93['parentSegment'],'targetDir':_0x444c81,'configRoot':_0xc36e93[_0x4e8a3b(0x185)],'isScoped':_0x2eb425['isScoped'],'scopedFolderPath':_0x2eb425[_0x4e8a3b(0x196)]};}if(_0x2d452d)return{'type':'directory','parentName':_0x2d452d,'targetDir':_0x444c81,'configRoot':_0x444c81,'isScoped':![],'scopedFolderPath':''};return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x1b3),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x1b3072,'arg':_0x1b3072,'helpText':_0x4e8a3b(0x1a3)};}if(_0x54941e?.[_0x4e8a3b(0x1ba)]())return{'type':'error','errorCode':_0x4e8a3b(0x1a0),'message':_0x4e8a3b(0x1ac)+_0x1b3072,'arg':_0x1b3072,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x55c147=sanitizeFileName(_0x1b3072),_0x31e24b=getSegmentRootDir(_0x55c147,cwd);return{'type':_0x4e8a3b(0x186),'parentName':_0x1b3072,'targetDir':_0x31e24b,'configRoot':_0x31e24b};}const _0x5acce0=await findTdxConfigAsync(cwd,fs);if(_0x5acce0){const _0x339553=calculateScopedPath(cwd,_0x5acce0[_0x4e8a3b(0x185)]);return{'type':_0x4e8a3b(0x1b6),'parentName':_0x5acce0[_0x4e8a3b(0x1b8)],'targetDir':cwd,'configRoot':_0x5acce0[_0x4e8a3b(0x185)],'isScoped':_0x339553['isScoped'],'scopedFolderPath':_0x339553[_0x4e8a3b(0x196)]};}if(_0x2d452d){const _0x1aef55=sanitizeFileName(_0x2d452d),_0x4587cf=getSegmentRootDir(_0x1aef55,cwd);return{'type':_0x4e8a3b(0x1b6),'parentName':_0x2d452d,'targetDir':_0x4587cf,'configRoot':_0x4587cf,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4e8a3b(0x195),'errorCode':_0x4e8a3b(0x193),'message':_0x4e8a3b(0x1b9),'helpText':_0x4e8a3b(0x1a8)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x2df157=a175_0x1e87;(function(_0x24f3e0,_0x213e73){const _0x55ebf7=a175_0x1e87,_0x2607bf=_0x24f3e0();while(!![]){try{const _0x2b5295=-parseInt(_0x55ebf7(0x1d9))/0x1+parseInt(_0x55ebf7(0x1c5))/0x2+-parseInt(_0x55ebf7(0x1c3))/0x3*(parseInt(_0x55ebf7(0x1da))/0x4)+-parseInt(_0x55ebf7(0x1c0))/0x5*(parseInt(_0x55ebf7(0x1d2))/0x6)+parseInt(_0x55ebf7(0x1cf))/0x7+parseInt(_0x55ebf7(0x1d7))/0x8+-parseInt(_0x55ebf7(0x1d6))/0x9;if(_0x2b5295===_0x213e73)break;else _0x2607bf['push'](_0x2607bf['shift']());}catch(_0x1e6c29){_0x2607bf['push'](_0x2607bf['shift']());}}}(a175_0x5b23,0x45615));import{existsSync,readFileSync}from'fs';import a175_0x21f775 from'path';const TDX_CONFIG_FILE=a175_0x2df157(0x1d1),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x2facfc=process[a175_0x2df157(0x1c2)]()){const _0x2711c8=a175_0x2df157;let _0x468ffc=a175_0x21f775[_0x2711c8(0x1d3)](_0x2facfc);const _0x3c7d5a=a175_0x21f775[_0x2711c8(0x1d4)](_0x468ffc)[_0x2711c8(0x1c6)];while(_0x468ffc!==_0x3c7d5a){const _0x2623ff=a175_0x21f775[_0x2711c8(0x1c4)](_0x468ffc,TDX_CONFIG_FILE);if(existsSync(_0x2623ff))return _0x2623ff;_0x468ffc=a175_0x21f775[_0x2711c8(0x1c9)](_0x468ffc);}return null;}export function loadTdxConfig(_0x1d520f){const _0x2bd01e=a175_0x2df157,_0x43985f=readFileSync(_0x1d520f,_0x2bd01e(0x1d5));let _0x3becf1;try{_0x3becf1=JSON[_0x2bd01e(0x1d4)](_0x43985f);}catch{throw new Error(_0x2bd01e(0x1c1)+_0x1d520f);}if(!_0x3becf1||typeof _0x3becf1!=='object')throw new Error(_0x2bd01e(0x1ce));const _0x2ba71f=_0x3becf1,_0x57ad11=_0x2ba71f[_0x2bd01e(0x1cb)]&&typeof _0x2ba71f[_0x2bd01e(0x1cb)]===_0x2bd01e(0x1c8),_0x4a31d8=_0x2ba71f[_0x2bd01e(0x1cc)]&&typeof _0x2ba71f[_0x2bd01e(0x1cc)]==='string';if(!_0x57ad11&&!_0x4a31d8)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x5f0c29={};return _0x57ad11&&(_0x5f0c29[_0x2bd01e(0x1cb)]=_0x2ba71f[_0x2bd01e(0x1cb)]),_0x4a31d8&&(_0x5f0c29[_0x2bd01e(0x1cc)]=_0x2ba71f[_0x2bd01e(0x1cc)]),_0x5f0c29;}export function findTdxConfig(_0x470f2c=process[a175_0x2df157(0x1c2)]()){const _0x322dd8=a175_0x2df157,_0x1eeaaf=findTdxConfigPath(_0x470f2c);if(!_0x1eeaaf)throw new Error(_0x322dd8(0x1c7));const _0x26ed1c=loadTdxConfig(_0x1eeaaf),_0x21ee2e=a175_0x21f775[_0x322dd8(0x1c9)](_0x1eeaaf);return{'config':_0x26ed1c,'configPath':_0x1eeaaf,'configDir':_0x21ee2e};}export function tryFindTdxConfig(_0x3141e0){try{return findTdxConfig(_0x3141e0);}catch{return null;}}export function getSegmentRootDir(_0x146f0c,_0x55b817=process[a175_0x2df157(0x1c2)]()){return a175_0x21f775['join'](_0x55b817,SEGMENTS_DIR,_0x146f0c);}export function getTdxConfigPath(_0x4e7c0f,_0x2e9518=process[a175_0x2df157(0x1c2)]()){const _0x2bcc79=a175_0x2df157;return a175_0x21f775[_0x2bcc79(0x1c4)](getSegmentRootDir(_0x4e7c0f,_0x2e9518),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3586b6,_0x46b40c){const _0x3b0de0=a175_0x2df157,_0x25faaf=a175_0x21f775[_0x3b0de0(0x1d3)](_0x3586b6),_0x2c2dab=a175_0x21f775[_0x3b0de0(0x1cd)](_0x46b40c,_0x25faaf);if(_0x2c2dab[_0x3b0de0(0x1d8)]('..'))return'';return _0x2c2dab;}export function localPathToTdFolderPath(_0x219960){const _0x4ff1c3=a175_0x2df157,_0x1dad07=a175_0x21f775[_0x4ff1c3(0x1c9)](_0x219960);if(_0x1dad07==='.'||_0x1dad07==='')return'';return _0x1dad07[_0x4ff1c3(0x1ca)](/\\/g,'/');}function a175_0x1e87(_0x38539f,_0x5a607e){_0x38539f=_0x38539f-0x1c0;const _0x5b23cc=a175_0x5b23();let _0x1e879b=_0x5b23cc[_0x38539f];return _0x1e879b;}export function tdFolderPathToLocalPath(_0xaa62a0,_0x4e36ee){const _0xc146bc=a175_0x2df157;if(!_0xaa62a0)return _0x4e36ee;return a175_0x21f775[_0xc146bc(0x1c4)](_0x4e36ee,_0xaa62a0);}export function createTdxConfigContent(_0x46cad3){const _0x277f16=a175_0x2df157,_0x4cb973={'parent_segment':_0x46cad3};return JSON[_0x277f16(0x1d0)](_0x4cb973,null,0x2)+'\x0a';}function a175_0x5b23(){const _0x552957=['10uUhOiK','Invalid\x20JSON\x20in\x20','cwd','3JtcIhl','join','850578tlDiyg','root','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','string','dirname','replace','parent_segment','engage_workspace','relative','Invalid\x20tdx.json:\x20expected\x20object','2836848tSYDph','stringify','tdx.json','327426vbJjcz','resolve','parse','utf-8','5549562aXeHaa','2610544wDCCbq','startsWith','10722VOwABh','544832XZUjRx'];a175_0x5b23=function(){return _0x552957;};return a175_0x5b23();}export function createEngageTdxConfigContent(_0x2b9569){const _0x581239={'engage_workspace':_0x2b9569};return JSON['stringify'](_0x581239,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x5a7433=a176_0x1328;(function(_0x3bdeec,_0x58414b){const _0x393fde=a176_0x1328,_0x465347=_0x3bdeec();while(!![]){try{const _0x37a75a=parseInt(_0x393fde(0x9b))/0x1*(-parseInt(_0x393fde(0xad))/0x2)+parseInt(_0x393fde(0x7f))/0x3+-parseInt(_0x393fde(0xa5))/0x4*(-parseInt(_0x393fde(0xa2))/0x5)+-parseInt(_0x393fde(0xab))/0x6+-parseInt(_0x393fde(0x91))/0x7+-parseInt(_0x393fde(0x9f))/0x8+parseInt(_0x393fde(0x86))/0x9;if(_0x37a75a===_0x58414b)break;else _0x465347['push'](_0x465347['shift']());}catch(_0xaefee){_0x465347['push'](_0x465347['shift']());}}}(a176_0x5338,0x2ef12));import{z}from'zod';export const ScheduleTypeSchema=z[a176_0x5a7433(0xa9)]([a176_0x5a7433(0x8b),a176_0x5a7433(0xa0),a176_0x5a7433(0xa7),a176_0x5a7433(0x8d),a176_0x5a7433(0x87),a176_0x5a7433(0x88),a176_0x5a7433(0xa4)]);export const RepeatUnitSchema=z[a176_0x5a7433(0xa9)]([a176_0x5a7433(0x90),a176_0x5a7433(0x8f),a176_0x5a7433(0x99),a176_0x5a7433(0x84),a176_0x5a7433(0xaa),a176_0x5a7433(0x9d),a176_0x5a7433(0x8b)]);function a176_0x1328(_0x54f751,_0x224400){_0x54f751=_0x54f751-0x7d;const _0x5338d2=a176_0x5338();let _0x1328c0=_0x5338d2[_0x54f751];return _0x1328c0;}export const ScheduleDefSchema=z[a176_0x5a7433(0x82)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a176_0x5a7433(0x93)](),'repeat_frequency':z[a176_0x5a7433(0x7e)]()['optional'](),'repeat_sub_frequency':z[a176_0x5a7433(0x8a)](z[a176_0x5a7433(0x7e)]())['optional'](),'start_at':z[a176_0x5a7433(0x7d)]()[a176_0x5a7433(0x81)]()[a176_0x5a7433(0x93)](),'end_on':z[a176_0x5a7433(0x7d)]()[a176_0x5a7433(0x81)]()[a176_0x5a7433(0x93)](),'timezone':z[a176_0x5a7433(0x7d)]()['optional']()});export const NotificationDefSchema=z[a176_0x5a7433(0x82)]({'notify_on':z[a176_0x5a7433(0x8a)](z[a176_0x5a7433(0xa9)](['onSuccess',a176_0x5a7433(0x9e)]))[a176_0x5a7433(0x93)](),'email_recipients':z[a176_0x5a7433(0x8a)](z[a176_0x5a7433(0x7d)]())[a176_0x5a7433(0x93)]()});function a176_0x5338(){const _0x5130b0=['First','enum','month','1490016SUOBJm','record','11962tOkLGL','string','number','1150416zBWhtG','ascending','nullable','object','addIssue','week','All','2485863rZAydY','monthly','cron','max','array','none','custom','weekly','union','hour','minute','468748xxKfDO','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','optional','unknown','cols','boolean','Activation\x20name\x20is\x20required','Top-N','day','behavior','17skuFmc','Connection\x20name\x20is\x20required','once','onFailure','2813776pYjdvQ','hourly','descending','107605QhVBPA','rows','minutes_interval','56LvgiYo','Last','daily'];a176_0x5338=function(){return _0x5130b0;};return a176_0x5338();}export const ActivationColumnDefSchema=z[a176_0x5a7433(0x8e)]([z['string'](),z['object']({'name':z[a176_0x5a7433(0x7d)](),'type':z[a176_0x5a7433(0x7d)]()[a176_0x5a7433(0x93)](),'visibility':z['enum'](['clear','masked'])[a176_0x5a7433(0x93)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a176_0x5a7433(0x8a)](ActivationColumnDefSchema)['optional'](),'behavior_table':z[a176_0x5a7433(0x7d)]()[a176_0x5a7433(0x93)](),'join_row':z[a176_0x5a7433(0x7e)]()[a176_0x5a7433(0x81)]()['optional'](),'join_strategy':z['enum']([a176_0x5a7433(0x85),a176_0x5a7433(0xa8),a176_0x5a7433(0xa6),a176_0x5a7433(0x98)])['optional'](),'formatting':z[a176_0x5a7433(0xa9)]([a176_0x5a7433(0xa3),a176_0x5a7433(0x95)])[a176_0x5a7433(0x93)](),'order_by':z[a176_0x5a7433(0x8a)](z[a176_0x5a7433(0x82)]({'key':z[a176_0x5a7433(0x7d)](),'order':z[a176_0x5a7433(0xa9)]([a176_0x5a7433(0x80),a176_0x5a7433(0xa1)])}))[a176_0x5a7433(0x93)]()});export const ActivationBehaviorsDefSchema=z['array'](ActivationBehaviorDefSchema)[a176_0x5a7433(0x89)](0x4);export const ActivationDefSchema=z[a176_0x5a7433(0x82)]({'name':z['string']()['min'](0x1,a176_0x5a7433(0x97)),'description':z[a176_0x5a7433(0x7d)]()[a176_0x5a7433(0x93)](),'connection':z[a176_0x5a7433(0x7d)]()['min'](0x1,a176_0x5a7433(0x9c)),'all_columns':z[a176_0x5a7433(0x96)]()[a176_0x5a7433(0x93)](),'columns':z[a176_0x5a7433(0x8a)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a176_0x5a7433(0x93)](),'notification':NotificationDefSchema[a176_0x5a7433(0x93)](),'connector_config':z[a176_0x5a7433(0xac)](z[a176_0x5a7433(0x7d)](),z[a176_0x5a7433(0x94)]())['optional'](),'activation_template_id':z[a176_0x5a7433(0x7d)]()['nullable']()[a176_0x5a7433(0x93)](),'behavior':ActivationBehaviorDefSchema[a176_0x5a7433(0x81)]()['optional'](),'behaviors':ActivationBehaviorsDefSchema[a176_0x5a7433(0x93)](),'run_after_journey_refresh':z['boolean']()[a176_0x5a7433(0x93)](),'nested_workflow_project_name':z['string']()[a176_0x5a7433(0x93)](),'nested_workflow_name':z[a176_0x5a7433(0x7d)]()['optional'](),'lock_enabled':z[a176_0x5a7433(0x96)]()[a176_0x5a7433(0x93)]()})['superRefine']((_0x381614,_0x4b13ef)=>{const _0x58e4d6=a176_0x5a7433;_0x381614[_0x58e4d6(0x9a)]!=null&&_0x381614['behaviors']!=null&&_0x4b13ef[_0x58e4d6(0x83)]({'code':_0x58e4d6(0x8c),'message':_0x58e4d6(0x92),'path':[_0x58e4d6(0x9a)]});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a177_0x5752(_0x514d50,_0x144c8c){_0x514d50=_0x514d50-0x91;var _0x1a6065=a177_0x1a60();var _0x5752a1=_0x1a6065[_0x514d50];return _0x5752a1;}function a177_0x1a60(){var _0x2acc52=['27NgWkCd','743022atQCuH','504994ORCbXo','2452328gVsTTX','30590520RwtvvW','4WSsHDF','488586ergxwo','2924460wKscDg','617465KjeavX','10LvDBYK'];a177_0x1a60=function(){return _0x2acc52;};return a177_0x1a60();}(function(_0x5537a8,_0x3c98c9){var _0x401f63=a177_0x5752,_0x1728c4=_0x5537a8();while(!![]){try{var _0x52587c=-parseInt(_0x401f63(0x97))/0x1+parseInt(_0x401f63(0x9a))/0x2*(-parseInt(_0x401f63(0x92))/0x3)+-parseInt(_0x401f63(0x96))/0x4*(parseInt(_0x401f63(0x99))/0x5)+parseInt(_0x401f63(0x98))/0x6+-parseInt(_0x401f63(0x93))/0x7+parseInt(_0x401f63(0x94))/0x8*(-parseInt(_0x401f63(0x91))/0x9)+parseInt(_0x401f63(0x95))/0xa;if(_0x52587c===_0x3c98c9)break;else _0x1728c4['push'](_0x1728c4['shift']());}catch(_0x4671ce){_0x1728c4['push'](_0x1728c4['shift']());}}}(a177_0x1a60,0xabef8));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a178_0x2d2416=a178_0x5f2c;function a178_0x5f2c(_0x51709e,_0x1ae855){_0x51709e=_0x51709e-0x1f3;const _0x909b5a=a178_0x909b();let _0x5f2c04=_0x909b5a[_0x51709e];return _0x5f2c04;}(function(_0x552e1d,_0x13ae2e){const _0x47dfa6=a178_0x5f2c,_0x5491c2=_0x552e1d();while(!![]){try{const _0xc3083c=parseInt(_0x47dfa6(0x1f5))/0x1*(-parseInt(_0x47dfa6(0x1f4))/0x2)+-parseInt(_0x47dfa6(0x203))/0x3*(parseInt(_0x47dfa6(0x1fe))/0x4)+parseInt(_0x47dfa6(0x213))/0x5*(parseInt(_0x47dfa6(0x219))/0x6)+-parseInt(_0x47dfa6(0x209))/0x7+parseInt(_0x47dfa6(0x1fa))/0x8*(parseInt(_0x47dfa6(0x1f7))/0x9)+parseInt(_0x47dfa6(0x20e))/0xa*(-parseInt(_0x47dfa6(0x21d))/0xb)+parseInt(_0x47dfa6(0x212))/0xc;if(_0xc3083c===_0x13ae2e)break;else _0x5491c2['push'](_0x5491c2['shift']());}catch(_0x4da5b7){_0x5491c2['push'](_0x5491c2['shift']());}}}(a178_0x909b,0x47404));function a178_0x909b(){const _0x4bc7b6=['boolean','reentry_unless_goal_achieved','optional','2548553vJBotV','launched','wait','length','literal','1508810XrYNTR','versions','refine','stages','10742568oAxhiD','40YOLnQZ','decision_point','isArray','lazy','jump','enum','23766AZDYhi','no_reentry','record','object','11OTvaWr','simulation','discriminatedUnion','reentry_always','Journey\x20name\x20is\x20required','array','16316TtWPzh','14bRRYhO','number','105687VqTXNR','end','activation','296gMcVTl','string','week','ab_test','251644JPZsNw','day','draft','filter','journey','21wUfvRo','merge','type'];a178_0x909b=function(){return _0x4bc7b6;};return a178_0x909b();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a178_0x2d2416(0x218)]([a178_0x2d2416(0x200),a178_0x2d2416(0x21e),a178_0x2d2416(0x20a)]);export const ReentryModeTypeSchema=z[a178_0x2d2416(0x218)]([a178_0x2d2416(0x21a),a178_0x2d2416(0x207),a178_0x2d2416(0x220)]);export const WaitUnitTypeSchema=z[a178_0x2d2416(0x218)]([a178_0x2d2416(0x1ff),a178_0x2d2416(0x1fc)]);export const StepTypeValueSchema=z[a178_0x2d2416(0x218)]([a178_0x2d2416(0x20b),a178_0x2d2416(0x1f9),'decision_point',a178_0x2d2416(0x1fd),a178_0x2d2416(0x204),a178_0x2d2416(0x217),a178_0x2d2416(0x1f8)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a178_0x2d2416(0x1fb)](),'stage':z[a178_0x2d2416(0x1fb)](),'bundle_id':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)]()});export const CriteriaDefSchema=z[a178_0x2d2416(0x21c)]({'name':z[a178_0x2d2416(0x1fb)](),'description':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'segment':z[a178_0x2d2416(0x1fb)](),'target':JumpTargetDefSchema[a178_0x2d2416(0x208)]()});const WaitConditionTimeoutDefSchema=z[a178_0x2d2416(0x21c)]({'duration':z[a178_0x2d2416(0x1f6)](),'unit':WaitUnitTypeSchema,'next':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)]()}),WaitConditionDefSchema=z['object']({'segment':z[a178_0x2d2416(0x1fb)](),'next':z[a178_0x2d2416(0x1fb)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a178_0x2d2416(0x21c)]({'duration':z[a178_0x2d2416(0x1f6)]()[a178_0x2d2416(0x208)](),'unit':WaitUnitTypeSchema[a178_0x2d2416(0x208)](),'wait_until':z['string']()[a178_0x2d2416(0x208)](),'condition':WaitConditionDefSchema[a178_0x2d2416(0x208)](),'days_of_week':z[a178_0x2d2416(0x1f3)](z[a178_0x2d2416(0x1fb)]())['optional']()}),StepBaseFields={'name':z[a178_0x2d2416(0x1fb)](),'uuid':z['string']()[a178_0x2d2416(0x208)](),'next':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)]()},WaitStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z['literal'](a178_0x2d2416(0x20b)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a178_0x2d2416(0x21c)]({'activation':z[a178_0x2d2416(0x1fb)]()}),ActivationStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z[a178_0x2d2416(0x20d)](a178_0x2d2416(0x1f9)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a178_0x2d2416(0x1fb)](),'segment':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'segment_id':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'excluded':z[a178_0x2d2416(0x206)]()[a178_0x2d2416(0x208)](),'next':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)]()}),DecisionPointStepParamsDefSchema=z[a178_0x2d2416(0x21c)]({'branches':z[a178_0x2d2416(0x1f3)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z['literal'](a178_0x2d2416(0x214)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a178_0x2d2416(0x21c)]({'id':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'name':z[a178_0x2d2416(0x1fb)](),'percentage':z[a178_0x2d2416(0x1f6)](),'next':z['string']()[a178_0x2d2416(0x208)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z[a178_0x2d2416(0x206)]()[a178_0x2d2416(0x208)]()}),AbTestStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z[a178_0x2d2416(0x20d)](a178_0x2d2416(0x1fd)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z['literal'](a178_0x2d2416(0x204))}),JumpStepParamsDefSchema=z[a178_0x2d2416(0x21c)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z['literal'](a178_0x2d2416(0x217)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a178_0x2d2416(0x21c)]({...StepBaseFields,'type':z[a178_0x2d2416(0x20d)](a178_0x2d2416(0x1f8))})['passthrough']();export const StepDefSchema=z[a178_0x2d2416(0x21f)](a178_0x2d2416(0x205),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a178_0x2d2416(0x21c)]({'name':z['string'](),'description':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'id':z['string']()[a178_0x2d2416(0x208)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z['array'](CriteriaDefSchema)[a178_0x2d2416(0x208)](),'milestone':CriteriaDefSchema[a178_0x2d2416(0x208)](),'root_step':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'steps':z['array'](StepDefSchema)[a178_0x2d2416(0x208)]()});export const JourneyEntryDefSchema=z[a178_0x2d2416(0x21c)]({'name':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'version':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a178_0x2d2416(0x206)]()[a178_0x2d2416(0x208)](),'stages':z['array'](StageDefSchema),'id':z[a178_0x2d2416(0x1fb)]()['optional'](),'version_number':z[a178_0x2d2416(0x1f6)]()[a178_0x2d2416(0x208)](),'goal':CriteriaDefSchema[a178_0x2d2416(0x208)](),'reentry':ReentryModeTypeSchema[a178_0x2d2416(0x208)]()});export const JourneyDefSchema=z[a178_0x2d2416(0x216)](()=>z['object']({'type':z[a178_0x2d2416(0x20d)](a178_0x2d2416(0x202)),'name':z[a178_0x2d2416(0x1fb)]()['min'](0x1,a178_0x2d2416(0x221)),'description':z['string']()[a178_0x2d2416(0x208)](),'bundle_id':z['string']()[a178_0x2d2416(0x208)](),'bundle_name':z['string']()[a178_0x2d2416(0x208)](),'folder_id':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'reentry':ReentryModeTypeSchema[a178_0x2d2416(0x208)](),'allow_reentry':z[a178_0x2d2416(0x206)]()[a178_0x2d2416(0x208)](),'goal':CriteriaDefSchema[a178_0x2d2416(0x208)](),'id':z[a178_0x2d2416(0x1fb)]()[a178_0x2d2416(0x208)](),'version':z[a178_0x2d2416(0x1fb)]()['optional'](),'version_number':z['number']()['optional'](),'stages':z['array'](StageDefSchema)[a178_0x2d2416(0x208)](),'versions':z[a178_0x2d2416(0x1f3)](JourneyEntryDefSchema)[a178_0x2d2416(0x208)](),'journeys':z[a178_0x2d2416(0x1f3)](JourneyEntryDefSchema)[a178_0x2d2416(0x208)](),'segments':z[a178_0x2d2416(0x21b)](z['string'](),EmbeddedSegmentDefSchema)[a178_0x2d2416(0x208)](),'activations':z['record'](z[a178_0x2d2416(0x1fb)](),ActivationDefSchema)[a178_0x2d2416(0x208)]()})[a178_0x2d2416(0x210)](_0x4364ac=>{const _0x1845df=a178_0x2d2416,_0x578236=[_0x4364ac['journeys'],_0x4364ac[_0x1845df(0x211)],_0x4364ac[_0x1845df(0x20f)]][_0x1845df(0x201)](_0x5cad58=>Array[_0x1845df(0x215)](_0x5cad58)&&_0x5cad58['length']>0x0)[_0x1845df(0x20c)];return _0x578236===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a180_0x3487(){var _0x2616bb=['186zNpUXa','25jlmxze','6740HIwbGa','583252iIfHve','673206edyvdy','37032IjgpAU','271935hPPkdx','24879REfNbz','516199lnxjlr','9680kZRRWY','903zHCEHz'];a180_0x3487=function(){return _0x2616bb;};return a180_0x3487();}function a180_0x51a7(_0x300564,_0x502d42){_0x300564=_0x300564-0xab;var _0x34876c=a180_0x3487();var _0x51a71c=_0x34876c[_0x300564];return _0x51a71c;}(function(_0x448317,_0x175319){var _0x573cbc=a180_0x51a7,_0x320beb=_0x448317();while(!![]){try{var _0x18a32f=parseInt(_0x573cbc(0xb5))/0x1+parseInt(_0x573cbc(0xad))/0x2*(-parseInt(_0x573cbc(0xb4))/0x3)+-parseInt(_0x573cbc(0xb0))/0x4*(-parseInt(_0x573cbc(0xae))/0x5)+-parseInt(_0x573cbc(0xb1))/0x6+-parseInt(_0x573cbc(0xac))/0x7*(-parseInt(_0x573cbc(0xb2))/0x8)+parseInt(_0x573cbc(0xb3))/0x9+parseInt(_0x573cbc(0xaf))/0xa*(-parseInt(_0x573cbc(0xab))/0xb);if(_0x18a32f===_0x175319)break;else _0x320beb['push'](_0x320beb['shift']());}catch(_0x23e691){_0x320beb['push'](_0x320beb['shift']());}}}(a180_0x3487,0x60b12));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x44e898=a181_0x3882;(function(_0x324dd8,_0xab7615){const _0x7e6fb=a181_0x3882,_0x1db2e3=_0x324dd8();while(!![]){try{const _0x5466d5=parseInt(_0x7e6fb(0x1be))/0x1*(-parseInt(_0x7e6fb(0x1e8))/0x2)+parseInt(_0x7e6fb(0x1e9))/0x3+parseInt(_0x7e6fb(0x1f5))/0x4*(-parseInt(_0x7e6fb(0x1c3))/0x5)+-parseInt(_0x7e6fb(0x1b9))/0x6+-parseInt(_0x7e6fb(0x1bb))/0x7*(parseInt(_0x7e6fb(0x1d4))/0x8)+-parseInt(_0x7e6fb(0x1eb))/0x9+parseInt(_0x7e6fb(0x200))/0xa;if(_0x5466d5===_0xab7615)break;else _0x1db2e3['push'](_0x1db2e3['shift']());}catch(_0x3b2c41){_0x1db2e3['push'](_0x1db2e3['shift']());}}}(a181_0xad42,0x60115));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a181_0x44e898(0x1bf)]([a181_0x44e898(0x1d3),'Greater','Less',a181_0x44e898(0x1e5),a181_0x44e898(0x1f2),'In',a181_0x44e898(0x1de),a181_0x44e898(0x1e0),a181_0x44e898(0x1f8),a181_0x44e898(0x204),a181_0x44e898(0x1b6),a181_0x44e898(0x202),a181_0x44e898(0x1d6),a181_0x44e898(0x1ba),a181_0x44e898(0x1f7)]);export const TimeUnitSchema=z['enum'](['second','minute','hour',a181_0x44e898(0x1bd),a181_0x44e898(0x1f0),a181_0x44e898(0x1cf),a181_0x44e898(0x1c7)]);export const AggregationTypeSchema=z['enum']([a181_0x44e898(0x1c4),a181_0x44e898(0x1ee),a181_0x44e898(0x1fe),a181_0x44e898(0x1fa),a181_0x44e898(0x1d7),'CountDistinct','First',a181_0x44e898(0x1b4)]);const TemporalValueSchema=z[a181_0x44e898(0x1d8)]([z['object']({'timestamp':z[a181_0x44e898(0x1bc)]()}),z[a181_0x44e898(0x1ea)]({'last':z[a181_0x44e898(0x1d8)]([z['number'](),z[a181_0x44e898(0x1f4)](z['string'](),z[a181_0x44e898(0x1e4)]())]),'unit':z[a181_0x44e898(0x1bc)]()})]),OperatorValueSchema=z[a181_0x44e898(0x1d8)]([z[a181_0x44e898(0x1bc)](),z[a181_0x44e898(0x1e4)](),z[a181_0x44e898(0x1df)](),TemporalValueSchema,z[a181_0x44e898(0x1c0)](z[a181_0x44e898(0x1d8)]([z['string'](),z[a181_0x44e898(0x1e4)](),z[a181_0x44e898(0x1df)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a181_0x44e898(0x1d3),a181_0x44e898(0x1da),a181_0x44e898(0x1e5),a181_0x44e898(0x1e6),'LessEqual','In',a181_0x44e898(0x202),'StartWith','EndWith',a181_0x44e898(0x1e0),'TimeWithinPast',a181_0x44e898(0x1b6)]),OPERATORS_REQUIRING_UNIT=new Set([a181_0x44e898(0x204),'TimeWithinNext']);export const OperatorDefSchema=z[a181_0x44e898(0x1ea)]({'type':OperatorTypeSchema,'not':z[a181_0x44e898(0x1df)]()[a181_0x44e898(0x1dc)](),'value':OperatorValueSchema[a181_0x44e898(0x1dc)](),'min':z[a181_0x44e898(0x1d8)]([z[a181_0x44e898(0x1e4)](),z[a181_0x44e898(0x1bc)](),TemporalValueSchema])[a181_0x44e898(0x1dc)](),'max':z['union']([z[a181_0x44e898(0x1e4)](),z[a181_0x44e898(0x1bc)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a181_0x44e898(0x1dc)](),'duration':z[a181_0x44e898(0x1ea)]({'day':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)](),'week':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)](),'month':z['number']()[a181_0x44e898(0x1dc)](),'year':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)](),'hour':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)](),'minute':z['number']()['optional'](),'second':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)]()})[a181_0x44e898(0x1dc)](),'from':z[a181_0x44e898(0x1ea)]({'last':z[a181_0x44e898(0x1d8)]([z[a181_0x44e898(0x1e4)](),z[a181_0x44e898(0x1bc)]()]),'unit':TimeUnitSchema})[a181_0x44e898(0x1dc)](),'reverse':z[a181_0x44e898(0x1df)]()[a181_0x44e898(0x1dc)]()})[a181_0x44e898(0x1cb)]((_0x5c6622,_0xdf06d1)=>{const _0x492ac7=a181_0x44e898;OPERATORS_REQUIRING_VALUE['has'](_0x5c6622[_0x492ac7(0x1ef)])&&(_0x5c6622[_0x492ac7(0x1ff)]===undefined||_0x5c6622[_0x492ac7(0x1ff)]===null)&&_0xdf06d1[_0x492ac7(0x1f3)]({'code':'custom','message':_0x492ac7(0x1b3)+_0x5c6622['type']+_0x492ac7(0x1cc),'path':['value']}),_0x5c6622['type']===_0x492ac7(0x1de)&&_0x5c6622['min']===undefined&&_0x5c6622[_0x492ac7(0x1c6)]===undefined&&_0xdf06d1[_0x492ac7(0x1f3)]({'code':_0x492ac7(0x1b2),'message':_0x492ac7(0x1d1),'params':{'validationCode':_0x492ac7(0x1c1)}}),OPERATORS_REQUIRING_UNIT['has'](_0x5c6622[_0x492ac7(0x1ef)])&&_0x5c6622[_0x492ac7(0x1ff)]!==undefined&&!_0x5c6622['unit']&&_0xdf06d1[_0x492ac7(0x1f3)]({'code':'custom','message':'Operator\x20\x27'+_0x5c6622[_0x492ac7(0x1ef)]+_0x492ac7(0x1ce),'path':[_0x492ac7(0x1c5)],'params':{'validationCode':_0x492ac7(0x1d2)}}),_0x5c6622[_0x492ac7(0x1ef)]===_0x492ac7(0x1f7)&&(!_0x5c6622[_0x492ac7(0x1fd)]&&_0xdf06d1[_0x492ac7(0x1f3)]({'code':_0x492ac7(0x1b2),'message':_0x492ac7(0x1f6),'path':[_0x492ac7(0x1fd)]}),!_0x5c6622[_0x492ac7(0x1b7)]&&_0xdf06d1['addIssue']({'code':_0x492ac7(0x1b2),'message':_0x492ac7(0x203),'path':['from']}));});export const ArrayMatchingSchema=z[a181_0x44e898(0x1d8)]([z[a181_0x44e898(0x1db)](a181_0x44e898(0x201)),z[a181_0x44e898(0x1db)]('all'),z['object']({'atLeast':z['number']()}),z[a181_0x44e898(0x1ea)]({'atMost':z[a181_0x44e898(0x1e4)]()}),z[a181_0x44e898(0x1ea)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a181_0x44e898(0x1ef),[z[a181_0x44e898(0x1ea)]({'type':z['enum']([a181_0x44e898(0x1ee),'Min','Max',a181_0x44e898(0x1fe)]),'column':z['string'](),'groupingColumns':z['array'](z[a181_0x44e898(0x1bc)]())[a181_0x44e898(0x1dc)]()}),z['object']({'type':z[a181_0x44e898(0x1db)](a181_0x44e898(0x1c4)),'groupingColumns':z[a181_0x44e898(0x1c0)](z[a181_0x44e898(0x1bc)]())[a181_0x44e898(0x1dc)]()}),z[a181_0x44e898(0x1ea)]({'type':z[a181_0x44e898(0x1db)](a181_0x44e898(0x1e7)),'columns':z[a181_0x44e898(0x1c0)](z[a181_0x44e898(0x1bc)]())}),z[a181_0x44e898(0x1ea)]({'type':z[a181_0x44e898(0x1bf)]([a181_0x44e898(0x1c2),a181_0x44e898(0x1b4)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a181_0x44e898(0x1c0)](z[a181_0x44e898(0x1bc)]())[a181_0x44e898(0x1dc)]()})]);export const TimeWindowDefSchema=z[a181_0x44e898(0x1ea)]({'duration':z[a181_0x44e898(0x1e4)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a181_0x44e898(0x1b6),'TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a181_0x44e898(0x1db)]('Column'),'column':z[a181_0x44e898(0x1bc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a181_0x44e898(0x1cb)]((_0x1a43ea,_0x4a7c8e)=>{const _0x331de6=a181_0x44e898,_0x121e70=_0x1a43ea[_0x331de6(0x1d5)][_0x331de6(0x1ef)];_0x1a43ea[_0x331de6(0x1e1)]==='timestamp'?!TIMESTAMP_OPERATORS['has'](_0x121e70)&&_0x4a7c8e[_0x331de6(0x1f3)]({'code':_0x331de6(0x1b2),'message':_0x331de6(0x1d9)+_0x121e70+'\x27)','path':[_0x331de6(0x1d5),_0x331de6(0x1ef)]}):TIMESTAMP_OPERATORS[_0x331de6(0x1d0)](_0x121e70)&&_0x4a7c8e['addIssue']({'code':_0x331de6(0x1b2),'message':_0x331de6(0x1b3)+_0x121e70+_0x331de6(0x1c8),'path':[_0x331de6(0x1d5),'type']});});export const FilterRuleDefSchema=z['object']({'type':z['literal'](a181_0x44e898(0x1b8)),'conditions':z[a181_0x44e898(0x1c0)](FilterColumnConditionDefSchema)});function a181_0x3882(_0x40e0a4,_0xd4031f){_0x40e0a4=_0x40e0a4-0x1b2;const _0xad4268=a181_0xad42();let _0x388296=_0xad4268[_0x40e0a4];return _0x388296;}export const ValueConditionDefSchema=z[a181_0x44e898(0x1b5)](()=>z[a181_0x44e898(0x1ea)]({'type':z[a181_0x44e898(0x1db)](a181_0x44e898(0x1fc)),'attribute':z[a181_0x44e898(0x1bc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x44e898(0x1dc)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a181_0x44e898(0x1dc)](),'limit':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)]()}));export const BehaviorConditionDefSchema=z[a181_0x44e898(0x1b5)](()=>z[a181_0x44e898(0x1ea)]({'type':z['literal'](a181_0x44e898(0x1ed)),'attribute':z[a181_0x44e898(0x1bc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x44e898(0x1dc)](),'exclude':z[a181_0x44e898(0x1df)]()[a181_0x44e898(0x1dc)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1dc)](),'filter':FilterRuleDefSchema[a181_0x44e898(0x1dc)](),'timeWindow':TimeWindowDefSchema[a181_0x44e898(0x1dc)](),'limit':z[a181_0x44e898(0x1e4)]()[a181_0x44e898(0x1dc)]()}));export const ColumnConditionDefSchema=z[a181_0x44e898(0x1ea)]({'type':z[a181_0x44e898(0x1db)](a181_0x44e898(0x1fb)),'column':z[a181_0x44e898(0x1bc)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z['enum']([a181_0x44e898(0x1b8),'Or',a181_0x44e898(0x1dd)]),'conditions':z[a181_0x44e898(0x1c0)](ConditionDefSchema),'description':z['string']()[a181_0x44e898(0x1dc)](),'expr':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1dc)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a181_0x44e898(0x1bf)](['include',a181_0x44e898(0x1ec)]),'segment':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1e3)](0x1,a181_0x44e898(0x1ca))});export const ConditionDefSchema=z['lazy'](()=>z[a181_0x44e898(0x1d8)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a181_0x44e898(0x1b5)](()=>z[a181_0x44e898(0x1ea)]({'type':z['enum']([a181_0x44e898(0x1b8),'Or',a181_0x44e898(0x1dd)]),'conditions':z['array'](ConditionDefSchema),'description':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1dc)](),'expr':z[a181_0x44e898(0x1bc)]()['optional']()}));export const SegmentDefSchema=z[a181_0x44e898(0x1ea)]({'type':z[a181_0x44e898(0x1db)](a181_0x44e898(0x1c9))['optional'](),'name':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1e3)](0x1,a181_0x44e898(0x1f1)),'description':z['string']()[a181_0x44e898(0x1dc)](),'folder':z[a181_0x44e898(0x1bc)]()[a181_0x44e898(0x1dc)](),'rule':RuleDefSchema['optional'](),'kind':z['enum']([a181_0x44e898(0x1e2),a181_0x44e898(0x1f9),a181_0x44e898(0x1cd)])['optional'](),'visible':z[a181_0x44e898(0x1df)]()['optional'](),'activations':z['array'](ActivationDefSchema)[a181_0x44e898(0x1dc)]()});function a181_0xad42(){const _0x4c01ca=['1151538uvRrTt','EndWith','34013xoOxNG','string','day','83477MHGoxb','enum','array','MISSING_BETWEEN_BOUNDS','First','14065YmcbjK','Count','unit','max','year','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','segment','Segment\x20reference\x20must\x20not\x20be\x20empty','superRefine','\x27\x20requires\x20a\x20value','funnel_stage','\x27\x20requires\x20a\x20time\x20unit','month','has','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','MISSING_TIME_UNIT','Equal','632PlnYsa','operator','StartWith','Max','union','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Greater','literal','optional','Composite','Between','boolean','Regexp','column','batch','min','number','GreaterEqual','Less','CountDistinct','14ceTJWP','1549428rSDLTA','object','799668SWcROI','exclude','Behavior','Sum','type','week','Segment\x20name\x20is\x20required','LessEqual','addIssue','record','556yvhERK','TimeRange\x20operator\x20requires\x20\x27duration\x27','TimeRange','IsNull','realtime','Min','Column','Value','duration','Average','value','15169990ElCKMI','any','Contain','TimeRange\x20operator\x20requires\x20\x27from\x27','TimeWithinPast','custom','Operator\x20\x27','Last','lazy','TimeWithinNext','from','And'];a181_0xad42=function(){return _0x4c01ca;};return a181_0xad42();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a181_0x45b3b0=a181_0x5709;(function(_0x4d2ea4,_0x956e34){const _0x4400fc=a181_0x5709,_0x3a8c21=_0x4d2ea4();while(!![]){try{const _0x2f8d19=-parseInt(_0x4400fc(0x219))/0x1*(-parseInt(_0x4400fc(0x1da))/0x2)+-parseInt(_0x4400fc(0x20c))/0x3+-parseInt(_0x4400fc(0x20d))/0x4+parseInt(_0x4400fc(0x20f))/0x5+-parseInt(_0x4400fc(0x212))/0x6*(parseInt(_0x4400fc(0x1de))/0x7)+-parseInt(_0x4400fc(0x224))/0x8*(-parseInt(_0x4400fc(0x208))/0x9)+-parseInt(_0x4400fc(0x20a))/0xa*(-parseInt(_0x4400fc(0x1fb))/0xb);if(_0x2f8d19===_0x956e34)break;else _0x3a8c21['push'](_0x3a8c21['shift']());}catch(_0x268d90){_0x3a8c21['push'](_0x3a8c21['shift']());}}}(a181_0x34c6,0xc3b5d));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1d6),'Greater',a181_0x45b3b0(0x211),a181_0x45b3b0(0x1e9),a181_0x45b3b0(0x205),'In',a181_0x45b3b0(0x1f1),a181_0x45b3b0(0x218),'IsNull','TimeWithinPast',a181_0x45b3b0(0x1ee),'Contain','StartWith',a181_0x45b3b0(0x1df),a181_0x45b3b0(0x222)]);export const TimeUnitSchema=z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1e4),a181_0x45b3b0(0x1f4),a181_0x45b3b0(0x1e8),a181_0x45b3b0(0x20b),a181_0x45b3b0(0x204),a181_0x45b3b0(0x209),a181_0x45b3b0(0x1ef)]);export const AggregationTypeSchema=z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1f9),'Sum',a181_0x45b3b0(0x21f),a181_0x45b3b0(0x210),a181_0x45b3b0(0x1fa),'CountDistinct','First',a181_0x45b3b0(0x21b)]);const TemporalValueSchema=z['union']([z[a181_0x45b3b0(0x1e1)]({'timestamp':z[a181_0x45b3b0(0x1f6)]()}),z[a181_0x45b3b0(0x1e1)]({'last':z['union']([z['number'](),z[a181_0x45b3b0(0x1f2)](z[a181_0x45b3b0(0x1f6)](),z[a181_0x45b3b0(0x207)]())]),'unit':z[a181_0x45b3b0(0x1f6)]()})]),OperatorValueSchema=z[a181_0x45b3b0(0x1d4)]([z[a181_0x45b3b0(0x1f6)](),z[a181_0x45b3b0(0x207)](),z[a181_0x45b3b0(0x1ff)](),TemporalValueSchema,z['array'](z[a181_0x45b3b0(0x1d4)]([z[a181_0x45b3b0(0x1f6)](),z[a181_0x45b3b0(0x207)](),z[a181_0x45b3b0(0x1ff)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a181_0x45b3b0(0x1d6),a181_0x45b3b0(0x203),a181_0x45b3b0(0x1e9),a181_0x45b3b0(0x211),a181_0x45b3b0(0x205),'In',a181_0x45b3b0(0x216),a181_0x45b3b0(0x1f7),'EndWith',a181_0x45b3b0(0x218),a181_0x45b3b0(0x1d7),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a181_0x45b3b0(0x1ee)]);export const OperatorDefSchema=z[a181_0x45b3b0(0x1e1)]({'type':OperatorTypeSchema,'not':z[a181_0x45b3b0(0x1ff)]()[a181_0x45b3b0(0x1ea)](),'value':OperatorValueSchema['optional'](),'min':z[a181_0x45b3b0(0x1d4)]([z['number'](),z[a181_0x45b3b0(0x1f6)](),TemporalValueSchema])[a181_0x45b3b0(0x1ea)](),'max':z['union']([z[a181_0x45b3b0(0x207)](),z['string'](),TemporalValueSchema])[a181_0x45b3b0(0x1ea)](),'unit':TimeUnitSchema[a181_0x45b3b0(0x1ea)](),'duration':z[a181_0x45b3b0(0x1e1)]({'day':z[a181_0x45b3b0(0x207)]()[a181_0x45b3b0(0x1ea)](),'week':z['number']()['optional'](),'month':z[a181_0x45b3b0(0x207)]()[a181_0x45b3b0(0x1ea)](),'year':z[a181_0x45b3b0(0x207)]()[a181_0x45b3b0(0x1ea)](),'hour':z[a181_0x45b3b0(0x207)]()['optional'](),'minute':z['number']()['optional'](),'second':z[a181_0x45b3b0(0x207)]()[a181_0x45b3b0(0x1ea)]()})[a181_0x45b3b0(0x1ea)](),'from':z['object']({'last':z[a181_0x45b3b0(0x1d4)]([z[a181_0x45b3b0(0x207)](),z[a181_0x45b3b0(0x1f6)]()]),'unit':TimeUnitSchema})[a181_0x45b3b0(0x1ea)](),'reverse':z[a181_0x45b3b0(0x1ff)]()[a181_0x45b3b0(0x1ea)]()})[a181_0x45b3b0(0x21e)]((_0xb2ce49,_0x224fc3)=>{const _0x338b8a=a181_0x45b3b0;OPERATORS_REQUIRING_VALUE['has'](_0xb2ce49[_0x338b8a(0x21a)])&&(_0xb2ce49['value']===undefined||_0xb2ce49[_0x338b8a(0x1db)]===null)&&_0x224fc3[_0x338b8a(0x1dc)]({'code':_0x338b8a(0x221),'message':_0x338b8a(0x1f8)+_0xb2ce49['type']+_0x338b8a(0x21d),'path':[_0x338b8a(0x1db)]}),_0xb2ce49['type']===_0x338b8a(0x1f1)&&_0xb2ce49[_0x338b8a(0x1e0)]===undefined&&_0xb2ce49['max']===undefined&&_0x224fc3[_0x338b8a(0x1dc)]({'code':_0x338b8a(0x221),'message':_0x338b8a(0x1dd),'params':{'validationCode':_0x338b8a(0x1eb)}}),OPERATORS_REQUIRING_UNIT['has'](_0xb2ce49[_0x338b8a(0x21a)])&&_0xb2ce49[_0x338b8a(0x1db)]!==undefined&&!_0xb2ce49[_0x338b8a(0x1d5)]&&_0x224fc3[_0x338b8a(0x1dc)]({'code':_0x338b8a(0x221),'message':_0x338b8a(0x1f8)+_0xb2ce49[_0x338b8a(0x21a)]+_0x338b8a(0x21c),'path':[_0x338b8a(0x1d5)],'params':{'validationCode':_0x338b8a(0x1d8)}}),_0xb2ce49[_0x338b8a(0x21a)]===_0x338b8a(0x222)&&(!_0xb2ce49['duration']&&_0x224fc3[_0x338b8a(0x1dc)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0xb2ce49[_0x338b8a(0x1ec)]&&_0x224fc3[_0x338b8a(0x1dc)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x338b8a(0x1ec)]}));});function a181_0x34c6(){const _0x42fe20=['Greater','week','LessEqual','has','number','140454UZWZFe','month','3701890LjkfNC','day','261531GhBzHW','3902428fyVPuH','enum','4757905NJEruT','Min','Less','42kKVAcz','column','all','Sum','Contain','Composite','Regexp','87775iqZFLn','type','Last','\x27\x20requires\x20a\x20time\x20unit','\x27\x20requires\x20a\x20value','superRefine','Average','Behavior','custom','TimeRange','funnel_stage','48azduXa','batch','union','unit','Equal','TimeWithinPast','MISSING_TIME_UNIT','discriminatedUnion','2WivYJz','value','addIssue','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','1119524PYhxUr','EndWith','min','object','And','operator','second','segment','Column','realtime','hour','GreaterEqual','optional','MISSING_BETWEEN_BOUNDS','from','CountDistinct','TimeWithinNext','year','timestamp','Between','record','literal','minute','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','string','StartWith','Operator\x20\x27','Count','Max','55IheyiL','exclude','First','lazy','boolean','Segment\x20reference\x20must\x20not\x20be\x20empty','array','include'];a181_0x34c6=function(){return _0x42fe20;};return a181_0x34c6();}export const ArrayMatchingSchema=z[a181_0x45b3b0(0x1d4)]([z[a181_0x45b3b0(0x1f3)]('any'),z[a181_0x45b3b0(0x1f3)](a181_0x45b3b0(0x214)),z[a181_0x45b3b0(0x1e1)]({'atLeast':z[a181_0x45b3b0(0x207)]()}),z[a181_0x45b3b0(0x1e1)]({'atMost':z[a181_0x45b3b0(0x207)]()}),z[a181_0x45b3b0(0x1e1)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a181_0x45b3b0(0x1d9)](a181_0x45b3b0(0x21a),[z['object']({'type':z['enum']([a181_0x45b3b0(0x215),a181_0x45b3b0(0x210),'Max','Average']),'column':z[a181_0x45b3b0(0x1f6)](),'groupingColumns':z[a181_0x45b3b0(0x201)](z[a181_0x45b3b0(0x1f6)]())[a181_0x45b3b0(0x1ea)]()}),z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x1f3)](a181_0x45b3b0(0x1f9)),'groupingColumns':z[a181_0x45b3b0(0x201)](z[a181_0x45b3b0(0x1f6)]())[a181_0x45b3b0(0x1ea)]()}),z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x1f3)](a181_0x45b3b0(0x1ed)),'columns':z[a181_0x45b3b0(0x201)](z[a181_0x45b3b0(0x1f6)]())}),z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1fd),a181_0x45b3b0(0x21b)]),'column':z[a181_0x45b3b0(0x1f6)](),'orderColumn':z['string'](),'groupingColumns':z[a181_0x45b3b0(0x201)](z[a181_0x45b3b0(0x1f6)]())['optional']()})]);export const TimeWindowDefSchema=z[a181_0x45b3b0(0x1e1)]({'duration':z[a181_0x45b3b0(0x207)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a181_0x45b3b0(0x1d7),a181_0x45b3b0(0x1ee),'TimeRange']);export const FilterColumnConditionDefSchema=z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x1f3)](a181_0x45b3b0(0x1e6)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x45b3b0(0x1ea)]()})[a181_0x45b3b0(0x21e)]((_0x3f61fb,_0x3a5e5a)=>{const _0x3076d9=a181_0x45b3b0,_0x562ab1=_0x3f61fb[_0x3076d9(0x1e3)]['type'];_0x3f61fb[_0x3076d9(0x213)]===_0x3076d9(0x1f0)?!TIMESTAMP_OPERATORS['has'](_0x562ab1)&&_0x3a5e5a[_0x3076d9(0x1dc)]({'code':'custom','message':_0x3076d9(0x1f5)+_0x562ab1+'\x27)','path':[_0x3076d9(0x1e3),_0x3076d9(0x21a)]}):TIMESTAMP_OPERATORS[_0x3076d9(0x206)](_0x562ab1)&&_0x3a5e5a['addIssue']({'code':_0x3076d9(0x221),'message':'Operator\x20\x27'+_0x562ab1+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x3076d9(0x1e3),_0x3076d9(0x21a)]});});export const FilterRuleDefSchema=z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x1f3)]('And'),'conditions':z[a181_0x45b3b0(0x201)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a181_0x45b3b0(0x1fe)](()=>z[a181_0x45b3b0(0x1e1)]({'type':z['literal']('Value'),'attribute':z[a181_0x45b3b0(0x1f6)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x45b3b0(0x1ea)](),'exclude':z[a181_0x45b3b0(0x1ff)]()[a181_0x45b3b0(0x1ea)](),'aggregation':AggregationDefSchema[a181_0x45b3b0(0x1ea)](),'source':z['string']()[a181_0x45b3b0(0x1ea)](),'filter':FilterRuleDefSchema[a181_0x45b3b0(0x1ea)](),'limit':z['number']()[a181_0x45b3b0(0x1ea)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a181_0x45b3b0(0x220)),'attribute':z[a181_0x45b3b0(0x1f6)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a181_0x45b3b0(0x1ff)]()['optional'](),'aggregation':AggregationDefSchema[a181_0x45b3b0(0x1ea)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a181_0x45b3b0(0x1ea)](),'timeWindow':TimeWindowDefSchema[a181_0x45b3b0(0x1ea)](),'limit':z[a181_0x45b3b0(0x207)]()[a181_0x45b3b0(0x1ea)]()}));export const ColumnConditionDefSchema=z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x1f3)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a181_0x45b3b0(0x1fe)](()=>z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1e2),'Or',a181_0x45b3b0(0x217)]),'conditions':z[a181_0x45b3b0(0x201)](ConditionDefSchema),'description':z[a181_0x45b3b0(0x1f6)]()[a181_0x45b3b0(0x1ea)](),'expr':z[a181_0x45b3b0(0x1f6)]()[a181_0x45b3b0(0x1ea)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a181_0x45b3b0(0x202),a181_0x45b3b0(0x1fc)]),'segment':z[a181_0x45b3b0(0x1f6)]()['min'](0x1,a181_0x45b3b0(0x200))});function a181_0x5709(_0x58bfeb,_0x5f1ddb){_0x58bfeb=_0x58bfeb-0x1d3;const _0x34c6cd=a181_0x34c6();let _0x570963=_0x34c6cd[_0x58bfeb];return _0x570963;}export const ConditionDefSchema=z[a181_0x45b3b0(0x1fe)](()=>z[a181_0x45b3b0(0x1d4)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a181_0x45b3b0(0x1fe)](()=>z[a181_0x45b3b0(0x1e1)]({'type':z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1e2),'Or',a181_0x45b3b0(0x217)]),'conditions':z[a181_0x45b3b0(0x201)](ConditionDefSchema),'description':z[a181_0x45b3b0(0x1f6)]()[a181_0x45b3b0(0x1ea)](),'expr':z[a181_0x45b3b0(0x1f6)]()[a181_0x45b3b0(0x1ea)]()}));export const SegmentDefSchema=z[a181_0x45b3b0(0x1e1)]({'type':z['literal'](a181_0x45b3b0(0x1e5))[a181_0x45b3b0(0x1ea)](),'name':z['string']()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a181_0x45b3b0(0x1f6)]()['optional'](),'folder':z['string']()['optional'](),'rule':RuleDefSchema[a181_0x45b3b0(0x1ea)](),'kind':z[a181_0x45b3b0(0x20e)]([a181_0x45b3b0(0x1d3),a181_0x45b3b0(0x1e7),a181_0x45b3b0(0x223)])[a181_0x45b3b0(0x1ea)](),'visible':z[a181_0x45b3b0(0x1ff)]()['optional'](),'activations':z[a181_0x45b3b0(0x201)](ActivationDefSchema)[a181_0x45b3b0(0x1ea)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x241e(_0x269444,_0x533910){_0x269444=_0x269444-0x17b;const _0x56544c=a182_0x5654();let _0x241e8b=_0x56544c[_0x269444];return _0x241e8b;}const a182_0x5b579b=a182_0x241e;(function(_0x4336a1,_0x4ac275){const _0x3fe3ec=a182_0x241e,_0x47571e=_0x4336a1();while(!![]){try{const _0x289ee0=parseInt(_0x3fe3ec(0x17e))/0x1*(parseInt(_0x3fe3ec(0x199))/0x2)+-parseInt(_0x3fe3ec(0x183))/0x3*(-parseInt(_0x3fe3ec(0x190))/0x4)+-parseInt(_0x3fe3ec(0x17d))/0x5*(parseInt(_0x3fe3ec(0x19d))/0x6)+-parseInt(_0x3fe3ec(0x189))/0x7*(-parseInt(_0x3fe3ec(0x191))/0x8)+-parseInt(_0x3fe3ec(0x195))/0x9+parseInt(_0x3fe3ec(0x18e))/0xa*(parseInt(_0x3fe3ec(0x185))/0xb)+-parseInt(_0x3fe3ec(0x18d))/0xc;if(_0x289ee0===_0x4ac275)break;else _0x47571e['push'](_0x47571e['shift']());}catch(_0x3b2356){_0x47571e['push'](_0x47571e['shift']());}}}(a182_0x5654,0x9396b));import{readFileSync}from'fs';import*as a182_0x5c2aaa from'path';import*as a182_0x4b0b1a from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';function a182_0x5654(){const _0x1d7da1=['toJSON','YAML\x20parse\x20error:\x20','basename','12762dhdOsU','journey','1353uDsHYz','segment','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','message','63bDFzkp','map','always_on_campaign','valid','9272148wliZJv','12280mDjbQO','object','1036SdBoYY','648888fHmonB','campaign','parseDocument','filterType','8614593zFuUXI','has','push','email','21310kMgBzm','template','skipped','not\x20a\x20','330IwddkT','warnings','campaign_type','type','29065UDQumS','63rKLZVR','result'];a182_0x5654=function(){return _0x1d7da1;};return a182_0x5654();}import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set([a182_0x5b579b(0x198),a182_0x5b579b(0x197)]);export{isJourneyDef};export function isCampaignDef(_0x1150e0){const _0x15f461=a182_0x5b579b;if(typeof _0x1150e0!=='object'||_0x1150e0===null)return![];const _0x530f7e=_0x1150e0,_0x4fbc73=VALID_CAMPAIGN_TYPES[_0x15f461(0x196)](_0x530f7e[_0x15f461(0x17b)]);if(_0x530f7e[_0x15f461(0x17c)]===_0x15f461(0x192)&&_0x4fbc73)return!![];if(_0x4fbc73&&!_0x530f7e[_0x15f461(0x17c)])return!![];return![];}export function isTemplateDef(_0x448825){const _0x13a202=a182_0x5b579b;return typeof _0x448825==='object'&&_0x448825!==null&&_0x13a202(0x17c)in _0x448825&&_0x448825[_0x13a202(0x17c)]===_0x13a202(0x19a);}export function isAlwaysOnCampaignDef(_0x169bfe){const _0x483bec=a182_0x5b579b;return typeof _0x169bfe===_0x483bec(0x18f)&&_0x169bfe!==null&&_0x483bec(0x17c)in _0x169bfe&&_0x169bfe[_0x483bec(0x17c)]===_0x483bec(0x18b);}export function isValidationResult(_0x1c1328){const _0x357976=a182_0x5b579b;return!(_0x357976(0x19b)in _0x1c1328);}export function createParseErrorResult(_0x13de20,_0x5ddf95,_0x3e66a4,_0x444700,_0x4c54de=a182_0x5b579b(0x186)){return{'filePath':_0x13de20,'relativePath':_0x5ddf95,'source':_0x3e66a4,'result':{'valid':![],'errors':[{'level':'error','path':'','code':'YAML_PARSE_ERROR','message':_0x444700}],'warnings':[]},'fileType':_0x4c54de};}export function validateYamlFile(_0x15c5a3,_0x4fb8dc,_0x2fde9c={}){const _0x5ede1c=a182_0x5b579b,_0x509d41=a182_0x5c2aaa['relative'](_0x4fb8dc,_0x15c5a3)||a182_0x5c2aaa[_0x5ede1c(0x182)](_0x15c5a3);try{const _0x2c1d11=readFileSync(_0x15c5a3,'utf-8'),_0x260939=a182_0x4b0b1a[_0x5ede1c(0x193)](_0x2c1d11),_0x956782=_0x260939[_0x5ede1c(0x180)]();if(!_0x956782)return createParseErrorResult(_0x15c5a3,_0x509d41,_0x2c1d11,_0x5ede1c(0x187));let _0x26e479;if(isJourneyDef(_0x956782,_0x15c5a3))_0x26e479=_0x5ede1c(0x184);else{if(isCampaignDef(_0x956782))_0x26e479=_0x5ede1c(0x192);else{if(isAlwaysOnCampaignDef(_0x956782))_0x26e479=_0x5ede1c(0x18b);else isTemplateDef(_0x956782)?_0x26e479=_0x5ede1c(0x19a):_0x26e479=_0x5ede1c(0x186);}}if(_0x2fde9c['filterType']&&_0x26e479!==_0x2fde9c[_0x5ede1c(0x194)])return{'filePath':_0x15c5a3,'relativePath':_0x509d41,'skipped':!![],'reason':_0x5ede1c(0x19c)+_0x2fde9c['filterType']};const _0x4cd000={'source':_0x2c1d11,'document':_0x260939};let _0x4c30b8;if(_0x26e479===_0x5ede1c(0x184))_0x4c30b8=validateJourneyDef(_0x956782,_0x4cd000);else{if(_0x26e479==='campaign')_0x4c30b8=validateCampaignDef(_0x956782,_0x4cd000);else{if(_0x26e479===_0x5ede1c(0x18b))_0x4c30b8=validateAlwaysOnCampaignDef(_0x956782,_0x4cd000);else _0x26e479===_0x5ede1c(0x19a)?_0x4c30b8=validateTemplateDef(_0x956782,_0x4cd000):_0x4c30b8=validateSegmentDef(_0x956782,_0x4cd000);}}return{'filePath':_0x15c5a3,'relativePath':_0x509d41,'source':_0x2c1d11,'result':_0x4c30b8,'fileType':_0x26e479};}catch(_0x4cfa07){const _0x3b8318=_0x4cfa07 instanceof Error?_0x4cfa07[_0x5ede1c(0x188)]:String(_0x4cfa07);return createParseErrorResult(_0x15c5a3,_0x509d41,'',_0x5ede1c(0x181)+_0x3b8318);}}export function validateYamlFiles(_0x1ff53b,_0x5ea1d6,_0x20f0c0={}){const _0x5640d9=a182_0x5b579b;return _0x1ff53b[_0x5640d9(0x18a)](_0x5d4e75=>validateYamlFile(_0x5d4e75,_0x5ea1d6,_0x20f0c0));}export function calculateSummary(_0x59bd41){const _0x2c7e13=a182_0x5b579b;let _0x2e83ed=0x0,_0x4ce808=0x0,_0x114693=0x0,_0x39617d=0x0;for(const _0x41fa0a of _0x59bd41){if(!isValidationResult(_0x41fa0a)){_0x39617d++;continue;}_0x41fa0a[_0x2c7e13(0x17f)][_0x2c7e13(0x18c)]?_0x2e83ed++:_0x4ce808++,_0x114693+=_0x41fa0a[_0x2c7e13(0x17f)][_0x2c7e13(0x19e)]['length'];}return{'validCount':_0x2e83ed,'invalidCount':_0x4ce808,'warningCount':_0x114693,'skippedCount':_0x39617d,'hasErrors':_0x4ce808>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a183_0x319e(){const _0x1c6b42=['location','min','safeParse','level','yellow','1812148lZOwkD','1802709ReqjwL','32502jrxsDd','YAML\x20validation\x20error\x20at\x20\x27','26521eSwleg','match','line','path','red','53155nAgGfp','4098240zscZCv','errors','pop','225304eeiPFm','cyan','number','warnings','error','150IzrcLz','YAML\x20validation\x20error:\x20','push','length','join','message','range','success','padStart','dim','3AdWyFJ','Invalid\x20YAML:\x20expected\x20an\x20object','35VHBXcX','\x20|\x20','invalid_union','5364OIjyBq','split','flatMap','data','code','object','59TIbsGh'];a183_0x319e=function(){return _0x1c6b42;};return a183_0x319e();}(function(_0x50abd1,_0x5e48b4){const _0x302220=a183_0x4ca7,_0x41b4e7=_0x50abd1();while(!![]){try{const _0x6f3bf7=parseInt(_0x302220(0xcf))/0x1*(-parseInt(_0x302220(0xd7))/0x2)+parseInt(_0x302220(0xc4))/0x3*(parseInt(_0x302220(0xd5))/0x4)+parseInt(_0x302220(0xde))/0x5*(parseInt(_0x302220(0xe7))/0x6)+-parseInt(_0x302220(0xc6))/0x7*(parseInt(_0x302220(0xe2))/0x8)+parseInt(_0x302220(0xd6))/0x9+-parseInt(_0x302220(0xdf))/0xa+-parseInt(_0x302220(0xd9))/0xb*(-parseInt(_0x302220(0xc9))/0xc);if(_0x6f3bf7===_0x5e48b4)break;else _0x41b4e7['push'](_0x41b4e7['shift']());}catch(_0x28d8cf){_0x41b4e7['push'](_0x41b4e7['shift']());}}}(a183_0x319e,0x76fd6));import*as a183_0x16ffbe from'yaml';import a183_0x1f52cb from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x236add,_0x5c7db5,_0x5abc79){const _0x1a9e34=a183_0x4ca7;if(!_0x236add||!_0x5c7db5)return undefined;try{let _0x1fda19=_0x236add['getIn'](_0x5abc79,!![]),_0x4ce9b8=[..._0x5abc79];while((!_0x1fda19||typeof _0x1fda19!==_0x1a9e34(0xce)||!('range'in _0x1fda19)||!_0x1fda19[_0x1a9e34(0xc0)])&&_0x4ce9b8['length']>0x0){_0x4ce9b8[_0x1a9e34(0xe1)](),_0x1fda19=_0x4ce9b8[_0x1a9e34(0xbd)]>0x0?_0x236add['getIn'](_0x4ce9b8,!![]):_0x236add['contents'];}if(!_0x1fda19||typeof _0x1fda19!=='object'||!(_0x1a9e34(0xc0)in _0x1fda19)||!_0x1fda19[_0x1a9e34(0xc0)])return undefined;const [_0x329a0e]=_0x1fda19[_0x1a9e34(0xc0)];return offsetToLocation(_0x5c7db5,_0x329a0e);}catch{return undefined;}}export function offsetToLocation(_0x971d6a,_0x5279fe){const _0x1936b5=a183_0x4ca7;let _0x203eb9=0x1,_0x26665d=0x1;for(let _0x94bc1=0x0;_0x94bc1<_0x5279fe&&_0x94bc1<_0x971d6a[_0x1936b5(0xbd)];_0x94bc1++){_0x971d6a[_0x94bc1]==='\x0a'?(_0x203eb9++,_0x26665d=0x1):_0x26665d++;}return{'line':_0x203eb9,'column':_0x26665d,'offset':_0x5279fe};}export function pathToArray(_0x33cf53){const _0x1bead3=a183_0x4ca7;if(!_0x33cf53)return[];return _0x33cf53['split']('.')[_0x1bead3(0xcb)](_0x393cfb=>{const _0xab0fff=_0x1bead3,_0xab67be=_0x393cfb[_0xab0fff(0xda)](/^(\w+)\[(\d+)\]$/);if(_0xab67be)return[_0xab67be[0x1],parseInt(_0xab67be[0x2],0xa)];return[_0x393cfb];});}export function formatZodPath(_0x39c69b){const _0x5e273f=a183_0x4ca7;let _0x5320bd='';for(const _0x20003e of _0x39c69b){if(typeof _0x20003e===_0x5e273f(0xe4))_0x5320bd+='['+_0x20003e+']';else{const _0x565466=String(_0x20003e);_0x5320bd+=_0x5320bd?'.'+_0x565466:_0x565466;}}return _0x5320bd;}function a183_0x4ca7(_0x25772f,_0x490c15){_0x25772f=_0x25772f-0xbb;const _0x319e45=a183_0x319e();let _0x4ca78f=_0x319e45[_0x25772f];return _0x4ca78f;}export function flattenZodIssues(_0x4b7e9f){const _0x4dfad5=a183_0x4ca7,_0x26d1de=[];for(const _0xc119e7 of _0x4b7e9f){if(_0xc119e7[_0x4dfad5(0xcd)]===_0x4dfad5(0xc8)&&_0x4dfad5(0xe0)in _0xc119e7){const _0x292e87=_0xc119e7[_0x4dfad5(0xe0)];let _0x2ae4a9=_0x292e87[0x0]||[];for(const _0x5765b2 of _0x292e87){_0x5765b2[_0x4dfad5(0xbd)]<_0x2ae4a9[_0x4dfad5(0xbd)]&&(_0x2ae4a9=_0x5765b2);}const _0x3b8084=_0x2ae4a9['map'](_0x2f8726=>({..._0x2f8726,'path':[..._0xc119e7[_0x4dfad5(0xdc)],..._0x2f8726[_0x4dfad5(0xdc)]]}));_0x26d1de[_0x4dfad5(0xbc)](...flattenZodIssues(_0x3b8084));}else _0x26d1de['push'](_0xc119e7);}return _0x26d1de;}export function safeParseYaml(_0x5b84c3,_0x2a8b35){const _0x1a5d5c=a183_0x4ca7,_0x2db5d2=a183_0x16ffbe['parse'](_0x5b84c3);if(!_0x2db5d2||typeof _0x2db5d2!==_0x1a5d5c(0xce))throw new Error(_0x1a5d5c(0xc5));const _0x33c072=_0x2a8b35[_0x1a5d5c(0xd2)](_0x2db5d2);if(!_0x33c072[_0x1a5d5c(0xc1)]){const _0x24e8ac=_0x33c072[_0x1a5d5c(0xe6)]['issues'][0x0],_0x4e14e9=formatZodPath(_0x24e8ac[_0x1a5d5c(0xdc)]);throw new Error(_0x4e14e9?_0x1a5d5c(0xd8)+_0x4e14e9+'\x27:\x20'+_0x24e8ac[_0x1a5d5c(0xbf)]:_0x1a5d5c(0xbb)+_0x24e8ac['message']);}return _0x33c072[_0x1a5d5c(0xcc)];}export function formatIssueWithContext(_0x52a0ac,_0x963ad4,_0x4ed3cd){const _0x300613=a183_0x4ca7,_0x101b17=[],_0x893466=_0x52a0ac[_0x300613(0xd3)]===_0x300613(0xe6),_0xcf09bc=_0x893466?a183_0x1f52cb[_0x300613(0xdd)]:a183_0x1f52cb[_0x300613(0xd4)],_0xfae011=_0x893466?a183_0x1f52cb[_0x300613(0xdd)]:a183_0x1f52cb[_0x300613(0xd4)],_0xc1e08a=_0x4ed3cd?a183_0x1f52cb[_0x300613(0xe3)](_0x4ed3cd+':'):'';if(_0x52a0ac[_0x300613(0xd0)]){const _0x4d7574=a183_0x1f52cb[_0x300613(0xe3)](_0x52a0ac[_0x300613(0xd0)][_0x300613(0xdb)]+':'+_0x52a0ac[_0x300613(0xd0)]['column']);_0x101b17[_0x300613(0xbc)](''+_0xc1e08a+_0x4d7574+':\x20'+_0xcf09bc(_0x52a0ac[_0x300613(0xd3)])+'\x20'+_0xfae011('['+_0x52a0ac['code']+']'));}else _0x101b17['push'](''+_0xc1e08a+a183_0x1f52cb['dim'](_0x52a0ac['path'])+':\x20'+_0xcf09bc(_0x52a0ac[_0x300613(0xd3)])+'\x20'+_0xfae011('['+_0x52a0ac[_0x300613(0xcd)]+']'));_0x101b17[_0x300613(0xbc)](_0x52a0ac[_0x300613(0xbf)]);if(_0x52a0ac[_0x300613(0xd0)]&&_0x963ad4){const _0x619c28=_0x963ad4[_0x300613(0xca)]('\x0a'),{line:_0x163768,column:_0x557f80}=_0x52a0ac[_0x300613(0xd0)],_0x471754=Math['max'](0x1,_0x163768-0x1),_0x4e3eef=Math[_0x300613(0xd1)](_0x619c28[_0x300613(0xbd)],_0x163768+0x1);_0x101b17[_0x300613(0xbc)]('');for(let _0x266179=_0x471754;_0x266179<=_0x4e3eef;_0x266179++){const _0x55ff80=_0x619c28[_0x266179-0x1]||'',_0x13d71b=a183_0x1f52cb[_0x300613(0xc3)](_0x266179['toString']()[_0x300613(0xc2)](0x4)),_0xb1455c=a183_0x1f52cb['dim'](_0x300613(0xc7));if(_0x266179===_0x163768){_0x101b17[_0x300613(0xbc)]('\x20\x20'+_0x13d71b+_0xb1455c+_0xcf09bc(_0x55ff80));const _0x461620='\x20'['repeat'](0x4+0x3+_0x557f80-0x1);_0x101b17[_0x300613(0xbc)]('\x20\x20'+_0x461620+_0xcf09bc('^'));}else _0x101b17[_0x300613(0xbc)]('\x20\x20'+_0x13d71b+_0xb1455c+a183_0x1f52cb[_0x300613(0xc3)](_0x55ff80));}}return _0x101b17[_0x300613(0xbe)]('\x0a');}export function formatValidationResult(_0x4d4ec1,_0x60832a,_0x4e788e){const _0x1e7b52=a183_0x4ca7,_0x2a9411=[];for(const _0xbb9769 of _0x4d4ec1['errors']){_0x2a9411['push'](formatIssueWithContext(_0xbb9769,_0x60832a,_0x4e788e)),_0x2a9411['push']('');}for(const _0x485c92 of _0x4d4ec1[_0x1e7b52(0xe5)]){_0x2a9411['push'](formatIssueWithContext(_0x485c92,_0x60832a,_0x4e788e)),_0x2a9411[_0x1e7b52(0xbc)]('');}return _0x2a9411[_0x1e7b52(0xbe)]('\x0a');}
|