@treasuredata/tdx 2026.3.15 → 2026.3.16
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/README.md +9 -0
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/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.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/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/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/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/index.js +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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f3ad2,_0xe8d073){const _0x550b22=a144_0x5d0f,_0x427f0d=_0x3f3ad2();while(!![]){try{const _0x18f3e2=-parseInt(_0x550b22(0x166))/0x1+-parseInt(_0x550b22(0x170))/0x2+-parseInt(_0x550b22(0x176))/0x3+parseInt(_0x550b22(0x19c))/0x4*(parseInt(_0x550b22(0x17c))/0x5)+-parseInt(_0x550b22(0x16d))/0x6*(-parseInt(_0x550b22(0x190))/0x7)+parseInt(_0x550b22(0x177))/0x8*(parseInt(_0x550b22(0x191))/0x9)+-parseInt(_0x550b22(0x17e))/0xa;if(_0x18f3e2===_0xe8d073)break;else _0x427f0d['push'](_0x427f0d['shift']());}catch(_0x45eea8){_0x427f0d['push'](_0x427f0d['shift']());}}}(a144_0x3b91,0xd18c0));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x59fc34,_0xb9b17c={},_0x31f54f={}){const _0x37b323=a144_0x5d0f;if(_0x31f54f[_0x37b323(0x16e)])return runSemanticChecks(_0x59fc34,_0xb9b17c);const _0x2d6b81=SegmentDefSchema[_0x37b323(0x180)](_0x59fc34);if(_0x2d6b81[_0x37b323(0x182)])return runSemanticChecks(_0x2d6b81[_0x37b323(0x187)],_0xb9b17c);return zodErrorsToValidationResult(_0x2d6b81[_0x37b323(0x18a)],_0xb9b17c);}export function validateRuleDef(_0x2e9e68,_0x4d8067,_0x49de32){const _0x2d49ed=a144_0x5d0f;if(!_0x2e9e68)return[];const _0x47fb09=RuleDefSchema[_0x2d49ed(0x180)](_0x2e9e68);if(_0x47fb09[_0x2d49ed(0x182)])return checkRule(_0x47fb09[_0x2d49ed(0x187)],_0x4d8067,_0x49de32);const _0x5d207b=flattenZodIssues(_0x47fb09[_0x2d49ed(0x18a)][_0x2d49ed(0x18f)]);return _0x5d207b['map'](_0x5d74e6=>{const _0x49c93a=_0x2d49ed,_0xef1cf8=formatZodPath(_0x5d74e6[_0x49c93a(0x167)]),_0x23c53e=_0xef1cf8?_0x4d8067+'.'+_0xef1cf8:_0x4d8067,_0x2cd4bc=mapZodIssueToCode(_0x5d74e6,_0xef1cf8),_0x4cdbc1=getLocationFromPath(_0x49de32['document'],_0x49de32[_0x49c93a(0x181)],pathToArray(_0x23c53e));return{'level':_0x49c93a(0x18a),'path':_0x23c53e,'code':_0x2cd4bc,'message':_0x5d74e6[_0x49c93a(0x186)],..._0x4cdbc1&&{'location':_0x4cdbc1}};});}function a144_0x5d0f(_0x4a6f5b,_0x42be73){_0x4a6f5b=_0x4a6f5b-0x15f;const _0x3b91ae=a144_0x3b91();let _0x5d0fc5=_0x3b91ae[_0x4a6f5b];return _0x5d0fc5;}function zodErrorsToValidationResult(_0xa045ea,_0x6bddf1){const _0x460f59=a144_0x5d0f,_0x3b47c0=flattenZodIssues(_0xa045ea[_0x460f59(0x18f)]),_0x4ce43d=_0x3b47c0[_0x460f59(0x19e)](_0x591e7e=>{const _0x3cd1ff=_0x460f59,_0x5c4630=formatZodPath(_0x591e7e[_0x3cd1ff(0x167)]),_0x17308d=mapZodIssueToCode(_0x591e7e,_0x5c4630),_0x149d43=getLocationFromPath(_0x6bddf1['document'],_0x6bddf1[_0x3cd1ff(0x181)],_0x591e7e['path']['map'](_0x408c67=>typeof _0x408c67==='symbol'?String(_0x408c67):_0x408c67));return{'level':_0x3cd1ff(0x18a),'path':_0x5c4630,'code':_0x17308d,'message':_0x591e7e[_0x3cd1ff(0x186)],..._0x149d43&&{'location':_0x149d43}};});return{'valid':![],'errors':_0x4ce43d,'warnings':[]};}function mapZodIssueToCode(_0x285129,_0x3c7c80){const _0x34ed8e=a144_0x5d0f,_0x266ccb=_0x285129[_0x34ed8e(0x199)]==='custom'?_0x285129['params']:undefined;if(_0x3c7c80===_0x34ed8e(0x168))return'MISSING_NAME';if(_0x3c7c80==='rule.type'||_0x3c7c80['endsWith'](_0x34ed8e(0x19a))){if(_0x285129['code']===_0x34ed8e(0x18d)){if(_0x3c7c80==='rule.type'||_0x3c7c80[_0x34ed8e(0x16f)](/\.conditions\[\d+\]\.type$/))return _0x34ed8e(0x1a2);}}if(_0x3c7c80[_0x34ed8e(0x160)]('.operator.type'))return _0x34ed8e(0x178);if(_0x3c7c80['endsWith'](_0x34ed8e(0x179)))return'MISSING_OPERATOR_VALUE';if(_0x266ccb?.[_0x34ed8e(0x162)]===_0x34ed8e(0x15f))return _0x34ed8e(0x15f);if(_0x266ccb?.[_0x34ed8e(0x162)]==='MISSING_TIME_UNIT')return _0x34ed8e(0x194);if(_0x3c7c80['endsWith']('.conditions')||_0x3c7c80===_0x34ed8e(0x184))return _0x34ed8e(0x172);if(_0x3c7c80['includes'](_0x34ed8e(0x174)))return _0x34ed8e(0x1a5);if(_0x3c7c80[_0x34ed8e(0x160)](_0x34ed8e(0x19b)))return _0x34ed8e(0x175);return _0x34ed8e(0x161);}function runSemanticChecks(_0x55f5a8,_0x46df7d){const _0x462bce=a144_0x5d0f,_0x5e283d=[];_0x55f5a8[_0x462bce(0x163)]&&_0x5e283d[_0x462bce(0x18b)](...checkRule(_0x55f5a8[_0x462bce(0x163)],_0x462bce(0x163),_0x46df7d));const _0x4db0d2=_0x5e283d['filter'](_0x5ebecf=>_0x5ebecf[_0x462bce(0x165)]===_0x462bce(0x18a)),_0x31a499=_0x5e283d['filter'](_0x2124f1=>_0x2124f1[_0x462bce(0x165)]===_0x462bce(0x1a4));return{'valid':_0x4db0d2[_0x462bce(0x171)]===0x0,'errors':_0x4db0d2,'warnings':_0x31a499};}function a144_0x3b91(){const _0x1136f1=['conditions','document','message','data','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','attribute','error','push','.filter','invalid_value','Behavior','issues','54404EEGrEy','207atqMLr','NESTED_CONDITION_GROUP','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','MISSING_TIME_UNIT','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','Attribute\x20\x27','code','.type','.segment','4ydHBMx','And','map','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','Attribute\x20name\x20cannot\x20be\x20empty','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','INVALID_RULE_TYPE','type','warning','INVALID_ARRAY_MATCHING','.conditions','MISSING_BETWEEN_BOUNDS','endsWith','SEGMENT_SCHEMA_ERROR','validationCode','rule','.attribute','level','802442pETETn','path','name','filter','aggregation','\x27\x20with\x20attribute\x20\x27','EMPTY_ATTRIBUTE','1074Ypzfgd','skipSchema','match','408360XxholK','length','MISSING_CONDITIONS','.conditions[','arrayMatching','MISSING_SEGMENT_REFERENCE','3283107sAXrkl','494192LRBafj','INVALID_OPERATOR_TYPE','.operator.value','Behavior\x20source\x20\x27','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','1295215IyfSzZ','EMPTY_CONDITIONS','1117380vaaJpu','.source','safeParse','source','success','BEHAVIOR_SOURCE_MISSING_FILTER'];a144_0x3b91=function(){return _0x1136f1;};return a144_0x3b91();}function checkRule(_0x4a2699,_0x3d984c,_0x5138f6){const _0x1db1b0=a144_0x5d0f,_0x5d03f2=[];if(_0x4a2699['conditions'][_0x1db1b0(0x171)]===0x0)return _0x5d03f2[_0x1db1b0(0x18b)]({'level':_0x1db1b0(0x18a),'path':_0x3d984c+_0x1db1b0(0x1a6),'code':_0x1db1b0(0x17d),'message':_0x1db1b0(0x197),'location':getLocationFromPath(_0x5138f6[_0x1db1b0(0x185)],_0x5138f6[_0x1db1b0(0x181)],pathToArray(_0x3d984c+'.conditions'))}),_0x5d03f2;return _0x5d03f2[_0x1db1b0(0x18b)](...checkConditions(_0x4a2699[_0x1db1b0(0x184)],_0x3d984c,_0x5138f6)),_0x5d03f2;}function checkConditions(_0x50d32c,_0x4d2365,_0x22bb3e){const _0x53742c=a144_0x5d0f,_0x145f0c=[];for(let _0x31d5df=0x0;_0x31d5df<_0x50d32c['length'];_0x31d5df++){const _0x14c344=_0x50d32c[_0x31d5df],_0x4b53ac=_0x4d2365+_0x53742c(0x173)+_0x31d5df+']';_0x145f0c[_0x53742c(0x18b)](...checkCondition(_0x14c344,_0x4b53ac,_0x22bb3e));}return _0x145f0c;}function checkCondition(_0x5de5e4,_0x590a3a,_0x517d9a){const _0xe1f50d=a144_0x5d0f,_0x5d6351=[];if(_0x5de5e4[_0xe1f50d(0x1a3)]===_0xe1f50d(0x19d)||_0x5de5e4['type']==='Or')return _0x5de5e4[_0xe1f50d(0x184)][_0xe1f50d(0x171)]===0x0?_0x5d6351['push']({'level':_0xe1f50d(0x18a),'path':_0x590a3a+'.conditions','code':_0xe1f50d(0x17d),'message':_0x5de5e4[_0xe1f50d(0x1a3)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x517d9a[_0xe1f50d(0x185)],_0x517d9a[_0xe1f50d(0x181)],pathToArray(_0x590a3a+_0xe1f50d(0x1a6)))}):_0x5d6351['push']({'level':_0xe1f50d(0x18a),'path':_0x590a3a,'code':_0xe1f50d(0x192),'message':_0x5de5e4['type']+_0xe1f50d(0x188)+_0xe1f50d(0x17b)+_0xe1f50d(0x195),'location':getLocationFromPath(_0x517d9a[_0xe1f50d(0x185)],_0x517d9a[_0xe1f50d(0x181)],pathToArray(_0x590a3a))}),_0x5d6351;if(_0x5de5e4[_0xe1f50d(0x1a3)]==='Value'||_0x5de5e4[_0xe1f50d(0x1a3)]===_0xe1f50d(0x18e)){const _0x5d13e9=_0x5de5e4,_0x582b31=_0x5d13e9[_0xe1f50d(0x181)],_0x476223=_0x5d13e9[_0xe1f50d(0x16a)],_0x8b2f61=_0x582b31||_0x476223;(!_0x5d13e9['attribute']||_0x5d13e9[_0xe1f50d(0x189)]==='')&&(!_0x8b2f61&&_0x5d6351[_0xe1f50d(0x18b)]({'level':'error','path':_0x590a3a+_0xe1f50d(0x164),'code':_0xe1f50d(0x16c),'message':_0xe1f50d(0x1a0),'location':getLocationFromPath(_0x517d9a[_0xe1f50d(0x185)],_0x517d9a['source'],pathToArray(_0x590a3a+'.attribute'))}));_0x5d13e9[_0xe1f50d(0x169)]&&_0x5d6351[_0xe1f50d(0x18b)](...checkRule(_0x5d13e9[_0xe1f50d(0x169)],_0x590a3a+_0xe1f50d(0x18c),_0x517d9a));if(_0x5d13e9[_0xe1f50d(0x181)]){const _0x7610d5=_0x5d13e9[_0xe1f50d(0x189)]&&_0x5d13e9[_0xe1f50d(0x189)]!=='';_0x7610d5&&!_0x5d13e9[_0xe1f50d(0x169)]&&_0x5d6351['push']({'level':_0xe1f50d(0x18a),'path':_0x590a3a+_0xe1f50d(0x17f),'code':_0xe1f50d(0x183),'message':_0xe1f50d(0x17a)+_0x5d13e9[_0xe1f50d(0x181)]+_0xe1f50d(0x16b)+_0x5d13e9[_0xe1f50d(0x189)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0xe1f50d(0x196)+_0xe1f50d(0x19f),'location':getLocationFromPath(_0x517d9a[_0xe1f50d(0x185)],_0x517d9a[_0xe1f50d(0x181)],pathToArray(_0x590a3a+'.source'))}),_0x7610d5&&_0x5d13e9[_0xe1f50d(0x169)]&&_0x5d6351[_0xe1f50d(0x18b)]({'level':'warning','path':_0x590a3a+_0xe1f50d(0x164),'code':_0xe1f50d(0x1a1),'message':_0xe1f50d(0x198)+_0x5d13e9[_0xe1f50d(0x189)]+_0xe1f50d(0x193)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x517d9a['document'],_0x517d9a['source'],pathToArray(_0x590a3a+'.attribute'))});}}return _0x5d6351;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2f8953,_0x2fa78a){const _0x3e5815=a145_0x394a,_0x1893d6=_0x2f8953();while(!![]){try{const _0x5c924b=-parseInt(_0x3e5815(0x14f))/0x1*(-parseInt(_0x3e5815(0x173))/0x2)+parseInt(_0x3e5815(0x151))/0x3+parseInt(_0x3e5815(0x155))/0x4*(-parseInt(_0x3e5815(0x164))/0x5)+parseInt(_0x3e5815(0x168))/0x6+-parseInt(_0x3e5815(0x159))/0x7+parseInt(_0x3e5815(0x167))/0x8+-parseInt(_0x3e5815(0x16c))/0x9;if(_0x5c924b===_0x2fa78a)break;else _0x1893d6['push'](_0x1893d6['shift']());}catch(_0x5ba762){_0x1893d6['push'](_0x1893d6['shift']());}}}(a145_0x1a0a,0xa6b0d));import a145_0x48e576 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';function a145_0x1a0a(){const _0x4abb65=['parentSegment','resolve','file_not_found','2844wvtGso','trim','file','No\x20tdx.json\x20found\x20for\x20file:\x20','type','configDir','folderPath','error','no_parent','isScoped','resourceType','journey','segmentName','parent_name','directory','909kWtQzl','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','2322549NtMuSK','parse','segment','scopedFolderPath','107276kzXRua','invalid_yaml','message','match','2268672zBxbjp','isDirectory','includes','extname','string','No\x20tdx.json\x20found','Not\x20a\x20YAML\x20file:\x20','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','parent_segment','readFile','cwd','10yReSym','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','dirname','4171056NoxeAI','2585424fcQgNd','no_config','context','File\x20not\x20found:\x20','17627112fBiZQa','stat','root','exists'];a145_0x1a0a=function(){return _0x4abb65;};return a145_0x1a0a();}import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x250d8a){const _0xf16b7d=a145_0x394a;return _0x250d8a[_0xf16b7d(0x177)]!==_0xf16b7d(0x17a);}export function isScopedResolution(_0x2ad535){const _0x1c0d7a=a145_0x394a;return _0x2ad535['type']===_0x1c0d7a(0x181)||_0x2ad535[_0x1c0d7a(0x177)]===_0x1c0d7a(0x175)||_0x2ad535[_0x1c0d7a(0x177)]===_0x1c0d7a(0x16a);}export function getScopedDetails(_0x3b3c46){const _0xb47d29=a145_0x394a;if(isScopedResolution(_0x3b3c46))return{'isScoped':_0x3b3c46[_0xb47d29(0x17c)],'scopedFolderPath':_0x3b3c46['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0xd226aa,_0x19b282){const _0x43f784=a145_0x394a;let _0x2f8c06=a145_0x48e576[_0x43f784(0x171)](_0xd226aa);const _0x40f1b0=a145_0x48e576[_0x43f784(0x152)](_0x2f8c06)[_0x43f784(0x16e)];while(_0x2f8c06!==_0x40f1b0){const _0x4aef18=a145_0x48e576['join'](_0x2f8c06,'tdx.json');if(await _0x19b282[_0x43f784(0x16f)](_0x4aef18))try{const _0x5dcdb5=await _0x19b282[_0x43f784(0x162)](_0x4aef18),_0x2f7611=JSON['parse'](_0x5dcdb5);if(_0x2f7611['parent_segment']&&typeof _0x2f7611[_0x43f784(0x161)]===_0x43f784(0x15d))return{'configPath':_0x4aef18,'configDir':_0x2f8c06,'parentSegment':_0x2f7611[_0x43f784(0x161)]};}catch{}_0x2f8c06=a145_0x48e576['dirname'](_0x2f8c06);}return null;}function a145_0x394a(_0x1647b2,_0x15cb0f){_0x1647b2=_0x1647b2-0x14f;const _0x1a0a3a=a145_0x1a0a();let _0x394a25=_0x1a0a3a[_0x1647b2];return _0x394a25;}function calculateScopedPath(_0x5637c6,_0x17b971){const _0x390710=a145_0x48e576['relative'](_0x17b971,_0x5637c6),_0x286ece=_0x390710!==''&&_0x390710!=='.'&&!_0x390710['startsWith']('..');return{'isScoped':_0x286ece,'scopedFolderPath':_0x286ece?_0x390710['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x35fc76){const _0x592880=a145_0x394a,{arg:_0x3a503f,contextParent:_0x4bca73,cwd:cwd=process[_0x592880(0x163)](),fs:fs=nodeFileSystem}=_0x35fc76;if(_0x3a503f&&isYamlFilePath(_0x3a503f))try{const _0x58d26d=await resolveYamlFilePath(_0x3a503f,fs),_0x224069=a145_0x48e576[_0x592880(0x171)](_0x3a503f),_0x1152a2=a145_0x48e576[_0x592880(0x166)](_0x224069),_0x212b2c=await findTdxConfigAsync(_0x1152a2,fs);if(!_0x212b2c){if(_0x4bca73){const _0x524d3c=a145_0x48e576[_0x592880(0x166)](_0x224069);return{'type':_0x592880(0x175),'parentName':_0x4bca73,'targetDir':_0x524d3c,'configRoot':_0x524d3c,'filePath':_0x224069,'resourceName':_0x58d26d[_0x592880(0x17f)],'folderPath':_0x58d26d['folderPath'],'resourceType':_0x58d26d[_0x592880(0x17d)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x592880(0x169),'message':_0x592880(0x176)+_0x3a503f,'arg':_0x3a503f,'helpText':_0x592880(0x160)};}const _0x293095=calculateScopedPath(_0x1152a2,_0x212b2c[_0x592880(0x178)]);return{'type':_0x592880(0x175),'parentName':_0x212b2c[_0x592880(0x170)],'targetDir':_0x212b2c[_0x592880(0x178)],'configRoot':_0x212b2c[_0x592880(0x178)],'filePath':_0x224069,'resourceName':_0x58d26d[_0x592880(0x17f)],'folderPath':_0x58d26d[_0x592880(0x179)],'resourceType':_0x58d26d[_0x592880(0x17d)],'isScoped':_0x293095['isScoped'],'scopedFolderPath':_0x293095[_0x592880(0x154)]};}catch(_0x4e6269){const _0x3b3171=_0x4e6269 instanceof Error?_0x4e6269[_0x592880(0x157)]:String(_0x4e6269);if(_0x3b3171[_0x592880(0x15b)]('File\x20not\x20found'))return{'type':_0x592880(0x17a),'errorCode':_0x592880(0x172),'message':_0x592880(0x16b)+_0x3a503f,'arg':_0x3a503f};if(_0x3b3171['includes'](_0x592880(0x15e))){if(_0x4bca73){const _0x2ba0ec=a145_0x48e576[_0x592880(0x171)](_0x3a503f);if(await fs[_0x592880(0x16f)](_0x2ba0ec)){const _0x5e483b=a145_0x48e576['dirname'](_0x2ba0ec),_0x358f90=await fs['readFile'](_0x2ba0ec),_0x5e07b7=_0x358f90[_0x592880(0x158)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x24dc8a=_0x358f90[_0x592880(0x158)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x407451=_0x5e07b7?_0x5e07b7[0x1][_0x592880(0x174)]():a145_0x48e576['basename'](_0x3a503f,a145_0x48e576[_0x592880(0x15c)](_0x3a503f)),_0x1c3a65=_0x24dc8a&&_0x24dc8a[0x1]['trim']()==='journey'?_0x592880(0x17e):_0x592880(0x153);return{'type':_0x592880(0x175),'parentName':_0x4bca73,'targetDir':_0x5e483b,'configRoot':_0x5e483b,'filePath':_0x2ba0ec,'resourceName':_0x407451,'folderPath':'','resourceType':_0x1c3a65,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x592880(0x17a),'errorCode':_0x592880(0x169),'message':_0x592880(0x176)+_0x3a503f,'arg':_0x3a503f,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x592880(0x17a),'errorCode':_0x592880(0x156),'message':_0x3b3171,'arg':_0x3a503f};}if(_0x3a503f){const _0x519c69=a145_0x48e576[_0x592880(0x171)](cwd,_0x3a503f);let _0x3e7cd1=null;try{_0x3e7cd1=await fs[_0x592880(0x16d)](_0x519c69);}catch{}if(_0x3e7cd1?.[_0x592880(0x15a)]()){const _0x391b64=await findTdxConfigAsync(_0x519c69,fs);if(_0x391b64){const _0xa16821=calculateScopedPath(_0x519c69,_0x391b64[_0x592880(0x178)]);return{'type':_0x592880(0x181),'parentName':_0x391b64[_0x592880(0x170)],'targetDir':_0x519c69,'configRoot':_0x391b64[_0x592880(0x178)],'isScoped':_0xa16821[_0x592880(0x17c)],'scopedFolderPath':_0xa16821[_0x592880(0x154)]};}if(_0x4bca73)return{'type':_0x592880(0x181),'parentName':_0x4bca73,'targetDir':_0x519c69,'configRoot':_0x519c69,'isScoped':![],'scopedFolderPath':''};return{'type':_0x592880(0x17a),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x3a503f,'arg':_0x3a503f,'helpText':_0x592880(0x160)};}if(_0x3e7cd1?.['isFile']())return{'type':_0x592880(0x17a),'errorCode':_0x592880(0x156),'message':_0x592880(0x15f)+_0x3a503f,'arg':_0x3a503f,'helpText':_0x592880(0x150)};const _0x141782=sanitizeFileName(_0x3a503f),_0xbd80ff=getSegmentRootDir(_0x141782,cwd);return{'type':_0x592880(0x180),'parentName':_0x3a503f,'targetDir':_0xbd80ff,'configRoot':_0xbd80ff};}const _0x361d52=await findTdxConfigAsync(cwd,fs);if(_0x361d52){const _0x146d11=calculateScopedPath(cwd,_0x361d52[_0x592880(0x178)]);return{'type':_0x592880(0x16a),'parentName':_0x361d52[_0x592880(0x170)],'targetDir':cwd,'configRoot':_0x361d52[_0x592880(0x178)],'isScoped':_0x146d11['isScoped'],'scopedFolderPath':_0x146d11['scopedFolderPath']};}if(_0x4bca73){const _0x5acfff=sanitizeFileName(_0x4bca73),_0x4070de=getSegmentRootDir(_0x5acfff,cwd);return{'type':_0x592880(0x16a),'parentName':_0x4bca73,'targetDir':_0x4070de,'configRoot':_0x4070de,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x592880(0x17b),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x592880(0x165)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0xf5e2a7=a146_0x1928;function a146_0x1928(_0x401275,_0x2799fd){_0x401275=_0x401275-0x1e8;const _0x1a6107=a146_0x1a61();let _0x19284e=_0x1a6107[_0x401275];return _0x19284e;}(function(_0x4243f5,_0x38af42){const _0x232cee=a146_0x1928,_0x37e40c=_0x4243f5();while(!![]){try{const _0x493766=-parseInt(_0x232cee(0x1fb))/0x1+-parseInt(_0x232cee(0x1ff))/0x2*(-parseInt(_0x232cee(0x1fe))/0x3)+parseInt(_0x232cee(0x203))/0x4*(parseInt(_0x232cee(0x1ec))/0x5)+parseInt(_0x232cee(0x1ea))/0x6+parseInt(_0x232cee(0x1ef))/0x7*(parseInt(_0x232cee(0x1f6))/0x8)+parseInt(_0x232cee(0x1f2))/0x9*(parseInt(_0x232cee(0x204))/0xa)+-parseInt(_0x232cee(0x1f4))/0xb;if(_0x493766===_0x38af42)break;else _0x37e40c['push'](_0x37e40c['shift']());}catch(_0x58a51a){_0x37e40c['push'](_0x37e40c['shift']());}}}(a146_0x1a61,0x362a0));import{existsSync,readFileSync}from'fs';import a146_0x585457 from'path';const TDX_CONFIG_FILE=a146_0xf5e2a7(0x201),SEGMENTS_DIR=a146_0xf5e2a7(0x200);export function findTdxConfigPath(_0x37d1ab=process['cwd']()){const _0x8d6b62=a146_0xf5e2a7;let _0x20ca38=a146_0x585457[_0x8d6b62(0x1f3)](_0x37d1ab);const _0x3c4d2b=a146_0x585457[_0x8d6b62(0x1fd)](_0x20ca38)['root'];while(_0x20ca38!==_0x3c4d2b){const _0x2074fa=a146_0x585457['join'](_0x20ca38,TDX_CONFIG_FILE);if(existsSync(_0x2074fa))return _0x2074fa;_0x20ca38=a146_0x585457[_0x8d6b62(0x1f7)](_0x20ca38);}return null;}export function loadTdxConfig(_0x20cc53){const _0x475348=a146_0xf5e2a7,_0x5f059b=readFileSync(_0x20cc53,'utf-8');let _0x1781ce;try{_0x1781ce=JSON[_0x475348(0x1fd)](_0x5f059b);}catch{throw new Error(_0x475348(0x1e9)+_0x20cc53);}if(!_0x1781ce||typeof _0x1781ce!==_0x475348(0x1fa))throw new Error(_0x475348(0x1eb));const _0x174775=_0x1781ce,_0x162c52=_0x174775[_0x475348(0x1fc)]&&typeof _0x174775['parent_segment']===_0x475348(0x1f1),_0x59bbcc=_0x174775[_0x475348(0x1ee)]&&typeof _0x174775[_0x475348(0x1ee)]===_0x475348(0x1f1);if(!_0x162c52&&!_0x59bbcc)throw new Error(_0x475348(0x1e8));const _0x42b42f={};return _0x162c52&&(_0x42b42f[_0x475348(0x1fc)]=_0x174775[_0x475348(0x1fc)]),_0x59bbcc&&(_0x42b42f[_0x475348(0x1ee)]=_0x174775[_0x475348(0x1ee)]),_0x42b42f;}export function findTdxConfig(_0x541bc7=process[a146_0xf5e2a7(0x1f8)]()){const _0x3890d0=a146_0xf5e2a7,_0x671c54=findTdxConfigPath(_0x541bc7);if(!_0x671c54)throw new Error(_0x3890d0(0x1f0));const _0x503ca8=loadTdxConfig(_0x671c54),_0x1b4d71=a146_0x585457[_0x3890d0(0x1f7)](_0x671c54);return{'config':_0x503ca8,'configPath':_0x671c54,'configDir':_0x1b4d71};}export function tryFindTdxConfig(_0x10084c){try{return findTdxConfig(_0x10084c);}catch{return null;}}function a146_0x1a61(){const _0x39630c=['join','2565112eGvgPi','dirname','cwd','relative','object','383195onNzlk','parent_segment','parse','617877fVpTHL','4IBNPXj','segments','tdx.json','startsWith','28vJZGVI','70EKscpb','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','Invalid\x20JSON\x20in\x20','1882830XwkDOX','Invalid\x20tdx.json:\x20expected\x20object','78695YCYgZY','stringify','engage_workspace','7rgSKXz','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','string','503541YvbuIr','resolve','10374397GoLjDI'];a146_0x1a61=function(){return _0x39630c;};return a146_0x1a61();}export function getSegmentRootDir(_0x313be7,_0x1b9f64=process[a146_0xf5e2a7(0x1f8)]()){const _0x501846=a146_0xf5e2a7;return a146_0x585457[_0x501846(0x1f5)](_0x1b9f64,SEGMENTS_DIR,_0x313be7);}export function getTdxConfigPath(_0x3e90a8,_0x4eaa71=process['cwd']()){return a146_0x585457['join'](getSegmentRootDir(_0x3e90a8,_0x4eaa71),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0xfedf87,_0xc5a9a9){const _0x7793c5=a146_0xf5e2a7,_0x3e6363=a146_0x585457[_0x7793c5(0x1f3)](_0xfedf87),_0x448fa6=a146_0x585457[_0x7793c5(0x1f9)](_0xc5a9a9,_0x3e6363);if(_0x448fa6[_0x7793c5(0x202)]('..'))return'';return _0x448fa6;}export function localPathToTdFolderPath(_0x30b036){const _0x3306c8=a146_0xf5e2a7,_0x5df773=a146_0x585457[_0x3306c8(0x1f7)](_0x30b036);if(_0x5df773==='.'||_0x5df773==='')return'';return _0x5df773['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5c894b,_0xfcc38c){const _0x128071=a146_0xf5e2a7;if(!_0x5c894b)return _0xfcc38c;return a146_0x585457[_0x128071(0x1f5)](_0xfcc38c,_0x5c894b);}export function createTdxConfigContent(_0xfc270d){const _0x421348=a146_0xf5e2a7,_0x330a05={'parent_segment':_0xfc270d};return JSON[_0x421348(0x1ed)](_0x330a05,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3bc3d7){const _0x4fd991={'engage_workspace':_0x3bc3d7};return JSON['stringify'](_0x4fd991,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x1af05a=a147_0x19ba;(function(_0xa4ef6,_0x4f5a75){const _0x43c8bf=a147_0x19ba,_0x425242=_0xa4ef6();while(!![]){try{const _0x58972d=parseInt(_0x43c8bf(0x180))/0x1*(-parseInt(_0x43c8bf(0x18e))/0x2)+-parseInt(_0x43c8bf(0x1a2))/0x3+parseInt(_0x43c8bf(0x183))/0x4*(parseInt(_0x43c8bf(0x18c))/0x5)+-parseInt(_0x43c8bf(0x181))/0x6+-parseInt(_0x43c8bf(0x187))/0x7+-parseInt(_0x43c8bf(0x18d))/0x8+parseInt(_0x43c8bf(0x18f))/0x9;if(_0x58972d===_0x4f5a75)break;else _0x425242['push'](_0x425242['shift']());}catch(_0xf0bb0c){_0x425242['push'](_0x425242['shift']());}}}(a147_0x2ba1,0xc017c));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x188),a147_0x1af05a(0x19b),'daily',a147_0x1af05a(0x18b),a147_0x1af05a(0x19f),a147_0x1af05a(0x1a1),a147_0x1af05a(0x19d)]);export const RepeatUnitSchema=z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x189),a147_0x1af05a(0x198),a147_0x1af05a(0x1a6),'week',a147_0x1af05a(0x192),'once',a147_0x1af05a(0x188)]);function a147_0x19ba(_0xebc473,_0x3f94d1){_0xebc473=_0xebc473-0x180;const _0x2ba1ab=a147_0x2ba1();let _0x19bafa=_0x2ba1ab[_0xebc473];return _0x19bafa;}function a147_0x2ba1(){const _0x544a33=['monthly','number','cron','2517612SzcHss','unknown','min','enum','day','optional','79tctxjQ','6772026PTsfzt','onSuccess','668iOcMOk','Activation\x20name\x20is\x20required','Top-N','union','2607157SBhPDn','none','minute','string','weekly','33130mzNgER','3992400wLTaEo','10358YDjEBe','26359083hiWckJ','nullable','asc','month','object','onFailure','masked','All','boolean','hour','First','clear','hourly','array','minutes_interval','record'];a147_0x2ba1=function(){return _0x544a33;};return a147_0x2ba1();}export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a147_0x1af05a(0x1a7)](),'repeat_unit':RepeatUnitSchema[a147_0x1af05a(0x1a7)](),'repeat_frequency':z['number']()[a147_0x1af05a(0x1a7)](),'repeat_sub_frequency':z[a147_0x1af05a(0x19c)](z[a147_0x1af05a(0x1a0)]())[a147_0x1af05a(0x1a7)](),'start_at':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x190)]()[a147_0x1af05a(0x1a7)](),'end_on':z['string']()['nullable']()[a147_0x1af05a(0x1a7)](),'timezone':z[a147_0x1af05a(0x18a)]()['optional']()});export const NotificationDefSchema=z[a147_0x1af05a(0x193)]({'notify_on':z[a147_0x1af05a(0x19c)](z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x182),a147_0x1af05a(0x194)]))['optional'](),'email_recipients':z[a147_0x1af05a(0x19c)](z[a147_0x1af05a(0x18a)]())[a147_0x1af05a(0x1a7)]()});export const ActivationColumnDefSchema=z[a147_0x1af05a(0x186)]([z[a147_0x1af05a(0x18a)](),z[a147_0x1af05a(0x193)]({'name':z[a147_0x1af05a(0x18a)](),'type':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x1a7)](),'visibility':z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x19a),'masked'])[a147_0x1af05a(0x1a7)]()})]);export const ActivationBehaviorDefSchema=z[a147_0x1af05a(0x193)]({'columns':z['array'](z[a147_0x1af05a(0x193)]({'name':z[a147_0x1af05a(0x18a)](),'type':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x1a7)](),'visibility':z[a147_0x1af05a(0x1a5)](['clear',a147_0x1af05a(0x195)])[a147_0x1af05a(0x1a7)]()}))[a147_0x1af05a(0x1a7)](),'behavior_table':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x1a7)](),'join_row':z[a147_0x1af05a(0x1a0)]()[a147_0x1af05a(0x190)]()['optional'](),'join_strategy':z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x196),a147_0x1af05a(0x199),'Last',a147_0x1af05a(0x185)])['optional'](),'formatting':z[a147_0x1af05a(0x1a5)](['rows','cols'])['optional'](),'order_by':z['array'](z[a147_0x1af05a(0x193)]({'key':z[a147_0x1af05a(0x18a)](),'order':z[a147_0x1af05a(0x1a5)]([a147_0x1af05a(0x191),'desc'])}))[a147_0x1af05a(0x1a7)]()});export const ActivationDefSchema=z['object']({'name':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x1a4)](0x1,a147_0x1af05a(0x184)),'description':z['string']()[a147_0x1af05a(0x1a7)](),'connection':z['string']()[a147_0x1af05a(0x1a4)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a147_0x1af05a(0x197)]()[a147_0x1af05a(0x1a7)](),'columns':z[a147_0x1af05a(0x19c)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a147_0x1af05a(0x1a7)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a147_0x1af05a(0x19e)](z['string'](),z[a147_0x1af05a(0x1a3)]())['optional'](),'activation_template_id':z[a147_0x1af05a(0x18a)]()[a147_0x1af05a(0x190)]()[a147_0x1af05a(0x1a7)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a147_0x1af05a(0x1a7)](),'run_after_journey_refresh':z[a147_0x1af05a(0x197)]()['optional']()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a148_0x58b6(_0x57efd4,_0xa48b5){_0x57efd4=_0x57efd4-0x107;var _0x53b223=a148_0x53b2();var _0x58b632=_0x53b223[_0x57efd4];return _0x58b632;}function a148_0x53b2(){var _0x1437ce=['10KuJKaS','5942190JXWYIs','616238qtrocq','5251437jijVlX','6zddnBt','1824690UISCjQ','163KskQnW','1935066xPjaAT','56IbmHDe','1086600OgfPTt'];a148_0x53b2=function(){return _0x1437ce;};return a148_0x53b2();}(function(_0x28e4ff,_0x6a2ec7){var _0x4f8c0e=a148_0x58b6,_0x52fd07=_0x28e4ff();while(!![]){try{var _0x88f3a2=-parseInt(_0x4f8c0e(0x10b))/0x1*(-parseInt(_0x4f8c0e(0x109))/0x2)+parseInt(_0x4f8c0e(0x10a))/0x3+-parseInt(_0x4f8c0e(0x10e))/0x4+parseInt(_0x4f8c0e(0x10f))/0x5*(parseInt(_0x4f8c0e(0x10c))/0x6)+-parseInt(_0x4f8c0e(0x107))/0x7*(parseInt(_0x4f8c0e(0x10d))/0x8)+-parseInt(_0x4f8c0e(0x108))/0x9+parseInt(_0x4f8c0e(0x110))/0xa;if(_0x88f3a2===_0x6a2ec7)break;else _0x52fd07['push'](_0x52fd07['shift']());}catch(_0xbb3567){_0x52fd07['push'](_0x52fd07['shift']());}}}(a148_0x53b2,0x5bf03));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0xa6b51e=a149_0x2394;(function(_0x236d7f,_0x5ddc82){const _0x2649ba=a149_0x2394,_0x5b50bf=_0x236d7f();while(!![]){try{const _0x166757=-parseInt(_0x2649ba(0x1d8))/0x1*(parseInt(_0x2649ba(0x1f2))/0x2)+-parseInt(_0x2649ba(0x1f0))/0x3+-parseInt(_0x2649ba(0x1da))/0x4+parseInt(_0x2649ba(0x1fb))/0x5+parseInt(_0x2649ba(0x1ed))/0x6*(parseInt(_0x2649ba(0x1f6))/0x7)+parseInt(_0x2649ba(0x1d9))/0x8+parseInt(_0x2649ba(0x1dc))/0x9;if(_0x166757===_0x5ddc82)break;else _0x5b50bf['push'](_0x5b50bf['shift']());}catch(_0x71ce0b){_0x5b50bf['push'](_0x5b50bf['shift']());}}}(a149_0x5465,0x36d2a));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum'](['draft',a149_0xa6b51e(0x1df),a149_0xa6b51e(0x1f1)]);export const ReentryModeTypeSchema=z['enum']([a149_0xa6b51e(0x1de),'reentry_unless_goal_achieved','reentry_always']);function a149_0x5465(){const _0x1c39ae=['7TAToFo','array','string','record','discriminatedUnion','2096900ZeHsEP','23869EbxLlu','1688360QoHUCo','439580JJQlns','journeys','401436TKqOlw','optional','no_reentry','simulation','Journey\x20name\x20is\x20required','week','end','object','isArray','decision_point','merge','number','activation','passthrough','enum','length','ab_test','369366vZveJn','wait','boolean','1134816DAqlYR','launched','2Yahlcs','stages','literal','type'];a149_0x5465=function(){return _0x1c39ae;};return a149_0x5465();}export const WaitUnitTypeSchema=z[a149_0xa6b51e(0x1ea)](['day',a149_0xa6b51e(0x1e1)]);export const StepTypeValueSchema=z[a149_0xa6b51e(0x1ea)]([a149_0xa6b51e(0x1ee),a149_0xa6b51e(0x1e8),a149_0xa6b51e(0x1e5),a149_0xa6b51e(0x1ec),a149_0xa6b51e(0x1e6),'jump','end']);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0xa6b51e(0x1e3)]({'journey':z[a149_0xa6b51e(0x1f8)](),'stage':z[a149_0xa6b51e(0x1f8)](),'bundle_id':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)]()});export const CriteriaDefSchema=z['object']({'name':z[a149_0xa6b51e(0x1f8)](),'description':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'segment':z[a149_0xa6b51e(0x1f8)](),'target':JumpTargetDefSchema[a149_0xa6b51e(0x1dd)]()});const WaitConditionTimeoutDefSchema=z[a149_0xa6b51e(0x1e3)]({'duration':z[a149_0xa6b51e(0x1e7)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a149_0xa6b51e(0x1dd)]()}),WaitConditionDefSchema=z[a149_0xa6b51e(0x1e3)]({'segment':z[a149_0xa6b51e(0x1f8)](),'next':z[a149_0xa6b51e(0x1f8)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a149_0xa6b51e(0x1dd)]()}),WaitStepParamsDefSchema=z[a149_0xa6b51e(0x1e3)]({'duration':z[a149_0xa6b51e(0x1e7)]()[a149_0xa6b51e(0x1dd)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'condition':WaitConditionDefSchema[a149_0xa6b51e(0x1dd)](),'days_of_week':z[a149_0xa6b51e(0x1f7)](z[a149_0xa6b51e(0x1f8)]())['optional']()}),StepBaseFields={'name':z[a149_0xa6b51e(0x1f8)](),'uuid':z['string']()[a149_0xa6b51e(0x1dd)](),'next':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)]()},WaitStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1ee)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0xa6b51e(0x1e3)]({'activation':z[a149_0xa6b51e(0x1f8)]()}),ActivationStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1e8)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0xa6b51e(0x1e3)]({'name':z[a149_0xa6b51e(0x1f8)](),'segment':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'segment_id':z['string']()[a149_0xa6b51e(0x1dd)](),'excluded':z[a149_0xa6b51e(0x1ef)]()[a149_0xa6b51e(0x1dd)](),'next':z['string']()[a149_0xa6b51e(0x1dd)]()}),DecisionPointStepParamsDefSchema=z[a149_0xa6b51e(0x1e3)]({'branches':z[a149_0xa6b51e(0x1f7)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1e5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0xa6b51e(0x1e3)]({'id':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'name':z['string'](),'percentage':z[a149_0xa6b51e(0x1e7)](),'next':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'customized_split':z[a149_0xa6b51e(0x1ef)]()[a149_0xa6b51e(0x1dd)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1ec)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1e6))}),JumpStepParamsDefSchema=z[a149_0xa6b51e(0x1e3)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z['literal']('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a149_0xa6b51e(0x1e3)]({...StepBaseFields,'type':z[a149_0xa6b51e(0x1f4)](a149_0xa6b51e(0x1e2))})[a149_0xa6b51e(0x1e9)]();function a149_0x2394(_0x687e68,_0x4b3f4b){_0x687e68=_0x687e68-0x1d8;const _0x5465d5=a149_0x5465();let _0x239444=_0x5465d5[_0x687e68];return _0x239444;}export const StepDefSchema=z[a149_0xa6b51e(0x1fa)](a149_0xa6b51e(0x1f5),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0xa6b51e(0x1e3)]({'name':z[a149_0xa6b51e(0x1f8)](),'description':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'id':z['string']()[a149_0xa6b51e(0x1dd)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a149_0xa6b51e(0x1f7)](CriteriaDefSchema)[a149_0xa6b51e(0x1dd)](),'milestone':CriteriaDefSchema[a149_0xa6b51e(0x1dd)](),'root_step':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'steps':z['array'](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a149_0xa6b51e(0x1e3)]({'name':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'version':z[a149_0xa6b51e(0x1f8)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z['boolean']()['optional'](),'stages':z['array'](StageDefSchema),'id':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'version_number':z[a149_0xa6b51e(0x1e7)]()[a149_0xa6b51e(0x1dd)](),'goal':CriteriaDefSchema[a149_0xa6b51e(0x1dd)](),'reentry':ReentryModeTypeSchema[a149_0xa6b51e(0x1dd)]()});export const JourneyDefSchema=z['lazy'](()=>z[a149_0xa6b51e(0x1e3)]({'type':z['literal']('journey'),'name':z[a149_0xa6b51e(0x1f8)]()['min'](0x1,a149_0xa6b51e(0x1e0)),'description':z['string']()[a149_0xa6b51e(0x1dd)](),'bundle_id':z[a149_0xa6b51e(0x1f8)]()['optional'](),'bundle_name':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'folder_id':z['string']()[a149_0xa6b51e(0x1dd)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a149_0xa6b51e(0x1ef)]()[a149_0xa6b51e(0x1dd)](),'goal':CriteriaDefSchema[a149_0xa6b51e(0x1dd)](),'id':z['string']()[a149_0xa6b51e(0x1dd)](),'version':z[a149_0xa6b51e(0x1f8)]()[a149_0xa6b51e(0x1dd)](),'version_number':z['number']()[a149_0xa6b51e(0x1dd)](),'stages':z[a149_0xa6b51e(0x1f7)](StageDefSchema)[a149_0xa6b51e(0x1dd)](),'versions':z[a149_0xa6b51e(0x1f7)](JourneyEntryDefSchema)['optional'](),'journeys':z[a149_0xa6b51e(0x1f7)](JourneyEntryDefSchema)[a149_0xa6b51e(0x1dd)](),'segments':z[a149_0xa6b51e(0x1f9)](z['string'](),EmbeddedSegmentDefSchema)[a149_0xa6b51e(0x1dd)](),'activations':z[a149_0xa6b51e(0x1f9)](z[a149_0xa6b51e(0x1f8)](),ActivationDefSchema)['optional']()})['refine'](_0x7072d6=>{const _0x325d3d=a149_0xa6b51e,_0x13871d=[_0x7072d6[_0x325d3d(0x1db)],_0x7072d6[_0x325d3d(0x1f3)],_0x7072d6['versions']]['filter'](_0x5052b3=>Array[_0x325d3d(0x1e4)](_0x5052b3)&&_0x5052b3[_0x325d3d(0x1eb)]>0x0)['length'];return _0x13871d===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32077d,_0x73606){var _0x4502ae=a151_0x4695,_0x143c6d=_0x32077d();while(!![]){try{var _0x3dee16=parseInt(_0x4502ae(0x1be))/0x1*(parseInt(_0x4502ae(0x1c1))/0x2)+parseInt(_0x4502ae(0x1bd))/0x3*(-parseInt(_0x4502ae(0x1c5))/0x4)+-parseInt(_0x4502ae(0x1bf))/0x5+parseInt(_0x4502ae(0x1c0))/0x6+parseInt(_0x4502ae(0x1c6))/0x7+-parseInt(_0x4502ae(0x1c2))/0x8*(parseInt(_0x4502ae(0x1c3))/0x9)+-parseInt(_0x4502ae(0x1c4))/0xa;if(_0x3dee16===_0x73606)break;else _0x143c6d['push'](_0x143c6d['shift']());}catch(_0x2d218c){_0x143c6d['push'](_0x143c6d['shift']());}}}(a151_0x2467,0xef432));function a151_0x4695(_0x573b5d,_0x365f06){_0x573b5d=_0x573b5d-0x1bd;var _0x24674e=a151_0x2467();var _0x46953f=_0x24674e[_0x573b5d];return _0x46953f;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a151_0x2467(){var _0x609331=['8bgejsn','9543249bOPDpN','2108330mIKsId','38944kuTmeS','9518096FSoySb','381piAmmi','10737jtNCkw','1295200vbnokq','8523996EDAQgs','180XDHpZM'];a151_0x2467=function(){return _0x609331;};return a151_0x2467();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a152_0x44dc78=a152_0x1803;(function(_0x4a9a3f,_0x810976){const _0x16c604=a152_0x1803,_0x145a1a=_0x4a9a3f();while(!![]){try{const _0x4effd6=parseInt(_0x16c604(0xa5))/0x1*(-parseInt(_0x16c604(0xe4))/0x2)+-parseInt(_0x16c604(0xd6))/0x3*(-parseInt(_0x16c604(0xc1))/0x4)+-parseInt(_0x16c604(0x9e))/0x5*(-parseInt(_0x16c604(0xc6))/0x6)+parseInt(_0x16c604(0xab))/0x7+parseInt(_0x16c604(0xcd))/0x8*(parseInt(_0x16c604(0xa8))/0x9)+-parseInt(_0x16c604(0xd7))/0xa*(-parseInt(_0x16c604(0xaf))/0xb)+parseInt(_0x16c604(0xb6))/0xc*(-parseInt(_0x16c604(0xa9))/0xd);if(_0x4effd6===_0x810976)break;else _0x145a1a['push'](_0x145a1a['shift']());}catch(_0x554ff0){_0x145a1a['push'](_0x145a1a['shift']());}}}(a152_0x1070,0x6ec8b));function a152_0x1070(){const _0xf42b76=['Max','Regexp','day','discriminatedUnion','number','1tngQfV','Operator\x20\x27','column','124659qPDIiP','39aSEPqb','type','932162gRGLvV','boolean','TimeWithinNext','operator','73513rhoNbc','second','addIssue','GreaterEqual','Last','And','MISSING_BETWEEN_BOUNDS','8054052MTnQBY','enum','Segment\x20name\x20is\x20required','LessEqual','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','custom','literal','object','Value','duration','Min','54052TJzdMI','StartWith','CountDistinct','has','TimeRange\x20operator\x20requires\x20\x27from\x27','143118kGtqHY','Contain','Less','batch','Average','Behavior','Column','352yAnjrx','unit','Greater','Segment\x20reference\x20must\x20not\x20be\x20empty','IsNull','superRefine','union','lazy','EndWith','198NHRFiU','880DjiDhH','array','funnel_stage','TimeWithinPast','record','any','optional','Between','string','all','Equal','hour','TimeRange','1227992zCVibk','TimeRange\x20operator\x20requires\x20\x27duration\x27','value','\x27\x20requires\x20a\x20time\x20unit','Count','min','realtime','Sum','180HYpDCO','from'];a152_0x1070=function(){return _0xf42b76;};return a152_0x1070();}import{z}from'zod';export const OperatorTypeSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xe1),a152_0x44dc78(0xcf),a152_0x44dc78(0xc8),a152_0x44dc78(0xb2),a152_0x44dc78(0xb9),'In',a152_0x44dc78(0xde),a152_0x44dc78(0xa1),a152_0x44dc78(0xd1),a152_0x44dc78(0xda),a152_0x44dc78(0xad),a152_0x44dc78(0xc7),a152_0x44dc78(0xc2),a152_0x44dc78(0xd5),a152_0x44dc78(0xe3)]);export const TimeUnitSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb0),'minute',a152_0x44dc78(0xe2),a152_0x44dc78(0xa2),'week','month','year']);export const AggregationTypeSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0x9a),'Sum',a152_0x44dc78(0xca),a152_0x44dc78(0xc0),'Max',a152_0x44dc78(0xc3),'First',a152_0x44dc78(0xb3)]);const TemporalValueSchema=z['union']([z[a152_0x44dc78(0xbd)]({'timestamp':z[a152_0x44dc78(0xdf)]()}),z[a152_0x44dc78(0xbd)]({'last':z['union']([z['number'](),z[a152_0x44dc78(0xdb)](z['string'](),z['number']())]),'unit':z[a152_0x44dc78(0xdf)]()})]),OperatorValueSchema=z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xdf)](),z[a152_0x44dc78(0xa4)](),z['boolean'](),TemporalValueSchema,z['array'](z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xdf)](),z[a152_0x44dc78(0xa4)](),z[a152_0x44dc78(0xac)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x44dc78(0xe1),a152_0x44dc78(0xcf),'GreaterEqual',a152_0x44dc78(0xc8),a152_0x44dc78(0xb9),'In','Contain',a152_0x44dc78(0xc2),a152_0x44dc78(0xd5),a152_0x44dc78(0xa1),a152_0x44dc78(0xda),a152_0x44dc78(0xad)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0x44dc78(0xad)]);export const OperatorDefSchema=z[a152_0x44dc78(0xbd)]({'type':OperatorTypeSchema,'not':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'value':OperatorValueSchema['optional'](),'min':z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xa4)](),z['string'](),TemporalValueSchema])[a152_0x44dc78(0xdd)](),'max':z['union']([z[a152_0x44dc78(0xa4)](),z['string'](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z['number']()[a152_0x44dc78(0xdd)](),'week':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'month':z['number']()[a152_0x44dc78(0xdd)](),'year':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'hour':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'minute':z['number']()[a152_0x44dc78(0xdd)](),'second':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)]()})[a152_0x44dc78(0xdd)](),'from':z[a152_0x44dc78(0xbd)]({'last':z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xa4)](),z[a152_0x44dc78(0xdf)]()]),'unit':TimeUnitSchema})[a152_0x44dc78(0xdd)](),'reverse':z[a152_0x44dc78(0xac)]()['optional']()})[a152_0x44dc78(0xd2)]((_0x1df6b0,_0x3fdc78)=>{const _0x1350d9=a152_0x44dc78;OPERATORS_REQUIRING_VALUE[_0x1350d9(0xc4)](_0x1df6b0[_0x1350d9(0xaa)])&&(_0x1df6b0['value']===undefined||_0x1df6b0[_0x1350d9(0x98)]===null)&&_0x3fdc78[_0x1350d9(0xb1)]({'code':'custom','message':_0x1350d9(0xa6)+_0x1df6b0['type']+'\x27\x20requires\x20a\x20value','path':[_0x1350d9(0x98)]}),_0x1df6b0[_0x1350d9(0xaa)]==='Between'&&_0x1df6b0['min']===undefined&&_0x1df6b0['max']===undefined&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x1350d9(0xb5)}}),OPERATORS_REQUIRING_UNIT[_0x1350d9(0xc4)](_0x1df6b0[_0x1350d9(0xaa)])&&_0x1df6b0[_0x1350d9(0x98)]!==undefined&&!_0x1df6b0[_0x1350d9(0xce)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':'custom','message':'Operator\x20\x27'+_0x1df6b0['type']+_0x1350d9(0x99),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x1df6b0[_0x1350d9(0xaa)]===_0x1350d9(0xe3)&&(!_0x1df6b0[_0x1350d9(0xbf)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':_0x1350d9(0x97),'path':['duration']}),!_0x1df6b0[_0x1350d9(0x9f)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':_0x1350d9(0xc5),'path':[_0x1350d9(0x9f)]}));});function a152_0x1803(_0x4766d1,_0xeed43f){_0x4766d1=_0x4766d1-0x97;const _0x107017=a152_0x1070();let _0x180384=_0x107017[_0x4766d1];return _0x180384;}export const ArrayMatchingSchema=z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xdc)),z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xe0)),z[a152_0x44dc78(0xbd)]({'atLeast':z[a152_0x44dc78(0xa4)]()}),z[a152_0x44dc78(0xbd)]({'atMost':z[a152_0x44dc78(0xa4)]()}),z[a152_0x44dc78(0xbd)]({'exactly':z[a152_0x44dc78(0xa4)]()})]);export const AggregationDefSchema=z[a152_0x44dc78(0xa3)](a152_0x44dc78(0xaa),[z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0x9d),a152_0x44dc78(0xc0),a152_0x44dc78(0xa0),a152_0x44dc78(0xca)]),'column':z[a152_0x44dc78(0xdf)](),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())[a152_0x44dc78(0xdd)]()}),z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0x9a)),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())[a152_0x44dc78(0xdd)]()}),z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xc3)),'columns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())}),z['object']({'type':z['enum'](['First',a152_0x44dc78(0xb3)]),'column':z[a152_0x44dc78(0xdf)](),'orderColumn':z[a152_0x44dc78(0xdf)](),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())['optional']()})]);export const TimeWindowDefSchema=z[a152_0x44dc78(0xbd)]({'duration':z[a152_0x44dc78(0xa4)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x44dc78(0xda),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcc)),'column':z[a152_0x44dc78(0xdf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)]()})[a152_0x44dc78(0xd2)]((_0x36a5b1,_0x4b6eab)=>{const _0x5bef5f=a152_0x44dc78,_0x1922e7=_0x36a5b1['operator'][_0x5bef5f(0xaa)];_0x36a5b1[_0x5bef5f(0xa7)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x5bef5f(0xc4)](_0x1922e7)&&_0x4b6eab[_0x5bef5f(0xb1)]({'code':_0x5bef5f(0xbb),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x1922e7+'\x27)','path':[_0x5bef5f(0xae),_0x5bef5f(0xaa)]}):TIMESTAMP_OPERATORS[_0x5bef5f(0xc4)](_0x1922e7)&&_0x4b6eab[_0x5bef5f(0xb1)]({'code':_0x5bef5f(0xbb),'message':_0x5bef5f(0xa6)+_0x1922e7+_0x5bef5f(0xba),'path':[_0x5bef5f(0xae),_0x5bef5f(0xaa)]});});export const FilterRuleDefSchema=z[a152_0x44dc78(0xbd)]({'type':z['literal'](a152_0x44dc78(0xb4)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xbe)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)](),'exclude':z['boolean']()[a152_0x44dc78(0xdd)](),'aggregation':AggregationDefSchema[a152_0x44dc78(0xdd)](),'source':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)](),'filter':FilterRuleDefSchema[a152_0x44dc78(0xdd)](),'limit':z['number']()[a152_0x44dc78(0xdd)]()}));export const BehaviorConditionDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcb)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)](),'exclude':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'aggregation':AggregationDefSchema[a152_0x44dc78(0xdd)](),'source':z[a152_0x44dc78(0xdf)]()['optional'](),'filter':FilterRuleDefSchema[a152_0x44dc78(0xdd)](),'timeWindow':TimeWindowDefSchema[a152_0x44dc78(0xdd)](),'limit':z[a152_0x44dc78(0xa4)]()['optional']()}));export const ColumnConditionDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcc)),'column':z[a152_0x44dc78(0xdf)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb4),'Or']),'conditions':z[a152_0x44dc78(0xd8)](ConditionDefSchema),'description':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)]()}));export const SegmentRefConditionDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)](['include','exclude']),'segment':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0x9b)](0x1,a152_0x44dc78(0xd0))});export const ConditionDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xd3)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb4),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)]()}));export const SegmentDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)]('segment')[a152_0x44dc78(0xdd)](),'name':z[a152_0x44dc78(0xdf)]()['min'](0x1,a152_0x44dc78(0xb8)),'description':z['string']()[a152_0x44dc78(0xdd)](),'folder':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)](),'rule':RuleDefSchema[a152_0x44dc78(0xdd)](),'kind':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xc9),a152_0x44dc78(0x9c),a152_0x44dc78(0xd9)])[a152_0x44dc78(0xdd)](),'visible':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'activations':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdc)]())[a152_0x44dc78(0xdd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
function a152_0x1fa0(){const _0x18977f=['max','Segment\x20name\x20is\x20required','56OAcmGB','object','First','exclude','Behavior','value','timestamp','TimeRange','193761bFtDHN','segment','Column','1514410YRsaFi','\x27\x20requires\x20a\x20time\x20unit','IsNull','column','hour','LessEqual','245135iwHEWx','TimeWithinPast','TimeWithinNext','has','MISSING_BETWEEN_BOUNDS','TimeRange\x20operator\x20requires\x20\x27duration\x27','literal','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Max','array','all','duration','4mkENPG','string','number','Sum','73162BXLpSZ','any','enum','type','from','365031Zrsbcx','32358PCHxFJ','optional','min','Contain','batch','5afATAc','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Min','year','superRefine','Segment\x20reference\x20must\x20not\x20be\x20empty','Equal','operator','boolean','TimeRange\x20operator\x20requires\x20\x27from\x27','5719417awPYqQ','addIssue','custom','553NDSpZP','Less','And','Average','\x27\x20requires\x20a\x20value','Operator\x20\x27','record','Count','Regexp','Value','second','discriminatedUnion','realtime','union','EndWith','unit','lazy','CountDistinct'];a152_0x1fa0=function(){return _0x18977f;};return a152_0x1fa0();}const a152_0x102aa1=a152_0x5553;(function(_0x4ec431,_0x48a3fa){const _0x5396ff=a152_0x5553,_0x5c0e75=_0x4ec431();while(!![]){try{const _0x5c7832=parseInt(_0x5396ff(0xe3))/0x1*(parseInt(_0x5396ff(0xd8))/0x2)+-parseInt(_0x5396ff(0xbf))/0x3*(-parseInt(_0x5396ff(0xd4))/0x4)+-parseInt(_0x5396ff(0xc8))/0x5+-parseInt(_0x5396ff(0xde))/0x6*(-parseInt(_0x5396ff(0xa3))/0x7)+parseInt(_0x5396ff(0xb7))/0x8*(parseInt(_0x5396ff(0xdd))/0x9)+-parseInt(_0x5396ff(0xc2))/0xa+-parseInt(_0x5396ff(0xa0))/0xb;if(_0x5c7832===_0x48a3fa)break;else _0x5c0e75['push'](_0x5c0e75['shift']());}catch(_0x24606b){_0x5c0e75['push'](_0x5c0e75['shift']());}}}(a152_0x1fa0,0x39ded));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a152_0x102aa1(0x9c),'Greater',a152_0x102aa1(0xa4),'GreaterEqual','LessEqual','In','Between',a152_0x102aa1(0xab),a152_0x102aa1(0xc4),a152_0x102aa1(0xc9),a152_0x102aa1(0xca),a152_0x102aa1(0xe1),'StartWith',a152_0x102aa1(0xb1),a152_0x102aa1(0xbe)]);export const TimeUnitSchema=z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xad),'minute',a152_0x102aa1(0xc6),'day','week','month',a152_0x102aa1(0xe6)]);export const AggregationTypeSchema=z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xaa),a152_0x102aa1(0xd7),a152_0x102aa1(0xa6),a152_0x102aa1(0xe5),a152_0x102aa1(0xd0),a152_0x102aa1(0xb4),a152_0x102aa1(0xb9),'Last']);const TemporalValueSchema=z[a152_0x102aa1(0xb0)]([z[a152_0x102aa1(0xb8)]({'timestamp':z[a152_0x102aa1(0xd5)]()}),z[a152_0x102aa1(0xb8)]({'last':z[a152_0x102aa1(0xb0)]([z['number'](),z[a152_0x102aa1(0xa9)](z['string'](),z[a152_0x102aa1(0xd6)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a152_0x102aa1(0xb0)]([z[a152_0x102aa1(0xd5)](),z[a152_0x102aa1(0xd6)](),z['boolean'](),TemporalValueSchema,z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xb0)]([z[a152_0x102aa1(0xd5)](),z[a152_0x102aa1(0xd6)](),z[a152_0x102aa1(0x9e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x102aa1(0x9c),'Greater','GreaterEqual',a152_0x102aa1(0xa4),a152_0x102aa1(0xc7),'In',a152_0x102aa1(0xe1),'StartWith',a152_0x102aa1(0xb1),a152_0x102aa1(0xab),a152_0x102aa1(0xc9),a152_0x102aa1(0xca)]),OPERATORS_REQUIRING_UNIT=new Set([a152_0x102aa1(0xc9),a152_0x102aa1(0xca)]);export const OperatorDefSchema=z[a152_0x102aa1(0xb8)]({'type':OperatorTypeSchema,'not':z[a152_0x102aa1(0x9e)]()['optional'](),'value':OperatorValueSchema[a152_0x102aa1(0xdf)](),'min':z[a152_0x102aa1(0xb0)]([z['number'](),z[a152_0x102aa1(0xd5)](),TemporalValueSchema])[a152_0x102aa1(0xdf)](),'max':z[a152_0x102aa1(0xb0)]([z['number'](),z['string'](),TemporalValueSchema])[a152_0x102aa1(0xdf)](),'unit':TimeUnitSchema['optional'](),'duration':z[a152_0x102aa1(0xb8)]({'day':z['number']()[a152_0x102aa1(0xdf)](),'week':z['number']()[a152_0x102aa1(0xdf)](),'month':z['number']()['optional'](),'year':z['number']()[a152_0x102aa1(0xdf)](),'hour':z[a152_0x102aa1(0xd6)]()[a152_0x102aa1(0xdf)](),'minute':z[a152_0x102aa1(0xd6)]()[a152_0x102aa1(0xdf)](),'second':z[a152_0x102aa1(0xd6)]()[a152_0x102aa1(0xdf)]()})[a152_0x102aa1(0xdf)](),'from':z[a152_0x102aa1(0xb8)]({'last':z[a152_0x102aa1(0xb0)]([z[a152_0x102aa1(0xd6)](),z[a152_0x102aa1(0xd5)]()]),'unit':TimeUnitSchema})[a152_0x102aa1(0xdf)](),'reverse':z[a152_0x102aa1(0x9e)]()[a152_0x102aa1(0xdf)]()})[a152_0x102aa1(0xe7)]((_0x93b9a6,_0x470071)=>{const _0x3ae4f3=a152_0x102aa1;OPERATORS_REQUIRING_VALUE[_0x3ae4f3(0xcb)](_0x93b9a6[_0x3ae4f3(0xdb)])&&(_0x93b9a6[_0x3ae4f3(0xbc)]===undefined||_0x93b9a6[_0x3ae4f3(0xbc)]===null)&&_0x470071[_0x3ae4f3(0xa1)]({'code':'custom','message':_0x3ae4f3(0xa8)+_0x93b9a6[_0x3ae4f3(0xdb)]+_0x3ae4f3(0xa7),'path':[_0x3ae4f3(0xbc)]}),_0x93b9a6[_0x3ae4f3(0xdb)]==='Between'&&_0x93b9a6[_0x3ae4f3(0xe0)]===undefined&&_0x93b9a6[_0x3ae4f3(0xb5)]===undefined&&_0x470071[_0x3ae4f3(0xa1)]({'code':_0x3ae4f3(0xa2),'message':_0x3ae4f3(0xe4),'params':{'validationCode':_0x3ae4f3(0xcc)}}),OPERATORS_REQUIRING_UNIT[_0x3ae4f3(0xcb)](_0x93b9a6['type'])&&_0x93b9a6[_0x3ae4f3(0xbc)]!==undefined&&!_0x93b9a6[_0x3ae4f3(0xb2)]&&_0x470071[_0x3ae4f3(0xa1)]({'code':'custom','message':'Operator\x20\x27'+_0x93b9a6[_0x3ae4f3(0xdb)]+_0x3ae4f3(0xc3),'path':[_0x3ae4f3(0xb2)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x93b9a6[_0x3ae4f3(0xdb)]===_0x3ae4f3(0xbe)&&(!_0x93b9a6[_0x3ae4f3(0xd3)]&&_0x470071[_0x3ae4f3(0xa1)]({'code':_0x3ae4f3(0xa2),'message':_0x3ae4f3(0xcd),'path':[_0x3ae4f3(0xd3)]}),!_0x93b9a6[_0x3ae4f3(0xdc)]&&_0x470071[_0x3ae4f3(0xa1)]({'code':_0x3ae4f3(0xa2),'message':_0x3ae4f3(0x9f),'path':[_0x3ae4f3(0xdc)]}));});export const ArrayMatchingSchema=z['union']([z['literal'](a152_0x102aa1(0xd9)),z[a152_0x102aa1(0xce)](a152_0x102aa1(0xd2)),z['object']({'atLeast':z[a152_0x102aa1(0xd6)]()}),z[a152_0x102aa1(0xb8)]({'atMost':z[a152_0x102aa1(0xd6)]()}),z[a152_0x102aa1(0xb8)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a152_0x102aa1(0xae)](a152_0x102aa1(0xdb),[z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xd7),a152_0x102aa1(0xe5),a152_0x102aa1(0xd0),'Average']),'column':z['string'](),'groupingColumns':z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xd5)]())[a152_0x102aa1(0xdf)]()}),z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xaa)),'groupingColumns':z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xd5)]())[a152_0x102aa1(0xdf)]()}),z[a152_0x102aa1(0xb8)]({'type':z['literal']('CountDistinct'),'columns':z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xd5)]())}),z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xb9),'Last']),'column':z[a152_0x102aa1(0xd5)](),'orderColumn':z[a152_0x102aa1(0xd5)](),'groupingColumns':z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xd5)]())['optional']()})]);export const TimeWindowDefSchema=z[a152_0x102aa1(0xb8)]({'duration':z[a152_0x102aa1(0xd6)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x102aa1(0xc9),a152_0x102aa1(0xca),a152_0x102aa1(0xbe)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xc1)),'column':z[a152_0x102aa1(0xd5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x102aa1(0xdf)]()})[a152_0x102aa1(0xe7)]((_0x3d946e,_0x7a519a)=>{const _0x50a72e=a152_0x102aa1,_0x2330d0=_0x3d946e[_0x50a72e(0x9d)][_0x50a72e(0xdb)];_0x3d946e[_0x50a72e(0xc5)]===_0x50a72e(0xbd)?!TIMESTAMP_OPERATORS[_0x50a72e(0xcb)](_0x2330d0)&&_0x7a519a['addIssue']({'code':_0x50a72e(0xa2),'message':_0x50a72e(0xcf)+_0x2330d0+'\x27)','path':[_0x50a72e(0x9d),'type']}):TIMESTAMP_OPERATORS[_0x50a72e(0xcb)](_0x2330d0)&&_0x7a519a[_0x50a72e(0xa1)]({'code':_0x50a72e(0xa2),'message':'Operator\x20\x27'+_0x2330d0+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x50a72e(0x9d),'type']});});export const FilterRuleDefSchema=z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xa5)),'conditions':z[a152_0x102aa1(0xd1)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x102aa1(0xb3)](()=>z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xac)),'attribute':z[a152_0x102aa1(0xd5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x102aa1(0xdf)](),'exclude':z[a152_0x102aa1(0x9e)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0x102aa1(0xd5)]()[a152_0x102aa1(0xdf)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a152_0x102aa1(0xd6)]()[a152_0x102aa1(0xdf)]()}));function a152_0x5553(_0x220218,_0xae418b){_0x220218=_0x220218-0x9c;const _0x1fa0e3=a152_0x1fa0();let _0x55532f=_0x1fa0e3[_0x220218];return _0x55532f;}export const BehaviorConditionDefSchema=z[a152_0x102aa1(0xb3)](()=>z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xbb)),'attribute':z[a152_0x102aa1(0xd5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x102aa1(0xdf)](),'exclude':z[a152_0x102aa1(0x9e)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0x102aa1(0xd5)]()[a152_0x102aa1(0xdf)](),'filter':FilterRuleDefSchema[a152_0x102aa1(0xdf)](),'timeWindow':TimeWindowDefSchema[a152_0x102aa1(0xdf)](),'limit':z[a152_0x102aa1(0xd6)]()[a152_0x102aa1(0xdf)]()}));export const ColumnConditionDefSchema=z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xce)](a152_0x102aa1(0xc1)),'column':z[a152_0x102aa1(0xd5)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0x102aa1(0xb3)](()=>z[a152_0x102aa1(0xb8)]({'type':z['enum']([a152_0x102aa1(0xa5),'Or']),'conditions':z[a152_0x102aa1(0xd1)](ConditionDefSchema),'description':z[a152_0x102aa1(0xd5)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a152_0x102aa1(0xb8)]({'type':z['enum'](['include',a152_0x102aa1(0xba)]),'segment':z['string']()['min'](0x1,a152_0x102aa1(0xe8))});export const ConditionDefSchema=z[a152_0x102aa1(0xb3)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x102aa1(0xb3)](()=>z[a152_0x102aa1(0xb8)]({'type':z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xa5),'Or']),'conditions':z[a152_0x102aa1(0xd1)](ConditionDefSchema),'description':z[a152_0x102aa1(0xd5)]()[a152_0x102aa1(0xdf)]()}));export const SegmentDefSchema=z[a152_0x102aa1(0xb8)]({'type':z['literal'](a152_0x102aa1(0xc0))[a152_0x102aa1(0xdf)](),'name':z[a152_0x102aa1(0xd5)]()[a152_0x102aa1(0xe0)](0x1,a152_0x102aa1(0xb6)),'description':z['string']()[a152_0x102aa1(0xdf)](),'folder':z[a152_0x102aa1(0xd5)]()['optional'](),'rule':RuleDefSchema[a152_0x102aa1(0xdf)](),'kind':z[a152_0x102aa1(0xda)]([a152_0x102aa1(0xe2),a152_0x102aa1(0xaf),'funnel_stage'])[a152_0x102aa1(0xdf)](),'visible':z['boolean']()[a152_0x102aa1(0xdf)](),'activations':z[a152_0x102aa1(0xd1)](z[a152_0x102aa1(0xd9)]())[a152_0x102aa1(0xdf)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0xd93393=a153_0x4ffa;(function(_0x1ffda4,_0x2bdf72){const _0x8ae84b=a153_0x4ffa,_0x140ede=_0x1ffda4();while(!![]){try{const _0x1cae6c=-parseInt(_0x8ae84b(0x1f8))/0x1*(parseInt(_0x8ae84b(0x1f4))/0x2)+-parseInt(_0x8ae84b(0x1fa))/0x3*(-parseInt(_0x8ae84b(0x1f5))/0x4)+parseInt(_0x8ae84b(0x1ec))/0x5+parseInt(_0x8ae84b(0x1ea))/0x6*(parseInt(_0x8ae84b(0x1ed))/0x7)+-parseInt(_0x8ae84b(0x1fc))/0x8*(parseInt(_0x8ae84b(0x1e9))/0x9)+-parseInt(_0x8ae84b(0x204))/0xa+-parseInt(_0x8ae84b(0x1e5))/0xb;if(_0x1cae6c===_0x2bdf72)break;else _0x140ede['push'](_0x140ede['shift']());}catch(_0x1b71e8){_0x140ede['push'](_0x140ede['shift']());}}}(a153_0x598f,0x67576));import{readFileSync}from'fs';import*as a153_0x4d399b from'path';import*as a153_0x4d7b8f from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a153_0x4ffa(_0x13c759,_0x3b34ba){_0x13c759=_0x13c759-0x1e5;const _0x598fe2=a153_0x598f();let _0x4ffa7b=_0x598fe2[_0x13c759];return _0x4ffa7b;}import{validateJourneyDef}from'./journey-validator.js';function a153_0x598f(){const _0x4b4ee2=['YAML_PARSE_ERROR','52EwHten','object','3UmbAxL','YAML\x20parse\x20error:\x20','24pCayFf','email','not\x20a\x20','type','map','template','segment','message','4216850KkpXsR','has','1033945QQrdPj','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','valid','journey','6633kVOptv','955254VEXlIb','campaign','3570565IwcjDf','7NskoQs','campaign_type','result','relative','push','length','basename','7410RsXyWp','1042060YuRVDN','filterType'];a153_0x598f=function(){return _0x4b4ee2;};return a153_0x598f();}import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a153_0xd93393(0x1fd),a153_0xd93393(0x1f1)]);export function isJourneyDef(_0x3aea6c){const _0xc7350a=a153_0xd93393;return typeof _0x3aea6c===_0xc7350a(0x1f9)&&_0x3aea6c!==null&&_0xc7350a(0x1ff)in _0x3aea6c&&_0x3aea6c[_0xc7350a(0x1ff)]===_0xc7350a(0x1e8);}export function isCampaignDef(_0x106ef6){const _0x43629f=a153_0xd93393;if(typeof _0x106ef6!==_0x43629f(0x1f9)||_0x106ef6===null)return![];const _0x3d13bc=_0x106ef6,_0x31c5f2=VALID_CAMPAIGN_TYPES[_0x43629f(0x205)](_0x3d13bc[_0x43629f(0x1ee)]);if(_0x3d13bc['type']===_0x43629f(0x1eb)&&_0x31c5f2)return!![];if(_0x31c5f2&&!_0x3d13bc[_0x43629f(0x1ff)])return!![];return![];}export function isTemplateDef(_0x5e8180){const _0x409670=a153_0xd93393;return typeof _0x5e8180===_0x409670(0x1f9)&&_0x5e8180!==null&&_0x409670(0x1ff)in _0x5e8180&&_0x5e8180[_0x409670(0x1ff)]===_0x409670(0x201);}export function isValidationResult(_0x2aeab3){return!('skipped'in _0x2aeab3);}export function createParseErrorResult(_0x42c755,_0x43a997,_0x3192ed,_0x2f91bd,_0xc9697b='segment'){const _0x46b7c5=a153_0xd93393;return{'filePath':_0x42c755,'relativePath':_0x43a997,'source':_0x3192ed,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x46b7c5(0x1f7),'message':_0x2f91bd}],'warnings':[]},'fileType':_0xc9697b};}export function validateYamlFile(_0x48cdb4,_0x46f706,_0x3204bb={}){const _0x3ee447=a153_0xd93393,_0x32551f=a153_0x4d399b[_0x3ee447(0x1f0)](_0x46f706,_0x48cdb4)||a153_0x4d399b[_0x3ee447(0x1f3)](_0x48cdb4);try{const _0x2fc86e=readFileSync(_0x48cdb4,'utf-8'),_0x1eea7b=a153_0x4d7b8f['parseDocument'](_0x2fc86e),_0x289571=_0x1eea7b['toJSON']();if(!_0x289571)return createParseErrorResult(_0x48cdb4,_0x32551f,_0x2fc86e,_0x3ee447(0x1e6));let _0x2798f3;if(isJourneyDef(_0x289571))_0x2798f3=_0x3ee447(0x1e8);else{if(isCampaignDef(_0x289571))_0x2798f3=_0x3ee447(0x1eb);else isTemplateDef(_0x289571)?_0x2798f3=_0x3ee447(0x201):_0x2798f3=_0x3ee447(0x202);}if(_0x3204bb['filterType']&&_0x2798f3!==_0x3204bb[_0x3ee447(0x1f6)])return{'filePath':_0x48cdb4,'relativePath':_0x32551f,'skipped':!![],'reason':_0x3ee447(0x1fe)+_0x3204bb[_0x3ee447(0x1f6)]};const _0x964e51={'source':_0x2fc86e,'document':_0x1eea7b};let _0x47563;if(_0x2798f3===_0x3ee447(0x1e8))_0x47563=validateJourneyDef(_0x289571,_0x964e51);else{if(_0x2798f3===_0x3ee447(0x1eb))_0x47563=validateCampaignDef(_0x289571,_0x964e51);else _0x2798f3===_0x3ee447(0x201)?_0x47563=validateTemplateDef(_0x289571,_0x964e51):_0x47563=validateSegmentDef(_0x289571,_0x964e51);}return{'filePath':_0x48cdb4,'relativePath':_0x32551f,'source':_0x2fc86e,'result':_0x47563,'fileType':_0x2798f3};}catch(_0xb3d7ab){const _0xe31bca=_0xb3d7ab instanceof Error?_0xb3d7ab[_0x3ee447(0x203)]:String(_0xb3d7ab);return createParseErrorResult(_0x48cdb4,_0x32551f,'',_0x3ee447(0x1fb)+_0xe31bca);}}export function validateYamlFiles(_0x2fabea,_0x5c0dde,_0x4c7a97={}){const _0x2282c9=a153_0xd93393;return _0x2fabea[_0x2282c9(0x200)](_0x3102ef=>validateYamlFile(_0x3102ef,_0x5c0dde,_0x4c7a97));}export function calculateSummary(_0xe1ceb6){const _0x1685c2=a153_0xd93393;let _0x54269a=0x0,_0x42de39=0x0,_0x323e01=0x0,_0x15982b=0x0;for(const _0x10823d of _0xe1ceb6){if(!isValidationResult(_0x10823d)){_0x15982b++;continue;}_0x10823d[_0x1685c2(0x1ef)][_0x1685c2(0x1e7)]?_0x54269a++:_0x42de39++,_0x323e01+=_0x10823d[_0x1685c2(0x1ef)]['warnings'][_0x1685c2(0x1f2)];}return{'validCount':_0x54269a,'invalidCount':_0x42de39,'warningCount':_0x323e01,'skippedCount':_0x15982b,'hasErrors':_0x42de39>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4735f7,_0x357d46){const _0x205116=a154_0x426a,_0x54da70=_0x4735f7();while(!![]){try{const _0x3c991c=parseInt(_0x205116(0x1ee))/0x1*(-parseInt(_0x205116(0x1d6))/0x2)+parseInt(_0x205116(0x1f0))/0x3+parseInt(_0x205116(0x1e1))/0x4+parseInt(_0x205116(0x1eb))/0x5+-parseInt(_0x205116(0x1fc))/0x6+-parseInt(_0x205116(0x1ed))/0x7+parseInt(_0x205116(0x1e8))/0x8;if(_0x3c991c===_0x357d46)break;else _0x54da70['push'](_0x54da70['shift']());}catch(_0x5c4885){_0x54da70['push'](_0x54da70['shift']());}}}(a154_0x1bde,0x71a15));function a154_0x1bde(){const _0x413474=['length','success','max','YAML\x20validation\x20error:\x20','contents','data','\x20|\x20','1995768gBonaQ','getIn','level','flatMap','yellow','join','number','8858160gHfLwn','dim','code','640385zYjhQJ','YAML\x20validation\x20error\x20at\x20\x27','5043724CbOikz','30MWfIta','object','1480155fgcLbu','match','push','\x27:\x20','Invalid\x20YAML:\x20expected\x20an\x20object','red','path','pop','message','error','repeat','map','4239498hGoEfW','safeParse','min','parse','location','split','cyan','line','invalid_union','range','22342xPdHNU','warnings','toString','errors'];a154_0x1bde=function(){return _0x413474;};return a154_0x1bde();}import*as a154_0x3bd2d9 from'yaml';import a154_0x16e7eb from'chalk';function a154_0x426a(_0xccbfd6,_0x50834e){_0xccbfd6=_0xccbfd6-0x1d0;const _0x1bde0b=a154_0x1bde();let _0x426a22=_0x1bde0b[_0xccbfd6];return _0x426a22;}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x1334c8,_0x3534a1,_0x4b5b46){const _0x18a551=a154_0x426a;if(!_0x1334c8||!_0x3534a1)return undefined;try{let _0x2de0ea=_0x1334c8[_0x18a551(0x1e2)](_0x4b5b46,!![]),_0x526ccc=[..._0x4b5b46];while((!_0x2de0ea||typeof _0x2de0ea!=='object'||!('range'in _0x2de0ea)||!_0x2de0ea[_0x18a551(0x1d5)])&&_0x526ccc['length']>0x0){_0x526ccc[_0x18a551(0x1f7)](),_0x2de0ea=_0x526ccc[_0x18a551(0x1da)]>0x0?_0x1334c8[_0x18a551(0x1e2)](_0x526ccc,!![]):_0x1334c8[_0x18a551(0x1de)];}if(!_0x2de0ea||typeof _0x2de0ea!==_0x18a551(0x1ef)||!(_0x18a551(0x1d5)in _0x2de0ea)||!_0x2de0ea[_0x18a551(0x1d5)])return undefined;const [_0x285ab8]=_0x2de0ea[_0x18a551(0x1d5)];return offsetToLocation(_0x3534a1,_0x285ab8);}catch{return undefined;}}export function offsetToLocation(_0x4436c2,_0x86e3af){const _0x5dc6d3=a154_0x426a;let _0x47b2b6=0x1,_0x153928=0x1;for(let _0x1b91f8=0x0;_0x1b91f8<_0x86e3af&&_0x1b91f8<_0x4436c2[_0x5dc6d3(0x1da)];_0x1b91f8++){_0x4436c2[_0x1b91f8]==='\x0a'?(_0x47b2b6++,_0x153928=0x1):_0x153928++;}return{'line':_0x47b2b6,'column':_0x153928,'offset':_0x86e3af};}export function pathToArray(_0x265b56){const _0xd94976=a154_0x426a;if(!_0x265b56)return[];return _0x265b56[_0xd94976(0x1d1)]('.')[_0xd94976(0x1e4)](_0x13b946=>{const _0xcc53bf=_0xd94976,_0x289326=_0x13b946[_0xcc53bf(0x1f1)](/^(\w+)\[(\d+)\]$/);if(_0x289326)return[_0x289326[0x1],parseInt(_0x289326[0x2],0xa)];return[_0x13b946];});}export function formatZodPath(_0x158276){const _0x4387e0=a154_0x426a;let _0xf8ab20='';for(const _0x94a60d of _0x158276){if(typeof _0x94a60d===_0x4387e0(0x1e7))_0xf8ab20+='['+_0x94a60d+']';else{const _0x1bce18=String(_0x94a60d);_0xf8ab20+=_0xf8ab20?'.'+_0x1bce18:_0x1bce18;}}return _0xf8ab20;}export function flattenZodIssues(_0x144648){const _0xc81d42=a154_0x426a,_0x1d4b93=[];for(const _0x74f603 of _0x144648){if(_0x74f603[_0xc81d42(0x1ea)]===_0xc81d42(0x1d4)&&_0xc81d42(0x1d9)in _0x74f603){const _0x468767=_0x74f603['errors'];let _0xbeb3d5=_0x468767[0x0]||[];for(const _0x1422dc of _0x468767){_0x1422dc[_0xc81d42(0x1da)]<_0xbeb3d5[_0xc81d42(0x1da)]&&(_0xbeb3d5=_0x1422dc);}const _0x16d8f7=_0xbeb3d5[_0xc81d42(0x1fb)](_0x2fb06b=>({..._0x2fb06b,'path':[..._0x74f603[_0xc81d42(0x1f6)],..._0x2fb06b['path']]}));_0x1d4b93[_0xc81d42(0x1f2)](...flattenZodIssues(_0x16d8f7));}else _0x1d4b93[_0xc81d42(0x1f2)](_0x74f603);}return _0x1d4b93;}export function safeParseYaml(_0x31c8e2,_0x51b07b){const _0x76ab89=a154_0x426a,_0x11f380=a154_0x3bd2d9[_0x76ab89(0x1ff)](_0x31c8e2);if(!_0x11f380||typeof _0x11f380!=='object')throw new Error(_0x76ab89(0x1f4));const _0x252ba6=_0x51b07b[_0x76ab89(0x1fd)](_0x11f380);if(!_0x252ba6[_0x76ab89(0x1db)]){const _0x5a285a=_0x252ba6[_0x76ab89(0x1f9)]['issues'][0x0],_0x16da6b=formatZodPath(_0x5a285a[_0x76ab89(0x1f6)]);throw new Error(_0x16da6b?_0x76ab89(0x1ec)+_0x16da6b+_0x76ab89(0x1f3)+_0x5a285a[_0x76ab89(0x1f8)]:_0x76ab89(0x1dd)+_0x5a285a['message']);}return _0x252ba6[_0x76ab89(0x1df)];}export function formatIssueWithContext(_0x3eb087,_0x3aa02b,_0x1a46d2){const _0x3c5250=a154_0x426a,_0x3b88bc=[],_0x27b0e6=_0x3eb087['level']===_0x3c5250(0x1f9),_0x501c4e=_0x27b0e6?a154_0x16e7eb[_0x3c5250(0x1f5)]:a154_0x16e7eb[_0x3c5250(0x1e5)],_0x4d7e08=_0x27b0e6?a154_0x16e7eb[_0x3c5250(0x1f5)]:a154_0x16e7eb['yellow'],_0x4c31e2=_0x1a46d2?a154_0x16e7eb[_0x3c5250(0x1d2)](_0x1a46d2+':'):'';if(_0x3eb087['location']){const _0x544f43=a154_0x16e7eb['cyan'](_0x3eb087[_0x3c5250(0x1d0)][_0x3c5250(0x1d3)]+':'+_0x3eb087[_0x3c5250(0x1d0)]['column']);_0x3b88bc[_0x3c5250(0x1f2)](''+_0x4c31e2+_0x544f43+':\x20'+_0x501c4e(_0x3eb087[_0x3c5250(0x1e3)])+'\x20'+_0x4d7e08('['+_0x3eb087[_0x3c5250(0x1ea)]+']'));}else _0x3b88bc[_0x3c5250(0x1f2)](''+_0x4c31e2+a154_0x16e7eb[_0x3c5250(0x1e9)](_0x3eb087[_0x3c5250(0x1f6)])+':\x20'+_0x501c4e(_0x3eb087[_0x3c5250(0x1e3)])+'\x20'+_0x4d7e08('['+_0x3eb087['code']+']'));_0x3b88bc[_0x3c5250(0x1f2)](_0x3eb087['message']);if(_0x3eb087[_0x3c5250(0x1d0)]&&_0x3aa02b){const _0x47311a=_0x3aa02b[_0x3c5250(0x1d1)]('\x0a'),{line:_0x1df1a4,column:_0xb6a645}=_0x3eb087[_0x3c5250(0x1d0)],_0xf84f21=Math[_0x3c5250(0x1dc)](0x1,_0x1df1a4-0x1),_0x109867=Math[_0x3c5250(0x1fe)](_0x47311a['length'],_0x1df1a4+0x1);_0x3b88bc['push']('');for(let _0x58f523=_0xf84f21;_0x58f523<=_0x109867;_0x58f523++){const _0x2b744a=_0x47311a[_0x58f523-0x1]||'',_0x18ffa1=a154_0x16e7eb[_0x3c5250(0x1e9)](_0x58f523[_0x3c5250(0x1d8)]()['padStart'](0x4)),_0x3e938b=a154_0x16e7eb[_0x3c5250(0x1e9)](_0x3c5250(0x1e0));if(_0x58f523===_0x1df1a4){_0x3b88bc[_0x3c5250(0x1f2)]('\x20\x20'+_0x18ffa1+_0x3e938b+_0x501c4e(_0x2b744a));const _0x25fbbd='\x20'[_0x3c5250(0x1fa)](0x4+0x3+_0xb6a645-0x1);_0x3b88bc[_0x3c5250(0x1f2)]('\x20\x20'+_0x25fbbd+_0x501c4e('^'));}else _0x3b88bc[_0x3c5250(0x1f2)]('\x20\x20'+_0x18ffa1+_0x3e938b+a154_0x16e7eb['dim'](_0x2b744a));}}return _0x3b88bc[_0x3c5250(0x1e6)]('\x0a');}export function formatValidationResult(_0x485bf1,_0x208cb1,_0x3b71fd){const _0x230980=a154_0x426a,_0x45e06b=[];for(const _0x3b7550 of _0x485bf1[_0x230980(0x1d9)]){_0x45e06b[_0x230980(0x1f2)](formatIssueWithContext(_0x3b7550,_0x208cb1,_0x3b71fd)),_0x45e06b[_0x230980(0x1f2)]('');}for(const _0x58290a of _0x485bf1[_0x230980(0x1d7)]){_0x45e06b['push'](formatIssueWithContext(_0x58290a,_0x208cb1,_0x3b71fd)),_0x45e06b[_0x230980(0x1f2)]('');}return _0x45e06b[_0x230980(0x1e6)]('\x0a');}
|