@treasuredata/tdx 0.29.2 → 0.29.3
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/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/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/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/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/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/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(_0x28c43d,_0x57cd95){const _0x3a867a=a132_0x2c21,_0x25cf13=_0x28c43d();while(!![]){try{const _0x163d68=-parseInt(_0x3a867a(0x1d2))/0x1*(parseInt(_0x3a867a(0x1bd))/0x2)+-parseInt(_0x3a867a(0x1dc))/0x3*(-parseInt(_0x3a867a(0x1ec))/0x4)+-parseInt(_0x3a867a(0x1a8))/0x5*(parseInt(_0x3a867a(0x1c9))/0x6)+parseInt(_0x3a867a(0x1c8))/0x7+-parseInt(_0x3a867a(0x1c3))/0x8*(-parseInt(_0x3a867a(0x1c4))/0x9)+parseInt(_0x3a867a(0x1ab))/0xa+-parseInt(_0x3a867a(0x1ea))/0xb*(parseInt(_0x3a867a(0x1ad))/0xc);if(_0x163d68===_0x57cd95)break;else _0x25cf13['push'](_0x25cf13['shift']());}catch(_0x586671){_0x25cf13['push'](_0x25cf13['shift']());}}}(a132_0x32e9,0x1ad77));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a132_0x32e9(){const _0x522154=['filter','.source','Behavior\x20source\x20\x27','params','EMPTY_CONDITIONS','conditions','attribute','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','.type','MISSING_SEGMENT_REFERENCE','message','MISSING_BETWEEN_BOUNDS','error','And','invalid_value','46454klpBLW','validationCode','rule','success','NESTED_CONDITION_GROUP','SEGMENT_SCHEMA_ERROR','56WrumAZ','235737XVltYF','level','.attribute','warning','952504gphHRp','10902zwDLpe','push','BEHAVIOR_SOURCE_MISSING_FILTER','INVALID_OPERATOR_TYPE','match','INVALID_ARRAY_MATCHING','issues','Attribute\x20\x27','endsWith','5ONIxJw','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','.conditions[','document','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','safeParse','MISSING_OPERATOR_VALUE','.conditions','48kpalBC','Attribute\x20name\x20cannot\x20be\x20empty','source','rule.type','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','path','data','symbol','aggregation','arrayMatching','length','INVALID_RULE_TYPE','Value','EMPTY_ATTRIBUTE','1171874CQESCk','\x27\x20with\x20attribute\x20\x27','17412fUNvpr','custom','map','.filter','175CowrgO','skipSchema','type','71360uockzN','code','12CBiJRC'];a132_0x32e9=function(){return _0x522154;};return a132_0x32e9();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x6219eb,_0x3e9514={},_0x21556d={}){const _0x3cebdb=a132_0x2c21;if(_0x21556d[_0x3cebdb(0x1a9)])return runSemanticChecks(_0x6219eb,_0x3e9514);const _0x111b0f=SegmentDefSchema[_0x3cebdb(0x1d9)](_0x6219eb);if(_0x111b0f[_0x3cebdb(0x1c0)])return runSemanticChecks(_0x111b0f[_0x3cebdb(0x1e2)],_0x3e9514);return zodErrorsToValidationResult(_0x111b0f[_0x3cebdb(0x1ba)],_0x3e9514);}export function validateRuleDef(_0x51b6f5,_0x3a24c3,_0x263c13){const _0x4ef17f=a132_0x2c21;if(!_0x51b6f5)return[];const _0x2fb857=RuleDefSchema[_0x4ef17f(0x1d9)](_0x51b6f5);if(_0x2fb857[_0x4ef17f(0x1c0)])return checkRule(_0x2fb857[_0x4ef17f(0x1e2)],_0x3a24c3,_0x263c13);const _0x2b62d7=flattenZodIssues(_0x2fb857[_0x4ef17f(0x1ba)][_0x4ef17f(0x1cf)]);return _0x2b62d7[_0x4ef17f(0x1a6)](_0xd8f644=>{const _0x263496=_0x4ef17f,_0x142e2e=formatZodPath(_0xd8f644[_0x263496(0x1e1)]),_0x5e9040=_0x142e2e?_0x3a24c3+'.'+_0x142e2e:_0x3a24c3,_0x429785=mapZodIssueToCode(_0xd8f644,_0x142e2e),_0x5a937c=getLocationFromPath(_0x263c13[_0x263496(0x1d6)],_0x263c13[_0x263496(0x1de)],pathToArray(_0x5e9040));return{'level':_0x263496(0x1ba),'path':_0x5e9040,'code':_0x429785,'message':_0xd8f644[_0x263496(0x1b8)],..._0x5a937c&&{'location':_0x5a937c}};});}function zodErrorsToValidationResult(_0x5845fe,_0x5bf699){const _0x1dc8e9=a132_0x2c21,_0x571007=flattenZodIssues(_0x5845fe[_0x1dc8e9(0x1cf)]),_0x312a11=_0x571007[_0x1dc8e9(0x1a6)](_0x20e4da=>{const _0x4c0b27=_0x1dc8e9,_0x14a430=formatZodPath(_0x20e4da['path']),_0xa2c451=mapZodIssueToCode(_0x20e4da,_0x14a430),_0x38648d=getLocationFromPath(_0x5bf699[_0x4c0b27(0x1d6)],_0x5bf699[_0x4c0b27(0x1de)],_0x20e4da[_0x4c0b27(0x1e1)]['map'](_0xd2a9d4=>typeof _0xd2a9d4===_0x4c0b27(0x1e3)?String(_0xd2a9d4):_0xd2a9d4));return{'level':_0x4c0b27(0x1ba),'path':_0x14a430,'code':_0xa2c451,'message':_0x20e4da['message'],..._0x38648d&&{'location':_0x38648d}};});return{'valid':![],'errors':_0x312a11,'warnings':[]};}function a132_0x2c21(_0x3f9cc0,_0x3d14fd){_0x3f9cc0=_0x3f9cc0-0x1a6;const _0x32e941=a132_0x32e9();let _0x2c2149=_0x32e941[_0x3f9cc0];return _0x2c2149;}function mapZodIssueToCode(_0x40d4d5,_0x349c28){const _0x5a308d=a132_0x2c21,_0x29b46f=_0x40d4d5[_0x5a308d(0x1ac)]===_0x5a308d(0x1ed)?_0x40d4d5[_0x5a308d(0x1b1)]:undefined;if(_0x349c28==='name')return'MISSING_NAME';if(_0x349c28==='rule.type'||_0x349c28[_0x5a308d(0x1d1)](_0x5a308d(0x1b6))){if(_0x40d4d5['code']===_0x5a308d(0x1bc)){if(_0x349c28===_0x5a308d(0x1df)||_0x349c28[_0x5a308d(0x1cd)](/\.conditions\[\d+\]\.type$/))return _0x5a308d(0x1e7);}}if(_0x349c28[_0x5a308d(0x1d1)]('.operator.type'))return _0x5a308d(0x1cc);if(_0x349c28['endsWith']('.operator.value'))return _0x5a308d(0x1da);if(_0x29b46f?.[_0x5a308d(0x1be)]===_0x5a308d(0x1b9))return'MISSING_BETWEEN_BOUNDS';if(_0x29b46f?.[_0x5a308d(0x1be)]==='MISSING_TIME_UNIT')return'MISSING_TIME_UNIT';if(_0x349c28['endsWith'](_0x5a308d(0x1db))||_0x349c28===_0x5a308d(0x1b3))return'MISSING_CONDITIONS';if(_0x349c28['includes'](_0x5a308d(0x1e5)))return _0x5a308d(0x1ce);if(_0x349c28[_0x5a308d(0x1d1)]('.segment'))return _0x5a308d(0x1b7);return _0x5a308d(0x1c2);}function runSemanticChecks(_0x2c01ff,_0x3b1c18){const _0x1fddec=a132_0x2c21,_0x2fc527=[];_0x2c01ff[_0x1fddec(0x1bf)]&&_0x2fc527['push'](...checkRule(_0x2c01ff['rule'],_0x1fddec(0x1bf),_0x3b1c18));const _0x2055d3=_0x2fc527[_0x1fddec(0x1ae)](_0x2c2edd=>_0x2c2edd[_0x1fddec(0x1c5)]===_0x1fddec(0x1ba)),_0x28b2ae=_0x2fc527[_0x1fddec(0x1ae)](_0x4c69cd=>_0x4c69cd['level']===_0x1fddec(0x1c7));return{'valid':_0x2055d3[_0x1fddec(0x1e6)]===0x0,'errors':_0x2055d3,'warnings':_0x28b2ae};}function checkRule(_0x32bb64,_0x25b9f8,_0x5d0b8c){const _0x5165dd=a132_0x2c21,_0x4beed2=[];if(_0x32bb64['conditions'][_0x5165dd(0x1e6)]===0x0)return _0x4beed2[_0x5165dd(0x1ca)]({'level':_0x5165dd(0x1ba),'path':_0x25b9f8+_0x5165dd(0x1db),'code':'EMPTY_CONDITIONS','message':_0x5165dd(0x1d4),'location':getLocationFromPath(_0x5d0b8c[_0x5165dd(0x1d6)],_0x5d0b8c[_0x5165dd(0x1de)],pathToArray(_0x25b9f8+_0x5165dd(0x1db)))}),_0x4beed2;return _0x4beed2['push'](...checkConditions(_0x32bb64[_0x5165dd(0x1b3)],_0x25b9f8,_0x5d0b8c)),_0x4beed2;}function checkConditions(_0x5e8084,_0x61ef15,_0x200fdb){const _0x3156ce=a132_0x2c21,_0x56e94b=[];for(let _0x2396eb=0x0;_0x2396eb<_0x5e8084[_0x3156ce(0x1e6)];_0x2396eb++){const _0x4f808c=_0x5e8084[_0x2396eb],_0x14782b=_0x61ef15+_0x3156ce(0x1d5)+_0x2396eb+']';_0x56e94b['push'](...checkCondition(_0x4f808c,_0x14782b,_0x200fdb));}return _0x56e94b;}function checkCondition(_0x153242,_0x3c4732,_0x38de92){const _0xa569f4=a132_0x2c21,_0x1d84b9=[];if(_0x153242[_0xa569f4(0x1aa)]===_0xa569f4(0x1bb)||_0x153242['type']==='Or')return _0x153242[_0xa569f4(0x1b3)][_0xa569f4(0x1e6)]===0x0?_0x1d84b9[_0xa569f4(0x1ca)]({'level':_0xa569f4(0x1ba),'path':_0x3c4732+'.conditions','code':_0xa569f4(0x1b2),'message':_0x153242[_0xa569f4(0x1aa)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x38de92[_0xa569f4(0x1d6)],_0x38de92[_0xa569f4(0x1de)],pathToArray(_0x3c4732+_0xa569f4(0x1db)))}):_0x1d84b9[_0xa569f4(0x1ca)]({'level':_0xa569f4(0x1ba),'path':_0x3c4732,'code':_0xa569f4(0x1c1),'message':_0x153242['type']+_0xa569f4(0x1e0)+_0xa569f4(0x1d3)+'use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x38de92[_0xa569f4(0x1d6)],_0x38de92['source'],pathToArray(_0x3c4732))}),_0x1d84b9;if(_0x153242[_0xa569f4(0x1aa)]===_0xa569f4(0x1e8)||_0x153242[_0xa569f4(0x1aa)]==='Behavior'){const _0x50a504=_0x153242,_0x5229e2=_0x50a504[_0xa569f4(0x1de)],_0x169077=_0x50a504[_0xa569f4(0x1e4)],_0x230297=_0x5229e2||_0x169077;(!_0x50a504[_0xa569f4(0x1b4)]||_0x50a504[_0xa569f4(0x1b4)]==='')&&(!_0x230297&&_0x1d84b9[_0xa569f4(0x1ca)]({'level':_0xa569f4(0x1ba),'path':_0x3c4732+_0xa569f4(0x1c6),'code':_0xa569f4(0x1e9),'message':_0xa569f4(0x1dd),'location':getLocationFromPath(_0x38de92['document'],_0x38de92[_0xa569f4(0x1de)],pathToArray(_0x3c4732+_0xa569f4(0x1c6)))}));_0x50a504[_0xa569f4(0x1ae)]&&_0x1d84b9['push'](...checkRule(_0x50a504['filter'],_0x3c4732+_0xa569f4(0x1a7),_0x38de92));if(_0x50a504[_0xa569f4(0x1de)]){const _0x1a8a90=_0x50a504[_0xa569f4(0x1b4)]&&_0x50a504[_0xa569f4(0x1b4)]!=='';_0x1a8a90&&!_0x50a504[_0xa569f4(0x1ae)]&&_0x1d84b9['push']({'level':_0xa569f4(0x1ba),'path':_0x3c4732+_0xa569f4(0x1af),'code':_0xa569f4(0x1cb),'message':_0xa569f4(0x1b0)+_0x50a504[_0xa569f4(0x1de)]+_0xa569f4(0x1eb)+_0x50a504[_0xa569f4(0x1b4)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0xa569f4(0x1d7)+_0xa569f4(0x1d8),'location':getLocationFromPath(_0x38de92['document'],_0x38de92[_0xa569f4(0x1de)],pathToArray(_0x3c4732+_0xa569f4(0x1af)))}),_0x1a8a90&&_0x50a504[_0xa569f4(0x1ae)]&&_0x1d84b9['push']({'level':'warning','path':_0x3c4732+'.attribute','code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0xa569f4(0x1d0)+_0x50a504['attribute']+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+_0xa569f4(0x1b5),'location':getLocationFromPath(_0x38de92['document'],_0x38de92[_0xa569f4(0x1de)],pathToArray(_0x3c4732+_0xa569f4(0x1c6)))});}}return _0x1d84b9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34240e,_0x25a60d){const _0x39e32c=a133_0x3b52,_0x428d46=_0x34240e();while(!![]){try{const _0x48dd2b=parseInt(_0x39e32c(0x1f1))/0x1*(parseInt(_0x39e32c(0x1e8))/0x2)+parseInt(_0x39e32c(0x213))/0x3*(-parseInt(_0x39e32c(0x218))/0x4)+-parseInt(_0x39e32c(0x1ee))/0x5*(parseInt(_0x39e32c(0x20f))/0x6)+parseInt(_0x39e32c(0x1f4))/0x7*(-parseInt(_0x39e32c(0x208))/0x8)+-parseInt(_0x39e32c(0x1f5))/0x9*(-parseInt(_0x39e32c(0x1ea))/0xa)+parseInt(_0x39e32c(0x1f6))/0xb*(-parseInt(_0x39e32c(0x216))/0xc)+parseInt(_0x39e32c(0x20d))/0xd*(parseInt(_0x39e32c(0x1f2))/0xe);if(_0x48dd2b===_0x25a60d)break;else _0x428d46['push'](_0x428d46['shift']());}catch(_0x3300ed){_0x428d46['push'](_0x428d46['shift']());}}}(a133_0x23ed,0xdebf8));import a133_0xc72b4b from'path';function a133_0x23ed(){const _0x26a36a=['144lKDsKo','1371337XOCOol','exists','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','File\x20not\x20found','join','basename','segment','match','root','isFile','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','parentSegment','parse','parent_name','trim','context','File\x20not\x20found:\x20','replace','424WTzlyt','type','extname','scopedFolderPath','readFile','13ZYyxXf','file_not_found','154272VedPCN','Parent\x20segment\x20not\x20specified','isScoped','tdx.json','39jDJhVG','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','relative','12afoQml','file','214736TZTOut','cwd','dirname','configDir','parent_segment','message','invalid_yaml','error','includes','journey','segmentName','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','1320366ExkGWX','No\x20tdx.json\x20found\x20for\x20file:\x20','905340jNBVrr','no_config','resolve','Not\x20a\x20YAML\x20file:\x20','130OlCDKo','folderPath','resourceType','2xSQvsa','14399602DwyGia','directory','184114QigqeF'];a133_0x23ed=function(){return _0x26a36a;};return a133_0x23ed();}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';function a133_0x3b52(_0x563b9d,_0xa4ccb5){_0x563b9d=_0x563b9d-0x1e7;const _0x23ed4f=a133_0x23ed();let _0x3b52f0=_0x23ed4f[_0x563b9d];return _0x3b52f0;}export function isSuccessfulResolution(_0x3b6bec){const _0x43a63e=a133_0x3b52;return _0x3b6bec['type']!==_0x43a63e(0x21f);}export function isScopedResolution(_0x3801e9){const _0x1cff9e=a133_0x3b52;return _0x3801e9[_0x1cff9e(0x209)]===_0x1cff9e(0x1f3)||_0x3801e9['type']===_0x1cff9e(0x217)||_0x3801e9[_0x1cff9e(0x209)]===_0x1cff9e(0x205);}export function getScopedDetails(_0x47d536){const _0x307c37=a133_0x3b52;if(isScopedResolution(_0x47d536))return{'isScoped':_0x47d536['isScoped'],'scopedFolderPath':_0x47d536[_0x307c37(0x20b)]};return undefined;}async function findTdxConfigAsync(_0x2c4fd2,_0x10904c){const _0x598fc7=a133_0x3b52;let _0x2eb590=a133_0xc72b4b[_0x598fc7(0x1ec)](_0x2c4fd2);const _0x5e454b=a133_0xc72b4b[_0x598fc7(0x202)](_0x2eb590)[_0x598fc7(0x1fe)];while(_0x2eb590!==_0x5e454b){const _0x6c089f=a133_0xc72b4b[_0x598fc7(0x1fa)](_0x2eb590,_0x598fc7(0x212));if(await _0x10904c[_0x598fc7(0x1f7)](_0x6c089f))try{const _0x301f53=await _0x10904c[_0x598fc7(0x20c)](_0x6c089f),_0x8fb80=JSON[_0x598fc7(0x202)](_0x301f53);if(_0x8fb80[_0x598fc7(0x21c)]&&typeof _0x8fb80[_0x598fc7(0x21c)]==='string')return{'configPath':_0x6c089f,'configDir':_0x2eb590,'parentSegment':_0x8fb80[_0x598fc7(0x21c)]};}catch{}_0x2eb590=a133_0xc72b4b[_0x598fc7(0x21a)](_0x2eb590);}return null;}function calculateScopedPath(_0x368535,_0x242294){const _0x5d88db=a133_0x3b52,_0xf893fd=a133_0xc72b4b[_0x5d88db(0x215)](_0x242294,_0x368535),_0x29eb47=_0xf893fd!==''&&_0xf893fd!=='.'&&!_0xf893fd['startsWith']('..');return{'isScoped':_0x29eb47,'scopedFolderPath':_0x29eb47?_0xf893fd[_0x5d88db(0x207)](/\\/g,'/'):''};}export async function resolveTarget(_0x1ea941){const _0x14288c=a133_0x3b52,{arg:_0x566a40,contextParent:_0x5896e9,cwd:cwd=process[_0x14288c(0x219)](),fs:fs=nodeFileSystem}=_0x1ea941;if(_0x566a40&&isYamlFilePath(_0x566a40))try{const _0x42ecce=await resolveYamlFilePath(_0x566a40,fs),_0x105667=a133_0xc72b4b[_0x14288c(0x1ec)](_0x566a40),_0x1f93d2=a133_0xc72b4b[_0x14288c(0x21a)](_0x105667),_0x228233=await findTdxConfigAsync(_0x1f93d2,fs);if(!_0x228233){if(_0x5896e9){const _0x49a352=a133_0xc72b4b[_0x14288c(0x21a)](_0x105667);return{'type':_0x14288c(0x217),'parentName':_0x5896e9,'targetDir':_0x49a352,'configRoot':_0x49a352,'filePath':_0x105667,'resourceName':_0x42ecce[_0x14288c(0x222)],'folderPath':_0x42ecce[_0x14288c(0x1ef)],'resourceType':_0x42ecce[_0x14288c(0x1f0)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x14288c(0x21f),'errorCode':'no_config','message':_0x14288c(0x1e9)+_0x566a40,'arg':_0x566a40,'helpText':_0x14288c(0x1f8)};}const _0x3acb92=calculateScopedPath(_0x1f93d2,_0x228233[_0x14288c(0x21b)]);return{'type':_0x14288c(0x217),'parentName':_0x228233[_0x14288c(0x201)],'targetDir':_0x228233[_0x14288c(0x21b)],'configRoot':_0x228233[_0x14288c(0x21b)],'filePath':_0x105667,'resourceName':_0x42ecce[_0x14288c(0x222)],'folderPath':_0x42ecce[_0x14288c(0x1ef)],'resourceType':_0x42ecce[_0x14288c(0x1f0)],'isScoped':_0x3acb92[_0x14288c(0x211)],'scopedFolderPath':_0x3acb92[_0x14288c(0x20b)]};}catch(_0x47b96a){const _0x27f04c=_0x47b96a instanceof Error?_0x47b96a[_0x14288c(0x21d)]:String(_0x47b96a);if(_0x27f04c[_0x14288c(0x220)](_0x14288c(0x1f9)))return{'type':_0x14288c(0x21f),'errorCode':_0x14288c(0x20e),'message':_0x14288c(0x206)+_0x566a40,'arg':_0x566a40};if(_0x27f04c[_0x14288c(0x220)]('No\x20tdx.json\x20found')){if(_0x5896e9){const _0x4bbc5b=a133_0xc72b4b[_0x14288c(0x1ec)](_0x566a40);if(await fs['exists'](_0x4bbc5b)){const _0x512a6c=a133_0xc72b4b[_0x14288c(0x21a)](_0x4bbc5b),_0x4d2a22=await fs['readFile'](_0x4bbc5b),_0x10c279=_0x4d2a22[_0x14288c(0x1fd)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1a7b98=_0x4d2a22['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x520227=_0x10c279?_0x10c279[0x1][_0x14288c(0x204)]():a133_0xc72b4b[_0x14288c(0x1fb)](_0x566a40,a133_0xc72b4b[_0x14288c(0x20a)](_0x566a40)),_0x575290=_0x1a7b98&&_0x1a7b98[0x1][_0x14288c(0x204)]()==='journey'?_0x14288c(0x221):_0x14288c(0x1fc);return{'type':_0x14288c(0x217),'parentName':_0x5896e9,'targetDir':_0x512a6c,'configRoot':_0x512a6c,'filePath':_0x4bbc5b,'resourceName':_0x520227,'folderPath':'','resourceType':_0x575290,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x14288c(0x21f),'errorCode':'no_config','message':_0x14288c(0x1e9)+_0x566a40,'arg':_0x566a40,'helpText':_0x14288c(0x1f8)};}return{'type':'error','errorCode':'invalid_yaml','message':_0x27f04c,'arg':_0x566a40};}if(_0x566a40){const _0x5cbe7f=a133_0xc72b4b[_0x14288c(0x1ec)](cwd,_0x566a40);let _0x2e73f3=null;try{_0x2e73f3=await fs['stat'](_0x5cbe7f);}catch{}if(_0x2e73f3?.['isDirectory']()){const _0x8be8eb=await findTdxConfigAsync(_0x5cbe7f,fs);if(_0x8be8eb){const _0x347e28=calculateScopedPath(_0x5cbe7f,_0x8be8eb[_0x14288c(0x21b)]);return{'type':_0x14288c(0x1f3),'parentName':_0x8be8eb[_0x14288c(0x201)],'targetDir':_0x5cbe7f,'configRoot':_0x8be8eb[_0x14288c(0x21b)],'isScoped':_0x347e28[_0x14288c(0x211)],'scopedFolderPath':_0x347e28['scopedFolderPath']};}if(_0x5896e9)return{'type':_0x14288c(0x1f3),'parentName':_0x5896e9,'targetDir':_0x5cbe7f,'configRoot':_0x5cbe7f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x14288c(0x21f),'errorCode':_0x14288c(0x1eb),'message':_0x14288c(0x200)+_0x566a40,'arg':_0x566a40,'helpText':_0x14288c(0x1f8)};}if(_0x2e73f3?.[_0x14288c(0x1ff)]())return{'type':_0x14288c(0x21f),'errorCode':_0x14288c(0x21e),'message':_0x14288c(0x1ed)+_0x566a40,'arg':_0x566a40,'helpText':_0x14288c(0x214)};const _0x516cdc=sanitizeFileName(_0x566a40),_0xaeab02=getSegmentRootDir(_0x516cdc,cwd);return{'type':_0x14288c(0x203),'parentName':_0x566a40,'targetDir':_0xaeab02,'configRoot':_0xaeab02};}const _0x3721bd=await findTdxConfigAsync(cwd,fs);if(_0x3721bd){const _0x424aee=calculateScopedPath(cwd,_0x3721bd['configDir']);return{'type':_0x14288c(0x205),'parentName':_0x3721bd[_0x14288c(0x201)],'targetDir':cwd,'configRoot':_0x3721bd[_0x14288c(0x21b)],'isScoped':_0x424aee[_0x14288c(0x211)],'scopedFolderPath':_0x424aee[_0x14288c(0x20b)]};}if(_0x5896e9){const _0x13f4d7=sanitizeFileName(_0x5896e9),_0x5668ca=getSegmentRootDir(_0x13f4d7,cwd);return{'type':'context','parentName':_0x5896e9,'targetDir':_0x5668ca,'configRoot':_0x5668ca,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x14288c(0x21f),'errorCode':'no_parent','message':_0x14288c(0x210),'helpText':_0x14288c(0x1e7)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0x88b1(){const _0x3b5d6f=['tdx.json','6515cjskvU','dirname','1104680MTMPWY','48720qMzEqI','replace','segments','engage_workspace','cwd','351NMjaDF','Invalid\x20tdx.json:\x20expected\x20object','2844336XEuwgG','join','4PfEuCa','parent_segment','228MZMBZu','root','parse','1OJfwpr','startsWith','253202fHrGhX','193491YralZJ','utf-8','477869DTPsTU','resolve','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field'];a134_0x88b1=function(){return _0x3b5d6f;};return a134_0x88b1();}const a134_0x1625b1=a134_0x2026;(function(_0x4fab5b,_0x29fdb6){const _0x20a95b=a134_0x2026,_0x485d8c=_0x4fab5b();while(!![]){try{const _0x4724ef=-parseInt(_0x20a95b(0x143))/0x1*(-parseInt(_0x20a95b(0x145))/0x2)+parseInt(_0x20a95b(0x146))/0x3*(parseInt(_0x20a95b(0x13e))/0x4)+-parseInt(_0x20a95b(0x132))/0x5*(parseInt(_0x20a95b(0x140))/0x6)+-parseInt(_0x20a95b(0x148))/0x7+parseInt(_0x20a95b(0x134))/0x8+parseInt(_0x20a95b(0x13a))/0x9*(parseInt(_0x20a95b(0x135))/0xa)+-parseInt(_0x20a95b(0x13c))/0xb;if(_0x4724ef===_0x29fdb6)break;else _0x485d8c['push'](_0x485d8c['shift']());}catch(_0x30f52d){_0x485d8c['push'](_0x485d8c['shift']());}}}(a134_0x88b1,0x22df2));import{existsSync,readFileSync}from'fs';import a134_0x47126f from'path';const TDX_CONFIG_FILE=a134_0x1625b1(0x131),SEGMENTS_DIR=a134_0x1625b1(0x137);function a134_0x2026(_0x1a7d01,_0x2ca4ec){_0x1a7d01=_0x1a7d01-0x130;const _0x88b14b=a134_0x88b1();let _0x2026d5=_0x88b14b[_0x1a7d01];return _0x2026d5;}export function findTdxConfigPath(_0x5eb627=process[a134_0x1625b1(0x139)]()){const _0xfa55bd=a134_0x1625b1;let _0x1278d8=a134_0x47126f[_0xfa55bd(0x149)](_0x5eb627);const _0x4dfa89=a134_0x47126f[_0xfa55bd(0x142)](_0x1278d8)[_0xfa55bd(0x141)];while(_0x1278d8!==_0x4dfa89){const _0x3eb658=a134_0x47126f[_0xfa55bd(0x13d)](_0x1278d8,TDX_CONFIG_FILE);if(existsSync(_0x3eb658))return _0x3eb658;_0x1278d8=a134_0x47126f[_0xfa55bd(0x133)](_0x1278d8);}return null;}export function loadTdxConfig(_0x47dba2){const _0x1ae52b=a134_0x1625b1,_0x375af4=readFileSync(_0x47dba2,_0x1ae52b(0x147));let _0x474969;try{_0x474969=JSON[_0x1ae52b(0x142)](_0x375af4);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x47dba2);}if(!_0x474969||typeof _0x474969!=='object')throw new Error(_0x1ae52b(0x13b));const _0x3790b6=_0x474969,_0x32cf88=_0x3790b6[_0x1ae52b(0x13f)]&&typeof _0x3790b6[_0x1ae52b(0x13f)]==='string',_0x555f8f=_0x3790b6[_0x1ae52b(0x138)]&&typeof _0x3790b6[_0x1ae52b(0x138)]==='string';if(!_0x32cf88&&!_0x555f8f)throw new Error(_0x1ae52b(0x130));const _0x10ae2c={};return _0x32cf88&&(_0x10ae2c[_0x1ae52b(0x13f)]=_0x3790b6['parent_segment']),_0x555f8f&&(_0x10ae2c['engage_workspace']=_0x3790b6['engage_workspace']),_0x10ae2c;}export function findTdxConfig(_0x208888=process[a134_0x1625b1(0x139)]()){const _0x297725=a134_0x1625b1,_0x231443=findTdxConfigPath(_0x208888);if(!_0x231443)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x56ed24=loadTdxConfig(_0x231443),_0x43c34f=a134_0x47126f[_0x297725(0x133)](_0x231443);return{'config':_0x56ed24,'configPath':_0x231443,'configDir':_0x43c34f};}export function tryFindTdxConfig(_0x7dd9ed){try{return findTdxConfig(_0x7dd9ed);}catch{return null;}}export function getSegmentRootDir(_0x24c42e,_0x387cc7=process[a134_0x1625b1(0x139)]()){return a134_0x47126f['join'](_0x387cc7,SEGMENTS_DIR,_0x24c42e);}export function getTdxConfigPath(_0x23f19f,_0x5ae97d=process[a134_0x1625b1(0x139)]()){const _0x36aa3a=a134_0x1625b1;return a134_0x47126f[_0x36aa3a(0x13d)](getSegmentRootDir(_0x23f19f,_0x5ae97d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2816b5,_0x36e2fa){const _0x10ffd3=a134_0x1625b1,_0x138486=a134_0x47126f[_0x10ffd3(0x149)](_0x2816b5),_0x4b4692=a134_0x47126f['relative'](_0x36e2fa,_0x138486);if(_0x4b4692[_0x10ffd3(0x144)]('..'))return'';return _0x4b4692;}export function localPathToTdFolderPath(_0x29bbdb){const _0x4a43b0=a134_0x1625b1,_0xb7d3b1=a134_0x47126f[_0x4a43b0(0x133)](_0x29bbdb);if(_0xb7d3b1==='.'||_0xb7d3b1==='')return'';return _0xb7d3b1[_0x4a43b0(0x136)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x4a856a,_0x3bbae0){const _0x2ae478=a134_0x1625b1;if(!_0x4a856a)return _0x3bbae0;return a134_0x47126f[_0x2ae478(0x13d)](_0x3bbae0,_0x4a856a);}export function createTdxConfigContent(_0x5c93bc){const _0x46e991={'parent_segment':_0x5c93bc};return JSON['stringify'](_0x46e991,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x1842bc){const _0x4088b3={'engage_workspace':_0x1842bc};return JSON['stringify'](_0x4088b3,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x605348=a135_0xa34d;(function(_0x54ab48,_0x191b02){const _0x19a4a9=a135_0xa34d,_0xb308ef=_0x54ab48();while(!![]){try{const _0x20b02e=-parseInt(_0x19a4a9(0x96))/0x1+-parseInt(_0x19a4a9(0x8c))/0x2*(-parseInt(_0x19a4a9(0x98))/0x3)+parseInt(_0x19a4a9(0x8f))/0x4+-parseInt(_0x19a4a9(0x93))/0x5*(parseInt(_0x19a4a9(0x82))/0x6)+-parseInt(_0x19a4a9(0x7d))/0x7+-parseInt(_0x19a4a9(0x7f))/0x8+parseInt(_0x19a4a9(0x80))/0x9;if(_0x20b02e===_0x191b02)break;else _0xb308ef['push'](_0xb308ef['shift']());}catch(_0x5eab89){_0xb308ef['push'](_0xb308ef['shift']());}}}(a135_0x5b9b,0x27021));import{z}from'zod';export const ScheduleTypeSchema=z[a135_0x605348(0x85)]([a135_0x605348(0x87),'hourly','daily',a135_0x605348(0x92),a135_0x605348(0xa1),'cron',a135_0x605348(0x83)]);export const RepeatUnitSchema=z[a135_0x605348(0x85)](['minute',a135_0x605348(0x90),a135_0x605348(0x81),a135_0x605348(0xa3),a135_0x605348(0x9a),'once',a135_0x605348(0x87)]);export const ScheduleDefSchema=z[a135_0x605348(0x89)]({'type':ScheduleTypeSchema[a135_0x605348(0xa0)](),'repeat_unit':RepeatUnitSchema[a135_0x605348(0xa0)](),'repeat_frequency':z[a135_0x605348(0x7b)]()[a135_0x605348(0xa0)](),'repeat_sub_frequency':z[a135_0x605348(0x8d)](z[a135_0x605348(0x7b)]())[a135_0x605348(0xa0)](),'start_at':z[a135_0x605348(0x8b)]()[a135_0x605348(0x9d)]()[a135_0x605348(0xa0)](),'end_on':z['string']()[a135_0x605348(0x9d)]()[a135_0x605348(0xa0)](),'timezone':z[a135_0x605348(0x8b)]()[a135_0x605348(0xa0)]()});function a135_0xa34d(_0x28e0f7,_0x1a2053){_0x28e0f7=_0x28e0f7-0x7b;const _0x5b9bd1=a135_0x5b9b();let _0xa34dc8=_0x5b9bd1[_0x28e0f7];return _0xa34dc8;}function a135_0x5b9b(){const _0x4881dd=['Top-N','15ClVTCj','First','month','boolean','cols','nullable','desc','rows','optional','monthly','asc','week','number','masked','2032149unNOAY','min','2077944wBHPuo','6089121MsOySV','day','6qHQeZF','minutes_interval','clear','enum','onFailure','none','union','object','Activation\x20name\x20is\x20required','string','86456XjEOIG','array','Connection\x20name\x20is\x20required','457864bYzRpI','hour','unknown','weekly','46055AGPEGE','All','Last','288137NHRSeM'];a135_0x5b9b=function(){return _0x4881dd;};return a135_0x5b9b();}export const NotificationDefSchema=z[a135_0x605348(0x89)]({'notify_on':z[a135_0x605348(0x8d)](z[a135_0x605348(0x85)](['onSuccess',a135_0x605348(0x86)]))[a135_0x605348(0xa0)](),'email_recipients':z[a135_0x605348(0x8d)](z['string']())[a135_0x605348(0xa0)]()});export const ActivationColumnDefSchema=z[a135_0x605348(0x88)]([z[a135_0x605348(0x8b)](),z[a135_0x605348(0x89)]({'name':z[a135_0x605348(0x8b)](),'type':z[a135_0x605348(0x8b)]()['optional'](),'visibility':z[a135_0x605348(0x85)](['clear',a135_0x605348(0x7c)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a135_0x605348(0x89)]({'columns':z['array'](z[a135_0x605348(0x89)]({'name':z[a135_0x605348(0x8b)](),'type':z['string']()[a135_0x605348(0xa0)](),'visibility':z[a135_0x605348(0x85)]([a135_0x605348(0x84),a135_0x605348(0x7c)])[a135_0x605348(0xa0)]()}))[a135_0x605348(0xa0)](),'behavior_table':z['string']()[a135_0x605348(0xa0)](),'join_row':z[a135_0x605348(0x7b)]()[a135_0x605348(0x9d)]()[a135_0x605348(0xa0)](),'join_strategy':z[a135_0x605348(0x85)]([a135_0x605348(0x94),a135_0x605348(0x99),a135_0x605348(0x95),a135_0x605348(0x97)])['optional'](),'formatting':z['enum']([a135_0x605348(0x9f),a135_0x605348(0x9c)])[a135_0x605348(0xa0)](),'order_by':z[a135_0x605348(0x8d)](z['object']({'key':z[a135_0x605348(0x8b)](),'order':z[a135_0x605348(0x85)]([a135_0x605348(0xa2),a135_0x605348(0x9e)])}))[a135_0x605348(0xa0)]()});export const ActivationDefSchema=z[a135_0x605348(0x89)]({'name':z[a135_0x605348(0x8b)]()[a135_0x605348(0x7e)](0x1,a135_0x605348(0x8a)),'description':z['string']()['optional'](),'connection':z[a135_0x605348(0x8b)]()[a135_0x605348(0x7e)](0x1,a135_0x605348(0x8e)),'all_columns':z['boolean']()['optional'](),'columns':z[a135_0x605348(0x8d)](ActivationColumnDefSchema)[a135_0x605348(0xa0)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a135_0x605348(0xa0)](),'connector_config':z['record'](z[a135_0x605348(0x8b)](),z[a135_0x605348(0x91)]())[a135_0x605348(0xa0)](),'activation_template_id':z[a135_0x605348(0x8b)]()[a135_0x605348(0x9d)]()[a135_0x605348(0xa0)](),'behavior':ActivationBehaviorDefSchema[a135_0x605348(0x9d)]()[a135_0x605348(0xa0)](),'run_after_journey_refresh':z[a135_0x605348(0x9b)]()[a135_0x605348(0xa0)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d48e5,_0x2603d6){var _0x103806=a136_0x11ee,_0x210e38=_0x2d48e5();while(!![]){try{var _0x5ab0bc=parseInt(_0x103806(0xd7))/0x1+-parseInt(_0x103806(0xda))/0x2*(parseInt(_0x103806(0xdb))/0x3)+-parseInt(_0x103806(0xdc))/0x4*(-parseInt(_0x103806(0xd5))/0x5)+-parseInt(_0x103806(0xd8))/0x6+-parseInt(_0x103806(0xd9))/0x7+-parseInt(_0x103806(0xdd))/0x8+parseInt(_0x103806(0xd6))/0x9;if(_0x5ab0bc===_0x2603d6)break;else _0x210e38['push'](_0x210e38['shift']());}catch(_0x22c669){_0x210e38['push'](_0x210e38['shift']());}}}(a136_0x147d,0x8c74f));function a136_0x11ee(_0x5749d5,_0x433866){_0x5749d5=_0x5749d5-0xd5;var _0x147dfe=a136_0x147d();var _0x11ee20=_0x147dfe[_0x5749d5];return _0x11ee20;}function a136_0x147d(){var _0x214aa1=['11829240gOkAoU','1091779osttcu','3539454fIghMK','5949104aMJaBk','2JegDxj','1365099UThdUY','936500zJXLvh','6980112gYsnJh','20DTONAF'];a136_0x147d=function(){return _0x214aa1;};return a136_0x147d();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x475b34=a137_0x459b;(function(_0x4a5f7c,_0x2c661d){const _0x1971d8=a137_0x459b,_0x176458=_0x4a5f7c();while(!![]){try{const _0x468895=parseInt(_0x1971d8(0x12d))/0x1*(-parseInt(_0x1971d8(0x124))/0x2)+-parseInt(_0x1971d8(0x13f))/0x3*(parseInt(_0x1971d8(0x138))/0x4)+parseInt(_0x1971d8(0x121))/0x5+-parseInt(_0x1971d8(0x137))/0x6+-parseInt(_0x1971d8(0x12f))/0x7+-parseInt(_0x1971d8(0x129))/0x8*(parseInt(_0x1971d8(0x134))/0x9)+parseInt(_0x1971d8(0x132))/0xa;if(_0x468895===_0x2c661d)break;else _0x176458['push'](_0x176458['shift']());}catch(_0x2c4192){_0x176458['push'](_0x176458['shift']());}}}(a137_0x5851,0xcf446));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a137_0x459b(_0x264b04,_0x258bb8){_0x264b04=_0x264b04-0x118;const _0x5851ec=a137_0x5851();let _0x459b8c=_0x5851ec[_0x264b04];return _0x459b8c;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a137_0x475b34(0x11d)]([a137_0x475b34(0x120),a137_0x475b34(0x13a),a137_0x475b34(0x127)]);export const ReentryModeTypeSchema=z['enum']([a137_0x475b34(0x130),a137_0x475b34(0x13d),a137_0x475b34(0x118)]);export const WaitUnitTypeSchema=z['enum'](['day',a137_0x475b34(0x11f)]);export const StepTypeValueSchema=z[a137_0x475b34(0x11d)]([a137_0x475b34(0x135),a137_0x475b34(0x126),a137_0x475b34(0x12c),'ab_test','merge',a137_0x475b34(0x123),a137_0x475b34(0x11b)]);export const EmbeddedSegmentDefSchema=z[a137_0x475b34(0x13c)]({'description':z['string']()[a137_0x475b34(0x140)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)]()});export const CriteriaDefSchema=z[a137_0x475b34(0x13c)]({'name':z[a137_0x475b34(0x143)](),'description':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'segment':z[a137_0x475b34(0x143)](),'target':JumpTargetDefSchema[a137_0x475b34(0x140)]()});const WaitConditionTimeoutDefSchema=z[a137_0x475b34(0x13c)]({'duration':z[a137_0x475b34(0x144)](),'unit':WaitUnitTypeSchema,'next':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)]()}),WaitConditionDefSchema=z[a137_0x475b34(0x13c)]({'segment':z[a137_0x475b34(0x143)](),'next':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'timeout':WaitConditionTimeoutDefSchema[a137_0x475b34(0x140)]()}),WaitStepParamsDefSchema=z[a137_0x475b34(0x13c)]({'duration':z[a137_0x475b34(0x144)]()[a137_0x475b34(0x140)](),'unit':WaitUnitTypeSchema[a137_0x475b34(0x140)](),'wait_until':z[a137_0x475b34(0x143)]()['optional'](),'condition':WaitConditionDefSchema[a137_0x475b34(0x140)](),'days_of_week':z['array'](z[a137_0x475b34(0x143)]())['optional']()}),StepBaseFields={'name':z['string'](),'uuid':z[a137_0x475b34(0x143)]()['optional'](),'next':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a137_0x475b34(0x135)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a137_0x475b34(0x13c)]({'activation':z['string']()}),ActivationStepDefSchema=z[a137_0x475b34(0x13c)]({...StepBaseFields,'type':z[a137_0x475b34(0x146)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a137_0x475b34(0x13c)]({'name':z[a137_0x475b34(0x143)](),'segment':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'segment_id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'excluded':z['boolean']()['optional'](),'next':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x12c)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a137_0x475b34(0x13c)]({'id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'name':z[a137_0x475b34(0x143)](),'percentage':z[a137_0x475b34(0x144)](),'next':z['string']()['optional']()}),AbTestStepParamsDefSchema=z[a137_0x475b34(0x13c)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a137_0x475b34(0x140)](),'customized_split':z['boolean']()[a137_0x475b34(0x140)]()}),AbTestStepDefSchema=z[a137_0x475b34(0x13c)]({...StepBaseFields,'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x11c)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a137_0x475b34(0x13c)]({...StepBaseFields,'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x13e))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x123)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a137_0x475b34(0x13c)]({...StepBaseFields,'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x11b))})[a137_0x475b34(0x125)]();export const StepDefSchema=z[a137_0x475b34(0x12a)](a137_0x475b34(0x12e),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a137_0x475b34(0x13c)]({'name':z[a137_0x475b34(0x143)](),'description':z[a137_0x475b34(0x143)]()['optional'](),'id':z[a137_0x475b34(0x143)]()['optional'](),'entry_criteria':CriteriaDefSchema[a137_0x475b34(0x140)](),'exit_criteria':z[a137_0x475b34(0x141)](CriteriaDefSchema)[a137_0x475b34(0x140)](),'milestone':CriteriaDefSchema[a137_0x475b34(0x140)](),'root_step':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'steps':z[a137_0x475b34(0x141)](StepDefSchema)[a137_0x475b34(0x140)]()});export const JourneyEntryDefSchema=z[a137_0x475b34(0x13c)]({'name':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'version':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'state':JourneyStateTypeSchema[a137_0x475b34(0x140)](),'latest':z[a137_0x475b34(0x11a)]()[a137_0x475b34(0x140)](),'stages':z['array'](StageDefSchema),'id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'version_number':z[a137_0x475b34(0x144)]()['optional'](),'goal':CriteriaDefSchema[a137_0x475b34(0x140)](),'reentry':ReentryModeTypeSchema[a137_0x475b34(0x140)]()});export const JourneyDefSchema=z[a137_0x475b34(0x136)](()=>z['object']({'type':z[a137_0x475b34(0x146)](a137_0x475b34(0x145)),'name':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x119)](0x1,a137_0x475b34(0x122)),'description':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'bundle_id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'bundle_name':z[a137_0x475b34(0x143)]()['optional'](),'folder_id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'reentry':ReentryModeTypeSchema[a137_0x475b34(0x140)](),'allow_reentry':z[a137_0x475b34(0x11a)]()[a137_0x475b34(0x140)](),'goal':CriteriaDefSchema['optional'](),'id':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'version':z[a137_0x475b34(0x143)]()[a137_0x475b34(0x140)](),'version_number':z[a137_0x475b34(0x144)]()[a137_0x475b34(0x140)](),'stages':z[a137_0x475b34(0x141)](StageDefSchema)[a137_0x475b34(0x140)](),'versions':z[a137_0x475b34(0x141)](JourneyEntryDefSchema)['optional'](),'journeys':z[a137_0x475b34(0x141)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a137_0x475b34(0x143)](),EmbeddedSegmentDefSchema)[a137_0x475b34(0x140)](),'activations':z[a137_0x475b34(0x11e)](z['string'](),ActivationDefSchema)[a137_0x475b34(0x140)]()})[a137_0x475b34(0x131)](_0x59788a=>{const _0x3a6a59=a137_0x475b34,_0x3c25a7=[_0x59788a[_0x3a6a59(0x133)],_0x59788a[_0x3a6a59(0x12b)],_0x59788a[_0x3a6a59(0x13b)]][_0x3a6a59(0x142)](_0x29307f=>Array[_0x3a6a59(0x128)](_0x29307f)&&_0x29307f[_0x3a6a59(0x139)]>0x0)[_0x3a6a59(0x139)];return _0x3c25a7===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));function a137_0x5851(){const _0x57575f=['enum','record','week','draft','3982660kBVytn','Journey\x20name\x20is\x20required','jump','206xQUDwk','passthrough','activation','launched','isArray','8931528nxSHOe','discriminatedUnion','stages','decision_point','5851HRhwyU','type','10280487FdNfNH','no_reentry','refine','45632130FEbWaN','journeys','9PdnScc','wait','lazy','7829412oppbGz','8oZJRga','length','simulation','versions','object','reentry_unless_goal_achieved','merge','27213hLRCuW','optional','array','filter','string','number','journey','literal','reentry_always','min','boolean','end','ab_test'];a137_0x5851=function(){return _0x57575f;};return a137_0x5851();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57eefd,_0x1c8221){var _0x57c0c7=a139_0x3662,_0x10d143=_0x57eefd();while(!![]){try{var _0x2ea39a=-parseInt(_0x57c0c7(0x1f1))/0x1+parseInt(_0x57c0c7(0x1ea))/0x2*(parseInt(_0x57c0c7(0x1ee))/0x3)+-parseInt(_0x57c0c7(0x1f4))/0x4*(parseInt(_0x57c0c7(0x1f3))/0x5)+parseInt(_0x57c0c7(0x1ed))/0x6*(parseInt(_0x57c0c7(0x1ec))/0x7)+parseInt(_0x57c0c7(0x1f0))/0x8+-parseInt(_0x57c0c7(0x1eb))/0x9*(parseInt(_0x57c0c7(0x1ef))/0xa)+parseInt(_0x57c0c7(0x1f2))/0xb;if(_0x2ea39a===_0x1c8221)break;else _0x10d143['push'](_0x10d143['shift']());}catch(_0x26aba9){_0x10d143['push'](_0x10d143['shift']());}}}(a139_0x439b,0x4d750));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a139_0x3662(_0x3d2e92,_0x359889){_0x3d2e92=_0x3d2e92-0x1ea;var _0x439b0e=a139_0x439b();var _0x366231=_0x439b0e[_0x3d2e92];return _0x366231;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a139_0x439b(){var _0x389c1d=['375914nKDlfI','6iFnYVh','573VyRldh','1531550OQEpUW','4373016cXguaj','562753uFDRCn','14185512jTCFMf','15YJbkpi','667996DfLRvB','1086IFyGhy','36pgNtWb'];a139_0x439b=function(){return _0x389c1d;};return a139_0x439b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x20f408=a140_0x5792;(function(_0xa53661,_0x5f13d3){const _0x17f4f=a140_0x5792,_0x4df585=_0xa53661();while(!![]){try{const _0x1533ec=-parseInt(_0x17f4f(0x161))/0x1+-parseInt(_0x17f4f(0x163))/0x2+parseInt(_0x17f4f(0x15b))/0x3*(parseInt(_0x17f4f(0x165))/0x4)+-parseInt(_0x17f4f(0x18f))/0x5*(parseInt(_0x17f4f(0x183))/0x6)+-parseInt(_0x17f4f(0x17a))/0x7*(-parseInt(_0x17f4f(0x15c))/0x8)+parseInt(_0x17f4f(0x143))/0x9*(parseInt(_0x17f4f(0x180))/0xa)+-parseInt(_0x17f4f(0x190))/0xb;if(_0x1533ec===_0x5f13d3)break;else _0x4df585['push'](_0x4df585['shift']());}catch(_0x805422){_0x4df585['push'](_0x4df585['shift']());}}}(a140_0x232e,0x5709d));function a140_0x5792(_0x432124,_0x47a980){_0x432124=_0x432124-0x13e;const _0x232eed=a140_0x232e();let _0x579289=_0x232eed[_0x432124];return _0x579289;}import{z}from'zod';export const OperatorTypeSchema=z[a140_0x20f408(0x149)]([a140_0x20f408(0x14e),a140_0x20f408(0x167),'Less','GreaterEqual',a140_0x20f408(0x16b),'In',a140_0x20f408(0x153),a140_0x20f408(0x168),'IsNull',a140_0x20f408(0x186),a140_0x20f408(0x178),a140_0x20f408(0x175),'StartWith',a140_0x20f408(0x157),a140_0x20f408(0x16d)]);export const TimeUnitSchema=z[a140_0x20f408(0x149)]([a140_0x20f408(0x162),a140_0x20f408(0x18b),a140_0x20f408(0x154),a140_0x20f408(0x15e),'week',a140_0x20f408(0x17c),a140_0x20f408(0x16a)]);export const AggregationTypeSchema=z[a140_0x20f408(0x149)]([a140_0x20f408(0x182),'Sum',a140_0x20f408(0x177),a140_0x20f408(0x170),a140_0x20f408(0x169),a140_0x20f408(0x172),'First',a140_0x20f408(0x181)]);const TemporalValueSchema=z[a140_0x20f408(0x192)]([z[a140_0x20f408(0x164)]({'timestamp':z[a140_0x20f408(0x159)]()}),z['object']({'last':z[a140_0x20f408(0x192)]([z['number'](),z[a140_0x20f408(0x151)](z['string'](),z[a140_0x20f408(0x166)]())]),'unit':z[a140_0x20f408(0x159)]()})]),OperatorValueSchema=z['union']([z['string'](),z['number'](),z[a140_0x20f408(0x191)](),TemporalValueSchema,z[a140_0x20f408(0x160)](z[a140_0x20f408(0x192)]([z['string'](),z[a140_0x20f408(0x166)](),z[a140_0x20f408(0x191)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a140_0x20f408(0x14e),a140_0x20f408(0x167),a140_0x20f408(0x17e),a140_0x20f408(0x144),a140_0x20f408(0x16b),'In',a140_0x20f408(0x175),a140_0x20f408(0x187),a140_0x20f408(0x157),a140_0x20f408(0x168),a140_0x20f408(0x186),a140_0x20f408(0x178)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z[a140_0x20f408(0x164)]({'type':OperatorTypeSchema,'not':z[a140_0x20f408(0x191)]()[a140_0x20f408(0x171)](),'value':OperatorValueSchema[a140_0x20f408(0x171)](),'min':z['union']([z[a140_0x20f408(0x166)](),z[a140_0x20f408(0x159)](),TemporalValueSchema])[a140_0x20f408(0x171)](),'max':z[a140_0x20f408(0x192)]([z['number'](),z[a140_0x20f408(0x159)](),TemporalValueSchema])[a140_0x20f408(0x171)](),'unit':TimeUnitSchema['optional'](),'duration':z[a140_0x20f408(0x164)]({'day':z['number']()[a140_0x20f408(0x171)](),'week':z[a140_0x20f408(0x166)]()[a140_0x20f408(0x171)](),'month':z['number']()[a140_0x20f408(0x171)](),'year':z[a140_0x20f408(0x166)]()[a140_0x20f408(0x171)](),'hour':z[a140_0x20f408(0x166)]()[a140_0x20f408(0x171)](),'minute':z[a140_0x20f408(0x166)]()[a140_0x20f408(0x171)](),'second':z['number']()[a140_0x20f408(0x171)]()})['optional'](),'from':z[a140_0x20f408(0x164)]({'last':z['union']([z[a140_0x20f408(0x166)](),z[a140_0x20f408(0x159)]()]),'unit':TimeUnitSchema})[a140_0x20f408(0x171)](),'reverse':z['boolean']()[a140_0x20f408(0x171)]()})[a140_0x20f408(0x184)]((_0x28642e,_0xb1df3c)=>{const _0x388bad=a140_0x20f408;OPERATORS_REQUIRING_VALUE[_0x388bad(0x14b)](_0x28642e[_0x388bad(0x141)])&&(_0x28642e[_0x388bad(0x188)]===undefined||_0x28642e[_0x388bad(0x188)]===null)&&_0xb1df3c['addIssue']({'code':'custom','message':_0x388bad(0x148)+_0x28642e[_0x388bad(0x141)]+_0x388bad(0x18e),'path':['value']}),_0x28642e[_0x388bad(0x141)]==='Between'&&_0x28642e[_0x388bad(0x189)]===undefined&&_0x28642e[_0x388bad(0x140)]===undefined&&_0xb1df3c[_0x388bad(0x13f)]({'code':_0x388bad(0x146),'message':_0x388bad(0x152),'params':{'validationCode':_0x388bad(0x18d)}}),OPERATORS_REQUIRING_UNIT['has'](_0x28642e[_0x388bad(0x141)])&&_0x28642e[_0x388bad(0x188)]!==undefined&&!_0x28642e[_0x388bad(0x155)]&&_0xb1df3c[_0x388bad(0x13f)]({'code':_0x388bad(0x146),'message':'Operator\x20\x27'+_0x28642e[_0x388bad(0x141)]+_0x388bad(0x13e),'path':[_0x388bad(0x155)],'params':{'validationCode':_0x388bad(0x14a)}}),_0x28642e[_0x388bad(0x141)]===_0x388bad(0x16d)&&(!_0x28642e['duration']&&_0xb1df3c[_0x388bad(0x13f)]({'code':'custom','message':_0x388bad(0x14f),'path':['duration']}),!_0x28642e[_0x388bad(0x16f)]&&_0xb1df3c[_0x388bad(0x13f)]({'code':_0x388bad(0x146),'message':_0x388bad(0x173),'path':[_0x388bad(0x16f)]}));});export const ArrayMatchingSchema=z[a140_0x20f408(0x192)]([z[a140_0x20f408(0x15f)](a140_0x20f408(0x142)),z['literal'](a140_0x20f408(0x156)),z[a140_0x20f408(0x164)]({'atLeast':z[a140_0x20f408(0x166)]()}),z[a140_0x20f408(0x164)]({'atMost':z[a140_0x20f408(0x166)]()}),z[a140_0x20f408(0x164)]({'exactly':z[a140_0x20f408(0x166)]()})]);export const AggregationDefSchema=z[a140_0x20f408(0x17f)](a140_0x20f408(0x141),[z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x149)](['Sum',a140_0x20f408(0x170),a140_0x20f408(0x169),'Average']),'column':z[a140_0x20f408(0x159)](),'groupingColumns':z[a140_0x20f408(0x160)](z[a140_0x20f408(0x159)]())[a140_0x20f408(0x171)]()}),z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x15f)](a140_0x20f408(0x182)),'groupingColumns':z[a140_0x20f408(0x160)](z[a140_0x20f408(0x159)]())[a140_0x20f408(0x171)]()}),z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x15f)](a140_0x20f408(0x172)),'columns':z[a140_0x20f408(0x160)](z[a140_0x20f408(0x159)]())}),z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x149)]([a140_0x20f408(0x16e),a140_0x20f408(0x181)]),'column':z['string'](),'orderColumn':z[a140_0x20f408(0x159)](),'groupingColumns':z['array'](z[a140_0x20f408(0x159)]())[a140_0x20f408(0x171)]()})]);export const TimeWindowDefSchema=z[a140_0x20f408(0x164)]({'duration':z[a140_0x20f408(0x166)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a140_0x20f408(0x186),a140_0x20f408(0x178),a140_0x20f408(0x16d)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a140_0x20f408(0x15f)]('Column'),'column':z[a140_0x20f408(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a140_0x20f408(0x171)]()})[a140_0x20f408(0x184)]((_0x25992c,_0x5510ea)=>{const _0x4dc860=a140_0x20f408,_0x17ddf2=_0x25992c[_0x4dc860(0x15a)][_0x4dc860(0x141)];_0x25992c['column']===_0x4dc860(0x145)?!TIMESTAMP_OPERATORS[_0x4dc860(0x14b)](_0x17ddf2)&&_0x5510ea['addIssue']({'code':_0x4dc860(0x146),'message':_0x4dc860(0x176)+_0x17ddf2+'\x27)','path':['operator','type']}):TIMESTAMP_OPERATORS['has'](_0x17ddf2)&&_0x5510ea['addIssue']({'code':_0x4dc860(0x146),'message':_0x4dc860(0x148)+_0x17ddf2+_0x4dc860(0x150),'path':[_0x4dc860(0x15a),'type']});});export const FilterRuleDefSchema=z[a140_0x20f408(0x164)]({'type':z['literal'](a140_0x20f408(0x17d)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a140_0x20f408(0x15d)](()=>z['object']({'type':z['literal'](a140_0x20f408(0x179)),'attribute':z[a140_0x20f408(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a140_0x20f408(0x191)]()[a140_0x20f408(0x171)](),'aggregation':AggregationDefSchema[a140_0x20f408(0x171)](),'source':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x171)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a140_0x20f408(0x166)]()[a140_0x20f408(0x171)]()}));export const BehaviorConditionDefSchema=z[a140_0x20f408(0x15d)](()=>z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x15f)](a140_0x20f408(0x185)),'attribute':z[a140_0x20f408(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a140_0x20f408(0x191)]()['optional'](),'aggregation':AggregationDefSchema[a140_0x20f408(0x171)](),'source':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x171)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a140_0x20f408(0x166)]()['optional']()}));export const ColumnConditionDefSchema=z['object']({'type':z['literal'](a140_0x20f408(0x158)),'column':z[a140_0x20f408(0x159)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x149)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a140_0x20f408(0x171)]()}));export const SegmentRefConditionDefSchema=z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x149)]([a140_0x20f408(0x18a),a140_0x20f408(0x18c)]),'segment':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x189)](0x1,a140_0x20f408(0x14d))});export const ConditionDefSchema=z[a140_0x20f408(0x15d)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a140_0x20f408(0x15d)](()=>z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x149)](['And','Or']),'conditions':z[a140_0x20f408(0x160)](ConditionDefSchema),'description':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x171)]()}));export const SegmentDefSchema=z[a140_0x20f408(0x164)]({'type':z[a140_0x20f408(0x15f)](a140_0x20f408(0x16c))[a140_0x20f408(0x171)](),'name':z['string']()[a140_0x20f408(0x189)](0x1,a140_0x20f408(0x14c)),'description':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x171)](),'folder':z[a140_0x20f408(0x159)]()[a140_0x20f408(0x171)](),'rule':RuleDefSchema['optional'](),'kind':z['enum']([a140_0x20f408(0x174),a140_0x20f408(0x147),a140_0x20f408(0x17b)])[a140_0x20f408(0x171)](),'visible':z['boolean']()[a140_0x20f408(0x171)](),'activations':z['array'](z[a140_0x20f408(0x142)]())[a140_0x20f408(0x171)]()});const _syncCheck1=!![],_syncCheck2=!![];function a140_0x232e(){const _0x3b8a68=['segment','TimeRange','First','from','Min','optional','CountDistinct','TimeRange\x20operator\x20requires\x20\x27from\x27','batch','Contain','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Average','TimeWithinNext','Value','799589KKdOOr','funnel_stage','month','And','GreaterEqual','discriminatedUnion','25350FCHixV','Last','Count','5598usPPfh','superRefine','Behavior','TimeWithinPast','StartWith','value','min','include','minute','exclude','MISSING_BETWEEN_BOUNDS','\x27\x20requires\x20a\x20value','2235PmkzkK','1488454oQyuJa','boolean','union','\x27\x20requires\x20a\x20time\x20unit','addIssue','max','type','any','1899DbTuyj','Less','timestamp','custom','realtime','Operator\x20\x27','enum','MISSING_TIME_UNIT','has','Segment\x20name\x20is\x20required','Segment\x20reference\x20must\x20not\x20be\x20empty','Equal','TimeRange\x20operator\x20requires\x20\x27duration\x27','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','record','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Between','hour','unit','all','EndWith','Column','string','operator','60okjvUT','40UDHmdW','lazy','day','literal','array','647967kmFHAB','second','8718QohUsm','object','91036pHZSee','number','Greater','Regexp','Max','year','LessEqual'];a140_0x232e=function(){return _0x3b8a68;};return a140_0x232e();}void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a140_0x5800ff=a140_0x541a;(function(_0x580ac4,_0x1d50b0){const _0x8016cd=a140_0x541a,_0x29b267=_0x580ac4();while(!![]){try{const _0x215e28=-parseInt(_0x8016cd(0xaa))/0x1+parseInt(_0x8016cd(0x9d))/0x2*(-parseInt(_0x8016cd(0xa8))/0x3)+parseInt(_0x8016cd(0x7b))/0x4+-parseInt(_0x8016cd(0x68))/0x5*(-parseInt(_0x8016cd(0x72))/0x6)+-parseInt(_0x8016cd(0x70))/0x7+parseInt(_0x8016cd(0xa5))/0x8+parseInt(_0x8016cd(0x82))/0x9;if(_0x215e28===_0x1d50b0)break;else _0x29b267['push'](_0x29b267['shift']());}catch(_0x34a08e){_0x29b267['push'](_0x29b267['shift']());}}}(a140_0x2c71,0xb48de));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a140_0x5800ff(0x8a),a140_0x5800ff(0xb4),'Less',a140_0x5800ff(0x90),a140_0x5800ff(0x6b),'In',a140_0x5800ff(0x7c),a140_0x5800ff(0x87),'IsNull',a140_0x5800ff(0xab),a140_0x5800ff(0x91),'Contain',a140_0x5800ff(0x95),a140_0x5800ff(0xa7),a140_0x5800ff(0xb3)]);function a140_0x541a(_0x58bada,_0x56df31){_0x58bada=_0x58bada-0x68;const _0x2c7123=a140_0x2c71();let _0x541a59=_0x2c7123[_0x58bada];return _0x541a59;}export const TimeUnitSchema=z[a140_0x5800ff(0xa9)](['second',a140_0x5800ff(0xb1),a140_0x5800ff(0x78),a140_0x5800ff(0x92),a140_0x5800ff(0x98),a140_0x5800ff(0xa0),a140_0x5800ff(0x89)]);export const AggregationTypeSchema=z[a140_0x5800ff(0xa9)]([a140_0x5800ff(0x80),a140_0x5800ff(0xa1),a140_0x5800ff(0x93),'Min',a140_0x5800ff(0x9e),a140_0x5800ff(0x8c),a140_0x5800ff(0x6c),a140_0x5800ff(0x85)]);const TemporalValueSchema=z[a140_0x5800ff(0xb2)]([z['object']({'timestamp':z[a140_0x5800ff(0x83)]()}),z['object']({'last':z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0x9f)](),z['record'](z['string'](),z[a140_0x5800ff(0x9f)]())]),'unit':z[a140_0x5800ff(0x83)]()})]),OperatorValueSchema=z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0x83)](),z[a140_0x5800ff(0x9f)](),z[a140_0x5800ff(0x88)](),TemporalValueSchema,z['array'](z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0x83)](),z[a140_0x5800ff(0x9f)](),z[a140_0x5800ff(0x88)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a140_0x5800ff(0x8a),a140_0x5800ff(0xb4),a140_0x5800ff(0x90),a140_0x5800ff(0x96),a140_0x5800ff(0x6b),'In',a140_0x5800ff(0x9b),a140_0x5800ff(0x95),a140_0x5800ff(0xa7),'Regexp',a140_0x5800ff(0xab),a140_0x5800ff(0x91)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z[a140_0x5800ff(0x9a)]({'type':OperatorTypeSchema,'not':z[a140_0x5800ff(0x88)]()['optional'](),'value':OperatorValueSchema[a140_0x5800ff(0x8d)](),'min':z['union']([z[a140_0x5800ff(0x9f)](),z[a140_0x5800ff(0x83)](),TemporalValueSchema])[a140_0x5800ff(0x8d)](),'max':z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0x9f)](),z[a140_0x5800ff(0x83)](),TemporalValueSchema])[a140_0x5800ff(0x8d)](),'unit':TimeUnitSchema['optional'](),'duration':z[a140_0x5800ff(0x9a)]({'day':z[a140_0x5800ff(0x9f)]()[a140_0x5800ff(0x8d)](),'week':z[a140_0x5800ff(0x9f)]()[a140_0x5800ff(0x8d)](),'month':z[a140_0x5800ff(0x9f)]()[a140_0x5800ff(0x8d)](),'year':z[a140_0x5800ff(0x9f)]()[a140_0x5800ff(0x8d)](),'hour':z['number']()['optional'](),'minute':z[a140_0x5800ff(0x9f)]()['optional'](),'second':z['number']()[a140_0x5800ff(0x8d)]()})['optional'](),'from':z[a140_0x5800ff(0x9a)]({'last':z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0x9f)](),z['string']()]),'unit':TimeUnitSchema})[a140_0x5800ff(0x8d)](),'reverse':z[a140_0x5800ff(0x88)]()[a140_0x5800ff(0x8d)]()})[a140_0x5800ff(0x75)]((_0x578682,_0x1efd32)=>{const _0x7c09a0=a140_0x5800ff;OPERATORS_REQUIRING_VALUE[_0x7c09a0(0x73)](_0x578682[_0x7c09a0(0xaf)])&&(_0x578682['value']===undefined||_0x578682[_0x7c09a0(0xa6)]===null)&&_0x1efd32[_0x7c09a0(0x74)]({'code':_0x7c09a0(0x79),'message':'Operator\x20\x27'+_0x578682['type']+_0x7c09a0(0x6f),'path':[_0x7c09a0(0xa6)]}),_0x578682['type']===_0x7c09a0(0x7c)&&_0x578682[_0x7c09a0(0x9c)]===undefined&&_0x578682['max']===undefined&&_0x1efd32['addIssue']({'code':_0x7c09a0(0x79),'message':_0x7c09a0(0x8f),'params':{'validationCode':_0x7c09a0(0x7d)}}),OPERATORS_REQUIRING_UNIT['has'](_0x578682[_0x7c09a0(0xaf)])&&_0x578682['value']!==undefined&&!_0x578682[_0x7c09a0(0x7a)]&&_0x1efd32[_0x7c09a0(0x74)]({'code':_0x7c09a0(0x79),'message':_0x7c09a0(0x86)+_0x578682[_0x7c09a0(0xaf)]+_0x7c09a0(0x6a),'path':[_0x7c09a0(0x7a)],'params':{'validationCode':_0x7c09a0(0x69)}}),_0x578682[_0x7c09a0(0xaf)]===_0x7c09a0(0xb3)&&(!_0x578682[_0x7c09a0(0xac)]&&_0x1efd32[_0x7c09a0(0x74)]({'code':_0x7c09a0(0x79),'message':_0x7c09a0(0x99),'path':[_0x7c09a0(0xac)]}),!_0x578682['from']&&_0x1efd32['addIssue']({'code':_0x7c09a0(0x79),'message':_0x7c09a0(0x7f),'path':[_0x7c09a0(0xae)]}));});export const ArrayMatchingSchema=z[a140_0x5800ff(0xb2)]([z[a140_0x5800ff(0xa3)](a140_0x5800ff(0x94)),z[a140_0x5800ff(0xa3)](a140_0x5800ff(0xad)),z[a140_0x5800ff(0x9a)]({'atLeast':z[a140_0x5800ff(0x9f)]()}),z['object']({'atMost':z[a140_0x5800ff(0x9f)]()}),z[a140_0x5800ff(0x9a)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a140_0x5800ff(0xaf),[z['object']({'type':z['enum']([a140_0x5800ff(0xa1),a140_0x5800ff(0x6d),a140_0x5800ff(0x9e),a140_0x5800ff(0x93)]),'column':z[a140_0x5800ff(0x83)](),'groupingColumns':z[a140_0x5800ff(0xb0)](z[a140_0x5800ff(0x83)]())[a140_0x5800ff(0x8d)]()}),z[a140_0x5800ff(0x9a)]({'type':z['literal'](a140_0x5800ff(0x80)),'groupingColumns':z['array'](z[a140_0x5800ff(0x83)]())['optional']()}),z['object']({'type':z[a140_0x5800ff(0xa3)]('CountDistinct'),'columns':z[a140_0x5800ff(0xb0)](z['string']())}),z[a140_0x5800ff(0x9a)]({'type':z[a140_0x5800ff(0xa9)]([a140_0x5800ff(0x6c),a140_0x5800ff(0x85)]),'column':z[a140_0x5800ff(0x83)](),'orderColumn':z[a140_0x5800ff(0x83)](),'groupingColumns':z[a140_0x5800ff(0xb0)](z[a140_0x5800ff(0x83)]())[a140_0x5800ff(0x8d)]()})]);export const TimeWindowDefSchema=z[a140_0x5800ff(0x9a)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a140_0x5800ff(0xab),a140_0x5800ff(0x91),a140_0x5800ff(0xb3)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a140_0x5800ff(0xa3)](a140_0x5800ff(0xa4)),'column':z[a140_0x5800ff(0x83)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a140_0x5800ff(0x8d)]()})['superRefine']((_0x251629,_0x56f082)=>{const _0x5d2f57=a140_0x5800ff,_0x25edaf=_0x251629['operator'][_0x5d2f57(0xaf)];_0x251629[_0x5d2f57(0x77)]==='timestamp'?!TIMESTAMP_OPERATORS['has'](_0x25edaf)&&_0x56f082['addIssue']({'code':'custom','message':_0x5d2f57(0x76)+_0x25edaf+'\x27)','path':[_0x5d2f57(0x6e),'type']}):TIMESTAMP_OPERATORS[_0x5d2f57(0x73)](_0x25edaf)&&_0x56f082[_0x5d2f57(0x74)]({'code':'custom','message':'Operator\x20\x27'+_0x25edaf+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x5d2f57(0x6e),_0x5d2f57(0xaf)]});});export const FilterRuleDefSchema=z[a140_0x5800ff(0x9a)]({'type':z[a140_0x5800ff(0xa3)](a140_0x5800ff(0x97)),'conditions':z[a140_0x5800ff(0xb0)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a140_0x5800ff(0x7e)](()=>z['object']({'type':z['literal']('Value'),'attribute':z[a140_0x5800ff(0x83)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a140_0x5800ff(0x8d)](),'aggregation':AggregationDefSchema[a140_0x5800ff(0x8d)](),'source':z['string']()[a140_0x5800ff(0x8d)](),'filter':FilterRuleDefSchema[a140_0x5800ff(0x8d)](),'limit':z[a140_0x5800ff(0x9f)]()['optional']()}));export const BehaviorConditionDefSchema=z[a140_0x5800ff(0x7e)](()=>z[a140_0x5800ff(0x9a)]({'type':z[a140_0x5800ff(0xa3)]('Behavior'),'attribute':z[a140_0x5800ff(0x83)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a140_0x5800ff(0x8d)](),'exclude':z['boolean']()[a140_0x5800ff(0x8d)](),'aggregation':AggregationDefSchema[a140_0x5800ff(0x8d)](),'source':z[a140_0x5800ff(0x83)]()[a140_0x5800ff(0x8d)](),'filter':FilterRuleDefSchema[a140_0x5800ff(0x8d)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a140_0x5800ff(0x8d)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a140_0x5800ff(0xa3)](a140_0x5800ff(0xa4)),'column':z[a140_0x5800ff(0x83)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a140_0x5800ff(0x7e)](()=>z['object']({'type':z[a140_0x5800ff(0xa9)](['And','Or']),'conditions':z[a140_0x5800ff(0xb0)](ConditionDefSchema),'description':z[a140_0x5800ff(0x83)]()[a140_0x5800ff(0x8d)]()}));function a140_0x2c71(){const _0x17fe86=['Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','column','hour','custom','unit','5407216sdtLKl','Between','MISSING_BETWEEN_BOUNDS','lazy','TimeRange\x20operator\x20requires\x20\x27from\x27','Count','segment','62487ydGBmB','string','Segment\x20name\x20is\x20required','Last','Operator\x20\x27','Regexp','boolean','year','Equal','realtime','CountDistinct','optional','Segment\x20reference\x20must\x20not\x20be\x20empty','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','GreaterEqual','TimeWithinNext','day','Average','any','StartWith','Less','And','week','TimeRange\x20operator\x20requires\x20\x27duration\x27','object','Contain','min','351746OzQctn','Max','number','month','Sum','funnel_stage','literal','Column','9778664jEvEGa','value','EndWith','15dEmFQP','enum','808637LazTaR','TimeWithinPast','duration','all','from','type','array','minute','union','TimeRange','Greater','190LLTejc','MISSING_TIME_UNIT','\x27\x20requires\x20a\x20time\x20unit','LessEqual','First','Min','operator','\x27\x20requires\x20a\x20value','2114756rSRfQi','exclude','23460rivXWA','has','addIssue','superRefine'];a140_0x2c71=function(){return _0x17fe86;};return a140_0x2c71();}export const SegmentRefConditionDefSchema=z['object']({'type':z[a140_0x5800ff(0xa9)](['include',a140_0x5800ff(0x71)]),'segment':z[a140_0x5800ff(0x83)]()[a140_0x5800ff(0x9c)](0x1,a140_0x5800ff(0x8e))});export const ConditionDefSchema=z[a140_0x5800ff(0x7e)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a140_0x5800ff(0x7e)](()=>z['object']({'type':z['enum']([a140_0x5800ff(0x97),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a140_0x5800ff(0x83)]()['optional']()}));export const SegmentDefSchema=z[a140_0x5800ff(0x9a)]({'type':z['literal'](a140_0x5800ff(0x81))[a140_0x5800ff(0x8d)](),'name':z[a140_0x5800ff(0x83)]()['min'](0x1,a140_0x5800ff(0x84)),'description':z[a140_0x5800ff(0x83)]()[a140_0x5800ff(0x8d)](),'folder':z[a140_0x5800ff(0x83)]()[a140_0x5800ff(0x8d)](),'rule':RuleDefSchema['optional'](),'kind':z[a140_0x5800ff(0xa9)](['batch',a140_0x5800ff(0x8b),a140_0x5800ff(0xa2)])[a140_0x5800ff(0x8d)](),'visible':z[a140_0x5800ff(0x88)]()['optional'](),'activations':z[a140_0x5800ff(0xb0)](z[a140_0x5800ff(0x94)]())[a140_0x5800ff(0x8d)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a141_0x57bd(_0xdc0862,_0x1c01d2){_0xdc0862=_0xdc0862-0x9a;const _0x489aa0=a141_0x489a();let _0x57bd98=_0x489aa0[_0xdc0862];return _0x57bd98;}const a141_0x147ea2=a141_0x57bd;(function(_0x26978e,_0x21cbe4){const _0x1d977d=a141_0x57bd,_0x14fa57=_0x26978e();while(!![]){try{const _0x13e87f=-parseInt(_0x1d977d(0xa8))/0x1*(-parseInt(_0x1d977d(0xbc))/0x2)+-parseInt(_0x1d977d(0xa4))/0x3*(-parseInt(_0x1d977d(0xb4))/0x4)+parseInt(_0x1d977d(0xb5))/0x5*(parseInt(_0x1d977d(0xad))/0x6)+parseInt(_0x1d977d(0xab))/0x7*(-parseInt(_0x1d977d(0x9f))/0x8)+parseInt(_0x1d977d(0xbb))/0x9+parseInt(_0x1d977d(0xbd))/0xa*(parseInt(_0x1d977d(0xb3))/0xb)+parseInt(_0x1d977d(0x9d))/0xc*(-parseInt(_0x1d977d(0xa6))/0xd);if(_0x13e87f===_0x21cbe4)break;else _0x14fa57['push'](_0x14fa57['shift']());}catch(_0xb18829){_0x14fa57['push'](_0x14fa57['shift']());}}}(a141_0x489a,0xaafd4));import{readFileSync}from'fs';import*as a141_0x2bece8 from'path';import*as a141_0x32e2c0 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a141_0x147ea2(0xb8),'push']);export function isJourneyDef(_0x53c2e6){const _0x2df451=a141_0x147ea2;return typeof _0x53c2e6===_0x2df451(0x9c)&&_0x53c2e6!==null&&'type'in _0x53c2e6&&_0x53c2e6['type']===_0x2df451(0xb6);}function a141_0x489a(){const _0x3d9a79=['560886nagXzM','YAML_PARSE_ERROR','skipped','campaign_type','relative','segment','142021SQDqtA','4448aRSRvH','40OGMRCU','journey','valid','email','message','type','6569604YKRynx','390948rfXbgP','70YNlTvE','YAML\x20parse\x20error:\x20','campaign','toJSON','result','object','122460lLROnC','map','8hWBtLh','parseDocument','has','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','error','1086dcqgaa','utf-8','2990QHgmuD','warnings','7hgYKNp','filterType','basename','2040647JzqVXS','not\x20a\x20'];a141_0x489a=function(){return _0x3d9a79;};return a141_0x489a();}export function isCampaignDef(_0x230126){const _0x453612=a141_0x147ea2;if(typeof _0x230126!=='object'||_0x230126===null)return![];const _0x4824ae=_0x230126,_0x2f826a=VALID_CAMPAIGN_TYPES[_0x453612(0xa1)](_0x4824ae[_0x453612(0xb0)]);if(_0x4824ae[_0x453612(0xba)]===_0x453612(0xbf)&&_0x2f826a)return!![];if(_0x2f826a&&!_0x4824ae[_0x453612(0xba)])return!![];return![];}export function isValidationResult(_0x58aad6){const _0x88278=a141_0x147ea2;return!(_0x88278(0xaf)in _0x58aad6);}export function createParseErrorResult(_0x308be4,_0x259102,_0x19214e,_0x1539c8,_0x3552d3=a141_0x147ea2(0xb2)){const _0xb2180b=a141_0x147ea2;return{'filePath':_0x308be4,'relativePath':_0x259102,'source':_0x19214e,'result':{'valid':![],'errors':[{'level':_0xb2180b(0xa3),'path':'','code':_0xb2180b(0xae),'message':_0x1539c8}],'warnings':[]},'fileType':_0x3552d3};}export function validateYamlFile(_0xe726bc,_0x10a389,_0x566365={}){const _0x12f130=a141_0x147ea2,_0x47f5ea=a141_0x2bece8[_0x12f130(0xb1)](_0x10a389,_0xe726bc)||a141_0x2bece8[_0x12f130(0xaa)](_0xe726bc);try{const _0x133fd9=readFileSync(_0xe726bc,_0x12f130(0xa5)),_0x54af88=a141_0x32e2c0[_0x12f130(0xa0)](_0x133fd9),_0x26850a=_0x54af88[_0x12f130(0x9a)]();if(!_0x26850a)return createParseErrorResult(_0xe726bc,_0x47f5ea,_0x133fd9,_0x12f130(0xa2));let _0x3e7730;if(isJourneyDef(_0x26850a))_0x3e7730='journey';else isCampaignDef(_0x26850a)?_0x3e7730=_0x12f130(0xbf):_0x3e7730='segment';if(_0x566365[_0x12f130(0xa9)]&&_0x3e7730!==_0x566365[_0x12f130(0xa9)])return{'filePath':_0xe726bc,'relativePath':_0x47f5ea,'skipped':!![],'reason':_0x12f130(0xac)+_0x566365[_0x12f130(0xa9)]};const _0x3c4680={'source':_0x133fd9,'document':_0x54af88};let _0x192a73;if(_0x3e7730==='journey')_0x192a73=validateJourneyDef(_0x26850a,_0x3c4680);else _0x3e7730===_0x12f130(0xbf)?_0x192a73=validateCampaignDef(_0x26850a,_0x3c4680):_0x192a73=validateSegmentDef(_0x26850a,_0x3c4680);return{'filePath':_0xe726bc,'relativePath':_0x47f5ea,'source':_0x133fd9,'result':_0x192a73,'fileType':_0x3e7730};}catch(_0xebb732){const _0x537bb3=_0xebb732 instanceof Error?_0xebb732[_0x12f130(0xb9)]:String(_0xebb732);return createParseErrorResult(_0xe726bc,_0x47f5ea,'',_0x12f130(0xbe)+_0x537bb3);}}export function validateYamlFiles(_0x3012f6,_0x2426b8,_0x33e583={}){const _0x2bb71b=a141_0x147ea2;return _0x3012f6[_0x2bb71b(0x9e)](_0x163b1f=>validateYamlFile(_0x163b1f,_0x2426b8,_0x33e583));}export function calculateSummary(_0x311ab8){const _0xcfac64=a141_0x147ea2;let _0x2af7b1=0x0,_0x1db925=0x0,_0x22be17=0x0,_0xd2e716=0x0;for(const _0x352098 of _0x311ab8){if(!isValidationResult(_0x352098)){_0xd2e716++;continue;}_0x352098[_0xcfac64(0x9b)][_0xcfac64(0xb7)]?_0x2af7b1++:_0x1db925++,_0x22be17+=_0x352098['result'][_0xcfac64(0xa7)]['length'];}return{'validCount':_0x2af7b1,'invalidCount':_0x1db925,'warningCount':_0x22be17,'skippedCount':_0xd2e716,'hasErrors':_0x1db925>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a142_0x3190(){const _0xcc4c64=['max','668301nXhMnr','Invalid\x20YAML:\x20expected\x20an\x20object','range','length','58732GBQsmF','551000QuWxCq','message','cyan','join','errors','invalid_union','1214815NComdy','1vkoerx','red','number','YAML\x20validation\x20error\x20at\x20\x27','dim','data','YAML\x20validation\x20error:\x20','yellow','\x20|\x20','pop','match','9DLmCCA','557142WeBMcO','location','warnings','\x27:\x20','split','level','flatMap','object','getIn','567966zsjDll','push','8438110lQqbPd','path','column','success','error','parse','safeParse','padStart','14GNkurz'];a142_0x3190=function(){return _0xcc4c64;};return a142_0x3190();}(function(_0x482ec9,_0x216d77){const _0x3f6be3=a142_0x49d2,_0x3f501f=_0x482ec9();while(!![]){try{const _0x49890f=-parseInt(_0x3f6be3(0x17b))/0x1*(-parseInt(_0x3f6be3(0x163))/0x2)+parseInt(_0x3f6be3(0x16f))/0x3+parseInt(_0x3f6be3(0x173))/0x4+parseInt(_0x3f6be3(0x17a))/0x5+-parseInt(_0x3f6be3(0x15a))/0x6*(-parseInt(_0x3f6be3(0x16d))/0x7)+parseInt(_0x3f6be3(0x174))/0x8+parseInt(_0x3f6be3(0x159))/0x9*(-parseInt(_0x3f6be3(0x165))/0xa);if(_0x49890f===_0x216d77)break;else _0x3f501f['push'](_0x3f501f['shift']());}catch(_0x40366e){_0x3f501f['push'](_0x3f501f['shift']());}}}(a142_0x3190,0x2ac46));import*as a142_0x4eb3ba from'yaml';function a142_0x49d2(_0x5edff0,_0x3af7b8){_0x5edff0=_0x5edff0-0x153;const _0x3190c6=a142_0x3190();let _0x49d230=_0x3190c6[_0x5edff0];return _0x49d230;}import a142_0x2cf9cf from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x194fde,_0x354988,_0x5a9d0b){const _0x3dc837=a142_0x49d2;if(!_0x194fde||!_0x354988)return undefined;try{let _0x7c481f=_0x194fde[_0x3dc837(0x162)](_0x5a9d0b,!![]),_0x8e3a3f=[..._0x5a9d0b];while((!_0x7c481f||typeof _0x7c481f!=='object'||!('range'in _0x7c481f)||!_0x7c481f['range'])&&_0x8e3a3f['length']>0x0){_0x8e3a3f[_0x3dc837(0x157)](),_0x7c481f=_0x8e3a3f[_0x3dc837(0x172)]>0x0?_0x194fde[_0x3dc837(0x162)](_0x8e3a3f,!![]):_0x194fde['contents'];}if(!_0x7c481f||typeof _0x7c481f!==_0x3dc837(0x161)||!('range'in _0x7c481f)||!_0x7c481f[_0x3dc837(0x171)])return undefined;const [_0x13d75f]=_0x7c481f[_0x3dc837(0x171)];return offsetToLocation(_0x354988,_0x13d75f);}catch{return undefined;}}export function offsetToLocation(_0x3f73df,_0xf216c0){let _0x298c73=0x1,_0x14c7f6=0x1;for(let _0x1ca6c0=0x0;_0x1ca6c0<_0xf216c0&&_0x1ca6c0<_0x3f73df['length'];_0x1ca6c0++){_0x3f73df[_0x1ca6c0]==='\x0a'?(_0x298c73++,_0x14c7f6=0x1):_0x14c7f6++;}return{'line':_0x298c73,'column':_0x14c7f6,'offset':_0xf216c0};}export function pathToArray(_0x288640){const _0x26e91f=a142_0x49d2;if(!_0x288640)return[];return _0x288640[_0x26e91f(0x15e)]('.')[_0x26e91f(0x160)](_0x9da949=>{const _0x1e3c4d=_0x26e91f,_0x2f3bf6=_0x9da949[_0x1e3c4d(0x158)](/^(\w+)\[(\d+)\]$/);if(_0x2f3bf6)return[_0x2f3bf6[0x1],parseInt(_0x2f3bf6[0x2],0xa)];return[_0x9da949];});}export function formatZodPath(_0x8eda1c){const _0x4c2f2f=a142_0x49d2;let _0x32befa='';for(const _0x497633 of _0x8eda1c){if(typeof _0x497633===_0x4c2f2f(0x17d))_0x32befa+='['+_0x497633+']';else{const _0x39a90f=String(_0x497633);_0x32befa+=_0x32befa?'.'+_0x39a90f:_0x39a90f;}}return _0x32befa;}export function flattenZodIssues(_0x4610b2){const _0x103e84=a142_0x49d2,_0x21578a=[];for(const _0x406f0a of _0x4610b2){if(_0x406f0a['code']===_0x103e84(0x179)&&_0x103e84(0x178)in _0x406f0a){const _0x35c2fb=_0x406f0a[_0x103e84(0x178)];let _0x176d8a=_0x35c2fb[0x0]||[];for(const _0x1def25 of _0x35c2fb){_0x1def25['length']<_0x176d8a[_0x103e84(0x172)]&&(_0x176d8a=_0x1def25);}const _0x345c84=_0x176d8a['map'](_0x1dd80d=>({..._0x1dd80d,'path':[..._0x406f0a[_0x103e84(0x166)],..._0x1dd80d['path']]}));_0x21578a[_0x103e84(0x164)](...flattenZodIssues(_0x345c84));}else _0x21578a[_0x103e84(0x164)](_0x406f0a);}return _0x21578a;}export function safeParseYaml(_0x42c797,_0x591fad){const _0x24c0bb=a142_0x49d2,_0x587df7=a142_0x4eb3ba[_0x24c0bb(0x16a)](_0x42c797);if(!_0x587df7||typeof _0x587df7!==_0x24c0bb(0x161))throw new Error(_0x24c0bb(0x170));const _0x488c43=_0x591fad[_0x24c0bb(0x16b)](_0x587df7);if(!_0x488c43[_0x24c0bb(0x168)]){const _0x2bbfdb=_0x488c43[_0x24c0bb(0x169)]['issues'][0x0],_0x142d32=formatZodPath(_0x2bbfdb[_0x24c0bb(0x166)]);throw new Error(_0x142d32?_0x24c0bb(0x17e)+_0x142d32+_0x24c0bb(0x15d)+_0x2bbfdb[_0x24c0bb(0x175)]:_0x24c0bb(0x154)+_0x2bbfdb[_0x24c0bb(0x175)]);}return _0x488c43[_0x24c0bb(0x153)];}export function formatIssueWithContext(_0xcb4660,_0x5b41bc,_0x59cc3d){const _0x3bca2a=a142_0x49d2,_0xe117a7=[],_0x4715b8=_0xcb4660[_0x3bca2a(0x15f)]===_0x3bca2a(0x169),_0x20a22a=_0x4715b8?a142_0x2cf9cf['red']:a142_0x2cf9cf[_0x3bca2a(0x155)],_0x3ef71d=_0x4715b8?a142_0x2cf9cf[_0x3bca2a(0x17c)]:a142_0x2cf9cf[_0x3bca2a(0x155)],_0x3a3c93=_0x59cc3d?a142_0x2cf9cf[_0x3bca2a(0x176)](_0x59cc3d+':'):'';if(_0xcb4660[_0x3bca2a(0x15b)]){const _0x335a6a=a142_0x2cf9cf[_0x3bca2a(0x176)](_0xcb4660['location']['line']+':'+_0xcb4660['location'][_0x3bca2a(0x167)]);_0xe117a7['push'](''+_0x3a3c93+_0x335a6a+':\x20'+_0x20a22a(_0xcb4660['level'])+'\x20'+_0x3ef71d('['+_0xcb4660['code']+']'));}else _0xe117a7[_0x3bca2a(0x164)](''+_0x3a3c93+a142_0x2cf9cf[_0x3bca2a(0x17f)](_0xcb4660[_0x3bca2a(0x166)])+':\x20'+_0x20a22a(_0xcb4660[_0x3bca2a(0x15f)])+'\x20'+_0x3ef71d('['+_0xcb4660['code']+']'));_0xe117a7[_0x3bca2a(0x164)](_0xcb4660['message']);if(_0xcb4660['location']&&_0x5b41bc){const _0x9b8edd=_0x5b41bc[_0x3bca2a(0x15e)]('\x0a'),{line:_0x22f98f,column:_0x1cbfa7}=_0xcb4660[_0x3bca2a(0x15b)],_0x229dba=Math[_0x3bca2a(0x16e)](0x1,_0x22f98f-0x1),_0x18f904=Math['min'](_0x9b8edd[_0x3bca2a(0x172)],_0x22f98f+0x1);_0xe117a7[_0x3bca2a(0x164)]('');for(let _0x1018a3=_0x229dba;_0x1018a3<=_0x18f904;_0x1018a3++){const _0x2ccb8a=_0x9b8edd[_0x1018a3-0x1]||'',_0x35694b=a142_0x2cf9cf[_0x3bca2a(0x17f)](_0x1018a3['toString']()[_0x3bca2a(0x16c)](0x4)),_0x3b64cc=a142_0x2cf9cf[_0x3bca2a(0x17f)](_0x3bca2a(0x156));if(_0x1018a3===_0x22f98f){_0xe117a7[_0x3bca2a(0x164)]('\x20\x20'+_0x35694b+_0x3b64cc+_0x20a22a(_0x2ccb8a));const _0x1f324a='\x20'['repeat'](0x4+0x3+_0x1cbfa7-0x1);_0xe117a7[_0x3bca2a(0x164)]('\x20\x20'+_0x1f324a+_0x20a22a('^'));}else _0xe117a7[_0x3bca2a(0x164)]('\x20\x20'+_0x35694b+_0x3b64cc+a142_0x2cf9cf[_0x3bca2a(0x17f)](_0x2ccb8a));}}return _0xe117a7[_0x3bca2a(0x177)]('\x0a');}export function formatValidationResult(_0x52df41,_0x3bdc66,_0x281f6f){const _0x1c2faa=a142_0x49d2,_0x331616=[];for(const _0x5ea677 of _0x52df41[_0x1c2faa(0x178)]){_0x331616['push'](formatIssueWithContext(_0x5ea677,_0x3bdc66,_0x281f6f)),_0x331616[_0x1c2faa(0x164)]('');}for(const _0x37e0ff of _0x52df41[_0x1c2faa(0x15c)]){_0x331616[_0x1c2faa(0x164)](formatIssueWithContext(_0x37e0ff,_0x3bdc66,_0x281f6f)),_0x331616['push']('');}return _0x331616[_0x1c2faa(0x177)]('\x0a');}
|