@treasuredata/tdx 2026.3.29 → 2026.3.31
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.d.ts +1 -1
- package/dist/cli-categories.d.ts.map +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +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/api-command.js.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.d.ts +55 -0
- package/dist/commands/cas-command.d.ts.map +1 -0
- package/dist/commands/cas-command.js +1 -0
- package/dist/commands/cas-command.js.map +1 -0
- package/dist/commands/cas-segment-command.d.ts +18 -0
- package/dist/commands/cas-segment-command.d.ts.map +1 -0
- package/dist/commands/cas-segment-command.js +1 -0
- package/dist/commands/cas-segment-command.js.map +1 -0
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.d.ts.map +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/unset-command.js.map +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-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.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/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/session.js.map +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +77 -0
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -0
- package/dist/sdk/cas/cas-api-client.js.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts +38 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -0
- package/dist/sdk/cas/index.d.ts +61 -0
- package/dist/sdk/cas/index.d.ts.map +1 -0
- package/dist/sdk/cas/index.js +1 -0
- package/dist/sdk/cas/index.js.map +1 -0
- package/dist/sdk/cas/pull-workflow.d.ts +53 -0
- package/dist/sdk/cas/pull-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/pull-workflow.js +1 -0
- package/dist/sdk/cas/pull-workflow.js.map +1 -0
- package/dist/sdk/cas/push-workflow.d.ts +50 -0
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/push-workflow.js +1 -0
- package/dist/sdk/cas/push-workflow.js.map +1 -0
- package/dist/sdk/cas/types.d.ts +115 -0
- package/dist/sdk/cas/types.d.ts.map +1 -0
- package/dist/sdk/cas/types.js +1 -0
- package/dist/sdk/cas/types.js.map +1 -0
- 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.d.ts +4 -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.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.d.ts +6 -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.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cas.d.ts +242 -0
- package/dist/sdk/types/cas.d.ts.map +1 -0
- package/dist/sdk/types/cas.js +1 -0
- package/dist/sdk/types/cas.js.map +1 -0
- package/dist/sdk/types/index.d.ts +3 -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.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46fee9,_0x907be6){const _0xd1b4ad=a152_0x3586,_0x147929=_0x46fee9();while(!![]){try{const _0x3b91b1=parseInt(_0xd1b4ad(0x134))/0x1+parseInt(_0xd1b4ad(0x131))/0x2+parseInt(_0xd1b4ad(0x13f))/0x3*(parseInt(_0xd1b4ad(0x13e))/0x4)+parseInt(_0xd1b4ad(0x13a))/0x5+-parseInt(_0xd1b4ad(0x132))/0x6*(-parseInt(_0xd1b4ad(0x13d))/0x7)+-parseInt(_0xd1b4ad(0x140))/0x8*(-parseInt(_0xd1b4ad(0x136))/0x9)+-parseInt(_0xd1b4ad(0x139))/0xa;if(_0x3b91b1===_0x907be6)break;else _0x147929['push'](_0x147929['shift']());}catch(_0x993a3e){_0x147929['push'](_0x147929['shift']());}}}(a152_0x4cef,0x75fcd));export function buildFolderIdToPathMap(_0x15aa6b){const _0x48e9ed=a152_0x3586,_0x302e77=new Map(),_0x47907d=new Map();for(const _0x2ac171 of _0x15aa6b){_0x47907d['set'](_0x2ac171['id'],_0x2ac171);}const _0x30bd0d=new Set();for(const _0x5da120 of _0x15aa6b){!_0x5da120[_0x48e9ed(0x13c)]&&_0x30bd0d[_0x48e9ed(0x133)](_0x5da120['id']);}function _0x5c65aa(_0x155eb3){const _0x362152=_0x48e9ed;if(_0x302e77[_0x362152(0x13b)](_0x155eb3['id']))return _0x302e77[_0x362152(0x137)](_0x155eb3['id']);if(_0x30bd0d['has'](_0x155eb3['id']))return _0x302e77[_0x362152(0x135)](_0x155eb3['id'],''),'';if(_0x155eb3[_0x362152(0x13c)]){const _0xa1fb6f=_0x47907d['get'](_0x155eb3['parentFolderId']);if(_0xa1fb6f){const _0x1b4b58=_0x5c65aa(_0xa1fb6f),_0x5e4306=_0x1b4b58?_0x1b4b58+'/'+_0x155eb3[_0x362152(0x138)]:_0x155eb3[_0x362152(0x138)];return _0x302e77[_0x362152(0x135)](_0x155eb3['id'],_0x5e4306),_0x5e4306;}}const _0x1f8436=_0x155eb3[_0x362152(0x138)];return _0x302e77[_0x362152(0x135)](_0x155eb3['id'],_0x1f8436),_0x1f8436;}for(const _0x410270 of _0x15aa6b){_0x5c65aa(_0x410270);}return _0x302e77;}export function buildFolderPathToIdMap(_0x508552){const _0x319a31=new Map(),_0x12eca9=new Map();for(const _0x1a5e0c of _0x508552){_0x12eca9['set'](_0x1a5e0c['id'],_0x1a5e0c);}const _0x5164ce=new Set();for(const _0xa16ad0 of _0x508552){!_0xa16ad0['parentFolderId']&&_0x5164ce['add'](_0xa16ad0['id']);}function _0x4bfa11(_0x4a249b){const _0x1c74b1=a152_0x3586;if(_0x5164ce[_0x1c74b1(0x13b)](_0x4a249b['id']))return'';if(_0x4a249b[_0x1c74b1(0x13c)]){const _0x1727f0=_0x12eca9['get'](_0x4a249b[_0x1c74b1(0x13c)]);if(_0x1727f0){const _0x27a1df=_0x4bfa11(_0x1727f0);return _0x27a1df?_0x27a1df+'/'+_0x4a249b[_0x1c74b1(0x138)]:_0x4a249b[_0x1c74b1(0x138)];}}return _0x4a249b[_0x1c74b1(0x138)];}for(const _0x15b855 of _0x508552){const _0x409f15=_0x4bfa11(_0x15b855);_0x319a31['set'](_0x409f15,_0x15b855['id']);}return _0x319a31;}function a152_0x3586(_0x31ab5c,_0x4e8c79){_0x31ab5c=_0x31ab5c-0x131;const _0x4cefd3=a152_0x4cef();let _0x35869e=_0x4cefd3[_0x31ab5c];return _0x35869e;}function a152_0x4cef(){const _0x43a2bc=['2457725hxFBzx','has','parentFolderId','2612309tgEZQx','130724yYjwLE','87hRbPnx','8FwVJHj','1521790UwaIXC','12ZiKzkZ','add','412955OhQXjv','set','3636081ZyHIIJ','get','name','32802500zdWhnR'];a152_0x4cef=function(){return _0x43a2bc;};return a152_0x4cef();}export function buildFolderMaps(_0x1f0dd8){const _0x385a84=buildFolderIdToPathMap(_0x1f0dd8),_0x5ed4c3=new Map();for(const [_0x331ebe,_0x185928]of _0x385a84){_0x5ed4c3['set'](_0x185928,_0x331ebe);}return{'idToPath':_0x385a84,'pathToId':_0x5ed4c3};}export function getFolderPath(_0x132b28,_0x21c506){const _0xb369d4=a152_0x3586;if(!_0x132b28)return'';return _0x21c506[_0xb369d4(0x137)](_0x132b28)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x116e58,_0x49a1a1){const _0x4711c8=a153_0x4f28,_0x1484ff=_0x116e58();while(!![]){try{const _0x58ba2b=parseInt(_0x4711c8(0x193))/0x1*(parseInt(_0x4711c8(0x186))/0x2)+-parseInt(_0x4711c8(0x18f))/0x3+-parseInt(_0x4711c8(0x199))/0x4+-parseInt(_0x4711c8(0x18c))/0x5+parseInt(_0x4711c8(0x183))/0x6+parseInt(_0x4711c8(0x16d))/0x7+-parseInt(_0x4711c8(0x192))/0x8*(-parseInt(_0x4711c8(0x175))/0x9);if(_0x58ba2b===_0x49a1a1)break;else _0x1484ff['push'](_0x1484ff['shift']());}catch(_0x3685d4){_0x1484ff['push'](_0x1484ff['shift']());}}}(a153_0x451b,0x4f414));import a153_0x35eca9 from'path';function a153_0x4f28(_0x28b64b,_0x2efcea){_0x28b64b=_0x28b64b-0x16b;const _0x451b73=a153_0x451b();let _0x4f287b=_0x451b73[_0x28b64b];return _0x4f287b;}import{parse as a153_0x137018}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';function a153_0x451b(){const _0x509ef4=['endsWith','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','Cannot\x20navigate\x20above\x20root','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','746732DhWMyM','split','resolve','Path\x20cannot\x20be\x20empty','slice','name','raw','startsWith','9mptdaB','segment','substring','.yaml','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','Relative\x20path\x20cannot\x20be\x20empty','root','tdx.json','dirname','push','parse','length','journey','parent_segment','645714CvrqqB','segments','Path\x20attempts\x20to\x20navigate\x20above\x20root','87848DvtjgL','filter','replace','trim','No\x20tdx.json\x20found\x20for\x20file:\x20','test','1734690ldUNOz','type','exists','1012182JBoyQr','isAbsolute','Path\x20segment\x20cannot\x20be\x20empty','6663208EiwXdP','3hHJdcB','readFile','join','.yml','Cannot\x20split\x20empty\x20path','relative','680032BAAhAu','File\x20not\x20found:\x20'];a153_0x451b=function(){return _0x509ef4;};return a153_0x451b();}export function parsePath(_0x5eb385){const _0x32c4e9=a153_0x4f28;if(!_0x5eb385||_0x5eb385[_0x32c4e9(0x189)]()==='')throw new Error(_0x32c4e9(0x170));const _0x59710d=_0x5eb385[_0x32c4e9(0x189)]();if(_0x59710d==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x5eb385};const _0x4d862a=_0x59710d['startsWith']('/')?_0x59710d[_0x32c4e9(0x177)](0x1):_0x59710d,_0x21298a=_0x4d862a[_0x32c4e9(0x16e)]('/')[_0x32c4e9(0x187)](_0x28f167=>_0x28f167!=='');if(_0x21298a[_0x32c4e9(0x180)]===0x0)throw new Error(_0x32c4e9(0x19c));const _0x5e44d0=_0x59710d['startsWith']('/')||!isRelativePathSegment(_0x21298a[0x0]);for(const _0x107c3b of _0x21298a){validatePathSegment(_0x107c3b);}return{'segments':_0x21298a,'isAbsolute':_0x5e44d0,'raw':_0x5eb385};}function isRelativePathSegment(_0x2ae7b3){return _0x2ae7b3==='.'||_0x2ae7b3==='..';}function validatePathSegment(_0x30df4a){const _0x5d9024=a153_0x4f28;if(_0x30df4a==='')throw new Error(_0x5d9024(0x191));if(_0x30df4a==='.'||_0x30df4a==='..')return;if(/[\x00-\x1F\x7F]/[_0x5d9024(0x18b)](_0x30df4a))throw new Error(_0x5d9024(0x16b)+_0x30df4a);if(_0x30df4a!==_0x30df4a[_0x5d9024(0x189)]()){}}export function validatePath(_0x554cb3){const _0x143bf7=a153_0x4f28;if(_0x554cb3['segments'][_0x143bf7(0x180)]===0x0&&!_0x554cb3[_0x143bf7(0x190)])throw new Error(_0x143bf7(0x17a));if(_0x554cb3['isAbsolute']){if(_0x554cb3[_0x143bf7(0x184)][0x0]==='..')throw new Error(_0x143bf7(0x179));let _0x177e25=0x0;for(const _0x144898 of _0x554cb3[_0x143bf7(0x184)]){if(_0x144898==='..'){if(_0x177e25===0x0)throw new Error(_0x143bf7(0x185));_0x177e25--;}else _0x144898!=='.'&&_0x177e25++;}}}export function joinPaths(_0x148e25,_0x500772){const _0x11bb21=a153_0x4f28;if(!_0x148e25||_0x148e25==='/')return _0x500772;if(!_0x500772||_0x500772==='.')return _0x148e25;if(_0x500772[_0x11bb21(0x174)]('/'))return _0x500772;const _0x29bac7=parsePath(_0x148e25),_0x172f9e=parsePath(_0x500772),_0x1b2695=[..._0x29bac7[_0x11bb21(0x184)]];for(const _0x3d735e of _0x172f9e[_0x11bb21(0x184)]){if(_0x3d735e==='.')continue;else{if(_0x3d735e==='..'){if(_0x1b2695[_0x11bb21(0x180)]===0x0)throw new Error(_0x11bb21(0x19d));_0x1b2695['pop']();}else _0x1b2695['push'](_0x3d735e);}}const _0x2ae8bb=_0x1b2695['join']('/');return _0x29bac7[_0x11bb21(0x173)]['startsWith']('/')?'/'+_0x2ae8bb:_0x2ae8bb;}export function normalizePath(_0xf40179){const _0x1600b4=a153_0x4f28,_0x717299=parsePath(_0xf40179),_0x5d1078=[];for(const _0x46ec2d of _0x717299['segments']){if(_0x46ec2d==='.')continue;else{if(_0x46ec2d==='..'){if(_0x5d1078['length']===0x0){if(_0x717299[_0x1600b4(0x190)])throw new Error(_0x1600b4(0x19d));_0x5d1078[_0x1600b4(0x17e)]('..');}else _0x5d1078[_0x5d1078[_0x1600b4(0x180)]-0x1]==='..'?_0x5d1078[_0x1600b4(0x17e)]('..'):_0x5d1078['pop']();}else _0x5d1078[_0x1600b4(0x17e)](_0x46ec2d);}}if(_0x5d1078['length']===0x0)return _0x717299[_0x1600b4(0x190)]?'/':'.';const _0x1b317d=_0x5d1078['join']('/');return _0x717299['raw'][_0x1600b4(0x174)]('/')?'/'+_0x1b317d:_0x1b317d;}export function getParentPath(_0x3c9968){const _0x10c42a=a153_0x4f28,_0x58a1bc=parsePath(_0x3c9968);if(_0x58a1bc[_0x10c42a(0x184)][_0x10c42a(0x180)]<=0x1)return'/';const _0x4c21d4=_0x58a1bc['segments'][_0x10c42a(0x171)](0x0,-0x1)['join']('/');return _0x58a1bc[_0x10c42a(0x173)]['startsWith']('/')?'/'+_0x4c21d4:_0x4c21d4;}export function getBaseName(_0x1a345a){const _0x4b90c7=a153_0x4f28,_0x235869=parsePath(_0x1a345a);return _0x235869[_0x4b90c7(0x184)][_0x235869['segments'][_0x4b90c7(0x180)]-0x1]||'';}export function isChildPath(_0x1d10f5,_0x37df3b){const _0x3b8a4f=a153_0x4f28,_0xc86af0=parsePath(_0x1d10f5),_0x1a264d=parsePath(_0x37df3b);if(_0xc86af0[_0x3b8a4f(0x184)][_0x3b8a4f(0x180)]<=_0x1a264d[_0x3b8a4f(0x184)]['length'])return![];for(let _0x1f9c88=0x0;_0x1f9c88<_0x1a264d[_0x3b8a4f(0x184)]['length'];_0x1f9c88++){if(_0xc86af0[_0x3b8a4f(0x184)][_0x1f9c88]!==_0x1a264d['segments'][_0x1f9c88])return![];}return!![];}export function splitPath(_0x15f897){const _0x517246=a153_0x4f28,_0x188c94=parsePath(_0x15f897);if(_0x188c94[_0x517246(0x184)]['length']===0x0)throw new Error(_0x517246(0x197));if(_0x188c94['segments']['length']===0x1)return{'parent':_0x188c94[_0x517246(0x184)][0x0]};return{'parent':_0x188c94[_0x517246(0x184)][0x0],'child':_0x188c94[_0x517246(0x184)][_0x517246(0x171)](0x1)['join']('/')};}export function isYamlFilePath(_0x596ee0){const _0x3059f9=a153_0x4f28;return _0x596ee0[_0x3059f9(0x19b)](_0x3059f9(0x196))||_0x596ee0[_0x3059f9(0x19b)](_0x3059f9(0x178));}export async function resolveYamlFilePath(_0x47b6b3,_0x15d68e=nodeFileSystem){const _0x540516=a153_0x4f28,_0x4bff0c=a153_0x35eca9[_0x540516(0x16f)](_0x47b6b3);if(!await _0x15d68e[_0x540516(0x18e)](_0x4bff0c))throw new Error(_0x540516(0x19a)+_0x47b6b3);let _0x3aa812=a153_0x35eca9['dirname'](_0x4bff0c),_0x1e83c2=null,_0x226638=null;const _0x57df58=a153_0x35eca9['parse'](_0x3aa812)[_0x540516(0x17b)];while(_0x3aa812!==_0x57df58){const _0x47528e=a153_0x35eca9[_0x540516(0x195)](_0x3aa812,_0x540516(0x17c));if(await _0x15d68e[_0x540516(0x18e)](_0x47528e)){_0x1e83c2=_0x47528e,_0x226638=_0x3aa812;break;}_0x3aa812=a153_0x35eca9[_0x540516(0x17d)](_0x3aa812);}if(!_0x1e83c2||!_0x226638)throw new Error(_0x540516(0x18a)+_0x47b6b3+'\x0a'+'Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.');const _0x19b6ba=await _0x15d68e['readFile'](_0x1e83c2),_0x16afa8=JSON[_0x540516(0x17f)](_0x19b6ba),_0x210f1d=_0x16afa8[_0x540516(0x182)];if(!_0x210f1d)throw new Error(_0x540516(0x16c));const _0x590c7e=await _0x15d68e[_0x540516(0x194)](_0x4bff0c),_0x191b47=a153_0x137018(_0x590c7e),_0x5ae85c=_0x191b47[_0x540516(0x172)];if(!_0x5ae85c)throw new Error('Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'+_0x47b6b3);const _0x79e443=_0x191b47[_0x540516(0x18d)]===_0x540516(0x181)?_0x540516(0x181):_0x540516(0x176),_0x2ee893=a153_0x35eca9[_0x540516(0x198)](_0x226638,_0x4bff0c),_0x22101c=a153_0x35eca9[_0x540516(0x17d)](_0x2ee893),_0x3a9b29=_0x22101c==='.'?'':_0x22101c[_0x540516(0x188)](/\\/g,'/'),_0x28c54a=_0x3a9b29?_0x210f1d+'/'+_0x3a9b29+'/'+_0x5ae85c:_0x210f1d+'/'+_0x5ae85c;return{'parentSegment':_0x210f1d,'segmentName':_0x5ae85c,'folderPath':_0x3a9b29,'fullPath':_0x28c54a,'resourceType':_0x79e443,'content':_0x590c7e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x581905,_0x3d367b){const _0x1d2e57=a154_0x3113,_0x5f53ae=_0x581905();while(!![]){try{const _0x24eaa1=-parseInt(_0x1d2e57(0x1bc))/0x1+-parseInt(_0x1d2e57(0x1b5))/0x2+-parseInt(_0x1d2e57(0x1ba))/0x3*(parseInt(_0x1d2e57(0x1b6))/0x4)+-parseInt(_0x1d2e57(0x1be))/0x5*(parseInt(_0x1d2e57(0x1b7))/0x6)+parseInt(_0x1d2e57(0x1b3))/0x7+-parseInt(_0x1d2e57(0x1b8))/0x8+parseInt(_0x1d2e57(0x1b9))/0x9*(parseInt(_0x1d2e57(0x1bb))/0xa);if(_0x24eaa1===_0x3d367b)break;else _0x5f53ae['push'](_0x5f53ae['shift']());}catch(_0x4903f9){_0x5f53ae['push'](_0x5f53ae['shift']());}}}(a154_0x4095,0xa88dc));function a154_0x3113(_0x3b3b15,_0x3c0ca8){_0x3b3b15=_0x3b3b15-0x1b3;const _0x4095ee=a154_0x4095();let _0x311379=_0x4095ee[_0x3b3b15];return _0x311379;}function a154_0x4095(){const _0x16364c=['122830zGgnVv','817611cVzghT','Invalid\x20segment\x20reference\x20format:\x20','25FPwFCD','.\x20Parent\x20name\x20cannot\x20be\x20empty','indexOf','8745401Kdbpks','substring','531290tDRExv','4vPbSyo','1073658WisFym','583512LCNrAv','1116CUuWyV','93387qdMfqv'];a154_0x4095=function(){return _0x16364c;};return a154_0x4095();}export function parseSegmentRef(_0x1971bb){const _0x156acf=a154_0x3113,_0x279aa8=_0x1971bb[_0x156acf(0x1c0)]('/');if(_0x279aa8===-0x1)return{'parentId':_0x1971bb};if(_0x279aa8===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x1971bb+_0x156acf(0x1bf));const _0x54bc1c=_0x1971bb[_0x156acf(0x1b4)](0x0,_0x279aa8),_0x2c6f71=_0x1971bb[_0x156acf(0x1b4)](_0x279aa8+0x1);if(_0x2c6f71==='')throw new Error(_0x156acf(0x1bd)+_0x1971bb+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x54bc1c,'childId':_0x2c6f71};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x360777,_0x4b1e97){const _0x31ed10=a155_0x36ac,_0x31e75f=_0x360777();while(!![]){try{const _0x4759df=parseInt(_0x31ed10(0x120))/0x1*(-parseInt(_0x31ed10(0x12e))/0x2)+parseInt(_0x31ed10(0x128))/0x3*(parseInt(_0x31ed10(0x132))/0x4)+parseInt(_0x31ed10(0x11a))/0x5*(parseInt(_0x31ed10(0x129))/0x6)+parseInt(_0x31ed10(0x127))/0x7*(parseInt(_0x31ed10(0x125))/0x8)+parseInt(_0x31ed10(0x10e))/0x9+-parseInt(_0x31ed10(0x112))/0xa+parseInt(_0x31ed10(0x126))/0xb*(-parseInt(_0x31ed10(0xff))/0xc);if(_0x4759df===_0x4b1e97)break;else _0x31e75f['push'](_0x31e75f['shift']());}catch(_0x59ce78){_0x31e75f['push'](_0x31e75f['shift']());}}}(a155_0x2e3d,0x526c6));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a155_0x36ac(_0x4bdffc,_0x3310e8){_0x4bdffc=_0x4bdffc-0xf0;const _0x2e3da7=a155_0x2e3d();let _0x36acd8=_0x2e3da7[_0x4bdffc];return _0x36acd8;}export function validateSegmentDef(_0x6a22b0,_0x15adcd={},_0x432269={}){const _0x24bd85=a155_0x36ac;if(_0x432269[_0x24bd85(0x119)])return runSemanticChecks(_0x6a22b0,_0x15adcd);const _0x26f70f=SegmentDefSchema[_0x24bd85(0xf5)](_0x6a22b0);if(_0x26f70f[_0x24bd85(0x101)])return runSemanticChecks(_0x26f70f['data'],_0x15adcd);return zodErrorsToValidationResult(_0x26f70f[_0x24bd85(0xfb)],_0x15adcd);}export function validateRuleDef(_0x3eb6fe,_0x40f5ac,_0x32311){const _0x551a0b=a155_0x36ac;if(!_0x3eb6fe)return[];const _0x48681=RuleDefSchema[_0x551a0b(0xf5)](_0x3eb6fe);if(_0x48681[_0x551a0b(0x101)])return checkRule(_0x48681[_0x551a0b(0x11c)],_0x40f5ac,_0x32311);const _0x2c6897=flattenZodIssues(_0x48681['error'][_0x551a0b(0xf8)]);return _0x2c6897['map'](_0x43cd13=>{const _0x93233=_0x551a0b,_0x4c4503=formatZodPath(_0x43cd13[_0x93233(0x12d)]),_0x3357ca=_0x4c4503?_0x40f5ac+'.'+_0x4c4503:_0x40f5ac,_0x508984=mapZodIssueToCode(_0x43cd13,_0x4c4503),_0x2562c7=getLocationFromPath(_0x32311[_0x93233(0x124)],_0x32311[_0x93233(0x10a)],pathToArray(_0x3357ca));return{'level':_0x93233(0xfb),'path':_0x3357ca,'code':_0x508984,'message':_0x43cd13[_0x93233(0x10c)],..._0x2562c7&&{'location':_0x2562c7}};});}function zodErrorsToValidationResult(_0x48e74e,_0x33ea6a){const _0xfd06a2=a155_0x36ac,_0x58905f=flattenZodIssues(_0x48e74e[_0xfd06a2(0xf8)]),_0x1b8155=_0x58905f[_0xfd06a2(0x12a)](_0x336c44=>{const _0xc4a974=_0xfd06a2,_0x55742f=formatZodPath(_0x336c44[_0xc4a974(0x12d)]),_0xcd935=mapZodIssueToCode(_0x336c44,_0x55742f),_0x18dc0f=getLocationFromPath(_0x33ea6a[_0xc4a974(0x124)],_0x33ea6a[_0xc4a974(0x10a)],_0x336c44[_0xc4a974(0x12d)]['map'](_0x39e38b=>typeof _0x39e38b==='symbol'?String(_0x39e38b):_0x39e38b));return{'level':_0xc4a974(0xfb),'path':_0x55742f,'code':_0xcd935,'message':_0x336c44['message'],..._0x18dc0f&&{'location':_0x18dc0f}};});return{'valid':![],'errors':_0x1b8155,'warnings':[]};}function mapZodIssueToCode(_0x325c7b,_0x1a623c){const _0xd0fc2f=a155_0x36ac,_0x1ece00=_0x325c7b[_0xd0fc2f(0x12f)]==='custom'?_0x325c7b['params']:undefined;if(_0x1a623c===_0xd0fc2f(0xf0))return _0xd0fc2f(0x122);if(_0x1a623c===_0xd0fc2f(0x113)||_0x1a623c[_0xd0fc2f(0x116)]('.type')){if(_0x325c7b['code']===_0xd0fc2f(0xfc)){if(_0x1a623c===_0xd0fc2f(0x113)||_0x1a623c[_0xd0fc2f(0x133)](/\.conditions\[\d+\]\.type$/))return _0xd0fc2f(0x11f);}}if(_0x1a623c['endsWith'](_0xd0fc2f(0x108)))return _0xd0fc2f(0x134);if(_0x1a623c[_0xd0fc2f(0x116)](_0xd0fc2f(0x100)))return'MISSING_OPERATOR_VALUE';if(_0x1ece00?.[_0xd0fc2f(0xf9)]==='MISSING_BETWEEN_BOUNDS')return'MISSING_BETWEEN_BOUNDS';if(_0x1ece00?.[_0xd0fc2f(0xf9)]===_0xd0fc2f(0x130))return'MISSING_TIME_UNIT';if(_0x1a623c['endsWith'](_0xd0fc2f(0xf4))||_0x1a623c===_0xd0fc2f(0x117))return'MISSING_CONDITIONS';if(_0x1a623c['includes']('arrayMatching'))return _0xd0fc2f(0x118);if(_0x1a623c['endsWith'](_0xd0fc2f(0x111)))return _0xd0fc2f(0x131);return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x2eb7a6,_0x44f5c7){const _0x37808c=a155_0x36ac,_0x48d7d5=[];_0x2eb7a6[_0x37808c(0x11d)]&&_0x48d7d5['push'](...checkRule(_0x2eb7a6[_0x37808c(0x11d)],_0x37808c(0x11d),_0x44f5c7));const _0x5a2884=_0x48d7d5[_0x37808c(0x105)](_0x549dcb=>_0x549dcb[_0x37808c(0xf6)]===_0x37808c(0xfb)),_0x5a2b77=_0x48d7d5[_0x37808c(0x105)](_0x46bea8=>_0x46bea8['level']===_0x37808c(0x114));return{'valid':_0x5a2884['length']===0x0,'errors':_0x5a2884,'warnings':_0x5a2b77};}function checkRule(_0x3c43ed,_0x34f0b5,_0x1bd801){const _0x12a26e=a155_0x36ac,_0xe685e1=[];if(_0x3c43ed[_0x12a26e(0x117)][_0x12a26e(0x11e)]===0x0)return _0xe685e1[_0x12a26e(0x107)]({'level':_0x12a26e(0xfb),'path':_0x34f0b5+'.conditions','code':_0x12a26e(0x10f),'message':_0x12a26e(0x12c),'location':getLocationFromPath(_0x1bd801[_0x12a26e(0x124)],_0x1bd801['source'],pathToArray(_0x34f0b5+_0x12a26e(0xf4)))}),_0xe685e1;return _0xe685e1[_0x12a26e(0x107)](...checkConditions(_0x3c43ed[_0x12a26e(0x117)],_0x34f0b5,_0x1bd801)),_0xe685e1;}function a155_0x2e3d(){const _0x28aa7a=['success','Value','Behavior','\x27\x20with\x20attribute\x20\x27','filter','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','push','.operator.type','Behavior\x20source\x20\x27','source','And','message','Attribute\x20name\x20cannot\x20be\x20empty','5036013kQywHg','EMPTY_CONDITIONS','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','.segment','1473500nwtgtj','rule.type','warning','attribute','endsWith','conditions','INVALID_ARRAY_MATCHING','skipSchema','901935VafPij','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','data','rule','length','INVALID_RULE_TYPE','2YKryjq','.source','MISSING_NAME','.filter','document','3387472BkkjCN','11bNvuBU','7Onfyaw','66ADNciB','12FBBxpi','map','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','path','121010RxoxiU','code','MISSING_TIME_UNIT','MISSING_SEGMENT_REFERENCE','70376jXBJKU','match','INVALID_OPERATOR_TYPE','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','.attribute','type','name','BEHAVIOR_SOURCE_MISSING_FILTER','NESTED_CONDITION_GROUP','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','.conditions','safeParse','level','aggregation','issues','validationCode','.conditions[','error','invalid_value','Attribute\x20\x27','EMPTY_ATTRIBUTE','13498404VfUKuR','.operator.value'];a155_0x2e3d=function(){return _0x28aa7a;};return a155_0x2e3d();}function checkConditions(_0x251c76,_0x56d9ee,_0x150a84){const _0x210fab=a155_0x36ac,_0x448fbe=[];for(let _0x40ca9b=0x0;_0x40ca9b<_0x251c76[_0x210fab(0x11e)];_0x40ca9b++){const _0x41021d=_0x251c76[_0x40ca9b],_0x4f1c95=_0x56d9ee+_0x210fab(0xfa)+_0x40ca9b+']';_0x448fbe[_0x210fab(0x107)](...checkCondition(_0x41021d,_0x4f1c95,_0x150a84));}return _0x448fbe;}function checkCondition(_0x47fdd9,_0x3d4c69,_0x413a26){const _0x3743a3=a155_0x36ac,_0x1e2f04=[];if(_0x47fdd9[_0x3743a3(0x137)]===_0x3743a3(0x10b)||_0x47fdd9[_0x3743a3(0x137)]==='Or')return _0x47fdd9[_0x3743a3(0x117)][_0x3743a3(0x11e)]===0x0?_0x1e2f04[_0x3743a3(0x107)]({'level':_0x3743a3(0xfb),'path':_0x3d4c69+_0x3743a3(0xf4),'code':'EMPTY_CONDITIONS','message':_0x47fdd9[_0x3743a3(0x137)]+_0x3743a3(0xf3),'location':getLocationFromPath(_0x413a26[_0x3743a3(0x124)],_0x413a26[_0x3743a3(0x10a)],pathToArray(_0x3d4c69+_0x3743a3(0xf4)))}):(_0x1e2f04['push']({'level':_0x3743a3(0x114),'path':_0x3d4c69,'code':_0x3743a3(0xf2),'message':_0x47fdd9['type']+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+_0x3743a3(0x110)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x413a26[_0x3743a3(0x124)],_0x413a26[_0x3743a3(0x10a)],pathToArray(_0x3d4c69))}),_0x1e2f04['push'](...checkConditions(_0x47fdd9[_0x3743a3(0x117)],_0x3d4c69,_0x413a26))),_0x1e2f04;if(_0x47fdd9[_0x3743a3(0x137)]===_0x3743a3(0x102)||_0x47fdd9[_0x3743a3(0x137)]===_0x3743a3(0x103)){const _0x5680e4=_0x47fdd9,_0x23231c=_0x5680e4[_0x3743a3(0x10a)],_0x449583=_0x5680e4[_0x3743a3(0xf7)],_0x325254=_0x23231c||_0x449583;(!_0x5680e4[_0x3743a3(0x115)]||_0x5680e4['attribute']==='')&&(!_0x325254&&_0x1e2f04[_0x3743a3(0x107)]({'level':_0x3743a3(0xfb),'path':_0x3d4c69+_0x3743a3(0x136),'code':_0x3743a3(0xfe),'message':_0x3743a3(0x10d),'location':getLocationFromPath(_0x413a26[_0x3743a3(0x124)],_0x413a26['source'],pathToArray(_0x3d4c69+'.attribute'))}));_0x5680e4[_0x3743a3(0x105)]&&_0x1e2f04[_0x3743a3(0x107)](...checkRule(_0x5680e4[_0x3743a3(0x105)],_0x3d4c69+_0x3743a3(0x123),_0x413a26));if(_0x5680e4[_0x3743a3(0x10a)]){const _0x2d9c43=_0x5680e4['attribute']&&_0x5680e4[_0x3743a3(0x115)]!=='';_0x2d9c43&&!_0x5680e4['filter']&&_0x1e2f04[_0x3743a3(0x107)]({'level':_0x3743a3(0xfb),'path':_0x3d4c69+_0x3743a3(0x121),'code':_0x3743a3(0xf1),'message':_0x3743a3(0x109)+_0x5680e4[_0x3743a3(0x10a)]+_0x3743a3(0x104)+_0x5680e4['attribute']+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0x3743a3(0x11b)+_0x3743a3(0x106),'location':getLocationFromPath(_0x413a26['document'],_0x413a26[_0x3743a3(0x10a)],pathToArray(_0x3d4c69+_0x3743a3(0x121)))}),_0x2d9c43&&_0x5680e4[_0x3743a3(0x105)]&&_0x1e2f04['push']({'level':_0x3743a3(0x114),'path':_0x3d4c69+'.attribute','code':_0x3743a3(0x135),'message':_0x3743a3(0xfd)+_0x5680e4['attribute']+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+_0x3743a3(0x12b),'location':getLocationFromPath(_0x413a26[_0x3743a3(0x124)],_0x413a26[_0x3743a3(0x10a)],pathToArray(_0x3d4c69+_0x3743a3(0x136)))});}}return _0x1e2f04;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x264a96,_0x5efc2c){const _0x3d1a80=a156_0x2cc9,_0x1ad9e6=_0x264a96();while(!![]){try{const _0x138765=parseInt(_0x3d1a80(0x1ad))/0x1+parseInt(_0x3d1a80(0x1aa))/0x2+parseInt(_0x3d1a80(0x1ca))/0x3*(parseInt(_0x3d1a80(0x1a4))/0x4)+parseInt(_0x3d1a80(0x1d6))/0x5+parseInt(_0x3d1a80(0x1c2))/0x6+parseInt(_0x3d1a80(0x1b9))/0x7*(-parseInt(_0x3d1a80(0x1cb))/0x8)+parseInt(_0x3d1a80(0x1c3))/0x9*(-parseInt(_0x3d1a80(0x1cf))/0xa);if(_0x138765===_0x5efc2c)break;else _0x1ad9e6['push'](_0x1ad9e6['shift']());}catch(_0x9902a7){_0x1ad9e6['push'](_0x1ad9e6['shift']());}}}(a156_0x2836,0x5a930));import a156_0x44a2c0 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a156_0x2836(){const _0x43e986=['no_parent','1000hbRMhC','join','no_config','relative','trim','isFile','345440vTjrZL','match','resolve','715289yRrYqC','File\x20not\x20found','resourceType','type','exists','segment','file_not_found','Not\x20a\x20YAML\x20file:\x20','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','string','invalid_yaml','extname','49oaBMBJ','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','directory','configDir','tdx.json','basename','isScoped','parse','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','692742jMJcEB','1853379Iuiwhi','parentSegment','readFile','isDirectory','segmentName','includes','root','933TnWNNE','437816LoDaZu','File\x20not\x20found:\x20','file','context','40ZWbwaq','journey','folderPath','No\x20tdx.json\x20found','cwd','scopedFolderPath','replace','2482945ovFtJA','error','No\x20tdx.json\x20found\x20for\x20file:\x20','parent_name','dirname','parent_segment'];a156_0x2836=function(){return _0x43e986;};return a156_0x2836();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a156_0x2cc9(_0x36099c,_0x2a5413){_0x36099c=_0x36099c-0x19f;const _0x28367f=a156_0x2836();let _0x2cc979=_0x28367f[_0x36099c];return _0x2cc979;}export function isSuccessfulResolution(_0x2b4474){const _0x1b0bbf=a156_0x2cc9;return _0x2b4474[_0x1b0bbf(0x1b0)]!==_0x1b0bbf(0x1d7);}export function isScopedResolution(_0x266f18){const _0x4bb984=a156_0x2cc9;return _0x266f18[_0x4bb984(0x1b0)]==='directory'||_0x266f18[_0x4bb984(0x1b0)]===_0x4bb984(0x1cd)||_0x266f18[_0x4bb984(0x1b0)]===_0x4bb984(0x1ce);}export function getScopedDetails(_0x2db885){const _0x2fc003=a156_0x2cc9;if(isScopedResolution(_0x2db885))return{'isScoped':_0x2db885[_0x2fc003(0x1bf)],'scopedFolderPath':_0x2db885[_0x2fc003(0x1d4)]};return undefined;}async function findTdxConfigAsync(_0x21e6bc,_0x3a1d25){const _0x2725d4=a156_0x2cc9;let _0x189996=a156_0x44a2c0[_0x2725d4(0x1ac)](_0x21e6bc);const _0x205191=a156_0x44a2c0[_0x2725d4(0x1c0)](_0x189996)[_0x2725d4(0x1c9)];while(_0x189996!==_0x205191){const _0x157d09=a156_0x44a2c0[_0x2725d4(0x1a5)](_0x189996,_0x2725d4(0x1bd));if(await _0x3a1d25[_0x2725d4(0x1b1)](_0x157d09))try{const _0x17aad2=await _0x3a1d25[_0x2725d4(0x1c5)](_0x157d09),_0xb0f03=JSON[_0x2725d4(0x1c0)](_0x17aad2);if(_0xb0f03['parent_segment']&&typeof _0xb0f03[_0x2725d4(0x1a2)]===_0x2725d4(0x1b6))return{'configPath':_0x157d09,'configDir':_0x189996,'parentSegment':_0xb0f03['parent_segment']};}catch{}_0x189996=a156_0x44a2c0[_0x2725d4(0x1a1)](_0x189996);}return null;}function calculateScopedPath(_0x49e59b,_0x210a77){const _0x4231c7=a156_0x2cc9,_0x21d12f=a156_0x44a2c0[_0x4231c7(0x1a7)](_0x210a77,_0x49e59b),_0x34f238=_0x21d12f!==''&&_0x21d12f!=='.'&&!_0x21d12f['startsWith']('..');return{'isScoped':_0x34f238,'scopedFolderPath':_0x34f238?_0x21d12f[_0x4231c7(0x1d5)](/\\/g,'/'):''};}export async function resolveTarget(_0x1f8c9e){const _0x30ffec=a156_0x2cc9,{arg:_0x367c77,contextParent:_0x5d1787,cwd:cwd=process[_0x30ffec(0x1d3)](),fs:fs=nodeFileSystem}=_0x1f8c9e;if(_0x367c77&&isYamlFilePath(_0x367c77))try{const _0x5eef96=await resolveYamlFilePath(_0x367c77,fs),_0x35beb7=a156_0x44a2c0['resolve'](_0x367c77),_0xee9f3a=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x35beb7),_0x4392bd=await findTdxConfigAsync(_0xee9f3a,fs);if(!_0x4392bd){if(_0x5d1787){const _0x439ad8=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x35beb7);return{'type':_0x30ffec(0x1cd),'parentName':_0x5d1787,'targetDir':_0x439ad8,'configRoot':_0x439ad8,'filePath':_0x35beb7,'resourceName':_0x5eef96[_0x30ffec(0x1c7)],'folderPath':_0x5eef96[_0x30ffec(0x1d1)],'resourceType':_0x5eef96[_0x30ffec(0x1af)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x30ffec(0x19f)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}const _0x35905f=calculateScopedPath(_0xee9f3a,_0x4392bd[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1cd),'parentName':_0x4392bd[_0x30ffec(0x1c4)],'targetDir':_0x4392bd['configDir'],'configRoot':_0x4392bd[_0x30ffec(0x1bc)],'filePath':_0x35beb7,'resourceName':_0x5eef96['segmentName'],'folderPath':_0x5eef96[_0x30ffec(0x1d1)],'resourceType':_0x5eef96[_0x30ffec(0x1af)],'isScoped':_0x35905f[_0x30ffec(0x1bf)],'scopedFolderPath':_0x35905f[_0x30ffec(0x1d4)]};}catch(_0x508ce8){const _0x24bada=_0x508ce8 instanceof Error?_0x508ce8['message']:String(_0x508ce8);if(_0x24bada[_0x30ffec(0x1c8)](_0x30ffec(0x1ae)))return{'type':_0x30ffec(0x1d7),'errorCode':_0x30ffec(0x1b3),'message':_0x30ffec(0x1cc)+_0x367c77,'arg':_0x367c77};if(_0x24bada[_0x30ffec(0x1c8)](_0x30ffec(0x1d2))){if(_0x5d1787){const _0x26a6ac=a156_0x44a2c0[_0x30ffec(0x1ac)](_0x367c77);if(await fs[_0x30ffec(0x1b1)](_0x26a6ac)){const _0x1150ad=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x26a6ac),_0x275c84=await fs[_0x30ffec(0x1c5)](_0x26a6ac),_0x433a07=_0x275c84[_0x30ffec(0x1ab)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x297e7e=_0x275c84[_0x30ffec(0x1ab)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5d7a7f=_0x433a07?_0x433a07[0x1][_0x30ffec(0x1a8)]():a156_0x44a2c0[_0x30ffec(0x1be)](_0x367c77,a156_0x44a2c0[_0x30ffec(0x1b8)](_0x367c77)),_0x2226ef=_0x297e7e&&_0x297e7e[0x1][_0x30ffec(0x1a8)]()===_0x30ffec(0x1d0)?_0x30ffec(0x1d0):_0x30ffec(0x1b2);return{'type':_0x30ffec(0x1cd),'parentName':_0x5d1787,'targetDir':_0x1150ad,'configRoot':_0x1150ad,'filePath':_0x26a6ac,'resourceName':_0x5d7a7f,'folderPath':'','resourceType':_0x2226ef,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x30ffec(0x1a6),'message':_0x30ffec(0x19f)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}return{'type':'error','errorCode':_0x30ffec(0x1b7),'message':_0x24bada,'arg':_0x367c77};}if(_0x367c77){const _0x3ab33b=a156_0x44a2c0['resolve'](cwd,_0x367c77);let _0x2bc9a9=null;try{_0x2bc9a9=await fs['stat'](_0x3ab33b);}catch{}if(_0x2bc9a9?.[_0x30ffec(0x1c6)]()){const _0xef63cf=await findTdxConfigAsync(_0x3ab33b,fs);if(_0xef63cf){const _0x13077d=calculateScopedPath(_0x3ab33b,_0xef63cf[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1bb),'parentName':_0xef63cf[_0x30ffec(0x1c4)],'targetDir':_0x3ab33b,'configRoot':_0xef63cf[_0x30ffec(0x1bc)],'isScoped':_0x13077d['isScoped'],'scopedFolderPath':_0x13077d['scopedFolderPath']};}if(_0x5d1787)return{'type':_0x30ffec(0x1bb),'parentName':_0x5d1787,'targetDir':_0x3ab33b,'configRoot':_0x3ab33b,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x30ffec(0x1c1)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}if(_0x2bc9a9?.[_0x30ffec(0x1a9)]())return{'type':_0x30ffec(0x1d7),'errorCode':'invalid_yaml','message':_0x30ffec(0x1b4)+_0x367c77,'arg':_0x367c77,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4ddc00=sanitizeFileName(_0x367c77),_0x4d6a6c=getSegmentRootDir(_0x4ddc00,cwd);return{'type':_0x30ffec(0x1a0),'parentName':_0x367c77,'targetDir':_0x4d6a6c,'configRoot':_0x4d6a6c};}const _0x460f75=await findTdxConfigAsync(cwd,fs);if(_0x460f75){const _0x376fb7=calculateScopedPath(cwd,_0x460f75[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1ce),'parentName':_0x460f75[_0x30ffec(0x1c4)],'targetDir':cwd,'configRoot':_0x460f75[_0x30ffec(0x1bc)],'isScoped':_0x376fb7[_0x30ffec(0x1bf)],'scopedFolderPath':_0x376fb7['scopedFolderPath']};}if(_0x5d1787){const _0x2a1a30=sanitizeFileName(_0x5d1787),_0x407ca2=getSegmentRootDir(_0x2a1a30,cwd);return{'type':_0x30ffec(0x1ce),'parentName':_0x5d1787,'targetDir':_0x407ca2,'configRoot':_0x407ca2,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x30ffec(0x1d7),'errorCode':_0x30ffec(0x1a3),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x30ffec(0x1b5)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x9a2731=a157_0x4d41;(function(_0x2b7ef0,_0x32452f){const _0x102c77=a157_0x4d41,_0x289b1c=_0x2b7ef0();while(!![]){try{const _0x49dde0=parseInt(_0x102c77(0x77))/0x1*(parseInt(_0x102c77(0x84))/0x2)+-parseInt(_0x102c77(0x8f))/0x3+-parseInt(_0x102c77(0x7a))/0x4+-parseInt(_0x102c77(0x8d))/0x5*(-parseInt(_0x102c77(0x78))/0x6)+-parseInt(_0x102c77(0x8a))/0x7+parseInt(_0x102c77(0x7d))/0x8*(parseInt(_0x102c77(0x88))/0x9)+parseInt(_0x102c77(0x83))/0xa*(parseInt(_0x102c77(0x81))/0xb);if(_0x49dde0===_0x32452f)break;else _0x289b1c['push'](_0x289b1c['shift']());}catch(_0x1447bc){_0x289b1c['push'](_0x289b1c['shift']());}}}(a157_0x39c2,0xd5006));function a157_0x39c2(){const _0x14b062=['930997aXPhQx','2364aJFlQT','parent_segment','1736744PevURK','cwd','object','29296LfOjci','parse','join','replace','255167jZsTCo','string','310vhGILd','2Gcjylj','root','resolve','relative','1764mtGkdK','stringify','2305772xAHusy','engage_workspace','startsWith','75bBgzRm','Invalid\x20tdx.json:\x20expected\x20object','2213190PupYCS','utf-8'];a157_0x39c2=function(){return _0x14b062;};return a157_0x39c2();}import{existsSync,readFileSync}from'fs';import a157_0x569f80 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x568bb6=process['cwd']()){const _0x595bc3=a157_0x4d41;let _0x547b72=a157_0x569f80[_0x595bc3(0x86)](_0x568bb6);const _0x329392=a157_0x569f80[_0x595bc3(0x7e)](_0x547b72)[_0x595bc3(0x85)];while(_0x547b72!==_0x329392){const _0x37499c=a157_0x569f80[_0x595bc3(0x7f)](_0x547b72,TDX_CONFIG_FILE);if(existsSync(_0x37499c))return _0x37499c;_0x547b72=a157_0x569f80['dirname'](_0x547b72);}return null;}export function loadTdxConfig(_0x2a082b){const _0x3b227f=a157_0x4d41,_0x2f5c46=readFileSync(_0x2a082b,_0x3b227f(0x90));let _0x14792e;try{_0x14792e=JSON[_0x3b227f(0x7e)](_0x2f5c46);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x2a082b);}if(!_0x14792e||typeof _0x14792e!==_0x3b227f(0x7c))throw new Error(_0x3b227f(0x8e));const _0x44acb8=_0x14792e,_0x16a196=_0x44acb8[_0x3b227f(0x79)]&&typeof _0x44acb8[_0x3b227f(0x79)]==='string',_0x207576=_0x44acb8[_0x3b227f(0x8b)]&&typeof _0x44acb8['engage_workspace']===_0x3b227f(0x82);if(!_0x16a196&&!_0x207576)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x556847={};return _0x16a196&&(_0x556847[_0x3b227f(0x79)]=_0x44acb8[_0x3b227f(0x79)]),_0x207576&&(_0x556847[_0x3b227f(0x8b)]=_0x44acb8[_0x3b227f(0x8b)]),_0x556847;}export function findTdxConfig(_0xf2e1e6=process[a157_0x9a2731(0x7b)]()){const _0x10ec70=findTdxConfigPath(_0xf2e1e6);if(!_0x10ec70)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x1b4461=loadTdxConfig(_0x10ec70),_0x30cddf=a157_0x569f80['dirname'](_0x10ec70);return{'config':_0x1b4461,'configPath':_0x10ec70,'configDir':_0x30cddf};}function a157_0x4d41(_0x2fdc73,_0xab394b){_0x2fdc73=_0x2fdc73-0x77;const _0x39c251=a157_0x39c2();let _0x4d4100=_0x39c251[_0x2fdc73];return _0x4d4100;}export function tryFindTdxConfig(_0x4b366e){try{return findTdxConfig(_0x4b366e);}catch{return null;}}export function getSegmentRootDir(_0x3b229d,_0x20c7bc=process[a157_0x9a2731(0x7b)]()){const _0x5f5c15=a157_0x9a2731;return a157_0x569f80[_0x5f5c15(0x7f)](_0x20c7bc,SEGMENTS_DIR,_0x3b229d);}export function getTdxConfigPath(_0x336576,_0x116b19=process[a157_0x9a2731(0x7b)]()){const _0x11cc96=a157_0x9a2731;return a157_0x569f80[_0x11cc96(0x7f)](getSegmentRootDir(_0x336576,_0x116b19),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5a01a9,_0x56e6f6){const _0x3d8e67=a157_0x9a2731,_0x40f8ed=a157_0x569f80[_0x3d8e67(0x86)](_0x5a01a9),_0x40d430=a157_0x569f80[_0x3d8e67(0x87)](_0x56e6f6,_0x40f8ed);if(_0x40d430[_0x3d8e67(0x8c)]('..'))return'';return _0x40d430;}export function localPathToTdFolderPath(_0x4caa30){const _0x117f57=a157_0x9a2731,_0x183269=a157_0x569f80['dirname'](_0x4caa30);if(_0x183269==='.'||_0x183269==='')return'';return _0x183269[_0x117f57(0x80)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1af997,_0x3fe410){const _0x5299c2=a157_0x9a2731;if(!_0x1af997)return _0x3fe410;return a157_0x569f80[_0x5299c2(0x7f)](_0x3fe410,_0x1af997);}export function createTdxConfigContent(_0x4975e8){const _0x4fd421={'parent_segment':_0x4975e8};return JSON['stringify'](_0x4fd421,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x1a4dba){const _0x3891df=a157_0x9a2731,_0x296a52={'engage_workspace':_0x1a4dba};return JSON[_0x3891df(0x89)](_0x296a52,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x52ae60=a158_0x1518;(function(_0x57c37f,_0x38ff87){const _0x2901c8=a158_0x1518,_0x3911f7=_0x57c37f();while(!![]){try{const _0x54bd22=parseInt(_0x2901c8(0x8c))/0x1*(parseInt(_0x2901c8(0x94))/0x2)+-parseInt(_0x2901c8(0x7e))/0x3+parseInt(_0x2901c8(0x8b))/0x4*(parseInt(_0x2901c8(0x9b))/0x5)+parseInt(_0x2901c8(0x83))/0x6*(parseInt(_0x2901c8(0x80))/0x7)+parseInt(_0x2901c8(0x9f))/0x8*(parseInt(_0x2901c8(0x7b))/0x9)+parseInt(_0x2901c8(0x78))/0xa+-parseInt(_0x2901c8(0x8d))/0xb*(parseInt(_0x2901c8(0x86))/0xc);if(_0x54bd22===_0x38ff87)break;else _0x3911f7['push'](_0x3911f7['shift']());}catch(_0xcdc5e5){_0x3911f7['push'](_0x3911f7['shift']());}}}(a158_0x35a5,0xa3fd9));import{z}from'zod';export const ScheduleTypeSchema=z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x9c),a158_0x52ae60(0xa4),a158_0x52ae60(0x7c),a158_0x52ae60(0x87),a158_0x52ae60(0x92),'cron',a158_0x52ae60(0x99)]);export const RepeatUnitSchema=z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x84),a158_0x52ae60(0xa1),'day',a158_0x52ae60(0x85),'month',a158_0x52ae60(0x7f),'none']);export const ScheduleDefSchema=z[a158_0x52ae60(0x97)]({'type':ScheduleTypeSchema[a158_0x52ae60(0x79)](),'repeat_unit':RepeatUnitSchema[a158_0x52ae60(0x79)](),'repeat_frequency':z[a158_0x52ae60(0x90)]()['optional'](),'repeat_sub_frequency':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x90)]())['optional'](),'start_at':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'end_on':z[a158_0x52ae60(0x88)]()['nullable']()[a158_0x52ae60(0x79)](),'timezone':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0x79)]()});export const NotificationDefSchema=z[a158_0x52ae60(0x97)]({'notify_on':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x7a),a158_0x52ae60(0x93)]))[a158_0x52ae60(0x79)](),'email_recipients':z['array'](z[a158_0x52ae60(0x88)]())[a158_0x52ae60(0x79)]()});export const ActivationColumnDefSchema=z[a158_0x52ae60(0xa0)]([z[a158_0x52ae60(0x88)](),z['object']({'name':z[a158_0x52ae60(0x88)](),'type':z[a158_0x52ae60(0x88)]()['optional'](),'visibility':z[a158_0x52ae60(0x8a)](['clear',a158_0x52ae60(0x9a)])[a158_0x52ae60(0x79)]()})]);export const ActivationBehaviorDefSchema=z[a158_0x52ae60(0x97)]({'columns':z[a158_0x52ae60(0xa3)](z['object']({'name':z['string'](),'type':z['string']()[a158_0x52ae60(0x79)](),'visibility':z[a158_0x52ae60(0x8a)](['clear',a158_0x52ae60(0x9a)])[a158_0x52ae60(0x79)]()}))[a158_0x52ae60(0x79)](),'behavior_table':z[a158_0x52ae60(0x88)]()['optional'](),'join_row':z[a158_0x52ae60(0x90)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'join_strategy':z['enum']([a158_0x52ae60(0x89),a158_0x52ae60(0x9d),a158_0x52ae60(0x91),a158_0x52ae60(0x7d)])[a158_0x52ae60(0x79)](),'formatting':z[a158_0x52ae60(0x8a)](['rows',a158_0x52ae60(0x96)])[a158_0x52ae60(0x79)](),'order_by':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x97)]({'key':z[a158_0x52ae60(0x88)](),'order':z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x81),a158_0x52ae60(0x82)])}))['optional']()});function a158_0x1518(_0x2c6b36,_0x168609){_0x2c6b36=_0x2c6b36-0x78;const _0x35a5fb=a158_0x35a5();let _0x151839=_0x35a5fb[_0x2c6b36];return _0x151839;}export const ActivationDefSchema=z[a158_0x52ae60(0x97)]({'name':z['string']()[a158_0x52ae60(0x8e)](0x1,a158_0x52ae60(0x8f)),'description':z[a158_0x52ae60(0x88)]()['optional'](),'connection':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0x8e)](0x1,a158_0x52ae60(0x9e)),'all_columns':z[a158_0x52ae60(0x95)]()[a158_0x52ae60(0x79)](),'columns':z[a158_0x52ae60(0xa3)](ActivationColumnDefSchema)[a158_0x52ae60(0x79)](),'schedule':ScheduleDefSchema[a158_0x52ae60(0x79)](),'notification':NotificationDefSchema[a158_0x52ae60(0x79)](),'connector_config':z[a158_0x52ae60(0x98)](z[a158_0x52ae60(0x88)](),z['unknown']())[a158_0x52ae60(0x79)](),'activation_template_id':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'behavior':ActivationBehaviorDefSchema[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'run_after_journey_refresh':z['boolean']()['optional']()});function a158_0x35a5(){const _0x5d221b=['5ouqyPW','none','First','Connection\x20name\x20is\x20required','368HHUplO','union','hour','nullable','array','hourly','5816990eiaucd','optional','onSuccess','26739SBLBMt','daily','Top-N','1360353PQhDVf','once','84ePiDay','asc','desc','626634RiCmTo','minute','week','180JUpzzx','weekly','string','All','enum','5130788lcUiit','139534ZJpRWs','1970694PdHbBT','min','Activation\x20name\x20is\x20required','number','Last','monthly','onFailure','8BsFdhY','boolean','cols','object','record','minutes_interval','masked'];a158_0x35a5=function(){return _0x5d221b;};return a158_0x35a5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a159_0x3329(_0x3569e6,_0x32fb97){_0x3569e6=_0x3569e6-0x1a0;var _0x24852b=a159_0x2485();var _0x33292b=_0x24852b[_0x3569e6];return _0x33292b;}(function(_0x278f78,_0x5dc000){var _0xfb41c9=a159_0x3329,_0x65b6a4=_0x278f78();while(!![]){try{var _0x274066=-parseInt(_0xfb41c9(0x1a6))/0x1*(-parseInt(_0xfb41c9(0x1aa))/0x2)+-parseInt(_0xfb41c9(0x1a2))/0x3*(-parseInt(_0xfb41c9(0x1ab))/0x4)+parseInt(_0xfb41c9(0x1a9))/0x5*(-parseInt(_0xfb41c9(0x1a0))/0x6)+parseInt(_0xfb41c9(0x1a1))/0x7*(-parseInt(_0xfb41c9(0x1a7))/0x8)+parseInt(_0xfb41c9(0x1a5))/0x9+-parseInt(_0xfb41c9(0x1a3))/0xa*(parseInt(_0xfb41c9(0x1a8))/0xb)+parseInt(_0xfb41c9(0x1a4))/0xc;if(_0x274066===_0x5dc000)break;else _0x65b6a4['push'](_0x65b6a4['shift']());}catch(_0xecfa86){_0x65b6a4['push'](_0x65b6a4['shift']());}}}(a159_0x2485,0xe8619));function a159_0x2485(){var _0xd12317=['27616yJBmFN','6011250gOJGxg','301njXiip','600PsnsfX','5090qYJcmc','22440996wNyNFL','888201gmWPqN','5HOvEAl','133208VPWrsu','15059DmvTBr','5QIXsEW','6780CwyfzB'];a159_0x2485=function(){return _0xd12317;};return a159_0x2485();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x184606=a160_0x143e;function a160_0x3182(){const _0x52dcba=['journey','draft','2189SzxxNa','190qkeiyj','enum','90bgUkHU','ab_test','filter','24582kghPmu','journeys','string','simulation','literal','isArray','min','decision_point','end','day','optional','lazy','discriminatedUnion','reentry_unless_goal_achieved','stages','132937vDoTuP','object','launched','Journey\x20name\x20is\x20required','array','length','refine','11786vEWGwG','4602430oCntVm','type','number','13TpEQKU','boolean','record','120SiAUPe','974288aXqbar','merge','reentry_always','week','jump','wait','8190132qbwouY','29860kGWXMw','passthrough','292HIrOMe','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'];a160_0x3182=function(){return _0x52dcba;};return a160_0x3182();}(function(_0x28fce8,_0x1b1d99){const _0x1b8d03=a160_0x143e,_0x2adfa3=_0x28fce8();while(!![]){try{const _0x4c2a34=parseInt(_0x1b8d03(0x1a0))/0x1*(-parseInt(_0x1b8d03(0x18a))/0x2)+parseInt(_0x1b8d03(0x1a5))/0x3*(-parseInt(_0x1b8d03(0x19b))/0x4)+parseInt(_0x1b8d03(0x18b))/0x5+-parseInt(_0x1b8d03(0x191))/0x6*(-parseInt(_0x1b8d03(0x183))/0x7)+-parseInt(_0x1b8d03(0x192))/0x8*(-parseInt(_0x1b8d03(0x1a2))/0x9)+-parseInt(_0x1b8d03(0x199))/0xa*(-parseInt(_0x1b8d03(0x19f))/0xb)+-parseInt(_0x1b8d03(0x198))/0xc*(parseInt(_0x1b8d03(0x18e))/0xd);if(_0x4c2a34===_0x1b1d99)break;else _0x2adfa3['push'](_0x2adfa3['shift']());}catch(_0x26a18f){_0x2adfa3['push'](_0x2adfa3['shift']());}}}(a160_0x3182,0xadd65));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a160_0x143e(_0xfa9058,_0x1a6edf){_0xfa9058=_0xfa9058-0x17a;const _0x318277=a160_0x3182();let _0x143eba=_0x318277[_0xfa9058];return _0x143eba;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a160_0x184606(0x1a1)]([a160_0x184606(0x19e),a160_0x184606(0x1a8),a160_0x184606(0x185)]);export const ReentryModeTypeSchema=z[a160_0x184606(0x1a1)](['no_reentry',a160_0x184606(0x181),a160_0x184606(0x194)]);export const WaitUnitTypeSchema=z['enum']([a160_0x184606(0x17d),a160_0x184606(0x195)]);export const StepTypeValueSchema=z[a160_0x184606(0x1a1)]([a160_0x184606(0x197),'activation',a160_0x184606(0x17b),a160_0x184606(0x1a3),'merge',a160_0x184606(0x196),a160_0x184606(0x17c)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a160_0x184606(0x1a7)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x184606(0x184)]({'journey':z[a160_0x184606(0x1a7)](),'stage':z[a160_0x184606(0x1a7)](),'bundle_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)]()});export const CriteriaDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'description':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'segment':z[a160_0x184606(0x1a7)](),'target':JumpTargetDefSchema[a160_0x184606(0x17e)]()});const WaitConditionTimeoutDefSchema=z[a160_0x184606(0x184)]({'duration':z[a160_0x184606(0x18d)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a160_0x184606(0x17e)]()}),WaitConditionDefSchema=z[a160_0x184606(0x184)]({'segment':z[a160_0x184606(0x1a7)](),'next':z['string']()[a160_0x184606(0x17e)](),'timeout':WaitConditionTimeoutDefSchema[a160_0x184606(0x17e)]()}),WaitStepParamsDefSchema=z[a160_0x184606(0x184)]({'duration':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'unit':WaitUnitTypeSchema[a160_0x184606(0x17e)](),'wait_until':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'condition':WaitConditionDefSchema[a160_0x184606(0x17e)](),'days_of_week':z[a160_0x184606(0x187)](z[a160_0x184606(0x1a7)]())[a160_0x184606(0x17e)]()}),StepBaseFields={'name':z[a160_0x184606(0x1a7)](),'uuid':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'next':z['string']()[a160_0x184606(0x17e)]()},WaitStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z['literal'](a160_0x184606(0x197)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z['string']()}),ActivationStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'segment':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'segment_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'excluded':z[a160_0x184606(0x18f)]()['optional'](),'next':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)]()}),DecisionPointStepParamsDefSchema=z[a160_0x184606(0x184)]({'branches':z[a160_0x184606(0x187)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a160_0x184606(0x17b)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a160_0x184606(0x184)]({'id':z['string']()[a160_0x184606(0x17e)](),'name':z[a160_0x184606(0x1a7)](),'percentage':z[a160_0x184606(0x18d)](),'next':z['string']()[a160_0x184606(0x17e)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a160_0x184606(0x187)](AbTestVariantDefSchema),'unique_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'customized_split':z[a160_0x184606(0x18f)]()['optional']()}),AbTestStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x1a3)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x193))}),JumpStepParamsDefSchema=z[a160_0x184606(0x184)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x196)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x17c))})[a160_0x184606(0x19a)]();export const StepDefSchema=z[a160_0x184606(0x180)](a160_0x184606(0x18c),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'description':z[a160_0x184606(0x1a7)]()['optional'](),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'entry_criteria':CriteriaDefSchema[a160_0x184606(0x17e)](),'exit_criteria':z[a160_0x184606(0x187)](CriteriaDefSchema)[a160_0x184606(0x17e)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'steps':z[a160_0x184606(0x187)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z['object']({'name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version':z[a160_0x184606(0x1a7)]()['optional'](),'state':JourneyStateTypeSchema[a160_0x184606(0x17e)](),'latest':z[a160_0x184606(0x18f)]()[a160_0x184606(0x17e)](),'stages':z[a160_0x184606(0x187)](StageDefSchema),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version_number':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'goal':CriteriaDefSchema[a160_0x184606(0x17e)](),'reentry':ReentryModeTypeSchema[a160_0x184606(0x17e)]()});export const JourneyDefSchema=z[a160_0x184606(0x17f)](()=>z[a160_0x184606(0x184)]({'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x19d)),'name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17a)](0x1,a160_0x184606(0x186)),'description':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'bundle_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'bundle_name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'folder_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'reentry':ReentryModeTypeSchema[a160_0x184606(0x17e)](),'allow_reentry':z[a160_0x184606(0x18f)]()[a160_0x184606(0x17e)](),'goal':CriteriaDefSchema['optional'](),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version_number':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'stages':z[a160_0x184606(0x187)](StageDefSchema)[a160_0x184606(0x17e)](),'versions':z[a160_0x184606(0x187)](JourneyEntryDefSchema)[a160_0x184606(0x17e)](),'journeys':z[a160_0x184606(0x187)](JourneyEntryDefSchema)['optional'](),'segments':z[a160_0x184606(0x190)](z[a160_0x184606(0x1a7)](),EmbeddedSegmentDefSchema)[a160_0x184606(0x17e)](),'activations':z[a160_0x184606(0x190)](z[a160_0x184606(0x1a7)](),ActivationDefSchema)[a160_0x184606(0x17e)]()})[a160_0x184606(0x189)](_0x4a877b=>{const _0x305503=a160_0x184606,_0x19b550=[_0x4a877b[_0x305503(0x1a6)],_0x4a877b[_0x305503(0x182)],_0x4a877b['versions']][_0x305503(0x1a4)](_0x5f47e6=>Array[_0x305503(0x1aa)](_0x5f47e6)&&_0x5f47e6[_0x305503(0x188)]>0x0)[_0x305503(0x188)];return _0x19b550===0x1;},{'message':a160_0x184606(0x19c)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a162_0x254a(){var _0x5e1df2=['42840980RbNTnF','2809626gSByNJ','1399898rLmTvv','1624qOgInV','251646xeLLDL','1288DEhYtf','105LcflwH','60138xZbOie','657135fLSzMh','11660DZmgiI'];a162_0x254a=function(){return _0x5e1df2;};return a162_0x254a();}(function(_0x2d2640,_0xc494ce){var _0xb199eb=a162_0x23e9,_0x188e43=_0x2d2640();while(!![]){try{var _0x2eb55b=-parseInt(_0xb199eb(0xe2))/0x1+-parseInt(_0xb199eb(0xeb))/0x2+-parseInt(_0xb199eb(0xe8))/0x3+parseInt(_0xb199eb(0xe3))/0x4*(-parseInt(_0xb199eb(0xe9))/0x5)+parseInt(_0xb199eb(0xe4))/0x6*(-parseInt(_0xb199eb(0xe6))/0x7)+-parseInt(_0xb199eb(0xe5))/0x8*(-parseInt(_0xb199eb(0xe7))/0x9)+parseInt(_0xb199eb(0xea))/0xa;if(_0x2eb55b===_0xc494ce)break;else _0x188e43['push'](_0x188e43['shift']());}catch(_0x309fb2){_0x188e43['push'](_0x188e43['shift']());}}}(a162_0x254a,0xb99ad));function a162_0x23e9(_0x34dbb5,_0xe7b043){_0x34dbb5=_0x34dbb5-0xe2;var _0x254a1f=a162_0x254a();var _0x23e99f=_0x254a1f[_0x34dbb5];return _0x23e99f;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x65eaaf=a154_0xb136;(function(_0x4c86c4,_0x577ceb){const _0x37b42e=a154_0xb136,_0xf085e2=_0x4c86c4();while(!![]){try{const _0x22e31=parseInt(_0x37b42e(0xad))/0x1+-parseInt(_0x37b42e(0xc3))/0x2*(-parseInt(_0x37b42e(0xa4))/0x3)+parseInt(_0x37b42e(0xd8))/0x4*(-parseInt(_0x37b42e(0xa9))/0x5)+-parseInt(_0x37b42e(0xd6))/0x6+parseInt(_0x37b42e(0xcb))/0x7+-parseInt(_0x37b42e(0xb1))/0x8*(-parseInt(_0x37b42e(0xb0))/0x9)+-parseInt(_0x37b42e(0xae))/0xa;if(_0x22e31===_0x577ceb)break;else _0xf085e2['push'](_0xf085e2['shift']());}catch(_0x134df4){_0xf085e2['push'](_0xf085e2['shift']());}}}(a154_0x30f0,0xd0ea5));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x65eaaf(0xbc)]([a154_0x65eaaf(0xb6),'Greater','Less',a154_0x65eaaf(0xc7),'LessEqual','In',a154_0x65eaaf(0xba),a154_0x65eaaf(0xa7),a154_0x65eaaf(0xc4),a154_0x65eaaf(0x90),a154_0x65eaaf(0xc9),a154_0x65eaaf(0xa8),a154_0x65eaaf(0xa1),'EndWith',a154_0x65eaaf(0xc0)]);export const TimeUnitSchema=z[a154_0x65eaaf(0xbc)](['second',a154_0x65eaaf(0xc5),a154_0x65eaaf(0x9a),a154_0x65eaaf(0xa5),a154_0x65eaaf(0xb8),a154_0x65eaaf(0xbb),a154_0x65eaaf(0x99)]);export const AggregationTypeSchema=z['enum']([a154_0x65eaaf(0xab),a154_0x65eaaf(0x9b),'Average',a154_0x65eaaf(0x94),a154_0x65eaaf(0xb2),'CountDistinct',a154_0x65eaaf(0x8b),a154_0x65eaaf(0x8e)]);const TemporalValueSchema=z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0x8c)]({'timestamp':z[a154_0x65eaaf(0xb9)]()}),z['object']({'last':z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0x9f)](),z[a154_0x65eaaf(0xd7)](z[a154_0x65eaaf(0xb9)](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0xb9)](),z[a154_0x65eaaf(0x9f)](),z['boolean'](),TemporalValueSchema,z[a154_0x65eaaf(0x9e)](z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0xb9)](),z[a154_0x65eaaf(0x9f)](),z[a154_0x65eaaf(0xd0)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a154_0x65eaaf(0xb6),'Greater','GreaterEqual','Less',a154_0x65eaaf(0xca),'In',a154_0x65eaaf(0xa8),a154_0x65eaaf(0xa1),'EndWith',a154_0x65eaaf(0xa7),a154_0x65eaaf(0x90),a154_0x65eaaf(0xc9)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0x65eaaf(0x90),'TimeWithinNext']);export const OperatorDefSchema=z[a154_0x65eaaf(0x8c)]({'type':OperatorTypeSchema,'not':z[a154_0x65eaaf(0xd0)]()[a154_0x65eaaf(0x8f)](),'value':OperatorValueSchema[a154_0x65eaaf(0x8f)](),'min':z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0x9f)](),z[a154_0x65eaaf(0xb9)](),TemporalValueSchema])[a154_0x65eaaf(0x8f)](),'max':z['union']([z[a154_0x65eaaf(0x9f)](),z[a154_0x65eaaf(0xb9)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a154_0x65eaaf(0x8f)](),'duration':z[a154_0x65eaaf(0x8c)]({'day':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)](),'week':z['number']()[a154_0x65eaaf(0x8f)](),'month':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)](),'year':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)](),'hour':z['number']()[a154_0x65eaaf(0x8f)](),'minute':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)](),'second':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)]()})[a154_0x65eaaf(0x8f)](),'from':z[a154_0x65eaaf(0x8c)]({'last':z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0x9f)](),z[a154_0x65eaaf(0xb9)]()]),'unit':TimeUnitSchema})[a154_0x65eaaf(0x8f)](),'reverse':z[a154_0x65eaaf(0xd0)]()['optional']()})[a154_0x65eaaf(0xc2)]((_0x547380,_0x3d398e)=>{const _0x24e81b=a154_0x65eaaf;OPERATORS_REQUIRING_VALUE[_0x24e81b(0x9c)](_0x547380[_0x24e81b(0x95)])&&(_0x547380[_0x24e81b(0xaf)]===undefined||_0x547380[_0x24e81b(0xaf)]===null)&&_0x3d398e['addIssue']({'code':'custom','message':_0x24e81b(0xb7)+_0x547380['type']+'\x27\x20requires\x20a\x20value','path':[_0x24e81b(0xaf)]}),_0x547380['type']==='Between'&&_0x547380[_0x24e81b(0x8d)]===undefined&&_0x547380[_0x24e81b(0xd5)]===undefined&&_0x3d398e[_0x24e81b(0x97)]({'code':_0x24e81b(0xac),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x24e81b(0x9c)](_0x547380[_0x24e81b(0x95)])&&_0x547380[_0x24e81b(0xaf)]!==undefined&&!_0x547380[_0x24e81b(0xc8)]&&_0x3d398e[_0x24e81b(0x97)]({'code':_0x24e81b(0xac),'message':_0x24e81b(0xb7)+_0x547380[_0x24e81b(0x95)]+_0x24e81b(0x96),'path':[_0x24e81b(0xc8)],'params':{'validationCode':_0x24e81b(0x92)}}),_0x547380[_0x24e81b(0x95)]===_0x24e81b(0xc0)&&(!_0x547380[_0x24e81b(0x98)]&&_0x3d398e[_0x24e81b(0x97)]({'code':'custom','message':_0x24e81b(0xce),'path':[_0x24e81b(0x98)]}),!_0x547380[_0x24e81b(0xcd)]&&_0x3d398e['addIssue']({'code':_0x24e81b(0xac),'message':_0x24e81b(0xd1),'path':[_0x24e81b(0xcd)]}));});export const ArrayMatchingSchema=z[a154_0x65eaaf(0xbe)]([z[a154_0x65eaaf(0xa2)](a154_0x65eaaf(0x9d)),z[a154_0x65eaaf(0xa2)]('all'),z[a154_0x65eaaf(0x8c)]({'atLeast':z[a154_0x65eaaf(0x9f)]()}),z[a154_0x65eaaf(0x8c)]({'atMost':z['number']()}),z[a154_0x65eaaf(0x8c)]({'exactly':z[a154_0x65eaaf(0x9f)]()})]);export const AggregationDefSchema=z[a154_0x65eaaf(0xbd)]('type',[z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xbc)](['Sum',a154_0x65eaaf(0x94),a154_0x65eaaf(0xb2),a154_0x65eaaf(0xaa)]),'column':z[a154_0x65eaaf(0xb9)](),'groupingColumns':z[a154_0x65eaaf(0x9e)](z[a154_0x65eaaf(0xb9)]())[a154_0x65eaaf(0x8f)]()}),z['object']({'type':z['literal'](a154_0x65eaaf(0xab)),'groupingColumns':z['array'](z[a154_0x65eaaf(0xb9)]())[a154_0x65eaaf(0x8f)]()}),z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xa2)]('CountDistinct'),'columns':z['array'](z['string']())}),z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xbc)](['First',a154_0x65eaaf(0x8e)]),'column':z[a154_0x65eaaf(0xb9)](),'orderColumn':z['string'](),'groupingColumns':z[a154_0x65eaaf(0x9e)](z[a154_0x65eaaf(0xb9)]())[a154_0x65eaaf(0x8f)]()})]);export const TimeWindowDefSchema=z[a154_0x65eaaf(0x8c)]({'duration':z[a154_0x65eaaf(0x9f)](),'unit':TimeUnitSchema});function a154_0xb136(_0x2b2cde,_0x5a7541){_0x2b2cde=_0x2b2cde-0x8b;const _0x30f06c=a154_0x30f0();let _0xb136c8=_0x30f06c[_0x2b2cde];return _0xb136c8;}const TIMESTAMP_OPERATORS=new Set([a154_0x65eaaf(0x90),a154_0x65eaaf(0xc9),a154_0x65eaaf(0xc0)]);function a154_0x30f0(){const _0x806434=['And','segment','batch','max','2340576aeQCgr','record','5188moAlpH','Value','First','object','min','Last','optional','TimeWithinPast','include','MISSING_TIME_UNIT','operator','Min','type','\x27\x20requires\x20a\x20time\x20unit','addIssue','duration','year','hour','Sum','has','any','array','number','realtime','StartWith','literal','Column','920556HLhMUR','day','funnel_stage','Regexp','Contain','2815JduKwl','Average','Count','custom','1048033WPWhJK','6762280IGNDXA','value','940419xbqPwZ','40Dpamid','Max','Segment\x20reference\x20must\x20not\x20be\x20empty','column','lazy','Equal','Operator\x20\x27','week','string','Between','month','enum','discriminatedUnion','union','Behavior','TimeRange','Segment\x20name\x20is\x20required','superRefine','2zjaJsr','IsNull','minute','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','GreaterEqual','unit','TimeWithinNext','LessEqual','5424384wgwmOP','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','from','TimeRange\x20operator\x20requires\x20\x27duration\x27','exclude','boolean','TimeRange\x20operator\x20requires\x20\x27from\x27'];a154_0x30f0=function(){return _0x806434;};return a154_0x30f0();}export const FilterColumnConditionDefSchema=z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xa2)](a154_0x65eaaf(0xa3)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x65eaaf(0x8f)]()})['superRefine']((_0x5244ef,_0x5de792)=>{const _0x5d420b=a154_0x65eaaf,_0x35720f=_0x5244ef[_0x5d420b(0x93)][_0x5d420b(0x95)];_0x5244ef[_0x5d420b(0xb4)]==='timestamp'?!TIMESTAMP_OPERATORS['has'](_0x35720f)&&_0x5de792[_0x5d420b(0x97)]({'code':_0x5d420b(0xac),'message':_0x5d420b(0xc6)+_0x35720f+'\x27)','path':['operator',_0x5d420b(0x95)]}):TIMESTAMP_OPERATORS[_0x5d420b(0x9c)](_0x35720f)&&_0x5de792[_0x5d420b(0x97)]({'code':_0x5d420b(0xac),'message':'Operator\x20\x27'+_0x35720f+_0x5d420b(0xcc),'path':[_0x5d420b(0x93),_0x5d420b(0x95)]});});export const FilterRuleDefSchema=z[a154_0x65eaaf(0x8c)]({'type':z['literal'](a154_0x65eaaf(0xd2)),'conditions':z[a154_0x65eaaf(0x9e)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a154_0x65eaaf(0xb5)](()=>z['object']({'type':z[a154_0x65eaaf(0xa2)](a154_0x65eaaf(0xd9)),'attribute':z[a154_0x65eaaf(0xb9)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x65eaaf(0x8f)](),'exclude':z[a154_0x65eaaf(0xd0)]()[a154_0x65eaaf(0x8f)](),'aggregation':AggregationDefSchema[a154_0x65eaaf(0x8f)](),'source':z[a154_0x65eaaf(0xb9)]()[a154_0x65eaaf(0x8f)](),'filter':FilterRuleDefSchema[a154_0x65eaaf(0x8f)](),'limit':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)]()}));export const BehaviorConditionDefSchema=z[a154_0x65eaaf(0xb5)](()=>z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xa2)](a154_0x65eaaf(0xbf)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x65eaaf(0x8f)](),'exclude':z[a154_0x65eaaf(0xd0)]()[a154_0x65eaaf(0x8f)](),'aggregation':AggregationDefSchema[a154_0x65eaaf(0x8f)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a154_0x65eaaf(0x8f)](),'timeWindow':TimeWindowDefSchema[a154_0x65eaaf(0x8f)](),'limit':z[a154_0x65eaaf(0x9f)]()[a154_0x65eaaf(0x8f)]()}));export const ColumnConditionDefSchema=z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xa2)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a154_0x65eaaf(0xb5)](()=>z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xbc)]([a154_0x65eaaf(0xd2),'Or']),'conditions':z[a154_0x65eaaf(0x9e)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentRefConditionDefSchema=z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xbc)]([a154_0x65eaaf(0x91),a154_0x65eaaf(0xcf)]),'segment':z[a154_0x65eaaf(0xb9)]()[a154_0x65eaaf(0x8d)](0x1,a154_0x65eaaf(0xb3))});export const ConditionDefSchema=z['lazy'](()=>z[a154_0x65eaaf(0xbe)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xbc)]([a154_0x65eaaf(0xd2),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a154_0x65eaaf(0xb9)]()[a154_0x65eaaf(0x8f)]()}));export const SegmentDefSchema=z[a154_0x65eaaf(0x8c)]({'type':z[a154_0x65eaaf(0xa2)](a154_0x65eaaf(0xd3))[a154_0x65eaaf(0x8f)](),'name':z[a154_0x65eaaf(0xb9)]()[a154_0x65eaaf(0x8d)](0x1,a154_0x65eaaf(0xc1)),'description':z['string']()['optional'](),'folder':z['string']()['optional'](),'rule':RuleDefSchema[a154_0x65eaaf(0x8f)](),'kind':z['enum']([a154_0x65eaaf(0xd4),a154_0x65eaaf(0xa0),a154_0x65eaaf(0xa6)])[a154_0x65eaaf(0x8f)](),'visible':z[a154_0x65eaaf(0xd0)]()[a154_0x65eaaf(0x8f)](),'activations':z['array'](z[a154_0x65eaaf(0x9d)]())[a154_0x65eaaf(0x8f)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a163_0x2140af=a163_0x1559;(function(_0x38d7a8,_0x49dee4){const _0x575fb1=a163_0x1559,_0x156e31=_0x38d7a8();while(!![]){try{const _0x11a07d=parseInt(_0x575fb1(0x125))/0x1*(-parseInt(_0x575fb1(0x132))/0x2)+-parseInt(_0x575fb1(0x110))/0x3*(parseInt(_0x575fb1(0x146))/0x4)+-parseInt(_0x575fb1(0x116))/0x5+-parseInt(_0x575fb1(0x13a))/0x6+-parseInt(_0x575fb1(0x147))/0x7*(-parseInt(_0x575fb1(0x14d))/0x8)+parseInt(_0x575fb1(0x105))/0x9+parseInt(_0x575fb1(0x129))/0xa;if(_0x11a07d===_0x49dee4)break;else _0x156e31['push'](_0x156e31['shift']());}catch(_0x43aa8a){_0x156e31['push'](_0x156e31['shift']());}}}(a163_0x32aa,0x80fb2));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x2140af(0x117)](['Equal',a163_0x2140af(0x11d),a163_0x2140af(0x140),a163_0x2140af(0x145),a163_0x2140af(0x12e),'In',a163_0x2140af(0x14e),a163_0x2140af(0x144),a163_0x2140af(0x14a),a163_0x2140af(0x131),a163_0x2140af(0x127),a163_0x2140af(0x155),a163_0x2140af(0x14c),a163_0x2140af(0x12d),a163_0x2140af(0x13e)]);function a163_0x32aa(){const _0x77bafd=['any','1825910jLMgKt','enum','from','include','Operator\x20\x27','union','string','Greater','boolean','literal','TimeRange\x20operator\x20requires\x20\x27from\x27','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_TIME_UNIT','Average','number','720229jEPHbx','operator','TimeWithinNext','discriminatedUnion','14437600FnDIzX','custom','second','day','EndWith','LessEqual','year','unit','TimeWithinPast','2yrGpNn','array','Equal','\x27\x20requires\x20a\x20value','max','Sum','value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','5380596ifynUP','\x27\x20requires\x20a\x20time\x20unit','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','min','TimeRange','type','Less','First','superRefine','timestamp','Regexp','GreaterEqual','137780xvdkOW','38815hgUdwa','exclude','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','IsNull','lazy','StartWith','976JXYPpA','Between','minute','MISSING_BETWEEN_BOUNDS','optional','Last','record','Segment\x20name\x20is\x20required','Contain','realtime','8782182JspWTS','Max','Value','hour','Min','addIssue','Segment\x20reference\x20must\x20not\x20be\x20empty','And','Behavior','has','CountDistinct','51rtLDuI','duration','batch','Count','object'];a163_0x32aa=function(){return _0x77bafd;};return a163_0x32aa();}export const TimeUnitSchema=z[a163_0x2140af(0x117)]([a163_0x2140af(0x12b),a163_0x2140af(0x14f),a163_0x2140af(0x108),a163_0x2140af(0x12c),'week','month',a163_0x2140af(0x12f)]);export const AggregationTypeSchema=z['enum']([a163_0x2140af(0x113),a163_0x2140af(0x137),a163_0x2140af(0x123),a163_0x2140af(0x109),'Max',a163_0x2140af(0x10f),'First','Last']);function a163_0x1559(_0x5524c8,_0x67b528){_0x5524c8=_0x5524c8-0x104;const _0x32aa10=a163_0x32aa();let _0x155962=_0x32aa10[_0x5524c8];return _0x155962;}const TemporalValueSchema=z['union']([z[a163_0x2140af(0x114)]({'timestamp':z[a163_0x2140af(0x11c)]()}),z[a163_0x2140af(0x114)]({'last':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x153)](z[a163_0x2140af(0x11c)](),z['number']())]),'unit':z[a163_0x2140af(0x11c)]()})]),OperatorValueSchema=z['union']([z['string'](),z['number'](),z[a163_0x2140af(0x11e)](),TemporalValueSchema,z[a163_0x2140af(0x133)](z['union']([z['string'](),z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x11e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x2140af(0x134),'Greater',a163_0x2140af(0x145),'Less',a163_0x2140af(0x12e),'In',a163_0x2140af(0x155),a163_0x2140af(0x14c),a163_0x2140af(0x12d),a163_0x2140af(0x144),a163_0x2140af(0x131),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a163_0x2140af(0x131),'TimeWithinNext']);export const OperatorDefSchema=z[a163_0x2140af(0x114)]({'type':OperatorTypeSchema,'not':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'value':OperatorValueSchema[a163_0x2140af(0x151)](),'min':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z['string'](),TemporalValueSchema])[a163_0x2140af(0x151)](),'max':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x11c)](),TemporalValueSchema])[a163_0x2140af(0x151)](),'unit':TimeUnitSchema[a163_0x2140af(0x151)](),'duration':z[a163_0x2140af(0x114)]({'day':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'week':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'month':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'year':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'hour':z[a163_0x2140af(0x124)]()['optional'](),'minute':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'second':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)]()})[a163_0x2140af(0x151)](),'from':z[a163_0x2140af(0x114)]({'last':z['union']([z[a163_0x2140af(0x124)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)]()})[a163_0x2140af(0x142)]((_0x355132,_0x1278be)=>{const _0xc6bc30=a163_0x2140af;OPERATORS_REQUIRING_VALUE[_0xc6bc30(0x10e)](_0x355132[_0xc6bc30(0x13f)])&&(_0x355132[_0xc6bc30(0x138)]===undefined||_0x355132[_0xc6bc30(0x138)]===null)&&_0x1278be[_0xc6bc30(0x10a)]({'code':'custom','message':_0xc6bc30(0x11a)+_0x355132[_0xc6bc30(0x13f)]+_0xc6bc30(0x135),'path':[_0xc6bc30(0x138)]}),_0x355132[_0xc6bc30(0x13f)]===_0xc6bc30(0x14e)&&_0x355132[_0xc6bc30(0x13d)]===undefined&&_0x355132[_0xc6bc30(0x136)]===undefined&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x139),'params':{'validationCode':_0xc6bc30(0x150)}}),OPERATORS_REQUIRING_UNIT[_0xc6bc30(0x10e)](_0x355132[_0xc6bc30(0x13f)])&&_0x355132[_0xc6bc30(0x138)]!==undefined&&!_0x355132[_0xc6bc30(0x130)]&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x11a)+_0x355132[_0xc6bc30(0x13f)]+_0xc6bc30(0x13b),'path':[_0xc6bc30(0x130)],'params':{'validationCode':_0xc6bc30(0x122)}}),_0x355132[_0xc6bc30(0x13f)]==='TimeRange'&&(!_0x355132[_0xc6bc30(0x111)]&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x121),'path':[_0xc6bc30(0x111)]}),!_0x355132['from']&&_0x1278be['addIssue']({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x120),'path':[_0xc6bc30(0x118)]}));});export const ArrayMatchingSchema=z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x11f)](a163_0x2140af(0x115)),z['literal']('all'),z['object']({'atLeast':z['number']()}),z['object']({'atMost':z[a163_0x2140af(0x124)]()}),z['object']({'exactly':z[a163_0x2140af(0x124)]()})]);export const AggregationDefSchema=z[a163_0x2140af(0x128)](a163_0x2140af(0x13f),[z['object']({'type':z[a163_0x2140af(0x117)]([a163_0x2140af(0x137),a163_0x2140af(0x109),a163_0x2140af(0x106),a163_0x2140af(0x123)]),'column':z[a163_0x2140af(0x11c)](),'groupingColumns':z['array'](z['string']())[a163_0x2140af(0x151)]()}),z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x113)),'groupingColumns':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x11c)]())[a163_0x2140af(0x151)]()}),z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10f)),'columns':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x11c)]())}),z[a163_0x2140af(0x114)]({'type':z['enum']([a163_0x2140af(0x141),a163_0x2140af(0x152)]),'column':z[a163_0x2140af(0x11c)](),'orderColumn':z[a163_0x2140af(0x11c)](),'groupingColumns':z[a163_0x2140af(0x133)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z[a163_0x2140af(0x114)]({'duration':z[a163_0x2140af(0x124)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x2140af(0x131),a163_0x2140af(0x127),a163_0x2140af(0x13e)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)]('Column'),'column':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)]()})['superRefine']((_0xb14399,_0x3edebe)=>{const _0x309107=a163_0x2140af,_0x4e85e5=_0xb14399[_0x309107(0x126)]['type'];_0xb14399['column']===_0x309107(0x143)?!TIMESTAMP_OPERATORS[_0x309107(0x10e)](_0x4e85e5)&&_0x3edebe['addIssue']({'code':_0x309107(0x12a),'message':_0x309107(0x149)+_0x4e85e5+'\x27)','path':[_0x309107(0x126),_0x309107(0x13f)]}):TIMESTAMP_OPERATORS[_0x309107(0x10e)](_0x4e85e5)&&_0x3edebe[_0x309107(0x10a)]({'code':_0x309107(0x12a),'message':'Operator\x20\x27'+_0x4e85e5+_0x309107(0x13c),'path':[_0x309107(0x126),_0x309107(0x13f)]});});export const FilterRuleDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10c)),'conditions':z[a163_0x2140af(0x133)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x107)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)](),'exclude':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'aggregation':AggregationDefSchema[a163_0x2140af(0x151)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a163_0x2140af(0x151)](),'limit':z['number']()['optional']()}));export const BehaviorConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10d)),'attribute':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)](),'exclude':z['boolean']()[a163_0x2140af(0x151)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)](),'filter':FilterRuleDefSchema[a163_0x2140af(0x151)](),'timeWindow':TimeWindowDefSchema[a163_0x2140af(0x151)](),'limit':z['number']()[a163_0x2140af(0x151)]()}));export const ColumnConditionDefSchema=z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)]('Column'),'column':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x114)]({'type':z['enum']([a163_0x2140af(0x10c),'Or']),'conditions':z[a163_0x2140af(0x133)](ConditionDefSchema),'description':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a163_0x2140af(0x117)]([a163_0x2140af(0x119),a163_0x2140af(0x148)]),'segment':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x13d)](0x1,a163_0x2140af(0x10b))});export const ConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x11b)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a163_0x2140af(0x14b)](()=>z['object']({'type':z['enum']([a163_0x2140af(0x10c),'Or']),'conditions':z[a163_0x2140af(0x133)](ConditionDefSchema),'description':z[a163_0x2140af(0x11c)]()['optional']()}));export const SegmentDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)]('segment')[a163_0x2140af(0x151)](),'name':z['string']()[a163_0x2140af(0x13d)](0x1,a163_0x2140af(0x154)),'description':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)](),'folder':z['string']()['optional'](),'rule':RuleDefSchema[a163_0x2140af(0x151)](),'kind':z['enum']([a163_0x2140af(0x112),a163_0x2140af(0x104),'funnel_stage'])[a163_0x2140af(0x151)](),'visible':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'activations':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x115)]())[a163_0x2140af(0x151)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x1926a9=a164_0x1d44;(function(_0x4baf5d,_0x3e9134){const _0x1a5a2f=a164_0x1d44,_0x581a06=_0x4baf5d();while(!![]){try{const _0x34b8b8=-parseInt(_0x1a5a2f(0x10c))/0x1*(parseInt(_0x1a5a2f(0x123))/0x2)+parseInt(_0x1a5a2f(0x107))/0x3*(-parseInt(_0x1a5a2f(0x116))/0x4)+-parseInt(_0x1a5a2f(0x11c))/0x5*(parseInt(_0x1a5a2f(0x104))/0x6)+parseInt(_0x1a5a2f(0x102))/0x7+-parseInt(_0x1a5a2f(0x121))/0x8*(-parseInt(_0x1a5a2f(0x118))/0x9)+parseInt(_0x1a5a2f(0x112))/0xa*(parseInt(_0x1a5a2f(0x11a))/0xb)+-parseInt(_0x1a5a2f(0x11e))/0xc;if(_0x34b8b8===_0x3e9134)break;else _0x581a06['push'](_0x581a06['shift']());}catch(_0x5ebc06){_0x581a06['push'](_0x581a06['shift']());}}}(a164_0x3cde,0x295db));import{readFileSync}from'fs';import*as a164_0x2d09b8 from'path';import*as a164_0x47e3d6 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';function a164_0x3cde(){const _0x2ec636=['journey','16tWkUZT','push','630CWIPCI','skipped','610869sqpnsE','not\x20a\x20','836898LOBKfk','YAML\x20parse\x20error:\x20','has','458169lUQqbm','parseDocument','campaign','segment','filterType','53JPxiql','basename','utf-8','result','campaign_type','error','15110AypEEw','message','YAML_PARSE_ERROR','length','4EZyrOM','template','1364040AaUwfy','map','1463IcCuBK','object','5MtDjrF','toJSON','1356168EtjUfn','type'];a164_0x3cde=function(){return _0x2ec636;};return a164_0x3cde();}const VALID_CAMPAIGN_TYPES=new Set(['email',a164_0x1926a9(0x122)]);export function isJourneyDef(_0x5e3119){const _0x266e97=a164_0x1926a9;return typeof _0x5e3119===_0x266e97(0x11b)&&_0x5e3119!==null&&_0x266e97(0x11f)in _0x5e3119&&_0x5e3119[_0x266e97(0x11f)]===_0x266e97(0x120);}export function isCampaignDef(_0x4745d3){const _0x5c9b93=a164_0x1926a9;if(typeof _0x4745d3!==_0x5c9b93(0x11b)||_0x4745d3===null)return![];const _0x1b6bfd=_0x4745d3,_0x30c338=VALID_CAMPAIGN_TYPES[_0x5c9b93(0x106)](_0x1b6bfd[_0x5c9b93(0x110)]);if(_0x1b6bfd[_0x5c9b93(0x11f)]===_0x5c9b93(0x109)&&_0x30c338)return!![];if(_0x30c338&&!_0x1b6bfd[_0x5c9b93(0x11f)])return!![];return![];}export function isTemplateDef(_0x2c294d){const _0x5b460c=a164_0x1926a9;return typeof _0x2c294d===_0x5b460c(0x11b)&&_0x2c294d!==null&&_0x5b460c(0x11f)in _0x2c294d&&_0x2c294d[_0x5b460c(0x11f)]===_0x5b460c(0x117);}export function isValidationResult(_0xb7da13){const _0x4d884d=a164_0x1926a9;return!(_0x4d884d(0x124)in _0xb7da13);}export function createParseErrorResult(_0x1d4f6f,_0x29ee3d,_0x54065d,_0x2c36bc,_0x5cb7e0=a164_0x1926a9(0x10a)){const _0x548d78=a164_0x1926a9;return{'filePath':_0x1d4f6f,'relativePath':_0x29ee3d,'source':_0x54065d,'result':{'valid':![],'errors':[{'level':_0x548d78(0x111),'path':'','code':_0x548d78(0x114),'message':_0x2c36bc}],'warnings':[]},'fileType':_0x5cb7e0};}function a164_0x1d44(_0x45849b,_0x1a3370){_0x45849b=_0x45849b-0x102;const _0x3cdee3=a164_0x3cde();let _0x1d444f=_0x3cdee3[_0x45849b];return _0x1d444f;}export function validateYamlFile(_0x595922,_0x3e2eef,_0x24349b={}){const _0x5a7ad6=a164_0x1926a9,_0x5c0876=a164_0x2d09b8['relative'](_0x3e2eef,_0x595922)||a164_0x2d09b8[_0x5a7ad6(0x10d)](_0x595922);try{const _0x2d6fdc=readFileSync(_0x595922,_0x5a7ad6(0x10e)),_0x5f59dc=a164_0x47e3d6[_0x5a7ad6(0x108)](_0x2d6fdc),_0x467c0e=_0x5f59dc[_0x5a7ad6(0x11d)]();if(!_0x467c0e)return createParseErrorResult(_0x595922,_0x5c0876,_0x2d6fdc,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x3cf145;if(isJourneyDef(_0x467c0e))_0x3cf145=_0x5a7ad6(0x120);else{if(isCampaignDef(_0x467c0e))_0x3cf145=_0x5a7ad6(0x109);else isTemplateDef(_0x467c0e)?_0x3cf145=_0x5a7ad6(0x117):_0x3cf145=_0x5a7ad6(0x10a);}if(_0x24349b[_0x5a7ad6(0x10b)]&&_0x3cf145!==_0x24349b[_0x5a7ad6(0x10b)])return{'filePath':_0x595922,'relativePath':_0x5c0876,'skipped':!![],'reason':_0x5a7ad6(0x103)+_0x24349b[_0x5a7ad6(0x10b)]};const _0x218cdb={'source':_0x2d6fdc,'document':_0x5f59dc};let _0x1f736e;if(_0x3cf145===_0x5a7ad6(0x120))_0x1f736e=validateJourneyDef(_0x467c0e,_0x218cdb);else{if(_0x3cf145===_0x5a7ad6(0x109))_0x1f736e=validateCampaignDef(_0x467c0e,_0x218cdb);else _0x3cf145===_0x5a7ad6(0x117)?_0x1f736e=validateTemplateDef(_0x467c0e,_0x218cdb):_0x1f736e=validateSegmentDef(_0x467c0e,_0x218cdb);}return{'filePath':_0x595922,'relativePath':_0x5c0876,'source':_0x2d6fdc,'result':_0x1f736e,'fileType':_0x3cf145};}catch(_0x374719){const _0x51db10=_0x374719 instanceof Error?_0x374719[_0x5a7ad6(0x113)]:String(_0x374719);return createParseErrorResult(_0x595922,_0x5c0876,'',_0x5a7ad6(0x105)+_0x51db10);}}export function validateYamlFiles(_0x17735e,_0x25f0a5,_0x15811c={}){const _0x3d8429=a164_0x1926a9;return _0x17735e[_0x3d8429(0x119)](_0x3e985f=>validateYamlFile(_0x3e985f,_0x25f0a5,_0x15811c));}export function calculateSummary(_0x444dc1){const _0x1c7135=a164_0x1926a9;let _0x2bc450=0x0,_0x47c618=0x0,_0x3644ef=0x0,_0x54eff9=0x0;for(const _0x3a7b0d of _0x444dc1){if(!isValidationResult(_0x3a7b0d)){_0x54eff9++;continue;}_0x3a7b0d[_0x1c7135(0x10f)]['valid']?_0x2bc450++:_0x47c618++,_0x3644ef+=_0x3a7b0d['result']['warnings'][_0x1c7135(0x115)];}return{'validCount':_0x2bc450,'invalidCount':_0x47c618,'warningCount':_0x3644ef,'skippedCount':_0x54eff9,'hasErrors':_0x47c618>0x0};}
|