@treasuredata/tdx 2026.3.48 → 2026.3.49
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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.d.ts +22 -0
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.d.ts +5 -5
- package/dist/commands/profile-command.d.ts.map +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +12 -8
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.d.ts.map +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/mcp/utils.js.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +8 -0
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +29 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +4 -1
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +8 -15
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.d.ts +3 -13
- package/dist/sdk/workspace/weekly.d.ts.map +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/weekly.js.map +1 -1
- package/dist/sdk/workspace/wikilinks.d.ts +15 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
- package/dist/commands/auth-login-command.d.ts +0 -29
- package/dist/commands/auth-login-command.d.ts.map +0 -1
- package/dist/commands/auth-login-command.js +0 -1
- package/dist/commands/auth-login-command.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31687f,_0x3a473f){const _0x5d7681=a156_0x4778,_0x2550a4=_0x31687f();while(!![]){try{const _0x2ec4df=parseInt(_0x5d7681(0x141))/0x1*(parseInt(_0x5d7681(0x136))/0x2)+parseInt(_0x5d7681(0x15e))/0x3+-parseInt(_0x5d7681(0x13c))/0x4+parseInt(_0x5d7681(0x14e))/0x5+-parseInt(_0x5d7681(0x149))/0x6+-parseInt(_0x5d7681(0x133))/0x7*(-parseInt(_0x5d7681(0x161))/0x8)+-parseInt(_0x5d7681(0x155))/0x9*(parseInt(_0x5d7681(0x15b))/0xa);if(_0x2ec4df===_0x3a473f)break;else _0x2550a4['push'](_0x2550a4['shift']());}catch(_0x2cbdf2){_0x2550a4['push'](_0x2550a4['shift']());}}}(a156_0x10bf,0x8232f));import a156_0x2151aa from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a156_0x4778(_0xe47364,_0x4524bd){_0xe47364=_0xe47364-0x133;const _0x10bfb3=a156_0x10bf();let _0x477871=_0x10bfb3[_0xe47364];return _0x477871;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x6b8b17){const _0xc64a68=a156_0x4778;return _0x6b8b17[_0xc64a68(0x15c)]!==_0xc64a68(0x14d);}export function isScopedResolution(_0x33b07d){const _0xf730fe=a156_0x4778;return _0x33b07d[_0xf730fe(0x15c)]===_0xf730fe(0x13e)||_0x33b07d[_0xf730fe(0x15c)]==='file'||_0x33b07d['type']==='context';}export function getScopedDetails(_0x40c17d){const _0x48864e=a156_0x4778;if(isScopedResolution(_0x40c17d))return{'isScoped':_0x40c17d[_0x48864e(0x14a)],'scopedFolderPath':_0x40c17d[_0x48864e(0x162)]};return undefined;}async function findTdxConfigAsync(_0xfdf1d5,_0x277d3a){const _0x18d2b6=a156_0x4778;let _0x5f6590=a156_0x2151aa[_0x18d2b6(0x151)](_0xfdf1d5);const _0x45467d=a156_0x2151aa[_0x18d2b6(0x145)](_0x5f6590)['root'];while(_0x5f6590!==_0x45467d){const _0x78efd0=a156_0x2151aa[_0x18d2b6(0x153)](_0x5f6590,_0x18d2b6(0x14b));if(await _0x277d3a[_0x18d2b6(0x163)](_0x78efd0))try{const _0x2d7a29=await _0x277d3a[_0x18d2b6(0x152)](_0x78efd0),_0x14a741=JSON[_0x18d2b6(0x145)](_0x2d7a29);if(_0x14a741[_0x18d2b6(0x13b)]&&typeof _0x14a741[_0x18d2b6(0x13b)]===_0x18d2b6(0x167))return{'configPath':_0x78efd0,'configDir':_0x5f6590,'parentSegment':_0x14a741[_0x18d2b6(0x13b)]};}catch{}_0x5f6590=a156_0x2151aa[_0x18d2b6(0x137)](_0x5f6590);}return null;}function calculateScopedPath(_0x1703f3,_0x33d650){const _0x189d4a=a156_0x4778,_0x53b8ef=a156_0x2151aa[_0x189d4a(0x134)](_0x33d650,_0x1703f3),_0x570246=_0x53b8ef!==''&&_0x53b8ef!=='.'&&!_0x53b8ef[_0x189d4a(0x165)]('..');return{'isScoped':_0x570246,'scopedFolderPath':_0x570246?_0x53b8ef[_0x189d4a(0x135)](/\\/g,'/'):''};}export async function resolveTarget(_0x45e0ad){const _0x5561f9=a156_0x4778,{arg:_0x46145e,contextParent:_0x5c0e5d,cwd:cwd=process[_0x5561f9(0x166)](),fs:fs=nodeFileSystem}=_0x45e0ad;if(_0x46145e&&isYamlFilePath(_0x46145e))try{const _0x5b1e45=await resolveYamlFilePath(_0x46145e,fs),_0x438da8=a156_0x2151aa[_0x5561f9(0x151)](_0x46145e),_0x41b4be=a156_0x2151aa[_0x5561f9(0x137)](_0x438da8),_0xd47013=await findTdxConfigAsync(_0x41b4be,fs);if(!_0xd47013){if(_0x5c0e5d){const _0x5ab17d=a156_0x2151aa[_0x5561f9(0x137)](_0x438da8);return{'type':_0x5561f9(0x154),'parentName':_0x5c0e5d,'targetDir':_0x5ab17d,'configRoot':_0x5ab17d,'filePath':_0x438da8,'resourceName':_0x5b1e45[_0x5561f9(0x13a)],'folderPath':_0x5b1e45['folderPath'],'resourceType':_0x5b1e45[_0x5561f9(0x15f)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5561f9(0x14d),'errorCode':_0x5561f9(0x15a),'message':_0x5561f9(0x14f)+_0x46145e,'arg':_0x46145e,'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 _0x557484=calculateScopedPath(_0x41b4be,_0xd47013['configDir']);return{'type':_0x5561f9(0x154),'parentName':_0xd47013[_0x5561f9(0x157)],'targetDir':_0xd47013[_0x5561f9(0x15d)],'configRoot':_0xd47013[_0x5561f9(0x15d)],'filePath':_0x438da8,'resourceName':_0x5b1e45[_0x5561f9(0x13a)],'folderPath':_0x5b1e45[_0x5561f9(0x13d)],'resourceType':_0x5b1e45[_0x5561f9(0x15f)],'isScoped':_0x557484['isScoped'],'scopedFolderPath':_0x557484[_0x5561f9(0x162)]};}catch(_0x570aa8){const _0x29ef22=_0x570aa8 instanceof Error?_0x570aa8[_0x5561f9(0x140)]:String(_0x570aa8);if(_0x29ef22[_0x5561f9(0x150)](_0x5561f9(0x156)))return{'type':_0x5561f9(0x14d),'errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x46145e,'arg':_0x46145e};if(_0x29ef22[_0x5561f9(0x150)](_0x5561f9(0x143))){if(_0x5c0e5d){const _0x4bf636=a156_0x2151aa[_0x5561f9(0x151)](_0x46145e);if(await fs[_0x5561f9(0x163)](_0x4bf636)){const _0x2f8f85=a156_0x2151aa[_0x5561f9(0x137)](_0x4bf636),_0x3283b8=await fs[_0x5561f9(0x152)](_0x4bf636),_0x1444ed=_0x3283b8['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x44970a=_0x3283b8[_0x5561f9(0x160)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x446971=_0x1444ed?_0x1444ed[0x1][_0x5561f9(0x142)]():a156_0x2151aa[_0x5561f9(0x164)](_0x46145e,a156_0x2151aa[_0x5561f9(0x14c)](_0x46145e)),_0x1f90d0=_0x44970a&&_0x44970a[0x1][_0x5561f9(0x142)]()===_0x5561f9(0x13f)?_0x5561f9(0x13f):'segment';return{'type':_0x5561f9(0x154),'parentName':_0x5c0e5d,'targetDir':_0x2f8f85,'configRoot':_0x2f8f85,'filePath':_0x4bf636,'resourceName':_0x446971,'folderPath':'','resourceType':_0x1f90d0,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5561f9(0x14d),'errorCode':_0x5561f9(0x15a),'message':_0x5561f9(0x14f)+_0x46145e,'arg':_0x46145e,'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':_0x5561f9(0x14d),'errorCode':_0x5561f9(0x144),'message':_0x29ef22,'arg':_0x46145e};}if(_0x46145e){const _0x5a64fc=a156_0x2151aa[_0x5561f9(0x151)](cwd,_0x46145e);let _0x2b0337=null;try{_0x2b0337=await fs['stat'](_0x5a64fc);}catch{}if(_0x2b0337?.[_0x5561f9(0x159)]()){const _0x36a95f=await findTdxConfigAsync(_0x5a64fc,fs);if(_0x36a95f){const _0x4d6e68=calculateScopedPath(_0x5a64fc,_0x36a95f['configDir']);return{'type':_0x5561f9(0x13e),'parentName':_0x36a95f[_0x5561f9(0x157)],'targetDir':_0x5a64fc,'configRoot':_0x36a95f[_0x5561f9(0x15d)],'isScoped':_0x4d6e68[_0x5561f9(0x14a)],'scopedFolderPath':_0x4d6e68[_0x5561f9(0x162)]};}if(_0x5c0e5d)return{'type':_0x5561f9(0x13e),'parentName':_0x5c0e5d,'targetDir':_0x5a64fc,'configRoot':_0x5a64fc,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x5561f9(0x15a),'message':_0x5561f9(0x147)+_0x46145e,'arg':_0x46145e,'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'};}if(_0x2b0337?.[_0x5561f9(0x139)]())return{'type':'error','errorCode':'invalid_yaml','message':'Not\x20a\x20YAML\x20file:\x20'+_0x46145e,'arg':_0x46145e,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4613bd=sanitizeFileName(_0x46145e),_0x4ac5cc=getSegmentRootDir(_0x4613bd,cwd);return{'type':_0x5561f9(0x146),'parentName':_0x46145e,'targetDir':_0x4ac5cc,'configRoot':_0x4ac5cc};}const _0x2828f3=await findTdxConfigAsync(cwd,fs);if(_0x2828f3){const _0x2054b2=calculateScopedPath(cwd,_0x2828f3[_0x5561f9(0x15d)]);return{'type':_0x5561f9(0x158),'parentName':_0x2828f3[_0x5561f9(0x157)],'targetDir':cwd,'configRoot':_0x2828f3[_0x5561f9(0x15d)],'isScoped':_0x2054b2['isScoped'],'scopedFolderPath':_0x2054b2[_0x5561f9(0x162)]};}if(_0x5c0e5d){const _0x594e1a=sanitizeFileName(_0x5c0e5d),_0x47bd3a=getSegmentRootDir(_0x594e1a,cwd);return{'type':_0x5561f9(0x158),'parentName':_0x5c0e5d,'targetDir':_0x47bd3a,'configRoot':_0x47bd3a,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5561f9(0x14d),'errorCode':_0x5561f9(0x148),'message':_0x5561f9(0x138),'helpText':'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'};}function a156_0x10bf(){const _0x1ca252=['isFile','segmentName','parent_segment','1917544KTIDYT','folderPath','directory','journey','message','4GJEHcf','trim','No\x20tdx.json\x20found','invalid_yaml','parse','parent_name','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','no_parent','5999694Ftnank','isScoped','tdx.json','extname','error','4320160tFyuAQ','No\x20tdx.json\x20found\x20for\x20file:\x20','includes','resolve','readFile','join','file','61551ZxPoFX','File\x20not\x20found','parentSegment','context','isDirectory','no_config','140ICisxv','type','configDir','1416582uWGBPq','resourceType','match','1347448vnMDZn','scopedFolderPath','exists','basename','startsWith','cwd','string','14eTijRf','relative','replace','217644OzroZS','dirname','Parent\x20segment\x20not\x20specified'];a156_0x10bf=function(){return _0x1ca252;};return a156_0x10bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x76119c=a157_0x2928;function a157_0x43b5(){const _0xccd914=['parent_segment','cwd','Invalid\x20tdx.json:\x20expected\x20object','resolve','928647rtULTA','67250LBXhVm','2TrYhOj','parse','tdx.json','replace','957192Rrhlxe','16bAxOmN','stringify','engage_workspace','utf-8','segments','25365qIoocw','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','10JVAJPc','relative','1563996YuhcOM','startsWith','11BBbqnA','join','9531iHqfHj','66088JUSjzu','dirname','7xTSLkk'];a157_0x43b5=function(){return _0xccd914;};return a157_0x43b5();}(function(_0x202959,_0x2a4b97){const _0x334f63=a157_0x2928,_0x4333f8=_0x202959();while(!![]){try{const _0x1c3b31=-parseInt(_0x334f63(0x15c))/0x1*(-parseInt(_0x334f63(0x15d))/0x2)+parseInt(_0x334f63(0x153))/0x3*(-parseInt(_0x334f63(0x162))/0x4)+-parseInt(_0x334f63(0x167))/0x5+-parseInt(_0x334f63(0x161))/0x6*(parseInt(_0x334f63(0x156))/0x7)+-parseInt(_0x334f63(0x154))/0x8+parseInt(_0x334f63(0x15b))/0x9*(parseInt(_0x334f63(0x14d))/0xa)+parseInt(_0x334f63(0x151))/0xb*(parseInt(_0x334f63(0x14f))/0xc);if(_0x1c3b31===_0x2a4b97)break;else _0x4333f8['push'](_0x4333f8['shift']());}catch(_0x8bdb6b){_0x4333f8['push'](_0x4333f8['shift']());}}}(a157_0x43b5,0x1c1f8));import{existsSync,readFileSync}from'fs';import a157_0x507e16 from'path';const TDX_CONFIG_FILE=a157_0x76119c(0x15f),SEGMENTS_DIR=a157_0x76119c(0x166);export function findTdxConfigPath(_0x5db0b3=process[a157_0x76119c(0x158)]()){const _0x3da95d=a157_0x76119c;let _0x5b0527=a157_0x507e16[_0x3da95d(0x15a)](_0x5db0b3);const _0x14e181=a157_0x507e16[_0x3da95d(0x15e)](_0x5b0527)['root'];while(_0x5b0527!==_0x14e181){const _0x55feab=a157_0x507e16[_0x3da95d(0x152)](_0x5b0527,TDX_CONFIG_FILE);if(existsSync(_0x55feab))return _0x55feab;_0x5b0527=a157_0x507e16[_0x3da95d(0x155)](_0x5b0527);}return null;}function a157_0x2928(_0x296cb4,_0x41fa6a){_0x296cb4=_0x296cb4-0x14c;const _0x43b50f=a157_0x43b5();let _0x292807=_0x43b50f[_0x296cb4];return _0x292807;}export function loadTdxConfig(_0x4ff585){const _0x4d3c2b=a157_0x76119c,_0x1afc7b=readFileSync(_0x4ff585,_0x4d3c2b(0x165));let _0x3f50ae;try{_0x3f50ae=JSON[_0x4d3c2b(0x15e)](_0x1afc7b);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4ff585);}if(!_0x3f50ae||typeof _0x3f50ae!=='object')throw new Error(_0x4d3c2b(0x159));const _0x51eef8=_0x3f50ae,_0x19c8b6=_0x51eef8[_0x4d3c2b(0x157)]&&typeof _0x51eef8[_0x4d3c2b(0x157)]==='string',_0x136c11=_0x51eef8[_0x4d3c2b(0x164)]&&typeof _0x51eef8[_0x4d3c2b(0x164)]==='string';if(!_0x19c8b6&&!_0x136c11)throw new Error(_0x4d3c2b(0x14c));const _0x20c4ce={};return _0x19c8b6&&(_0x20c4ce[_0x4d3c2b(0x157)]=_0x51eef8[_0x4d3c2b(0x157)]),_0x136c11&&(_0x20c4ce['engage_workspace']=_0x51eef8['engage_workspace']),_0x20c4ce;}export function findTdxConfig(_0x149f96=process[a157_0x76119c(0x158)]()){const _0x5eb747=a157_0x76119c,_0x26cad5=findTdxConfigPath(_0x149f96);if(!_0x26cad5)throw new Error(_0x5eb747(0x168));const _0x37a00c=loadTdxConfig(_0x26cad5),_0x4e21d9=a157_0x507e16[_0x5eb747(0x155)](_0x26cad5);return{'config':_0x37a00c,'configPath':_0x26cad5,'configDir':_0x4e21d9};}export function tryFindTdxConfig(_0x5e1a82){try{return findTdxConfig(_0x5e1a82);}catch{return null;}}export function getSegmentRootDir(_0x37c747,_0x4597c7=process[a157_0x76119c(0x158)]()){return a157_0x507e16['join'](_0x4597c7,SEGMENTS_DIR,_0x37c747);}export function getTdxConfigPath(_0x3dd3ae,_0x1e0b22=process[a157_0x76119c(0x158)]()){const _0x5607fa=a157_0x76119c;return a157_0x507e16[_0x5607fa(0x152)](getSegmentRootDir(_0x3dd3ae,_0x1e0b22),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3c5582,_0x298bde){const _0x24f00a=a157_0x76119c,_0x5d4c64=a157_0x507e16['resolve'](_0x3c5582),_0x4e3373=a157_0x507e16[_0x24f00a(0x14e)](_0x298bde,_0x5d4c64);if(_0x4e3373[_0x24f00a(0x150)]('..'))return'';return _0x4e3373;}export function localPathToTdFolderPath(_0x393fad){const _0x51d988=a157_0x76119c,_0xaea16e=a157_0x507e16['dirname'](_0x393fad);if(_0xaea16e==='.'||_0xaea16e==='')return'';return _0xaea16e[_0x51d988(0x160)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x2ca781,_0x2f6ac0){const _0x3fdef7=a157_0x76119c;if(!_0x2ca781)return _0x2f6ac0;return a157_0x507e16[_0x3fdef7(0x152)](_0x2f6ac0,_0x2ca781);}export function createTdxConfigContent(_0x552a25){const _0x49ae9b={'parent_segment':_0x552a25};return JSON['stringify'](_0x49ae9b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x17e1f0){const _0x3aa20b=a157_0x76119c,_0x43fc98={'engage_workspace':_0x17e1f0};return JSON[_0x3aa20b(0x163)](_0x43fc98,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a158_0x3cd8(_0x426cdf,_0xa01d23){_0x426cdf=_0x426cdf-0x1ce;const _0x2f2d54=a158_0x2f2d();let _0x3cd88e=_0x2f2d54[_0x426cdf];return _0x3cd88e;}function a158_0x2f2d(){const _0x10ec7c=['weekly','object','8JCOikZ','string','28MQXbsf','2095833kokFjM','hourly','993444kXPzqW','1001550GKymqN','nullable','onSuccess','rows','minute','clear','month','desc','array','5292018XQKKaG','5473004lGXrkF','min','hour','minutes_interval','Activation\x20name\x20is\x20required','day','daily','Connection\x20name\x20is\x20required','cron','4498274uejISg','5kCohWX','2eRHxJR','enum','onFailure','boolean','All','412810jARkkb','optional','masked','number'];a158_0x2f2d=function(){return _0x10ec7c;};return a158_0x2f2d();}const a158_0x323b6a=a158_0x3cd8;(function(_0x48a4ed,_0x52cbce){const _0x39c262=a158_0x3cd8,_0x5a244b=_0x48a4ed();while(!![]){try{const _0x4f29ff=parseInt(_0x39c262(0x1d7))/0x1*(-parseInt(_0x39c262(0x1d2))/0x2)+-parseInt(_0x39c262(0x1e0))/0x3+parseInt(_0x39c262(0x1ed))/0x4*(parseInt(_0x39c262(0x1d1))/0x5)+-parseInt(_0x39c262(0x1e2))/0x6*(parseInt(_0x39c262(0x1df))/0x7)+-parseInt(_0x39c262(0x1dd))/0x8*(-parseInt(_0x39c262(0x1ec))/0x9)+parseInt(_0x39c262(0x1e3))/0xa+parseInt(_0x39c262(0x1d0))/0xb;if(_0x4f29ff===_0x52cbce)break;else _0x5a244b['push'](_0x5a244b['shift']());}catch(_0x381f82){_0x5a244b['push'](_0x5a244b['shift']());}}}(a158_0x2f2d,0xa8da9));import{z}from'zod';export const ScheduleTypeSchema=z[a158_0x323b6a(0x1d3)](['none',a158_0x323b6a(0x1e1),a158_0x323b6a(0x1f3),a158_0x323b6a(0x1db),'monthly',a158_0x323b6a(0x1cf),a158_0x323b6a(0x1f0)]);export const RepeatUnitSchema=z[a158_0x323b6a(0x1d3)]([a158_0x323b6a(0x1e7),a158_0x323b6a(0x1ef),a158_0x323b6a(0x1f2),'week',a158_0x323b6a(0x1e9),'once','none']);export const ScheduleDefSchema=z[a158_0x323b6a(0x1dc)]({'type':ScheduleTypeSchema[a158_0x323b6a(0x1d8)](),'repeat_unit':RepeatUnitSchema[a158_0x323b6a(0x1d8)](),'repeat_frequency':z['number']()[a158_0x323b6a(0x1d8)](),'repeat_sub_frequency':z['array'](z[a158_0x323b6a(0x1da)]())['optional'](),'start_at':z['string']()['nullable']()[a158_0x323b6a(0x1d8)](),'end_on':z[a158_0x323b6a(0x1de)]()['nullable']()[a158_0x323b6a(0x1d8)](),'timezone':z[a158_0x323b6a(0x1de)]()['optional']()});export const NotificationDefSchema=z[a158_0x323b6a(0x1dc)]({'notify_on':z[a158_0x323b6a(0x1eb)](z[a158_0x323b6a(0x1d3)]([a158_0x323b6a(0x1e5),a158_0x323b6a(0x1d4)]))['optional'](),'email_recipients':z[a158_0x323b6a(0x1eb)](z[a158_0x323b6a(0x1de)]())[a158_0x323b6a(0x1d8)]()});export const ActivationColumnDefSchema=z['union']([z[a158_0x323b6a(0x1de)](),z['object']({'name':z[a158_0x323b6a(0x1de)](),'type':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1d8)](),'visibility':z[a158_0x323b6a(0x1d3)](['clear',a158_0x323b6a(0x1d9)])['optional']()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z['array'](z[a158_0x323b6a(0x1dc)]({'name':z[a158_0x323b6a(0x1de)](),'type':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1d8)](),'visibility':z[a158_0x323b6a(0x1d3)]([a158_0x323b6a(0x1e8),'masked'])[a158_0x323b6a(0x1d8)]()}))[a158_0x323b6a(0x1d8)](),'behavior_table':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1d8)](),'join_row':z[a158_0x323b6a(0x1da)]()[a158_0x323b6a(0x1e4)]()[a158_0x323b6a(0x1d8)](),'join_strategy':z['enum']([a158_0x323b6a(0x1d6),'First','Last','Top-N'])[a158_0x323b6a(0x1d8)](),'formatting':z[a158_0x323b6a(0x1d3)]([a158_0x323b6a(0x1e6),'cols'])['optional'](),'order_by':z[a158_0x323b6a(0x1eb)](z[a158_0x323b6a(0x1dc)]({'key':z[a158_0x323b6a(0x1de)](),'order':z[a158_0x323b6a(0x1d3)](['asc',a158_0x323b6a(0x1ea)])}))[a158_0x323b6a(0x1d8)]()});export const ActivationDefSchema=z['object']({'name':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1ee)](0x1,a158_0x323b6a(0x1f1)),'description':z['string']()[a158_0x323b6a(0x1d8)](),'connection':z[a158_0x323b6a(0x1de)]()['min'](0x1,a158_0x323b6a(0x1ce)),'all_columns':z[a158_0x323b6a(0x1d5)]()['optional'](),'columns':z[a158_0x323b6a(0x1eb)](ActivationColumnDefSchema)[a158_0x323b6a(0x1d8)](),'schedule':ScheduleDefSchema[a158_0x323b6a(0x1d8)](),'notification':NotificationDefSchema['optional'](),'connector_config':z['record'](z[a158_0x323b6a(0x1de)](),z['unknown']())[a158_0x323b6a(0x1d8)](),'activation_template_id':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1e4)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a158_0x323b6a(0x1e4)]()[a158_0x323b6a(0x1d8)](),'run_after_journey_refresh':z[a158_0x323b6a(0x1d5)]()[a158_0x323b6a(0x1d8)](),'nested_workflow_project_name':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1d8)](),'nested_workflow_name':z[a158_0x323b6a(0x1de)]()[a158_0x323b6a(0x1d8)](),'lock_enabled':z[a158_0x323b6a(0x1d5)]()[a158_0x323b6a(0x1d8)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a159_0x5422(_0x2a0da1,_0x44fcbe){_0x2a0da1=_0x2a0da1-0x16d;var _0x36b413=a159_0x36b4();var _0x542259=_0x36b413[_0x2a0da1];return _0x542259;}(function(_0x320aff,_0x39fe4f){var _0x18fda1=a159_0x5422,_0x56ea08=_0x320aff();while(!![]){try{var _0x2d5105=parseInt(_0x18fda1(0x170))/0x1*(parseInt(_0x18fda1(0x16e))/0x2)+parseInt(_0x18fda1(0x176))/0x3+parseInt(_0x18fda1(0x172))/0x4+parseInt(_0x18fda1(0x174))/0x5*(parseInt(_0x18fda1(0x16f))/0x6)+parseInt(_0x18fda1(0x175))/0x7+-parseInt(_0x18fda1(0x173))/0x8*(-parseInt(_0x18fda1(0x16d))/0x9)+-parseInt(_0x18fda1(0x171))/0xa;if(_0x2d5105===_0x39fe4f)break;else _0x56ea08['push'](_0x56ea08['shift']());}catch(_0x1a3778){_0x56ea08['push'](_0x56ea08['shift']());}}}(a159_0x36b4,0xe76bf));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a159_0x36b4(){var _0x2d7cee=['46368950TeRyLQ','4160120TKDsHf','56bpxiYC','816440adgiKk','1123780eNGmQx','1378695Tfnyxy','2054421xNgbMz','8578eWHfMr','42ywpfEG','276JsWeyo'];a159_0x36b4=function(){return _0x2d7cee;};return a159_0x36b4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x42de1f=a160_0x25c5;(function(_0x5c1abf,_0xc768e9){const _0x163d5a=a160_0x25c5,_0x437ae0=_0x5c1abf();while(!![]){try{const _0x231e89=-parseInt(_0x163d5a(0x1ac))/0x1+parseInt(_0x163d5a(0x1b2))/0x2*(parseInt(_0x163d5a(0x1bd))/0x3)+-parseInt(_0x163d5a(0x1cf))/0x4+-parseInt(_0x163d5a(0x1bc))/0x5*(-parseInt(_0x163d5a(0x1a1))/0x6)+parseInt(_0x163d5a(0x1a3))/0x7*(-parseInt(_0x163d5a(0x1ca))/0x8)+parseInt(_0x163d5a(0x1c8))/0x9+parseInt(_0x163d5a(0x1b7))/0xa*(parseInt(_0x163d5a(0x1c1))/0xb);if(_0x231e89===_0xc768e9)break;else _0x437ae0['push'](_0x437ae0['shift']());}catch(_0x255c56){_0x437ae0['push'](_0x437ae0['shift']());}}}(a160_0x24d2,0xd59fc));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a160_0x42de1f(0x1a6)]([a160_0x42de1f(0x1ba),a160_0x42de1f(0x1a2),a160_0x42de1f(0x1c9)]);export const ReentryModeTypeSchema=z[a160_0x42de1f(0x1a6)]([a160_0x42de1f(0x1b3),a160_0x42de1f(0x1bb),'reentry_always']);export const WaitUnitTypeSchema=z[a160_0x42de1f(0x1a6)]([a160_0x42de1f(0x1ab),a160_0x42de1f(0x1bf)]);export const StepTypeValueSchema=z[a160_0x42de1f(0x1a6)]([a160_0x42de1f(0x1a8),a160_0x42de1f(0x1af),a160_0x42de1f(0x1c4),'ab_test',a160_0x42de1f(0x1ce),'jump',a160_0x42de1f(0x1ad)]);export const EmbeddedSegmentDefSchema=z[a160_0x42de1f(0x1b0)]({'description':z['string']()[a160_0x42de1f(0x1c7)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x42de1f(0x1b0)]({'journey':z[a160_0x42de1f(0x1c6)](),'stage':z['string'](),'bundle_id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)]()});export const CriteriaDefSchema=z[a160_0x42de1f(0x1b0)]({'name':z[a160_0x42de1f(0x1c6)](),'description':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'segment':z['string'](),'target':JumpTargetDefSchema[a160_0x42de1f(0x1c7)]()});const WaitConditionTimeoutDefSchema=z[a160_0x42de1f(0x1b0)]({'duration':z[a160_0x42de1f(0x1a5)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a160_0x42de1f(0x1c7)]()}),WaitConditionDefSchema=z[a160_0x42de1f(0x1b0)]({'segment':z[a160_0x42de1f(0x1c6)](),'next':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a160_0x42de1f(0x1b0)]({'duration':z[a160_0x42de1f(0x1a5)]()['optional'](),'unit':WaitUnitTypeSchema[a160_0x42de1f(0x1c7)](),'wait_until':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'condition':WaitConditionDefSchema[a160_0x42de1f(0x1c7)](),'days_of_week':z[a160_0x42de1f(0x1c5)](z[a160_0x42de1f(0x1c6)]())[a160_0x42de1f(0x1c7)]()}),StepBaseFields={'name':z[a160_0x42de1f(0x1c6)](),'uuid':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'next':z[a160_0x42de1f(0x1c6)]()['optional']()},WaitStepDefSchema=z[a160_0x42de1f(0x1b0)]({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1a8)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a160_0x42de1f(0x1b0)]({'activation':z[a160_0x42de1f(0x1c6)]()}),ActivationStepDefSchema=z[a160_0x42de1f(0x1b0)]({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1af)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a160_0x42de1f(0x1b0)]({'name':z[a160_0x42de1f(0x1c6)](),'segment':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'segment_id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'excluded':z[a160_0x42de1f(0x1be)]()[a160_0x42de1f(0x1c7)](),'next':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)]()}),DecisionPointStepParamsDefSchema=z[a160_0x42de1f(0x1b0)]({'branches':z[a160_0x42de1f(0x1c5)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a160_0x42de1f(0x1b0)]({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a160_0x42de1f(0x1b0)]({'id':z['string']()[a160_0x42de1f(0x1c7)](),'name':z[a160_0x42de1f(0x1c6)](),'percentage':z[a160_0x42de1f(0x1a5)](),'next':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)]()}),AbTestStepParamsDefSchema=z[a160_0x42de1f(0x1b0)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'customized_split':z[a160_0x42de1f(0x1be)]()[a160_0x42de1f(0x1c7)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1c3)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a160_0x42de1f(0x1b0)]({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1ce))}),JumpStepParamsDefSchema=z[a160_0x42de1f(0x1b0)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1b5)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a160_0x42de1f(0x1b0)]({...StepBaseFields,'type':z[a160_0x42de1f(0x1c0)](a160_0x42de1f(0x1ad))})[a160_0x42de1f(0x1aa)]();export const StepDefSchema=z[a160_0x42de1f(0x1a7)](a160_0x42de1f(0x1b4),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a160_0x42de1f(0x1c6)](),'description':z['string']()[a160_0x42de1f(0x1c7)](),'id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'entry_criteria':CriteriaDefSchema[a160_0x42de1f(0x1c7)](),'exit_criteria':z[a160_0x42de1f(0x1c5)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a160_0x42de1f(0x1c7)](),'root_step':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'steps':z['array'](StepDefSchema)[a160_0x42de1f(0x1c7)]()});function a160_0x24d2(){const _0x1d5b2a=['boolean','week','literal','1089UapsOn','journey','ab_test','decision_point','array','string','optional','728424UCXbjM','launched','106616WDLVtA','Journey\x20name\x20is\x20required','filter','length','merge','2639040ekXvtU','journeys','78whCYfm','simulation','714kaGseU','record','number','enum','discriminatedUnion','wait','lazy','passthrough','day','1394269olxnDC','end','versions','activation','object','stages','4uLjVQa','no_reentry','type','jump','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','242020ZScUqp','refine','min','draft','reentry_unless_goal_achieved','247715VRmaBu','1751091Mmokoj'];a160_0x24d2=function(){return _0x1d5b2a;};return a160_0x24d2();}export const JourneyEntryDefSchema=z[a160_0x42de1f(0x1b0)]({'name':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'version':z[a160_0x42de1f(0x1c6)]()['optional'](),'state':JourneyStateTypeSchema[a160_0x42de1f(0x1c7)](),'latest':z[a160_0x42de1f(0x1be)]()[a160_0x42de1f(0x1c7)](),'stages':z[a160_0x42de1f(0x1c5)](StageDefSchema),'id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'version_number':z[a160_0x42de1f(0x1a5)]()[a160_0x42de1f(0x1c7)](),'goal':CriteriaDefSchema[a160_0x42de1f(0x1c7)](),'reentry':ReentryModeTypeSchema['optional']()});function a160_0x25c5(_0x558f8f,_0x51da00){_0x558f8f=_0x558f8f-0x1a0;const _0x24d266=a160_0x24d2();let _0x25c57b=_0x24d266[_0x558f8f];return _0x25c57b;}export const JourneyDefSchema=z[a160_0x42de1f(0x1a9)](()=>z[a160_0x42de1f(0x1b0)]({'type':z['literal'](a160_0x42de1f(0x1c2)),'name':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1b9)](0x1,a160_0x42de1f(0x1cb)),'description':z[a160_0x42de1f(0x1c6)]()['optional'](),'bundle_id':z[a160_0x42de1f(0x1c6)]()['optional'](),'bundle_name':z['string']()[a160_0x42de1f(0x1c7)](),'folder_id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z['boolean']()['optional'](),'goal':CriteriaDefSchema[a160_0x42de1f(0x1c7)](),'id':z[a160_0x42de1f(0x1c6)]()[a160_0x42de1f(0x1c7)](),'version':z['string']()[a160_0x42de1f(0x1c7)](),'version_number':z[a160_0x42de1f(0x1a5)]()[a160_0x42de1f(0x1c7)](),'stages':z[a160_0x42de1f(0x1c5)](StageDefSchema)[a160_0x42de1f(0x1c7)](),'versions':z[a160_0x42de1f(0x1c5)](JourneyEntryDefSchema)[a160_0x42de1f(0x1c7)](),'journeys':z[a160_0x42de1f(0x1c5)](JourneyEntryDefSchema)[a160_0x42de1f(0x1c7)](),'segments':z['record'](z[a160_0x42de1f(0x1c6)](),EmbeddedSegmentDefSchema)[a160_0x42de1f(0x1c7)](),'activations':z[a160_0x42de1f(0x1a4)](z[a160_0x42de1f(0x1c6)](),ActivationDefSchema)[a160_0x42de1f(0x1c7)]()})[a160_0x42de1f(0x1b8)](_0x145624=>{const _0x1bb553=a160_0x42de1f,_0x285e22=[_0x145624[_0x1bb553(0x1a0)],_0x145624[_0x1bb553(0x1b1)],_0x145624[_0x1bb553(0x1ae)]][_0x1bb553(0x1cc)](_0x317ba7=>Array['isArray'](_0x317ba7)&&_0x317ba7[_0x1bb553(0x1cd)]>0x0)['length'];return _0x285e22===0x1;},{'message':a160_0x42de1f(0x1b6)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a162_0x3890(){var _0x53be65=['60MDMyyp','9vLlYzS','4414884QHrMmI','212274zZxkMj','6503896SmQZxL','161732DCAFif','289069Jjyfgd','7JwCwIJ','114644hCtnvl','480oaVCNv','642720iOtEyw','78CQKSTv'];a162_0x3890=function(){return _0x53be65;};return a162_0x3890();}(function(_0x5ba315,_0x1bc444){var _0x30bcd5=a162_0x4ff0,_0xaa2e8b=_0x5ba315();while(!![]){try{var _0xe1d15e=-parseInt(_0x30bcd5(0x64))/0x1*(-parseInt(_0x30bcd5(0x68))/0x2)+-parseInt(_0x30bcd5(0x6e))/0x3*(-parseInt(_0x30bcd5(0x6b))/0x4)+-parseInt(_0x30bcd5(0x6d))/0x5+-parseInt(_0x30bcd5(0x65))/0x6*(parseInt(_0x30bcd5(0x6a))/0x7)+parseInt(_0x30bcd5(0x67))/0x8+parseInt(_0x30bcd5(0x66))/0x9*(parseInt(_0x30bcd5(0x6f))/0xa)+parseInt(_0x30bcd5(0x69))/0xb*(-parseInt(_0x30bcd5(0x6c))/0xc);if(_0xe1d15e===_0x1bc444)break;else _0xaa2e8b['push'](_0xaa2e8b['shift']());}catch(_0x27d076){_0xaa2e8b['push'](_0xaa2e8b['shift']());}}}(a162_0x3890,0x7cfdd));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a162_0x4ff0(_0x4b0359,_0x35d6bd){_0x4b0359=_0x4b0359-0x64;var _0x389001=a162_0x3890();var _0x4ff063=_0x389001[_0x4b0359];return _0x4ff063;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x30e5bb=a164_0x5280;(function(_0x13f256,_0x35a6fd){const _0x307355=a164_0x5280,_0x2e2855=_0x13f256();while(!![]){try{const _0xa9a3cc=-parseInt(_0x307355(0xab))/0x1*(-parseInt(_0x307355(0xb9))/0x2)+-parseInt(_0x307355(0xa2))/0x3*(parseInt(_0x307355(0xaf))/0x4)+parseInt(_0x307355(0x9c))/0x5*(parseInt(_0x307355(0xb6))/0x6)+-parseInt(_0x307355(0x90))/0x7*(-parseInt(_0x307355(0x8d))/0x8)+parseInt(_0x307355(0x78))/0x9+parseInt(_0x307355(0x7b))/0xa+-parseInt(_0x307355(0xac))/0xb*(parseInt(_0x307355(0x9e))/0xc);if(_0xa9a3cc===_0x35a6fd)break;else _0x2e2855['push'](_0x2e2855['shift']());}catch(_0x4f663c){_0x2e2855['push'](_0x2e2855['shift']());}}}(a164_0x1d08,0x93c93));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xbc),a164_0x30e5bb(0x9f),a164_0x30e5bb(0x84),a164_0x30e5bb(0x99),a164_0x30e5bb(0xa3),'In',a164_0x30e5bb(0xa4),a164_0x30e5bb(0xb5),a164_0x30e5bb(0xbe),'TimeWithinPast',a164_0x30e5bb(0xa1),a164_0x30e5bb(0xbb),a164_0x30e5bb(0xb8),'EndWith',a164_0x30e5bb(0x77)]);function a164_0x5280(_0xad86f7,_0x2d8e73){_0xad86f7=_0xad86f7-0x6d;const _0x1d084c=a164_0x1d08();let _0x528047=_0x1d084c[_0xad86f7];return _0x528047;}export const TimeUnitSchema=z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x82),a164_0x30e5bb(0x9a),a164_0x30e5bb(0x94),a164_0x30e5bb(0x6d),a164_0x30e5bb(0x6f),a164_0x30e5bb(0xaa),a164_0x30e5bb(0xa7)]);export const AggregationTypeSchema=z[a164_0x30e5bb(0x9b)](['Count',a164_0x30e5bb(0xb3),a164_0x30e5bb(0x70),a164_0x30e5bb(0x7e),a164_0x30e5bb(0x8b),a164_0x30e5bb(0xa9),a164_0x30e5bb(0xb1),a164_0x30e5bb(0x72)]);const TemporalValueSchema=z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0xad)]({'timestamp':z['string']()}),z[a164_0x30e5bb(0xad)]({'last':z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x8c)](),z['record'](z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0xa0)](),TemporalValueSchema,z[a164_0x30e5bb(0x7a)](z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0xa0)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x30e5bb(0xbc),a164_0x30e5bb(0x9f),'GreaterEqual','Less','LessEqual','In',a164_0x30e5bb(0xbb),a164_0x30e5bb(0xb8),a164_0x30e5bb(0x71),a164_0x30e5bb(0xb5),a164_0x30e5bb(0xba),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x30e5bb(0xba),a164_0x30e5bb(0xa1)]);export const OperatorDefSchema=z[a164_0x30e5bb(0xad)]({'type':OperatorTypeSchema,'not':z[a164_0x30e5bb(0xa0)]()['optional'](),'value':OperatorValueSchema[a164_0x30e5bb(0x7c)](),'min':z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0x83)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a164_0x30e5bb(0x8c)](),z['string'](),TemporalValueSchema])[a164_0x30e5bb(0x7c)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x30e5bb(0xad)]({'day':z[a164_0x30e5bb(0x8c)]()[a164_0x30e5bb(0x7c)](),'week':z[a164_0x30e5bb(0x8c)]()['optional'](),'month':z[a164_0x30e5bb(0x8c)]()['optional'](),'year':z[a164_0x30e5bb(0x8c)]()['optional'](),'hour':z[a164_0x30e5bb(0x8c)]()[a164_0x30e5bb(0x7c)](),'minute':z['number']()[a164_0x30e5bb(0x7c)](),'second':z[a164_0x30e5bb(0x8c)]()['optional']()})[a164_0x30e5bb(0x7c)](),'from':z['object']({'last':z['union']([z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0x83)]()]),'unit':TimeUnitSchema})[a164_0x30e5bb(0x7c)](),'reverse':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)]()})[a164_0x30e5bb(0x79)]((_0x2e99e1,_0x3eabad)=>{const _0x210c20=a164_0x30e5bb;OPERATORS_REQUIRING_VALUE[_0x210c20(0xbf)](_0x2e99e1['type'])&&(_0x2e99e1['value']===undefined||_0x2e99e1[_0x210c20(0x92)]===null)&&_0x3eabad[_0x210c20(0x80)]({'code':'custom','message':'Operator\x20\x27'+_0x2e99e1[_0x210c20(0x87)]+_0x210c20(0x85),'path':[_0x210c20(0x92)]}),_0x2e99e1['type']==='Between'&&_0x2e99e1[_0x210c20(0xa6)]===undefined&&_0x2e99e1['max']===undefined&&_0x3eabad[_0x210c20(0x80)]({'code':_0x210c20(0x81),'message':_0x210c20(0x86),'params':{'validationCode':_0x210c20(0x93)}}),OPERATORS_REQUIRING_UNIT['has'](_0x2e99e1['type'])&&_0x2e99e1[_0x210c20(0x92)]!==undefined&&!_0x2e99e1[_0x210c20(0x8f)]&&_0x3eabad[_0x210c20(0x80)]({'code':'custom','message':_0x210c20(0x89)+_0x2e99e1[_0x210c20(0x87)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x210c20(0x8f)],'params':{'validationCode':_0x210c20(0xb4)}}),_0x2e99e1['type']===_0x210c20(0x77)&&(!_0x2e99e1[_0x210c20(0xae)]&&_0x3eabad['addIssue']({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x2e99e1[_0x210c20(0x8e)]&&_0x3eabad[_0x210c20(0x80)]({'code':_0x210c20(0x81),'message':_0x210c20(0x7d),'path':[_0x210c20(0x8e)]}));});export const ArrayMatchingSchema=z['union']([z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x75)),z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x74)),z[a164_0x30e5bb(0xad)]({'atLeast':z[a164_0x30e5bb(0x8c)]()}),z[a164_0x30e5bb(0xad)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x30e5bb(0x98)](a164_0x30e5bb(0x87),[z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xb3),a164_0x30e5bb(0x7e),a164_0x30e5bb(0x8b),a164_0x30e5bb(0x70)]),'column':z['string'](),'groupingColumns':z['array'](z['string']())[a164_0x30e5bb(0x7c)]()}),z[a164_0x30e5bb(0xad)]({'type':z['literal']('Count'),'groupingColumns':z[a164_0x30e5bb(0x7a)](z[a164_0x30e5bb(0x83)]())[a164_0x30e5bb(0x7c)]()}),z[a164_0x30e5bb(0xad)]({'type':z['literal'](a164_0x30e5bb(0xa9)),'columns':z[a164_0x30e5bb(0x7a)](z['string']())}),z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)](['First',a164_0x30e5bb(0x72)]),'column':z[a164_0x30e5bb(0x83)](),'orderColumn':z[a164_0x30e5bb(0x83)](),'groupingColumns':z['array'](z[a164_0x30e5bb(0x83)]())[a164_0x30e5bb(0x7c)]()})]);export const TimeWindowDefSchema=z[a164_0x30e5bb(0xad)]({'duration':z[a164_0x30e5bb(0x8c)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x30e5bb(0xba),a164_0x30e5bb(0xa1),'TimeRange']);function a164_0x1d08(){const _0x15d41f=['minute','enum','5NKVKTE','exclude','2097444SWzwti','Greater','boolean','TimeWithinNext','438ybKEzM','LessEqual','Between','union','min','year','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','CountDistinct','month','5567zmVrCK','77yDMIcW','object','duration','11068ovHcrG','funnel_stage','First','include','Sum','MISSING_TIME_UNIT','Regexp','1567932RydZCT','operator','StartWith','56BSKDSJ','TimeWithinPast','Contain','Equal','literal','IsNull','has','day','And','week','Average','EndWith','Last','segment','all','any','Behavior','TimeRange','9301590CRRwdr','superRefine','array','3707480pTnrhp','optional','TimeRange\x20operator\x20requires\x20\x27from\x27','Min','Segment\x20name\x20is\x20required','addIssue','custom','second','string','Less','\x27\x20requires\x20a\x20value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','type','batch','Operator\x20\x27','Column','Max','number','96792BeYnMA','from','unit','238ChFtCh','lazy','value','MISSING_BETWEEN_BOUNDS','hour','Value','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','column','discriminatedUnion','GreaterEqual'];a164_0x1d08=function(){return _0x15d41f;};return a164_0x1d08();}export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x8a)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)]()})[a164_0x30e5bb(0x79)]((_0x5ab0a6,_0x18ced0)=>{const _0x543981=a164_0x30e5bb,_0x126682=_0x5ab0a6[_0x543981(0xb7)]['type'];_0x5ab0a6[_0x543981(0x97)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x543981(0xbf)](_0x126682)&&_0x18ced0['addIssue']({'code':_0x543981(0x81),'message':_0x543981(0x96)+_0x126682+'\x27)','path':[_0x543981(0xb7),_0x543981(0x87)]}):TIMESTAMP_OPERATORS[_0x543981(0xbf)](_0x126682)&&_0x18ced0[_0x543981(0x80)]({'code':_0x543981(0x81),'message':_0x543981(0x89)+_0x126682+_0x543981(0xa8),'path':['operator',_0x543981(0x87)]});});export const FilterRuleDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x6e)),'conditions':z[a164_0x30e5bb(0x7a)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x95)),'attribute':z[a164_0x30e5bb(0x83)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)](),'exclude':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'aggregation':AggregationDefSchema[a164_0x30e5bb(0x7c)](),'source':z[a164_0x30e5bb(0x83)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x30e5bb(0x8c)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x76)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)](),'exclude':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'aggregation':AggregationDefSchema[a164_0x30e5bb(0x7c)](),'source':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'filter':FilterRuleDefSchema[a164_0x30e5bb(0x7c)](),'timeWindow':TimeWindowDefSchema[a164_0x30e5bb(0x7c)](),'limit':z[a164_0x30e5bb(0x8c)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x30e5bb(0xad)]({'type':z['literal'](a164_0x30e5bb(0x8a)),'column':z[a164_0x30e5bb(0x83)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x6e),'Or']),'conditions':z[a164_0x30e5bb(0x7a)](ConditionDefSchema),'description':z['string']()[a164_0x30e5bb(0x7c)]()}));export const SegmentRefConditionDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xb2),a164_0x30e5bb(0x9d)]),'segment':z[a164_0x30e5bb(0x83)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xa5)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x6e),'Or']),'conditions':z[a164_0x30e5bb(0x7a)](ConditionDefSchema),'description':z['string']()[a164_0x30e5bb(0x7c)]()}));export const SegmentDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x73))[a164_0x30e5bb(0x7c)](),'name':z['string']()[a164_0x30e5bb(0xa6)](0x1,a164_0x30e5bb(0x7f)),'description':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'folder':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'rule':RuleDefSchema[a164_0x30e5bb(0x7c)](),'kind':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x88),'realtime',a164_0x30e5bb(0xb0)])[a164_0x30e5bb(0x7c)](),'visible':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'activations':z[a164_0x30e5bb(0x7a)](z['any']())[a164_0x30e5bb(0x7c)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
function a163_0x3848(){const _0x4dbf9a=['string','column','Value','duration','Max','lazy','Sum','40FxdPQp','timestamp','First','exclude','object','948033csNSfO','Contain','IsNull','Regexp','record','month','minute','realtime','7168184mjLJGk','addIssue','Average','Count','LessEqual','min','Behavior','Segment\x20name\x20is\x20required','from','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','unit','MISSING_TIME_UNIT','second','hour','literal','9104KQFAVX','superRefine','1758pPIHns','\x27\x20requires\x20a\x20time\x20unit','Less','TimeWithinNext','31425xPuIBF','boolean','type','28618931EKYpEC','Column','all','Min','optional','10rlRREk','custom','EndWith','value','1864132YsElZN','day','union','\x27\x20requires\x20a\x20value','GreaterEqual','StartWith','has','TimeRange','TimeWithinPast','Equal','any','funnel_stage','year','number','TimeRange\x20operator\x20requires\x20\x27from\x27','array','And','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Greater','Operator\x20\x27','40ytvyZA','enum','CountDistinct','Last','11683NWLlUo','Between','operator'];a163_0x3848=function(){return _0x4dbf9a;};return a163_0x3848();}const a163_0x5c8181=a163_0x3c44;(function(_0x4dc69e,_0x15e014){const _0x1e00cd=a163_0x3c44,_0x43bc59=_0x4dc69e();while(!![]){try{const _0x162580=parseInt(_0x1e00cd(0x1a4))/0x1+parseInt(_0x1e00cd(0x188))/0x2*(-parseInt(_0x1e00cd(0x1aa))/0x3)+parseInt(_0x1e00cd(0x1b6))/0x4*(-parseInt(_0x1e00cd(0x1b2))/0x5)+parseInt(_0x1e00cd(0x1a6))/0x6*(-parseInt(_0x1e00cd(0x17e))/0x7)+-parseInt(_0x1e00cd(0x195))/0x8+-parseInt(_0x1e00cd(0x18d))/0x9*(-parseInt(_0x1e00cd(0x1cb))/0xa)+parseInt(_0x1e00cd(0x1ad))/0xb;if(_0x162580===_0x15e014)break;else _0x43bc59['push'](_0x43bc59['shift']());}catch(_0xadbff4){_0x43bc59['push'](_0x43bc59['shift']());}}}(a163_0x3848,0x7b6df));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x5c8181(0x1cc)]([a163_0x5c8181(0x1bf),'Greater',a163_0x5c8181(0x1a8),a163_0x5c8181(0x1ba),a163_0x5c8181(0x199),'In','Between',a163_0x5c8181(0x190),a163_0x5c8181(0x18f),a163_0x5c8181(0x1be),'TimeWithinNext',a163_0x5c8181(0x18e),a163_0x5c8181(0x1bb),a163_0x5c8181(0x1b4),a163_0x5c8181(0x1bd)]);export const TimeUnitSchema=z[a163_0x5c8181(0x1cc)]([a163_0x5c8181(0x1a1),a163_0x5c8181(0x193),a163_0x5c8181(0x1a2),a163_0x5c8181(0x1b7),'week',a163_0x5c8181(0x192),a163_0x5c8181(0x1c2)]);export const AggregationTypeSchema=z['enum']([a163_0x5c8181(0x198),a163_0x5c8181(0x187),a163_0x5c8181(0x197),a163_0x5c8181(0x1b0),a163_0x5c8181(0x185),a163_0x5c8181(0x17c),'First','Last']);const TemporalValueSchema=z[a163_0x5c8181(0x1b8)]([z[a163_0x5c8181(0x18c)]({'timestamp':z[a163_0x5c8181(0x181)]()}),z[a163_0x5c8181(0x18c)]({'last':z['union']([z[a163_0x5c8181(0x1c3)](),z[a163_0x5c8181(0x191)](z[a163_0x5c8181(0x181)](),z[a163_0x5c8181(0x1c3)]())]),'unit':z[a163_0x5c8181(0x181)]()})]),OperatorValueSchema=z[a163_0x5c8181(0x1b8)]([z[a163_0x5c8181(0x181)](),z[a163_0x5c8181(0x1c3)](),z[a163_0x5c8181(0x1ab)](),TemporalValueSchema,z[a163_0x5c8181(0x1c5)](z[a163_0x5c8181(0x1b8)]([z[a163_0x5c8181(0x181)](),z[a163_0x5c8181(0x1c3)](),z[a163_0x5c8181(0x1ab)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x5c8181(0x1bf),a163_0x5c8181(0x1c9),a163_0x5c8181(0x1ba),'Less',a163_0x5c8181(0x199),'In',a163_0x5c8181(0x18e),a163_0x5c8181(0x1bb),a163_0x5c8181(0x1b4),a163_0x5c8181(0x190),a163_0x5c8181(0x1be),a163_0x5c8181(0x1a9)]),OPERATORS_REQUIRING_UNIT=new Set([a163_0x5c8181(0x1be),a163_0x5c8181(0x1a9)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a163_0x5c8181(0x1ab)]()[a163_0x5c8181(0x1b1)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z[a163_0x5c8181(0x1c3)](),z['string'](),TemporalValueSchema])['optional'](),'max':z[a163_0x5c8181(0x1b8)]([z[a163_0x5c8181(0x1c3)](),z[a163_0x5c8181(0x181)](),TemporalValueSchema])[a163_0x5c8181(0x1b1)](),'unit':TimeUnitSchema[a163_0x5c8181(0x1b1)](),'duration':z[a163_0x5c8181(0x18c)]({'day':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)](),'week':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)](),'month':z[a163_0x5c8181(0x1c3)]()['optional'](),'year':z['number']()[a163_0x5c8181(0x1b1)](),'hour':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)](),'minute':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)](),'second':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)]()})[a163_0x5c8181(0x1b1)](),'from':z['object']({'last':z[a163_0x5c8181(0x1b8)]([z['number'](),z[a163_0x5c8181(0x181)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a163_0x5c8181(0x1ab)]()['optional']()})['superRefine']((_0x3138d1,_0x10cfc9)=>{const _0xd2f387=a163_0x5c8181;OPERATORS_REQUIRING_VALUE[_0xd2f387(0x1bc)](_0x3138d1[_0xd2f387(0x1ac)])&&(_0x3138d1[_0xd2f387(0x1b5)]===undefined||_0x3138d1[_0xd2f387(0x1b5)]===null)&&_0x10cfc9['addIssue']({'code':'custom','message':'Operator\x20\x27'+_0x3138d1[_0xd2f387(0x1ac)]+_0xd2f387(0x1b9),'path':[_0xd2f387(0x1b5)]}),_0x3138d1[_0xd2f387(0x1ac)]===_0xd2f387(0x17f)&&_0x3138d1[_0xd2f387(0x19a)]===undefined&&_0x3138d1['max']===undefined&&_0x10cfc9[_0xd2f387(0x196)]({'code':'custom','message':_0xd2f387(0x1c7),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0xd2f387(0x1bc)](_0x3138d1['type'])&&_0x3138d1[_0xd2f387(0x1b5)]!==undefined&&!_0x3138d1[_0xd2f387(0x19f)]&&_0x10cfc9['addIssue']({'code':_0xd2f387(0x1b3),'message':_0xd2f387(0x1ca)+_0x3138d1[_0xd2f387(0x1ac)]+_0xd2f387(0x1a7),'path':[_0xd2f387(0x19f)],'params':{'validationCode':_0xd2f387(0x1a0)}}),_0x3138d1[_0xd2f387(0x1ac)]==='TimeRange'&&(!_0x3138d1[_0xd2f387(0x184)]&&_0x10cfc9['addIssue']({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0xd2f387(0x184)]}),!_0x3138d1[_0xd2f387(0x19d)]&&_0x10cfc9['addIssue']({'code':_0xd2f387(0x1b3),'message':_0xd2f387(0x1c4),'path':[_0xd2f387(0x19d)]}));});export const ArrayMatchingSchema=z[a163_0x5c8181(0x1b8)]([z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x1c0)),z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x1af)),z[a163_0x5c8181(0x18c)]({'atLeast':z[a163_0x5c8181(0x1c3)]()}),z['object']({'atMost':z['number']()}),z[a163_0x5c8181(0x18c)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a163_0x5c8181(0x1ac),[z['object']({'type':z[a163_0x5c8181(0x1cc)](['Sum',a163_0x5c8181(0x1b0),'Max',a163_0x5c8181(0x197)]),'column':z[a163_0x5c8181(0x181)](),'groupingColumns':z['array'](z[a163_0x5c8181(0x181)]())[a163_0x5c8181(0x1b1)]()}),z[a163_0x5c8181(0x18c)]({'type':z['literal'](a163_0x5c8181(0x198)),'groupingColumns':z[a163_0x5c8181(0x1c5)](z[a163_0x5c8181(0x181)]())[a163_0x5c8181(0x1b1)]()}),z['object']({'type':z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x17c)),'columns':z[a163_0x5c8181(0x1c5)](z[a163_0x5c8181(0x181)]())}),z['object']({'type':z[a163_0x5c8181(0x1cc)]([a163_0x5c8181(0x18a),a163_0x5c8181(0x17d)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z['array'](z[a163_0x5c8181(0x181)]())[a163_0x5c8181(0x1b1)]()})]);export const TimeWindowDefSchema=z[a163_0x5c8181(0x18c)]({'duration':z[a163_0x5c8181(0x1c3)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x5c8181(0x1be),'TimeWithinNext',a163_0x5c8181(0x1bd)]);export const FilterColumnConditionDefSchema=z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x1ae)),'column':z[a163_0x5c8181(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x5c8181(0x1b1)]()})[a163_0x5c8181(0x1a5)]((_0x108065,_0x371de0)=>{const _0x810106=a163_0x5c8181,_0x5dbbd0=_0x108065[_0x810106(0x180)][_0x810106(0x1ac)];_0x108065[_0x810106(0x182)]===_0x810106(0x189)?!TIMESTAMP_OPERATORS['has'](_0x5dbbd0)&&_0x371de0[_0x810106(0x196)]({'code':_0x810106(0x1b3),'message':_0x810106(0x19e)+_0x5dbbd0+'\x27)','path':[_0x810106(0x180),_0x810106(0x1ac)]}):TIMESTAMP_OPERATORS['has'](_0x5dbbd0)&&_0x371de0['addIssue']({'code':'custom','message':_0x810106(0x1ca)+_0x5dbbd0+_0x810106(0x1c8),'path':[_0x810106(0x180),_0x810106(0x1ac)]});});export const FilterRuleDefSchema=z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x1c6)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a163_0x5c8181(0x186)](()=>z[a163_0x5c8181(0x18c)]({'type':z['literal'](a163_0x5c8181(0x183)),'attribute':z[a163_0x5c8181(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x5c8181(0x1b1)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a163_0x5c8181(0x1b1)](),'source':z[a163_0x5c8181(0x181)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a163_0x5c8181(0x1c3)]()[a163_0x5c8181(0x1b1)]()}));export const BehaviorConditionDefSchema=z[a163_0x5c8181(0x186)](()=>z['object']({'type':z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x19b)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a163_0x5c8181(0x1b1)](),'aggregation':AggregationDefSchema[a163_0x5c8181(0x1b1)](),'source':z[a163_0x5c8181(0x181)]()[a163_0x5c8181(0x1b1)](),'filter':FilterRuleDefSchema[a163_0x5c8181(0x1b1)](),'timeWindow':TimeWindowDefSchema[a163_0x5c8181(0x1b1)](),'limit':z['number']()[a163_0x5c8181(0x1b1)]()}));export const ColumnConditionDefSchema=z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1a3)](a163_0x5c8181(0x1ae)),'column':z[a163_0x5c8181(0x181)](),'operator':OperatorDefSchema});function a163_0x3c44(_0x38e891,_0x14db90){_0x38e891=_0x38e891-0x17c;const _0x384854=a163_0x3848();let _0x3c441b=_0x384854[_0x38e891];return _0x3c441b;}export const CompositeConditionDefSchema=z[a163_0x5c8181(0x186)](()=>z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1cc)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a163_0x5c8181(0x181)]()[a163_0x5c8181(0x1b1)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a163_0x5c8181(0x1cc)](['include',a163_0x5c8181(0x18b)]),'segment':z[a163_0x5c8181(0x181)]()[a163_0x5c8181(0x19a)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a163_0x5c8181(0x1b8)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a163_0x5c8181(0x186)](()=>z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1cc)]([a163_0x5c8181(0x1c6),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a163_0x5c8181(0x181)]()['optional']()}));export const SegmentDefSchema=z[a163_0x5c8181(0x18c)]({'type':z[a163_0x5c8181(0x1a3)]('segment')[a163_0x5c8181(0x1b1)](),'name':z[a163_0x5c8181(0x181)]()['min'](0x1,a163_0x5c8181(0x19c)),'description':z['string']()[a163_0x5c8181(0x1b1)](),'folder':z[a163_0x5c8181(0x181)]()[a163_0x5c8181(0x1b1)](),'rule':RuleDefSchema[a163_0x5c8181(0x1b1)](),'kind':z['enum'](['batch',a163_0x5c8181(0x194),a163_0x5c8181(0x1c1)])['optional'](),'visible':z[a163_0x5c8181(0x1ab)]()[a163_0x5c8181(0x1b1)](),'activations':z[a163_0x5c8181(0x1c5)](z[a163_0x5c8181(0x1c0)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x25384b=a164_0xed02;function a164_0x2ad1(){const _0x55ec6f=['result','parseDocument','982094KkfvmB','filterType','campaign','YAML\x20parse\x20error:\x20','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','1285599xanonF','segment','351830teNZJf','utf-8','message','1355558fqcnIz','email','270282KROJfn','16600810xOpDKu','template','YAML_PARSE_ERROR','object','441PFRgZX','campaign_type','28OHiTOu','error','length','type','journey','208600PCmQHG','has','not\x20a\x20','push','skipped','3fgnwHT','warnings'];a164_0x2ad1=function(){return _0x55ec6f;};return a164_0x2ad1();}(function(_0x327a23,_0x1d2639){const _0x5caba1=a164_0xed02,_0x261509=_0x327a23();while(!![]){try{const _0x1544bb=parseInt(_0x5caba1(0x148))/0x1+parseInt(_0x5caba1(0x152))/0x2*(parseInt(_0x5caba1(0x165))/0x3)+-parseInt(_0x5caba1(0x15b))/0x4*(parseInt(_0x5caba1(0x14f))/0x5)+parseInt(_0x5caba1(0x154))/0x6+-parseInt(_0x5caba1(0x14d))/0x7+-parseInt(_0x5caba1(0x160))/0x8*(-parseInt(_0x5caba1(0x159))/0x9)+-parseInt(_0x5caba1(0x155))/0xa;if(_0x1544bb===_0x1d2639)break;else _0x261509['push'](_0x261509['shift']());}catch(_0x5caa81){_0x261509['push'](_0x261509['shift']());}}}(a164_0x2ad1,0x9dc97));import{readFileSync}from'fs';import*as a164_0x2de166 from'path';import*as a164_0x3cfba1 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';const VALID_CAMPAIGN_TYPES=new Set([a164_0x25384b(0x153),a164_0x25384b(0x163)]);export function isJourneyDef(_0x1eb1f9){const _0x277fd5=a164_0x25384b;return typeof _0x1eb1f9===_0x277fd5(0x158)&&_0x1eb1f9!==null&&_0x277fd5(0x15e)in _0x1eb1f9&&_0x1eb1f9[_0x277fd5(0x15e)]==='journey';}function a164_0xed02(_0x5269b8,_0x30eb19){_0x5269b8=_0x5269b8-0x145;const _0x2ad10b=a164_0x2ad1();let _0xed0216=_0x2ad10b[_0x5269b8];return _0xed0216;}export function isCampaignDef(_0x365cb1){const _0x35b343=a164_0x25384b;if(typeof _0x365cb1!==_0x35b343(0x158)||_0x365cb1===null)return![];const _0x40dc72=_0x365cb1,_0x59b5f0=VALID_CAMPAIGN_TYPES[_0x35b343(0x161)](_0x40dc72[_0x35b343(0x15a)]);if(_0x40dc72[_0x35b343(0x15e)]==='campaign'&&_0x59b5f0)return!![];if(_0x59b5f0&&!_0x40dc72[_0x35b343(0x15e)])return!![];return![];}export function isTemplateDef(_0x547a30){const _0x3c4636=a164_0x25384b;return typeof _0x547a30===_0x3c4636(0x158)&&_0x547a30!==null&&_0x3c4636(0x15e)in _0x547a30&&_0x547a30['type']==='template';}export function isValidationResult(_0x5dbb1f){const _0x788d4=a164_0x25384b;return!(_0x788d4(0x164)in _0x5dbb1f);}export function createParseErrorResult(_0xf6fc4b,_0x1d2a33,_0xe7e7d4,_0x20c6a8,_0xb76b2e='segment'){const _0x5c5c20=a164_0x25384b;return{'filePath':_0xf6fc4b,'relativePath':_0x1d2a33,'source':_0xe7e7d4,'result':{'valid':![],'errors':[{'level':_0x5c5c20(0x15c),'path':'','code':_0x5c5c20(0x157),'message':_0x20c6a8}],'warnings':[]},'fileType':_0xb76b2e};}export function validateYamlFile(_0x340829,_0x196f27,_0x39102a={}){const _0x528533=a164_0x25384b,_0x1e5645=a164_0x2de166['relative'](_0x196f27,_0x340829)||a164_0x2de166['basename'](_0x340829);try{const _0x9b847f=readFileSync(_0x340829,_0x528533(0x150)),_0x2354ef=a164_0x3cfba1[_0x528533(0x147)](_0x9b847f),_0x3d3798=_0x2354ef['toJSON']();if(!_0x3d3798)return createParseErrorResult(_0x340829,_0x1e5645,_0x9b847f,_0x528533(0x14c));let _0x4b9f4f;if(isJourneyDef(_0x3d3798))_0x4b9f4f=_0x528533(0x15f);else{if(isCampaignDef(_0x3d3798))_0x4b9f4f=_0x528533(0x14a);else isTemplateDef(_0x3d3798)?_0x4b9f4f=_0x528533(0x156):_0x4b9f4f=_0x528533(0x14e);}if(_0x39102a['filterType']&&_0x4b9f4f!==_0x39102a[_0x528533(0x149)])return{'filePath':_0x340829,'relativePath':_0x1e5645,'skipped':!![],'reason':_0x528533(0x162)+_0x39102a['filterType']};const _0x1e63e1={'source':_0x9b847f,'document':_0x2354ef};let _0x2d6297;if(_0x4b9f4f===_0x528533(0x15f))_0x2d6297=validateJourneyDef(_0x3d3798,_0x1e63e1);else{if(_0x4b9f4f==='campaign')_0x2d6297=validateCampaignDef(_0x3d3798,_0x1e63e1);else _0x4b9f4f===_0x528533(0x156)?_0x2d6297=validateTemplateDef(_0x3d3798,_0x1e63e1):_0x2d6297=validateSegmentDef(_0x3d3798,_0x1e63e1);}return{'filePath':_0x340829,'relativePath':_0x1e5645,'source':_0x9b847f,'result':_0x2d6297,'fileType':_0x4b9f4f};}catch(_0x45ae1a){const _0x5703b7=_0x45ae1a instanceof Error?_0x45ae1a[_0x528533(0x151)]:String(_0x45ae1a);return createParseErrorResult(_0x340829,_0x1e5645,'',_0x528533(0x14b)+_0x5703b7);}}export function validateYamlFiles(_0x16e8a3,_0x470883,_0x327666={}){return _0x16e8a3['map'](_0x2eb702=>validateYamlFile(_0x2eb702,_0x470883,_0x327666));}export function calculateSummary(_0x5dceb0){const _0x3281a5=a164_0x25384b;let _0x37c738=0x0,_0x425e1f=0x0,_0x1a27ab=0x0,_0x5d2bd8=0x0;for(const _0xd270cb of _0x5dceb0){if(!isValidationResult(_0xd270cb)){_0x5d2bd8++;continue;}_0xd270cb['result']['valid']?_0x37c738++:_0x425e1f++,_0x1a27ab+=_0xd270cb[_0x3281a5(0x146)][_0x3281a5(0x145)][_0x3281a5(0x15d)];}return{'validCount':_0x37c738,'invalidCount':_0x425e1f,'warningCount':_0x1a27ab,'skippedCount':_0x5d2bd8,'hasErrors':_0x425e1f>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x589987,_0x380b85){const _0x402c82=a165_0x526a,_0x4a4c1c=_0x589987();while(!![]){try{const _0x2f222b=-parseInt(_0x402c82(0xbf))/0x1+-parseInt(_0x402c82(0xaa))/0x2+-parseInt(_0x402c82(0x99))/0x3*(parseInt(_0x402c82(0x9e))/0x4)+-parseInt(_0x402c82(0xad))/0x5*(parseInt(_0x402c82(0xa3))/0x6)+parseInt(_0x402c82(0x9f))/0x7*(-parseInt(_0x402c82(0xb1))/0x8)+-parseInt(_0x402c82(0xba))/0x9*(-parseInt(_0x402c82(0x9c))/0xa)+parseInt(_0x402c82(0x9b))/0xb;if(_0x2f222b===_0x380b85)break;else _0x4a4c1c['push'](_0x4a4c1c['shift']());}catch(_0x2e6f5c){_0x4a4c1c['push'](_0x4a4c1c['shift']());}}}(a165_0x485b,0x230c7));import*as a165_0x287d81 from'yaml';import a165_0x3e862b from'chalk';function a165_0x485b(){const _0x2e07bd=['505gaxzNx','split','repeat','\x27:\x20','323872FoytZO','dim','error','join','yellow','success','length','object','toString','9hAFcbr','errors','getIn','max','contents','93486qWjnHp','message','range','map','path','pop','270714eTaVVG','level','10138953CZSlwV','2041500FjCLHq','issues','12lXYstx','49stCwLB','push','number','line','8538lSlGym','\x20|\x20','red','match','parse','data','location','382006CXcloh','flatMap','code'];a165_0x485b=function(){return _0x2e07bd;};return a165_0x485b();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x1e3b5c,_0x29f989,_0x4c27a6){const _0x2bae17=a165_0x526a;if(!_0x1e3b5c||!_0x29f989)return undefined;try{let _0xe0e365=_0x1e3b5c[_0x2bae17(0xbc)](_0x4c27a6,!![]),_0x20b6ce=[..._0x4c27a6];while((!_0xe0e365||typeof _0xe0e365!==_0x2bae17(0xb8)||!(_0x2bae17(0xc1)in _0xe0e365)||!_0xe0e365[_0x2bae17(0xc1)])&&_0x20b6ce['length']>0x0){_0x20b6ce[_0x2bae17(0x98)](),_0xe0e365=_0x20b6ce['length']>0x0?_0x1e3b5c[_0x2bae17(0xbc)](_0x20b6ce,!![]):_0x1e3b5c[_0x2bae17(0xbe)];}if(!_0xe0e365||typeof _0xe0e365!==_0x2bae17(0xb8)||!(_0x2bae17(0xc1)in _0xe0e365)||!_0xe0e365[_0x2bae17(0xc1)])return undefined;const [_0x415772]=_0xe0e365[_0x2bae17(0xc1)];return offsetToLocation(_0x29f989,_0x415772);}catch{return undefined;}}export function offsetToLocation(_0x1413dc,_0x587493){const _0x3fe97b=a165_0x526a;let _0x28dd23=0x1,_0x4345ca=0x1;for(let _0x58ce2c=0x0;_0x58ce2c<_0x587493&&_0x58ce2c<_0x1413dc[_0x3fe97b(0xb7)];_0x58ce2c++){_0x1413dc[_0x58ce2c]==='\x0a'?(_0x28dd23++,_0x4345ca=0x1):_0x4345ca++;}return{'line':_0x28dd23,'column':_0x4345ca,'offset':_0x587493};}export function pathToArray(_0x54f205){const _0x2fa507=a165_0x526a;if(!_0x54f205)return[];return _0x54f205[_0x2fa507(0xae)]('.')[_0x2fa507(0xab)](_0xd9586f=>{const _0x127e77=_0x2fa507,_0x3de867=_0xd9586f[_0x127e77(0xa6)](/^(\w+)\[(\d+)\]$/);if(_0x3de867)return[_0x3de867[0x1],parseInt(_0x3de867[0x2],0xa)];return[_0xd9586f];});}export function formatZodPath(_0x4a67cd){const _0x547a21=a165_0x526a;let _0x1d1a21='';for(const _0x3969a7 of _0x4a67cd){if(typeof _0x3969a7===_0x547a21(0xa1))_0x1d1a21+='['+_0x3969a7+']';else{const _0x1dc96c=String(_0x3969a7);_0x1d1a21+=_0x1d1a21?'.'+_0x1dc96c:_0x1dc96c;}}return _0x1d1a21;}export function flattenZodIssues(_0xcafbde){const _0xd3d2cd=a165_0x526a,_0x59a103=[];for(const _0x3aa893 of _0xcafbde){if(_0x3aa893[_0xd3d2cd(0xac)]==='invalid_union'&&'errors'in _0x3aa893){const _0x4084cc=_0x3aa893[_0xd3d2cd(0xbb)];let _0x219e90=_0x4084cc[0x0]||[];for(const _0x2fca63 of _0x4084cc){_0x2fca63[_0xd3d2cd(0xb7)]<_0x219e90['length']&&(_0x219e90=_0x2fca63);}const _0x1053f0=_0x219e90[_0xd3d2cd(0xc2)](_0x24290a=>({..._0x24290a,'path':[..._0x3aa893[_0xd3d2cd(0xc3)],..._0x24290a['path']]}));_0x59a103[_0xd3d2cd(0xa0)](...flattenZodIssues(_0x1053f0));}else _0x59a103[_0xd3d2cd(0xa0)](_0x3aa893);}return _0x59a103;}export function safeParseYaml(_0x5db15b,_0x14eb0e){const _0x176989=a165_0x526a,_0x4dad5d=a165_0x287d81[_0x176989(0xa7)](_0x5db15b);if(!_0x4dad5d||typeof _0x4dad5d!==_0x176989(0xb8))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x33e6b1=_0x14eb0e['safeParse'](_0x4dad5d);if(!_0x33e6b1[_0x176989(0xb6)]){const _0xbdeb75=_0x33e6b1[_0x176989(0xb3)][_0x176989(0x9d)][0x0],_0x17bfb8=formatZodPath(_0xbdeb75[_0x176989(0xc3)]);throw new Error(_0x17bfb8?'YAML\x20validation\x20error\x20at\x20\x27'+_0x17bfb8+_0x176989(0xb0)+_0xbdeb75[_0x176989(0xc0)]:'YAML\x20validation\x20error:\x20'+_0xbdeb75[_0x176989(0xc0)]);}return _0x33e6b1[_0x176989(0xa8)];}function a165_0x526a(_0x1b329e,_0x1c8039){_0x1b329e=_0x1b329e-0x98;const _0x485b46=a165_0x485b();let _0x526a97=_0x485b46[_0x1b329e];return _0x526a97;}export function formatIssueWithContext(_0x42a433,_0x5ad19d,_0x5e075a){const _0x1d556f=a165_0x526a,_0x53a960=[],_0x2f0d2b=_0x42a433['level']===_0x1d556f(0xb3),_0x21f5fe=_0x2f0d2b?a165_0x3e862b[_0x1d556f(0xa5)]:a165_0x3e862b[_0x1d556f(0xb5)],_0x5183f8=_0x2f0d2b?a165_0x3e862b[_0x1d556f(0xa5)]:a165_0x3e862b[_0x1d556f(0xb5)],_0x42aa11=_0x5e075a?a165_0x3e862b['cyan'](_0x5e075a+':'):'';if(_0x42a433[_0x1d556f(0xa9)]){const _0x2bf493=a165_0x3e862b['cyan'](_0x42a433['location'][_0x1d556f(0xa2)]+':'+_0x42a433[_0x1d556f(0xa9)]['column']);_0x53a960['push'](''+_0x42aa11+_0x2bf493+':\x20'+_0x21f5fe(_0x42a433[_0x1d556f(0x9a)])+'\x20'+_0x5183f8('['+_0x42a433['code']+']'));}else _0x53a960[_0x1d556f(0xa0)](''+_0x42aa11+a165_0x3e862b[_0x1d556f(0xb2)](_0x42a433[_0x1d556f(0xc3)])+':\x20'+_0x21f5fe(_0x42a433[_0x1d556f(0x9a)])+'\x20'+_0x5183f8('['+_0x42a433[_0x1d556f(0xac)]+']'));_0x53a960['push'](_0x42a433[_0x1d556f(0xc0)]);if(_0x42a433[_0x1d556f(0xa9)]&&_0x5ad19d){const _0xbc9a6=_0x5ad19d[_0x1d556f(0xae)]('\x0a'),{line:_0x25dae7,column:_0x5265f1}=_0x42a433[_0x1d556f(0xa9)],_0x570c72=Math[_0x1d556f(0xbd)](0x1,_0x25dae7-0x1),_0x2228d2=Math['min'](_0xbc9a6[_0x1d556f(0xb7)],_0x25dae7+0x1);_0x53a960[_0x1d556f(0xa0)]('');for(let _0x4f93cb=_0x570c72;_0x4f93cb<=_0x2228d2;_0x4f93cb++){const _0x295df2=_0xbc9a6[_0x4f93cb-0x1]||'',_0x3c74f0=a165_0x3e862b[_0x1d556f(0xb2)](_0x4f93cb[_0x1d556f(0xb9)]()['padStart'](0x4)),_0x19ea15=a165_0x3e862b[_0x1d556f(0xb2)](_0x1d556f(0xa4));if(_0x4f93cb===_0x25dae7){_0x53a960[_0x1d556f(0xa0)]('\x20\x20'+_0x3c74f0+_0x19ea15+_0x21f5fe(_0x295df2));const _0x3b1752='\x20'[_0x1d556f(0xaf)](0x4+0x3+_0x5265f1-0x1);_0x53a960['push']('\x20\x20'+_0x3b1752+_0x21f5fe('^'));}else _0x53a960[_0x1d556f(0xa0)]('\x20\x20'+_0x3c74f0+_0x19ea15+a165_0x3e862b[_0x1d556f(0xb2)](_0x295df2));}}return _0x53a960['join']('\x0a');}export function formatValidationResult(_0xcd0bf6,_0x141e4c,_0x4e93eb){const _0x1e287c=a165_0x526a,_0x5d868e=[];for(const _0x375b81 of _0xcd0bf6[_0x1e287c(0xbb)]){_0x5d868e['push'](formatIssueWithContext(_0x375b81,_0x141e4c,_0x4e93eb)),_0x5d868e[_0x1e287c(0xa0)]('');}for(const _0x141c6d of _0xcd0bf6['warnings']){_0x5d868e[_0x1e287c(0xa0)](formatIssueWithContext(_0x141c6d,_0x141e4c,_0x4e93eb)),_0x5d868e[_0x1e287c(0xa0)]('');}return _0x5d868e[_0x1e287c(0xb4)]('\x0a');}
|