@treasuredata/tdx 2026.3.22 → 2026.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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/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.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/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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18cdf0,_0x2f7583){const _0x18c133=a146_0x455d,_0x5a9939=_0x18cdf0();while(!![]){try{const _0x2ed965=-parseInt(_0x18c133(0x155))/0x1*(parseInt(_0x18c133(0x147))/0x2)+parseInt(_0x18c133(0x144))/0x3+parseInt(_0x18c133(0x12e))/0x4*(parseInt(_0x18c133(0x12b))/0x5)+-parseInt(_0x18c133(0x16a))/0x6+parseInt(_0x18c133(0x15e))/0x7*(parseInt(_0x18c133(0x169))/0x8)+parseInt(_0x18c133(0x15a))/0x9*(parseInt(_0x18c133(0x145))/0xa)+-parseInt(_0x18c133(0x14a))/0xb;if(_0x2ed965===_0x2f7583)break;else _0x5a9939['push'](_0x5a9939['shift']());}catch(_0x1e1ece){_0x5a9939['push'](_0x5a9939['shift']());}}}(a146_0x5a67,0x7a07e));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a146_0x455d(_0x314e01,_0x3b21f8){_0x314e01=_0x314e01-0x121;const _0x5a67c2=a146_0x5a67();let _0x455d47=_0x5a67c2[_0x314e01];return _0x455d47;}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x13c5d8,_0x5780c2={},_0x218c18={}){const _0x8122ef=a146_0x455d;if(_0x218c18[_0x8122ef(0x12a)])return runSemanticChecks(_0x13c5d8,_0x5780c2);const _0xcb42e1=SegmentDefSchema[_0x8122ef(0x163)](_0x13c5d8);if(_0xcb42e1['success'])return runSemanticChecks(_0xcb42e1[_0x8122ef(0x14b)],_0x5780c2);return zodErrorsToValidationResult(_0xcb42e1[_0x8122ef(0x160)],_0x5780c2);}function a146_0x5a67(){const _0x4c8068=['code','MISSING_CONDITIONS','endsWith','Behavior\x20source\x20\x27','.conditions','NESTED_CONDITION_GROUP','push','skipSchema','2400835YbhNNg','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','level','4ZnVQGv','Behavior','symbol','SEGMENT_SCHEMA_ERROR','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','BEHAVIOR_SOURCE_MISSING_FILTER','rule.type','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','.source','conditions','MISSING_TIME_UNIT','.type','.segment','document','success','length','Value','\x27\x20with\x20attribute\x20\x27','map','.conditions[','INVALID_OPERATOR_TYPE','Attribute\x20\x27','967281ppEzuC','1300dSNOVu','filter','8ZNKdjF','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','rule','6484104EEcsbd','data','attribute','includes','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','MISSING_BETWEEN_BOUNDS','path','warning','.attribute','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','MISSING_NAME','38944RhKxdx','.operator.type','EMPTY_CONDITIONS','type','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','11007kXAYLm','EMPTY_ATTRIBUTE','.operator.value','source','623EnuuNQ','MISSING_OPERATOR_VALUE','error','issues','params','safeParse','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','MISSING_SEGMENT_REFERENCE','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','aggregation','Attribute\x20name\x20cannot\x20be\x20empty','37720BwWAKr','816846odZgif','message','validationCode','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'];a146_0x5a67=function(){return _0x4c8068;};return a146_0x5a67();}export function validateRuleDef(_0x5e0257,_0x1070fb,_0x4511f9){const _0x3bd2d7=a146_0x455d;if(!_0x5e0257)return[];const _0xc5da32=RuleDefSchema['safeParse'](_0x5e0257);if(_0xc5da32[_0x3bd2d7(0x13c)])return checkRule(_0xc5da32[_0x3bd2d7(0x14b)],_0x1070fb,_0x4511f9);const _0x307c5e=flattenZodIssues(_0xc5da32[_0x3bd2d7(0x160)]['issues']);return _0x307c5e['map'](_0x5d7c23=>{const _0x55cdcb=_0x3bd2d7,_0x53fc73=formatZodPath(_0x5d7c23['path']),_0x245e1d=_0x53fc73?_0x1070fb+'.'+_0x53fc73:_0x1070fb,_0x4d9f17=mapZodIssueToCode(_0x5d7c23,_0x53fc73),_0x23b42c=getLocationFromPath(_0x4511f9[_0x55cdcb(0x13b)],_0x4511f9[_0x55cdcb(0x15d)],pathToArray(_0x245e1d));return{'level':_0x55cdcb(0x160),'path':_0x245e1d,'code':_0x4d9f17,'message':_0x5d7c23[_0x55cdcb(0x16b)],..._0x23b42c&&{'location':_0x23b42c}};});}function zodErrorsToValidationResult(_0x5a126e,_0x11eaae){const _0x3f8df6=a146_0x455d,_0x4fcc1e=flattenZodIssues(_0x5a126e[_0x3f8df6(0x161)]),_0xd0efbc=_0x4fcc1e[_0x3f8df6(0x140)](_0x17437a=>{const _0x584339=_0x3f8df6,_0xfa239a=formatZodPath(_0x17437a[_0x584339(0x150)]),_0x5f24ce=mapZodIssueToCode(_0x17437a,_0xfa239a),_0x49d796=getLocationFromPath(_0x11eaae['document'],_0x11eaae[_0x584339(0x15d)],_0x17437a[_0x584339(0x150)][_0x584339(0x140)](_0x53ba7a=>typeof _0x53ba7a===_0x584339(0x130)?String(_0x53ba7a):_0x53ba7a));return{'level':'error','path':_0xfa239a,'code':_0x5f24ce,'message':_0x17437a[_0x584339(0x16b)],..._0x49d796&&{'location':_0x49d796}};});return{'valid':![],'errors':_0xd0efbc,'warnings':[]};}function mapZodIssueToCode(_0x2070ce,_0x351743){const _0x51d487=a146_0x455d,_0x2b0ff0=_0x2070ce['code']==='custom'?_0x2070ce[_0x51d487(0x162)]:undefined;if(_0x351743==='name')return _0x51d487(0x154);if(_0x351743===_0x51d487(0x134)||_0x351743[_0x51d487(0x125)](_0x51d487(0x139))){if(_0x2070ce[_0x51d487(0x123)]==='invalid_value'){if(_0x351743===_0x51d487(0x134)||_0x351743['match'](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x351743[_0x51d487(0x125)](_0x51d487(0x156)))return _0x51d487(0x142);if(_0x351743[_0x51d487(0x125)](_0x51d487(0x15c)))return _0x51d487(0x15f);if(_0x2b0ff0?.[_0x51d487(0x121)]===_0x51d487(0x14f))return'MISSING_BETWEEN_BOUNDS';if(_0x2b0ff0?.[_0x51d487(0x121)]===_0x51d487(0x138))return _0x51d487(0x138);if(_0x351743[_0x51d487(0x125)](_0x51d487(0x127))||_0x351743===_0x51d487(0x137))return _0x51d487(0x124);if(_0x351743[_0x51d487(0x14d)]('arrayMatching'))return'INVALID_ARRAY_MATCHING';if(_0x351743[_0x51d487(0x125)](_0x51d487(0x13a)))return _0x51d487(0x165);return _0x51d487(0x131);}function runSemanticChecks(_0x575e06,_0x516760){const _0x956af=a146_0x455d,_0x5e2d79=[];_0x575e06[_0x956af(0x149)]&&_0x5e2d79[_0x956af(0x129)](...checkRule(_0x575e06[_0x956af(0x149)],'rule',_0x516760));const _0x1de94a=_0x5e2d79[_0x956af(0x146)](_0x477ec1=>_0x477ec1['level']===_0x956af(0x160)),_0x3c550f=_0x5e2d79[_0x956af(0x146)](_0x46de00=>_0x46de00[_0x956af(0x12d)]===_0x956af(0x151));return{'valid':_0x1de94a[_0x956af(0x13d)]===0x0,'errors':_0x1de94a,'warnings':_0x3c550f};}function checkRule(_0x4a4e9c,_0x5d71ec,_0x31502e){const _0x27946e=a146_0x455d,_0x381b9a=[];if(_0x4a4e9c[_0x27946e(0x137)][_0x27946e(0x13d)]===0x0)return _0x381b9a['push']({'level':_0x27946e(0x160),'path':_0x5d71ec+_0x27946e(0x127),'code':_0x27946e(0x157),'message':_0x27946e(0x132),'location':getLocationFromPath(_0x31502e[_0x27946e(0x13b)],_0x31502e[_0x27946e(0x15d)],pathToArray(_0x5d71ec+_0x27946e(0x127)))}),_0x381b9a;return _0x381b9a[_0x27946e(0x129)](...checkConditions(_0x4a4e9c[_0x27946e(0x137)],_0x5d71ec,_0x31502e)),_0x381b9a;}function checkConditions(_0x453578,_0x5883c7,_0x292042){const _0x4f56cd=a146_0x455d,_0x2f9fef=[];for(let _0x4178c7=0x0;_0x4178c7<_0x453578['length'];_0x4178c7++){const _0x58c11a=_0x453578[_0x4178c7],_0x1251e7=_0x5883c7+_0x4f56cd(0x141)+_0x4178c7+']';_0x2f9fef[_0x4f56cd(0x129)](...checkCondition(_0x58c11a,_0x1251e7,_0x292042));}return _0x2f9fef;}function checkCondition(_0x4cff38,_0x54f7ac,_0x1c8e30){const _0x566da3=a146_0x455d,_0x5764e2=[];if(_0x4cff38[_0x566da3(0x158)]==='And'||_0x4cff38['type']==='Or')return _0x4cff38[_0x566da3(0x137)][_0x566da3(0x13d)]===0x0?_0x5764e2[_0x566da3(0x129)]({'level':'error','path':_0x54f7ac+_0x566da3(0x127),'code':_0x566da3(0x157),'message':_0x4cff38[_0x566da3(0x158)]+_0x566da3(0x166),'location':getLocationFromPath(_0x1c8e30['document'],_0x1c8e30[_0x566da3(0x15d)],pathToArray(_0x54f7ac+_0x566da3(0x127)))}):(_0x5764e2[_0x566da3(0x129)]({'level':_0x566da3(0x151),'path':_0x54f7ac,'code':_0x566da3(0x128),'message':_0x4cff38[_0x566da3(0x158)]+_0x566da3(0x135)+_0x566da3(0x164)+_0x566da3(0x153),'location':getLocationFromPath(_0x1c8e30[_0x566da3(0x13b)],_0x1c8e30[_0x566da3(0x15d)],pathToArray(_0x54f7ac))}),_0x5764e2['push'](...checkConditions(_0x4cff38[_0x566da3(0x137)],_0x54f7ac,_0x1c8e30))),_0x5764e2;if(_0x4cff38['type']===_0x566da3(0x13e)||_0x4cff38[_0x566da3(0x158)]===_0x566da3(0x12f)){const _0x24cbf0=_0x4cff38,_0x3eae0c=_0x24cbf0[_0x566da3(0x15d)],_0x241e1d=_0x24cbf0[_0x566da3(0x167)],_0x88d2ca=_0x3eae0c||_0x241e1d;(!_0x24cbf0[_0x566da3(0x14c)]||_0x24cbf0[_0x566da3(0x14c)]==='')&&(!_0x88d2ca&&_0x5764e2['push']({'level':_0x566da3(0x160),'path':_0x54f7ac+_0x566da3(0x152),'code':_0x566da3(0x15b),'message':_0x566da3(0x168),'location':getLocationFromPath(_0x1c8e30['document'],_0x1c8e30[_0x566da3(0x15d)],pathToArray(_0x54f7ac+_0x566da3(0x152)))}));_0x24cbf0[_0x566da3(0x146)]&&_0x5764e2[_0x566da3(0x129)](...checkRule(_0x24cbf0[_0x566da3(0x146)],_0x54f7ac+'.filter',_0x1c8e30));if(_0x24cbf0['source']){const _0x36c366=_0x24cbf0['attribute']&&_0x24cbf0[_0x566da3(0x14c)]!=='';_0x36c366&&!_0x24cbf0['filter']&&_0x5764e2[_0x566da3(0x129)]({'level':_0x566da3(0x160),'path':_0x54f7ac+_0x566da3(0x136),'code':_0x566da3(0x133),'message':_0x566da3(0x126)+_0x24cbf0[_0x566da3(0x15d)]+_0x566da3(0x13f)+_0x24cbf0[_0x566da3(0x14c)]+'\x27\x20'+_0x566da3(0x122)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x566da3(0x12c),'location':getLocationFromPath(_0x1c8e30[_0x566da3(0x13b)],_0x1c8e30[_0x566da3(0x15d)],pathToArray(_0x54f7ac+_0x566da3(0x136)))}),_0x36c366&&_0x24cbf0['filter']&&_0x5764e2[_0x566da3(0x129)]({'level':_0x566da3(0x151),'path':_0x54f7ac+'.attribute','code':_0x566da3(0x14e),'message':_0x566da3(0x143)+_0x24cbf0[_0x566da3(0x14c)]+_0x566da3(0x148)+_0x566da3(0x159),'location':getLocationFromPath(_0x1c8e30[_0x566da3(0x13b)],_0x1c8e30[_0x566da3(0x15d)],pathToArray(_0x54f7ac+_0x566da3(0x152)))});}}return _0x5764e2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a147_0x295a(_0x3dd777,_0x10f154){_0x3dd777=_0x3dd777-0xcd;const _0x5568bc=a147_0x5568();let _0x295a54=_0x5568bc[_0x3dd777];return _0x295a54;}(function(_0x602478,_0x27802a){const _0x1f1d1c=a147_0x295a,_0x4b6cb8=_0x602478();while(!![]){try{const _0x1411ab=parseInt(_0x1f1d1c(0xdd))/0x1*(-parseInt(_0x1f1d1c(0xf7))/0x2)+parseInt(_0x1f1d1c(0xf1))/0x3+-parseInt(_0x1f1d1c(0xde))/0x4+-parseInt(_0x1f1d1c(0xe4))/0x5*(-parseInt(_0x1f1d1c(0xf0))/0x6)+-parseInt(_0x1f1d1c(0xf8))/0x7*(-parseInt(_0x1f1d1c(0xe1))/0x8)+-parseInt(_0x1f1d1c(0xeb))/0x9+-parseInt(_0x1f1d1c(0xf5))/0xa*(-parseInt(_0x1f1d1c(0xdb))/0xb);if(_0x1411ab===_0x27802a)break;else _0x4b6cb8['push'](_0x4b6cb8['shift']());}catch(_0x1a9637){_0x4b6cb8['push'](_0x4b6cb8['shift']());}}}(a147_0x5568,0xc86cc));import a147_0x5c6a07 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5a1a60){const _0xe0a662=a147_0x295a;return _0x5a1a60[_0xe0a662(0xd5)]!==_0xe0a662(0xe0);}export function isScopedResolution(_0x4cfeb4){const _0x4f981d=a147_0x295a;return _0x4cfeb4['type']===_0x4f981d(0xd4)||_0x4cfeb4[_0x4f981d(0xd5)]===_0x4f981d(0xcf)||_0x4cfeb4[_0x4f981d(0xd5)]===_0x4f981d(0xed);}export function getScopedDetails(_0x39e41c){const _0x3d906a=a147_0x295a;if(isScopedResolution(_0x39e41c))return{'isScoped':_0x39e41c[_0x3d906a(0x101)],'scopedFolderPath':_0x39e41c[_0x3d906a(0xd2)]};return undefined;}function a147_0x5568(){const _0x3da71a=['extname','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','789039ayoozr','isFile','context','journey','segment','5515428HAkufL','1726647zPWoCw','readFile','configDir','no_config','10PLGkPM','match','26nLrVQe','2730VMBebe','startsWith','message','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','join','basename','no_parent','parent_name','No\x20tdx.json\x20found\x20for\x20file:\x20','isScoped','dirname','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','stat','No\x20tdx.json\x20found','resourceType','file','segmentName','exists','scopedFolderPath','includes','directory','type','resolve','cwd','Parent\x20segment\x20not\x20specified','tdx.json','replace','17940153wcQkIE','parent_segment','111589Gynxud','3839528zlDBsM','parentSegment','error','3968GFGtqO','trim','invalid_yaml','5KnRQKC','Not\x20a\x20YAML\x20file:\x20','parse','folderPath','File\x20not\x20found:\x20'];a147_0x5568=function(){return _0x3da71a;};return a147_0x5568();}async function findTdxConfigAsync(_0x599c58,_0x126969){const _0x4f29d7=a147_0x295a;let _0x41dd66=a147_0x5c6a07[_0x4f29d7(0xd6)](_0x599c58);const _0x338251=a147_0x5c6a07[_0x4f29d7(0xe6)](_0x41dd66)['root'];while(_0x41dd66!==_0x338251){const _0x72f25e=a147_0x5c6a07[_0x4f29d7(0xfc)](_0x41dd66,_0x4f29d7(0xd9));if(await _0x126969[_0x4f29d7(0xd1)](_0x72f25e))try{const _0x20f4d4=await _0x126969[_0x4f29d7(0xf2)](_0x72f25e),_0x5baa69=JSON[_0x4f29d7(0xe6)](_0x20f4d4);if(_0x5baa69['parent_segment']&&typeof _0x5baa69[_0x4f29d7(0xdc)]==='string')return{'configPath':_0x72f25e,'configDir':_0x41dd66,'parentSegment':_0x5baa69[_0x4f29d7(0xdc)]};}catch{}_0x41dd66=a147_0x5c6a07['dirname'](_0x41dd66);}return null;}function calculateScopedPath(_0x2a391f,_0x580db0){const _0x5391d5=a147_0x295a,_0x37546e=a147_0x5c6a07['relative'](_0x580db0,_0x2a391f),_0x2b295a=_0x37546e!==''&&_0x37546e!=='.'&&!_0x37546e[_0x5391d5(0xf9)]('..');return{'isScoped':_0x2b295a,'scopedFolderPath':_0x2b295a?_0x37546e[_0x5391d5(0xda)](/\\/g,'/'):''};}export async function resolveTarget(_0x65c319){const _0x225f0f=a147_0x295a,{arg:_0x1e7c2d,contextParent:_0x37641e,cwd:cwd=process[_0x225f0f(0xd7)](),fs:fs=nodeFileSystem}=_0x65c319;if(_0x1e7c2d&&isYamlFilePath(_0x1e7c2d))try{const _0x4b8ec6=await resolveYamlFilePath(_0x1e7c2d,fs),_0x325345=a147_0x5c6a07[_0x225f0f(0xd6)](_0x1e7c2d),_0x34b2ef=a147_0x5c6a07[_0x225f0f(0x102)](_0x325345),_0x5a4406=await findTdxConfigAsync(_0x34b2ef,fs);if(!_0x5a4406){if(_0x37641e){const _0x555106=a147_0x5c6a07[_0x225f0f(0x102)](_0x325345);return{'type':_0x225f0f(0xcf),'parentName':_0x37641e,'targetDir':_0x555106,'configRoot':_0x555106,'filePath':_0x325345,'resourceName':_0x4b8ec6[_0x225f0f(0xd0)],'folderPath':_0x4b8ec6[_0x225f0f(0xe7)],'resourceType':_0x4b8ec6[_0x225f0f(0xce)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x225f0f(0xe0),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x1e7c2d,'arg':_0x1e7c2d,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x12a167=calculateScopedPath(_0x34b2ef,_0x5a4406[_0x225f0f(0xf3)]);return{'type':_0x225f0f(0xcf),'parentName':_0x5a4406[_0x225f0f(0xdf)],'targetDir':_0x5a4406[_0x225f0f(0xf3)],'configRoot':_0x5a4406['configDir'],'filePath':_0x325345,'resourceName':_0x4b8ec6[_0x225f0f(0xd0)],'folderPath':_0x4b8ec6[_0x225f0f(0xe7)],'resourceType':_0x4b8ec6[_0x225f0f(0xce)],'isScoped':_0x12a167[_0x225f0f(0x101)],'scopedFolderPath':_0x12a167[_0x225f0f(0xd2)]};}catch(_0x235142){const _0x31b28d=_0x235142 instanceof Error?_0x235142[_0x225f0f(0xfa)]:String(_0x235142);if(_0x31b28d[_0x225f0f(0xd3)]('File\x20not\x20found'))return{'type':_0x225f0f(0xe0),'errorCode':'file_not_found','message':_0x225f0f(0xe8)+_0x1e7c2d,'arg':_0x1e7c2d};if(_0x31b28d[_0x225f0f(0xd3)](_0x225f0f(0xcd))){if(_0x37641e){const _0x4e2213=a147_0x5c6a07['resolve'](_0x1e7c2d);if(await fs[_0x225f0f(0xd1)](_0x4e2213)){const _0x5c1945=a147_0x5c6a07[_0x225f0f(0x102)](_0x4e2213),_0x5c05c6=await fs[_0x225f0f(0xf2)](_0x4e2213),_0x3e9f12=_0x5c05c6[_0x225f0f(0xf6)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x579317=_0x5c05c6[_0x225f0f(0xf6)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x1725cc=_0x3e9f12?_0x3e9f12[0x1]['trim']():a147_0x5c6a07[_0x225f0f(0xfd)](_0x1e7c2d,a147_0x5c6a07[_0x225f0f(0xe9)](_0x1e7c2d)),_0xcd6d9c=_0x579317&&_0x579317[0x1][_0x225f0f(0xe2)]()===_0x225f0f(0xee)?_0x225f0f(0xee):_0x225f0f(0xef);return{'type':_0x225f0f(0xcf),'parentName':_0x37641e,'targetDir':_0x5c1945,'configRoot':_0x5c1945,'filePath':_0x4e2213,'resourceName':_0x1725cc,'folderPath':'','resourceType':_0xcd6d9c,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x225f0f(0xf4),'message':_0x225f0f(0x100)+_0x1e7c2d,'arg':_0x1e7c2d,'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':'error','errorCode':_0x225f0f(0xe3),'message':_0x31b28d,'arg':_0x1e7c2d};}if(_0x1e7c2d){const _0x76b5f4=a147_0x5c6a07[_0x225f0f(0xd6)](cwd,_0x1e7c2d);let _0x356d58=null;try{_0x356d58=await fs[_0x225f0f(0x104)](_0x76b5f4);}catch{}if(_0x356d58?.['isDirectory']()){const _0x515e2c=await findTdxConfigAsync(_0x76b5f4,fs);if(_0x515e2c){const _0x58f96d=calculateScopedPath(_0x76b5f4,_0x515e2c[_0x225f0f(0xf3)]);return{'type':_0x225f0f(0xd4),'parentName':_0x515e2c[_0x225f0f(0xdf)],'targetDir':_0x76b5f4,'configRoot':_0x515e2c[_0x225f0f(0xf3)],'isScoped':_0x58f96d[_0x225f0f(0x101)],'scopedFolderPath':_0x58f96d[_0x225f0f(0xd2)]};}if(_0x37641e)return{'type':_0x225f0f(0xd4),'parentName':_0x37641e,'targetDir':_0x76b5f4,'configRoot':_0x76b5f4,'isScoped':![],'scopedFolderPath':''};return{'type':_0x225f0f(0xe0),'errorCode':'no_config','message':_0x225f0f(0xea)+_0x1e7c2d,'arg':_0x1e7c2d,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x356d58?.[_0x225f0f(0xec)]())return{'type':_0x225f0f(0xe0),'errorCode':'invalid_yaml','message':_0x225f0f(0xe5)+_0x1e7c2d,'arg':_0x1e7c2d,'helpText':_0x225f0f(0x103)};const _0x497b4c=sanitizeFileName(_0x1e7c2d),_0x305d49=getSegmentRootDir(_0x497b4c,cwd);return{'type':_0x225f0f(0xff),'parentName':_0x1e7c2d,'targetDir':_0x305d49,'configRoot':_0x305d49};}const _0x384123=await findTdxConfigAsync(cwd,fs);if(_0x384123){const _0x310c32=calculateScopedPath(cwd,_0x384123[_0x225f0f(0xf3)]);return{'type':_0x225f0f(0xed),'parentName':_0x384123[_0x225f0f(0xdf)],'targetDir':cwd,'configRoot':_0x384123[_0x225f0f(0xf3)],'isScoped':_0x310c32['isScoped'],'scopedFolderPath':_0x310c32['scopedFolderPath']};}if(_0x37641e){const _0x2ccf14=sanitizeFileName(_0x37641e),_0x4cb802=getSegmentRootDir(_0x2ccf14,cwd);return{'type':_0x225f0f(0xed),'parentName':_0x37641e,'targetDir':_0x4cb802,'configRoot':_0x4cb802,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x225f0f(0xfe),'message':_0x225f0f(0xd8),'helpText':_0x225f0f(0xfb)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x384f4d=a148_0x5b5f;(function(_0x5a948a,_0x56d087){const _0x150069=a148_0x5b5f,_0x5a922d=_0x5a948a();while(!![]){try{const _0x54a298=parseInt(_0x150069(0x1f2))/0x1+-parseInt(_0x150069(0x1ff))/0x2+-parseInt(_0x150069(0x1e7))/0x3+-parseInt(_0x150069(0x1f9))/0x4+parseInt(_0x150069(0x1fa))/0x5+-parseInt(_0x150069(0x1f6))/0x6*(parseInt(_0x150069(0x1f1))/0x7)+parseInt(_0x150069(0x1ed))/0x8;if(_0x54a298===_0x56d087)break;else _0x5a922d['push'](_0x5a922d['shift']());}catch(_0x298434){_0x5a922d['push'](_0x5a922d['shift']());}}}(a148_0x3b58,0xb0d29));import{existsSync,readFileSync}from'fs';import a148_0x42bc50 from'path';function a148_0x3b58(){const _0x201e32=['replace','stringify','engage_workspace','24169536SiFNgC','parent_segment','object','cwd','4151973QKqJHX','456132JEaOYr','dirname','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20JSON\x20in\x20','6nSKhjx','parse','tdx.json','558996DVYNwj','4006595eTXVAN','relative','string','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','root','2804904tZFeuO','startsWith','resolve','4257114BzQYZB','utf-8','join'];a148_0x3b58=function(){return _0x201e32;};return a148_0x3b58();}const TDX_CONFIG_FILE=a148_0x384f4d(0x1f8),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x43858e=process['cwd']()){const _0x3c1225=a148_0x384f4d;let _0x594458=a148_0x42bc50['resolve'](_0x43858e);const _0x557aed=a148_0x42bc50[_0x3c1225(0x1f7)](_0x594458)[_0x3c1225(0x1fe)];while(_0x594458!==_0x557aed){const _0xaff618=a148_0x42bc50[_0x3c1225(0x1e9)](_0x594458,TDX_CONFIG_FILE);if(existsSync(_0xaff618))return _0xaff618;_0x594458=a148_0x42bc50[_0x3c1225(0x1f3)](_0x594458);}return null;}export function loadTdxConfig(_0x151a33){const _0x3311f7=a148_0x384f4d,_0x1b4fd1=readFileSync(_0x151a33,_0x3311f7(0x1e8));let _0xf826bf;try{_0xf826bf=JSON[_0x3311f7(0x1f7)](_0x1b4fd1);}catch{throw new Error(_0x3311f7(0x1f5)+_0x151a33);}if(!_0xf826bf||typeof _0xf826bf!==_0x3311f7(0x1ef))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x762820=_0xf826bf,_0x270d96=_0x762820[_0x3311f7(0x1ee)]&&typeof _0x762820[_0x3311f7(0x1ee)]==='string',_0x48fd4b=_0x762820['engage_workspace']&&typeof _0x762820[_0x3311f7(0x1ec)]===_0x3311f7(0x1fc);if(!_0x270d96&&!_0x48fd4b)throw new Error(_0x3311f7(0x1fd));const _0x3fe2ee={};return _0x270d96&&(_0x3fe2ee['parent_segment']=_0x762820[_0x3311f7(0x1ee)]),_0x48fd4b&&(_0x3fe2ee[_0x3311f7(0x1ec)]=_0x762820[_0x3311f7(0x1ec)]),_0x3fe2ee;}export function findTdxConfig(_0x5479e9=process['cwd']()){const _0x4d01cd=a148_0x384f4d,_0x594866=findTdxConfigPath(_0x5479e9);if(!_0x594866)throw new Error(_0x4d01cd(0x1f4));const _0x21006b=loadTdxConfig(_0x594866),_0x3a2633=a148_0x42bc50['dirname'](_0x594866);return{'config':_0x21006b,'configPath':_0x594866,'configDir':_0x3a2633};}export function tryFindTdxConfig(_0x39dcff){try{return findTdxConfig(_0x39dcff);}catch{return null;}}export function getSegmentRootDir(_0x1cf150,_0xce8eca=process[a148_0x384f4d(0x1f0)]()){return a148_0x42bc50['join'](_0xce8eca,SEGMENTS_DIR,_0x1cf150);}export function getTdxConfigPath(_0x4046f7,_0x1eb24a=process[a148_0x384f4d(0x1f0)]()){const _0x145254=a148_0x384f4d;return a148_0x42bc50[_0x145254(0x1e9)](getSegmentRootDir(_0x4046f7,_0x1eb24a),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x4a53c2,_0x27a6ea){const _0x3ba4a9=a148_0x384f4d,_0x582486=a148_0x42bc50[_0x3ba4a9(0x1e6)](_0x4a53c2),_0x4dc1ef=a148_0x42bc50[_0x3ba4a9(0x1fb)](_0x27a6ea,_0x582486);if(_0x4dc1ef[_0x3ba4a9(0x1e5)]('..'))return'';return _0x4dc1ef;}export function localPathToTdFolderPath(_0x1d4c37){const _0x38734e=a148_0x384f4d,_0x26e3ca=a148_0x42bc50[_0x38734e(0x1f3)](_0x1d4c37);if(_0x26e3ca==='.'||_0x26e3ca==='')return'';return _0x26e3ca[_0x38734e(0x1ea)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x323dce,_0x5db572){if(!_0x323dce)return _0x5db572;return a148_0x42bc50['join'](_0x5db572,_0x323dce);}function a148_0x5b5f(_0x1f5755,_0xe254c0){_0x1f5755=_0x1f5755-0x1e5;const _0x3b582e=a148_0x3b58();let _0x5b5f51=_0x3b582e[_0x1f5755];return _0x5b5f51;}export function createTdxConfigContent(_0x135c8e){const _0x4905bf=a148_0x384f4d,_0x5d470a={'parent_segment':_0x135c8e};return JSON[_0x4905bf(0x1eb)](_0x5d470a,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3b9c2b){const _0x5aeeed=a148_0x384f4d,_0x2e7ffa={'engage_workspace':_0x3b9c2b};return JSON[_0x5aeeed(0x1eb)](_0x2e7ffa,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x31a079=a149_0x378a;(function(_0x2c08a7,_0x63a49c){const _0x475d03=a149_0x378a,_0x28fa8a=_0x2c08a7();while(!![]){try{const _0x101f13=-parseInt(_0x475d03(0x115))/0x1*(parseInt(_0x475d03(0xfd))/0x2)+parseInt(_0x475d03(0x100))/0x3*(-parseInt(_0x475d03(0x104))/0x4)+parseInt(_0x475d03(0x10d))/0x5*(-parseInt(_0x475d03(0xf3))/0x6)+-parseInt(_0x475d03(0x108))/0x7*(parseInt(_0x475d03(0xf4))/0x8)+parseInt(_0x475d03(0xfc))/0x9+parseInt(_0x475d03(0x10b))/0xa*(-parseInt(_0x475d03(0xf2))/0xb)+parseInt(_0x475d03(0x101))/0xc;if(_0x101f13===_0x63a49c)break;else _0x28fa8a['push'](_0x28fa8a['shift']());}catch(_0x1677bc){_0x28fa8a['push'](_0x28fa8a['shift']());}}}(a149_0x5e60,0x7aaa8));import{z}from'zod';export const ScheduleTypeSchema=z[a149_0x31a079(0x114)](['none',a149_0x31a079(0x10e),'daily',a149_0x31a079(0xff),a149_0x31a079(0x105),a149_0x31a079(0x10a),a149_0x31a079(0xfb)]);export const RepeatUnitSchema=z[a149_0x31a079(0x114)]([a149_0x31a079(0xef),'hour','day',a149_0x31a079(0x107),a149_0x31a079(0x109),'once','none']);export const ScheduleDefSchema=z[a149_0x31a079(0xf7)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a149_0x31a079(0xf6)](),'repeat_frequency':z[a149_0x31a079(0xfe)]()[a149_0x31a079(0xf6)](),'repeat_sub_frequency':z[a149_0x31a079(0xfa)](z[a149_0x31a079(0xfe)]())[a149_0x31a079(0xf6)](),'start_at':z[a149_0x31a079(0x110)]()[a149_0x31a079(0xee)]()[a149_0x31a079(0xf6)](),'end_on':z['string']()[a149_0x31a079(0xee)]()['optional'](),'timezone':z[a149_0x31a079(0x110)]()['optional']()});export const NotificationDefSchema=z[a149_0x31a079(0xf7)]({'notify_on':z[a149_0x31a079(0xfa)](z[a149_0x31a079(0x114)](['onSuccess',a149_0x31a079(0x102)]))[a149_0x31a079(0xf6)](),'email_recipients':z['array'](z[a149_0x31a079(0x110)]())[a149_0x31a079(0xf6)]()});function a149_0x378a(_0x54d341,_0x5af822){_0x54d341=_0x54d341-0xee;const _0x5e60dc=a149_0x5e60();let _0x378a2f=_0x5e60dc[_0x54d341];return _0x378a2f;}export const ActivationColumnDefSchema=z[a149_0x31a079(0xf0)]([z[a149_0x31a079(0x110)](),z['object']({'name':z[a149_0x31a079(0x110)](),'type':z['string']()[a149_0x31a079(0xf6)](),'visibility':z['enum']([a149_0x31a079(0x10f),a149_0x31a079(0x113)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a149_0x31a079(0xf7)]({'columns':z['array'](z[a149_0x31a079(0xf7)]({'name':z['string'](),'type':z[a149_0x31a079(0x110)]()[a149_0x31a079(0xf6)](),'visibility':z[a149_0x31a079(0x114)]([a149_0x31a079(0x10f),a149_0x31a079(0x113)])[a149_0x31a079(0xf6)]()}))[a149_0x31a079(0xf6)](),'behavior_table':z['string']()['optional'](),'join_row':z[a149_0x31a079(0xfe)]()[a149_0x31a079(0xee)]()[a149_0x31a079(0xf6)](),'join_strategy':z[a149_0x31a079(0x114)]([a149_0x31a079(0x111),a149_0x31a079(0xf5),a149_0x31a079(0x103),a149_0x31a079(0x112)])[a149_0x31a079(0xf6)](),'formatting':z[a149_0x31a079(0x114)]([a149_0x31a079(0xf1),a149_0x31a079(0x106)])['optional'](),'order_by':z[a149_0x31a079(0xfa)](z['object']({'key':z[a149_0x31a079(0x110)](),'order':z['enum']([a149_0x31a079(0x116),'desc'])}))['optional']()});export const ActivationDefSchema=z[a149_0x31a079(0xf7)]({'name':z[a149_0x31a079(0x110)]()['min'](0x1,a149_0x31a079(0xf8)),'description':z[a149_0x31a079(0x110)]()[a149_0x31a079(0xf6)](),'connection':z[a149_0x31a079(0x110)]()['min'](0x1,a149_0x31a079(0x10c)),'all_columns':z[a149_0x31a079(0xf9)]()[a149_0x31a079(0xf6)](),'columns':z[a149_0x31a079(0xfa)](ActivationColumnDefSchema)[a149_0x31a079(0xf6)](),'schedule':ScheduleDefSchema[a149_0x31a079(0xf6)](),'notification':NotificationDefSchema[a149_0x31a079(0xf6)](),'connector_config':z['record'](z[a149_0x31a079(0x110)](),z['unknown']())['optional'](),'activation_template_id':z[a149_0x31a079(0x110)]()[a149_0x31a079(0xee)]()[a149_0x31a079(0xf6)](),'behavior':ActivationBehaviorDefSchema[a149_0x31a079(0xee)]()[a149_0x31a079(0xf6)](),'run_after_journey_refresh':z['boolean']()[a149_0x31a079(0xf6)]()});function a149_0x5e60(){const _0x4eccf5=['2804PrjUYp','number','weekly','6yisVPM','27744636IiTVBs','onFailure','Last','1535668iLxDRD','monthly','cols','week','7MIyVim','month','cron','2430530njlaxx','Connection\x20name\x20is\x20required','5XqPebr','hourly','clear','string','All','Top-N','masked','enum','398HYOyTt','asc','nullable','minute','union','rows','11HFxmct','381642jdRaaY','7015208lkCQTO','First','optional','object','Activation\x20name\x20is\x20required','boolean','array','minutes_interval','6298002vEcAfX'];a149_0x5e60=function(){return _0x4eccf5;};return a149_0x5e60();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x11c3(){var _0x171d84=['10jsEwVO','188uzZFKJ','25bNEgSB','497436bdlUkP','531JcKNyO','12123IOLDhJ','1657469kzgxVq','10648bUmzkY','1794148fZEhlU','369626FuzpnE','2533517nPIMIL'];a150_0x11c3=function(){return _0x171d84;};return a150_0x11c3();}function a150_0x3e60(_0x1ae3ab,_0x54a739){_0x1ae3ab=_0x1ae3ab-0x188;var _0x11c3be=a150_0x11c3();var _0x3e60ce=_0x11c3be[_0x1ae3ab];return _0x3e60ce;}(function(_0x417896,_0x1fed8c){var _0x3d23c0=a150_0x3e60,_0x4e3fd7=_0x417896();while(!![]){try{var _0x62c15f=parseInt(_0x3d23c0(0x18f))/0x1+parseInt(_0x3d23c0(0x192))/0x2*(parseInt(_0x3d23c0(0x18b))/0x3)+-parseInt(_0x3d23c0(0x18e))/0x4+-parseInt(_0x3d23c0(0x188))/0x5*(-parseInt(_0x3d23c0(0x189))/0x6)+-parseInt(_0x3d23c0(0x190))/0x7+-parseInt(_0x3d23c0(0x18d))/0x8*(-parseInt(_0x3d23c0(0x18a))/0x9)+parseInt(_0x3d23c0(0x191))/0xa*(-parseInt(_0x3d23c0(0x18c))/0xb);if(_0x62c15f===_0x1fed8c)break;else _0x4e3fd7['push'](_0x4e3fd7['shift']());}catch(_0x24ea52){_0x4e3fd7['push'](_0x4e3fd7['shift']());}}}(a150_0x11c3,0x44b30));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x58af52=a151_0x3657;(function(_0x40b8d4,_0x270223){const _0x519fc6=a151_0x3657,_0x43cc1f=_0x40b8d4();while(!![]){try{const _0x167c61=parseInt(_0x519fc6(0x19f))/0x1*(parseInt(_0x519fc6(0x18d))/0x2)+-parseInt(_0x519fc6(0x191))/0x3*(parseInt(_0x519fc6(0x18a))/0x4)+-parseInt(_0x519fc6(0x197))/0x5+parseInt(_0x519fc6(0x198))/0x6+-parseInt(_0x519fc6(0x1a2))/0x7+-parseInt(_0x519fc6(0x1a5))/0x8*(parseInt(_0x519fc6(0x19a))/0x9)+parseInt(_0x519fc6(0x1a4))/0xa*(parseInt(_0x519fc6(0x1ae))/0xb);if(_0x167c61===_0x270223)break;else _0x43cc1f['push'](_0x43cc1f['shift']());}catch(_0x32ee11){_0x43cc1f['push'](_0x43cc1f['shift']());}}}(a151_0x7399,0xc6fa0));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum']([a151_0x58af52(0x194),a151_0x58af52(0x18e),'launched']);export const ReentryModeTypeSchema=z[a151_0x58af52(0x199)](['no_reentry',a151_0x58af52(0x1b0),a151_0x58af52(0x1b2)]);export const WaitUnitTypeSchema=z[a151_0x58af52(0x199)]([a151_0x58af52(0x192),a151_0x58af52(0x195)]);export const StepTypeValueSchema=z[a151_0x58af52(0x199)]([a151_0x58af52(0x1ab),a151_0x58af52(0x18c),a151_0x58af52(0x1a8),a151_0x58af52(0x1a6),a151_0x58af52(0x1b1),a151_0x58af52(0x1ad),a151_0x58af52(0x19d)]);export const EmbeddedSegmentDefSchema=z[a151_0x58af52(0x190)]({'description':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a151_0x58af52(0x190)]({'journey':z[a151_0x58af52(0x18b)](),'stage':z[a151_0x58af52(0x18b)](),'bundle_id':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)]()});export const CriteriaDefSchema=z[a151_0x58af52(0x190)]({'name':z['string'](),'description':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'segment':z[a151_0x58af52(0x18b)](),'target':JumpTargetDefSchema[a151_0x58af52(0x18f)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z['string']()[a151_0x58af52(0x18f)](),'timeout':WaitConditionTimeoutDefSchema[a151_0x58af52(0x18f)]()}),WaitStepParamsDefSchema=z[a151_0x58af52(0x190)]({'duration':z[a151_0x58af52(0x1b3)]()[a151_0x58af52(0x18f)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'condition':WaitConditionDefSchema[a151_0x58af52(0x18f)](),'days_of_week':z[a151_0x58af52(0x196)](z['string']())[a151_0x58af52(0x18f)]()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()[a151_0x58af52(0x18f)](),'next':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)]()},WaitStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z['literal'](a151_0x58af52(0x1ab)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a151_0x58af52(0x190)]({'activation':z[a151_0x58af52(0x18b)]()}),ActivationStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x18c)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a151_0x58af52(0x190)]({'name':z[a151_0x58af52(0x18b)](),'segment':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'segment_id':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'excluded':z[a151_0x58af52(0x193)]()[a151_0x58af52(0x18f)](),'next':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)]()}),DecisionPointStepParamsDefSchema=z[a151_0x58af52(0x190)]({'branches':z[a151_0x58af52(0x196)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x1a8)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z['string']()[a151_0x58af52(0x18f)](),'name':z['string'](),'percentage':z[a151_0x58af52(0x1b3)](),'next':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a151_0x58af52(0x18f)](),'customized_split':z[a151_0x58af52(0x193)]()[a151_0x58af52(0x18f)]()}),AbTestStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x1a6)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x1b1))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x1ad)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a151_0x58af52(0x190)]({...StepBaseFields,'type':z[a151_0x58af52(0x1ac)](a151_0x58af52(0x19d))})['passthrough']();export const StepDefSchema=z[a151_0x58af52(0x19c)](a151_0x58af52(0x1a1),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a151_0x58af52(0x190)]({'name':z[a151_0x58af52(0x18b)](),'description':z[a151_0x58af52(0x18b)]()['optional'](),'id':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'entry_criteria':CriteriaDefSchema[a151_0x58af52(0x18f)](),'exit_criteria':z[a151_0x58af52(0x196)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a151_0x58af52(0x18f)](),'root_step':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'steps':z[a151_0x58af52(0x196)](StepDefSchema)[a151_0x58af52(0x18f)]()});export const JourneyEntryDefSchema=z[a151_0x58af52(0x190)]({'name':z[a151_0x58af52(0x18b)]()['optional'](),'version':z['string']()[a151_0x58af52(0x18f)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a151_0x58af52(0x193)]()['optional'](),'stages':z[a151_0x58af52(0x196)](StageDefSchema),'id':z[a151_0x58af52(0x18b)]()['optional'](),'version_number':z[a151_0x58af52(0x1b3)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a151_0x58af52(0x18f)]()});export const JourneyDefSchema=z[a151_0x58af52(0x1af)](()=>z[a151_0x58af52(0x190)]({'type':z['literal'](a151_0x58af52(0x19e)),'name':z[a151_0x58af52(0x18b)]()['min'](0x1,a151_0x58af52(0x1a3)),'description':z[a151_0x58af52(0x18b)]()['optional'](),'bundle_id':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'bundle_name':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'folder_id':z['string']()[a151_0x58af52(0x18f)](),'reentry':ReentryModeTypeSchema[a151_0x58af52(0x18f)](),'allow_reentry':z['boolean']()[a151_0x58af52(0x18f)](),'goal':CriteriaDefSchema[a151_0x58af52(0x18f)](),'id':z[a151_0x58af52(0x18b)]()[a151_0x58af52(0x18f)](),'version':z['string']()[a151_0x58af52(0x18f)](),'version_number':z[a151_0x58af52(0x1b3)]()[a151_0x58af52(0x18f)](),'stages':z[a151_0x58af52(0x196)](StageDefSchema)[a151_0x58af52(0x18f)](),'versions':z[a151_0x58af52(0x196)](JourneyEntryDefSchema)['optional'](),'journeys':z['array'](JourneyEntryDefSchema)[a151_0x58af52(0x18f)](),'segments':z[a151_0x58af52(0x1b4)](z[a151_0x58af52(0x18b)](),EmbeddedSegmentDefSchema)[a151_0x58af52(0x18f)](),'activations':z[a151_0x58af52(0x1b4)](z[a151_0x58af52(0x18b)](),ActivationDefSchema)[a151_0x58af52(0x18f)]()})[a151_0x58af52(0x1a9)](_0x6c4376=>{const _0x7ed441=a151_0x58af52,_0x17a9a8=[_0x6c4376[_0x7ed441(0x1aa)],_0x6c4376[_0x7ed441(0x1a7)],_0x6c4376['versions']][_0x7ed441(0x189)](_0x13bd14=>Array[_0x7ed441(0x1a0)](_0x13bd14)&&_0x13bd14[_0x7ed441(0x19b)]>0x0)[_0x7ed441(0x19b)];return _0x17a9a8===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));function a151_0x7399(){const _0x3213b2=['reentry_always','number','record','filter','8iECGdq','string','activation','20Ujuqtk','simulation','optional','object','417081fSmMMC','day','boolean','draft','week','array','5227040ARVcaY','1753818iaLqxX','enum','72JLDLsp','length','discriminatedUnion','end','journey','134653KoyRUb','isArray','type','6806009kfisFk','Journey\x20name\x20is\x20required','27500XTpPaQ','1151576TNLIvP','ab_test','stages','decision_point','refine','journeys','wait','literal','jump','10494MACRql','lazy','reentry_unless_goal_achieved','merge'];a151_0x7399=function(){return _0x3213b2;};return a151_0x7399();}const _syncCheck1=!![],_syncCheck2=!![];function a151_0x3657(_0x181c55,_0x4839e9){_0x181c55=_0x181c55-0x189;const _0x739989=a151_0x7399();let _0x36579d=_0x739989[_0x181c55];return _0x36579d;}void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0x3fff(){var _0x4a0e24=['2146944gUCTVI','521085LMMIre','313626SLlCHZ','2333100ouzxhv','776775OjEmFo','8oXzyzv','2989OcRnPM','799011ytRgFV','186uISfmf'];a153_0x3fff=function(){return _0x4a0e24;};return a153_0x3fff();}function a153_0x115f(_0xb1d7bd,_0x410413){_0xb1d7bd=_0xb1d7bd-0xd9;var _0x3fffbf=a153_0x3fff();var _0x115f28=_0x3fffbf[_0xb1d7bd];return _0x115f28;}(function(_0x37ca62,_0x527e0f){var _0x42ac0c=a153_0x115f,_0x2c4bb3=_0x37ca62();while(!![]){try{var _0x5e246e=-parseInt(_0x42ac0c(0xda))/0x1*(parseInt(_0x42ac0c(0xdc))/0x2)+parseInt(_0x42ac0c(0xe1))/0x3+-parseInt(_0x42ac0c(0xd9))/0x4*(parseInt(_0x42ac0c(0xde))/0x5)+parseInt(_0x42ac0c(0xdf))/0x6+parseInt(_0x42ac0c(0xe0))/0x7+parseInt(_0x42ac0c(0xdd))/0x8+-parseInt(_0x42ac0c(0xdb))/0x9;if(_0x5e246e===_0x527e0f)break;else _0x2c4bb3['push'](_0x2c4bb3['shift']());}catch(_0x17f1b1){_0x2c4bb3['push'](_0x2c4bb3['shift']());}}}(a153_0x3fff,0x5270a));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_0x1fcb52=a154_0x4d6a;(function(_0x4c0aa0,_0x5dd780){const _0x1f8a24=a154_0x4d6a,_0x3b4f60=_0x4c0aa0();while(!![]){try{const _0x4a5cc0=parseInt(_0x1f8a24(0x227))/0x1+parseInt(_0x1f8a24(0x203))/0x2*(-parseInt(_0x1f8a24(0x22a))/0x3)+parseInt(_0x1f8a24(0x21d))/0x4*(parseInt(_0x1f8a24(0x212))/0x5)+-parseInt(_0x1f8a24(0x1ff))/0x6+-parseInt(_0x1f8a24(0x1e3))/0x7+parseInt(_0x1f8a24(0x224))/0x8*(-parseInt(_0x1f8a24(0x22f))/0x9)+parseInt(_0x1f8a24(0x200))/0xa;if(_0x4a5cc0===_0x5dd780)break;else _0x3b4f60['push'](_0x3b4f60['shift']());}catch(_0xb3c224){_0x3b4f60['push'](_0x3b4f60['shift']());}}}(a154_0x5a79,0x1de7c));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1eb),a154_0x1fcb52(0x206),'Less','GreaterEqual',a154_0x1fcb52(0x225),'In',a154_0x1fcb52(0x20e),a154_0x1fcb52(0x229),'IsNull',a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b),a154_0x1fcb52(0x1de),a154_0x1fcb52(0x1ea),a154_0x1fcb52(0x1f2),a154_0x1fcb52(0x1f4)]);export const TimeUnitSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x214),a154_0x1fcb52(0x226),a154_0x1fcb52(0x216),a154_0x1fcb52(0x220),a154_0x1fcb52(0x21a),a154_0x1fcb52(0x1f5),a154_0x1fcb52(0x221)]);export const AggregationTypeSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x231),'Sum',a154_0x1fcb52(0x204),a154_0x1fcb52(0x1f8),'Max',a154_0x1fcb52(0x20c),a154_0x1fcb52(0x22d),'Last']);const TemporalValueSchema=z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x22c)]({'timestamp':z[a154_0x1fcb52(0x21c)]()}),z['object']({'last':z[a154_0x1fcb52(0x223)]([z['number'](),z[a154_0x1fcb52(0x1e2)](z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)]())]),'unit':z[a154_0x1fcb52(0x21c)]()})]),OperatorValueSchema=z['union']([z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)](),z['boolean'](),TemporalValueSchema,z['array'](z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x22e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a154_0x1fcb52(0x206),a154_0x1fcb52(0x1f0),a154_0x1fcb52(0x1fc),a154_0x1fcb52(0x225),'In',a154_0x1fcb52(0x1de),'StartWith','EndWith','Regexp',a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b)]);export const OperatorDefSchema=z[a154_0x1fcb52(0x22c)]({'type':OperatorTypeSchema,'not':z['boolean']()[a154_0x1fcb52(0x1e7)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z['number'](),z[a154_0x1fcb52(0x21c)](),TemporalValueSchema])[a154_0x1fcb52(0x1e7)](),'max':z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x21c)](),TemporalValueSchema])[a154_0x1fcb52(0x1e7)](),'unit':TimeUnitSchema[a154_0x1fcb52(0x1e7)](),'duration':z[a154_0x1fcb52(0x22c)]({'day':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'week':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'month':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'year':z['number']()['optional'](),'hour':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'minute':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'second':z['number']()[a154_0x1fcb52(0x1e7)]()})['optional'](),'from':z[a154_0x1fcb52(0x22c)]({'last':z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x21c)]()]),'unit':TimeUnitSchema})[a154_0x1fcb52(0x1e7)](),'reverse':z['boolean']()[a154_0x1fcb52(0x1e7)]()})[a154_0x1fcb52(0x222)]((_0x22b763,_0x510ab3)=>{const _0x421ce1=a154_0x1fcb52;OPERATORS_REQUIRING_VALUE[_0x421ce1(0x21e)](_0x22b763[_0x421ce1(0x21b)])&&(_0x22b763[_0x421ce1(0x20a)]===undefined||_0x22b763[_0x421ce1(0x20a)]===null)&&_0x510ab3['addIssue']({'code':'custom','message':'Operator\x20\x27'+_0x22b763[_0x421ce1(0x21b)]+_0x421ce1(0x1ee),'path':[_0x421ce1(0x20a)]}),_0x22b763[_0x421ce1(0x21b)]===_0x421ce1(0x20e)&&_0x22b763[_0x421ce1(0x1f1)]===undefined&&_0x22b763['max']===undefined&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x1df),'params':{'validationCode':_0x421ce1(0x1f9)}}),OPERATORS_REQUIRING_UNIT[_0x421ce1(0x21e)](_0x22b763[_0x421ce1(0x21b)])&&_0x22b763['value']!==undefined&&!_0x22b763[_0x421ce1(0x1fd)]&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x1e8)+_0x22b763[_0x421ce1(0x21b)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x421ce1(0x1fd)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x22b763[_0x421ce1(0x21b)]===_0x421ce1(0x1f4)&&(!_0x22b763[_0x421ce1(0x215)]&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x219),'path':[_0x421ce1(0x215)]}),!_0x22b763[_0x421ce1(0x20d)]&&_0x510ab3['addIssue']({'code':'custom','message':_0x421ce1(0x208),'path':[_0x421ce1(0x20d)]}));});export const ArrayMatchingSchema=z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x21f)),z['literal'](a154_0x1fcb52(0x230)),z[a154_0x1fcb52(0x22c)]({'atLeast':z[a154_0x1fcb52(0x1fa)]()}),z['object']({'atMost':z['number']()}),z[a154_0x1fcb52(0x22c)]({'exactly':z[a154_0x1fcb52(0x1fa)]()})]);export const AggregationDefSchema=z[a154_0x1fcb52(0x1e6)](a154_0x1fcb52(0x21b),[z['object']({'type':z['enum']([a154_0x1fcb52(0x217),a154_0x1fcb52(0x1f8),a154_0x1fcb52(0x1f3),'Average']),'column':z['string'](),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z[a154_0x1fcb52(0x21c)]())[a154_0x1fcb52(0x1e7)]()}),z['object']({'type':z[a154_0x1fcb52(0x1fe)]('Count'),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z[a154_0x1fcb52(0x21c)]())[a154_0x1fcb52(0x1e7)]()}),z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x20c)),'columns':z['array'](z[a154_0x1fcb52(0x21c)]())}),z['object']({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x22d),a154_0x1fcb52(0x1e5)]),'column':z[a154_0x1fcb52(0x21c)](),'orderColumn':z['string'](),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a154_0x1fcb52(0x1fa)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a154_0x1fcb52(0x22b),a154_0x1fcb52(0x1f4)]);function a154_0x4d6a(_0x172312,_0x32e121){_0x172312=_0x172312-0x1de;const _0x5a79c2=a154_0x5a79();let _0x4d6ab3=_0x5a79c2[_0x172312];return _0x4d6ab3;}export const FilterColumnConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x213)),'column':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x1fcb52(0x1e7)]()})[a154_0x1fcb52(0x222)]((_0x3423c4,_0xfaa4b7)=>{const _0x27d220=a154_0x1fcb52,_0x4dad62=_0x3423c4['operator'][_0x27d220(0x21b)];_0x3423c4[_0x27d220(0x1e1)]===_0x27d220(0x1ec)?!TIMESTAMP_OPERATORS[_0x27d220(0x21e)](_0x4dad62)&&_0xfaa4b7['addIssue']({'code':_0x27d220(0x20b),'message':_0x27d220(0x1e0)+_0x4dad62+'\x27)','path':[_0x27d220(0x211),'type']}):TIMESTAMP_OPERATORS['has'](_0x4dad62)&&_0xfaa4b7['addIssue']({'code':_0x27d220(0x20b),'message':_0x27d220(0x1e8)+_0x4dad62+_0x27d220(0x201),'path':[_0x27d220(0x211),_0x27d220(0x21b)]});});export const FilterRuleDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x1f7)),'conditions':z[a154_0x1fcb52(0x1ed)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)]('Value'),'attribute':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a154_0x1fcb52(0x22e)]()[a154_0x1fcb52(0x1e7)](),'aggregation':AggregationDefSchema[a154_0x1fcb52(0x1e7)](),'source':z['string']()[a154_0x1fcb52(0x1e7)](),'filter':FilterRuleDefSchema[a154_0x1fcb52(0x1e7)](),'limit':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)]()}));function a154_0x5a79(){const _0x594f71=['batch','operator','35555BhRmPi','Column','second','duration','hour','Sum','realtime','TimeRange\x20operator\x20requires\x20\x27duration\x27','week','type','string','52XHYvtd','has','any','day','year','superRefine','union','80NTCGDT','LessEqual','minute','25716HmijDJ','funnel_stage','Regexp','320709pBDmkr','TimeWithinNext','object','First','boolean','38385hvixLc','all','Count','Contain','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','column','record','433167wXmuDB','exclude','Last','discriminatedUnion','optional','Operator\x20\x27','include','StartWith','Equal','timestamp','array','\x27\x20requires\x20a\x20value','Segment\x20reference\x20must\x20not\x20be\x20empty','GreaterEqual','min','EndWith','Max','TimeRange','month','segment','And','Min','MISSING_BETWEEN_BOUNDS','number','enum','Less','unit','literal','951822XlQACl','3744040yOIxam','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','addIssue','2GyglHu','Average','TimeWithinPast','Greater','lazy','TimeRange\x20operator\x20requires\x20\x27from\x27','Behavior','value','custom','CountDistinct','from','Between','Segment\x20name\x20is\x20required'];a154_0x5a79=function(){return _0x594f71;};return a154_0x5a79();}export const BehaviorConditionDefSchema=z[a154_0x1fcb52(0x207)](()=>z['object']({'type':z['literal'](a154_0x1fcb52(0x209)),'attribute':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x1fcb52(0x1e7)](),'exclude':z[a154_0x1fcb52(0x22e)]()['optional'](),'aggregation':AggregationDefSchema[a154_0x1fcb52(0x1e7)](),'source':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a154_0x1fcb52(0x1e7)](),'limit':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)]()}));export const ColumnConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z['literal']('Column'),'column':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1f7),'Or']),'conditions':z[a154_0x1fcb52(0x1ed)](ConditionDefSchema),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)]()}));export const SegmentRefConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1e9),a154_0x1fcb52(0x1e4)]),'segment':z[a154_0x1fcb52(0x21c)]()['min'](0x1,a154_0x1fcb52(0x1ef))});export const ConditionDefSchema=z[a154_0x1fcb52(0x207)](()=>z[a154_0x1fcb52(0x223)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fb)](['And','Or']),'conditions':z[a154_0x1fcb52(0x1ed)](ConditionDefSchema),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)]()}));export const SegmentDefSchema=z['object']({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x1f6))['optional'](),'name':z[a154_0x1fcb52(0x21c)]()['min'](0x1,a154_0x1fcb52(0x20f)),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)](),'folder':z[a154_0x1fcb52(0x21c)]()['optional'](),'rule':RuleDefSchema[a154_0x1fcb52(0x1e7)](),'kind':z['enum']([a154_0x1fcb52(0x210),a154_0x1fcb52(0x218),a154_0x1fcb52(0x228)])[a154_0x1fcb52(0x1e7)](),'visible':z[a154_0x1fcb52(0x22e)]()[a154_0x1fcb52(0x1e7)](),'activations':z[a154_0x1fcb52(0x1ed)](z['any']())[a154_0x1fcb52(0x1e7)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a154_0x5567b1=a154_0x4bfb;(function(_0x139630,_0x29dfed){const _0x25f605=a154_0x4bfb,_0x53d46e=_0x139630();while(!![]){try{const _0x437b3f=-parseInt(_0x25f605(0x170))/0x1+parseInt(_0x25f605(0x172))/0x2+parseInt(_0x25f605(0x17c))/0x3+-parseInt(_0x25f605(0x152))/0x4*(parseInt(_0x25f605(0x169))/0x5)+parseInt(_0x25f605(0x189))/0x6+parseInt(_0x25f605(0x15f))/0x7+-parseInt(_0x25f605(0x148))/0x8;if(_0x437b3f===_0x29dfed)break;else _0x53d46e['push'](_0x53d46e['shift']());}catch(_0xff8292){_0x53d46e['push'](_0x53d46e['shift']());}}}(a154_0x1ab0,0x90d33));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x192),a154_0x5567b1(0x178),'Less',a154_0x5567b1(0x156),a154_0x5567b1(0x168),'In',a154_0x5567b1(0x17d),a154_0x5567b1(0x160),'IsNull','TimeWithinPast',a154_0x5567b1(0x174),a154_0x5567b1(0x149),a154_0x5567b1(0x15b),a154_0x5567b1(0x181),a154_0x5567b1(0x15c)]);function a154_0x4bfb(_0x18e7bf,_0x4bf9a4){_0x18e7bf=_0x18e7bf-0x148;const _0x1ab088=a154_0x1ab0();let _0x4bfb9d=_0x1ab088[_0x18e7bf];return _0x4bfb9d;}export const TimeUnitSchema=z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x14e),'minute',a154_0x5567b1(0x18e),'day','week','month',a154_0x5567b1(0x17b)]);export const AggregationTypeSchema=z['enum']([a154_0x5567b1(0x153),a154_0x5567b1(0x15e),'Average',a154_0x5567b1(0x182),'Max',a154_0x5567b1(0x188),a154_0x5567b1(0x179),a154_0x5567b1(0x151)]);const TemporalValueSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x17a)]({'timestamp':z[a154_0x5567b1(0x164)]()}),z[a154_0x5567b1(0x17a)]({'last':z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x16e)](z['string'](),z[a154_0x5567b1(0x16d)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x164)](),z['number'](),z[a154_0x5567b1(0x166)](),TemporalValueSchema,z[a154_0x5567b1(0x186)](z['union']([z[a154_0x5567b1(0x164)](),z['number'](),z[a154_0x5567b1(0x166)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a154_0x5567b1(0x192),a154_0x5567b1(0x178),a154_0x5567b1(0x156),a154_0x5567b1(0x16c),a154_0x5567b1(0x168),'In','Contain',a154_0x5567b1(0x15b),a154_0x5567b1(0x181),'Regexp',a154_0x5567b1(0x15d),a154_0x5567b1(0x174)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0x5567b1(0x15d),a154_0x5567b1(0x174)]);export const OperatorDefSchema=z[a154_0x5567b1(0x17a)]({'type':OperatorTypeSchema,'not':z[a154_0x5567b1(0x166)]()['optional'](),'value':OperatorValueSchema[a154_0x5567b1(0x173)](),'min':z['union']([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)](),TemporalValueSchema])[a154_0x5567b1(0x173)](),'unit':TimeUnitSchema[a154_0x5567b1(0x173)](),'duration':z[a154_0x5567b1(0x17a)]({'day':z['number']()[a154_0x5567b1(0x173)](),'week':z['number']()[a154_0x5567b1(0x173)](),'month':z['number']()[a154_0x5567b1(0x173)](),'year':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'hour':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'minute':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'second':z[a154_0x5567b1(0x16d)]()['optional']()})[a154_0x5567b1(0x173)](),'from':z['object']({'last':z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)]()]),'unit':TimeUnitSchema})[a154_0x5567b1(0x173)](),'reverse':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)]()})[a154_0x5567b1(0x18b)]((_0x2082cf,_0x4ee9e7)=>{const _0x5a830c=a154_0x5567b1;OPERATORS_REQUIRING_VALUE[_0x5a830c(0x154)](_0x2082cf[_0x5a830c(0x159)])&&(_0x2082cf[_0x5a830c(0x14d)]===undefined||_0x2082cf[_0x5a830c(0x14d)]===null)&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':'custom','message':_0x5a830c(0x17f)+_0x2082cf['type']+_0x5a830c(0x193),'path':[_0x5a830c(0x14d)]}),_0x2082cf[_0x5a830c(0x159)]===_0x5a830c(0x17d)&&_0x2082cf[_0x5a830c(0x16b)]===undefined&&_0x2082cf[_0x5a830c(0x14a)]===undefined&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':_0x5a830c(0x167),'params':{'validationCode':_0x5a830c(0x14f)}}),OPERATORS_REQUIRING_UNIT[_0x5a830c(0x154)](_0x2082cf[_0x5a830c(0x159)])&&_0x2082cf[_0x5a830c(0x14d)]!==undefined&&!_0x2082cf[_0x5a830c(0x18d)]&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':'Operator\x20\x27'+_0x2082cf[_0x5a830c(0x159)]+_0x5a830c(0x14c),'path':[_0x5a830c(0x18d)],'params':{'validationCode':_0x5a830c(0x180)}}),_0x2082cf[_0x5a830c(0x159)]==='TimeRange'&&(!_0x2082cf[_0x5a830c(0x161)]&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x5a830c(0x161)]}),!_0x2082cf['from']&&_0x4ee9e7['addIssue']({'code':_0x5a830c(0x163),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x5a830c(0x185)]}));});export const ArrayMatchingSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x150)](a154_0x5567b1(0x191)),z[a154_0x5567b1(0x150)](a154_0x5567b1(0x16f)),z['object']({'atLeast':z[a154_0x5567b1(0x16d)]()}),z['object']({'atMost':z[a154_0x5567b1(0x16d)]()}),z['object']({'exactly':z[a154_0x5567b1(0x16d)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a154_0x5567b1(0x159),[z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x15e),'Min',a154_0x5567b1(0x162),a154_0x5567b1(0x194)]),'column':z[a154_0x5567b1(0x164)](),'groupingColumns':z[a154_0x5567b1(0x186)](z[a154_0x5567b1(0x164)]())[a154_0x5567b1(0x173)]()}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)]('Count'),'groupingColumns':z[a154_0x5567b1(0x186)](z['string']())[a154_0x5567b1(0x173)]()}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x188)),'columns':z[a154_0x5567b1(0x186)](z['string']())}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x179),a154_0x5567b1(0x151)]),'column':z['string'](),'orderColumn':z[a154_0x5567b1(0x164)](),'groupingColumns':z[a154_0x5567b1(0x186)](z[a154_0x5567b1(0x164)]())[a154_0x5567b1(0x173)]()})]);export const TimeWindowDefSchema=z[a154_0x5567b1(0x17a)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a154_0x5567b1(0x15d),a154_0x5567b1(0x174),'TimeRange']);export const FilterColumnConditionDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x183)),'column':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5567b1(0x173)]()})[a154_0x5567b1(0x18b)]((_0x3ea409,_0x46f84e)=>{const _0x33df43=a154_0x5567b1,_0x23b286=_0x3ea409['operator'][_0x33df43(0x159)];_0x3ea409[_0x33df43(0x177)]===_0x33df43(0x184)?!TIMESTAMP_OPERATORS[_0x33df43(0x154)](_0x23b286)&&_0x46f84e[_0x33df43(0x14b)]({'code':'custom','message':_0x33df43(0x17e)+_0x23b286+'\x27)','path':['operator',_0x33df43(0x159)]}):TIMESTAMP_OPERATORS[_0x33df43(0x154)](_0x23b286)&&_0x46f84e[_0x33df43(0x14b)]({'code':_0x33df43(0x163),'message':_0x33df43(0x17f)+_0x23b286+_0x33df43(0x18a),'path':[_0x33df43(0x195),_0x33df43(0x159)]});});export const FilterRuleDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x18c)),'conditions':z[a154_0x5567b1(0x186)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x165)),'attribute':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)](),'aggregation':AggregationDefSchema[a154_0x5567b1(0x173)](),'source':z[a154_0x5567b1(0x164)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a154_0x5567b1(0x17a)]({'type':z['literal'](a154_0x5567b1(0x176)),'attribute':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5567b1(0x173)](),'exclude':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)](),'aggregation':AggregationDefSchema[a154_0x5567b1(0x173)](),'source':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)](),'filter':FilterRuleDefSchema[a154_0x5567b1(0x173)](),'timeWindow':TimeWindowDefSchema[a154_0x5567b1(0x173)](),'limit':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x183)),'column':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x18f)](['And','Or']),'conditions':z[a154_0x5567b1(0x186)](ConditionDefSchema),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)]()}));export const SegmentRefConditionDefSchema=z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x16a),a154_0x5567b1(0x171)]),'segment':z[a154_0x5567b1(0x164)]()['min'](0x1,a154_0x5567b1(0x175))});export const ConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x157)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x18c),'Or']),'conditions':z[a154_0x5567b1(0x186)](ConditionDefSchema),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)]()}));export const SegmentDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x155))[a154_0x5567b1(0x173)](),'name':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x16b)](0x1,a154_0x5567b1(0x187)),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)](),'folder':z['string']()[a154_0x5567b1(0x173)](),'rule':RuleDefSchema['optional'](),'kind':z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x15a),a154_0x5567b1(0x158),'funnel_stage'])[a154_0x5567b1(0x173)](),'visible':z['boolean']()[a154_0x5567b1(0x173)](),'activations':z['array'](z[a154_0x5567b1(0x191)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];function a154_0x1ab0(){const _0x53d171=['5147490wpURaJ','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','superRefine','And','unit','hour','enum','lazy','any','Equal','\x27\x20requires\x20a\x20value','Average','operator','5134592kikomt','Contain','max','addIssue','\x27\x20requires\x20a\x20time\x20unit','value','second','MISSING_BETWEEN_BOUNDS','literal','Last','196256yhhvUg','Count','has','segment','GreaterEqual','union','realtime','type','batch','StartWith','TimeRange','TimeWithinPast','Sum','7278649augKdq','Regexp','duration','Max','custom','string','Value','boolean','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','LessEqual','95iFZbmZ','include','min','Less','number','record','all','1058757nHQVqz','exclude','1465136NNrope','optional','TimeWithinNext','Segment\x20reference\x20must\x20not\x20be\x20empty','Behavior','column','Greater','First','object','year','1787130nSAUgk','Between','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Operator\x20\x27','MISSING_TIME_UNIT','EndWith','Min','Column','timestamp','from','array','Segment\x20name\x20is\x20required','CountDistinct'];a154_0x1ab0=function(){return _0x53d171;};return a154_0x1ab0();}void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x1f0cae=a155_0xc548;(function(_0x19d35e,_0x4c2b8b){const _0x4f2767=a155_0xc548,_0x1b1f9a=_0x19d35e();while(!![]){try{const _0x467d79=parseInt(_0x4f2767(0x13c))/0x1*(parseInt(_0x4f2767(0x153))/0x2)+-parseInt(_0x4f2767(0x151))/0x3*(-parseInt(_0x4f2767(0x146))/0x4)+parseInt(_0x4f2767(0x157))/0x5+parseInt(_0x4f2767(0x148))/0x6*(parseInt(_0x4f2767(0x150))/0x7)+-parseInt(_0x4f2767(0x13d))/0x8*(-parseInt(_0x4f2767(0x154))/0x9)+parseInt(_0x4f2767(0x147))/0xa*(-parseInt(_0x4f2767(0x145))/0xb)+-parseInt(_0x4f2767(0x14c))/0xc*(-parseInt(_0x4f2767(0x149))/0xd);if(_0x467d79===_0x4c2b8b)break;else _0x1b1f9a['push'](_0x1b1f9a['shift']());}catch(_0x228c1c){_0x1b1f9a['push'](_0x1b1f9a['shift']());}}}(a155_0x2524,0xc891a));import{readFileSync}from'fs';import*as a155_0x4f0ecf from'path';function a155_0x2524(){const _0x2cb671=['YAML_PARSE_ERROR','skipped','filterType','object','result','1zbqYZs','24pqscha','YAML\x20parse\x20error:\x20','has','campaign','warnings','toJSON','utf-8','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','455257OpMSJn','843956HlUhJx','280RUHWAp','486KWxeet','1978925lFyIFV','basename','not\x20a\x20','24BMSJwq','email','error','journey','28357cdUWzA','3eMvdwW','push','186886sQJoxX','1030437xFHrjY','valid','map','3499370OFJMrZ','type','length'];a155_0x2524=function(){return _0x2cb671;};return a155_0x2524();}import*as a155_0x3b0de2 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a155_0x1f0cae(0x14d),a155_0x1f0cae(0x152)]);export function isJourneyDef(_0xc45819){const _0xcbc1f3=a155_0x1f0cae;return typeof _0xc45819==='object'&&_0xc45819!==null&&_0xcbc1f3(0x158)in _0xc45819&&_0xc45819['type']==='journey';}export function isCampaignDef(_0x2db299){const _0x189f36=a155_0x1f0cae;if(typeof _0x2db299!==_0x189f36(0x13a)||_0x2db299===null)return![];const _0xaac837=_0x2db299,_0x33f058=VALID_CAMPAIGN_TYPES[_0x189f36(0x13f)](_0xaac837['campaign_type']);if(_0xaac837[_0x189f36(0x158)]===_0x189f36(0x140)&&_0x33f058)return!![];if(_0x33f058&&!_0xaac837['type'])return!![];return![];}export function isTemplateDef(_0x378a29){const _0x250002=a155_0x1f0cae;return typeof _0x378a29===_0x250002(0x13a)&&_0x378a29!==null&&_0x250002(0x158)in _0x378a29&&_0x378a29['type']==='template';}export function isValidationResult(_0xa44c3d){const _0x599c14=a155_0x1f0cae;return!(_0x599c14(0x15b)in _0xa44c3d);}export function createParseErrorResult(_0x4a57f4,_0x1eab87,_0x321719,_0x3a2c0f,_0x2d940e='segment'){const _0x21bcc9=a155_0x1f0cae;return{'filePath':_0x4a57f4,'relativePath':_0x1eab87,'source':_0x321719,'result':{'valid':![],'errors':[{'level':_0x21bcc9(0x14e),'path':'','code':_0x21bcc9(0x15a),'message':_0x3a2c0f}],'warnings':[]},'fileType':_0x2d940e};}function a155_0xc548(_0x1b8b02,_0x1dfcb4){_0x1b8b02=_0x1b8b02-0x13a;const _0x25240f=a155_0x2524();let _0xc5486c=_0x25240f[_0x1b8b02];return _0xc5486c;}export function validateYamlFile(_0x44d8b1,_0x4a7c90,_0xdc76cf={}){const _0x27216a=a155_0x1f0cae,_0xb3a903=a155_0x4f0ecf['relative'](_0x4a7c90,_0x44d8b1)||a155_0x4f0ecf[_0x27216a(0x14a)](_0x44d8b1);try{const _0x3946d6=readFileSync(_0x44d8b1,_0x27216a(0x143)),_0x2f31f2=a155_0x3b0de2['parseDocument'](_0x3946d6),_0x15294c=_0x2f31f2[_0x27216a(0x142)]();if(!_0x15294c)return createParseErrorResult(_0x44d8b1,_0xb3a903,_0x3946d6,_0x27216a(0x144));let _0x53a206;if(isJourneyDef(_0x15294c))_0x53a206='journey';else{if(isCampaignDef(_0x15294c))_0x53a206='campaign';else isTemplateDef(_0x15294c)?_0x53a206='template':_0x53a206='segment';}if(_0xdc76cf[_0x27216a(0x15c)]&&_0x53a206!==_0xdc76cf[_0x27216a(0x15c)])return{'filePath':_0x44d8b1,'relativePath':_0xb3a903,'skipped':!![],'reason':_0x27216a(0x14b)+_0xdc76cf[_0x27216a(0x15c)]};const _0x39b678={'source':_0x3946d6,'document':_0x2f31f2};let _0x250901;if(_0x53a206===_0x27216a(0x14f))_0x250901=validateJourneyDef(_0x15294c,_0x39b678);else{if(_0x53a206===_0x27216a(0x140))_0x250901=validateCampaignDef(_0x15294c,_0x39b678);else _0x53a206==='template'?_0x250901=validateTemplateDef(_0x15294c,_0x39b678):_0x250901=validateSegmentDef(_0x15294c,_0x39b678);}return{'filePath':_0x44d8b1,'relativePath':_0xb3a903,'source':_0x3946d6,'result':_0x250901,'fileType':_0x53a206};}catch(_0x845f92){const _0x16f7e3=_0x845f92 instanceof Error?_0x845f92['message']:String(_0x845f92);return createParseErrorResult(_0x44d8b1,_0xb3a903,'',_0x27216a(0x13e)+_0x16f7e3);}}export function validateYamlFiles(_0x150746,_0x5ba9c8,_0x5817f4={}){const _0x28e1e6=a155_0x1f0cae;return _0x150746[_0x28e1e6(0x156)](_0x7fbfb=>validateYamlFile(_0x7fbfb,_0x5ba9c8,_0x5817f4));}export function calculateSummary(_0x4c1b13){const _0x498cf0=a155_0x1f0cae;let _0x1c96c3=0x0,_0x5bc0e6=0x0,_0xea0939=0x0,_0x91b4a7=0x0;for(const _0x3f2355 of _0x4c1b13){if(!isValidationResult(_0x3f2355)){_0x91b4a7++;continue;}_0x3f2355[_0x498cf0(0x13b)][_0x498cf0(0x155)]?_0x1c96c3++:_0x5bc0e6++,_0xea0939+=_0x3f2355[_0x498cf0(0x13b)][_0x498cf0(0x141)][_0x498cf0(0x159)];}return{'validCount':_0x1c96c3,'invalidCount':_0x5bc0e6,'warningCount':_0xea0939,'skippedCount':_0x91b4a7,'hasErrors':_0x5bc0e6>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x471789,_0x5993e9){const _0x5edf1e=a156_0x2809,_0x4d32cf=_0x471789();while(!![]){try{const _0x33cdbf=parseInt(_0x5edf1e(0x190))/0x1+parseInt(_0x5edf1e(0x194))/0x2*(-parseInt(_0x5edf1e(0x199))/0x3)+parseInt(_0x5edf1e(0x186))/0x4+-parseInt(_0x5edf1e(0x180))/0x5+parseInt(_0x5edf1e(0x18e))/0x6+parseInt(_0x5edf1e(0x1a0))/0x7*(-parseInt(_0x5edf1e(0x187))/0x8)+parseInt(_0x5edf1e(0x1a3))/0x9;if(_0x33cdbf===_0x5993e9)break;else _0x4d32cf['push'](_0x4d32cf['shift']());}catch(_0x5a2731){_0x4d32cf['push'](_0x4d32cf['shift']());}}}(a156_0x2115,0xe342d));import*as a156_0x462c16 from'yaml';import a156_0x5e692f from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x2a5140,_0x687d40,_0x1d5a05){const _0x47401c=a156_0x2809;if(!_0x2a5140||!_0x687d40)return undefined;try{let _0x38d034=_0x2a5140[_0x47401c(0x197)](_0x1d5a05,!![]),_0x2c6e9a=[..._0x1d5a05];while((!_0x38d034||typeof _0x38d034!==_0x47401c(0x18f)||!(_0x47401c(0x18c)in _0x38d034)||!_0x38d034['range'])&&_0x2c6e9a[_0x47401c(0x18b)]>0x0){_0x2c6e9a[_0x47401c(0x198)](),_0x38d034=_0x2c6e9a[_0x47401c(0x18b)]>0x0?_0x2a5140['getIn'](_0x2c6e9a,!![]):_0x2a5140[_0x47401c(0x192)];}if(!_0x38d034||typeof _0x38d034!==_0x47401c(0x18f)||!(_0x47401c(0x18c)in _0x38d034)||!_0x38d034['range'])return undefined;const [_0x45dbd0]=_0x38d034['range'];return offsetToLocation(_0x687d40,_0x45dbd0);}catch{return undefined;}}function a156_0x2115(){const _0x18b4a7=['length','range','cyan','2352228LIzTHP','object','338619OaBkNg','dim','contents','toString','1169468TUPqeq','\x27:\x20','red','getIn','pop','9OsorBR','level','data','warnings','repeat','message','max','11522798Pviklh','min','match','48577203ixUFfJ','split','\x20|\x20','issues','number','padStart','column','location','path','join','error','9283760XVtddO','Invalid\x20YAML:\x20expected\x20an\x20object','errors','push','code','invalid_union','239220BlNkBX','8UTExrQ','parse','YAML\x20validation\x20error\x20at\x20\x27','yellow'];a156_0x2115=function(){return _0x18b4a7;};return a156_0x2115();}export function offsetToLocation(_0x1f51d1,_0x39b033){const _0x4ab8fb=a156_0x2809;let _0x183181=0x1,_0x497194=0x1;for(let _0x40996c=0x0;_0x40996c<_0x39b033&&_0x40996c<_0x1f51d1[_0x4ab8fb(0x18b)];_0x40996c++){_0x1f51d1[_0x40996c]==='\x0a'?(_0x183181++,_0x497194=0x1):_0x497194++;}return{'line':_0x183181,'column':_0x497194,'offset':_0x39b033};}export function pathToArray(_0x21d947){const _0x4f14f9=a156_0x2809;if(!_0x21d947)return[];return _0x21d947[_0x4f14f9(0x1a4)]('.')['flatMap'](_0x1079d8=>{const _0x1740a8=_0x4f14f9,_0x3533da=_0x1079d8[_0x1740a8(0x1a2)](/^(\w+)\[(\d+)\]$/);if(_0x3533da)return[_0x3533da[0x1],parseInt(_0x3533da[0x2],0xa)];return[_0x1079d8];});}export function formatZodPath(_0x24c224){const _0x5b2068=a156_0x2809;let _0x441ad0='';for(const _0x288145 of _0x24c224){if(typeof _0x288145===_0x5b2068(0x1a7))_0x441ad0+='['+_0x288145+']';else{const _0x4b83e9=String(_0x288145);_0x441ad0+=_0x441ad0?'.'+_0x4b83e9:_0x4b83e9;}}return _0x441ad0;}function a156_0x2809(_0x27b528,_0x3a0750){_0x27b528=_0x27b528-0x17a;const _0x21152c=a156_0x2115();let _0x2809c8=_0x21152c[_0x27b528];return _0x2809c8;}export function flattenZodIssues(_0x4cfb94){const _0x241c1b=a156_0x2809,_0x4f4c3a=[];for(const _0x2abd2b of _0x4cfb94){if(_0x2abd2b[_0x241c1b(0x184)]===_0x241c1b(0x185)&&'errors'in _0x2abd2b){const _0x1ad862=_0x2abd2b[_0x241c1b(0x182)];let _0x1c893e=_0x1ad862[0x0]||[];for(const _0x506ff3 of _0x1ad862){_0x506ff3[_0x241c1b(0x18b)]<_0x1c893e[_0x241c1b(0x18b)]&&(_0x1c893e=_0x506ff3);}const _0x8cd57f=_0x1c893e['map'](_0x59e3e9=>({..._0x59e3e9,'path':[..._0x2abd2b['path'],..._0x59e3e9['path']]}));_0x4f4c3a[_0x241c1b(0x183)](...flattenZodIssues(_0x8cd57f));}else _0x4f4c3a[_0x241c1b(0x183)](_0x2abd2b);}return _0x4f4c3a;}export function safeParseYaml(_0x455a91,_0x36a69b){const _0x40a741=a156_0x2809,_0x54a3e1=a156_0x462c16[_0x40a741(0x188)](_0x455a91);if(!_0x54a3e1||typeof _0x54a3e1!=='object')throw new Error(_0x40a741(0x181));const _0x49951a=_0x36a69b['safeParse'](_0x54a3e1);if(!_0x49951a['success']){const _0x2e5850=_0x49951a[_0x40a741(0x17f)][_0x40a741(0x1a6)][0x0],_0x524d3b=formatZodPath(_0x2e5850[_0x40a741(0x17d)]);throw new Error(_0x524d3b?_0x40a741(0x189)+_0x524d3b+_0x40a741(0x195)+_0x2e5850[_0x40a741(0x19e)]:'YAML\x20validation\x20error:\x20'+_0x2e5850[_0x40a741(0x19e)]);}return _0x49951a[_0x40a741(0x19b)];}export function formatIssueWithContext(_0x429a1f,_0x59f570,_0x5ea72e){const _0x145092=a156_0x2809,_0x2d44af=[],_0x157eb8=_0x429a1f[_0x145092(0x19a)]===_0x145092(0x17f),_0x745ef4=_0x157eb8?a156_0x5e692f[_0x145092(0x196)]:a156_0x5e692f[_0x145092(0x18a)],_0x8fc539=_0x157eb8?a156_0x5e692f[_0x145092(0x196)]:a156_0x5e692f['yellow'],_0x1676a2=_0x5ea72e?a156_0x5e692f[_0x145092(0x18d)](_0x5ea72e+':'):'';if(_0x429a1f['location']){const _0x33d5b4=a156_0x5e692f[_0x145092(0x18d)](_0x429a1f[_0x145092(0x17c)]['line']+':'+_0x429a1f[_0x145092(0x17c)][_0x145092(0x17b)]);_0x2d44af[_0x145092(0x183)](''+_0x1676a2+_0x33d5b4+':\x20'+_0x745ef4(_0x429a1f[_0x145092(0x19a)])+'\x20'+_0x8fc539('['+_0x429a1f['code']+']'));}else _0x2d44af['push'](''+_0x1676a2+a156_0x5e692f[_0x145092(0x191)](_0x429a1f['path'])+':\x20'+_0x745ef4(_0x429a1f[_0x145092(0x19a)])+'\x20'+_0x8fc539('['+_0x429a1f[_0x145092(0x184)]+']'));_0x2d44af[_0x145092(0x183)](_0x429a1f[_0x145092(0x19e)]);if(_0x429a1f[_0x145092(0x17c)]&&_0x59f570){const _0x17a185=_0x59f570[_0x145092(0x1a4)]('\x0a'),{line:_0x2bfba6,column:_0x1ac33f}=_0x429a1f[_0x145092(0x17c)],_0x1e54bc=Math[_0x145092(0x19f)](0x1,_0x2bfba6-0x1),_0x3e8f77=Math[_0x145092(0x1a1)](_0x17a185[_0x145092(0x18b)],_0x2bfba6+0x1);_0x2d44af[_0x145092(0x183)]('');for(let _0x34dc1f=_0x1e54bc;_0x34dc1f<=_0x3e8f77;_0x34dc1f++){const _0x6d4737=_0x17a185[_0x34dc1f-0x1]||'',_0x1acc72=a156_0x5e692f['dim'](_0x34dc1f[_0x145092(0x193)]()[_0x145092(0x17a)](0x4)),_0x3e796c=a156_0x5e692f[_0x145092(0x191)](_0x145092(0x1a5));if(_0x34dc1f===_0x2bfba6){_0x2d44af['push']('\x20\x20'+_0x1acc72+_0x3e796c+_0x745ef4(_0x6d4737));const _0xcaef55='\x20'[_0x145092(0x19d)](0x4+0x3+_0x1ac33f-0x1);_0x2d44af[_0x145092(0x183)]('\x20\x20'+_0xcaef55+_0x745ef4('^'));}else _0x2d44af[_0x145092(0x183)]('\x20\x20'+_0x1acc72+_0x3e796c+a156_0x5e692f['dim'](_0x6d4737));}}return _0x2d44af[_0x145092(0x17e)]('\x0a');}export function formatValidationResult(_0x28b46d,_0x4d58a4,_0x2a690a){const _0x464f94=a156_0x2809,_0x54d9f2=[];for(const _0x542c8b of _0x28b46d[_0x464f94(0x182)]){_0x54d9f2['push'](formatIssueWithContext(_0x542c8b,_0x4d58a4,_0x2a690a)),_0x54d9f2[_0x464f94(0x183)]('');}for(const _0x261340 of _0x28b46d[_0x464f94(0x19c)]){_0x54d9f2['push'](formatIssueWithContext(_0x261340,_0x4d58a4,_0x2a690a)),_0x54d9f2['push']('');}return _0x54d9f2[_0x464f94(0x17e)]('\x0a');}
|