@treasuredata/tdx 2026.3.4 → 2026.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/auth-login-command.d.ts +29 -0
- package/dist/commands/auth-login-command.d.ts.map +1 -0
- package/dist/commands/auth-login-command.js +1 -0
- package/dist/commands/auth-login-command.js.map +1 -0
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.d.ts.map +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/mcp-command.js.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.d.ts.map +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/status-command.js.map +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.d.ts +11 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/constants.js.map +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.d.ts +32 -0
- package/dist/core/oauth-keychain.d.ts.map +1 -0
- package/dist/core/oauth-keychain.js +1 -0
- package/dist/core/oauth-keychain.js.map +1 -0
- package/dist/core/oauth.d.ts +112 -0
- package/dist/core/oauth.d.ts.map +1 -0
- package/dist/core/oauth.js +1 -0
- package/dist/core/oauth.js.map +1 -0
- 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/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +16 -0
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -0
- package/dist/sdk/client/oauth-refresh.js +1 -0
- package/dist/sdk/client/oauth-refresh.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5b9ba2,_0x32d9f3){const _0x471017=a144_0x39fa,_0x145101=_0x5b9ba2();while(!![]){try{const _0xd4378f=-parseInt(_0x471017(0x215))/0x1+-parseInt(_0x471017(0x1ee))/0x2+parseInt(_0x471017(0x208))/0x3+-parseInt(_0x471017(0x1dd))/0x4*(-parseInt(_0x471017(0x1de))/0x5)+parseInt(_0x471017(0x1fe))/0x6*(parseInt(_0x471017(0x1df))/0x7)+parseInt(_0x471017(0x209))/0x8+parseInt(_0x471017(0x20a))/0x9*(-parseInt(_0x471017(0x1d4))/0xa);if(_0xd4378f===_0x32d9f3)break;else _0x145101['push'](_0x145101['shift']());}catch(_0x3a7d41){_0x145101['push'](_0x145101['shift']());}}}(a144_0x5d4e,0x73360));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a144_0x39fa(_0x1d30ff,_0x9170b1){_0x1d30ff=_0x1d30ff-0x1d4;const _0x5d4eee=a144_0x5d4e();let _0x39fac9=_0x5d4eee[_0x1d30ff];return _0x39fac9;}export function validateSegmentDef(_0x2c9553,_0x348fe1={},_0x5e9d76={}){const _0x210a59=a144_0x39fa;if(_0x5e9d76['skipSchema'])return runSemanticChecks(_0x2c9553,_0x348fe1);const _0x40b4e1=SegmentDefSchema[_0x210a59(0x1e1)](_0x2c9553);if(_0x40b4e1[_0x210a59(0x204)])return runSemanticChecks(_0x40b4e1[_0x210a59(0x218)],_0x348fe1);return zodErrorsToValidationResult(_0x40b4e1[_0x210a59(0x1f1)],_0x348fe1);}export function validateRuleDef(_0x4c7b92,_0x87627f,_0x2ddcd3){const _0x5945a9=a144_0x39fa;if(!_0x4c7b92)return[];const _0xd5ef05=RuleDefSchema[_0x5945a9(0x1e1)](_0x4c7b92);if(_0xd5ef05['success'])return checkRule(_0xd5ef05[_0x5945a9(0x218)],_0x87627f,_0x2ddcd3);const _0x451450=flattenZodIssues(_0xd5ef05[_0x5945a9(0x1f1)]['issues']);return _0x451450['map'](_0x1bb095=>{const _0x5d7eb5=_0x5945a9,_0x3a3a84=formatZodPath(_0x1bb095[_0x5d7eb5(0x200)]),_0x3751ae=_0x3a3a84?_0x87627f+'.'+_0x3a3a84:_0x87627f,_0x2a9247=mapZodIssueToCode(_0x1bb095,_0x3a3a84),_0x52f2b0=getLocationFromPath(_0x2ddcd3['document'],_0x2ddcd3[_0x5d7eb5(0x1e3)],pathToArray(_0x3751ae));return{'level':_0x5d7eb5(0x1f1),'path':_0x3751ae,'code':_0x2a9247,'message':_0x1bb095[_0x5d7eb5(0x1f0)],..._0x52f2b0&&{'location':_0x52f2b0}};});}function zodErrorsToValidationResult(_0x5761e6,_0x5dec95){const _0x31f46d=a144_0x39fa,_0x29cbc7=flattenZodIssues(_0x5761e6[_0x31f46d(0x1e2)]),_0x16e94b=_0x29cbc7[_0x31f46d(0x1ec)](_0xdb91ed=>{const _0x47c6f4=_0x31f46d,_0xc7682a=formatZodPath(_0xdb91ed['path']),_0x5800a8=mapZodIssueToCode(_0xdb91ed,_0xc7682a),_0x54e254=getLocationFromPath(_0x5dec95[_0x47c6f4(0x1fd)],_0x5dec95[_0x47c6f4(0x1e3)],_0xdb91ed[_0x47c6f4(0x200)][_0x47c6f4(0x1ec)](_0x3a4cbe=>typeof _0x3a4cbe===_0x47c6f4(0x1fc)?String(_0x3a4cbe):_0x3a4cbe));return{'level':_0x47c6f4(0x1f1),'path':_0xc7682a,'code':_0x5800a8,'message':_0xdb91ed[_0x47c6f4(0x1f0)],..._0x54e254&&{'location':_0x54e254}};});return{'valid':![],'errors':_0x16e94b,'warnings':[]};}function a144_0x5d4e(){const _0x3691d8=['endsWith','BEHAVIOR_SOURCE_MISSING_FILTER','MISSING_BETWEEN_BOUNDS','params','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','.filter','aggregation','\x27\x20with\x20attribute\x20\x27','675612QkSrbs','conditions','rule.type','data','arrayMatching','.conditions','523310tGYKhk','MISSING_OPERATOR_VALUE','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','.segment','SEGMENT_SCHEMA_ERROR','And','type','INVALID_ARRAY_MATCHING','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','2188lKcwvd','6090UcXigf','49GwezRl','push','safeParse','issues','source','MISSING_SEGMENT_REFERENCE','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','Behavior\x20source\x20\x27','rule','MISSING_NAME','Attribute\x20\x27','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','map','INVALID_OPERATOR_TYPE','135018BvwhJv','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','message','error','.attribute','length','attribute','includes','warning','filter','MISSING_CONDITIONS','level','Behavior','.source','symbol','document','403710orKNug','code','path','EMPTY_ATTRIBUTE','match','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','success','Attribute\x20name\x20cannot\x20be\x20empty','Value','validationCode','2828103ScshyQ','3128216ZcjFiW','216beKKDi','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','.operator.type'];a144_0x5d4e=function(){return _0x3691d8;};return a144_0x5d4e();}function mapZodIssueToCode(_0x537780,_0x44736e){const _0x351b09=a144_0x39fa,_0x5b06f0=_0x537780['code']==='custom'?_0x537780[_0x351b09(0x210)]:undefined;if(_0x44736e==='name')return _0x351b09(0x1e9);if(_0x44736e===_0x351b09(0x217)||_0x44736e['endsWith']('.type')){if(_0x537780[_0x351b09(0x1ff)]==='invalid_value'){if(_0x44736e===_0x351b09(0x217)||_0x44736e[_0x351b09(0x202)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x44736e[_0x351b09(0x20d)](_0x351b09(0x20c)))return _0x351b09(0x1ed);if(_0x44736e['endsWith']('.operator.value'))return _0x351b09(0x1d5);if(_0x5b06f0?.[_0x351b09(0x207)]===_0x351b09(0x20f))return _0x351b09(0x20f);if(_0x5b06f0?.[_0x351b09(0x207)]==='MISSING_TIME_UNIT')return'MISSING_TIME_UNIT';if(_0x44736e[_0x351b09(0x20d)](_0x351b09(0x21a))||_0x44736e===_0x351b09(0x216))return _0x351b09(0x1f8);if(_0x44736e[_0x351b09(0x1f5)](_0x351b09(0x219)))return _0x351b09(0x1db);if(_0x44736e[_0x351b09(0x20d)](_0x351b09(0x1d7)))return _0x351b09(0x1e4);return _0x351b09(0x1d8);}function runSemanticChecks(_0x104b7a,_0xe3cb55){const _0x257d96=a144_0x39fa,_0x5162d6=[];_0x104b7a[_0x257d96(0x1e8)]&&_0x5162d6[_0x257d96(0x1e0)](...checkRule(_0x104b7a['rule'],_0x257d96(0x1e8),_0xe3cb55));const _0x5baa92=_0x5162d6[_0x257d96(0x1f7)](_0x5d259a=>_0x5d259a[_0x257d96(0x1f9)]===_0x257d96(0x1f1)),_0x491efa=_0x5162d6[_0x257d96(0x1f7)](_0xb5e51b=>_0xb5e51b['level']===_0x257d96(0x1f6));return{'valid':_0x5baa92['length']===0x0,'errors':_0x5baa92,'warnings':_0x491efa};}function checkRule(_0x5f2a8a,_0x1df896,_0x1925ac){const _0x57771f=a144_0x39fa,_0x29f058=[];if(_0x5f2a8a[_0x57771f(0x216)][_0x57771f(0x1f3)]===0x0)return _0x29f058[_0x57771f(0x1e0)]({'level':_0x57771f(0x1f1),'path':_0x1df896+_0x57771f(0x21a),'code':'EMPTY_CONDITIONS','message':_0x57771f(0x1eb),'location':getLocationFromPath(_0x1925ac[_0x57771f(0x1fd)],_0x1925ac[_0x57771f(0x1e3)],pathToArray(_0x1df896+'.conditions'))}),_0x29f058;return _0x29f058['push'](...checkConditions(_0x5f2a8a[_0x57771f(0x216)],_0x1df896,_0x1925ac)),_0x29f058;}function checkConditions(_0x323d94,_0x293073,_0x40e9e4){const _0x4cb389=a144_0x39fa,_0x339502=[];for(let _0x2d51c7=0x0;_0x2d51c7<_0x323d94[_0x4cb389(0x1f3)];_0x2d51c7++){const _0x544f20=_0x323d94[_0x2d51c7],_0x293d0f=_0x293073+'.conditions['+_0x2d51c7+']';_0x339502['push'](...checkCondition(_0x544f20,_0x293d0f,_0x40e9e4));}return _0x339502;}function checkCondition(_0x3ca7d9,_0x47fdee,_0x39a942){const _0xba2dc0=a144_0x39fa,_0x149f50=[];if(_0x3ca7d9[_0xba2dc0(0x1da)]===_0xba2dc0(0x1d9)||_0x3ca7d9['type']==='Or')return _0x3ca7d9[_0xba2dc0(0x216)][_0xba2dc0(0x1f3)]===0x0?_0x149f50[_0xba2dc0(0x1e0)]({'level':'error','path':_0x47fdee+_0xba2dc0(0x21a),'code':'EMPTY_CONDITIONS','message':_0x3ca7d9['type']+_0xba2dc0(0x1d6),'location':getLocationFromPath(_0x39a942[_0xba2dc0(0x1fd)],_0x39a942[_0xba2dc0(0x1e3)],pathToArray(_0x47fdee+_0xba2dc0(0x21a)))}):_0x149f50[_0xba2dc0(0x1e0)]({'level':'error','path':_0x47fdee,'code':'NESTED_CONDITION_GROUP','message':_0x3ca7d9[_0xba2dc0(0x1da)]+_0xba2dc0(0x203)+'groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20'+_0xba2dc0(0x20b),'location':getLocationFromPath(_0x39a942[_0xba2dc0(0x1fd)],_0x39a942[_0xba2dc0(0x1e3)],pathToArray(_0x47fdee))}),_0x149f50;if(_0x3ca7d9['type']===_0xba2dc0(0x206)||_0x3ca7d9[_0xba2dc0(0x1da)]===_0xba2dc0(0x1fa)){const _0x5d8caa=_0x3ca7d9,_0x3ab26a=_0x5d8caa['source'],_0x40d0ef=_0x5d8caa[_0xba2dc0(0x213)],_0x339ea2=_0x3ab26a||_0x40d0ef;(!_0x5d8caa[_0xba2dc0(0x1f4)]||_0x5d8caa[_0xba2dc0(0x1f4)]==='')&&(!_0x339ea2&&_0x149f50[_0xba2dc0(0x1e0)]({'level':_0xba2dc0(0x1f1),'path':_0x47fdee+_0xba2dc0(0x1f2),'code':_0xba2dc0(0x201),'message':_0xba2dc0(0x205),'location':getLocationFromPath(_0x39a942[_0xba2dc0(0x1fd)],_0x39a942['source'],pathToArray(_0x47fdee+_0xba2dc0(0x1f2)))}));_0x5d8caa[_0xba2dc0(0x1f7)]&&_0x149f50[_0xba2dc0(0x1e0)](...checkRule(_0x5d8caa[_0xba2dc0(0x1f7)],_0x47fdee+_0xba2dc0(0x212),_0x39a942));if(_0x5d8caa[_0xba2dc0(0x1e3)]){const _0x4b48ef=_0x5d8caa[_0xba2dc0(0x1f4)]&&_0x5d8caa[_0xba2dc0(0x1f4)]!=='';_0x4b48ef&&!_0x5d8caa[_0xba2dc0(0x1f7)]&&_0x149f50[_0xba2dc0(0x1e0)]({'level':_0xba2dc0(0x1f1),'path':_0x47fdee+'.source','code':_0xba2dc0(0x20e),'message':_0xba2dc0(0x1e7)+_0x5d8caa[_0xba2dc0(0x1e3)]+_0xba2dc0(0x214)+_0x5d8caa['attribute']+'\x27\x20'+_0xba2dc0(0x1dc)+_0xba2dc0(0x1e6)+_0xba2dc0(0x211),'location':getLocationFromPath(_0x39a942[_0xba2dc0(0x1fd)],_0x39a942[_0xba2dc0(0x1e3)],pathToArray(_0x47fdee+_0xba2dc0(0x1fb)))}),_0x4b48ef&&_0x5d8caa[_0xba2dc0(0x1f7)]&&_0x149f50['push']({'level':_0xba2dc0(0x1f6),'path':_0x47fdee+'.attribute','code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0xba2dc0(0x1ea)+_0x5d8caa[_0xba2dc0(0x1f4)]+_0xba2dc0(0x1e5)+_0xba2dc0(0x1ef),'location':getLocationFromPath(_0x39a942[_0xba2dc0(0x1fd)],_0x39a942[_0xba2dc0(0x1e3)],pathToArray(_0x47fdee+_0xba2dc0(0x1f2)))});}}return _0x149f50;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34b33f,_0x22d6a0){const _0x22b380=a145_0x53f1,_0x4354b6=_0x34b33f();while(!![]){try{const _0x54a4ad=-parseInt(_0x22b380(0x186))/0x1+parseInt(_0x22b380(0x163))/0x2+parseInt(_0x22b380(0x184))/0x3*(-parseInt(_0x22b380(0x169))/0x4)+parseInt(_0x22b380(0x180))/0x5*(-parseInt(_0x22b380(0x185))/0x6)+-parseInt(_0x22b380(0x15c))/0x7+-parseInt(_0x22b380(0x15e))/0x8*(parseInt(_0x22b380(0x16a))/0x9)+parseInt(_0x22b380(0x16f))/0xa*(parseInt(_0x22b380(0x172))/0xb);if(_0x54a4ad===_0x22d6a0)break;else _0x4354b6['push'](_0x4354b6['shift']());}catch(_0x456e9c){_0x4354b6['push'](_0x4354b6['shift']());}}}(a145_0x22cb,0x88313));import a145_0x55d8d5 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(_0x2999f4){const _0x5b8446=a145_0x53f1;return _0x2999f4['type']!==_0x5b8446(0x156);}export function isScopedResolution(_0x364174){const _0x5a6042=a145_0x53f1;return _0x364174['type']===_0x5a6042(0x159)||_0x364174[_0x5a6042(0x175)]===_0x5a6042(0x168)||_0x364174[_0x5a6042(0x175)]===_0x5a6042(0x16d);}function a145_0x53f1(_0x3541e9,_0x1d6614){_0x3541e9=_0x3541e9-0x154;const _0x22cb04=a145_0x22cb();let _0x53f1bf=_0x22cb04[_0x3541e9];return _0x53f1bf;}export function getScopedDetails(_0x120e1d){if(isScopedResolution(_0x120e1d))return{'isScoped':_0x120e1d['isScoped'],'scopedFolderPath':_0x120e1d['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x55187b,_0x3951d8){const _0x5a5ca4=a145_0x53f1;let _0xc7461f=a145_0x55d8d5[_0x5a5ca4(0x17b)](_0x55187b);const _0x49715f=a145_0x55d8d5[_0x5a5ca4(0x155)](_0xc7461f)[_0x5a5ca4(0x15f)];while(_0xc7461f!==_0x49715f){const _0x189f81=a145_0x55d8d5[_0x5a5ca4(0x173)](_0xc7461f,_0x5a5ca4(0x15d));if(await _0x3951d8['exists'](_0x189f81))try{const _0x55f75f=await _0x3951d8[_0x5a5ca4(0x174)](_0x189f81),_0x1e7371=JSON['parse'](_0x55f75f);if(_0x1e7371[_0x5a5ca4(0x164)]&&typeof _0x1e7371[_0x5a5ca4(0x164)]==='string')return{'configPath':_0x189f81,'configDir':_0xc7461f,'parentSegment':_0x1e7371['parent_segment']};}catch{}_0xc7461f=a145_0x55d8d5[_0x5a5ca4(0x17c)](_0xc7461f);}return null;}function calculateScopedPath(_0x3997a2,_0x38639){const _0x1b4d1a=a145_0x53f1,_0x21bcdc=a145_0x55d8d5[_0x1b4d1a(0x16e)](_0x38639,_0x3997a2),_0x465893=_0x21bcdc!==''&&_0x21bcdc!=='.'&&!_0x21bcdc[_0x1b4d1a(0x183)]('..');return{'isScoped':_0x465893,'scopedFolderPath':_0x465893?_0x21bcdc[_0x1b4d1a(0x16c)](/\\/g,'/'):''};}export async function resolveTarget(_0x5a991b){const _0x12ea13=a145_0x53f1,{arg:_0x4dd227,contextParent:_0x358e03,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x5a991b;if(_0x4dd227&&isYamlFilePath(_0x4dd227))try{const _0x261bd2=await resolveYamlFilePath(_0x4dd227,fs),_0x1b31c4=a145_0x55d8d5[_0x12ea13(0x17b)](_0x4dd227),_0x20aa8b=a145_0x55d8d5[_0x12ea13(0x17c)](_0x1b31c4),_0x20d803=await findTdxConfigAsync(_0x20aa8b,fs);if(!_0x20d803){if(_0x358e03){const _0x47c842=a145_0x55d8d5[_0x12ea13(0x17c)](_0x1b31c4);return{'type':_0x12ea13(0x168),'parentName':_0x358e03,'targetDir':_0x47c842,'configRoot':_0x47c842,'filePath':_0x1b31c4,'resourceName':_0x261bd2['segmentName'],'folderPath':_0x261bd2[_0x12ea13(0x181)],'resourceType':_0x261bd2[_0x12ea13(0x16b)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x12ea13(0x156),'errorCode':_0x12ea13(0x178),'message':_0x12ea13(0x171)+_0x4dd227,'arg':_0x4dd227,'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 _0x5b023b=calculateScopedPath(_0x20aa8b,_0x20d803[_0x12ea13(0x179)]);return{'type':'file','parentName':_0x20d803[_0x12ea13(0x182)],'targetDir':_0x20d803[_0x12ea13(0x179)],'configRoot':_0x20d803[_0x12ea13(0x179)],'filePath':_0x1b31c4,'resourceName':_0x261bd2[_0x12ea13(0x15b)],'folderPath':_0x261bd2[_0x12ea13(0x181)],'resourceType':_0x261bd2[_0x12ea13(0x16b)],'isScoped':_0x5b023b[_0x12ea13(0x17d)],'scopedFolderPath':_0x5b023b[_0x12ea13(0x166)]};}catch(_0x529259){const _0x3a7f6b=_0x529259 instanceof Error?_0x529259[_0x12ea13(0x161)]:String(_0x529259);if(_0x3a7f6b[_0x12ea13(0x160)](_0x12ea13(0x17f)))return{'type':_0x12ea13(0x156),'errorCode':_0x12ea13(0x189),'message':_0x12ea13(0x167)+_0x4dd227,'arg':_0x4dd227};if(_0x3a7f6b[_0x12ea13(0x160)]('No\x20tdx.json\x20found')){if(_0x358e03){const _0x3620d0=a145_0x55d8d5[_0x12ea13(0x17b)](_0x4dd227);if(await fs['exists'](_0x3620d0)){const _0x53a574=a145_0x55d8d5[_0x12ea13(0x17c)](_0x3620d0),_0xa79da1=await fs[_0x12ea13(0x174)](_0x3620d0),_0x2893f0=_0xa79da1[_0x12ea13(0x158)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x283df2=_0xa79da1[_0x12ea13(0x158)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x202f53=_0x2893f0?_0x2893f0[0x1]['trim']():a145_0x55d8d5[_0x12ea13(0x176)](_0x4dd227,a145_0x55d8d5['extname'](_0x4dd227)),_0x136f8c=_0x283df2&&_0x283df2[0x1][_0x12ea13(0x162)]()===_0x12ea13(0x18a)?'journey':'segment';return{'type':_0x12ea13(0x168),'parentName':_0x358e03,'targetDir':_0x53a574,'configRoot':_0x53a574,'filePath':_0x3620d0,'resourceName':_0x202f53,'folderPath':'','resourceType':_0x136f8c,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x12ea13(0x178),'message':_0x12ea13(0x171)+_0x4dd227,'arg':_0x4dd227,'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':_0x12ea13(0x156),'errorCode':'invalid_yaml','message':_0x3a7f6b,'arg':_0x4dd227};}if(_0x4dd227){const _0x22c2e3=a145_0x55d8d5[_0x12ea13(0x17b)](cwd,_0x4dd227);let _0x20a147=null;try{_0x20a147=await fs[_0x12ea13(0x15a)](_0x22c2e3);}catch{}if(_0x20a147?.[_0x12ea13(0x17a)]()){const _0x2c3eb4=await findTdxConfigAsync(_0x22c2e3,fs);if(_0x2c3eb4){const _0x22fd5b=calculateScopedPath(_0x22c2e3,_0x2c3eb4[_0x12ea13(0x179)]);return{'type':_0x12ea13(0x159),'parentName':_0x2c3eb4[_0x12ea13(0x182)],'targetDir':_0x22c2e3,'configRoot':_0x2c3eb4[_0x12ea13(0x179)],'isScoped':_0x22fd5b[_0x12ea13(0x17d)],'scopedFolderPath':_0x22fd5b[_0x12ea13(0x166)]};}if(_0x358e03)return{'type':'directory','parentName':_0x358e03,'targetDir':_0x22c2e3,'configRoot':_0x22c2e3,'isScoped':![],'scopedFolderPath':''};return{'type':_0x12ea13(0x156),'errorCode':_0x12ea13(0x178),'message':_0x12ea13(0x157)+_0x4dd227,'arg':_0x4dd227,'helpText':_0x12ea13(0x170)};}if(_0x20a147?.['isFile']())return{'type':_0x12ea13(0x156),'errorCode':'invalid_yaml','message':_0x12ea13(0x188)+_0x4dd227,'arg':_0x4dd227,'helpText':_0x12ea13(0x154)};const _0x316975=sanitizeFileName(_0x4dd227),_0x3f2bb4=getSegmentRootDir(_0x316975,cwd);return{'type':_0x12ea13(0x177),'parentName':_0x4dd227,'targetDir':_0x3f2bb4,'configRoot':_0x3f2bb4};}const _0x4df6a1=await findTdxConfigAsync(cwd,fs);if(_0x4df6a1){const _0x9fdae9=calculateScopedPath(cwd,_0x4df6a1[_0x12ea13(0x179)]);return{'type':'context','parentName':_0x4df6a1[_0x12ea13(0x182)],'targetDir':cwd,'configRoot':_0x4df6a1[_0x12ea13(0x179)],'isScoped':_0x9fdae9['isScoped'],'scopedFolderPath':_0x9fdae9['scopedFolderPath']};}if(_0x358e03){const _0x52ab19=sanitizeFileName(_0x358e03),_0x48b96b=getSegmentRootDir(_0x52ab19,cwd);return{'type':'context','parentName':_0x358e03,'targetDir':_0x48b96b,'configRoot':_0x48b96b,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x12ea13(0x156),'errorCode':_0x12ea13(0x17e),'message':_0x12ea13(0x187),'helpText':_0x12ea13(0x165)};}function a145_0x22cb(){const _0x2d7bc8=['file_not_found','journey','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','parse','error','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','match','directory','stat','segmentName','6778562MAOCMM','tdx.json','4552wfwptB','root','includes','message','trim','1774190cCYfdQ','parent_segment','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','scopedFolderPath','File\x20not\x20found:\x20','file','1121132TTWvLx','10737BAkdQj','resourceType','replace','context','relative','69690YEMcuS','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','No\x20tdx.json\x20found\x20for\x20file:\x20','5489xHzBNQ','join','readFile','type','basename','parent_name','no_config','configDir','isDirectory','resolve','dirname','isScoped','no_parent','File\x20not\x20found','5pqWAGK','folderPath','parentSegment','startsWith','9dBHFws','6628590VldCFy','213986YmZIMo','Parent\x20segment\x20not\x20specified','Not\x20a\x20YAML\x20file:\x20'];a145_0x22cb=function(){return _0x2d7bc8;};return a145_0x22cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x290390=a146_0x1d42;(function(_0x32ae06,_0x5638c9){const _0x25d74d=a146_0x1d42,_0x4bf358=_0x32ae06();while(!![]){try{const _0x224316=parseInt(_0x25d74d(0x188))/0x1*(parseInt(_0x25d74d(0x187))/0x2)+parseInt(_0x25d74d(0x17e))/0x3+-parseInt(_0x25d74d(0x182))/0x4*(-parseInt(_0x25d74d(0x184))/0x5)+parseInt(_0x25d74d(0x18b))/0x6*(parseInt(_0x25d74d(0x185))/0x7)+parseInt(_0x25d74d(0x17d))/0x8*(-parseInt(_0x25d74d(0x189))/0x9)+parseInt(_0x25d74d(0x193))/0xa+parseInt(_0x25d74d(0x179))/0xb*(-parseInt(_0x25d74d(0x17a))/0xc);if(_0x224316===_0x5638c9)break;else _0x4bf358['push'](_0x4bf358['shift']());}catch(_0x3c5903){_0x4bf358['push'](_0x4bf358['shift']());}}}(a146_0x21ed,0x85f2f));import{existsSync,readFileSync}from'fs';import a146_0x544319 from'path';function a146_0x1d42(_0x1b7b0a,_0x586ab9){_0x1b7b0a=_0x1b7b0a-0x178;const _0x21ed9e=a146_0x21ed();let _0x1d4296=_0x21ed9e[_0x1b7b0a];return _0x1d4296;}const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a146_0x290390(0x18e);export function findTdxConfigPath(_0x2964e4=process['cwd']()){const _0x4beb08=a146_0x290390;let _0x55a326=a146_0x544319['resolve'](_0x2964e4);const _0x8a396a=a146_0x544319['parse'](_0x55a326)[_0x4beb08(0x186)];while(_0x55a326!==_0x8a396a){const _0x25b2e5=a146_0x544319[_0x4beb08(0x183)](_0x55a326,TDX_CONFIG_FILE);if(existsSync(_0x25b2e5))return _0x25b2e5;_0x55a326=a146_0x544319[_0x4beb08(0x17c)](_0x55a326);}return null;}export function loadTdxConfig(_0x52c525){const _0x11803d=a146_0x290390,_0x4139ca=readFileSync(_0x52c525,_0x11803d(0x192));let _0x530682;try{_0x530682=JSON[_0x11803d(0x180)](_0x4139ca);}catch{throw new Error(_0x11803d(0x178)+_0x52c525);}if(!_0x530682||typeof _0x530682!=='object')throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x5cfd36=_0x530682,_0x27d0ec=_0x5cfd36['parent_segment']&&typeof _0x5cfd36['parent_segment']===_0x11803d(0x18c),_0x3a6101=_0x5cfd36['engage_workspace']&&typeof _0x5cfd36['engage_workspace']===_0x11803d(0x18c);if(!_0x27d0ec&&!_0x3a6101)throw new Error(_0x11803d(0x17b));const _0x4b1293={};return _0x27d0ec&&(_0x4b1293[_0x11803d(0x181)]=_0x5cfd36[_0x11803d(0x181)]),_0x3a6101&&(_0x4b1293['engage_workspace']=_0x5cfd36['engage_workspace']),_0x4b1293;}export function findTdxConfig(_0x432ebb=process[a146_0x290390(0x18d)]()){const _0x57e9c2=a146_0x290390,_0x28ba2b=findTdxConfigPath(_0x432ebb);if(!_0x28ba2b)throw new Error(_0x57e9c2(0x17f));const _0x43c141=loadTdxConfig(_0x28ba2b),_0x6349b3=a146_0x544319['dirname'](_0x28ba2b);return{'config':_0x43c141,'configPath':_0x28ba2b,'configDir':_0x6349b3};}export function tryFindTdxConfig(_0x5a1308){try{return findTdxConfig(_0x5a1308);}catch{return null;}}export function getSegmentRootDir(_0x4b5876,_0x199499=process[a146_0x290390(0x18d)]()){const _0x213755=a146_0x290390;return a146_0x544319[_0x213755(0x183)](_0x199499,SEGMENTS_DIR,_0x4b5876);}export function getTdxConfigPath(_0x52bc10,_0x1ff470=process['cwd']()){const _0x5f1c0c=a146_0x290390;return a146_0x544319[_0x5f1c0c(0x183)](getSegmentRootDir(_0x52bc10,_0x1ff470),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x55d5eb,_0x126e92){const _0x1b437a=a146_0x290390,_0x435723=a146_0x544319[_0x1b437a(0x190)](_0x55d5eb),_0x164aff=a146_0x544319['relative'](_0x126e92,_0x435723);if(_0x164aff[_0x1b437a(0x18f)]('..'))return'';return _0x164aff;}export function localPathToTdFolderPath(_0x228b0c){const _0x4dd9eb=a146_0x290390,_0x3309b4=a146_0x544319[_0x4dd9eb(0x17c)](_0x228b0c);if(_0x3309b4==='.'||_0x3309b4==='')return'';return _0x3309b4[_0x4dd9eb(0x191)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x52c8c3,_0x8bd538){const _0x196b23=a146_0x290390;if(!_0x52c8c3)return _0x8bd538;return a146_0x544319[_0x196b23(0x183)](_0x8bd538,_0x52c8c3);}export function createTdxConfigContent(_0x3ae9a3){const _0x329415={'parent_segment':_0x3ae9a3};return JSON['stringify'](_0x329415,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x145400){const _0xe98f05=a146_0x290390,_0x973df5={'engage_workspace':_0x145400};return JSON[_0xe98f05(0x18a)](_0x973df5,null,0x2)+'\x0a';}function a146_0x21ed(){const _0x3d5596=['join','145QZULSh','28reuhKZ','root','3476edykTs','515hlQjew','5634XqalkE','stringify','174444KtLqxR','string','cwd','segments','startsWith','resolve','replace','utf-8','8944090aBUUue','Invalid\x20JSON\x20in\x20','11Mdfdib','24278196mIDIHf','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','dirname','5720ZLYblE','2029086hkVBWL','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parse','parent_segment','60316XChCqI'];a146_0x21ed=function(){return _0x3d5596;};return a146_0x21ed();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x5629(_0x10d6cc,_0x3f3f01){_0x10d6cc=_0x10d6cc-0x1ec;const _0x24a9e2=a147_0x24a9();let _0x562960=_0x24a9e2[_0x10d6cc];return _0x562960;}const a147_0x362559=a147_0x5629;(function(_0x1b3dba,_0x4e631f){const _0x232c18=a147_0x5629,_0x53f17c=_0x1b3dba();while(!![]){try{const _0x5a8a21=-parseInt(_0x232c18(0x203))/0x1*(parseInt(_0x232c18(0x1f1))/0x2)+-parseInt(_0x232c18(0x20c))/0x3+parseInt(_0x232c18(0x205))/0x4+parseInt(_0x232c18(0x20b))/0x5+parseInt(_0x232c18(0x213))/0x6*(parseInt(_0x232c18(0x201))/0x7)+-parseInt(_0x232c18(0x1ef))/0x8+-parseInt(_0x232c18(0x1f7))/0x9;if(_0x5a8a21===_0x4e631f)break;else _0x53f17c['push'](_0x53f17c['shift']());}catch(_0x5bb588){_0x53f17c['push'](_0x53f17c['shift']());}}}(a147_0x24a9,0x8b144));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x362559(0x1fd)](['none','hourly',a147_0x362559(0x1fa),a147_0x362559(0x211),'monthly',a147_0x362559(0x1f6),'minutes_interval']);export const RepeatUnitSchema=z[a147_0x362559(0x1fd)]([a147_0x362559(0x209),a147_0x362559(0x208),a147_0x362559(0x1fb),a147_0x362559(0x1f8),a147_0x362559(0x1ff),'once',a147_0x362559(0x202)]);export const ScheduleDefSchema=z[a147_0x362559(0x1ee)]({'type':ScheduleTypeSchema[a147_0x362559(0x1ec)](),'repeat_unit':RepeatUnitSchema[a147_0x362559(0x1ec)](),'repeat_frequency':z[a147_0x362559(0x207)]()[a147_0x362559(0x1ec)](),'repeat_sub_frequency':z[a147_0x362559(0x204)](z[a147_0x362559(0x207)]())[a147_0x362559(0x1ec)](),'start_at':z[a147_0x362559(0x20f)]()['nullable']()[a147_0x362559(0x1ec)](),'end_on':z[a147_0x362559(0x20f)]()[a147_0x362559(0x20d)]()['optional'](),'timezone':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1ec)]()});export const NotificationDefSchema=z[a147_0x362559(0x1ee)]({'notify_on':z[a147_0x362559(0x204)](z[a147_0x362559(0x1fd)](['onSuccess',a147_0x362559(0x1fe)]))['optional'](),'email_recipients':z[a147_0x362559(0x204)](z['string']())['optional']()});export const ActivationColumnDefSchema=z[a147_0x362559(0x212)]([z[a147_0x362559(0x20f)](),z['object']({'name':z[a147_0x362559(0x20f)](),'type':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1ec)](),'visibility':z['enum']([a147_0x362559(0x206),a147_0x362559(0x1fc)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a147_0x362559(0x1ee)]({'columns':z[a147_0x362559(0x204)](z[a147_0x362559(0x1ee)]({'name':z[a147_0x362559(0x20f)](),'type':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1ec)](),'visibility':z[a147_0x362559(0x1fd)]([a147_0x362559(0x206),a147_0x362559(0x1fc)])['optional']()}))['optional'](),'behavior_table':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1ec)](),'join_row':z[a147_0x362559(0x207)]()[a147_0x362559(0x20d)]()['optional'](),'join_strategy':z['enum'](['All',a147_0x362559(0x210),a147_0x362559(0x20a),a147_0x362559(0x1f9)])['optional'](),'formatting':z[a147_0x362559(0x1fd)]([a147_0x362559(0x1f2),a147_0x362559(0x1f0)])[a147_0x362559(0x1ec)](),'order_by':z[a147_0x362559(0x204)](z[a147_0x362559(0x1ee)]({'key':z[a147_0x362559(0x20f)](),'order':z[a147_0x362559(0x1fd)](['asc','desc'])}))[a147_0x362559(0x1ec)]()});function a147_0x24a9(){const _0x480534=['1543640WuavYD','cols','30XLRkzw','rows','unknown','min','Activation\x20name\x20is\x20required','cron','2543040FJszCl','week','Top-N','daily','day','masked','enum','onFailure','month','boolean','3688265eLfaQK','none','4349EnxMyY','array','3133224uoHYrH','clear','number','hour','minute','Last','2572060KPReCo','2142585dQzxjA','nullable','Connection\x20name\x20is\x20required','string','First','weekly','union','6FhGkGt','optional','record','object'];a147_0x24a9=function(){return _0x480534;};return a147_0x24a9();}export const ActivationDefSchema=z[a147_0x362559(0x1ee)]({'name':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1f4)](0x1,a147_0x362559(0x1f5)),'description':z[a147_0x362559(0x20f)]()[a147_0x362559(0x1ec)](),'connection':z['string']()[a147_0x362559(0x1f4)](0x1,a147_0x362559(0x20e)),'all_columns':z[a147_0x362559(0x200)]()[a147_0x362559(0x1ec)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a147_0x362559(0x1ec)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a147_0x362559(0x1ed)](z[a147_0x362559(0x20f)](),z[a147_0x362559(0x1f3)]())[a147_0x362559(0x1ec)](),'activation_template_id':z['string']()['nullable']()[a147_0x362559(0x1ec)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a147_0x362559(0x1ec)](),'run_after_journey_refresh':z[a147_0x362559(0x200)]()[a147_0x362559(0x1ec)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a148_0x366b(_0x5ca7bf,_0x40da5b){_0x5ca7bf=_0x5ca7bf-0x1c8;var _0x5473b9=a148_0x5473();var _0x366b92=_0x5473b9[_0x5ca7bf];return _0x366b92;}(function(_0x1a860b,_0x3f8a1b){var _0x282b37=a148_0x366b,_0x10dd2e=_0x1a860b();while(!![]){try{var _0xe490e5=parseInt(_0x282b37(0x1cf))/0x1*(-parseInt(_0x282b37(0x1c8))/0x2)+parseInt(_0x282b37(0x1cc))/0x3+parseInt(_0x282b37(0x1cb))/0x4+-parseInt(_0x282b37(0x1c9))/0x5+-parseInt(_0x282b37(0x1ce))/0x6*(parseInt(_0x282b37(0x1cd))/0x7)+-parseInt(_0x282b37(0x1ca))/0x8+parseInt(_0x282b37(0x1d0))/0x9;if(_0xe490e5===_0x3f8a1b)break;else _0x10dd2e['push'](_0x10dd2e['shift']());}catch(_0x1272e3){_0x10dd2e['push'](_0x10dd2e['shift']());}}}(a148_0x5473,0x7ecd0));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a148_0x5473(){var _0x33376e=['2102260cZOguc','1866248JIPUBN','1949436cfguPa','2510316slIZBX','7FDhXrR','5431770LqCXWX','505KTycpG','11728872Vxywdv','2174yQuLkA'];a148_0x5473=function(){return _0x33376e;};return a148_0x5473();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x462699=a149_0x48ed;(function(_0x411c06,_0x58b3c4){const _0x2cce43=a149_0x48ed,_0x6a2323=_0x411c06();while(!![]){try{const _0x4ecaba=parseInt(_0x2cce43(0xfb))/0x1+-parseInt(_0x2cce43(0xf6))/0x2*(parseInt(_0x2cce43(0xe7))/0x3)+-parseInt(_0x2cce43(0xeb))/0x4*(parseInt(_0x2cce43(0x101))/0x5)+parseInt(_0x2cce43(0xea))/0x6*(-parseInt(_0x2cce43(0xe5))/0x7)+-parseInt(_0x2cce43(0xf5))/0x8*(parseInt(_0x2cce43(0xf0))/0x9)+-parseInt(_0x2cce43(0x10b))/0xa*(parseInt(_0x2cce43(0xf1))/0xb)+parseInt(_0x2cce43(0xe2))/0xc;if(_0x4ecaba===_0x58b3c4)break;else _0x6a2323['push'](_0x6a2323['shift']());}catch(_0x1f1d58){_0x6a2323['push'](_0x6a2323['shift']());}}}(a149_0xc483,0x43e05));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x462699(0xfc)]([a149_0x462699(0x104),a149_0x462699(0xff),'launched']);export const ReentryModeTypeSchema=z['enum']([a149_0x462699(0x100),'reentry_unless_goal_achieved',a149_0x462699(0xfd)]);function a149_0xc483(){const _0x299409=['versions','boolean','decision_point','ab_test','304285uaJMZd','enum','reentry_always','day','simulation','no_reentry','1849855WtiPhO','literal','journeys','draft','end','isArray','Journey\x20name\x20is\x20required','length','optional','filter','2265870mtvyZY','week','array','number','17176320vCMRuH','type','activation','105RhNbcM','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','1563spmBlH','journey','merge','148974XOgERd','4vSKbyn','lazy','object','jump','wait','63DkhfVW','11JUnfsD','record','discriminatedUnion','string','391120gVPbfy','562xgNWgM'];a149_0xc483=function(){return _0x299409;};return a149_0xc483();}export const WaitUnitTypeSchema=z[a149_0x462699(0xfc)]([a149_0x462699(0xfe),a149_0x462699(0xdf)]);export const StepTypeValueSchema=z[a149_0x462699(0xfc)](['wait',a149_0x462699(0xe4),a149_0x462699(0xf9),'ab_test',a149_0x462699(0xe9),a149_0x462699(0xee),a149_0x462699(0x105)]);export const EmbeddedSegmentDefSchema=z[a149_0x462699(0xed)]({'description':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a149_0x462699(0xf4)](),'stage':z[a149_0x462699(0xf4)](),'bundle_id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)]()});function a149_0x48ed(_0x398397,_0x3676cb){_0x398397=_0x398397-0xdf;const _0xc483a2=a149_0xc483();let _0x48ed7e=_0xc483a2[_0x398397];return _0x48ed7e;}export const CriteriaDefSchema=z[a149_0x462699(0xed)]({'name':z['string'](),'description':z[a149_0x462699(0xf4)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a149_0x462699(0xed)]({'duration':z[a149_0x462699(0xe1)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x462699(0xf4)]()['optional']()}),WaitConditionDefSchema=z[a149_0x462699(0xed)]({'segment':z[a149_0x462699(0xf4)](),'next':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'timeout':WaitConditionTimeoutDefSchema[a149_0x462699(0x109)]()}),WaitStepParamsDefSchema=z[a149_0x462699(0xed)]({'duration':z[a149_0x462699(0xe1)]()[a149_0x462699(0x109)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a149_0x462699(0xe0)](z[a149_0x462699(0xf4)]())['optional']()}),StepBaseFields={'name':z['string'](),'uuid':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'next':z[a149_0x462699(0xf4)]()['optional']()},WaitStepDefSchema=z[a149_0x462699(0xed)]({...StepBaseFields,'type':z[a149_0x462699(0x102)](a149_0x462699(0xef)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x462699(0xed)]({'activation':z[a149_0x462699(0xf4)]()}),ActivationStepDefSchema=z[a149_0x462699(0xed)]({...StepBaseFields,'type':z[a149_0x462699(0x102)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a149_0x462699(0xf4)](),'segment':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'segment_id':z['string']()[a149_0x462699(0x109)](),'excluded':z[a149_0x462699(0xf8)]()[a149_0x462699(0x109)](),'next':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)]()}),DecisionPointStepParamsDefSchema=z[a149_0x462699(0xed)]({'branches':z[a149_0x462699(0xe0)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a149_0x462699(0xf9)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x462699(0xed)]({'id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'name':z[a149_0x462699(0xf4)](),'percentage':z[a149_0x462699(0xe1)](),'next':z['string']()[a149_0x462699(0x109)]()}),AbTestStepParamsDefSchema=z[a149_0x462699(0xed)]({'variants':z[a149_0x462699(0xe0)](AbTestVariantDefSchema),'unique_id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'customized_split':z[a149_0x462699(0xf8)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x462699(0x102)](a149_0x462699(0xfa)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x462699(0xed)]({...StepBaseFields,'type':z[a149_0x462699(0x102)](a149_0x462699(0xe9))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x462699(0x102)](a149_0x462699(0xee)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a149_0x462699(0xed)]({...StepBaseFields,'type':z[a149_0x462699(0x102)](a149_0x462699(0x105))})['passthrough']();export const StepDefSchema=z[a149_0x462699(0xf3)](a149_0x462699(0xe3),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0x462699(0xed)]({'name':z[a149_0x462699(0xf4)](),'description':z['string']()[a149_0x462699(0x109)](),'id':z['string']()[a149_0x462699(0x109)](),'entry_criteria':CriteriaDefSchema[a149_0x462699(0x109)](),'exit_criteria':z[a149_0x462699(0xe0)](CriteriaDefSchema)[a149_0x462699(0x109)](),'milestone':CriteriaDefSchema[a149_0x462699(0x109)](),'root_step':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'steps':z[a149_0x462699(0xe0)](StepDefSchema)[a149_0x462699(0x109)]()});export const JourneyEntryDefSchema=z[a149_0x462699(0xed)]({'name':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'version':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'state':JourneyStateTypeSchema[a149_0x462699(0x109)](),'latest':z[a149_0x462699(0xf8)]()['optional'](),'stages':z[a149_0x462699(0xe0)](StageDefSchema),'id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'version_number':z[a149_0x462699(0xe1)]()[a149_0x462699(0x109)](),'goal':CriteriaDefSchema[a149_0x462699(0x109)](),'reentry':ReentryModeTypeSchema[a149_0x462699(0x109)]()});export const JourneyDefSchema=z[a149_0x462699(0xec)](()=>z['object']({'type':z[a149_0x462699(0x102)](a149_0x462699(0xe8)),'name':z['string']()['min'](0x1,a149_0x462699(0x107)),'description':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'bundle_id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'bundle_name':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'folder_id':z[a149_0x462699(0xf4)]()[a149_0x462699(0x109)](),'reentry':ReentryModeTypeSchema[a149_0x462699(0x109)](),'allow_reentry':z[a149_0x462699(0xf8)]()[a149_0x462699(0x109)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a149_0x462699(0x109)](),'version':z['string']()['optional'](),'version_number':z[a149_0x462699(0xe1)]()[a149_0x462699(0x109)](),'stages':z[a149_0x462699(0xe0)](StageDefSchema)[a149_0x462699(0x109)](),'versions':z[a149_0x462699(0xe0)](JourneyEntryDefSchema)[a149_0x462699(0x109)](),'journeys':z[a149_0x462699(0xe0)](JourneyEntryDefSchema)[a149_0x462699(0x109)](),'segments':z['record'](z[a149_0x462699(0xf4)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a149_0x462699(0xf2)](z[a149_0x462699(0xf4)](),ActivationDefSchema)[a149_0x462699(0x109)]()})['refine'](_0x158e42=>{const _0x3ece78=a149_0x462699,_0x5afda4=[_0x158e42[_0x3ece78(0x103)],_0x158e42['stages'],_0x158e42[_0x3ece78(0xf7)]][_0x3ece78(0x10a)](_0x56be4b=>Array[_0x3ece78(0x106)](_0x56be4b)&&_0x56be4b['length']>0x0)[_0x3ece78(0x108)];return _0x5afda4===0x1;},{'message':a149_0x462699(0xe6)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a151_0x47a1(_0x249b86,_0x546170){_0x249b86=_0x249b86-0x195;var _0x2acff5=a151_0x2acf();var _0x47a16e=_0x2acff5[_0x249b86];return _0x47a16e;}(function(_0x16d917,_0x3537de){var _0x4dbcac=a151_0x47a1,_0x1fdcef=_0x16d917();while(!![]){try{var _0x2703ed=-parseInt(_0x4dbcac(0x198))/0x1*(-parseInt(_0x4dbcac(0x19a))/0x2)+-parseInt(_0x4dbcac(0x199))/0x3*(parseInt(_0x4dbcac(0x19c))/0x4)+parseInt(_0x4dbcac(0x195))/0x5+parseInt(_0x4dbcac(0x19d))/0x6+-parseInt(_0x4dbcac(0x19e))/0x7*(parseInt(_0x4dbcac(0x196))/0x8)+parseInt(_0x4dbcac(0x197))/0x9+parseInt(_0x4dbcac(0x19b))/0xa;if(_0x2703ed===_0x3537de)break;else _0x1fdcef['push'](_0x1fdcef['shift']());}catch(_0x6bd404){_0x1fdcef['push'](_0x1fdcef['shift']());}}}(a151_0x2acf,0x4774f));function a151_0x2acf(){var _0x3bf829=['46509DZtXLz','2642Rketab','1782480GNKzOb','4RsynKm','1415844jeBJVv','559762pLuIvB','289740bSrvSI','56pzWdUN','1766799ZRZcpG','151sRCxJL'];a151_0x2acf=function(){return _0x3bf829;};return a151_0x2acf();}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 a148_0x35ac31=a148_0x586d;(function(_0x2584bf,_0x8e898e){const _0x4b1df8=a148_0x586d,_0x23615a=_0x2584bf();while(!![]){try{const _0x3d5ce4=parseInt(_0x4b1df8(0x1b5))/0x1+-parseInt(_0x4b1df8(0x1c0))/0x2+parseInt(_0x4b1df8(0x18e))/0x3+-parseInt(_0x4b1df8(0x1a4))/0x4+parseInt(_0x4b1df8(0x1ab))/0x5+parseInt(_0x4b1df8(0x1ba))/0x6+-parseInt(_0x4b1df8(0x197))/0x7*(parseInt(_0x4b1df8(0x19f))/0x8);if(_0x3d5ce4===_0x8e898e)break;else _0x23615a['push'](_0x23615a['shift']());}catch(_0x189a23){_0x23615a['push'](_0x23615a['shift']());}}}(a148_0x1f72,0x77a9f));import{z}from'zod';export const OperatorTypeSchema=z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1b6),a148_0x35ac31(0x195),'Less','GreaterEqual',a148_0x35ac31(0x190),'In',a148_0x35ac31(0x17e),a148_0x35ac31(0x17b),'IsNull','TimeWithinPast','TimeWithinNext',a148_0x35ac31(0x198),'StartWith',a148_0x35ac31(0x185),a148_0x35ac31(0x1aa)]);export const TimeUnitSchema=z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1b2),a148_0x35ac31(0x1a0),'hour',a148_0x35ac31(0x1bf),a148_0x35ac31(0x1a8),a148_0x35ac31(0x1b0),'year']);export const AggregationTypeSchema=z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1ae),'Sum',a148_0x35ac31(0x19d),a148_0x35ac31(0x182),a148_0x35ac31(0x192),a148_0x35ac31(0x1b9),a148_0x35ac31(0x193),a148_0x35ac31(0x1c3)]);const TemporalValueSchema=z['union']([z['object']({'timestamp':z[a148_0x35ac31(0x19b)]()}),z[a148_0x35ac31(0x19c)]({'last':z[a148_0x35ac31(0x1ac)]([z[a148_0x35ac31(0x194)](),z[a148_0x35ac31(0x1a1)](z[a148_0x35ac31(0x19b)](),z[a148_0x35ac31(0x194)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a148_0x35ac31(0x19b)](),z['number'](),z['boolean'](),TemporalValueSchema,z['array'](z[a148_0x35ac31(0x1ac)]([z['string'](),z['number'](),z[a148_0x35ac31(0x19a)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a148_0x35ac31(0x1b6),a148_0x35ac31(0x195),a148_0x35ac31(0x17f),a148_0x35ac31(0x184),a148_0x35ac31(0x190),'In',a148_0x35ac31(0x198),'StartWith',a148_0x35ac31(0x185),'Regexp',a148_0x35ac31(0x1c2),a148_0x35ac31(0x1bb)]),OPERATORS_REQUIRING_UNIT=new Set([a148_0x35ac31(0x1c2),a148_0x35ac31(0x1bb)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a148_0x35ac31(0x19a)]()[a148_0x35ac31(0x177)](),'value':OperatorValueSchema[a148_0x35ac31(0x177)](),'min':z['union']([z[a148_0x35ac31(0x194)](),z[a148_0x35ac31(0x19b)](),TemporalValueSchema])[a148_0x35ac31(0x177)](),'max':z[a148_0x35ac31(0x1ac)]([z['number'](),z[a148_0x35ac31(0x19b)](),TemporalValueSchema])[a148_0x35ac31(0x177)](),'unit':TimeUnitSchema[a148_0x35ac31(0x177)](),'duration':z[a148_0x35ac31(0x19c)]({'day':z['number']()[a148_0x35ac31(0x177)](),'week':z[a148_0x35ac31(0x194)]()[a148_0x35ac31(0x177)](),'month':z['number']()['optional'](),'year':z[a148_0x35ac31(0x194)]()[a148_0x35ac31(0x177)](),'hour':z[a148_0x35ac31(0x194)]()['optional'](),'minute':z[a148_0x35ac31(0x194)]()[a148_0x35ac31(0x177)](),'second':z['number']()[a148_0x35ac31(0x177)]()})[a148_0x35ac31(0x177)](),'from':z[a148_0x35ac31(0x19c)]({'last':z[a148_0x35ac31(0x1ac)]([z['number'](),z['string']()]),'unit':TimeUnitSchema})[a148_0x35ac31(0x177)](),'reverse':z['boolean']()['optional']()})[a148_0x35ac31(0x18a)]((_0xf51414,_0x3a8ecc)=>{const _0x31a631=a148_0x35ac31;OPERATORS_REQUIRING_VALUE['has'](_0xf51414['type'])&&(_0xf51414[_0x31a631(0x196)]===undefined||_0xf51414['value']===null)&&_0x3a8ecc['addIssue']({'code':_0x31a631(0x1ad),'message':'Operator\x20\x27'+_0xf51414[_0x31a631(0x191)]+_0x31a631(0x19e),'path':[_0x31a631(0x196)]}),_0xf51414[_0x31a631(0x191)]===_0x31a631(0x17e)&&_0xf51414['min']===undefined&&_0xf51414['max']===undefined&&_0x3a8ecc[_0x31a631(0x1af)]({'code':'custom','message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x31a631(0x1b3)}}),OPERATORS_REQUIRING_UNIT[_0x31a631(0x18b)](_0xf51414[_0x31a631(0x191)])&&_0xf51414['value']!==undefined&&!_0xf51414[_0x31a631(0x1a9)]&&_0x3a8ecc[_0x31a631(0x1af)]({'code':_0x31a631(0x1ad),'message':_0x31a631(0x1a7)+_0xf51414[_0x31a631(0x191)]+_0x31a631(0x17a),'path':[_0x31a631(0x1a9)],'params':{'validationCode':_0x31a631(0x188)}}),_0xf51414[_0x31a631(0x191)]==='TimeRange'&&(!_0xf51414[_0x31a631(0x187)]&&_0x3a8ecc['addIssue']({'code':_0x31a631(0x1ad),'message':_0x31a631(0x18d),'path':[_0x31a631(0x187)]}),!_0xf51414[_0x31a631(0x1c1)]&&_0x3a8ecc[_0x31a631(0x1af)]({'code':_0x31a631(0x1ad),'message':_0x31a631(0x18f),'path':[_0x31a631(0x1c1)]}));});function a148_0x1f72(){const _0x255c97=['string','object','Average','\x27\x20requires\x20a\x20value','8KhvRmK','minute','record','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','operator','1269440ThGEVE','Sum','discriminatedUnion','Operator\x20\x27','week','unit','TimeRange','1393865jxeJTt','union','custom','Count','addIssue','month','enum','second','MISSING_BETWEEN_BOUNDS','Column','497830sIYOns','Equal','min','literal','CountDistinct','3951714cxctjP','TimeWithinNext','batch','And','include','day','1101176eiRVPy','from','TimeWithinPast','Last','optional','lazy','array','\x27\x20requires\x20a\x20time\x20unit','Regexp','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','timestamp','Between','GreaterEqual','column','any','Min','exclude','Less','EndWith','segment','duration','MISSING_TIME_UNIT','Segment\x20reference\x20must\x20not\x20be\x20empty','superRefine','has','realtime','TimeRange\x20operator\x20requires\x20\x27duration\x27','2349612wObCij','TimeRange\x20operator\x20requires\x20\x27from\x27','LessEqual','type','Max','First','number','Greater','value','6022345zFSWzp','Contain','Value','boolean'];a148_0x1f72=function(){return _0x255c97;};return a148_0x1f72();}export const ArrayMatchingSchema=z[a148_0x35ac31(0x1ac)]([z[a148_0x35ac31(0x1b8)](a148_0x35ac31(0x181)),z[a148_0x35ac31(0x1b8)]('all'),z[a148_0x35ac31(0x19c)]({'atLeast':z[a148_0x35ac31(0x194)]()}),z[a148_0x35ac31(0x19c)]({'atMost':z['number']()}),z['object']({'exactly':z[a148_0x35ac31(0x194)]()})]);export const AggregationDefSchema=z[a148_0x35ac31(0x1a6)](a148_0x35ac31(0x191),[z[a148_0x35ac31(0x19c)]({'type':z['enum']([a148_0x35ac31(0x1a5),a148_0x35ac31(0x182),'Max',a148_0x35ac31(0x19d)]),'column':z['string'](),'groupingColumns':z[a148_0x35ac31(0x179)](z['string']())[a148_0x35ac31(0x177)]()}),z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b8)](a148_0x35ac31(0x1ae)),'groupingColumns':z[a148_0x35ac31(0x179)](z[a148_0x35ac31(0x19b)]())['optional']()}),z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b8)](a148_0x35ac31(0x1b9)),'columns':z['array'](z[a148_0x35ac31(0x19b)]())}),z['object']({'type':z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x193),a148_0x35ac31(0x1c3)]),'column':z[a148_0x35ac31(0x19b)](),'orderColumn':z[a148_0x35ac31(0x19b)](),'groupingColumns':z[a148_0x35ac31(0x179)](z[a148_0x35ac31(0x19b)]())[a148_0x35ac31(0x177)]()})]);export const TimeWindowDefSchema=z[a148_0x35ac31(0x19c)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a148_0x35ac31(0x1bb),a148_0x35ac31(0x1aa)]);export const FilterColumnConditionDefSchema=z['object']({'type':z['literal'](a148_0x35ac31(0x1b4)),'column':z[a148_0x35ac31(0x19b)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a148_0x35ac31(0x18a)]((_0x241e3a,_0x9a1028)=>{const _0x1578f6=a148_0x35ac31,_0xcdd2d2=_0x241e3a[_0x1578f6(0x1a3)][_0x1578f6(0x191)];_0x241e3a[_0x1578f6(0x180)]===_0x1578f6(0x17d)?!TIMESTAMP_OPERATORS[_0x1578f6(0x18b)](_0xcdd2d2)&&_0x9a1028[_0x1578f6(0x1af)]({'code':_0x1578f6(0x1ad),'message':_0x1578f6(0x1a2)+_0xcdd2d2+'\x27)','path':[_0x1578f6(0x1a3),'type']}):TIMESTAMP_OPERATORS[_0x1578f6(0x18b)](_0xcdd2d2)&&_0x9a1028[_0x1578f6(0x1af)]({'code':_0x1578f6(0x1ad),'message':'Operator\x20\x27'+_0xcdd2d2+_0x1578f6(0x17c),'path':[_0x1578f6(0x1a3),'type']});});export const FilterRuleDefSchema=z[a148_0x35ac31(0x19c)]({'type':z['literal'](a148_0x35ac31(0x1bd)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a148_0x35ac31(0x178)](()=>z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b8)](a148_0x35ac31(0x199)),'attribute':z[a148_0x35ac31(0x19b)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a148_0x35ac31(0x177)](),'source':z[a148_0x35ac31(0x19b)]()[a148_0x35ac31(0x177)](),'filter':FilterRuleDefSchema[a148_0x35ac31(0x177)](),'limit':z['number']()[a148_0x35ac31(0x177)]()}));export const BehaviorConditionDefSchema=z[a148_0x35ac31(0x178)](()=>z['object']({'type':z[a148_0x35ac31(0x1b8)]('Behavior'),'attribute':z[a148_0x35ac31(0x19b)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a148_0x35ac31(0x177)](),'source':z[a148_0x35ac31(0x19b)]()[a148_0x35ac31(0x177)](),'filter':FilterRuleDefSchema[a148_0x35ac31(0x177)](),'timeWindow':TimeWindowDefSchema[a148_0x35ac31(0x177)](),'limit':z[a148_0x35ac31(0x194)]()['optional']()}));export const ColumnConditionDefSchema=z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b8)]('Column'),'column':z[a148_0x35ac31(0x19b)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a148_0x35ac31(0x178)](()=>z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1bd),'Or']),'conditions':z[a148_0x35ac31(0x179)](ConditionDefSchema),'description':z[a148_0x35ac31(0x19b)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1be),a148_0x35ac31(0x183)]),'segment':z[a148_0x35ac31(0x19b)]()[a148_0x35ac31(0x1b7)](0x1,a148_0x35ac31(0x189))});function a148_0x586d(_0x43cd71,_0x24219a){_0x43cd71=_0x43cd71-0x177;const _0x1f721d=a148_0x1f72();let _0x586dd1=_0x1f721d[_0x43cd71];return _0x586dd1;}export const ConditionDefSchema=z[a148_0x35ac31(0x178)](()=>z[a148_0x35ac31(0x1ac)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a148_0x35ac31(0x178)](()=>z[a148_0x35ac31(0x19c)]({'type':z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1bd),'Or']),'conditions':z[a148_0x35ac31(0x179)](ConditionDefSchema),'description':z['string']()[a148_0x35ac31(0x177)]()}));export const SegmentDefSchema=z[a148_0x35ac31(0x19c)]({'type':z['literal'](a148_0x35ac31(0x186))[a148_0x35ac31(0x177)](),'name':z[a148_0x35ac31(0x19b)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()[a148_0x35ac31(0x177)](),'folder':z['string']()[a148_0x35ac31(0x177)](),'rule':RuleDefSchema[a148_0x35ac31(0x177)](),'kind':z[a148_0x35ac31(0x1b1)]([a148_0x35ac31(0x1bc),a148_0x35ac31(0x18c),'funnel_stage'])[a148_0x35ac31(0x177)](),'visible':z[a148_0x35ac31(0x19a)]()['optional'](),'activations':z['array'](z[a148_0x35ac31(0x181)]())[a148_0x35ac31(0x177)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a152_0x13a9b6=a152_0x4ac7;(function(_0x8c45b5,_0x4d4614){const _0x33230f=a152_0x4ac7,_0x5aefe2=_0x8c45b5();while(!![]){try{const _0x86d312=-parseInt(_0x33230f(0x1dc))/0x1+-parseInt(_0x33230f(0x1a4))/0x2*(parseInt(_0x33230f(0x19d))/0x3)+parseInt(_0x33230f(0x1b3))/0x4*(-parseInt(_0x33230f(0x1c7))/0x5)+parseInt(_0x33230f(0x1d6))/0x6*(-parseInt(_0x33230f(0x1d8))/0x7)+-parseInt(_0x33230f(0x1ca))/0x8+parseInt(_0x33230f(0x1be))/0x9*(-parseInt(_0x33230f(0x1d7))/0xa)+parseInt(_0x33230f(0x1a7))/0xb;if(_0x86d312===_0x4d4614)break;else _0x5aefe2['push'](_0x5aefe2['shift']());}catch(_0xbc6c6c){_0x5aefe2['push'](_0x5aefe2['shift']());}}}(a152_0xed88,0x19ee5));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1d9),a152_0x13a9b6(0x1bb),'Less',a152_0x13a9b6(0x1a0),a152_0x13a9b6(0x1b7),'In',a152_0x13a9b6(0x1cd),'Regexp',a152_0x13a9b6(0x1e5),a152_0x13a9b6(0x1a1),'TimeWithinNext',a152_0x13a9b6(0x1a2),a152_0x13a9b6(0x1e3),a152_0x13a9b6(0x1ab),a152_0x13a9b6(0x1c6)]);export const TimeUnitSchema=z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1c8),'minute','hour','day',a152_0x13a9b6(0x1e7),a152_0x13a9b6(0x1e4),'year']);export const AggregationTypeSchema=z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1e1),a152_0x13a9b6(0x1bc),a152_0x13a9b6(0x19e),a152_0x13a9b6(0x1c9),a152_0x13a9b6(0x1b5),'CountDistinct',a152_0x13a9b6(0x19b),a152_0x13a9b6(0x1c3)]);const TemporalValueSchema=z[a152_0x13a9b6(0x1d2)]([z['object']({'timestamp':z['string']()}),z[a152_0x13a9b6(0x1cc)]({'last':z['union']([z[a152_0x13a9b6(0x1a3)](),z['record'](z[a152_0x13a9b6(0x1ce)](),z[a152_0x13a9b6(0x1a3)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a152_0x13a9b6(0x1d2)]([z[a152_0x13a9b6(0x1ce)](),z[a152_0x13a9b6(0x1a3)](),z['boolean'](),TemporalValueSchema,z[a152_0x13a9b6(0x1c1)](z[a152_0x13a9b6(0x1d2)]([z['string'](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x13a9b6(0x1d9),'Greater','GreaterEqual',a152_0x13a9b6(0x1c5),a152_0x13a9b6(0x1b7),'In',a152_0x13a9b6(0x1a2),a152_0x13a9b6(0x1e3),a152_0x13a9b6(0x1ab),a152_0x13a9b6(0x1bd),a152_0x13a9b6(0x1a1),a152_0x13a9b6(0x1ba)]),OPERATORS_REQUIRING_UNIT=new Set([a152_0x13a9b6(0x1a1),a152_0x13a9b6(0x1ba)]);export const OperatorDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':OperatorTypeSchema,'not':z[a152_0x13a9b6(0x1df)]()['optional'](),'value':OperatorValueSchema['optional'](),'min':z[a152_0x13a9b6(0x1d2)]([z['number'](),z[a152_0x13a9b6(0x1ce)](),TemporalValueSchema])['optional'](),'max':z[a152_0x13a9b6(0x1d2)]([z[a152_0x13a9b6(0x1a3)](),z[a152_0x13a9b6(0x1ce)](),TemporalValueSchema])[a152_0x13a9b6(0x1e2)](),'unit':TimeUnitSchema[a152_0x13a9b6(0x1e2)](),'duration':z[a152_0x13a9b6(0x1cc)]({'day':z[a152_0x13a9b6(0x1a3)]()[a152_0x13a9b6(0x1e2)](),'week':z[a152_0x13a9b6(0x1a3)]()[a152_0x13a9b6(0x1e2)](),'month':z['number']()['optional'](),'year':z[a152_0x13a9b6(0x1a3)]()[a152_0x13a9b6(0x1e2)](),'hour':z['number']()[a152_0x13a9b6(0x1e2)](),'minute':z[a152_0x13a9b6(0x1a3)]()[a152_0x13a9b6(0x1e2)](),'second':z[a152_0x13a9b6(0x1a3)]()['optional']()})['optional'](),'from':z['object']({'last':z[a152_0x13a9b6(0x1d2)]([z[a152_0x13a9b6(0x1a3)](),z[a152_0x13a9b6(0x1ce)]()]),'unit':TimeUnitSchema})[a152_0x13a9b6(0x1e2)](),'reverse':z['boolean']()[a152_0x13a9b6(0x1e2)]()})['superRefine']((_0x253aa1,_0x122d13)=>{const _0x59d46e=a152_0x13a9b6;OPERATORS_REQUIRING_VALUE[_0x59d46e(0x1db)](_0x253aa1[_0x59d46e(0x19f)])&&(_0x253aa1[_0x59d46e(0x1e0)]===undefined||_0x253aa1['value']===null)&&_0x122d13['addIssue']({'code':_0x59d46e(0x1ae),'message':_0x59d46e(0x1dd)+_0x253aa1[_0x59d46e(0x19f)]+_0x59d46e(0x1cf),'path':['value']}),_0x253aa1[_0x59d46e(0x19f)]===_0x59d46e(0x1cd)&&_0x253aa1['min']===undefined&&_0x253aa1[_0x59d46e(0x1af)]===undefined&&_0x122d13[_0x59d46e(0x1aa)]({'code':_0x59d46e(0x1ae),'message':_0x59d46e(0x1b4),'params':{'validationCode':_0x59d46e(0x1da)}}),OPERATORS_REQUIRING_UNIT['has'](_0x253aa1[_0x59d46e(0x19f)])&&_0x253aa1['value']!==undefined&&!_0x253aa1[_0x59d46e(0x1b8)]&&_0x122d13['addIssue']({'code':_0x59d46e(0x1ae),'message':_0x59d46e(0x1dd)+_0x253aa1['type']+_0x59d46e(0x1cb),'path':[_0x59d46e(0x1b8)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x253aa1[_0x59d46e(0x19f)]===_0x59d46e(0x1c6)&&(!_0x253aa1[_0x59d46e(0x1c4)]&&_0x122d13['addIssue']({'code':_0x59d46e(0x1ae),'message':_0x59d46e(0x1d5),'path':[_0x59d46e(0x1c4)]}),!_0x253aa1['from']&&_0x122d13[_0x59d46e(0x1aa)]({'code':'custom','message':_0x59d46e(0x1ad),'path':['from']}));});export const ArrayMatchingSchema=z[a152_0x13a9b6(0x1d2)]([z['literal'](a152_0x13a9b6(0x1c2)),z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1c0)),z['object']({'atLeast':z[a152_0x13a9b6(0x1a3)]()}),z['object']({'atMost':z[a152_0x13a9b6(0x1a3)]()}),z[a152_0x13a9b6(0x1cc)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a152_0x13a9b6(0x1ac)](a152_0x13a9b6(0x19f),[z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1bc),'Min','Max',a152_0x13a9b6(0x19e)]),'column':z[a152_0x13a9b6(0x1ce)](),'groupingColumns':z['array'](z['string']())['optional']()}),z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1e1)),'groupingColumns':z[a152_0x13a9b6(0x1c1)](z[a152_0x13a9b6(0x1ce)]())[a152_0x13a9b6(0x1e2)]()}),z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1b2)),'columns':z[a152_0x13a9b6(0x1c1)](z[a152_0x13a9b6(0x1ce)]())}),z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x19b),a152_0x13a9b6(0x1c3)]),'column':z[a152_0x13a9b6(0x1ce)](),'orderColumn':z['string'](),'groupingColumns':z['array'](z[a152_0x13a9b6(0x1ce)]())[a152_0x13a9b6(0x1e2)]()})]);export const TimeWindowDefSchema=z[a152_0x13a9b6(0x1cc)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x13a9b6(0x1a1),a152_0x13a9b6(0x1ba),a152_0x13a9b6(0x1c6)]);export const FilterColumnConditionDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x19c)),'column':z[a152_0x13a9b6(0x1ce)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x13a9b6(0x1e2)]()})[a152_0x13a9b6(0x1d3)]((_0x37f4f4,_0x40117c)=>{const _0x4fb8=a152_0x13a9b6,_0x23184c=_0x37f4f4[_0x4fb8(0x1a5)]['type'];_0x37f4f4['column']==='timestamp'?!TIMESTAMP_OPERATORS[_0x4fb8(0x1db)](_0x23184c)&&_0x40117c[_0x4fb8(0x1aa)]({'code':_0x4fb8(0x1ae),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x23184c+'\x27)','path':[_0x4fb8(0x1a5),_0x4fb8(0x19f)]}):TIMESTAMP_OPERATORS[_0x4fb8(0x1db)](_0x23184c)&&_0x40117c['addIssue']({'code':_0x4fb8(0x1ae),'message':_0x4fb8(0x1dd)+_0x23184c+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x4fb8(0x1a5),_0x4fb8(0x19f)]});});export const FilterRuleDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':z['literal'](a152_0x13a9b6(0x1d0)),'conditions':z[a152_0x13a9b6(0x1c1)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x13a9b6(0x1d1)](()=>z['object']({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1b0)),'attribute':z[a152_0x13a9b6(0x1ce)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a152_0x13a9b6(0x1df)]()[a152_0x13a9b6(0x1e2)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1e2)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a152_0x13a9b6(0x1a3)]()[a152_0x13a9b6(0x1e2)]()}));function a152_0x4ac7(_0x3e9709,_0x1b8786){_0x3e9709=_0x3e9709-0x19b;const _0xed8823=a152_0xed88();let _0x4ac7b8=_0xed8823[_0x3e9709];return _0x4ac7b8;}export const BehaviorConditionDefSchema=z[a152_0x13a9b6(0x1d1)](()=>z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1a6)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x13a9b6(0x1e2)](),'exclude':z[a152_0x13a9b6(0x1df)]()[a152_0x13a9b6(0x1e2)](),'aggregation':AggregationDefSchema[a152_0x13a9b6(0x1e2)](),'source':z['string']()[a152_0x13a9b6(0x1e2)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a152_0x13a9b6(0x1a3)]()['optional']()}));export const ColumnConditionDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x19c)),'column':z[a152_0x13a9b6(0x1ce)](),'operator':OperatorDefSchema});function a152_0xed88(){const _0x80748=['Equal','MISSING_BETWEEN_BOUNDS','has','61176jcgsKm','Operator\x20\x27','literal','boolean','value','Count','optional','StartWith','month','IsNull','funnel_stage','week','First','Column','514239UYlAnQ','Average','type','GreaterEqual','TimeWithinPast','Contain','number','2KswpbZ','operator','Behavior','7300645VsSkVk','include','batch','addIssue','EndWith','discriminatedUnion','TimeRange\x20operator\x20requires\x20\x27from\x27','custom','max','Value','segment','CountDistinct','252mOzvLs','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Max','exclude','LessEqual','unit','Segment\x20name\x20is\x20required','TimeWithinNext','Greater','Sum','Regexp','93888MyWgdq','min','all','array','any','Last','duration','Less','TimeRange','985jVBTkE','second','Min','241016XORHQI','\x27\x20requires\x20a\x20time\x20unit','object','Between','string','\x27\x20requires\x20a\x20value','And','lazy','union','superRefine','enum','TimeRange\x20operator\x20requires\x20\x27duration\x27','6hwKIiN','120QQZYYv','1100197QLEpUx'];a152_0xed88=function(){return _0x80748;};return a152_0xed88();}export const CompositeConditionDefSchema=z[a152_0x13a9b6(0x1d1)](()=>z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1d4)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1e2)]()}));export const SegmentRefConditionDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1a8),a152_0x13a9b6(0x1b6)]),'segment':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1bf)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a152_0x13a9b6(0x1d1)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1d0),'Or']),'conditions':z[a152_0x13a9b6(0x1c1)](ConditionDefSchema),'description':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1e2)]()}));export const SegmentDefSchema=z[a152_0x13a9b6(0x1cc)]({'type':z[a152_0x13a9b6(0x1de)](a152_0x13a9b6(0x1b1))[a152_0x13a9b6(0x1e2)](),'name':z[a152_0x13a9b6(0x1ce)]()['min'](0x1,a152_0x13a9b6(0x1b9)),'description':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1e2)](),'folder':z[a152_0x13a9b6(0x1ce)]()[a152_0x13a9b6(0x1e2)](),'rule':RuleDefSchema['optional'](),'kind':z[a152_0x13a9b6(0x1d4)]([a152_0x13a9b6(0x1a9),'realtime',a152_0x13a9b6(0x1e6)])[a152_0x13a9b6(0x1e2)](),'visible':z['boolean']()[a152_0x13a9b6(0x1e2)](),'activations':z[a152_0x13a9b6(0x1c1)](z[a152_0x13a9b6(0x1c2)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x2cb71e=a153_0x1bea;(function(_0xbd0da8,_0x3ba5d0){const _0x390670=a153_0x1bea,_0x29bd15=_0xbd0da8();while(!![]){try{const _0x1fb532=-parseInt(_0x390670(0x1d0))/0x1*(-parseInt(_0x390670(0x1db))/0x2)+parseInt(_0x390670(0x1ca))/0x3+-parseInt(_0x390670(0x1c3))/0x4+-parseInt(_0x390670(0x1d6))/0x5*(-parseInt(_0x390670(0x1cb))/0x6)+-parseInt(_0x390670(0x1d5))/0x7*(parseInt(_0x390670(0x1c9))/0x8)+-parseInt(_0x390670(0x1de))/0x9+parseInt(_0x390670(0x1ce))/0xa*(parseInt(_0x390670(0x1c0))/0xb);if(_0x1fb532===_0x3ba5d0)break;else _0x29bd15['push'](_0x29bd15['shift']());}catch(_0x32449c){_0x29bd15['push'](_0x29bd15['shift']());}}}(a153_0x585e,0xa85d4));import{readFileSync}from'fs';import*as a153_0xe30036 from'path';import*as a153_0xd851d 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([a153_0x2cb71e(0x1cf),a153_0x2cb71e(0x1dc)]);export function isJourneyDef(_0x1cbb9f){const _0x2cf646=a153_0x2cb71e;return typeof _0x1cbb9f===_0x2cf646(0x1bd)&&_0x1cbb9f!==null&&_0x2cf646(0x1cc)in _0x1cbb9f&&_0x1cbb9f['type']===_0x2cf646(0x1d3);}export function isCampaignDef(_0x19a8ee){const _0x50473e=a153_0x2cb71e;if(typeof _0x19a8ee!==_0x50473e(0x1bd)||_0x19a8ee===null)return![];const _0x47ed52=_0x19a8ee,_0x320f24=VALID_CAMPAIGN_TYPES[_0x50473e(0x1c4)](_0x47ed52[_0x50473e(0x1be)]);if(_0x47ed52['type']==='campaign'&&_0x320f24)return!![];if(_0x320f24&&!_0x47ed52['type'])return!![];return![];}export function isTemplateDef(_0x155611){const _0x1d6199=a153_0x2cb71e;return typeof _0x155611===_0x1d6199(0x1bd)&&_0x155611!==null&&_0x1d6199(0x1cc)in _0x155611&&_0x155611[_0x1d6199(0x1cc)]===_0x1d6199(0x1d2);}export function isValidationResult(_0x143b14){const _0x51b53f=a153_0x2cb71e;return!(_0x51b53f(0x1d4)in _0x143b14);}export function createParseErrorResult(_0xc7a834,_0x3dc370,_0x2b87ae,_0xa5654a,_0x2c15c3='segment'){const _0x36313f=a153_0x2cb71e;return{'filePath':_0xc7a834,'relativePath':_0x3dc370,'source':_0x2b87ae,'result':{'valid':![],'errors':[{'level':_0x36313f(0x1d9),'path':'','code':_0x36313f(0x1df),'message':_0xa5654a}],'warnings':[]},'fileType':_0x2c15c3};}function a153_0x1bea(_0x4a180a,_0x34c5fd){_0x4a180a=_0x4a180a-0x1bb;const _0x585e07=a153_0x585e();let _0x1bea39=_0x585e07[_0x4a180a];return _0x1bea39;}export function validateYamlFile(_0x91b75,_0xbd3a09,_0x5587d3={}){const _0x5e74ef=a153_0x2cb71e,_0x5ef384=a153_0xe30036['relative'](_0xbd3a09,_0x91b75)||a153_0xe30036[_0x5e74ef(0x1d1)](_0x91b75);try{const _0x47c1c4=readFileSync(_0x91b75,_0x5e74ef(0x1c5)),_0x50818d=a153_0xd851d[_0x5e74ef(0x1c2)](_0x47c1c4),_0x4554c4=_0x50818d[_0x5e74ef(0x1dd)]();if(!_0x4554c4)return createParseErrorResult(_0x91b75,_0x5ef384,_0x47c1c4,_0x5e74ef(0x1bc));let _0x2386cf;if(isJourneyDef(_0x4554c4))_0x2386cf=_0x5e74ef(0x1d3);else{if(isCampaignDef(_0x4554c4))_0x2386cf=_0x5e74ef(0x1d7);else isTemplateDef(_0x4554c4)?_0x2386cf=_0x5e74ef(0x1d2):_0x2386cf=_0x5e74ef(0x1bb);}if(_0x5587d3[_0x5e74ef(0x1cd)]&&_0x2386cf!==_0x5587d3[_0x5e74ef(0x1cd)])return{'filePath':_0x91b75,'relativePath':_0x5ef384,'skipped':!![],'reason':_0x5e74ef(0x1d8)+_0x5587d3[_0x5e74ef(0x1cd)]};const _0x37ffbc={'source':_0x47c1c4,'document':_0x50818d};let _0x37a255;if(_0x2386cf===_0x5e74ef(0x1d3))_0x37a255=validateJourneyDef(_0x4554c4,_0x37ffbc);else{if(_0x2386cf===_0x5e74ef(0x1d7))_0x37a255=validateCampaignDef(_0x4554c4,_0x37ffbc);else _0x2386cf===_0x5e74ef(0x1d2)?_0x37a255=validateTemplateDef(_0x4554c4,_0x37ffbc):_0x37a255=validateSegmentDef(_0x4554c4,_0x37ffbc);}return{'filePath':_0x91b75,'relativePath':_0x5ef384,'source':_0x47c1c4,'result':_0x37a255,'fileType':_0x2386cf};}catch(_0x484622){const _0x419eaf=_0x484622 instanceof Error?_0x484622['message']:String(_0x484622);return createParseErrorResult(_0x91b75,_0x5ef384,'',_0x5e74ef(0x1da)+_0x419eaf);}}function a153_0x585e(){const _0x5587af=['campaign_type','map','20229iWoyvZ','warnings','parseDocument','2121116grxzsB','has','utf-8','valid','length','result','80hLmiVK','2571153murjHq','66RZhYQa','type','filterType','7610REtybR','email','1QGOlgD','basename','template','journey','skipped','886767DuWdyX','11280gUksZE','campaign','not\x20a\x20','error','YAML\x20parse\x20error:\x20','928274KyerNf','push','toJSON','2328966NiSqPo','YAML_PARSE_ERROR','segment','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','object'];a153_0x585e=function(){return _0x5587af;};return a153_0x585e();}export function validateYamlFiles(_0x35bb89,_0x5480ba,_0x56df3b={}){const _0x912359=a153_0x2cb71e;return _0x35bb89[_0x912359(0x1bf)](_0x2f75e9=>validateYamlFile(_0x2f75e9,_0x5480ba,_0x56df3b));}export function calculateSummary(_0x33d785){const _0x542849=a153_0x2cb71e;let _0x32aa65=0x0,_0x36a416=0x0,_0x28a991=0x0,_0x144ba5=0x0;for(const _0x631ec7 of _0x33d785){if(!isValidationResult(_0x631ec7)){_0x144ba5++;continue;}_0x631ec7[_0x542849(0x1c8)][_0x542849(0x1c6)]?_0x32aa65++:_0x36a416++,_0x28a991+=_0x631ec7[_0x542849(0x1c8)][_0x542849(0x1c1)][_0x542849(0x1c7)];}return{'validCount':_0x32aa65,'invalidCount':_0x36a416,'warningCount':_0x28a991,'skippedCount':_0x144ba5,'hasErrors':_0x36a416>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f03f0,_0x348397){const _0xd40c1a=a154_0x4732,_0x59bd42=_0x5f03f0();while(!![]){try{const _0x261725=parseInt(_0xd40c1a(0x1d1))/0x1+parseInt(_0xd40c1a(0x1f0))/0x2+parseInt(_0xd40c1a(0x1c7))/0x3*(-parseInt(_0xd40c1a(0x1f2))/0x4)+-parseInt(_0xd40c1a(0x1de))/0x5+-parseInt(_0xd40c1a(0x1ce))/0x6+parseInt(_0xd40c1a(0x1d6))/0x7*(parseInt(_0xd40c1a(0x1eb))/0x8)+parseInt(_0xd40c1a(0x1e9))/0x9;if(_0x261725===_0x348397)break;else _0x59bd42['push'](_0x59bd42['shift']());}catch(_0x4a7117){_0x59bd42['push'](_0x59bd42['shift']());}}}(a154_0x5b95,0x7b729));function a154_0x4732(_0x478dc6,_0x43b915){_0x478dc6=_0x478dc6-0x1c6;const _0x5b9583=a154_0x5b95();let _0x4732cb=_0x5b9583[_0x478dc6];return _0x4732cb;}import*as a154_0x1ab766 from'yaml';import a154_0x536d5b from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x260389,_0x4a58e6,_0x9832dc){const _0x173992=a154_0x4732;if(!_0x260389||!_0x4a58e6)return undefined;try{let _0x514483=_0x260389['getIn'](_0x9832dc,!![]),_0x4ac459=[..._0x9832dc];while((!_0x514483||typeof _0x514483!=='object'||!(_0x173992(0x1e2)in _0x514483)||!_0x514483[_0x173992(0x1e2)])&&_0x4ac459[_0x173992(0x1c8)]>0x0){_0x4ac459['pop'](),_0x514483=_0x4ac459[_0x173992(0x1c8)]>0x0?_0x260389[_0x173992(0x1d9)](_0x4ac459,!![]):_0x260389['contents'];}if(!_0x514483||typeof _0x514483!==_0x173992(0x1ea)||!(_0x173992(0x1e2)in _0x514483)||!_0x514483['range'])return undefined;const [_0xbaca79]=_0x514483[_0x173992(0x1e2)];return offsetToLocation(_0x4a58e6,_0xbaca79);}catch{return undefined;}}export function offsetToLocation(_0x17d50f,_0x55e278){const _0x15b0c5=a154_0x4732;let _0x1c8d75=0x1,_0x3548b9=0x1;for(let _0x4711af=0x0;_0x4711af<_0x55e278&&_0x4711af<_0x17d50f[_0x15b0c5(0x1c8)];_0x4711af++){_0x17d50f[_0x4711af]==='\x0a'?(_0x1c8d75++,_0x3548b9=0x1):_0x3548b9++;}return{'line':_0x1c8d75,'column':_0x3548b9,'offset':_0x55e278};}export function pathToArray(_0x220152){const _0x24f388=a154_0x4732;if(!_0x220152)return[];return _0x220152['split']('.')[_0x24f388(0x1e3)](_0x228777=>{const _0x1df7dd=_0x24f388,_0x4f34dd=_0x228777[_0x1df7dd(0x1f1)](/^(\w+)\[(\d+)\]$/);if(_0x4f34dd)return[_0x4f34dd[0x1],parseInt(_0x4f34dd[0x2],0xa)];return[_0x228777];});}export function formatZodPath(_0x6b104f){const _0x22a806=a154_0x4732;let _0x35111e='';for(const _0x1b86aa of _0x6b104f){if(typeof _0x1b86aa===_0x22a806(0x1e5))_0x35111e+='['+_0x1b86aa+']';else{const _0x52cf7d=String(_0x1b86aa);_0x35111e+=_0x35111e?'.'+_0x52cf7d:_0x52cf7d;}}return _0x35111e;}export function flattenZodIssues(_0xf62c45){const _0x2b9947=a154_0x4732,_0x32f07e=[];for(const _0x547ad0 of _0xf62c45){if(_0x547ad0[_0x2b9947(0x1ca)]===_0x2b9947(0x1e0)&&'errors'in _0x547ad0){const _0x543625=_0x547ad0[_0x2b9947(0x1d3)];let _0x43e978=_0x543625[0x0]||[];for(const _0x3edc67 of _0x543625){_0x3edc67['length']<_0x43e978[_0x2b9947(0x1c8)]&&(_0x43e978=_0x3edc67);}const _0x3fda78=_0x43e978[_0x2b9947(0x1e1)](_0x59e910=>({..._0x59e910,'path':[..._0x547ad0[_0x2b9947(0x1e7)],..._0x59e910[_0x2b9947(0x1e7)]]}));_0x32f07e[_0x2b9947(0x1d4)](...flattenZodIssues(_0x3fda78));}else _0x32f07e[_0x2b9947(0x1d4)](_0x547ad0);}return _0x32f07e;}export function safeParseYaml(_0x2e2443,_0x8ac5ec){const _0x18571=a154_0x4732,_0x260bfa=a154_0x1ab766[_0x18571(0x1ee)](_0x2e2443);if(!_0x260bfa||typeof _0x260bfa!==_0x18571(0x1ea))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x4c7792=_0x8ac5ec[_0x18571(0x1cf)](_0x260bfa);if(!_0x4c7792[_0x18571(0x1c9)]){const _0x19cb6f=_0x4c7792['error']['issues'][0x0],_0x553411=formatZodPath(_0x19cb6f[_0x18571(0x1e7)]);throw new Error(_0x553411?_0x18571(0x1d8)+_0x553411+_0x18571(0x1ef)+_0x19cb6f['message']:_0x18571(0x1e8)+_0x19cb6f[_0x18571(0x1dd)]);}return _0x4c7792[_0x18571(0x1ec)];}export function formatIssueWithContext(_0x149dd5,_0xba37bf,_0x38d463){const _0x15ec17=a154_0x4732,_0x5931e4=[],_0x1a7dd2=_0x149dd5[_0x15ec17(0x1cb)]===_0x15ec17(0x1f3),_0x18b009=_0x1a7dd2?a154_0x536d5b[_0x15ec17(0x1da)]:a154_0x536d5b[_0x15ec17(0x1e4)],_0x5ce010=_0x1a7dd2?a154_0x536d5b['red']:a154_0x536d5b[_0x15ec17(0x1e4)],_0xcb7048=_0x38d463?a154_0x536d5b[_0x15ec17(0x1cc)](_0x38d463+':'):'';if(_0x149dd5['location']){const _0x487dbe=a154_0x536d5b[_0x15ec17(0x1cc)](_0x149dd5[_0x15ec17(0x1d7)][_0x15ec17(0x1c6)]+':'+_0x149dd5[_0x15ec17(0x1d7)][_0x15ec17(0x1ed)]);_0x5931e4[_0x15ec17(0x1d4)](''+_0xcb7048+_0x487dbe+':\x20'+_0x18b009(_0x149dd5[_0x15ec17(0x1cb)])+'\x20'+_0x5ce010('['+_0x149dd5[_0x15ec17(0x1ca)]+']'));}else _0x5931e4[_0x15ec17(0x1d4)](''+_0xcb7048+a154_0x536d5b[_0x15ec17(0x1d2)](_0x149dd5['path'])+':\x20'+_0x18b009(_0x149dd5[_0x15ec17(0x1cb)])+'\x20'+_0x5ce010('['+_0x149dd5[_0x15ec17(0x1ca)]+']'));_0x5931e4[_0x15ec17(0x1d4)](_0x149dd5['message']);if(_0x149dd5['location']&&_0xba37bf){const _0x3ffcfc=_0xba37bf[_0x15ec17(0x1dc)]('\x0a'),{line:_0x40817b,column:_0x350573}=_0x149dd5[_0x15ec17(0x1d7)],_0x533db0=Math[_0x15ec17(0x1e6)](0x1,_0x40817b-0x1),_0xa50567=Math[_0x15ec17(0x1d0)](_0x3ffcfc[_0x15ec17(0x1c8)],_0x40817b+0x1);_0x5931e4[_0x15ec17(0x1d4)]('');for(let _0x46a10c=_0x533db0;_0x46a10c<=_0xa50567;_0x46a10c++){const _0x8bbbb1=_0x3ffcfc[_0x46a10c-0x1]||'',_0x1e2986=a154_0x536d5b[_0x15ec17(0x1d2)](_0x46a10c['toString']()[_0x15ec17(0x1db)](0x4)),_0xb89945=a154_0x536d5b['dim'](_0x15ec17(0x1cd));if(_0x46a10c===_0x40817b){_0x5931e4[_0x15ec17(0x1d4)]('\x20\x20'+_0x1e2986+_0xb89945+_0x18b009(_0x8bbbb1));const _0x781d21='\x20'[_0x15ec17(0x1df)](0x4+0x3+_0x350573-0x1);_0x5931e4[_0x15ec17(0x1d4)]('\x20\x20'+_0x781d21+_0x18b009('^'));}else _0x5931e4['push']('\x20\x20'+_0x1e2986+_0xb89945+a154_0x536d5b['dim'](_0x8bbbb1));}}return _0x5931e4[_0x15ec17(0x1d5)]('\x0a');}export function formatValidationResult(_0x15778e,_0x231428,_0xccc998){const _0x2b32e3=a154_0x4732,_0x539c26=[];for(const _0xdd957 of _0x15778e[_0x2b32e3(0x1d3)]){_0x539c26[_0x2b32e3(0x1d4)](formatIssueWithContext(_0xdd957,_0x231428,_0xccc998)),_0x539c26[_0x2b32e3(0x1d4)]('');}for(const _0xd16653 of _0x15778e['warnings']){_0x539c26['push'](formatIssueWithContext(_0xd16653,_0x231428,_0xccc998)),_0x539c26[_0x2b32e3(0x1d4)]('');}return _0x539c26[_0x2b32e3(0x1d5)]('\x0a');}function a154_0x5b95(){const _0x2f5bc7=['319122hPFqnf','length','success','code','level','cyan','\x20|\x20','4024782BJtaTV','safeParse','min','556109BPrnwL','dim','errors','push','join','7IlrWtp','location','YAML\x20validation\x20error\x20at\x20\x27','getIn','red','padStart','split','message','1382165nfIZZv','repeat','invalid_union','map','range','flatMap','yellow','number','max','path','YAML\x20validation\x20error:\x20','3590379fkSQbr','object','6787656bVdmQU','data','column','parse','\x27:\x20','787984OGCpmS','match','28QRnUsd','error','line'];a154_0x5b95=function(){return _0x2f5bc7;};return a154_0x5b95();}
|