@treasuredata/tdx 0.29.5 → 2026.3.1
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.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.d.ts.map +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/databases.js.map +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.d.ts +97 -1
- package/dist/commands/engage-command.d.ts.map +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/job-command.js.map +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/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.d.ts.map +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/tables.js.map +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/workflow-command.js +1 -1
- package/dist/core/auth.d.ts +8 -5
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/auth.js.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +38 -6
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +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.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.d.ts +3 -3
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/api.js.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.d.ts +16 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.d.ts +47 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +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/llm-api-client.js.map +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/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +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.d.ts +95 -4
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +10 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.d.ts +2 -0
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +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/personalization.js.map +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/realtime.js.map +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/parent-segment-yaml.js.map +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/engage.d.ts +119 -0
- package/dist/sdk/types/engage.d.ts.map +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/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.d.ts +1 -0
- package/dist/sdk/util/index.d.ts.map +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/index.js.map +1 -1
- package/dist/sdk/util/paginate.d.ts +18 -0
- package/dist/sdk/util/paginate.d.ts.map +1 -0
- package/dist/sdk/util/paginate.js +1 -0
- package/dist/sdk/util/paginate.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +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/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x189b66,_0x2e0850){const _0x460f50=a138_0x5b38,_0x3dc4b5=_0x189b66();while(!![]){try{const _0xddc0de=-parseInt(_0x460f50(0x101))/0x1*(parseInt(_0x460f50(0x10a))/0x2)+-parseInt(_0x460f50(0x102))/0x3+-parseInt(_0x460f50(0x110))/0x4*(parseInt(_0x460f50(0x112))/0x5)+parseInt(_0x460f50(0x114))/0x6*(parseInt(_0x460f50(0xee))/0x7)+parseInt(_0x460f50(0xf8))/0x8+-parseInt(_0x460f50(0x108))/0x9+parseInt(_0x460f50(0x118))/0xa*(parseInt(_0x460f50(0x103))/0xb);if(_0xddc0de===_0x2e0850)break;else _0x3dc4b5['push'](_0x3dc4b5['shift']());}catch(_0x205c10){_0x3dc4b5['push'](_0x3dc4b5['shift']());}}}(a138_0xcf78,0x30d62));import a138_0x2217b7 from'path';import{parse as a138_0x3fb807}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x522c13){const _0x4ead32=a138_0x5b38;if(!_0x522c13||_0x522c13['trim']()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x1a1005=_0x522c13[_0x4ead32(0x113)]();if(_0x1a1005==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x522c13};const _0x438255=_0x1a1005[_0x4ead32(0x106)]('/')?_0x1a1005[_0x4ead32(0x117)](0x1):_0x1a1005,_0x121a5f=_0x438255[_0x4ead32(0x11d)]('/')['filter'](_0x1b84d3=>_0x1b84d3!=='');if(_0x121a5f[_0x4ead32(0x111)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x4b9917=_0x1a1005[_0x4ead32(0x106)]('/')||!isRelativePathSegment(_0x121a5f[0x0]);for(const _0x1212a4 of _0x121a5f){validatePathSegment(_0x1212a4);}return{'segments':_0x121a5f,'isAbsolute':_0x4b9917,'raw':_0x522c13};}function isRelativePathSegment(_0x56947d){return _0x56947d==='.'||_0x56947d==='..';}function validatePathSegment(_0x511f5d){const _0x244d7c=a138_0x5b38;if(_0x511f5d==='')throw new Error(_0x244d7c(0x10d));if(_0x511f5d==='.'||_0x511f5d==='..')return;if(/[\x00-\x1F\x7F]/[_0x244d7c(0xf5)](_0x511f5d))throw new Error(_0x244d7c(0x105)+_0x511f5d);if(_0x511f5d!==_0x511f5d[_0x244d7c(0x113)]()){}}export function validatePath(_0x50f319){const _0x6e3e35=a138_0x5b38;if(_0x50f319[_0x6e3e35(0xf7)][_0x6e3e35(0x111)]===0x0&&!_0x50f319[_0x6e3e35(0x10f)])throw new Error(_0x6e3e35(0xef));if(_0x50f319[_0x6e3e35(0x10f)]){if(_0x50f319[_0x6e3e35(0xf7)][0x0]==='..')throw new Error(_0x6e3e35(0x11a));let _0x5ea2f8=0x0;for(const _0x4d25e3 of _0x50f319[_0x6e3e35(0xf7)]){if(_0x4d25e3==='..'){if(_0x5ea2f8===0x0)throw new Error(_0x6e3e35(0xfe));_0x5ea2f8--;}else _0x4d25e3!=='.'&&_0x5ea2f8++;}}}export function joinPaths(_0x11e9f2,_0x427023){const _0x51b1d0=a138_0x5b38;if(!_0x11e9f2||_0x11e9f2==='/')return _0x427023;if(!_0x427023||_0x427023==='.')return _0x11e9f2;if(_0x427023[_0x51b1d0(0x106)]('/'))return _0x427023;const _0x318d38=parsePath(_0x11e9f2),_0x1707c2=parsePath(_0x427023),_0x5a4266=[..._0x318d38[_0x51b1d0(0xf7)]];for(const _0x1cccb4 of _0x1707c2[_0x51b1d0(0xf7)]){if(_0x1cccb4==='.')continue;else{if(_0x1cccb4==='..'){if(_0x5a4266[_0x51b1d0(0x111)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x5a4266[_0x51b1d0(0x119)]();}else _0x5a4266[_0x51b1d0(0xf6)](_0x1cccb4);}}const _0x16fab3=_0x5a4266[_0x51b1d0(0x116)]('/');return _0x318d38[_0x51b1d0(0xf4)][_0x51b1d0(0x106)]('/')?'/'+_0x16fab3:_0x16fab3;}export function normalizePath(_0x3c7a4b){const _0x23bfac=a138_0x5b38,_0x18539b=parsePath(_0x3c7a4b),_0x26cb8c=[];for(const _0x5cf0f2 of _0x18539b[_0x23bfac(0xf7)]){if(_0x5cf0f2==='.')continue;else{if(_0x5cf0f2==='..'){if(_0x26cb8c[_0x23bfac(0x111)]===0x0){if(_0x18539b[_0x23bfac(0x10f)])throw new Error(_0x23bfac(0xff));_0x26cb8c[_0x23bfac(0xf6)]('..');}else _0x26cb8c[_0x26cb8c[_0x23bfac(0x111)]-0x1]==='..'?_0x26cb8c[_0x23bfac(0xf6)]('..'):_0x26cb8c['pop']();}else _0x26cb8c['push'](_0x5cf0f2);}}if(_0x26cb8c[_0x23bfac(0x111)]===0x0)return _0x18539b['isAbsolute']?'/':'.';const _0x4ec41c=_0x26cb8c[_0x23bfac(0x116)]('/');return _0x18539b[_0x23bfac(0xf4)][_0x23bfac(0x106)]('/')?'/'+_0x4ec41c:_0x4ec41c;}export function getParentPath(_0x404433){const _0x205152=a138_0x5b38,_0x3720c3=parsePath(_0x404433);if(_0x3720c3[_0x205152(0xf7)][_0x205152(0x111)]<=0x1)return'/';const _0x78a6fc=_0x3720c3[_0x205152(0xf7)][_0x205152(0xf0)](0x0,-0x1)['join']('/');return _0x3720c3[_0x205152(0xf4)][_0x205152(0x106)]('/')?'/'+_0x78a6fc:_0x78a6fc;}export function getBaseName(_0x196971){const _0xdf22e0=a138_0x5b38,_0x41ec9f=parsePath(_0x196971);return _0x41ec9f[_0xdf22e0(0xf7)][_0x41ec9f[_0xdf22e0(0xf7)]['length']-0x1]||'';}export function isChildPath(_0x312204,_0x1311c4){const _0x5e6707=a138_0x5b38,_0x40ab2f=parsePath(_0x312204),_0x396d5a=parsePath(_0x1311c4);if(_0x40ab2f[_0x5e6707(0xf7)]['length']<=_0x396d5a['segments'][_0x5e6707(0x111)])return![];for(let _0x1693e9=0x0;_0x1693e9<_0x396d5a[_0x5e6707(0xf7)][_0x5e6707(0x111)];_0x1693e9++){if(_0x40ab2f['segments'][_0x1693e9]!==_0x396d5a[_0x5e6707(0xf7)][_0x1693e9])return![];}return!![];}export function splitPath(_0x2f3c6f){const _0x3c2c12=a138_0x5b38,_0x1d17f4=parsePath(_0x2f3c6f);if(_0x1d17f4[_0x3c2c12(0xf7)][_0x3c2c12(0x111)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x1d17f4[_0x3c2c12(0xf7)][_0x3c2c12(0x111)]===0x1)return{'parent':_0x1d17f4[_0x3c2c12(0xf7)][0x0]};return{'parent':_0x1d17f4[_0x3c2c12(0xf7)][0x0],'child':_0x1d17f4[_0x3c2c12(0xf7)][_0x3c2c12(0xf0)](0x1)[_0x3c2c12(0x116)]('/')};}function a138_0x5b38(_0x12b7ae,_0x547ce5){_0x12b7ae=_0x12b7ae-0xee;const _0xcf78da=a138_0xcf78();let _0x5b3842=_0xcf78da[_0x12b7ae];return _0x5b3842;}export function isYamlFilePath(_0x3b7ff9){const _0x42cabf=a138_0x5b38;return _0x3b7ff9[_0x42cabf(0x10e)](_0x42cabf(0x10c))||_0x3b7ff9[_0x42cabf(0x10e)](_0x42cabf(0x11c));}export async function resolveYamlFilePath(_0x596d45,_0x47b324=nodeFileSystem){const _0x65ae09=a138_0x5b38,_0x3494d0=a138_0x2217b7[_0x65ae09(0x10b)](_0x596d45);if(!await _0x47b324[_0x65ae09(0xfc)](_0x3494d0))throw new Error('File\x20not\x20found:\x20'+_0x596d45);let _0x4055f5=a138_0x2217b7[_0x65ae09(0xf1)](_0x3494d0),_0x4cfc3b=null,_0x44256f=null;const _0x43908e=a138_0x2217b7['parse'](_0x4055f5)[_0x65ae09(0x109)];while(_0x4055f5!==_0x43908e){const _0x781c62=a138_0x2217b7[_0x65ae09(0x116)](_0x4055f5,'tdx.json');if(await _0x47b324[_0x65ae09(0xfc)](_0x781c62)){_0x4cfc3b=_0x781c62,_0x44256f=_0x4055f5;break;}_0x4055f5=a138_0x2217b7[_0x65ae09(0xf1)](_0x4055f5);}if(!_0x4cfc3b||!_0x44256f)throw new Error(_0x65ae09(0xfa)+_0x596d45+'\x0a'+'Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.');const _0x55056f=await _0x47b324[_0x65ae09(0x11b)](_0x4cfc3b),_0x3899e1=JSON[_0x65ae09(0xfd)](_0x55056f),_0x301ec5=_0x3899e1[_0x65ae09(0xf3)];if(!_0x301ec5)throw new Error(_0x65ae09(0xf2));const _0x59b499=await _0x47b324['readFile'](_0x3494d0),_0x7f27b0=a138_0x3fb807(_0x59b499),_0x21eee4=_0x7f27b0[_0x65ae09(0x100)];if(!_0x21eee4)throw new Error(_0x65ae09(0x115)+_0x596d45);const _0x1044ff=_0x7f27b0[_0x65ae09(0x107)]===_0x65ae09(0x104)?'journey':'segment',_0x2b8468=a138_0x2217b7[_0x65ae09(0xf9)](_0x44256f,_0x3494d0),_0x48c553=a138_0x2217b7['dirname'](_0x2b8468),_0x1da9e9=_0x48c553==='.'?'':_0x48c553[_0x65ae09(0xfb)](/\\/g,'/'),_0x4ff13d=_0x1da9e9?_0x301ec5+'/'+_0x1da9e9+'/'+_0x21eee4:_0x301ec5+'/'+_0x21eee4;return{'parentSegment':_0x301ec5,'segmentName':_0x21eee4,'folderPath':_0x1da9e9,'fullPath':_0x4ff13d,'resourceType':_0x1044ff,'content':_0x59b499};}function a138_0xcf78(){const _0x12dd7b=['3010872oVkryT','relative','No\x20tdx.json\x20found\x20for\x20file:\x20','replace','exists','parse','Path\x20attempts\x20to\x20navigate\x20above\x20root','Cannot\x20navigate\x20above\x20root','name','1sxmhVH','668208kfYSfC','323521xDSeUv','journey','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','startsWith','type','1230984kAYIGJ','root','492406VRnRPP','resolve','.yml','Path\x20segment\x20cannot\x20be\x20empty','endsWith','isAbsolute','4xsVJKe','length','1479545SqfmdY','trim','13956vLCXHo','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','join','substring','230exAMpN','pop','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','readFile','.yaml','split','147gBoVHS','Relative\x20path\x20cannot\x20be\x20empty','slice','dirname','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','parent_segment','raw','test','push','segments'];a138_0xcf78=function(){return _0x12dd7b;};return a138_0xcf78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a139_0x5610(){const _0x4a126b=['65413jdbJvn','3pjUOqb','.\x20Child\x20name\x20cannot\x20be\x20empty','3438fUYcey','Invalid\x20segment\x20reference\x20format:\x20','substring','1917cQGgCV','21xxUogv','3688208hOcOAW','indexOf','26hyLRHQ','2110ZGTPPe','6825348uKKkkh','30550RmaAiL','48538416HWCBcF','15149277bSBDrW'];a139_0x5610=function(){return _0x4a126b;};return a139_0x5610();}function a139_0x596d(_0x34cd05,_0x4b2f2c){_0x34cd05=_0x34cd05-0x12d;const _0x5610e8=a139_0x5610();let _0x596df2=_0x5610e8[_0x34cd05];return _0x596df2;}(function(_0x2301ca,_0x28ebaf){const _0x2e3732=a139_0x596d,_0x56bb07=_0x2301ca();while(!![]){try{const _0x123930=-parseInt(_0x2e3732(0x134))/0x1*(-parseInt(_0x2e3732(0x12e))/0x2)+parseInt(_0x2e3732(0x135))/0x3*(parseInt(_0x2e3732(0x130))/0x4)+-parseInt(_0x2e3732(0x12f))/0x5*(-parseInt(_0x2e3732(0x137))/0x6)+parseInt(_0x2e3732(0x13b))/0x7*(parseInt(_0x2e3732(0x13c))/0x8)+parseInt(_0x2e3732(0x13a))/0x9*(-parseInt(_0x2e3732(0x131))/0xa)+parseInt(_0x2e3732(0x133))/0xb+-parseInt(_0x2e3732(0x132))/0xc;if(_0x123930===_0x28ebaf)break;else _0x56bb07['push'](_0x56bb07['shift']());}catch(_0x569a66){_0x56bb07['push'](_0x56bb07['shift']());}}}(a139_0x5610,0xd2bee));export function parseSegmentRef(_0x33351d){const _0x447055=a139_0x596d,_0x8d5089=_0x33351d[_0x447055(0x12d)]('/');if(_0x8d5089===-0x1)return{'parentId':_0x33351d};if(_0x8d5089===0x0)throw new Error(_0x447055(0x138)+_0x33351d+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x42d5db=_0x33351d[_0x447055(0x139)](0x0,_0x8d5089),_0x9a3d22=_0x33351d[_0x447055(0x139)](_0x8d5089+0x1);if(_0x9a3d22==='')throw new Error(_0x447055(0x138)+_0x33351d+_0x447055(0x136));return{'parentId':_0x42d5db,'childId':_0x9a3d22};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e4dc4,_0x49e67a){const _0x59a9d9=a140_0x1607,_0x5a9b1d=_0x5e4dc4();while(!![]){try{const _0x3484da=-parseInt(_0x59a9d9(0xff))/0x1+-parseInt(_0x59a9d9(0xdf))/0x2*(parseInt(_0x59a9d9(0x11e))/0x3)+parseInt(_0x59a9d9(0x113))/0x4+parseInt(_0x59a9d9(0x123))/0x5+parseInt(_0x59a9d9(0xee))/0x6+-parseInt(_0x59a9d9(0x101))/0x7+parseInt(_0x59a9d9(0xfd))/0x8;if(_0x3484da===_0x49e67a)break;else _0x5a9b1d['push'](_0x5a9b1d['shift']());}catch(_0x1504ff){_0x5a9b1d['push'](_0x5a9b1d['shift']());}}}(a140_0x5a2c,0x4a6f8));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x45b366,_0x1bce84={},_0x11e1a9={}){const _0x2ae7c8=a140_0x1607;if(_0x11e1a9[_0x2ae7c8(0x108)])return runSemanticChecks(_0x45b366,_0x1bce84);const _0x2089f3=SegmentDefSchema[_0x2ae7c8(0xf0)](_0x45b366);if(_0x2089f3['success'])return runSemanticChecks(_0x2089f3[_0x2ae7c8(0xe6)],_0x1bce84);return zodErrorsToValidationResult(_0x2089f3[_0x2ae7c8(0x115)],_0x1bce84);}export function validateRuleDef(_0x596681,_0x13fcee,_0x1f2aba){const _0x48877b=a140_0x1607;if(!_0x596681)return[];const _0x18ee99=RuleDefSchema[_0x48877b(0xf0)](_0x596681);if(_0x18ee99[_0x48877b(0x124)])return checkRule(_0x18ee99['data'],_0x13fcee,_0x1f2aba);const _0x28bf90=flattenZodIssues(_0x18ee99[_0x48877b(0x115)]['issues']);return _0x28bf90[_0x48877b(0x118)](_0x5fd2ff=>{const _0x339ac7=_0x48877b,_0xff50ec=formatZodPath(_0x5fd2ff['path']),_0x323bc4=_0xff50ec?_0x13fcee+'.'+_0xff50ec:_0x13fcee,_0xc40795=mapZodIssueToCode(_0x5fd2ff,_0xff50ec),_0x11ceaf=getLocationFromPath(_0x1f2aba[_0x339ac7(0x104)],_0x1f2aba[_0x339ac7(0xfe)],pathToArray(_0x323bc4));return{'level':_0x339ac7(0x115),'path':_0x323bc4,'code':_0xc40795,'message':_0x5fd2ff[_0x339ac7(0x119)],..._0x11ceaf&&{'location':_0x11ceaf}};});}function a140_0x1607(_0xac7fc2,_0x59fed6){_0xac7fc2=_0xac7fc2-0xde;const _0x5a2cbf=a140_0x5a2c();let _0x16074a=_0x5a2cbf[_0xac7fc2];return _0x16074a;}function zodErrorsToValidationResult(_0x692458,_0x5bc109){const _0x3867d7=a140_0x1607,_0x2b92cc=flattenZodIssues(_0x692458[_0x3867d7(0x10c)]),_0x3bd27d=_0x2b92cc[_0x3867d7(0x118)](_0x9eb967=>{const _0x56812e=_0x3867d7,_0x53abd2=formatZodPath(_0x9eb967[_0x56812e(0x109)]),_0x32c526=mapZodIssueToCode(_0x9eb967,_0x53abd2),_0x4cfedd=getLocationFromPath(_0x5bc109['document'],_0x5bc109[_0x56812e(0xfe)],_0x9eb967[_0x56812e(0x109)][_0x56812e(0x118)](_0x2580f2=>typeof _0x2580f2==='symbol'?String(_0x2580f2):_0x2580f2));return{'level':_0x56812e(0x115),'path':_0x53abd2,'code':_0x32c526,'message':_0x9eb967[_0x56812e(0x119)],..._0x4cfedd&&{'location':_0x4cfedd}};});return{'valid':![],'errors':_0x3bd27d,'warnings':[]};}function mapZodIssueToCode(_0x1342be,_0x5b53fb){const _0x23bff9=a140_0x1607,_0xa6c8d2=_0x1342be[_0x23bff9(0x106)]==='custom'?_0x1342be[_0x23bff9(0x121)]:undefined;if(_0x5b53fb==='name')return'MISSING_NAME';if(_0x5b53fb===_0x23bff9(0xe0)||_0x5b53fb[_0x23bff9(0x102)](_0x23bff9(0xf5))){if(_0x1342be['code']==='invalid_value'){if(_0x5b53fb===_0x23bff9(0xe0)||_0x5b53fb['match'](/\.conditions\[\d+\]\.type$/))return _0x23bff9(0x120);}}if(_0x5b53fb[_0x23bff9(0x102)](_0x23bff9(0x11d)))return _0x23bff9(0x10d);if(_0x5b53fb[_0x23bff9(0x102)](_0x23bff9(0xe7)))return _0x23bff9(0x107);if(_0xa6c8d2?.[_0x23bff9(0xde)]===_0x23bff9(0xf8))return'MISSING_BETWEEN_BOUNDS';if(_0xa6c8d2?.[_0x23bff9(0xde)]===_0x23bff9(0xf7))return _0x23bff9(0xf7);if(_0x5b53fb[_0x23bff9(0x102)]('.conditions')||_0x5b53fb===_0x23bff9(0x111))return _0x23bff9(0x10e);if(_0x5b53fb[_0x23bff9(0x11f)](_0x23bff9(0x122)))return _0x23bff9(0xfc);if(_0x5b53fb[_0x23bff9(0x102)](_0x23bff9(0x110)))return _0x23bff9(0x112);return _0x23bff9(0x10a);}function runSemanticChecks(_0x3ea224,_0x59f6b6){const _0x3074c5=a140_0x1607,_0x6f63df=[];_0x3ea224[_0x3074c5(0xea)]&&_0x6f63df[_0x3074c5(0x114)](...checkRule(_0x3ea224[_0x3074c5(0xea)],_0x3074c5(0xea),_0x59f6b6));const _0x46bfa4=_0x6f63df[_0x3074c5(0x117)](_0xf9b204=>_0xf9b204[_0x3074c5(0xe1)]===_0x3074c5(0x115)),_0x12f7eb=_0x6f63df[_0x3074c5(0x117)](_0x15c93f=>_0x15c93f[_0x3074c5(0xe1)]==='warning');return{'valid':_0x46bfa4[_0x3074c5(0xec)]===0x0,'errors':_0x46bfa4,'warnings':_0x12f7eb};}function checkRule(_0xbc4b56,_0x5bebdd,_0x309ecf){const _0x60f057=a140_0x1607,_0x9e3606=[];if(_0xbc4b56[_0x60f057(0x111)]['length']===0x0)return _0x9e3606[_0x60f057(0x114)]({'level':'error','path':_0x5bebdd+_0x60f057(0xf9),'code':_0x60f057(0x116),'message':_0x60f057(0xfa),'location':getLocationFromPath(_0x309ecf[_0x60f057(0x104)],_0x309ecf[_0x60f057(0xfe)],pathToArray(_0x5bebdd+_0x60f057(0xf9)))}),_0x9e3606;return _0x9e3606['push'](...checkConditions(_0xbc4b56[_0x60f057(0x111)],_0x5bebdd,_0x309ecf)),_0x9e3606;}function a140_0x5a2c(){const _0x32e9e3=['code','MISSING_OPERATOR_VALUE','skipSchema','path','SEGMENT_SCHEMA_ERROR','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','issues','INVALID_OPERATOR_TYPE','MISSING_CONDITIONS','aggregation','.segment','conditions','MISSING_SEGMENT_REFERENCE','617516hQSklE','push','error','EMPTY_CONDITIONS','filter','map','message','Attribute\x20name\x20cannot\x20be\x20empty','Attribute\x20\x27','Value','.operator.type','3tbzGIq','includes','INVALID_RULE_TYPE','params','arrayMatching','138565SjjSWa','success','validationCode','1143846QOQqlg','rule.type','level','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','type','\x27\x20with\x20attribute\x20\x27','.attribute','data','.operator.value','BEHAVIOR_SOURCE_MISSING_FILTER','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','rule','.source','length','.filter','942264vzzMHI','And','safeParse','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','attribute','NESTED_CONDITION_GROUP','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','.type','warning','MISSING_TIME_UNIT','MISSING_BETWEEN_BOUNDS','.conditions','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','Behavior','INVALID_ARRAY_MATCHING','9140984ZWOuMt','source','385116Oqpmzg','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','1538824hYKCMV','endsWith','EMPTY_ATTRIBUTE','document','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'];a140_0x5a2c=function(){return _0x32e9e3;};return a140_0x5a2c();}function checkConditions(_0x596bc3,_0x46f9f3,_0x173946){const _0x4aad37=a140_0x1607,_0x5004fc=[];for(let _0x4f153f=0x0;_0x4f153f<_0x596bc3[_0x4aad37(0xec)];_0x4f153f++){const _0x82907b=_0x596bc3[_0x4f153f],_0x362bf=_0x46f9f3+'.conditions['+_0x4f153f+']';_0x5004fc['push'](...checkCondition(_0x82907b,_0x362bf,_0x173946));}return _0x5004fc;}function checkCondition(_0x445159,_0x100e0c,_0x157f54){const _0x3e00fb=a140_0x1607,_0x28ed47=[];if(_0x445159['type']===_0x3e00fb(0xef)||_0x445159['type']==='Or')return _0x445159[_0x3e00fb(0x111)]['length']===0x0?_0x28ed47[_0x3e00fb(0x114)]({'level':'error','path':_0x100e0c+'.conditions','code':_0x3e00fb(0x116),'message':_0x445159[_0x3e00fb(0xe3)]+_0x3e00fb(0xf1),'location':getLocationFromPath(_0x157f54['document'],_0x157f54[_0x3e00fb(0xfe)],pathToArray(_0x100e0c+_0x3e00fb(0xf9)))}):_0x28ed47[_0x3e00fb(0x114)]({'level':'error','path':_0x100e0c,'code':_0x3e00fb(0xf3),'message':_0x445159['type']+_0x3e00fb(0xf4)+_0x3e00fb(0x100)+'use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x157f54[_0x3e00fb(0x104)],_0x157f54[_0x3e00fb(0xfe)],pathToArray(_0x100e0c))}),_0x28ed47;if(_0x445159[_0x3e00fb(0xe3)]===_0x3e00fb(0x11c)||_0x445159[_0x3e00fb(0xe3)]===_0x3e00fb(0xfb)){const _0x951b44=_0x445159,_0x445b17=_0x951b44[_0x3e00fb(0xfe)],_0x3ad6aa=_0x951b44[_0x3e00fb(0x10f)],_0x45503f=_0x445b17||_0x3ad6aa;(!_0x951b44[_0x3e00fb(0xf2)]||_0x951b44[_0x3e00fb(0xf2)]==='')&&(!_0x45503f&&_0x28ed47[_0x3e00fb(0x114)]({'level':_0x3e00fb(0x115),'path':_0x100e0c+_0x3e00fb(0xe5),'code':_0x3e00fb(0x103),'message':_0x3e00fb(0x11a),'location':getLocationFromPath(_0x157f54[_0x3e00fb(0x104)],_0x157f54[_0x3e00fb(0xfe)],pathToArray(_0x100e0c+_0x3e00fb(0xe5)))}));_0x951b44['filter']&&_0x28ed47[_0x3e00fb(0x114)](...checkRule(_0x951b44['filter'],_0x100e0c+_0x3e00fb(0xed),_0x157f54));if(_0x951b44[_0x3e00fb(0xfe)]){const _0x5b7ed5=_0x951b44[_0x3e00fb(0xf2)]&&_0x951b44[_0x3e00fb(0xf2)]!=='';_0x5b7ed5&&!_0x951b44['filter']&&_0x28ed47[_0x3e00fb(0x114)]({'level':_0x3e00fb(0x115),'path':_0x100e0c+_0x3e00fb(0xeb),'code':_0x3e00fb(0xe8),'message':'Behavior\x20source\x20\x27'+_0x951b44[_0x3e00fb(0xfe)]+_0x3e00fb(0xe4)+_0x951b44[_0x3e00fb(0xf2)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x3e00fb(0xe9),'location':getLocationFromPath(_0x157f54[_0x3e00fb(0x104)],_0x157f54[_0x3e00fb(0xfe)],pathToArray(_0x100e0c+_0x3e00fb(0xeb)))}),_0x5b7ed5&&_0x951b44[_0x3e00fb(0x117)]&&_0x28ed47['push']({'level':_0x3e00fb(0xf6),'path':_0x100e0c+'.attribute','code':_0x3e00fb(0x10b),'message':_0x3e00fb(0x11b)+_0x951b44[_0x3e00fb(0xf2)]+_0x3e00fb(0x105)+_0x3e00fb(0xe2),'location':getLocationFromPath(_0x157f54[_0x3e00fb(0x104)],_0x157f54[_0x3e00fb(0xfe)],pathToArray(_0x100e0c+'.attribute'))});}}return _0x28ed47;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c1a8b,_0x209945){const _0x512b41=a141_0x40e2,_0x2a7051=_0x3c1a8b();while(!![]){try{const _0x55d984=-parseInt(_0x512b41(0x1f0))/0x1+-parseInt(_0x512b41(0x1d5))/0x2*(parseInt(_0x512b41(0x1ec))/0x3)+-parseInt(_0x512b41(0x1f3))/0x4*(parseInt(_0x512b41(0x1d3))/0x5)+parseInt(_0x512b41(0x1dd))/0x6+-parseInt(_0x512b41(0x1f4))/0x7*(-parseInt(_0x512b41(0x1e9))/0x8)+parseInt(_0x512b41(0x1e0))/0x9*(-parseInt(_0x512b41(0x1ea))/0xa)+parseInt(_0x512b41(0x1dc))/0xb;if(_0x55d984===_0x209945)break;else _0x2a7051['push'](_0x2a7051['shift']());}catch(_0x405195){_0x2a7051['push'](_0x2a7051['shift']());}}}(a141_0x4a2b,0xaf1d6));import a141_0x3be4fe from'path';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(_0x2871de){const _0x27ac7a=a141_0x40e2;return _0x2871de[_0x27ac7a(0x20a)]!==_0x27ac7a(0x1e7);}export function isScopedResolution(_0x2e1f6d){const _0x9ba358=a141_0x40e2;return _0x2e1f6d[_0x9ba358(0x20a)]==='directory'||_0x2e1f6d[_0x9ba358(0x20a)]==='file'||_0x2e1f6d['type']===_0x9ba358(0x1db);}function a141_0x4a2b(){const _0xbda886=['No\x20tdx.json\x20found\x20for\x20file:\x20','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','No\x20tdx.json\x20found','segmentName','resolve','Not\x20a\x20YAML\x20file:\x20','isFile','cwd','configDir','parent_name','replace','includes','File\x20not\x20found:\x20','root','type','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','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','215jFCdND','invalid_yaml','6mtUwAI','no_parent','no_config','file','segment','parentSegment','context','23329702ifpwuo','624042aoQMbe','stat','basename','639DtubpY','startsWith','isDirectory','parse','trim','exists','string','error','scopedFolderPath','8oPVgiD','134790qqbrmS','isScoped','649719ntHEKG','tdx.json','match','message','616131rTgZZl','relative','journey','36532QGecjU','7755713sRDNZj','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','resourceType','dirname','parent_segment','directory','folderPath','readFile'];a141_0x4a2b=function(){return _0xbda886;};return a141_0x4a2b();}export function getScopedDetails(_0x45a535){const _0x15caee=a141_0x40e2;if(isScopedResolution(_0x45a535))return{'isScoped':_0x45a535[_0x15caee(0x1eb)],'scopedFolderPath':_0x45a535[_0x15caee(0x1e8)]};return undefined;}async function findTdxConfigAsync(_0x5c02c2,_0x26e2c6){const _0x12e6db=a141_0x40e2;let _0x14e04d=a141_0x3be4fe[_0x12e6db(0x200)](_0x5c02c2);const _0x35143b=a141_0x3be4fe['parse'](_0x14e04d)[_0x12e6db(0x209)];while(_0x14e04d!==_0x35143b){const _0x266655=a141_0x3be4fe['join'](_0x14e04d,_0x12e6db(0x1ed));if(await _0x26e2c6[_0x12e6db(0x1e5)](_0x266655))try{const _0x1702bd=await _0x26e2c6[_0x12e6db(0x1fb)](_0x266655),_0x57993e=JSON[_0x12e6db(0x1e3)](_0x1702bd);if(_0x57993e[_0x12e6db(0x1f8)]&&typeof _0x57993e[_0x12e6db(0x1f8)]===_0x12e6db(0x1e6))return{'configPath':_0x266655,'configDir':_0x14e04d,'parentSegment':_0x57993e['parent_segment']};}catch{}_0x14e04d=a141_0x3be4fe[_0x12e6db(0x1f7)](_0x14e04d);}return null;}function calculateScopedPath(_0x48f549,_0x42fd6c){const _0x2969eb=a141_0x40e2,_0x939100=a141_0x3be4fe[_0x2969eb(0x1f1)](_0x42fd6c,_0x48f549),_0x20a74f=_0x939100!==''&&_0x939100!=='.'&&!_0x939100[_0x2969eb(0x1e1)]('..');return{'isScoped':_0x20a74f,'scopedFolderPath':_0x20a74f?_0x939100[_0x2969eb(0x206)](/\\/g,'/'):''};}function a141_0x40e2(_0x4b8c79,_0x63f0f2){_0x4b8c79=_0x4b8c79-0x1d1;const _0x4a2bb6=a141_0x4a2b();let _0x40e2b4=_0x4a2bb6[_0x4b8c79];return _0x40e2b4;}export async function resolveTarget(_0x542fcf){const _0x58bde8=a141_0x40e2,{arg:_0x48ba81,contextParent:_0x195370,cwd:cwd=process[_0x58bde8(0x203)](),fs:fs=nodeFileSystem}=_0x542fcf;if(_0x48ba81&&isYamlFilePath(_0x48ba81))try{const _0x337c3c=await resolveYamlFilePath(_0x48ba81,fs),_0x255305=a141_0x3be4fe[_0x58bde8(0x200)](_0x48ba81),_0x2f6beb=a141_0x3be4fe[_0x58bde8(0x1f7)](_0x255305),_0x403fd2=await findTdxConfigAsync(_0x2f6beb,fs);if(!_0x403fd2){if(_0x195370){const _0x354cdf=a141_0x3be4fe[_0x58bde8(0x1f7)](_0x255305);return{'type':_0x58bde8(0x1d8),'parentName':_0x195370,'targetDir':_0x354cdf,'configRoot':_0x354cdf,'filePath':_0x255305,'resourceName':_0x337c3c[_0x58bde8(0x1ff)],'folderPath':_0x337c3c[_0x58bde8(0x1fa)],'resourceType':_0x337c3c[_0x58bde8(0x1f6)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x58bde8(0x1e7),'errorCode':_0x58bde8(0x1d7),'message':_0x58bde8(0x1fc)+_0x48ba81,'arg':_0x48ba81,'helpText':_0x58bde8(0x1f5)};}const _0x5aacbe=calculateScopedPath(_0x2f6beb,_0x403fd2['configDir']);return{'type':_0x58bde8(0x1d8),'parentName':_0x403fd2[_0x58bde8(0x1da)],'targetDir':_0x403fd2[_0x58bde8(0x204)],'configRoot':_0x403fd2[_0x58bde8(0x204)],'filePath':_0x255305,'resourceName':_0x337c3c[_0x58bde8(0x1ff)],'folderPath':_0x337c3c[_0x58bde8(0x1fa)],'resourceType':_0x337c3c['resourceType'],'isScoped':_0x5aacbe['isScoped'],'scopedFolderPath':_0x5aacbe['scopedFolderPath']};}catch(_0x520cf5){const _0x49a6ef=_0x520cf5 instanceof Error?_0x520cf5[_0x58bde8(0x1ef)]:String(_0x520cf5);if(_0x49a6ef[_0x58bde8(0x207)]('File\x20not\x20found'))return{'type':_0x58bde8(0x1e7),'errorCode':'file_not_found','message':_0x58bde8(0x208)+_0x48ba81,'arg':_0x48ba81};if(_0x49a6ef[_0x58bde8(0x207)](_0x58bde8(0x1fe))){if(_0x195370){const _0x56ab7f=a141_0x3be4fe[_0x58bde8(0x200)](_0x48ba81);if(await fs['exists'](_0x56ab7f)){const _0x2eb71f=a141_0x3be4fe['dirname'](_0x56ab7f),_0x34abe1=await fs['readFile'](_0x56ab7f),_0x5888a1=_0x34abe1[_0x58bde8(0x1ee)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x2f6d4d=_0x34abe1[_0x58bde8(0x1ee)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3504be=_0x5888a1?_0x5888a1[0x1][_0x58bde8(0x1e4)]():a141_0x3be4fe[_0x58bde8(0x1df)](_0x48ba81,a141_0x3be4fe['extname'](_0x48ba81)),_0x3a4ae9=_0x2f6d4d&&_0x2f6d4d[0x1][_0x58bde8(0x1e4)]()===_0x58bde8(0x1f2)?_0x58bde8(0x1f2):_0x58bde8(0x1d9);return{'type':_0x58bde8(0x1d8),'parentName':_0x195370,'targetDir':_0x2eb71f,'configRoot':_0x2eb71f,'filePath':_0x56ab7f,'resourceName':_0x3504be,'folderPath':'','resourceType':_0x3a4ae9,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x58bde8(0x1e7),'errorCode':_0x58bde8(0x1d7),'message':_0x58bde8(0x1fc)+_0x48ba81,'arg':_0x48ba81,'helpText':_0x58bde8(0x1f5)};}return{'type':_0x58bde8(0x1e7),'errorCode':_0x58bde8(0x1d4),'message':_0x49a6ef,'arg':_0x48ba81};}if(_0x48ba81){const _0x1192fc=a141_0x3be4fe[_0x58bde8(0x200)](cwd,_0x48ba81);let _0x1f9c8e=null;try{_0x1f9c8e=await fs[_0x58bde8(0x1de)](_0x1192fc);}catch{}if(_0x1f9c8e?.[_0x58bde8(0x1e2)]()){const _0x5971ce=await findTdxConfigAsync(_0x1192fc,fs);if(_0x5971ce){const _0x5c61eb=calculateScopedPath(_0x1192fc,_0x5971ce[_0x58bde8(0x204)]);return{'type':_0x58bde8(0x1f9),'parentName':_0x5971ce[_0x58bde8(0x1da)],'targetDir':_0x1192fc,'configRoot':_0x5971ce['configDir'],'isScoped':_0x5c61eb[_0x58bde8(0x1eb)],'scopedFolderPath':_0x5c61eb['scopedFolderPath']};}if(_0x195370)return{'type':_0x58bde8(0x1f9),'parentName':_0x195370,'targetDir':_0x1192fc,'configRoot':_0x1192fc,'isScoped':![],'scopedFolderPath':''};return{'type':_0x58bde8(0x1e7),'errorCode':'no_config','message':_0x58bde8(0x1fd)+_0x48ba81,'arg':_0x48ba81,'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(_0x1f9c8e?.[_0x58bde8(0x202)]())return{'type':'error','errorCode':'invalid_yaml','message':_0x58bde8(0x201)+_0x48ba81,'arg':_0x48ba81,'helpText':_0x58bde8(0x1d1)};const _0x26b9c4=sanitizeFileName(_0x48ba81),_0xb4f6f6=getSegmentRootDir(_0x26b9c4,cwd);return{'type':_0x58bde8(0x205),'parentName':_0x48ba81,'targetDir':_0xb4f6f6,'configRoot':_0xb4f6f6};}const _0xbe9415=await findTdxConfigAsync(cwd,fs);if(_0xbe9415){const _0x3563ae=calculateScopedPath(cwd,_0xbe9415['configDir']);return{'type':_0x58bde8(0x1db),'parentName':_0xbe9415[_0x58bde8(0x1da)],'targetDir':cwd,'configRoot':_0xbe9415[_0x58bde8(0x204)],'isScoped':_0x3563ae[_0x58bde8(0x1eb)],'scopedFolderPath':_0x3563ae[_0x58bde8(0x1e8)]};}if(_0x195370){const _0x4b37fe=sanitizeFileName(_0x195370),_0x490d34=getSegmentRootDir(_0x4b37fe,cwd);return{'type':_0x58bde8(0x1db),'parentName':_0x195370,'targetDir':_0x490d34,'configRoot':_0x490d34,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x58bde8(0x1e7),'errorCode':_0x58bde8(0x1d6),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x58bde8(0x1d2)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a142_0x3fcd7a=a142_0x14e3;(function(_0x18f3b3,_0x2bb70b){const _0x108f1e=a142_0x14e3,_0x2e0891=_0x18f3b3();while(!![]){try{const _0xd4e20d=-parseInt(_0x108f1e(0xaf))/0x1*(parseInt(_0x108f1e(0xb1))/0x2)+parseInt(_0x108f1e(0xb3))/0x3*(-parseInt(_0x108f1e(0xb6))/0x4)+parseInt(_0x108f1e(0xa7))/0x5+-parseInt(_0x108f1e(0xa9))/0x6+-parseInt(_0x108f1e(0xa8))/0x7+parseInt(_0x108f1e(0xab))/0x8+parseInt(_0x108f1e(0xa4))/0x9;if(_0xd4e20d===_0x2bb70b)break;else _0x2e0891['push'](_0x2e0891['shift']());}catch(_0x5dc748){_0x2e0891['push'](_0x2e0891['shift']());}}}(a142_0x5e23,0xa095e));import{existsSync,readFileSync}from'fs';import a142_0x3b88df from'path';function a142_0x5e23(){const _0x2b4816=['cwd','stringify','startsWith','270514gHPXza','engage_workspace','6UyXgKA','parse','84891TYWKjJ','tdx.json','utf-8','28XKCacQ','root','Invalid\x20JSON\x20in\x20','join','relative','string','dirname','resolve','segments','16607259PXeIgs','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parent_segment','5110325LHPZyy','284739uOkfOm','7630104bFPZTk','Invalid\x20tdx.json:\x20expected\x20object','899392tCYVDn'];a142_0x5e23=function(){return _0x2b4816;};return a142_0x5e23();}const TDX_CONFIG_FILE=a142_0x3fcd7a(0xb4),SEGMENTS_DIR=a142_0x3fcd7a(0xa3);export function findTdxConfigPath(_0x28b39e=process[a142_0x3fcd7a(0xac)]()){const _0x4159e2=a142_0x3fcd7a;let _0x3264c8=a142_0x3b88df['resolve'](_0x28b39e);const _0x58e530=a142_0x3b88df['parse'](_0x3264c8)[_0x4159e2(0x9c)];while(_0x3264c8!==_0x58e530){const _0x189cc8=a142_0x3b88df[_0x4159e2(0x9e)](_0x3264c8,TDX_CONFIG_FILE);if(existsSync(_0x189cc8))return _0x189cc8;_0x3264c8=a142_0x3b88df[_0x4159e2(0xa1)](_0x3264c8);}return null;}export function loadTdxConfig(_0x4c791a){const _0x12464f=a142_0x3fcd7a,_0x5eb834=readFileSync(_0x4c791a,_0x12464f(0xb5));let _0x24061b;try{_0x24061b=JSON[_0x12464f(0xb2)](_0x5eb834);}catch{throw new Error(_0x12464f(0x9d)+_0x4c791a);}if(!_0x24061b||typeof _0x24061b!=='object')throw new Error(_0x12464f(0xaa));const _0x25f6f1=_0x24061b,_0x1f5385=_0x25f6f1[_0x12464f(0xa6)]&&typeof _0x25f6f1[_0x12464f(0xa6)]===_0x12464f(0xa0),_0xb19ae4=_0x25f6f1[_0x12464f(0xb0)]&&typeof _0x25f6f1['engage_workspace']===_0x12464f(0xa0);if(!_0x1f5385&&!_0xb19ae4)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x378c6a={};return _0x1f5385&&(_0x378c6a['parent_segment']=_0x25f6f1['parent_segment']),_0xb19ae4&&(_0x378c6a['engage_workspace']=_0x25f6f1['engage_workspace']),_0x378c6a;}export function findTdxConfig(_0x3685be=process[a142_0x3fcd7a(0xac)]()){const _0x46a477=a142_0x3fcd7a,_0x4a4049=findTdxConfigPath(_0x3685be);if(!_0x4a4049)throw new Error(_0x46a477(0xa5));const _0x46b996=loadTdxConfig(_0x4a4049),_0x3a4267=a142_0x3b88df[_0x46a477(0xa1)](_0x4a4049);return{'config':_0x46b996,'configPath':_0x4a4049,'configDir':_0x3a4267};}export function tryFindTdxConfig(_0x4b8b05){try{return findTdxConfig(_0x4b8b05);}catch{return null;}}export function getSegmentRootDir(_0x44f2db,_0x4d11d9=process[a142_0x3fcd7a(0xac)]()){const _0x483b7e=a142_0x3fcd7a;return a142_0x3b88df[_0x483b7e(0x9e)](_0x4d11d9,SEGMENTS_DIR,_0x44f2db);}export function getTdxConfigPath(_0x141059,_0x2badcf=process[a142_0x3fcd7a(0xac)]()){const _0x42e198=a142_0x3fcd7a;return a142_0x3b88df[_0x42e198(0x9e)](getSegmentRootDir(_0x141059,_0x2badcf),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5ef5ab,_0x22503a){const _0x51451d=a142_0x3fcd7a,_0x494622=a142_0x3b88df[_0x51451d(0xa2)](_0x5ef5ab),_0x2ae7c3=a142_0x3b88df[_0x51451d(0x9f)](_0x22503a,_0x494622);if(_0x2ae7c3[_0x51451d(0xae)]('..'))return'';return _0x2ae7c3;}export function localPathToTdFolderPath(_0x15158a){const _0x17d61e=a142_0x3fcd7a,_0xa6d5fc=a142_0x3b88df[_0x17d61e(0xa1)](_0x15158a);if(_0xa6d5fc==='.'||_0xa6d5fc==='')return'';return _0xa6d5fc['replace'](/\\/g,'/');}function a142_0x14e3(_0x1e5684,_0x178983){_0x1e5684=_0x1e5684-0x9c;const _0x5e23d3=a142_0x5e23();let _0x14e39d=_0x5e23d3[_0x1e5684];return _0x14e39d;}export function tdFolderPathToLocalPath(_0x385701,_0x508a01){const _0x432800=a142_0x3fcd7a;if(!_0x385701)return _0x508a01;return a142_0x3b88df[_0x432800(0x9e)](_0x508a01,_0x385701);}export function createTdxConfigContent(_0x2bfc21){const _0x3ce703=a142_0x3fcd7a,_0xd33864={'parent_segment':_0x2bfc21};return JSON[_0x3ce703(0xad)](_0xd33864,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x442138){const _0x3d1c2c=a142_0x3fcd7a,_0x128b04={'engage_workspace':_0x442138};return JSON[_0x3d1c2c(0xad)](_0x128b04,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a143_0x47f9(_0x16b620,_0x25c511){_0x16b620=_0x16b620-0x156;const _0x3287e9=a143_0x3287();let _0x47f9c3=_0x3287e9[_0x16b620];return _0x47f9c3;}const a143_0xd52756=a143_0x47f9;(function(_0x4424b7,_0x3534c6){const _0x56e831=a143_0x47f9,_0x50a83b=_0x4424b7();while(!![]){try{const _0x469b34=-parseInt(_0x56e831(0x15e))/0x1*(parseInt(_0x56e831(0x156))/0x2)+-parseInt(_0x56e831(0x15d))/0x3+parseInt(_0x56e831(0x179))/0x4+parseInt(_0x56e831(0x15a))/0x5+-parseInt(_0x56e831(0x164))/0x6*(-parseInt(_0x56e831(0x162))/0x7)+-parseInt(_0x56e831(0x17f))/0x8*(-parseInt(_0x56e831(0x183))/0x9)+-parseInt(_0x56e831(0x168))/0xa*(parseInt(_0x56e831(0x181))/0xb);if(_0x469b34===_0x3534c6)break;else _0x50a83b['push'](_0x50a83b['shift']());}catch(_0x55d2f7){_0x50a83b['push'](_0x50a83b['shift']());}}}(a143_0x3287,0x94907));import{z}from'zod';export const ScheduleTypeSchema=z[a143_0xd52756(0x16b)]([a143_0xd52756(0x17e),a143_0xd52756(0x172),a143_0xd52756(0x160),a143_0xd52756(0x17c),a143_0xd52756(0x161),a143_0xd52756(0x170),a143_0xd52756(0x159)]);export const RepeatUnitSchema=z[a143_0xd52756(0x16b)](['minute',a143_0xd52756(0x165),a143_0xd52756(0x157),a143_0xd52756(0x15c),a143_0xd52756(0x184),a143_0xd52756(0x163),'none']);function a143_0x3287(){const _0x2db650=['5801226NmbhWK','hour','cols','boolean','444040VTQaXg','unknown','clear','enum','number','optional','masked','onFailure','cron','Connection\x20name\x20is\x20required','hourly','min','Top-N','rows','Activation\x20name\x20is\x20required','array','record','3101152llngWJ','object','string','weekly','First','none','8RRDhfS','desc','121FaRFGA','Last','4190742jNEIcY','month','2399848LcqxiR','day','onSuccess','minutes_interval','2076510iDHegD','nullable','week','978636RoqpiS','1SkEyQW','All','daily','monthly','7tfmiJr','once'];a143_0x3287=function(){return _0x2db650;};return a143_0x3287();}export const ScheduleDefSchema=z[a143_0xd52756(0x17a)]({'type':ScheduleTypeSchema[a143_0xd52756(0x16d)](),'repeat_unit':RepeatUnitSchema[a143_0xd52756(0x16d)](),'repeat_frequency':z['number']()[a143_0xd52756(0x16d)](),'repeat_sub_frequency':z[a143_0xd52756(0x177)](z[a143_0xd52756(0x16c)]())['optional'](),'start_at':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x15b)]()[a143_0xd52756(0x16d)](),'end_on':z[a143_0xd52756(0x17b)]()['nullable']()[a143_0xd52756(0x16d)](),'timezone':z['string']()[a143_0xd52756(0x16d)]()});export const NotificationDefSchema=z[a143_0xd52756(0x17a)]({'notify_on':z[a143_0xd52756(0x177)](z[a143_0xd52756(0x16b)]([a143_0xd52756(0x158),a143_0xd52756(0x16f)]))[a143_0xd52756(0x16d)](),'email_recipients':z[a143_0xd52756(0x177)](z['string']())['optional']()});export const ActivationColumnDefSchema=z['union']([z[a143_0xd52756(0x17b)](),z[a143_0xd52756(0x17a)]({'name':z[a143_0xd52756(0x17b)](),'type':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x16d)](),'visibility':z[a143_0xd52756(0x16b)]([a143_0xd52756(0x16a),'masked'])[a143_0xd52756(0x16d)]()})]);export const ActivationBehaviorDefSchema=z[a143_0xd52756(0x17a)]({'columns':z['array'](z['object']({'name':z[a143_0xd52756(0x17b)](),'type':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x16d)](),'visibility':z[a143_0xd52756(0x16b)]([a143_0xd52756(0x16a),a143_0xd52756(0x16e)])['optional']()}))[a143_0xd52756(0x16d)](),'behavior_table':z[a143_0xd52756(0x17b)]()['optional'](),'join_row':z[a143_0xd52756(0x16c)]()[a143_0xd52756(0x15b)]()[a143_0xd52756(0x16d)](),'join_strategy':z[a143_0xd52756(0x16b)]([a143_0xd52756(0x15f),a143_0xd52756(0x17d),a143_0xd52756(0x182),a143_0xd52756(0x174)])[a143_0xd52756(0x16d)](),'formatting':z[a143_0xd52756(0x16b)]([a143_0xd52756(0x175),a143_0xd52756(0x166)])['optional'](),'order_by':z[a143_0xd52756(0x177)](z[a143_0xd52756(0x17a)]({'key':z[a143_0xd52756(0x17b)](),'order':z[a143_0xd52756(0x16b)](['asc',a143_0xd52756(0x180)])}))['optional']()});export const ActivationDefSchema=z['object']({'name':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x173)](0x1,a143_0xd52756(0x176)),'description':z['string']()[a143_0xd52756(0x16d)](),'connection':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x173)](0x1,a143_0xd52756(0x171)),'all_columns':z[a143_0xd52756(0x167)]()['optional'](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a143_0xd52756(0x16d)](),'notification':NotificationDefSchema[a143_0xd52756(0x16d)](),'connector_config':z[a143_0xd52756(0x178)](z[a143_0xd52756(0x17b)](),z[a143_0xd52756(0x169)]())[a143_0xd52756(0x16d)](),'activation_template_id':z[a143_0xd52756(0x17b)]()[a143_0xd52756(0x15b)]()[a143_0xd52756(0x16d)](),'behavior':ActivationBehaviorDefSchema[a143_0xd52756(0x15b)]()[a143_0xd52756(0x16d)](),'run_after_journey_refresh':z[a143_0xd52756(0x167)]()[a143_0xd52756(0x16d)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a144_0x2075(_0x534182,_0x1af21f){_0x534182=_0x534182-0x7c;var _0x2c2389=a144_0x2c23();var _0x2075f8=_0x2c2389[_0x534182];return _0x2075f8;}(function(_0x57a4a0,_0x5744a6){var _0x557a03=a144_0x2075,_0x23818a=_0x57a4a0();while(!![]){try{var _0x5c6acd=parseInt(_0x557a03(0x85))/0x1+-parseInt(_0x557a03(0x7e))/0x2*(-parseInt(_0x557a03(0x82))/0x3)+-parseInt(_0x557a03(0x84))/0x4*(parseInt(_0x557a03(0x83))/0x5)+-parseInt(_0x557a03(0x80))/0x6*(parseInt(_0x557a03(0x7c))/0x7)+parseInt(_0x557a03(0x87))/0x8*(parseInt(_0x557a03(0x7d))/0x9)+-parseInt(_0x557a03(0x86))/0xa+-parseInt(_0x557a03(0x81))/0xb*(parseInt(_0x557a03(0x7f))/0xc);if(_0x5c6acd===_0x5744a6)break;else _0x23818a['push'](_0x23818a['shift']());}catch(_0x1e0cd0){_0x23818a['push'](_0x23818a['shift']());}}}(a144_0x2c23,0xe9e92));function a144_0x2c23(){var _0x228235=['3234wcTjlj','1366145eXuRzq','528OalHnZ','987730tPwenr','12YwcSWu','1345694FNXyDi','7453820yoKVQj','32fpBMsQ','5341rNSIVZ','2925837KFqwKB','2108LBcOUV','12xUDVQq'];a144_0x2c23=function(){return _0x228235;};return a144_0x2c23();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x1a234f=a145_0x4069;(function(_0x3671a7,_0x17770f){const _0xeeccf=a145_0x4069,_0x3d41b5=_0x3671a7();while(!![]){try{const _0x2b25d7=-parseInt(_0xeeccf(0x10e))/0x1+parseInt(_0xeeccf(0x103))/0x2+parseInt(_0xeeccf(0x114))/0x3+-parseInt(_0xeeccf(0xf0))/0x4+parseInt(_0xeeccf(0x10c))/0x5+-parseInt(_0xeeccf(0xfb))/0x6+-parseInt(_0xeeccf(0x10b))/0x7;if(_0x2b25d7===_0x17770f)break;else _0x3d41b5['push'](_0x3d41b5['shift']());}catch(_0x49b751){_0x3d41b5['push'](_0x3d41b5['shift']());}}}(a145_0x409e,0x56ab0));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a145_0x1a234f(0xf2)](['draft',a145_0x1a234f(0xf8),'launched']);export const ReentryModeTypeSchema=z[a145_0x1a234f(0xf2)]([a145_0x1a234f(0x10f),a145_0x1a234f(0x10a),a145_0x1a234f(0xfd)]);function a145_0x4069(_0x1cdaea,_0x3971b0){_0x1cdaea=_0x1cdaea-0xf0;const _0x409ede=a145_0x409e();let _0x406994=_0x409ede[_0x1cdaea];return _0x406994;}export const WaitUnitTypeSchema=z[a145_0x1a234f(0xf2)](['day',a145_0x1a234f(0x108)]);export const StepTypeValueSchema=z['enum']([a145_0x1a234f(0x115),a145_0x1a234f(0x10d),'decision_point',a145_0x1a234f(0x105),a145_0x1a234f(0xfa),a145_0x1a234f(0x113),'end']);export const EmbeddedSegmentDefSchema=z[a145_0x1a234f(0xff)]({'description':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a145_0x1a234f(0xff)]({'journey':z['string'](),'stage':z[a145_0x1a234f(0x110)](),'bundle_id':z['string']()['optional']()});export const CriteriaDefSchema=z[a145_0x1a234f(0xff)]({'name':z[a145_0x1a234f(0x110)](),'description':z[a145_0x1a234f(0x110)]()['optional'](),'segment':z[a145_0x1a234f(0x110)](),'target':JumpTargetDefSchema[a145_0x1a234f(0xfc)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a145_0x1a234f(0x102)](),'unit':WaitUnitTypeSchema,'next':z['string']()['optional']()}),WaitConditionDefSchema=z[a145_0x1a234f(0xff)]({'segment':z[a145_0x1a234f(0x110)](),'next':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a145_0x1a234f(0xff)]({'duration':z[a145_0x1a234f(0x102)]()[a145_0x1a234f(0xfc)](),'unit':WaitUnitTypeSchema[a145_0x1a234f(0xfc)](),'wait_until':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'condition':WaitConditionDefSchema[a145_0x1a234f(0xfc)](),'days_of_week':z[a145_0x1a234f(0x104)](z[a145_0x1a234f(0x110)]())[a145_0x1a234f(0xfc)]()}),StepBaseFields={'name':z[a145_0x1a234f(0x110)](),'uuid':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'next':z['string']()['optional']()},WaitStepDefSchema=z[a145_0x1a234f(0xff)]({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a145_0x1a234f(0xff)]({'activation':z[a145_0x1a234f(0x110)]()}),ActivationStepDefSchema=z[a145_0x1a234f(0xff)]({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)](a145_0x1a234f(0x10d)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a145_0x1a234f(0xff)]({'name':z['string'](),'segment':z[a145_0x1a234f(0x110)]()['optional'](),'segment_id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'excluded':z[a145_0x1a234f(0xf7)]()[a145_0x1a234f(0xfc)](),'next':z[a145_0x1a234f(0x110)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a145_0x1a234f(0xff)]({'branches':z[a145_0x1a234f(0x104)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)](a145_0x1a234f(0xf1)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a145_0x1a234f(0xff)]({'id':z['string']()[a145_0x1a234f(0xfc)](),'name':z[a145_0x1a234f(0x110)](),'percentage':z[a145_0x1a234f(0x102)](),'next':z['string']()[a145_0x1a234f(0xfc)]()}),AbTestStepParamsDefSchema=z[a145_0x1a234f(0xff)]({'variants':z[a145_0x1a234f(0x104)](AbTestVariantDefSchema),'unique_id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'customized_split':z['boolean']()[a145_0x1a234f(0xfc)]()}),AbTestStepDefSchema=z[a145_0x1a234f(0xff)]({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)](a145_0x1a234f(0x105)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)](a145_0x1a234f(0xfa))}),JumpStepParamsDefSchema=z[a145_0x1a234f(0xff)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a145_0x1a234f(0xff)]({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)](a145_0x1a234f(0x113)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a145_0x1a234f(0xff)]({...StepBaseFields,'type':z[a145_0x1a234f(0xf6)]('end')})[a145_0x1a234f(0xfe)]();export const StepDefSchema=z[a145_0x1a234f(0x101)](a145_0x1a234f(0xf3),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a145_0x1a234f(0xff)]({'name':z[a145_0x1a234f(0x110)](),'description':z[a145_0x1a234f(0x110)]()['optional'](),'id':z[a145_0x1a234f(0x110)]()['optional'](),'entry_criteria':CriteriaDefSchema[a145_0x1a234f(0xfc)](),'exit_criteria':z[a145_0x1a234f(0x104)](CriteriaDefSchema)[a145_0x1a234f(0xfc)](),'milestone':CriteriaDefSchema[a145_0x1a234f(0xfc)](),'root_step':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'steps':z[a145_0x1a234f(0x104)](StepDefSchema)[a145_0x1a234f(0xfc)]()});export const JourneyEntryDefSchema=z['object']({'name':z['string']()[a145_0x1a234f(0xfc)](),'version':z[a145_0x1a234f(0x110)]()['optional'](),'state':JourneyStateTypeSchema[a145_0x1a234f(0xfc)](),'latest':z[a145_0x1a234f(0xf7)]()[a145_0x1a234f(0xfc)](),'stages':z[a145_0x1a234f(0x104)](StageDefSchema),'id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'version_number':z[a145_0x1a234f(0x102)]()[a145_0x1a234f(0xfc)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a145_0x1a234f(0xfc)]()});export const JourneyDefSchema=z[a145_0x1a234f(0xf4)](()=>z[a145_0x1a234f(0xff)]({'type':z['literal'](a145_0x1a234f(0x107)),'name':z[a145_0x1a234f(0x110)]()['min'](0x1,a145_0x1a234f(0x106)),'description':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'bundle_id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'bundle_name':z['string']()[a145_0x1a234f(0xfc)](),'folder_id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a145_0x1a234f(0xf7)]()['optional'](),'goal':CriteriaDefSchema[a145_0x1a234f(0xfc)](),'id':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'version':z[a145_0x1a234f(0x110)]()[a145_0x1a234f(0xfc)](),'version_number':z[a145_0x1a234f(0x102)]()[a145_0x1a234f(0xfc)](),'stages':z[a145_0x1a234f(0x104)](StageDefSchema)['optional'](),'versions':z[a145_0x1a234f(0x104)](JourneyEntryDefSchema)['optional'](),'journeys':z['array'](JourneyEntryDefSchema)[a145_0x1a234f(0xfc)](),'segments':z[a145_0x1a234f(0x116)](z[a145_0x1a234f(0x110)](),EmbeddedSegmentDefSchema)[a145_0x1a234f(0xfc)](),'activations':z[a145_0x1a234f(0x116)](z[a145_0x1a234f(0x110)](),ActivationDefSchema)[a145_0x1a234f(0xfc)]()})[a145_0x1a234f(0xf9)](_0x23440c=>{const _0x486d87=a145_0x1a234f,_0x381684=[_0x23440c[_0x486d87(0xf5)],_0x23440c[_0x486d87(0x100)],_0x23440c[_0x486d87(0x109)]]['filter'](_0x57eca5=>Array['isArray'](_0x57eca5)&&_0x57eca5[_0x486d87(0x111)]>0x0)[_0x486d87(0x111)];return _0x381684===0x1;},{'message':a145_0x1a234f(0x112)}));const _syncCheck1=!![],_syncCheck2=!![];function a145_0x409e(){const _0x1c2504=['discriminatedUnion','number','979180hTAbGj','array','ab_test','Journey\x20name\x20is\x20required','journey','week','versions','reentry_unless_goal_achieved','1178499LkxQhj','2619695aCLrRL','activation','373712uwosqF','no_reentry','string','length','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','jump','939648tsweVf','wait','record','392916VLtRLg','decision_point','enum','type','lazy','journeys','literal','boolean','simulation','refine','merge','1988730RcbSRB','optional','reentry_always','passthrough','object','stages'];a145_0x409e=function(){return _0x1c2504;};return a145_0x409e();}void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29cebc,_0x5b0ea0){var _0x4c7e98=a147_0x23f6,_0x35d3e4=_0x29cebc();while(!![]){try{var _0x158909=-parseInt(_0x4c7e98(0x74))/0x1*(parseInt(_0x4c7e98(0x76))/0x2)+-parseInt(_0x4c7e98(0x73))/0x3+-parseInt(_0x4c7e98(0x78))/0x4+parseInt(_0x4c7e98(0x75))/0x5+-parseInt(_0x4c7e98(0x72))/0x6+parseInt(_0x4c7e98(0x77))/0x7+parseInt(_0x4c7e98(0x79))/0x8*(parseInt(_0x4c7e98(0x71))/0x9);if(_0x158909===_0x5b0ea0)break;else _0x35d3e4['push'](_0x35d3e4['shift']());}catch(_0x27c9e0){_0x35d3e4['push'](_0x35d3e4['shift']());}}}(a147_0x2e63,0xd503c));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a147_0x2e63(){var _0x42b3d6=['805344XghlAj','3200337EIPMfM','1RoDfQh','7435305QdJMVw','2620648LYHnlL','10307766lpWPUN','2211204DUKuKU','411384AsRzYd','171HZzLnM'];a147_0x2e63=function(){return _0x42b3d6;};return a147_0x2e63();}function a147_0x23f6(_0xdf48f4,_0x303f0d){_0xdf48f4=_0xdf48f4-0x71;var _0x2e6338=a147_0x2e63();var _0x23f6da=_0x2e6338[_0xdf48f4];return _0x23f6da;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a148_0xfc539=a148_0x590e;(function(_0x9cc6d,_0x1fcb82){const _0x5169c5=a148_0x590e,_0x4d81e4=_0x9cc6d();while(!![]){try{const _0x4c39e7=-parseInt(_0x5169c5(0x109))/0x1*(-parseInt(_0x5169c5(0xfa))/0x2)+-parseInt(_0x5169c5(0x108))/0x3+-parseInt(_0x5169c5(0x129))/0x4*(parseInt(_0x5169c5(0xf1))/0x5)+-parseInt(_0x5169c5(0x11e))/0x6*(-parseInt(_0x5169c5(0x11a))/0x7)+parseInt(_0x5169c5(0x11f))/0x8+-parseInt(_0x5169c5(0x12b))/0x9*(parseInt(_0x5169c5(0x113))/0xa)+-parseInt(_0x5169c5(0x100))/0xb;if(_0x4c39e7===_0x1fcb82)break;else _0x4d81e4['push'](_0x4d81e4['shift']());}catch(_0x544170){_0x4d81e4['push'](_0x4d81e4['shift']());}}}(a148_0x6fbf,0xc5c5f));import{z}from'zod';export const OperatorTypeSchema=z[a148_0xfc539(0x10c)]([a148_0xfc539(0x125),a148_0xfc539(0xef),a148_0xfc539(0xdf),a148_0xfc539(0x10e),a148_0xfc539(0xec),'In',a148_0xfc539(0x102),'Regexp',a148_0xfc539(0x11c),a148_0xfc539(0xf4),a148_0xfc539(0x115),a148_0xfc539(0x10d),a148_0xfc539(0x112),a148_0xfc539(0x128),a148_0xfc539(0x124)]);export const TimeUnitSchema=z[a148_0xfc539(0x10c)]([a148_0xfc539(0x101),a148_0xfc539(0x121),a148_0xfc539(0xde),'day',a148_0xfc539(0x111),a148_0xfc539(0x106),a148_0xfc539(0x11b)]);export const AggregationTypeSchema=z[a148_0xfc539(0x10c)]([a148_0xfc539(0xdb),'Sum',a148_0xfc539(0x104),a148_0xfc539(0xf8),a148_0xfc539(0xee),a148_0xfc539(0xfb),a148_0xfc539(0xd9),a148_0xfc539(0x10a)]);const TemporalValueSchema=z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0x119)]({'timestamp':z['string']()}),z['object']({'last':z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0xe4)](),z[a148_0xfc539(0xf9)](z[a148_0xfc539(0x105)](),z[a148_0xfc539(0xe4)]())]),'unit':z[a148_0xfc539(0x105)]()})]),OperatorValueSchema=z['union']([z[a148_0xfc539(0x105)](),z[a148_0xfc539(0xe4)](),z[a148_0xfc539(0xf5)](),TemporalValueSchema,z[a148_0xfc539(0x126)](z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0x105)](),z['number'](),z[a148_0xfc539(0xf5)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a148_0xfc539(0x125),a148_0xfc539(0xef),a148_0xfc539(0x10e),a148_0xfc539(0xdf),'LessEqual','In','Contain',a148_0xfc539(0x112),a148_0xfc539(0x128),a148_0xfc539(0x12d),a148_0xfc539(0xf4),a148_0xfc539(0x115)]),OPERATORS_REQUIRING_UNIT=new Set([a148_0xfc539(0xf4),a148_0xfc539(0x115)]);export const OperatorDefSchema=z[a148_0xfc539(0x119)]({'type':OperatorTypeSchema,'not':z['boolean']()[a148_0xfc539(0xf3)](),'value':OperatorValueSchema[a148_0xfc539(0xf3)](),'min':z[a148_0xfc539(0xdc)]([z['number'](),z['string'](),TemporalValueSchema])['optional'](),'max':z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0xe4)](),z[a148_0xfc539(0x105)](),TemporalValueSchema])[a148_0xfc539(0xf3)](),'unit':TimeUnitSchema['optional'](),'duration':z[a148_0xfc539(0x119)]({'day':z[a148_0xfc539(0xe4)]()[a148_0xfc539(0xf3)](),'week':z[a148_0xfc539(0xe4)]()[a148_0xfc539(0xf3)](),'month':z[a148_0xfc539(0xe4)]()[a148_0xfc539(0xf3)](),'year':z[a148_0xfc539(0xe4)]()[a148_0xfc539(0xf3)](),'hour':z[a148_0xfc539(0xe4)]()['optional'](),'minute':z['number']()[a148_0xfc539(0xf3)](),'second':z[a148_0xfc539(0xe4)]()[a148_0xfc539(0xf3)]()})[a148_0xfc539(0xf3)](),'from':z[a148_0xfc539(0x119)]({'last':z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0xe4)](),z[a148_0xfc539(0x105)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a148_0xfc539(0xf5)]()['optional']()})[a148_0xfc539(0xe3)]((_0x3196d8,_0x593677)=>{const _0x597c41=a148_0xfc539;OPERATORS_REQUIRING_VALUE[_0x597c41(0x103)](_0x3196d8[_0x597c41(0xed)])&&(_0x3196d8['value']===undefined||_0x3196d8['value']===null)&&_0x593677[_0x597c41(0xf2)]({'code':_0x597c41(0xfd),'message':'Operator\x20\x27'+_0x3196d8['type']+_0x597c41(0xe0),'path':[_0x597c41(0xff)]}),_0x3196d8[_0x597c41(0xed)]===_0x597c41(0x102)&&_0x3196d8[_0x597c41(0xf7)]===undefined&&_0x3196d8['max']===undefined&&_0x593677['addIssue']({'code':_0x597c41(0xfd),'message':_0x597c41(0x127),'params':{'validationCode':_0x597c41(0xe2)}}),OPERATORS_REQUIRING_UNIT[_0x597c41(0x103)](_0x3196d8[_0x597c41(0xed)])&&_0x3196d8[_0x597c41(0xff)]!==undefined&&!_0x3196d8[_0x597c41(0xeb)]&&_0x593677[_0x597c41(0xf2)]({'code':_0x597c41(0xfd),'message':_0x597c41(0x120)+_0x3196d8[_0x597c41(0xed)]+_0x597c41(0xe7),'path':[_0x597c41(0xeb)],'params':{'validationCode':_0x597c41(0x10f)}}),_0x3196d8['type']===_0x597c41(0x124)&&(!_0x3196d8[_0x597c41(0x10b)]&&_0x593677[_0x597c41(0xf2)]({'code':_0x597c41(0xfd),'message':_0x597c41(0xf6),'path':[_0x597c41(0x10b)]}),!_0x3196d8[_0x597c41(0xe8)]&&_0x593677[_0x597c41(0xf2)]({'code':_0x597c41(0xfd),'message':_0x597c41(0x12c),'path':[_0x597c41(0xe8)]}));});function a148_0x6fbf(){const _0x5a2bbe=['Between','has','Average','string','month','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','2656047odifYz','274403piCZwc','Last','duration','enum','Contain','GreaterEqual','MISSING_TIME_UNIT','column','week','StartWith','6334220jVAjWd','include','TimeWithinNext','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','lazy','Segment\x20name\x20is\x20required','object','122346akgoPE','year','IsNull','exclude','360riEZxf','5920960LsBaid','Operator\x20\x27','minute','Sum','discriminatedUnion','TimeRange','Equal','array','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','EndWith','152vCbcjI','operator','9oFoYbS','TimeRange\x20operator\x20requires\x20\x27from\x27','Regexp','First','funnel_stage','Count','union','Column','hour','Less','\x27\x20requires\x20a\x20value','Segment\x20reference\x20must\x20not\x20be\x20empty','MISSING_BETWEEN_BOUNDS','superRefine','number','Value','all','\x27\x20requires\x20a\x20time\x20unit','from','realtime','any','unit','LessEqual','type','Max','Greater','batch','48065ftXNuB','addIssue','optional','TimeWithinPast','boolean','TimeRange\x20operator\x20requires\x20\x27duration\x27','min','Min','record','10XbXnEZ','CountDistinct','literal','custom','Behavior','value','5133381dyNfqI','second'];a148_0x6fbf=function(){return _0x5a2bbe;};return a148_0x6fbf();}export const ArrayMatchingSchema=z[a148_0xfc539(0xdc)]([z[a148_0xfc539(0xfc)](a148_0xfc539(0xea)),z[a148_0xfc539(0xfc)](a148_0xfc539(0xe6)),z[a148_0xfc539(0x119)]({'atLeast':z[a148_0xfc539(0xe4)]()}),z[a148_0xfc539(0x119)]({'atMost':z[a148_0xfc539(0xe4)]()}),z[a148_0xfc539(0x119)]({'exactly':z[a148_0xfc539(0xe4)]()})]);export const AggregationDefSchema=z[a148_0xfc539(0x123)](a148_0xfc539(0xed),[z['object']({'type':z[a148_0xfc539(0x10c)]([a148_0xfc539(0x122),'Min','Max',a148_0xfc539(0x104)]),'column':z[a148_0xfc539(0x105)](),'groupingColumns':z[a148_0xfc539(0x126)](z[a148_0xfc539(0x105)]())[a148_0xfc539(0xf3)]()}),z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)]('Count'),'groupingColumns':z['array'](z[a148_0xfc539(0x105)]())[a148_0xfc539(0xf3)]()}),z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)](a148_0xfc539(0xfb)),'columns':z[a148_0xfc539(0x126)](z[a148_0xfc539(0x105)]())}),z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0x10c)]([a148_0xfc539(0xd9),a148_0xfc539(0x10a)]),'column':z[a148_0xfc539(0x105)](),'orderColumn':z['string'](),'groupingColumns':z[a148_0xfc539(0x126)](z[a148_0xfc539(0x105)]())[a148_0xfc539(0xf3)]()})]);export const TimeWindowDefSchema=z[a148_0xfc539(0x119)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a148_0xfc539(0xf4),a148_0xfc539(0x115),a148_0xfc539(0x124)]);function a148_0x590e(_0x199289,_0x299a1b){_0x199289=_0x199289-0xd9;const _0x6fbf22=a148_0x6fbf();let _0x590ecb=_0x6fbf22[_0x199289];return _0x590ecb;}export const FilterColumnConditionDefSchema=z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)](a148_0xfc539(0xdd)),'column':z[a148_0xfc539(0x105)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a148_0xfc539(0xf3)]()})[a148_0xfc539(0xe3)]((_0x357744,_0x31839c)=>{const _0x26b02c=a148_0xfc539,_0x924b81=_0x357744['operator'][_0x26b02c(0xed)];_0x357744[_0x26b02c(0x110)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x26b02c(0x103)](_0x924b81)&&_0x31839c[_0x26b02c(0xf2)]({'code':'custom','message':_0x26b02c(0x107)+_0x924b81+'\x27)','path':[_0x26b02c(0x12a),_0x26b02c(0xed)]}):TIMESTAMP_OPERATORS[_0x26b02c(0x103)](_0x924b81)&&_0x31839c['addIssue']({'code':_0x26b02c(0xfd),'message':_0x26b02c(0x120)+_0x924b81+_0x26b02c(0x116),'path':[_0x26b02c(0x12a),_0x26b02c(0xed)]});});export const FilterRuleDefSchema=z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)]('And'),'conditions':z[a148_0xfc539(0x126)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a148_0xfc539(0x117)](()=>z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)](a148_0xfc539(0xe5)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a148_0xfc539(0xf3)](),'exclude':z[a148_0xfc539(0xf5)]()[a148_0xfc539(0xf3)](),'aggregation':AggregationDefSchema[a148_0xfc539(0xf3)](),'source':z[a148_0xfc539(0x105)]()['optional'](),'filter':FilterRuleDefSchema[a148_0xfc539(0xf3)](),'limit':z[a148_0xfc539(0xe4)]()['optional']()}));export const BehaviorConditionDefSchema=z[a148_0xfc539(0x117)](()=>z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)](a148_0xfc539(0xfe)),'attribute':z[a148_0xfc539(0x105)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a148_0xfc539(0xf3)](),'exclude':z[a148_0xfc539(0xf5)]()[a148_0xfc539(0xf3)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a148_0xfc539(0x105)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a148_0xfc539(0xf3)]()}));export const ColumnConditionDefSchema=z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)](a148_0xfc539(0xdd)),'column':z[a148_0xfc539(0x105)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a148_0xfc539(0x117)](()=>z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0x10c)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a148_0xfc539(0x114),a148_0xfc539(0x11d)]),'segment':z[a148_0xfc539(0x105)]()[a148_0xfc539(0xf7)](0x1,a148_0xfc539(0xe1))});export const ConditionDefSchema=z[a148_0xfc539(0x117)](()=>z[a148_0xfc539(0xdc)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0x10c)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a148_0xfc539(0x105)]()[a148_0xfc539(0xf3)]()}));export const SegmentDefSchema=z[a148_0xfc539(0x119)]({'type':z[a148_0xfc539(0xfc)]('segment')[a148_0xfc539(0xf3)](),'name':z[a148_0xfc539(0x105)]()[a148_0xfc539(0xf7)](0x1,a148_0xfc539(0x118)),'description':z[a148_0xfc539(0x105)]()[a148_0xfc539(0xf3)](),'folder':z[a148_0xfc539(0x105)]()[a148_0xfc539(0xf3)](),'rule':RuleDefSchema[a148_0xfc539(0xf3)](),'kind':z[a148_0xfc539(0x10c)]([a148_0xfc539(0xf0),a148_0xfc539(0xe9),a148_0xfc539(0xda)])['optional'](),'visible':z['boolean']()['optional'](),'activations':z[a148_0xfc539(0x126)](z[a148_0xfc539(0xea)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a148_0x5203cc=a148_0x3108;(function(_0x14a7d4,_0x12d25c){const _0x21197f=a148_0x3108,_0x14c3aa=_0x14a7d4();while(!![]){try{const _0x353d94=-parseInt(_0x21197f(0x1d6))/0x1+-parseInt(_0x21197f(0x1ba))/0x2+parseInt(_0x21197f(0x19f))/0x3*(-parseInt(_0x21197f(0x1eb))/0x4)+parseInt(_0x21197f(0x1b1))/0x5*(parseInt(_0x21197f(0x1b7))/0x6)+parseInt(_0x21197f(0x1a0))/0x7*(parseInt(_0x21197f(0x1e4))/0x8)+parseInt(_0x21197f(0x1c1))/0x9+parseInt(_0x21197f(0x1c2))/0xa;if(_0x353d94===_0x12d25c)break;else _0x14c3aa['push'](_0x14c3aa['shift']());}catch(_0x202a9f){_0x14c3aa['push'](_0x14c3aa['shift']());}}}(a148_0x101b,0x902da));import{z}from'zod';function a148_0x3108(_0x4fc79a,_0x2ce6f7){_0x4fc79a=_0x4fc79a-0x19f;const _0x101b71=a148_0x101b();let _0x310864=_0x101b71[_0x4fc79a];return _0x310864;}export const OperatorTypeSchema=z[a148_0x5203cc(0x1a9)]([a148_0x5203cc(0x1ab),a148_0x5203cc(0x1c9),a148_0x5203cc(0x1af),a148_0x5203cc(0x1a8),'LessEqual','In',a148_0x5203cc(0x1dc),'Regexp',a148_0x5203cc(0x1c0),a148_0x5203cc(0x1e5),a148_0x5203cc(0x1a4),a148_0x5203cc(0x1e0),a148_0x5203cc(0x1d1),a148_0x5203cc(0x1de),a148_0x5203cc(0x1b6)]);export const TimeUnitSchema=z['enum']([a148_0x5203cc(0x1a5),a148_0x5203cc(0x1bb),'hour',a148_0x5203cc(0x1e7),'week','month',a148_0x5203cc(0x1d5)]);export const AggregationTypeSchema=z[a148_0x5203cc(0x1a9)](['Count',a148_0x5203cc(0x1d0),a148_0x5203cc(0x1e2),a148_0x5203cc(0x1a6),a148_0x5203cc(0x1b8),a148_0x5203cc(0x1b3),a148_0x5203cc(0x1d2),a148_0x5203cc(0x1ae)]);const TemporalValueSchema=z[a148_0x5203cc(0x1cd)]([z['object']({'timestamp':z[a148_0x5203cc(0x1ca)]()}),z[a148_0x5203cc(0x1d4)]({'last':z['union']([z[a148_0x5203cc(0x1d3)](),z[a148_0x5203cc(0x1a2)](z[a148_0x5203cc(0x1ca)](),z[a148_0x5203cc(0x1d3)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a148_0x5203cc(0x1cd)]([z['string'](),z[a148_0x5203cc(0x1d3)](),z[a148_0x5203cc(0x1cb)](),TemporalValueSchema,z[a148_0x5203cc(0x1b9)](z[a148_0x5203cc(0x1cd)]([z[a148_0x5203cc(0x1ca)](),z[a148_0x5203cc(0x1d3)](),z[a148_0x5203cc(0x1cb)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a148_0x5203cc(0x1ab),'Greater','GreaterEqual',a148_0x5203cc(0x1af),a148_0x5203cc(0x1b4),'In','Contain','StartWith',a148_0x5203cc(0x1de),a148_0x5203cc(0x1e3),a148_0x5203cc(0x1e5),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a148_0x5203cc(0x1a4)]);export const OperatorDefSchema=z[a148_0x5203cc(0x1d4)]({'type':OperatorTypeSchema,'not':z['boolean']()[a148_0x5203cc(0x1bd)](),'value':OperatorValueSchema[a148_0x5203cc(0x1bd)](),'min':z['union']([z['number'](),z[a148_0x5203cc(0x1ca)](),TemporalValueSchema])['optional'](),'max':z[a148_0x5203cc(0x1cd)]([z['number'](),z['string'](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a148_0x5203cc(0x1bd)](),'duration':z[a148_0x5203cc(0x1d4)]({'day':z[a148_0x5203cc(0x1d3)]()[a148_0x5203cc(0x1bd)](),'week':z[a148_0x5203cc(0x1d3)]()[a148_0x5203cc(0x1bd)](),'month':z['number']()[a148_0x5203cc(0x1bd)](),'year':z['number']()['optional'](),'hour':z['number']()[a148_0x5203cc(0x1bd)](),'minute':z['number']()[a148_0x5203cc(0x1bd)](),'second':z['number']()[a148_0x5203cc(0x1bd)]()})['optional'](),'from':z[a148_0x5203cc(0x1d4)]({'last':z[a148_0x5203cc(0x1cd)]([z[a148_0x5203cc(0x1d3)](),z[a148_0x5203cc(0x1ca)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a148_0x5203cc(0x1cb)]()[a148_0x5203cc(0x1bd)]()})[a148_0x5203cc(0x1c3)]((_0x23bf9b,_0x1b4d7e)=>{const _0x30dc1b=a148_0x5203cc;OPERATORS_REQUIRING_VALUE['has'](_0x23bf9b[_0x30dc1b(0x1d8)])&&(_0x23bf9b[_0x30dc1b(0x1a1)]===undefined||_0x23bf9b[_0x30dc1b(0x1a1)]===null)&&_0x1b4d7e[_0x30dc1b(0x1ec)]({'code':_0x30dc1b(0x1bf),'message':'Operator\x20\x27'+_0x23bf9b['type']+_0x30dc1b(0x1da),'path':[_0x30dc1b(0x1a1)]}),_0x23bf9b[_0x30dc1b(0x1d8)]===_0x30dc1b(0x1dc)&&_0x23bf9b[_0x30dc1b(0x1e6)]===undefined&&_0x23bf9b[_0x30dc1b(0x1e9)]===undefined&&_0x1b4d7e[_0x30dc1b(0x1ec)]({'code':_0x30dc1b(0x1bf),'message':_0x30dc1b(0x1ac),'params':{'validationCode':_0x30dc1b(0x1b0)}}),OPERATORS_REQUIRING_UNIT[_0x30dc1b(0x1cf)](_0x23bf9b['type'])&&_0x23bf9b['value']!==undefined&&!_0x23bf9b[_0x30dc1b(0x1c4)]&&_0x1b4d7e[_0x30dc1b(0x1ec)]({'code':_0x30dc1b(0x1bf),'message':_0x30dc1b(0x1a7)+_0x23bf9b[_0x30dc1b(0x1d8)]+_0x30dc1b(0x1cc),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x23bf9b['type']===_0x30dc1b(0x1b6)&&(!_0x23bf9b[_0x30dc1b(0x1d7)]&&_0x1b4d7e[_0x30dc1b(0x1ec)]({'code':_0x30dc1b(0x1bf),'message':_0x30dc1b(0x1c7),'path':[_0x30dc1b(0x1d7)]}),!_0x23bf9b[_0x30dc1b(0x1be)]&&_0x1b4d7e[_0x30dc1b(0x1ec)]({'code':'custom','message':_0x30dc1b(0x1db),'path':[_0x30dc1b(0x1be)]}));});export const ArrayMatchingSchema=z[a148_0x5203cc(0x1cd)]([z['literal']('any'),z[a148_0x5203cc(0x1ad)](a148_0x5203cc(0x1bc)),z[a148_0x5203cc(0x1d4)]({'atLeast':z[a148_0x5203cc(0x1d3)]()}),z['object']({'atMost':z[a148_0x5203cc(0x1d3)]()}),z[a148_0x5203cc(0x1d4)]({'exactly':z[a148_0x5203cc(0x1d3)]()})]);export const AggregationDefSchema=z[a148_0x5203cc(0x1df)]('type',[z['object']({'type':z[a148_0x5203cc(0x1a9)](['Sum','Min',a148_0x5203cc(0x1b8),a148_0x5203cc(0x1e2)]),'column':z[a148_0x5203cc(0x1ca)](),'groupingColumns':z[a148_0x5203cc(0x1b9)](z[a148_0x5203cc(0x1ca)]())[a148_0x5203cc(0x1bd)]()}),z[a148_0x5203cc(0x1d4)]({'type':z['literal']('Count'),'groupingColumns':z['array'](z[a148_0x5203cc(0x1ca)]())['optional']()}),z['object']({'type':z['literal'](a148_0x5203cc(0x1b3)),'columns':z['array'](z[a148_0x5203cc(0x1ca)]())}),z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1a9)]([a148_0x5203cc(0x1d2),'Last']),'column':z[a148_0x5203cc(0x1ca)](),'orderColumn':z[a148_0x5203cc(0x1ca)](),'groupingColumns':z[a148_0x5203cc(0x1b9)](z[a148_0x5203cc(0x1ca)]())[a148_0x5203cc(0x1bd)]()})]);export const TimeWindowDefSchema=z[a148_0x5203cc(0x1d4)]({'duration':z[a148_0x5203cc(0x1d3)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a148_0x5203cc(0x1a4),a148_0x5203cc(0x1b6)]);export const FilterColumnConditionDefSchema=z[a148_0x5203cc(0x1d4)]({'type':z['literal']('Column'),'column':z[a148_0x5203cc(0x1ca)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x1f5391,_0x333452)=>{const _0x4f0f58=a148_0x5203cc,_0x36734a=_0x1f5391['operator'][_0x4f0f58(0x1d8)];_0x1f5391['column']===_0x4f0f58(0x1a3)?!TIMESTAMP_OPERATORS[_0x4f0f58(0x1cf)](_0x36734a)&&_0x333452['addIssue']({'code':'custom','message':_0x4f0f58(0x1c8)+_0x36734a+'\x27)','path':[_0x4f0f58(0x1b5),'type']}):TIMESTAMP_OPERATORS[_0x4f0f58(0x1cf)](_0x36734a)&&_0x333452['addIssue']({'code':_0x4f0f58(0x1bf),'message':_0x4f0f58(0x1a7)+_0x36734a+_0x4f0f58(0x1d9),'path':[_0x4f0f58(0x1b5),'type']});});export const FilterRuleDefSchema=z['object']({'type':z[a148_0x5203cc(0x1ad)](a148_0x5203cc(0x1aa)),'conditions':z[a148_0x5203cc(0x1b9)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a148_0x5203cc(0x1c6)](()=>z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1ad)](a148_0x5203cc(0x1e8)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a148_0x5203cc(0x1bd)](),'exclude':z['boolean']()[a148_0x5203cc(0x1bd)](),'aggregation':AggregationDefSchema[a148_0x5203cc(0x1bd)](),'source':z[a148_0x5203cc(0x1ca)]()[a148_0x5203cc(0x1bd)](),'filter':FilterRuleDefSchema[a148_0x5203cc(0x1bd)](),'limit':z['number']()[a148_0x5203cc(0x1bd)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1ad)]('Behavior'),'attribute':z[a148_0x5203cc(0x1ca)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a148_0x5203cc(0x1bd)](),'exclude':z[a148_0x5203cc(0x1cb)]()[a148_0x5203cc(0x1bd)](),'aggregation':AggregationDefSchema[a148_0x5203cc(0x1bd)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a148_0x5203cc(0x1bd)](),'timeWindow':TimeWindowDefSchema[a148_0x5203cc(0x1bd)](),'limit':z[a148_0x5203cc(0x1d3)]()[a148_0x5203cc(0x1bd)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a148_0x5203cc(0x1ad)](a148_0x5203cc(0x1ea)),'column':z[a148_0x5203cc(0x1ca)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a148_0x5203cc(0x1c6)](()=>z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1a9)]([a148_0x5203cc(0x1aa),'Or']),'conditions':z[a148_0x5203cc(0x1b9)](ConditionDefSchema),'description':z[a148_0x5203cc(0x1ca)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1a9)](['include',a148_0x5203cc(0x1e1)]),'segment':z[a148_0x5203cc(0x1ca)]()[a148_0x5203cc(0x1e6)](0x1,a148_0x5203cc(0x1c5))});export const ConditionDefSchema=z[a148_0x5203cc(0x1c6)](()=>z[a148_0x5203cc(0x1cd)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a148_0x5203cc(0x1c6)](()=>z[a148_0x5203cc(0x1d4)]({'type':z['enum']([a148_0x5203cc(0x1aa),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a148_0x5203cc(0x1ca)]()[a148_0x5203cc(0x1bd)]()}));export const SegmentDefSchema=z[a148_0x5203cc(0x1d4)]({'type':z[a148_0x5203cc(0x1ad)](a148_0x5203cc(0x1ce))[a148_0x5203cc(0x1bd)](),'name':z[a148_0x5203cc(0x1ca)]()[a148_0x5203cc(0x1e6)](0x1,a148_0x5203cc(0x1dd)),'description':z['string']()[a148_0x5203cc(0x1bd)](),'folder':z[a148_0x5203cc(0x1ca)]()[a148_0x5203cc(0x1bd)](),'rule':RuleDefSchema[a148_0x5203cc(0x1bd)](),'kind':z[a148_0x5203cc(0x1a9)](['batch','realtime','funnel_stage'])[a148_0x5203cc(0x1bd)](),'visible':z[a148_0x5203cc(0x1cb)]()[a148_0x5203cc(0x1bd)](),'activations':z[a148_0x5203cc(0x1b9)](z[a148_0x5203cc(0x1b2)]())[a148_0x5203cc(0x1bd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;function a148_0x101b(){const _0xe2de4b=['36krRvUx','287553otNJKe','value','record','timestamp','TimeWithinNext','second','Min','Operator\x20\x27','GreaterEqual','enum','And','Equal','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','literal','Last','Less','MISSING_BETWEEN_BOUNDS','30wiISwL','any','CountDistinct','LessEqual','operator','TimeRange','851064dedziV','Max','array','986672nFQHEu','minute','all','optional','from','custom','IsNull','4606362lTfBRg','8974910pmzdOO','superRefine','unit','Segment\x20reference\x20must\x20not\x20be\x20empty','lazy','TimeRange\x20operator\x20requires\x20\x27duration\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Greater','string','boolean','\x27\x20requires\x20a\x20time\x20unit','union','segment','has','Sum','StartWith','First','number','object','year','1050894LFDeLF','duration','type','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','\x27\x20requires\x20a\x20value','TimeRange\x20operator\x20requires\x20\x27from\x27','Between','Segment\x20name\x20is\x20required','EndWith','discriminatedUnion','Contain','exclude','Average','Regexp','136RbvhqB','TimeWithinPast','min','day','Value','max','Column','274644ZhObGi','addIssue'];a148_0x101b=function(){return _0xe2de4b;};return a148_0x101b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a149_0x10d0d2=a149_0x132f;(function(_0x4cd0ce,_0x211f9c){const _0x3d8938=a149_0x132f,_0x3e2d42=_0x4cd0ce();while(!![]){try{const _0x703f1b=parseInt(_0x3d8938(0xa2))/0x1+-parseInt(_0x3d8938(0x96))/0x2+-parseInt(_0x3d8938(0xa9))/0x3+parseInt(_0x3d8938(0x9e))/0x4+-parseInt(_0x3d8938(0x8e))/0x5+parseInt(_0x3d8938(0x8d))/0x6*(parseInt(_0x3d8938(0x91))/0x7)+parseInt(_0x3d8938(0x93))/0x8*(parseInt(_0x3d8938(0xa5))/0x9);if(_0x703f1b===_0x211f9c)break;else _0x3e2d42['push'](_0x3e2d42['shift']());}catch(_0x1dd877){_0x3e2d42['push'](_0x3e2d42['shift']());}}}(a149_0xd157,0xeb192));import{readFileSync}from'fs';import*as a149_0x43d2ac from'path';function a149_0x132f(_0x4b335b,_0x127643){_0x4b335b=_0x4b335b-0x8b;const _0xd15764=a149_0xd157();let _0x132f28=_0xd15764[_0x4b335b];return _0x132f28;}import*as a149_0x2bd3c9 from'yaml';function a149_0xd157(){const _0x12e634=['209784AImUeD','parseDocument','message','1802476AEYurZ','relative','error','campaign_type','segment','template','warnings','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','7297444hSAFSr','YAML\x20parse\x20error:\x20','result','YAML_PARSE_ERROR','1407740PLsdCH','map','journey','189QwsVYV','not\x20a\x20','campaign','length','4783179KtWJpv','type','valid','skipped','8963634yfcnVm','9090650KzuMfA','has','object','7vGoYQp','filterType'];a149_0xd157=function(){return _0x12e634;};return a149_0xd157();}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(['email','push']);export function isJourneyDef(_0xd8890e){const _0xf1cbe5=a149_0x132f;return typeof _0xd8890e===_0xf1cbe5(0x90)&&_0xd8890e!==null&&_0xf1cbe5(0xaa)in _0xd8890e&&_0xd8890e[_0xf1cbe5(0xaa)]===_0xf1cbe5(0xa4);}export function isCampaignDef(_0x246331){const _0x1b812a=a149_0x132f;if(typeof _0x246331!==_0x1b812a(0x90)||_0x246331===null)return![];const _0x280669=_0x246331,_0x5f53b0=VALID_CAMPAIGN_TYPES[_0x1b812a(0x8f)](_0x280669[_0x1b812a(0x99)]);if(_0x280669[_0x1b812a(0xaa)]===_0x1b812a(0xa7)&&_0x5f53b0)return!![];if(_0x5f53b0&&!_0x280669[_0x1b812a(0xaa)])return!![];return![];}export function isTemplateDef(_0x56eb25){const _0x6e6b16=a149_0x132f;return typeof _0x56eb25===_0x6e6b16(0x90)&&_0x56eb25!==null&&_0x6e6b16(0xaa)in _0x56eb25&&_0x56eb25[_0x6e6b16(0xaa)]===_0x6e6b16(0x9b);}export function isValidationResult(_0x15e6cc){const _0x581464=a149_0x132f;return!(_0x581464(0x8c)in _0x15e6cc);}export function createParseErrorResult(_0x4a1a7a,_0x57f5e9,_0x1e1417,_0xdf1af4,_0x196a07=a149_0x10d0d2(0x9a)){const _0x53bca9=a149_0x10d0d2;return{'filePath':_0x4a1a7a,'relativePath':_0x57f5e9,'source':_0x1e1417,'result':{'valid':![],'errors':[{'level':_0x53bca9(0x98),'path':'','code':_0x53bca9(0xa1),'message':_0xdf1af4}],'warnings':[]},'fileType':_0x196a07};}export function validateYamlFile(_0x46768c,_0xa5d373,_0x369a08={}){const _0x335330=a149_0x10d0d2,_0xfe8e48=a149_0x43d2ac[_0x335330(0x97)](_0xa5d373,_0x46768c)||a149_0x43d2ac['basename'](_0x46768c);try{const _0x117f5c=readFileSync(_0x46768c,'utf-8'),_0xc58d96=a149_0x2bd3c9[_0x335330(0x94)](_0x117f5c),_0x5652b7=_0xc58d96['toJSON']();if(!_0x5652b7)return createParseErrorResult(_0x46768c,_0xfe8e48,_0x117f5c,_0x335330(0x9d));let _0x3aee6e;if(isJourneyDef(_0x5652b7))_0x3aee6e=_0x335330(0xa4);else{if(isCampaignDef(_0x5652b7))_0x3aee6e=_0x335330(0xa7);else isTemplateDef(_0x5652b7)?_0x3aee6e='template':_0x3aee6e=_0x335330(0x9a);}if(_0x369a08[_0x335330(0x92)]&&_0x3aee6e!==_0x369a08['filterType'])return{'filePath':_0x46768c,'relativePath':_0xfe8e48,'skipped':!![],'reason':_0x335330(0xa6)+_0x369a08[_0x335330(0x92)]};const _0x13e16d={'source':_0x117f5c,'document':_0xc58d96};let _0x3b4ff1;if(_0x3aee6e===_0x335330(0xa4))_0x3b4ff1=validateJourneyDef(_0x5652b7,_0x13e16d);else{if(_0x3aee6e===_0x335330(0xa7))_0x3b4ff1=validateCampaignDef(_0x5652b7,_0x13e16d);else _0x3aee6e===_0x335330(0x9b)?_0x3b4ff1=validateTemplateDef(_0x5652b7,_0x13e16d):_0x3b4ff1=validateSegmentDef(_0x5652b7,_0x13e16d);}return{'filePath':_0x46768c,'relativePath':_0xfe8e48,'source':_0x117f5c,'result':_0x3b4ff1,'fileType':_0x3aee6e};}catch(_0x520d51){const _0x4686f8=_0x520d51 instanceof Error?_0x520d51[_0x335330(0x95)]:String(_0x520d51);return createParseErrorResult(_0x46768c,_0xfe8e48,'',_0x335330(0x9f)+_0x4686f8);}}export function validateYamlFiles(_0x3f10f8,_0x144a5a,_0x45a7a1={}){const _0x53f6a8=a149_0x10d0d2;return _0x3f10f8[_0x53f6a8(0xa3)](_0x4c816b=>validateYamlFile(_0x4c816b,_0x144a5a,_0x45a7a1));}export function calculateSummary(_0x50f8de){const _0x5bb6bf=a149_0x10d0d2;let _0x11a797=0x0,_0x77b787=0x0,_0xf601f1=0x0,_0x306dc8=0x0;for(const _0x272de9 of _0x50f8de){if(!isValidationResult(_0x272de9)){_0x306dc8++;continue;}_0x272de9['result'][_0x5bb6bf(0x8b)]?_0x11a797++:_0x77b787++,_0xf601f1+=_0x272de9[_0x5bb6bf(0xa0)][_0x5bb6bf(0x9c)][_0x5bb6bf(0xa8)];}return{'validCount':_0x11a797,'invalidCount':_0x77b787,'warningCount':_0xf601f1,'skippedCount':_0x306dc8,'hasErrors':_0x77b787>0x0};}
|