@treasuredata/tdx 2026.3.9 → 2026.3.10
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/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.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.d.ts +2 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts +12 -0
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a4c52,_0x58c5fb){const _0xc1c59f=a144_0x2588,_0x28e6bc=_0x1a4c52();while(!![]){try{const _0x1e2dc8=parseInt(_0xc1c59f(0x161))/0x1+-parseInt(_0xc1c59f(0x168))/0x2*(-parseInt(_0xc1c59f(0x14f))/0x3)+-parseInt(_0xc1c59f(0x149))/0x4+parseInt(_0xc1c59f(0x15f))/0x5+-parseInt(_0xc1c59f(0x165))/0x6+-parseInt(_0xc1c59f(0x15b))/0x7+parseInt(_0xc1c59f(0x146))/0x8*(parseInt(_0xc1c59f(0x16c))/0x9);if(_0x1e2dc8===_0x58c5fb)break;else _0x28e6bc['push'](_0x28e6bc['shift']());}catch(_0xf2e5a3){_0x28e6bc['push'](_0x28e6bc['shift']());}}}(a144_0x1857,0x2b87d));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a144_0x2588(_0x349868,_0x54a35a){_0x349868=_0x349868-0x13f;const _0x185752=a144_0x1857();let _0x25888e=_0x185752[_0x349868];return _0x25888e;}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x4713a2,_0x287f2f={},_0x3a8661={}){const _0x3614f0=a144_0x2588;if(_0x3a8661['skipSchema'])return runSemanticChecks(_0x4713a2,_0x287f2f);const _0xc967e4=SegmentDefSchema[_0x3614f0(0x166)](_0x4713a2);if(_0xc967e4[_0x3614f0(0x15a)])return runSemanticChecks(_0xc967e4[_0x3614f0(0x175)],_0x287f2f);return zodErrorsToValidationResult(_0xc967e4[_0x3614f0(0x160)],_0x287f2f);}export function validateRuleDef(_0x4cead3,_0x47acd5,_0xaaf84b){const _0x15f035=a144_0x2588;if(!_0x4cead3)return[];const _0x2b296a=RuleDefSchema['safeParse'](_0x4cead3);if(_0x2b296a[_0x15f035(0x15a)])return checkRule(_0x2b296a[_0x15f035(0x175)],_0x47acd5,_0xaaf84b);const _0x36ad03=flattenZodIssues(_0x2b296a['error']['issues']);return _0x36ad03[_0x15f035(0x16a)](_0x1cd3f3=>{const _0x30a611=_0x15f035,_0x53e179=formatZodPath(_0x1cd3f3['path']),_0x52b5da=_0x53e179?_0x47acd5+'.'+_0x53e179:_0x47acd5,_0x39414c=mapZodIssueToCode(_0x1cd3f3,_0x53e179),_0x1d1228=getLocationFromPath(_0xaaf84b['document'],_0xaaf84b['source'],pathToArray(_0x52b5da));return{'level':_0x30a611(0x160),'path':_0x52b5da,'code':_0x39414c,'message':_0x1cd3f3[_0x30a611(0x179)],..._0x1d1228&&{'location':_0x1d1228}};});}function zodErrorsToValidationResult(_0x198f70,_0x2ab6e6){const _0x327145=a144_0x2588,_0x342aa0=flattenZodIssues(_0x198f70['issues']),_0x17542d=_0x342aa0[_0x327145(0x16a)](_0x323871=>{const _0x4b13f3=_0x327145,_0x58d2a5=formatZodPath(_0x323871[_0x4b13f3(0x176)]),_0x51f6c4=mapZodIssueToCode(_0x323871,_0x58d2a5),_0xc14a89=getLocationFromPath(_0x2ab6e6[_0x4b13f3(0x181)],_0x2ab6e6[_0x4b13f3(0x182)],_0x323871[_0x4b13f3(0x176)]['map'](_0x57b418=>typeof _0x57b418===_0x4b13f3(0x17b)?String(_0x57b418):_0x57b418));return{'level':_0x4b13f3(0x160),'path':_0x58d2a5,'code':_0x51f6c4,'message':_0x323871['message'],..._0xc14a89&&{'location':_0xc14a89}};});return{'valid':![],'errors':_0x17542d,'warnings':[]};}function mapZodIssueToCode(_0x420081,_0x13eac9){const _0x5414ca=a144_0x2588,_0x1de041=_0x420081['code']==='custom'?_0x420081['params']:undefined;if(_0x13eac9===_0x5414ca(0x164))return _0x5414ca(0x177);if(_0x13eac9===_0x5414ca(0x14b)||_0x13eac9[_0x5414ca(0x170)](_0x5414ca(0x16f))){if(_0x420081[_0x5414ca(0x151)]==='invalid_value'){if(_0x13eac9===_0x5414ca(0x14b)||_0x13eac9[_0x5414ca(0x156)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x13eac9[_0x5414ca(0x170)](_0x5414ca(0x145)))return _0x5414ca(0x158);if(_0x13eac9[_0x5414ca(0x170)](_0x5414ca(0x13f)))return _0x5414ca(0x14a);if(_0x1de041?.[_0x5414ca(0x162)]===_0x5414ca(0x163))return'MISSING_BETWEEN_BOUNDS';if(_0x1de041?.[_0x5414ca(0x162)]===_0x5414ca(0x167))return _0x5414ca(0x167);if(_0x13eac9[_0x5414ca(0x170)](_0x5414ca(0x159))||_0x13eac9==='conditions')return _0x5414ca(0x148);if(_0x13eac9[_0x5414ca(0x153)](_0x5414ca(0x17e)))return _0x5414ca(0x180);if(_0x13eac9[_0x5414ca(0x170)](_0x5414ca(0x178)))return'MISSING_SEGMENT_REFERENCE';return _0x5414ca(0x141);}function runSemanticChecks(_0x5a5c1e,_0x30a2cd){const _0x4b6611=a144_0x2588,_0x35a92f=[];_0x5a5c1e['rule']&&_0x35a92f['push'](...checkRule(_0x5a5c1e['rule'],_0x4b6611(0x152),_0x30a2cd));const _0x2979ea=_0x35a92f[_0x4b6611(0x143)](_0xea95e1=>_0xea95e1[_0x4b6611(0x155)]===_0x4b6611(0x160)),_0x4d0150=_0x35a92f['filter'](_0x3eeee9=>_0x3eeee9[_0x4b6611(0x155)]===_0x4b6611(0x16d));return{'valid':_0x2979ea['length']===0x0,'errors':_0x2979ea,'warnings':_0x4d0150};}function a144_0x1857(){const _0x1458c2=['map','aggregation','182421QQIvOW','warning','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','.type','endsWith','And','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','Behavior','length','data','path','MISSING_NAME','.segment','message','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','symbol','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','Attribute\x20name\x20cannot\x20be\x20empty','arrayMatching','.source','INVALID_ARRAY_MATCHING','document','source','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','.operator.value','BEHAVIOR_SOURCE_MISSING_FILTER','SEGMENT_SCHEMA_ERROR','conditions','filter','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','.operator.type','8IifjGQ','\x27\x20with\x20attribute\x20\x27','MISSING_CONDITIONS','178620UpkWsc','MISSING_OPERATOR_VALUE','rule.type','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','EMPTY_CONDITIONS','.filter','3Kxmcdq','type','code','rule','includes','attribute','level','match','.attribute','INVALID_OPERATOR_TYPE','.conditions','success','1115709OuzvqG','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','push','Behavior\x20source\x20\x27','991780gzGckM','error','36978QViaNT','validationCode','MISSING_BETWEEN_BOUNDS','name','999264lDkaRm','safeParse','MISSING_TIME_UNIT','586568TocQtc','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20'];a144_0x1857=function(){return _0x1458c2;};return a144_0x1857();}function checkRule(_0xfef562,_0x29eb28,_0x20f311){const _0x558bc7=a144_0x2588,_0x47cc7f=[];if(_0xfef562[_0x558bc7(0x142)]['length']===0x0)return _0x47cc7f[_0x558bc7(0x15d)]({'level':_0x558bc7(0x160),'path':_0x29eb28+_0x558bc7(0x159),'code':_0x558bc7(0x14d),'message':_0x558bc7(0x17a),'location':getLocationFromPath(_0x20f311[_0x558bc7(0x181)],_0x20f311['source'],pathToArray(_0x29eb28+_0x558bc7(0x159)))}),_0x47cc7f;return _0x47cc7f[_0x558bc7(0x15d)](...checkConditions(_0xfef562[_0x558bc7(0x142)],_0x29eb28,_0x20f311)),_0x47cc7f;}function checkConditions(_0xfed8f5,_0x10ed0c,_0x51184e){const _0x3204bd=a144_0x2588,_0x54a498=[];for(let _0x137187=0x0;_0x137187<_0xfed8f5[_0x3204bd(0x174)];_0x137187++){const _0x287c36=_0xfed8f5[_0x137187],_0x4376f8=_0x10ed0c+'.conditions['+_0x137187+']';_0x54a498[_0x3204bd(0x15d)](...checkCondition(_0x287c36,_0x4376f8,_0x51184e));}return _0x54a498;}function checkCondition(_0x25e7a2,_0x1ca1b1,_0x56840f){const _0x2ca552=a144_0x2588,_0x49e171=[];if(_0x25e7a2['type']===_0x2ca552(0x171)||_0x25e7a2['type']==='Or')return _0x25e7a2[_0x2ca552(0x142)][_0x2ca552(0x174)]===0x0?_0x49e171[_0x2ca552(0x15d)]({'level':_0x2ca552(0x160),'path':_0x1ca1b1+'.conditions','code':'EMPTY_CONDITIONS','message':_0x25e7a2[_0x2ca552(0x150)]+_0x2ca552(0x172),'location':getLocationFromPath(_0x56840f[_0x2ca552(0x181)],_0x56840f['source'],pathToArray(_0x1ca1b1+'.conditions'))}):_0x49e171[_0x2ca552(0x15d)]({'level':_0x2ca552(0x160),'path':_0x1ca1b1,'code':'NESTED_CONDITION_GROUP','message':_0x25e7a2[_0x2ca552(0x150)]+'\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20'+_0x2ca552(0x169)+_0x2ca552(0x17c),'location':getLocationFromPath(_0x56840f[_0x2ca552(0x181)],_0x56840f[_0x2ca552(0x182)],pathToArray(_0x1ca1b1))}),_0x49e171;if(_0x25e7a2[_0x2ca552(0x150)]==='Value'||_0x25e7a2[_0x2ca552(0x150)]===_0x2ca552(0x173)){const _0x25de8a=_0x25e7a2,_0x1388ec=_0x25de8a[_0x2ca552(0x182)],_0x33f7f9=_0x25de8a[_0x2ca552(0x16b)],_0x27a55d=_0x1388ec||_0x33f7f9;(!_0x25de8a[_0x2ca552(0x154)]||_0x25de8a[_0x2ca552(0x154)]==='')&&(!_0x27a55d&&_0x49e171[_0x2ca552(0x15d)]({'level':_0x2ca552(0x160),'path':_0x1ca1b1+_0x2ca552(0x157),'code':'EMPTY_ATTRIBUTE','message':_0x2ca552(0x17d),'location':getLocationFromPath(_0x56840f[_0x2ca552(0x181)],_0x56840f[_0x2ca552(0x182)],pathToArray(_0x1ca1b1+_0x2ca552(0x157)))}));_0x25de8a[_0x2ca552(0x143)]&&_0x49e171[_0x2ca552(0x15d)](...checkRule(_0x25de8a[_0x2ca552(0x143)],_0x1ca1b1+_0x2ca552(0x14e),_0x56840f));if(_0x25de8a[_0x2ca552(0x182)]){const _0x420c61=_0x25de8a[_0x2ca552(0x154)]&&_0x25de8a[_0x2ca552(0x154)]!=='';_0x420c61&&!_0x25de8a[_0x2ca552(0x143)]&&_0x49e171[_0x2ca552(0x15d)]({'level':_0x2ca552(0x160),'path':_0x1ca1b1+_0x2ca552(0x17f),'code':_0x2ca552(0x140),'message':_0x2ca552(0x15e)+_0x25de8a['source']+_0x2ca552(0x147)+_0x25de8a[_0x2ca552(0x154)]+'\x27\x20'+_0x2ca552(0x16e)+_0x2ca552(0x183)+_0x2ca552(0x14c),'location':getLocationFromPath(_0x56840f['document'],_0x56840f['source'],pathToArray(_0x1ca1b1+_0x2ca552(0x17f)))}),_0x420c61&&_0x25de8a[_0x2ca552(0x143)]&&_0x49e171[_0x2ca552(0x15d)]({'level':_0x2ca552(0x16d),'path':_0x1ca1b1+_0x2ca552(0x157),'code':_0x2ca552(0x144),'message':'Attribute\x20\x27'+_0x25de8a[_0x2ca552(0x154)]+_0x2ca552(0x15c)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x56840f['document'],_0x56840f[_0x2ca552(0x182)],pathToArray(_0x1ca1b1+_0x2ca552(0x157)))});}}return _0x49e171;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2befb4,_0x56f335){const _0x4a2520=a145_0xce4c,_0xa5980d=_0x2befb4();while(!![]){try{const _0xb95ed3=parseInt(_0x4a2520(0x1d1))/0x1*(parseInt(_0x4a2520(0x1b6))/0x2)+parseInt(_0x4a2520(0x1c0))/0x3*(parseInt(_0x4a2520(0x1a3))/0x4)+-parseInt(_0x4a2520(0x19e))/0x5+parseInt(_0x4a2520(0x1a0))/0x6+-parseInt(_0x4a2520(0x19f))/0x7+-parseInt(_0x4a2520(0x1c7))/0x8+-parseInt(_0x4a2520(0x1ae))/0x9*(-parseInt(_0x4a2520(0x1be))/0xa);if(_0xb95ed3===_0x56f335)break;else _0xa5980d['push'](_0xa5980d['shift']());}catch(_0x1b2556){_0xa5980d['push'](_0xa5980d['shift']());}}}(a145_0x3e20,0x77273));import a145_0x41ef19 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(_0x59d4f7){const _0xad5092=a145_0xce4c;return _0x59d4f7[_0xad5092(0x19d)]!==_0xad5092(0x1a4);}export function isScopedResolution(_0x486ca5){const _0x3f8d64=a145_0xce4c;return _0x486ca5[_0x3f8d64(0x19d)]==='directory'||_0x486ca5[_0x3f8d64(0x19d)]===_0x3f8d64(0x1b1)||_0x486ca5[_0x3f8d64(0x19d)]===_0x3f8d64(0x1b8);}function a145_0x3e20(){const _0x37bbd5=['4748cXIuEq','No\x20tdx.json\x20found','context','No\x20tdx.json\x20found\x20for\x20file:\x20','scopedFolderPath','no_parent','exists','folderPath','190BmqzAj','parent_segment','273wELVPC','startsWith','isDirectory','cwd','isFile','match','File\x20not\x20found:\x20','246504XQfIuj','dirname','file_not_found','Not\x20a\x20YAML\x20file:\x20','trim','parentSegment','segmentName','resolve','isScoped','segment','233LiNckE','join','type','2857350dvhNxP','5356064YLNyMl','3511212JchluS','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','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','1172mhByrr','error','parse','replace','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','invalid_yaml','readFile','stat','journey','resourceType','parent_name','327069dYtAnQ','no_config','extname','file','includes','configDir','basename','message'];a145_0x3e20=function(){return _0x37bbd5;};return a145_0x3e20();}export function getScopedDetails(_0x18cb2f){const _0x32f81c=a145_0xce4c;if(isScopedResolution(_0x18cb2f))return{'isScoped':_0x18cb2f[_0x32f81c(0x1cf)],'scopedFolderPath':_0x18cb2f['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x56ed42,_0x434ed2){const _0x8472da=a145_0xce4c;let _0x4ef18b=a145_0x41ef19['resolve'](_0x56ed42);const _0x4efa37=a145_0x41ef19[_0x8472da(0x1a5)](_0x4ef18b)['root'];while(_0x4ef18b!==_0x4efa37){const _0x44349a=a145_0x41ef19[_0x8472da(0x19c)](_0x4ef18b,'tdx.json');if(await _0x434ed2[_0x8472da(0x1bc)](_0x44349a))try{const _0x22cc63=await _0x434ed2['readFile'](_0x44349a),_0x213151=JSON[_0x8472da(0x1a5)](_0x22cc63);if(_0x213151[_0x8472da(0x1bf)]&&typeof _0x213151['parent_segment']==='string')return{'configPath':_0x44349a,'configDir':_0x4ef18b,'parentSegment':_0x213151[_0x8472da(0x1bf)]};}catch{}_0x4ef18b=a145_0x41ef19['dirname'](_0x4ef18b);}return null;}function calculateScopedPath(_0x14a682,_0x19ec34){const _0x3e677d=a145_0xce4c,_0x37b42b=a145_0x41ef19['relative'](_0x19ec34,_0x14a682),_0x2878c8=_0x37b42b!==''&&_0x37b42b!=='.'&&!_0x37b42b[_0x3e677d(0x1c1)]('..');return{'isScoped':_0x2878c8,'scopedFolderPath':_0x2878c8?_0x37b42b[_0x3e677d(0x1a6)](/\\/g,'/'):''};}function a145_0xce4c(_0x5740c9,_0x2a338b){_0x5740c9=_0x5740c9-0x19c;const _0x3e206b=a145_0x3e20();let _0xce4c26=_0x3e206b[_0x5740c9];return _0xce4c26;}export async function resolveTarget(_0x34e4ca){const _0x526aee=a145_0xce4c,{arg:_0xf479b2,contextParent:_0x28cdc4,cwd:cwd=process[_0x526aee(0x1c3)](),fs:fs=nodeFileSystem}=_0x34e4ca;if(_0xf479b2&&isYamlFilePath(_0xf479b2))try{const _0x3bdbe5=await resolveYamlFilePath(_0xf479b2,fs),_0x568b82=a145_0x41ef19['resolve'](_0xf479b2),_0x5a78e1=a145_0x41ef19['dirname'](_0x568b82),_0x2fd81e=await findTdxConfigAsync(_0x5a78e1,fs);if(!_0x2fd81e){if(_0x28cdc4){const _0x27e47e=a145_0x41ef19[_0x526aee(0x1c8)](_0x568b82);return{'type':'file','parentName':_0x28cdc4,'targetDir':_0x27e47e,'configRoot':_0x27e47e,'filePath':_0x568b82,'resourceName':_0x3bdbe5[_0x526aee(0x1cd)],'folderPath':_0x3bdbe5[_0x526aee(0x1bd)],'resourceType':_0x3bdbe5[_0x526aee(0x1ac)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x526aee(0x1a4),'errorCode':_0x526aee(0x1af),'message':_0x526aee(0x1b9)+_0xf479b2,'arg':_0xf479b2,'helpText':_0x526aee(0x1a7)};}const _0x582115=calculateScopedPath(_0x5a78e1,_0x2fd81e['configDir']);return{'type':_0x526aee(0x1b1),'parentName':_0x2fd81e[_0x526aee(0x1cc)],'targetDir':_0x2fd81e[_0x526aee(0x1b3)],'configRoot':_0x2fd81e['configDir'],'filePath':_0x568b82,'resourceName':_0x3bdbe5[_0x526aee(0x1cd)],'folderPath':_0x3bdbe5[_0x526aee(0x1bd)],'resourceType':_0x3bdbe5[_0x526aee(0x1ac)],'isScoped':_0x582115[_0x526aee(0x1cf)],'scopedFolderPath':_0x582115[_0x526aee(0x1ba)]};}catch(_0x2c3426){const _0x31f907=_0x2c3426 instanceof Error?_0x2c3426[_0x526aee(0x1b5)]:String(_0x2c3426);if(_0x31f907[_0x526aee(0x1b2)]('File\x20not\x20found'))return{'type':_0x526aee(0x1a4),'errorCode':_0x526aee(0x1c9),'message':_0x526aee(0x1c6)+_0xf479b2,'arg':_0xf479b2};if(_0x31f907[_0x526aee(0x1b2)](_0x526aee(0x1b7))){if(_0x28cdc4){const _0x66c66b=a145_0x41ef19[_0x526aee(0x1ce)](_0xf479b2);if(await fs[_0x526aee(0x1bc)](_0x66c66b)){const _0x136b76=a145_0x41ef19[_0x526aee(0x1c8)](_0x66c66b),_0x5c0373=await fs[_0x526aee(0x1a9)](_0x66c66b),_0x5d0fd7=_0x5c0373[_0x526aee(0x1c5)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xfdd17d=_0x5c0373[_0x526aee(0x1c5)](/^type:\s*["']?([^"'\n]+)["']?/m),_0xe2424=_0x5d0fd7?_0x5d0fd7[0x1][_0x526aee(0x1cb)]():a145_0x41ef19[_0x526aee(0x1b4)](_0xf479b2,a145_0x41ef19[_0x526aee(0x1b0)](_0xf479b2)),_0x1a5e61=_0xfdd17d&&_0xfdd17d[0x1][_0x526aee(0x1cb)]()==='journey'?_0x526aee(0x1ab):_0x526aee(0x1d0);return{'type':'file','parentName':_0x28cdc4,'targetDir':_0x136b76,'configRoot':_0x136b76,'filePath':_0x66c66b,'resourceName':_0xe2424,'folderPath':'','resourceType':_0x1a5e61,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x526aee(0x1af),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0xf479b2,'arg':_0xf479b2,'helpText':_0x526aee(0x1a7)};}return{'type':'error','errorCode':_0x526aee(0x1a8),'message':_0x31f907,'arg':_0xf479b2};}if(_0xf479b2){const _0x4b61dc=a145_0x41ef19[_0x526aee(0x1ce)](cwd,_0xf479b2);let _0x3184e8=null;try{_0x3184e8=await fs[_0x526aee(0x1aa)](_0x4b61dc);}catch{}if(_0x3184e8?.[_0x526aee(0x1c2)]()){const _0x34868a=await findTdxConfigAsync(_0x4b61dc,fs);if(_0x34868a){const _0x27dfb1=calculateScopedPath(_0x4b61dc,_0x34868a[_0x526aee(0x1b3)]);return{'type':'directory','parentName':_0x34868a[_0x526aee(0x1cc)],'targetDir':_0x4b61dc,'configRoot':_0x34868a[_0x526aee(0x1b3)],'isScoped':_0x27dfb1[_0x526aee(0x1cf)],'scopedFolderPath':_0x27dfb1[_0x526aee(0x1ba)]};}if(_0x28cdc4)return{'type':'directory','parentName':_0x28cdc4,'targetDir':_0x4b61dc,'configRoot':_0x4b61dc,'isScoped':![],'scopedFolderPath':''};return{'type':_0x526aee(0x1a4),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0xf479b2,'arg':_0xf479b2,'helpText':_0x526aee(0x1a7)};}if(_0x3184e8?.[_0x526aee(0x1c4)]())return{'type':_0x526aee(0x1a4),'errorCode':_0x526aee(0x1a8),'message':_0x526aee(0x1ca)+_0xf479b2,'arg':_0xf479b2,'helpText':_0x526aee(0x1a2)};const _0x567243=sanitizeFileName(_0xf479b2),_0x5d1413=getSegmentRootDir(_0x567243,cwd);return{'type':_0x526aee(0x1ad),'parentName':_0xf479b2,'targetDir':_0x5d1413,'configRoot':_0x5d1413};}const _0x4dc4e4=await findTdxConfigAsync(cwd,fs);if(_0x4dc4e4){const _0xc413d9=calculateScopedPath(cwd,_0x4dc4e4[_0x526aee(0x1b3)]);return{'type':_0x526aee(0x1b8),'parentName':_0x4dc4e4['parentSegment'],'targetDir':cwd,'configRoot':_0x4dc4e4[_0x526aee(0x1b3)],'isScoped':_0xc413d9[_0x526aee(0x1cf)],'scopedFolderPath':_0xc413d9[_0x526aee(0x1ba)]};}if(_0x28cdc4){const _0x57c335=sanitizeFileName(_0x28cdc4),_0x1a5eb3=getSegmentRootDir(_0x57c335,cwd);return{'type':_0x526aee(0x1b8),'parentName':_0x28cdc4,'targetDir':_0x1a5eb3,'configRoot':_0x1a5eb3,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x526aee(0x1a4),'errorCode':_0x526aee(0x1bb),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x526aee(0x1a1)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x38b083=a146_0x3f78;(function(_0x880281,_0x5e3cea){const _0x40e08d=a146_0x3f78,_0x288a73=_0x880281();while(!![]){try{const _0x57649c=parseInt(_0x40e08d(0x10c))/0x1*(-parseInt(_0x40e08d(0xfc))/0x2)+parseInt(_0x40e08d(0x108))/0x3*(parseInt(_0x40e08d(0xfa))/0x4)+-parseInt(_0x40e08d(0x102))/0x5*(parseInt(_0x40e08d(0x104))/0x6)+-parseInt(_0x40e08d(0x10b))/0x7+-parseInt(_0x40e08d(0x107))/0x8+parseInt(_0x40e08d(0x109))/0x9*(-parseInt(_0x40e08d(0x10a))/0xa)+parseInt(_0x40e08d(0xf8))/0xb;if(_0x57649c===_0x5e3cea)break;else _0x288a73['push'](_0x288a73['shift']());}catch(_0x402f99){_0x288a73['push'](_0x288a73['shift']());}}}(a146_0x2068,0x9af1e));function a146_0x2068(){const _0x54be72=['3lcdJMf','9kGkwhQ','5442630kcFoAh','7318640wNhyRv','34805MeLBDH','object','stringify','resolve','replace','cwd','49701960jumqDh','engage_workspace','1387820BhtkmK','string','24YEtLfE','tdx.json','parent_segment','utf-8','join','parse','5641555psfhvN','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','6eICfuz','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','dirname','8759256Ixhyfs'];a146_0x2068=function(){return _0x54be72;};return a146_0x2068();}import{existsSync,readFileSync}from'fs';import a146_0x2ed4f9 from'path';const TDX_CONFIG_FILE=a146_0x38b083(0xfd),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x1aa30f=process[a146_0x38b083(0xf7)]()){const _0xbb9a47=a146_0x38b083;let _0x104491=a146_0x2ed4f9[_0xbb9a47(0xf5)](_0x1aa30f);const _0x25732a=a146_0x2ed4f9['parse'](_0x104491)['root'];while(_0x104491!==_0x25732a){const _0x32b7c3=a146_0x2ed4f9[_0xbb9a47(0x100)](_0x104491,TDX_CONFIG_FILE);if(existsSync(_0x32b7c3))return _0x32b7c3;_0x104491=a146_0x2ed4f9[_0xbb9a47(0x106)](_0x104491);}return null;}export function loadTdxConfig(_0x34e0f4){const _0x279f49=a146_0x38b083,_0x322563=readFileSync(_0x34e0f4,_0x279f49(0xff));let _0x54a95d;try{_0x54a95d=JSON[_0x279f49(0x101)](_0x322563);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x34e0f4);}if(!_0x54a95d||typeof _0x54a95d!==_0x279f49(0xf3))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x58b355=_0x54a95d,_0x135000=_0x58b355[_0x279f49(0xfe)]&&typeof _0x58b355[_0x279f49(0xfe)]===_0x279f49(0xfb),_0x4f67a8=_0x58b355[_0x279f49(0xf9)]&&typeof _0x58b355[_0x279f49(0xf9)]===_0x279f49(0xfb);if(!_0x135000&&!_0x4f67a8)throw new Error(_0x279f49(0x105));const _0x3a947c={};return _0x135000&&(_0x3a947c[_0x279f49(0xfe)]=_0x58b355['parent_segment']),_0x4f67a8&&(_0x3a947c[_0x279f49(0xf9)]=_0x58b355[_0x279f49(0xf9)]),_0x3a947c;}export function findTdxConfig(_0x1f1617=process[a146_0x38b083(0xf7)]()){const _0x2bee27=a146_0x38b083,_0x4d2255=findTdxConfigPath(_0x1f1617);if(!_0x4d2255)throw new Error(_0x2bee27(0x103));const _0xad8fd2=loadTdxConfig(_0x4d2255),_0x56dcca=a146_0x2ed4f9[_0x2bee27(0x106)](_0x4d2255);return{'config':_0xad8fd2,'configPath':_0x4d2255,'configDir':_0x56dcca};}export function tryFindTdxConfig(_0x1802f4){try{return findTdxConfig(_0x1802f4);}catch{return null;}}export function getSegmentRootDir(_0x2ffee2,_0x66586b=process['cwd']()){const _0x55c9b8=a146_0x38b083;return a146_0x2ed4f9[_0x55c9b8(0x100)](_0x66586b,SEGMENTS_DIR,_0x2ffee2);}export function getTdxConfigPath(_0x27450d,_0x2a1d28=process[a146_0x38b083(0xf7)]()){const _0x53df8b=a146_0x38b083;return a146_0x2ed4f9[_0x53df8b(0x100)](getSegmentRootDir(_0x27450d,_0x2a1d28),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2854d3,_0x30d97e){const _0x3d0751=a146_0x38b083,_0x588391=a146_0x2ed4f9[_0x3d0751(0xf5)](_0x2854d3),_0x6b6717=a146_0x2ed4f9['relative'](_0x30d97e,_0x588391);if(_0x6b6717['startsWith']('..'))return'';return _0x6b6717;}function a146_0x3f78(_0x2c97d2,_0x117137){_0x2c97d2=_0x2c97d2-0xf3;const _0x2068ae=a146_0x2068();let _0x3f7855=_0x2068ae[_0x2c97d2];return _0x3f7855;}export function localPathToTdFolderPath(_0x369f1f){const _0x3cae15=a146_0x38b083,_0x3d41bc=a146_0x2ed4f9['dirname'](_0x369f1f);if(_0x3d41bc==='.'||_0x3d41bc==='')return'';return _0x3d41bc[_0x3cae15(0xf6)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x394700,_0x2769c0){const _0x3f5a35=a146_0x38b083;if(!_0x394700)return _0x2769c0;return a146_0x2ed4f9[_0x3f5a35(0x100)](_0x2769c0,_0x394700);}export function createTdxConfigContent(_0x5722fc){const _0x583371=a146_0x38b083,_0x305d41={'parent_segment':_0x5722fc};return JSON[_0x583371(0xf4)](_0x305d41,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2e85ac){const _0x8a5751=a146_0x38b083,_0x1ac4b0={'engage_workspace':_0x2e85ac};return JSON[_0x8a5751(0xf4)](_0x1ac4b0,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x3f89ea=a147_0x292f;(function(_0xbe9e0f,_0x47b3cc){const _0x596f03=a147_0x292f,_0x46851e=_0xbe9e0f();while(!![]){try{const _0x446fee=parseInt(_0x596f03(0x1f5))/0x1+parseInt(_0x596f03(0x1de))/0x2+parseInt(_0x596f03(0x1e3))/0x3*(-parseInt(_0x596f03(0x1d6))/0x4)+parseInt(_0x596f03(0x1ff))/0x5+parseInt(_0x596f03(0x1db))/0x6+-parseInt(_0x596f03(0x1e7))/0x7*(parseInt(_0x596f03(0x1f8))/0x8)+parseInt(_0x596f03(0x1f3))/0x9*(parseInt(_0x596f03(0x1d9))/0xa);if(_0x446fee===_0x47b3cc)break;else _0x46851e['push'](_0x46851e['shift']());}catch(_0x1fd993){_0x46851e['push'](_0x46851e['shift']());}}}(a147_0x26fd,0xb8b43));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x3f89ea(0x202)](['none',a147_0x3f89ea(0x1e6),a147_0x3f89ea(0x1fa),a147_0x3f89ea(0x1ed),'monthly',a147_0x3f89ea(0x1e8),a147_0x3f89ea(0x1e0)]);export const RepeatUnitSchema=z[a147_0x3f89ea(0x202)]([a147_0x3f89ea(0x1ef),a147_0x3f89ea(0x1e5),a147_0x3f89ea(0x1ee),a147_0x3f89ea(0x1d7),'month',a147_0x3f89ea(0x1f0),'none']);export const ScheduleDefSchema=z[a147_0x3f89ea(0x1ea)]({'type':ScheduleTypeSchema[a147_0x3f89ea(0x1dc)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a147_0x3f89ea(0x1f4)]()[a147_0x3f89ea(0x1dc)](),'repeat_sub_frequency':z[a147_0x3f89ea(0x1fe)](z[a147_0x3f89ea(0x1f4)]())[a147_0x3f89ea(0x1dc)](),'start_at':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1f7)]()[a147_0x3f89ea(0x1dc)](),'end_on':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1f7)]()[a147_0x3f89ea(0x1dc)](),'timezone':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1dc)]()});function a147_0x292f(_0x516609,_0x246405){_0x516609=_0x516609-0x1d6;const _0x26fd80=a147_0x26fd();let _0x292f7f=_0x26fd80[_0x516609];return _0x292f7f;}function a147_0x26fd(){const _0x24bb01=['hourly','7YIhcsZ','cron','rows','object','Top-N','masked','weekly','day','minute','once','asc','cols','153dgCEEk','number','126583kAoYCX','Connection\x20name\x20is\x20required','nullable','8024968CkSBxU','First','daily','min','string','onFailure','array','114005oZMZRZ','clear','record','enum','8MrKlxB','week','desc','321350pRqBTs','boolean','955932vvwODK','optional','onSuccess','1897542ZoLTbP','union','minutes_interval','unknown','All','66156tTVOxg','Activation\x20name\x20is\x20required','hour'];a147_0x26fd=function(){return _0x24bb01;};return a147_0x26fd();}export const NotificationDefSchema=z['object']({'notify_on':z[a147_0x3f89ea(0x1fe)](z[a147_0x3f89ea(0x202)]([a147_0x3f89ea(0x1dd),a147_0x3f89ea(0x1fd)]))[a147_0x3f89ea(0x1dc)](),'email_recipients':z[a147_0x3f89ea(0x1fe)](z[a147_0x3f89ea(0x1fc)]())[a147_0x3f89ea(0x1dc)]()});export const ActivationColumnDefSchema=z[a147_0x3f89ea(0x1df)]([z[a147_0x3f89ea(0x1fc)](),z[a147_0x3f89ea(0x1ea)]({'name':z['string'](),'type':z['string']()[a147_0x3f89ea(0x1dc)](),'visibility':z[a147_0x3f89ea(0x202)]([a147_0x3f89ea(0x200),a147_0x3f89ea(0x1ec)])[a147_0x3f89ea(0x1dc)]()})]);export const ActivationBehaviorDefSchema=z[a147_0x3f89ea(0x1ea)]({'columns':z[a147_0x3f89ea(0x1fe)](z['object']({'name':z[a147_0x3f89ea(0x1fc)](),'type':z[a147_0x3f89ea(0x1fc)]()['optional'](),'visibility':z['enum']([a147_0x3f89ea(0x200),a147_0x3f89ea(0x1ec)])['optional']()}))[a147_0x3f89ea(0x1dc)](),'behavior_table':z['string']()['optional'](),'join_row':z[a147_0x3f89ea(0x1f4)]()['nullable']()['optional'](),'join_strategy':z[a147_0x3f89ea(0x202)]([a147_0x3f89ea(0x1e2),a147_0x3f89ea(0x1f9),'Last',a147_0x3f89ea(0x1eb)])[a147_0x3f89ea(0x1dc)](),'formatting':z[a147_0x3f89ea(0x202)]([a147_0x3f89ea(0x1e9),a147_0x3f89ea(0x1f2)])[a147_0x3f89ea(0x1dc)](),'order_by':z[a147_0x3f89ea(0x1fe)](z[a147_0x3f89ea(0x1ea)]({'key':z[a147_0x3f89ea(0x1fc)](),'order':z['enum']([a147_0x3f89ea(0x1f1),a147_0x3f89ea(0x1d8)])}))[a147_0x3f89ea(0x1dc)]()});export const ActivationDefSchema=z['object']({'name':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1fb)](0x1,a147_0x3f89ea(0x1e4)),'description':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1dc)](),'connection':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1fb)](0x1,a147_0x3f89ea(0x1f6)),'all_columns':z[a147_0x3f89ea(0x1da)]()[a147_0x3f89ea(0x1dc)](),'columns':z['array'](ActivationColumnDefSchema)[a147_0x3f89ea(0x1dc)](),'schedule':ScheduleDefSchema[a147_0x3f89ea(0x1dc)](),'notification':NotificationDefSchema[a147_0x3f89ea(0x1dc)](),'connector_config':z[a147_0x3f89ea(0x201)](z[a147_0x3f89ea(0x1fc)](),z[a147_0x3f89ea(0x1e1)]())[a147_0x3f89ea(0x1dc)](),'activation_template_id':z[a147_0x3f89ea(0x1fc)]()[a147_0x3f89ea(0x1f7)]()[a147_0x3f89ea(0x1dc)](),'behavior':ActivationBehaviorDefSchema[a147_0x3f89ea(0x1f7)]()['optional'](),'run_after_journey_refresh':z['boolean']()[a147_0x3f89ea(0x1dc)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54cb92,_0x171a81){var _0x31f1d5=a148_0xaaf4,_0x12c11f=_0x54cb92();while(!![]){try{var _0x14d856=parseInt(_0x31f1d5(0x1b9))/0x1*(-parseInt(_0x31f1d5(0x1b6))/0x2)+-parseInt(_0x31f1d5(0x1b7))/0x3+-parseInt(_0x31f1d5(0x1ba))/0x4+parseInt(_0x31f1d5(0x1b2))/0x5*(-parseInt(_0x31f1d5(0x1bb))/0x6)+parseInt(_0x31f1d5(0x1b1))/0x7*(parseInt(_0x31f1d5(0x1b8))/0x8)+-parseInt(_0x31f1d5(0x1b5))/0x9+-parseInt(_0x31f1d5(0x1b4))/0xa*(-parseInt(_0x31f1d5(0x1b3))/0xb);if(_0x14d856===_0x171a81)break;else _0x12c11f['push'](_0x12c11f['shift']());}catch(_0x18921d){_0x12c11f['push'](_0x12c11f['shift']());}}}(a148_0x45ef,0x3feb2));function a148_0xaaf4(_0x4a9ecc,_0x2b54f1){_0x4a9ecc=_0x4a9ecc-0x1b1;var _0x45eff5=a148_0x45ef();var _0xaaf4e5=_0x45eff5[_0x4a9ecc];return _0xaaf4e5;}function a148_0x45ef(){var _0x50d3c4=['985752fEncDe','8hfEJEo','8oFPipg','138448quWCZO','1472550xZcXWc','895853lRzmNz','5vvGUIp','143RITNeh','1029530ytkUyP','2115369hOCfYi','90224nnybNJ'];a148_0x45ef=function(){return _0x50d3c4;};return a148_0x45ef();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x1772b8=a149_0x33bc;(function(_0x5e829f,_0x1bfa59){const _0x40b34a=a149_0x33bc,_0x6924f7=_0x5e829f();while(!![]){try{const _0x361919=-parseInt(_0x40b34a(0x95))/0x1+parseInt(_0x40b34a(0x89))/0x2+parseInt(_0x40b34a(0x91))/0x3+parseInt(_0x40b34a(0x9a))/0x4+parseInt(_0x40b34a(0xab))/0x5+-parseInt(_0x40b34a(0xa6))/0x6*(-parseInt(_0x40b34a(0x88))/0x7)+-parseInt(_0x40b34a(0x92))/0x8;if(_0x361919===_0x1bfa59)break;else _0x6924f7['push'](_0x6924f7['shift']());}catch(_0x610176){_0x6924f7['push'](_0x6924f7['shift']());}}}(a149_0x4b7f,0xa7620));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum']([a149_0x1772b8(0x9e),'simulation','launched']);export const ReentryModeTypeSchema=z[a149_0x1772b8(0x8f)]([a149_0x1772b8(0x86),a149_0x1772b8(0x9d),a149_0x1772b8(0x90)]);export const WaitUnitTypeSchema=z['enum'](['day',a149_0x1772b8(0x85)]);export const StepTypeValueSchema=z['enum']([a149_0x1772b8(0x9b),a149_0x1772b8(0x8d),a149_0x1772b8(0x94),a149_0x1772b8(0xa8),a149_0x1772b8(0xa5),a149_0x1772b8(0x99),'end']);function a149_0x4b7f(){const _0x5035f4=['reentry_unless_goal_achieved','draft','string','object','optional','discriminatedUnion','filter','boolean','merge','7586994PMpuKh','isArray','ab_test','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','end','1651075rdaYxY','week','no_reentry','array','7UAlGJQ','950130bWECkh','number','refine','passthrough','activation','journey','enum','reentry_always','324636egmMxY','19682504OmuAgH','Journey\x20name\x20is\x20required','decision_point','393346rpRqyI','length','literal','journeys','jump','5445072bKVxGD','wait','min'];a149_0x4b7f=function(){return _0x5035f4;};return a149_0x4b7f();}export const EmbeddedSegmentDefSchema=z[a149_0x1772b8(0xa0)]({'description':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x1772b8(0xa0)]({'journey':z['string'](),'stage':z[a149_0x1772b8(0x9f)](),'bundle_id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)]()});export const CriteriaDefSchema=z[a149_0x1772b8(0xa0)]({'name':z['string'](),'description':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'segment':z['string'](),'target':JumpTargetDefSchema[a149_0x1772b8(0xa1)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a149_0x1772b8(0x8a)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'timeout':WaitConditionTimeoutDefSchema[a149_0x1772b8(0xa1)]()}),WaitStepParamsDefSchema=z[a149_0x1772b8(0xa0)]({'duration':z[a149_0x1772b8(0x8a)]()[a149_0x1772b8(0xa1)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'condition':WaitConditionDefSchema[a149_0x1772b8(0xa1)](),'days_of_week':z[a149_0x1772b8(0x87)](z[a149_0x1772b8(0x9f)]())[a149_0x1772b8(0xa1)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'next':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)]()},WaitStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z[a149_0x1772b8(0x97)](a149_0x1772b8(0x9b)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a149_0x1772b8(0x9f)]()}),ActivationStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z[a149_0x1772b8(0x97)](a149_0x1772b8(0x8d)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0x1772b8(0xa0)]({'name':z['string'](),'segment':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'segment_id':z[a149_0x1772b8(0x9f)]()['optional'](),'excluded':z[a149_0x1772b8(0xa4)]()[a149_0x1772b8(0xa1)](),'next':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a149_0x1772b8(0x87)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z['literal'](a149_0x1772b8(0x94)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x1772b8(0xa0)]({'id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'name':z[a149_0x1772b8(0x9f)](),'percentage':z[a149_0x1772b8(0x8a)](),'next':z['string']()[a149_0x1772b8(0xa1)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'customized_split':z['boolean']()[a149_0x1772b8(0xa1)]()}),AbTestStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z['literal'](a149_0x1772b8(0xa8)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z[a149_0x1772b8(0x97)]('merge')}),JumpStepParamsDefSchema=z[a149_0x1772b8(0xa0)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x1772b8(0xa0)]({...StepBaseFields,'type':z['literal']('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x1772b8(0x97)](a149_0x1772b8(0xaa))})[a149_0x1772b8(0x8c)]();export const StepDefSchema=z[a149_0x1772b8(0xa2)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0x1772b8(0xa0)]({'name':z[a149_0x1772b8(0x9f)](),'description':z['string']()[a149_0x1772b8(0xa1)](),'id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'entry_criteria':CriteriaDefSchema[a149_0x1772b8(0xa1)](),'exit_criteria':z[a149_0x1772b8(0x87)](CriteriaDefSchema)[a149_0x1772b8(0xa1)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'steps':z['array'](StepDefSchema)[a149_0x1772b8(0xa1)]()});export const JourneyEntryDefSchema=z[a149_0x1772b8(0xa0)]({'name':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'version':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'state':JourneyStateTypeSchema[a149_0x1772b8(0xa1)](),'latest':z[a149_0x1772b8(0xa4)]()['optional'](),'stages':z['array'](StageDefSchema),'id':z['string']()['optional'](),'version_number':z[a149_0x1772b8(0x8a)]()[a149_0x1772b8(0xa1)](),'goal':CriteriaDefSchema[a149_0x1772b8(0xa1)](),'reentry':ReentryModeTypeSchema[a149_0x1772b8(0xa1)]()});function a149_0x33bc(_0xa75327,_0x3986fb){_0xa75327=_0xa75327-0x85;const _0x4b7f6c=a149_0x4b7f();let _0x33bccc=_0x4b7f6c[_0xa75327];return _0x33bccc;}export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a149_0x1772b8(0x8e)),'name':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0x9c)](0x1,a149_0x1772b8(0x93)),'description':z['string']()[a149_0x1772b8(0xa1)](),'bundle_id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'bundle_name':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'folder_id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a149_0x1772b8(0xa4)]()[a149_0x1772b8(0xa1)](),'goal':CriteriaDefSchema[a149_0x1772b8(0xa1)](),'id':z[a149_0x1772b8(0x9f)]()[a149_0x1772b8(0xa1)](),'version':z['string']()[a149_0x1772b8(0xa1)](),'version_number':z[a149_0x1772b8(0x8a)]()[a149_0x1772b8(0xa1)](),'stages':z[a149_0x1772b8(0x87)](StageDefSchema)[a149_0x1772b8(0xa1)](),'versions':z[a149_0x1772b8(0x87)](JourneyEntryDefSchema)[a149_0x1772b8(0xa1)](),'journeys':z[a149_0x1772b8(0x87)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z['string'](),EmbeddedSegmentDefSchema)['optional'](),'activations':z['record'](z[a149_0x1772b8(0x9f)](),ActivationDefSchema)['optional']()})[a149_0x1772b8(0x8b)](_0x35af78=>{const _0x17874f=a149_0x1772b8,_0x41ea0d=[_0x35af78[_0x17874f(0x98)],_0x35af78['stages'],_0x35af78['versions']][_0x17874f(0xa3)](_0x1e22aa=>Array[_0x17874f(0xa7)](_0x1e22aa)&&_0x1e22aa['length']>0x0)[_0x17874f(0x96)];return _0x41ea0d===0x1;},{'message':a149_0x1772b8(0xa9)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a151_0x53c0(){var _0x49d187=['130QyzeNE','1098103yEvtbX','21rgJlsQ','12kOouqG','1812130HCBLEb','12618888HaHNxs','4979639MUGkyd','1753856smPoYJ','277086qovUxi','2040678OrmlpL'];a151_0x53c0=function(){return _0x49d187;};return a151_0x53c0();}(function(_0x5d711e,_0x44f1be){var _0xc50f92=a151_0x57fb,_0xa01e58=_0x5d711e();while(!![]){try{var _0x29c80d=-parseInt(_0xc50f92(0x140))/0x1+parseInt(_0xc50f92(0x13d))/0x2*(parseInt(_0xc50f92(0x141))/0x3)+-parseInt(_0xc50f92(0x13c))/0x4+-parseInt(_0xc50f92(0x143))/0x5*(-parseInt(_0xc50f92(0x142))/0x6)+-parseInt(_0xc50f92(0x13b))/0x7+-parseInt(_0xc50f92(0x144))/0x8+parseInt(_0xc50f92(0x13e))/0x9*(parseInt(_0xc50f92(0x13f))/0xa);if(_0x29c80d===_0x44f1be)break;else _0xa01e58['push'](_0xa01e58['shift']());}catch(_0x3fc01c){_0xa01e58['push'](_0xa01e58['shift']());}}}(a151_0x53c0,0xc7762));function a151_0x57fb(_0x1ac8ce,_0x81c9a7){_0x1ac8ce=_0x1ac8ce-0x13b;var _0x53c0fe=a151_0x53c0();var _0x57fbd4=_0x53c0fe[_0x1ac8ce];return _0x57fbd4;}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 a152_0x17a52c=a152_0x2872;(function(_0x4bf43e,_0x5e2e1b){const _0x5656e7=a152_0x2872,_0x1b79d7=_0x4bf43e();while(!![]){try{const _0x308e1c=parseInt(_0x5656e7(0x157))/0x1*(parseInt(_0x5656e7(0x173))/0x2)+-parseInt(_0x5656e7(0x142))/0x3*(parseInt(_0x5656e7(0x165))/0x4)+parseInt(_0x5656e7(0x158))/0x5*(parseInt(_0x5656e7(0x141))/0x6)+-parseInt(_0x5656e7(0x127))/0x7*(-parseInt(_0x5656e7(0x149))/0x8)+parseInt(_0x5656e7(0x150))/0x9+-parseInt(_0x5656e7(0x134))/0xa+-parseInt(_0x5656e7(0x164))/0xb*(-parseInt(_0x5656e7(0x15b))/0xc);if(_0x308e1c===_0x5e2e1b)break;else _0x1b79d7['push'](_0x1b79d7['shift']());}catch(_0x1bb273){_0x1b79d7['push'](_0x1b79d7['shift']());}}}(a152_0x4de3,0xbc90c));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x139),a152_0x17a52c(0x161),a152_0x17a52c(0x16b),'GreaterEqual',a152_0x17a52c(0x148),'In','Between','Regexp',a152_0x17a52c(0x170),'TimeWithinPast',a152_0x17a52c(0x168),'Contain',a152_0x17a52c(0x12d),'EndWith',a152_0x17a52c(0x12c)]);export const TimeUnitSchema=z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x15a),a152_0x17a52c(0x12a),'hour','day','week',a152_0x17a52c(0x128),a152_0x17a52c(0x156)]);export const AggregationTypeSchema=z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x138),a152_0x17a52c(0x144),a152_0x17a52c(0x151),a152_0x17a52c(0x12f),a152_0x17a52c(0x14a),'CountDistinct',a152_0x17a52c(0x14e),a152_0x17a52c(0x16f)]);const TemporalValueSchema=z['union']([z['object']({'timestamp':z['string']()}),z[a152_0x17a52c(0x140)]({'last':z[a152_0x17a52c(0x12e)]([z[a152_0x17a52c(0x12b)](),z['record'](z[a152_0x17a52c(0x159)](),z['number']())]),'unit':z[a152_0x17a52c(0x159)]()})]),OperatorValueSchema=z[a152_0x17a52c(0x12e)]([z[a152_0x17a52c(0x159)](),z[a152_0x17a52c(0x12b)](),z[a152_0x17a52c(0x14c)](),TemporalValueSchema,z[a152_0x17a52c(0x16c)](z[a152_0x17a52c(0x12e)]([z['string'](),z[a152_0x17a52c(0x12b)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x17a52c(0x139),a152_0x17a52c(0x161),'GreaterEqual',a152_0x17a52c(0x16b),a152_0x17a52c(0x148),'In',a152_0x17a52c(0x133),a152_0x17a52c(0x12d),'EndWith',a152_0x17a52c(0x129),a152_0x17a52c(0x15e),a152_0x17a52c(0x168)]),OPERATORS_REQUIRING_UNIT=new Set([a152_0x17a52c(0x15e),'TimeWithinNext']);export const OperatorDefSchema=z[a152_0x17a52c(0x140)]({'type':OperatorTypeSchema,'not':z[a152_0x17a52c(0x14c)]()['optional'](),'value':OperatorValueSchema['optional'](),'min':z[a152_0x17a52c(0x12e)]([z[a152_0x17a52c(0x12b)](),z[a152_0x17a52c(0x159)](),TemporalValueSchema])['optional'](),'max':z[a152_0x17a52c(0x12e)]([z[a152_0x17a52c(0x12b)](),z[a152_0x17a52c(0x159)](),TemporalValueSchema])[a152_0x17a52c(0x137)](),'unit':TimeUnitSchema[a152_0x17a52c(0x137)](),'duration':z[a152_0x17a52c(0x140)]({'day':z[a152_0x17a52c(0x12b)]()[a152_0x17a52c(0x137)](),'week':z['number']()[a152_0x17a52c(0x137)](),'month':z[a152_0x17a52c(0x12b)]()['optional'](),'year':z['number']()[a152_0x17a52c(0x137)](),'hour':z[a152_0x17a52c(0x12b)]()[a152_0x17a52c(0x137)](),'minute':z[a152_0x17a52c(0x12b)]()[a152_0x17a52c(0x137)](),'second':z[a152_0x17a52c(0x12b)]()[a152_0x17a52c(0x137)]()})[a152_0x17a52c(0x137)](),'from':z[a152_0x17a52c(0x140)]({'last':z['union']([z[a152_0x17a52c(0x12b)](),z[a152_0x17a52c(0x159)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a152_0x17a52c(0x14c)]()['optional']()})[a152_0x17a52c(0x130)]((_0x2c09e9,_0xe6b74d)=>{const _0x52352a=a152_0x17a52c;OPERATORS_REQUIRING_VALUE[_0x52352a(0x166)](_0x2c09e9[_0x52352a(0x155)])&&(_0x2c09e9[_0x52352a(0x14f)]===undefined||_0x2c09e9[_0x52352a(0x14f)]===null)&&_0xe6b74d['addIssue']({'code':_0x52352a(0x136),'message':_0x52352a(0x14d)+_0x2c09e9[_0x52352a(0x155)]+'\x27\x20requires\x20a\x20value','path':[_0x52352a(0x14f)]}),_0x2c09e9[_0x52352a(0x155)]==='Between'&&_0x2c09e9[_0x52352a(0x13f)]===undefined&&_0x2c09e9[_0x52352a(0x14b)]===undefined&&_0xe6b74d[_0x52352a(0x152)]({'code':_0x52352a(0x136),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x52352a(0x166)](_0x2c09e9[_0x52352a(0x155)])&&_0x2c09e9['value']!==undefined&&!_0x2c09e9[_0x52352a(0x131)]&&_0xe6b74d['addIssue']({'code':_0x52352a(0x136),'message':'Operator\x20\x27'+_0x2c09e9[_0x52352a(0x155)]+_0x52352a(0x132),'path':[_0x52352a(0x131)],'params':{'validationCode':_0x52352a(0x172)}}),_0x2c09e9['type']===_0x52352a(0x12c)&&(!_0x2c09e9[_0x52352a(0x13c)]&&_0xe6b74d[_0x52352a(0x152)]({'code':_0x52352a(0x136),'message':_0x52352a(0x13d),'path':[_0x52352a(0x13c)]}),!_0x2c09e9['from']&&_0xe6b74d[_0x52352a(0x152)]({'code':_0x52352a(0x136),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':['from']}));});export const ArrayMatchingSchema=z['union']([z[a152_0x17a52c(0x171)](a152_0x17a52c(0x145)),z[a152_0x17a52c(0x171)](a152_0x17a52c(0x13e)),z[a152_0x17a52c(0x140)]({'atLeast':z[a152_0x17a52c(0x12b)]()}),z[a152_0x17a52c(0x140)]({'atMost':z[a152_0x17a52c(0x12b)]()}),z[a152_0x17a52c(0x140)]({'exactly':z[a152_0x17a52c(0x12b)]()})]);function a152_0x2872(_0x3b83c4,_0x4b8cc3){_0x3b83c4=_0x3b83c4-0x127;const _0x4de32d=a152_0x4de3();let _0x2872f0=_0x4de32d[_0x3b83c4];return _0x2872f0;}export const AggregationDefSchema=z[a152_0x17a52c(0x153)](a152_0x17a52c(0x155),[z['object']({'type':z['enum']([a152_0x17a52c(0x144),a152_0x17a52c(0x12f),'Max',a152_0x17a52c(0x151)]),'column':z[a152_0x17a52c(0x159)](),'groupingColumns':z[a152_0x17a52c(0x16c)](z[a152_0x17a52c(0x159)]())[a152_0x17a52c(0x137)]()}),z['object']({'type':z[a152_0x17a52c(0x171)](a152_0x17a52c(0x138)),'groupingColumns':z['array'](z[a152_0x17a52c(0x159)]())[a152_0x17a52c(0x137)]()}),z[a152_0x17a52c(0x140)]({'type':z['literal']('CountDistinct'),'columns':z[a152_0x17a52c(0x16c)](z[a152_0x17a52c(0x159)]())}),z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x14e),a152_0x17a52c(0x16f)]),'column':z[a152_0x17a52c(0x159)](),'orderColumn':z['string'](),'groupingColumns':z[a152_0x17a52c(0x16c)](z[a152_0x17a52c(0x159)]())[a152_0x17a52c(0x137)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a152_0x17a52c(0x12b)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x17a52c(0x15e),'TimeWithinNext',a152_0x17a52c(0x12c)]);export const FilterColumnConditionDefSchema=z[a152_0x17a52c(0x140)]({'type':z['literal'](a152_0x17a52c(0x16e)),'column':z[a152_0x17a52c(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x168f95,_0x449740)=>{const _0x3dd619=a152_0x17a52c,_0x81b018=_0x168f95[_0x3dd619(0x16a)][_0x3dd619(0x155)];_0x168f95[_0x3dd619(0x15f)]===_0x3dd619(0x143)?!TIMESTAMP_OPERATORS[_0x3dd619(0x166)](_0x81b018)&&_0x449740[_0x3dd619(0x152)]({'code':'custom','message':_0x3dd619(0x16d)+_0x81b018+'\x27)','path':[_0x3dd619(0x16a),_0x3dd619(0x155)]}):TIMESTAMP_OPERATORS[_0x3dd619(0x166)](_0x81b018)&&_0x449740['addIssue']({'code':'custom','message':_0x3dd619(0x14d)+_0x81b018+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x3dd619(0x16a),'type']});});export const FilterRuleDefSchema=z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x171)](a152_0x17a52c(0x160)),'conditions':z[a152_0x17a52c(0x16c)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x17a52c(0x154)](()=>z[a152_0x17a52c(0x140)]({'type':z['literal'](a152_0x17a52c(0x146)),'attribute':z[a152_0x17a52c(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x17a52c(0x137)](),'exclude':z['boolean']()[a152_0x17a52c(0x137)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()[a152_0x17a52c(0x137)](),'filter':FilterRuleDefSchema[a152_0x17a52c(0x137)](),'limit':z[a152_0x17a52c(0x12b)]()[a152_0x17a52c(0x137)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a152_0x17a52c(0x147)),'attribute':z[a152_0x17a52c(0x159)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a152_0x17a52c(0x14c)]()['optional'](),'aggregation':AggregationDefSchema[a152_0x17a52c(0x137)](),'source':z[a152_0x17a52c(0x159)]()[a152_0x17a52c(0x137)](),'filter':FilterRuleDefSchema[a152_0x17a52c(0x137)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a152_0x17a52c(0x12b)]()['optional']()}));export const ColumnConditionDefSchema=z['object']({'type':z[a152_0x17a52c(0x171)]('Column'),'column':z[a152_0x17a52c(0x159)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x160),'Or']),'conditions':z[a152_0x17a52c(0x16c)](ConditionDefSchema),'description':z['string']()[a152_0x17a52c(0x137)]()}));function a152_0x4de3(){const _0x537f69=['column','And','Greater','Segment\x20reference\x20must\x20not\x20be\x20empty','realtime','1020063zRKXTs','65812pMsUgA','has','include','TimeWithinNext','Segment\x20name\x20is\x20required','operator','Less','array','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Column','Last','IsNull','literal','MISSING_TIME_UNIT','4002ErQsgs','56Fqohnc','month','Regexp','minute','number','TimeRange','StartWith','union','Min','superRefine','unit','\x27\x20requires\x20a\x20time\x20unit','Contain','13376170yajvGb','segment','custom','optional','Count','Equal','batch','funnel_stage','duration','TimeRange\x20operator\x20requires\x20\x27duration\x27','all','min','object','66pSjiOF','141zjQANg','timestamp','Sum','any','Value','Behavior','LessEqual','565496CkdrwN','Max','max','boolean','Operator\x20\x27','First','value','9217971xPKowo','Average','addIssue','discriminatedUnion','lazy','type','year','76aFuhRg','55190plxynK','string','second','132JPemNB','enum','exclude','TimeWithinPast'];a152_0x4de3=function(){return _0x537f69;};return a152_0x4de3();}export const SegmentRefConditionDefSchema=z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x167),a152_0x17a52c(0x15d)]),'segment':z[a152_0x17a52c(0x159)]()['min'](0x1,a152_0x17a52c(0x162))});export const ConditionDefSchema=z['lazy'](()=>z[a152_0x17a52c(0x12e)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x17a52c(0x154)](()=>z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x160),'Or']),'conditions':z[a152_0x17a52c(0x16c)](ConditionDefSchema),'description':z['string']()[a152_0x17a52c(0x137)]()}));export const SegmentDefSchema=z[a152_0x17a52c(0x140)]({'type':z[a152_0x17a52c(0x171)](a152_0x17a52c(0x135))[a152_0x17a52c(0x137)](),'name':z[a152_0x17a52c(0x159)]()[a152_0x17a52c(0x13f)](0x1,a152_0x17a52c(0x169)),'description':z[a152_0x17a52c(0x159)]()['optional'](),'folder':z['string']()[a152_0x17a52c(0x137)](),'rule':RuleDefSchema['optional'](),'kind':z[a152_0x17a52c(0x15c)]([a152_0x17a52c(0x13a),a152_0x17a52c(0x163),a152_0x17a52c(0x13b)])[a152_0x17a52c(0x137)](),'visible':z['boolean']()[a152_0x17a52c(0x137)](),'activations':z[a152_0x17a52c(0x16c)](z[a152_0x17a52c(0x145)]())[a152_0x17a52c(0x137)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a152_0x35f9d1=a152_0x57f7;(function(_0x3a1fc2,_0x2d83d3){const _0x1f023d=a152_0x57f7,_0x58873e=_0x3a1fc2();while(!![]){try{const _0x386fc5=-parseInt(_0x1f023d(0x1f8))/0x1*(parseInt(_0x1f023d(0x22c))/0x2)+parseInt(_0x1f023d(0x227))/0x3+parseInt(_0x1f023d(0x22a))/0x4+parseInt(_0x1f023d(0x210))/0x5+parseInt(_0x1f023d(0x1f7))/0x6+parseInt(_0x1f023d(0x234))/0x7+parseInt(_0x1f023d(0x22f))/0x8*(-parseInt(_0x1f023d(0x20e))/0x9);if(_0x386fc5===_0x2d83d3)break;else _0x58873e['push'](_0x58873e['shift']());}catch(_0x4f65c7){_0x58873e['push'](_0x58873e['shift']());}}}(a152_0x253d,0xd6605));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x35f9d1(0x1f6)]([a152_0x35f9d1(0x22e),'Greater',a152_0x35f9d1(0x222),a152_0x35f9d1(0x205),'LessEqual','In',a152_0x35f9d1(0x211),a152_0x35f9d1(0x219),a152_0x35f9d1(0x21d),a152_0x35f9d1(0x1e6),a152_0x35f9d1(0x22d),'Contain',a152_0x35f9d1(0x20d),a152_0x35f9d1(0x1f2),a152_0x35f9d1(0x22b)]);export const TimeUnitSchema=z[a152_0x35f9d1(0x1f6)]([a152_0x35f9d1(0x1fe),a152_0x35f9d1(0x1fa),'hour',a152_0x35f9d1(0x202),a152_0x35f9d1(0x1ef),'month',a152_0x35f9d1(0x1e9)]);function a152_0x57f7(_0x5971a9,_0x364057){_0x5971a9=_0x5971a9-0x1e4;const _0x253d72=a152_0x253d();let _0x57f763=_0x253d72[_0x5971a9];return _0x57f763;}export const AggregationTypeSchema=z[a152_0x35f9d1(0x1f6)](['Count','Sum','Average',a152_0x35f9d1(0x224),a152_0x35f9d1(0x204),a152_0x35f9d1(0x208),'First','Last']);const TemporalValueSchema=z[a152_0x35f9d1(0x1f0)]([z[a152_0x35f9d1(0x20b)]({'timestamp':z[a152_0x35f9d1(0x20f)]()}),z['object']({'last':z[a152_0x35f9d1(0x1f0)]([z[a152_0x35f9d1(0x232)](),z[a152_0x35f9d1(0x213)](z[a152_0x35f9d1(0x20f)](),z[a152_0x35f9d1(0x232)]())]),'unit':z[a152_0x35f9d1(0x20f)]()})]),OperatorValueSchema=z['union']([z[a152_0x35f9d1(0x20f)](),z[a152_0x35f9d1(0x232)](),z['boolean'](),TemporalValueSchema,z['array'](z[a152_0x35f9d1(0x1f0)]([z[a152_0x35f9d1(0x20f)](),z[a152_0x35f9d1(0x232)](),z[a152_0x35f9d1(0x228)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x35f9d1(0x22e),'Greater','GreaterEqual',a152_0x35f9d1(0x222),a152_0x35f9d1(0x1e7),'In','Contain','StartWith',a152_0x35f9d1(0x1f2),a152_0x35f9d1(0x219),'TimeWithinPast','TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a152_0x35f9d1(0x1e6),a152_0x35f9d1(0x22d)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a152_0x35f9d1(0x228)]()['optional'](),'value':OperatorValueSchema[a152_0x35f9d1(0x223)](),'min':z[a152_0x35f9d1(0x1f0)]([z['number'](),z[a152_0x35f9d1(0x20f)](),TemporalValueSchema])[a152_0x35f9d1(0x223)](),'max':z[a152_0x35f9d1(0x1f0)]([z[a152_0x35f9d1(0x232)](),z[a152_0x35f9d1(0x20f)](),TemporalValueSchema])[a152_0x35f9d1(0x223)](),'unit':TimeUnitSchema[a152_0x35f9d1(0x223)](),'duration':z[a152_0x35f9d1(0x20b)]({'day':z['number']()[a152_0x35f9d1(0x223)](),'week':z[a152_0x35f9d1(0x232)]()[a152_0x35f9d1(0x223)](),'month':z[a152_0x35f9d1(0x232)]()['optional'](),'year':z['number']()[a152_0x35f9d1(0x223)](),'hour':z[a152_0x35f9d1(0x232)]()['optional'](),'minute':z[a152_0x35f9d1(0x232)]()[a152_0x35f9d1(0x223)](),'second':z[a152_0x35f9d1(0x232)]()[a152_0x35f9d1(0x223)]()})[a152_0x35f9d1(0x223)](),'from':z[a152_0x35f9d1(0x20b)]({'last':z[a152_0x35f9d1(0x1f0)]([z['number'](),z[a152_0x35f9d1(0x20f)]()]),'unit':TimeUnitSchema})[a152_0x35f9d1(0x223)](),'reverse':z['boolean']()['optional']()})[a152_0x35f9d1(0x1ec)]((_0x29164f,_0x1ab26e)=>{const _0x56aaee=a152_0x35f9d1;OPERATORS_REQUIRING_VALUE[_0x56aaee(0x20a)](_0x29164f[_0x56aaee(0x206)])&&(_0x29164f[_0x56aaee(0x203)]===undefined||_0x29164f[_0x56aaee(0x203)]===null)&&_0x1ab26e[_0x56aaee(0x1e4)]({'code':_0x56aaee(0x21b),'message':'Operator\x20\x27'+_0x29164f[_0x56aaee(0x206)]+_0x56aaee(0x231),'path':[_0x56aaee(0x203)]}),_0x29164f[_0x56aaee(0x206)]===_0x56aaee(0x211)&&_0x29164f[_0x56aaee(0x207)]===undefined&&_0x29164f[_0x56aaee(0x214)]===undefined&&_0x1ab26e[_0x56aaee(0x1e4)]({'code':'custom','message':_0x56aaee(0x21e),'params':{'validationCode':_0x56aaee(0x217)}}),OPERATORS_REQUIRING_UNIT[_0x56aaee(0x20a)](_0x29164f['type'])&&_0x29164f[_0x56aaee(0x203)]!==undefined&&!_0x29164f[_0x56aaee(0x226)]&&_0x1ab26e[_0x56aaee(0x1e4)]({'code':_0x56aaee(0x21b),'message':'Operator\x20\x27'+_0x29164f[_0x56aaee(0x206)]+_0x56aaee(0x220),'path':[_0x56aaee(0x226)],'params':{'validationCode':_0x56aaee(0x1f9)}}),_0x29164f[_0x56aaee(0x206)]==='TimeRange'&&(!_0x29164f[_0x56aaee(0x233)]&&_0x1ab26e[_0x56aaee(0x1e4)]({'code':'custom','message':_0x56aaee(0x229),'path':['duration']}),!_0x29164f[_0x56aaee(0x1f4)]&&_0x1ab26e[_0x56aaee(0x1e4)]({'code':_0x56aaee(0x21b),'message':_0x56aaee(0x216),'path':[_0x56aaee(0x1f4)]}));});export const ArrayMatchingSchema=z[a152_0x35f9d1(0x1f0)]([z['literal'](a152_0x35f9d1(0x218)),z[a152_0x35f9d1(0x1e8)]('all'),z[a152_0x35f9d1(0x20b)]({'atLeast':z[a152_0x35f9d1(0x232)]()}),z['object']({'atMost':z[a152_0x35f9d1(0x232)]()}),z[a152_0x35f9d1(0x20b)]({'exactly':z[a152_0x35f9d1(0x232)]()})]);export const AggregationDefSchema=z[a152_0x35f9d1(0x1ff)](a152_0x35f9d1(0x206),[z['object']({'type':z[a152_0x35f9d1(0x1f6)]([a152_0x35f9d1(0x1ee),a152_0x35f9d1(0x224),a152_0x35f9d1(0x204),a152_0x35f9d1(0x209)]),'column':z[a152_0x35f9d1(0x20f)](),'groupingColumns':z[a152_0x35f9d1(0x1fd)](z['string']())[a152_0x35f9d1(0x223)]()}),z[a152_0x35f9d1(0x20b)]({'type':z['literal'](a152_0x35f9d1(0x1e5)),'groupingColumns':z[a152_0x35f9d1(0x1fd)](z[a152_0x35f9d1(0x20f)]())[a152_0x35f9d1(0x223)]()}),z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1e8)]('CountDistinct'),'columns':z[a152_0x35f9d1(0x1fd)](z[a152_0x35f9d1(0x20f)]())}),z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1f6)]([a152_0x35f9d1(0x1eb),a152_0x35f9d1(0x212)]),'column':z[a152_0x35f9d1(0x20f)](),'orderColumn':z['string'](),'groupingColumns':z[a152_0x35f9d1(0x1fd)](z['string']())[a152_0x35f9d1(0x223)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast','TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a152_0x35f9d1(0x1e8)](a152_0x35f9d1(0x1f5)),'column':z[a152_0x35f9d1(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x35f9d1(0x223)]()})[a152_0x35f9d1(0x1ec)]((_0x5eb990,_0x2c2265)=>{const _0xdc6cea=a152_0x35f9d1,_0x2bedd3=_0x5eb990[_0xdc6cea(0x1f3)][_0xdc6cea(0x206)];_0x5eb990[_0xdc6cea(0x1fb)]===_0xdc6cea(0x21f)?!TIMESTAMP_OPERATORS[_0xdc6cea(0x20a)](_0x2bedd3)&&_0x2c2265[_0xdc6cea(0x1e4)]({'code':_0xdc6cea(0x21b),'message':_0xdc6cea(0x221)+_0x2bedd3+'\x27)','path':[_0xdc6cea(0x1f3),'type']}):TIMESTAMP_OPERATORS[_0xdc6cea(0x20a)](_0x2bedd3)&&_0x2c2265[_0xdc6cea(0x1e4)]({'code':_0xdc6cea(0x21b),'message':_0xdc6cea(0x201)+_0x2bedd3+_0xdc6cea(0x1ea),'path':[_0xdc6cea(0x1f3),_0xdc6cea(0x206)]});});export const FilterRuleDefSchema=z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1e8)](a152_0x35f9d1(0x215)),'conditions':z[a152_0x35f9d1(0x1fd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x35f9d1(0x230)](()=>z[a152_0x35f9d1(0x20b)]({'type':z['literal'](a152_0x35f9d1(0x1ed)),'attribute':z[a152_0x35f9d1(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a152_0x35f9d1(0x228)]()[a152_0x35f9d1(0x223)](),'aggregation':AggregationDefSchema[a152_0x35f9d1(0x223)](),'source':z['string']()[a152_0x35f9d1(0x223)](),'filter':FilterRuleDefSchema[a152_0x35f9d1(0x223)](),'limit':z['number']()[a152_0x35f9d1(0x223)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1e8)](a152_0x35f9d1(0x1f1)),'attribute':z[a152_0x35f9d1(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x35f9d1(0x223)](),'exclude':z[a152_0x35f9d1(0x228)]()[a152_0x35f9d1(0x223)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0x35f9d1(0x20f)]()[a152_0x35f9d1(0x223)](),'filter':FilterRuleDefSchema[a152_0x35f9d1(0x223)](),'timeWindow':TimeWindowDefSchema[a152_0x35f9d1(0x223)](),'limit':z[a152_0x35f9d1(0x232)]()[a152_0x35f9d1(0x223)]()}));export const ColumnConditionDefSchema=z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1e8)](a152_0x35f9d1(0x1f5)),'column':z[a152_0x35f9d1(0x20f)](),'operator':OperatorDefSchema});function a152_0x253d(){const _0x20c990=['Between','Last','record','max','And','TimeRange\x20operator\x20requires\x20\x27from\x27','MISSING_BETWEEN_BOUNDS','any','Regexp','segment','custom','funnel_stage','IsNull','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','timestamp','\x27\x20requires\x20a\x20time\x20unit','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Less','optional','Min','realtime','unit','3994968BxSAIF','boolean','TimeRange\x20operator\x20requires\x20\x27duration\x27','4665372YOMpun','TimeRange','2cFHADZ','TimeWithinNext','Equal','7657640OuMGFI','lazy','\x27\x20requires\x20a\x20value','number','duration','11776541nwhHcB','addIssue','Count','TimeWithinPast','LessEqual','literal','year','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','First','superRefine','Value','Sum','week','union','Behavior','EndWith','operator','from','Column','enum','2162148muCUMa','283735RetqFa','MISSING_TIME_UNIT','minute','column','Segment\x20reference\x20must\x20not\x20be\x20empty','array','second','discriminatedUnion','exclude','Operator\x20\x27','day','value','Max','GreaterEqual','type','min','CountDistinct','Average','has','object','Segment\x20name\x20is\x20required','StartWith','36YVGocF','string','2249600JSgJNR'];a152_0x253d=function(){return _0x20c990;};return a152_0x253d();}export const CompositeConditionDefSchema=z[a152_0x35f9d1(0x230)](()=>z['object']({'type':z['enum']([a152_0x35f9d1(0x215),'Or']),'conditions':z[a152_0x35f9d1(0x1fd)](ConditionDefSchema),'description':z['string']()[a152_0x35f9d1(0x223)]()}));export const SegmentRefConditionDefSchema=z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1f6)](['include',a152_0x35f9d1(0x200)]),'segment':z['string']()['min'](0x1,a152_0x35f9d1(0x1fc))});export const ConditionDefSchema=z[a152_0x35f9d1(0x230)](()=>z[a152_0x35f9d1(0x1f0)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x35f9d1(0x230)](()=>z[a152_0x35f9d1(0x20b)]({'type':z[a152_0x35f9d1(0x1f6)]([a152_0x35f9d1(0x215),'Or']),'conditions':z[a152_0x35f9d1(0x1fd)](ConditionDefSchema),'description':z[a152_0x35f9d1(0x20f)]()[a152_0x35f9d1(0x223)]()}));export const SegmentDefSchema=z['object']({'type':z['literal'](a152_0x35f9d1(0x21a))[a152_0x35f9d1(0x223)](),'name':z['string']()[a152_0x35f9d1(0x207)](0x1,a152_0x35f9d1(0x20c)),'description':z[a152_0x35f9d1(0x20f)]()[a152_0x35f9d1(0x223)](),'folder':z[a152_0x35f9d1(0x20f)]()[a152_0x35f9d1(0x223)](),'rule':RuleDefSchema['optional'](),'kind':z[a152_0x35f9d1(0x1f6)](['batch',a152_0x35f9d1(0x225),a152_0x35f9d1(0x21c)])['optional'](),'visible':z[a152_0x35f9d1(0x228)]()[a152_0x35f9d1(0x223)](),'activations':z[a152_0x35f9d1(0x1fd)](z[a152_0x35f9d1(0x218)]())[a152_0x35f9d1(0x223)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x3d7d8e=a153_0x5df2;(function(_0x2a9541,_0x180ec4){const _0x2da376=a153_0x5df2,_0x2fa444=_0x2a9541();while(!![]){try{const _0x13ac0a=-parseInt(_0x2da376(0x9a))/0x1*(parseInt(_0x2da376(0x92))/0x2)+-parseInt(_0x2da376(0xa9))/0x3+-parseInt(_0x2da376(0x91))/0x4+parseInt(_0x2da376(0xa4))/0x5+-parseInt(_0x2da376(0x9c))/0x6*(parseInt(_0x2da376(0xad))/0x7)+parseInt(_0x2da376(0xa5))/0x8*(-parseInt(_0x2da376(0xa6))/0x9)+parseInt(_0x2da376(0x96))/0xa*(parseInt(_0x2da376(0x90))/0xb);if(_0x13ac0a===_0x180ec4)break;else _0x2fa444['push'](_0x2fa444['shift']());}catch(_0x3bacf4){_0x2fa444['push'](_0x2fa444['shift']());}}}(a153_0x52ff,0xb1fb4));import{readFileSync}from'fs';import*as a153_0x1c78f0 from'path';import*as a153_0xd0b883 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_0x3d7d8e(0x9f),a153_0x3d7d8e(0xa2)]);export function isJourneyDef(_0x21b2ed){const _0x2adfdc=a153_0x3d7d8e;return typeof _0x21b2ed==='object'&&_0x21b2ed!==null&&_0x2adfdc(0x93)in _0x21b2ed&&_0x21b2ed[_0x2adfdc(0x93)]===_0x2adfdc(0x9d);}export function isCampaignDef(_0x4825b9){const _0x499322=a153_0x3d7d8e;if(typeof _0x4825b9!==_0x499322(0xaa)||_0x4825b9===null)return![];const _0x33024a=_0x4825b9,_0x3c3a8d=VALID_CAMPAIGN_TYPES[_0x499322(0x99)](_0x33024a[_0x499322(0x9b)]);if(_0x33024a['type']===_0x499322(0x95)&&_0x3c3a8d)return!![];if(_0x3c3a8d&&!_0x33024a['type'])return!![];return![];}export function isTemplateDef(_0x40322f){const _0x4cbb34=a153_0x3d7d8e;return typeof _0x40322f==='object'&&_0x40322f!==null&&'type'in _0x40322f&&_0x40322f[_0x4cbb34(0x93)]==='template';}export function isValidationResult(_0x86ebdf){return!('skipped'in _0x86ebdf);}export function createParseErrorResult(_0x24f9a1,_0x229bbc,_0x4a52ef,_0x73b0ab,_0x5822c5=a153_0x3d7d8e(0xa1)){const _0x6c0061=a153_0x3d7d8e;return{'filePath':_0x24f9a1,'relativePath':_0x229bbc,'source':_0x4a52ef,'result':{'valid':![],'errors':[{'level':_0x6c0061(0xac),'path':'','code':_0x6c0061(0x98),'message':_0x73b0ab}],'warnings':[]},'fileType':_0x5822c5};}function a153_0x5df2(_0x9fba75,_0x21e6ac){_0x9fba75=_0x9fba75-0x8f;const _0x52ff68=a153_0x52ff();let _0x5df26a=_0x52ff68[_0x9fba75];return _0x5df26a;}export function validateYamlFile(_0xf3a5ea,_0x14ba93,_0x39e4b6={}){const _0x1bf073=a153_0x3d7d8e,_0x17b7fc=a153_0x1c78f0['relative'](_0x14ba93,_0xf3a5ea)||a153_0x1c78f0['basename'](_0xf3a5ea);try{const _0x2dcffc=readFileSync(_0xf3a5ea,_0x1bf073(0x8f)),_0x5a8fbe=a153_0xd0b883[_0x1bf073(0xa0)](_0x2dcffc),_0x4d6b9d=_0x5a8fbe[_0x1bf073(0x9e)]();if(!_0x4d6b9d)return createParseErrorResult(_0xf3a5ea,_0x17b7fc,_0x2dcffc,_0x1bf073(0xa7));let _0x2b2808;if(isJourneyDef(_0x4d6b9d))_0x2b2808=_0x1bf073(0x9d);else{if(isCampaignDef(_0x4d6b9d))_0x2b2808='campaign';else isTemplateDef(_0x4d6b9d)?_0x2b2808='template':_0x2b2808='segment';}if(_0x39e4b6[_0x1bf073(0x97)]&&_0x2b2808!==_0x39e4b6[_0x1bf073(0x97)])return{'filePath':_0xf3a5ea,'relativePath':_0x17b7fc,'skipped':!![],'reason':'not\x20a\x20'+_0x39e4b6[_0x1bf073(0x97)]};const _0x43a598={'source':_0x2dcffc,'document':_0x5a8fbe};let _0x25c980;if(_0x2b2808===_0x1bf073(0x9d))_0x25c980=validateJourneyDef(_0x4d6b9d,_0x43a598);else{if(_0x2b2808===_0x1bf073(0x95))_0x25c980=validateCampaignDef(_0x4d6b9d,_0x43a598);else _0x2b2808==='template'?_0x25c980=validateTemplateDef(_0x4d6b9d,_0x43a598):_0x25c980=validateSegmentDef(_0x4d6b9d,_0x43a598);}return{'filePath':_0xf3a5ea,'relativePath':_0x17b7fc,'source':_0x2dcffc,'result':_0x25c980,'fileType':_0x2b2808};}catch(_0x15ca42){const _0x158ca4=_0x15ca42 instanceof Error?_0x15ca42[_0x1bf073(0xab)]:String(_0x15ca42);return createParseErrorResult(_0xf3a5ea,_0x17b7fc,'','YAML\x20parse\x20error:\x20'+_0x158ca4);}}export function validateYamlFiles(_0x4ddee6,_0xa751b7,_0x2273c4={}){const _0xc07bc0=a153_0x3d7d8e;return _0x4ddee6[_0xc07bc0(0xa8)](_0x45d8b2=>validateYamlFile(_0x45d8b2,_0xa751b7,_0x2273c4));}export function calculateSummary(_0x1d8fbf){const _0x1bb7f9=a153_0x3d7d8e;let _0x3a007a=0x0,_0x228792=0x0,_0x23999f=0x0,_0x58c41b=0x0;for(const _0x1ebaaf of _0x1d8fbf){if(!isValidationResult(_0x1ebaaf)){_0x58c41b++;continue;}_0x1ebaaf[_0x1bb7f9(0xa3)]['valid']?_0x3a007a++:_0x228792++,_0x23999f+=_0x1ebaaf[_0x1bb7f9(0xa3)][_0x1bb7f9(0x94)]['length'];}return{'validCount':_0x3a007a,'invalidCount':_0x228792,'warningCount':_0x23999f,'skippedCount':_0x58c41b,'hasErrors':_0x228792>0x0};}function a153_0x52ff(){const _0x5c1e27=['500914vyCrVx','type','warnings','campaign','90Cxzziy','filterType','YAML_PARSE_ERROR','has','5SqfAJT','campaign_type','46602ttgzMz','journey','toJSON','email','parseDocument','segment','push','result','4682295lTfVIG','37816jNTMPi','639nSRpen','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','map','1629483etVUpq','object','message','error','1043rUNTff','utf-8','5058779pEWPqG','4232408MCnhSz'];a153_0x52ff=function(){return _0x5c1e27;};return a153_0x52ff();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10ca0c,_0x2a3921){const _0x503c21=a154_0xb821,_0x173994=_0x10ca0c();while(!![]){try{const _0x5714fd=parseInt(_0x503c21(0xe0))/0x1*(-parseInt(_0x503c21(0xdb))/0x2)+parseInt(_0x503c21(0xcf))/0x3*(-parseInt(_0x503c21(0xea))/0x4)+parseInt(_0x503c21(0xdf))/0x5+-parseInt(_0x503c21(0xd8))/0x6+parseInt(_0x503c21(0xd1))/0x7*(parseInt(_0x503c21(0xee))/0x8)+parseInt(_0x503c21(0xf3))/0x9+-parseInt(_0x503c21(0xda))/0xa;if(_0x5714fd===_0x2a3921)break;else _0x173994['push'](_0x173994['shift']());}catch(_0x430f5f){_0x173994['push'](_0x173994['shift']());}}}(a154_0x5e78,0xdf588));import*as a154_0x304c28 from'yaml';import a154_0x425541 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3f9463,_0x187719,_0x24b933){const _0x13f959=a154_0xb821;if(!_0x3f9463||!_0x187719)return undefined;try{let _0x5e3dbc=_0x3f9463[_0x13f959(0xcc)](_0x24b933,!![]),_0x28b40d=[..._0x24b933];while((!_0x5e3dbc||typeof _0x5e3dbc!=='object'||!(_0x13f959(0xf1)in _0x5e3dbc)||!_0x5e3dbc[_0x13f959(0xf1)])&&_0x28b40d['length']>0x0){_0x28b40d[_0x13f959(0xde)](),_0x5e3dbc=_0x28b40d[_0x13f959(0xdd)]>0x0?_0x3f9463[_0x13f959(0xcc)](_0x28b40d,!![]):_0x3f9463['contents'];}if(!_0x5e3dbc||typeof _0x5e3dbc!==_0x13f959(0xed)||!('range'in _0x5e3dbc)||!_0x5e3dbc[_0x13f959(0xf1)])return undefined;const [_0x43dce6]=_0x5e3dbc[_0x13f959(0xf1)];return offsetToLocation(_0x187719,_0x43dce6);}catch{return undefined;}}export function offsetToLocation(_0x52471b,_0x1f0d2f){const _0x513a69=a154_0xb821;let _0x484cce=0x1,_0x18a6be=0x1;for(let _0x222e0d=0x0;_0x222e0d<_0x1f0d2f&&_0x222e0d<_0x52471b[_0x513a69(0xdd)];_0x222e0d++){_0x52471b[_0x222e0d]==='\x0a'?(_0x484cce++,_0x18a6be=0x1):_0x18a6be++;}return{'line':_0x484cce,'column':_0x18a6be,'offset':_0x1f0d2f};}export function pathToArray(_0x2a7283){if(!_0x2a7283)return[];return _0x2a7283['split']('.')['flatMap'](_0x578f69=>{const _0x443015=_0x578f69['match'](/^(\w+)\[(\d+)\]$/);if(_0x443015)return[_0x443015[0x1],parseInt(_0x443015[0x2],0xa)];return[_0x578f69];});}export function formatZodPath(_0x4a86ce){let _0x346e83='';for(const _0x4f1a43 of _0x4a86ce){if(typeof _0x4f1a43==='number')_0x346e83+='['+_0x4f1a43+']';else{const _0x3dd70d=String(_0x4f1a43);_0x346e83+=_0x346e83?'.'+_0x3dd70d:_0x3dd70d;}}return _0x346e83;}function a154_0x5e78(){const _0x587451=['yellow','path','291292KTlalW','YAML\x20validation\x20error:\x20','red','object','5998736OJLqPx','padStart','issues','range','cyan','12803076diFTqt','parse','error','\x27:\x20','location','push','getIn','line','invalid_union','15RMmUve','max','7CycumO','repeat','toString','code','Invalid\x20YAML:\x20expected\x20an\x20object','data','min','670512aCfjjl','success','23762730QsgWnu','10IXDpVo','map','length','pop','8233065ObhLUp','10411RAZNFS','\x20|\x20','safeParse','message','join','dim','errors','level'];a154_0x5e78=function(){return _0x587451;};return a154_0x5e78();}export function flattenZodIssues(_0x4ee40d){const _0x5706f6=a154_0xb821,_0x321a32=[];for(const _0x2d4964 of _0x4ee40d){if(_0x2d4964[_0x5706f6(0xd4)]===_0x5706f6(0xce)&&_0x5706f6(0xe6)in _0x2d4964){const _0x5f4498=_0x2d4964[_0x5706f6(0xe6)];let _0x43a6b2=_0x5f4498[0x0]||[];for(const _0x5a10bf of _0x5f4498){_0x5a10bf[_0x5706f6(0xdd)]<_0x43a6b2['length']&&(_0x43a6b2=_0x5a10bf);}const _0x2ee036=_0x43a6b2[_0x5706f6(0xdc)](_0x1c5f6f=>({..._0x1c5f6f,'path':[..._0x2d4964['path'],..._0x1c5f6f[_0x5706f6(0xe9)]]}));_0x321a32[_0x5706f6(0xcb)](...flattenZodIssues(_0x2ee036));}else _0x321a32[_0x5706f6(0xcb)](_0x2d4964);}return _0x321a32;}export function safeParseYaml(_0x55166d,_0x2e3bee){const _0x50bf9c=a154_0xb821,_0x5abd2e=a154_0x304c28[_0x50bf9c(0xf4)](_0x55166d);if(!_0x5abd2e||typeof _0x5abd2e!==_0x50bf9c(0xed))throw new Error(_0x50bf9c(0xd5));const _0x2050ce=_0x2e3bee[_0x50bf9c(0xe2)](_0x5abd2e);if(!_0x2050ce[_0x50bf9c(0xd9)]){const _0x3bf74b=_0x2050ce[_0x50bf9c(0xf5)][_0x50bf9c(0xf0)][0x0],_0x364138=formatZodPath(_0x3bf74b['path']);throw new Error(_0x364138?'YAML\x20validation\x20error\x20at\x20\x27'+_0x364138+_0x50bf9c(0xf6)+_0x3bf74b[_0x50bf9c(0xe3)]:_0x50bf9c(0xeb)+_0x3bf74b[_0x50bf9c(0xe3)]);}return _0x2050ce[_0x50bf9c(0xd6)];}function a154_0xb821(_0x42bab9,_0x2129c9){_0x42bab9=_0x42bab9-0xcb;const _0x5e785c=a154_0x5e78();let _0xb82109=_0x5e785c[_0x42bab9];return _0xb82109;}export function formatIssueWithContext(_0x22046a,_0x517ddd,_0x1a74ae){const _0x5d41be=a154_0xb821,_0x24ffe2=[],_0x2c06bc=_0x22046a['level']===_0x5d41be(0xf5),_0x2a44c6=_0x2c06bc?a154_0x425541[_0x5d41be(0xec)]:a154_0x425541[_0x5d41be(0xe8)],_0x4094f1=_0x2c06bc?a154_0x425541[_0x5d41be(0xec)]:a154_0x425541[_0x5d41be(0xe8)],_0x4582fb=_0x1a74ae?a154_0x425541[_0x5d41be(0xf2)](_0x1a74ae+':'):'';if(_0x22046a['location']){const _0x492e12=a154_0x425541[_0x5d41be(0xf2)](_0x22046a[_0x5d41be(0xf7)][_0x5d41be(0xcd)]+':'+_0x22046a[_0x5d41be(0xf7)]['column']);_0x24ffe2['push'](''+_0x4582fb+_0x492e12+':\x20'+_0x2a44c6(_0x22046a[_0x5d41be(0xe7)])+'\x20'+_0x4094f1('['+_0x22046a[_0x5d41be(0xd4)]+']'));}else _0x24ffe2[_0x5d41be(0xcb)](''+_0x4582fb+a154_0x425541['dim'](_0x22046a[_0x5d41be(0xe9)])+':\x20'+_0x2a44c6(_0x22046a[_0x5d41be(0xe7)])+'\x20'+_0x4094f1('['+_0x22046a[_0x5d41be(0xd4)]+']'));_0x24ffe2['push'](_0x22046a[_0x5d41be(0xe3)]);if(_0x22046a[_0x5d41be(0xf7)]&&_0x517ddd){const _0x277700=_0x517ddd['split']('\x0a'),{line:_0x4b5f2f,column:_0x3f77e3}=_0x22046a[_0x5d41be(0xf7)],_0x347887=Math[_0x5d41be(0xd0)](0x1,_0x4b5f2f-0x1),_0x17cca5=Math[_0x5d41be(0xd7)](_0x277700['length'],_0x4b5f2f+0x1);_0x24ffe2[_0x5d41be(0xcb)]('');for(let _0x37a143=_0x347887;_0x37a143<=_0x17cca5;_0x37a143++){const _0x1c6adc=_0x277700[_0x37a143-0x1]||'',_0x456c85=a154_0x425541[_0x5d41be(0xe5)](_0x37a143[_0x5d41be(0xd3)]()[_0x5d41be(0xef)](0x4)),_0x2be418=a154_0x425541[_0x5d41be(0xe5)](_0x5d41be(0xe1));if(_0x37a143===_0x4b5f2f){_0x24ffe2[_0x5d41be(0xcb)]('\x20\x20'+_0x456c85+_0x2be418+_0x2a44c6(_0x1c6adc));const _0x424236='\x20'[_0x5d41be(0xd2)](0x4+0x3+_0x3f77e3-0x1);_0x24ffe2[_0x5d41be(0xcb)]('\x20\x20'+_0x424236+_0x2a44c6('^'));}else _0x24ffe2[_0x5d41be(0xcb)]('\x20\x20'+_0x456c85+_0x2be418+a154_0x425541[_0x5d41be(0xe5)](_0x1c6adc));}}return _0x24ffe2['join']('\x0a');}export function formatValidationResult(_0x470dc0,_0x4fc52f,_0x41e0f2){const _0x478517=a154_0xb821,_0x45edbc=[];for(const _0x14ecf9 of _0x470dc0[_0x478517(0xe6)]){_0x45edbc['push'](formatIssueWithContext(_0x14ecf9,_0x4fc52f,_0x41e0f2)),_0x45edbc['push']('');}for(const _0x425966 of _0x470dc0['warnings']){_0x45edbc[_0x478517(0xcb)](formatIssueWithContext(_0x425966,_0x4fc52f,_0x41e0f2)),_0x45edbc['push']('');}return _0x45edbc[_0x478517(0xe4)]('\x0a');}
|