@treasuredata/tdx 2026.3.24 → 2026.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16f154,_0x223101){const _0x4f1e1f=a146_0x3dd0,_0x43ac20=_0x16f154();while(!![]){try{const _0x2ea84c=parseInt(_0x4f1e1f(0x1ee))/0x1*(-parseInt(_0x4f1e1f(0x1ef))/0x2)+-parseInt(_0x4f1e1f(0x1fa))/0x3*(-parseInt(_0x4f1e1f(0x1e8))/0x4)+parseInt(_0x4f1e1f(0x1f0))/0x5*(-parseInt(_0x4f1e1f(0x1f3))/0x6)+parseInt(_0x4f1e1f(0x1e3))/0x7+parseInt(_0x4f1e1f(0x1d5))/0x8*(-parseInt(_0x4f1e1f(0x20b))/0x9)+-parseInt(_0x4f1e1f(0x1dc))/0xa+parseInt(_0x4f1e1f(0x1d1))/0xb;if(_0x2ea84c===_0x223101)break;else _0x43ac20['push'](_0x43ac20['shift']());}catch(_0x431949){_0x43ac20['push'](_0x43ac20['shift']());}}}(a146_0x3d08,0x627ca));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x17cbfb,_0x38001f={},_0x424b41={}){const _0x3c1714=a146_0x3dd0;if(_0x424b41[_0x3c1714(0x1fb)])return runSemanticChecks(_0x17cbfb,_0x38001f);const _0x5ea178=SegmentDefSchema[_0x3c1714(0x205)](_0x17cbfb);if(_0x5ea178[_0x3c1714(0x1e6)])return runSemanticChecks(_0x5ea178['data'],_0x38001f);return zodErrorsToValidationResult(_0x5ea178[_0x3c1714(0x1fd)],_0x38001f);}export function validateRuleDef(_0xd88ac5,_0x1eed96,_0x2a841d){const _0x2f1bcd=a146_0x3dd0;if(!_0xd88ac5)return[];const _0x501d94=RuleDefSchema[_0x2f1bcd(0x205)](_0xd88ac5);if(_0x501d94[_0x2f1bcd(0x1e6)])return checkRule(_0x501d94['data'],_0x1eed96,_0x2a841d);const _0x42a461=flattenZodIssues(_0x501d94['error'][_0x2f1bcd(0x1d2)]);return _0x42a461[_0x2f1bcd(0x1f2)](_0x581cbc=>{const _0x38fe7d=_0x2f1bcd,_0x5b2af6=formatZodPath(_0x581cbc[_0x38fe7d(0x1d7)]),_0x4ce9a1=_0x5b2af6?_0x1eed96+'.'+_0x5b2af6:_0x1eed96,_0x3742cd=mapZodIssueToCode(_0x581cbc,_0x5b2af6),_0x5e98f6=getLocationFromPath(_0x2a841d[_0x38fe7d(0x1ea)],_0x2a841d[_0x38fe7d(0x1f9)],pathToArray(_0x4ce9a1));return{'level':'error','path':_0x4ce9a1,'code':_0x3742cd,'message':_0x581cbc[_0x38fe7d(0x1ce)],..._0x5e98f6&&{'location':_0x5e98f6}};});}function zodErrorsToValidationResult(_0x3782a3,_0x16080b){const _0x2a67f8=a146_0x3dd0,_0x34d2b8=flattenZodIssues(_0x3782a3[_0x2a67f8(0x1d2)]),_0x5ca90c=_0x34d2b8[_0x2a67f8(0x1f2)](_0x43c2e9=>{const _0x35de1d=_0x2a67f8,_0x4400b5=formatZodPath(_0x43c2e9[_0x35de1d(0x1d7)]),_0x41a12e=mapZodIssueToCode(_0x43c2e9,_0x4400b5),_0x6ade7d=getLocationFromPath(_0x16080b[_0x35de1d(0x1ea)],_0x16080b['source'],_0x43c2e9[_0x35de1d(0x1d7)]['map'](_0x1f3582=>typeof _0x1f3582==='symbol'?String(_0x1f3582):_0x1f3582));return{'level':_0x35de1d(0x1fd),'path':_0x4400b5,'code':_0x41a12e,'message':_0x43c2e9[_0x35de1d(0x1ce)],..._0x6ade7d&&{'location':_0x6ade7d}};});return{'valid':![],'errors':_0x5ca90c,'warnings':[]};}function a146_0x3dd0(_0x5b7702,_0x1fd7c5){_0x5b7702=_0x5b7702-0x1ce;const _0x3d0869=a146_0x3d08();let _0x3dd06d=_0x3d0869[_0x5b7702];return _0x3dd06d;}function mapZodIssueToCode(_0x1e136d,_0x16e189){const _0xc5f1db=a146_0x3dd0,_0x54ca0e=_0x1e136d['code']==='custom'?_0x1e136d['params']:undefined;if(_0x16e189==='name')return _0xc5f1db(0x1d8);if(_0x16e189===_0xc5f1db(0x204)||_0x16e189[_0xc5f1db(0x1e9)]('.type')){if(_0x1e136d[_0xc5f1db(0x20e)]===_0xc5f1db(0x207)){if(_0x16e189===_0xc5f1db(0x204)||_0x16e189['match'](/\.conditions\[\d+\]\.type$/))return _0xc5f1db(0x1d4);}}if(_0x16e189['endsWith']('.operator.type'))return'INVALID_OPERATOR_TYPE';if(_0x16e189['endsWith']('.operator.value'))return _0xc5f1db(0x1ed);if(_0x54ca0e?.['validationCode']===_0xc5f1db(0x1df))return'MISSING_BETWEEN_BOUNDS';if(_0x54ca0e?.[_0xc5f1db(0x1f6)]===_0xc5f1db(0x1fc))return _0xc5f1db(0x1fc);if(_0x16e189['endsWith'](_0xc5f1db(0x1de))||_0x16e189==='conditions')return'MISSING_CONDITIONS';if(_0x16e189[_0xc5f1db(0x203)](_0xc5f1db(0x1e1)))return'INVALID_ARRAY_MATCHING';if(_0x16e189[_0xc5f1db(0x1e9)]('.segment'))return'MISSING_SEGMENT_REFERENCE';return _0xc5f1db(0x1eb);}function a146_0x3d08(){const _0x380714=['message','warning','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','1311035PpAoQI','issues','type','INVALID_RULE_TYPE','96dnFfWX','Attribute\x20name\x20cannot\x20be\x20empty','path','MISSING_NAME','BEHAVIOR_SOURCE_MISSING_FILTER','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','652890zoiisS','Behavior\x20source\x20\x27','.conditions','MISSING_BETWEEN_BOUNDS','rule','arrayMatching','And','3803576YFofFo','filter','Behavior','success','conditions','20ZVsVYj','endsWith','document','SEGMENT_SCHEMA_ERROR','NESTED_CONDITION_GROUP','MISSING_OPERATOR_VALUE','3319zDJMgy','24ggAUBq','5ZRHrxQ','.source','map','3240702SxELVR','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','\x27\x20with\x20attribute\x20\x27','validationCode','attribute','length','source','439161OqUjbU','skipSchema','MISSING_TIME_UNIT','error','push','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Attribute\x20\x27','includes','rule.type','safeParse','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','invalid_value','aggregation','EMPTY_CONDITIONS','Value','259389lylrTu','.attribute','.filter','code'];a146_0x3d08=function(){return _0x380714;};return a146_0x3d08();}function runSemanticChecks(_0x59abc3,_0xb21177){const _0x8bd096=a146_0x3dd0,_0x58d414=[];_0x59abc3['rule']&&_0x58d414[_0x8bd096(0x1fe)](...checkRule(_0x59abc3[_0x8bd096(0x1e0)],'rule',_0xb21177));const _0x36b9d0=_0x58d414[_0x8bd096(0x1e4)](_0x595eda=>_0x595eda['level']===_0x8bd096(0x1fd)),_0x12a523=_0x58d414[_0x8bd096(0x1e4)](_0x5ccf0a=>_0x5ccf0a['level']===_0x8bd096(0x1cf));return{'valid':_0x36b9d0[_0x8bd096(0x1f8)]===0x0,'errors':_0x36b9d0,'warnings':_0x12a523};}function checkRule(_0x2bf8d7,_0x395001,_0x4c8f36){const _0x242cbd=a146_0x3dd0,_0xecde31=[];if(_0x2bf8d7[_0x242cbd(0x1e7)][_0x242cbd(0x1f8)]===0x0)return _0xecde31[_0x242cbd(0x1fe)]({'level':_0x242cbd(0x1fd),'path':_0x395001+_0x242cbd(0x1de),'code':_0x242cbd(0x209),'message':_0x242cbd(0x1f4),'location':getLocationFromPath(_0x4c8f36[_0x242cbd(0x1ea)],_0x4c8f36[_0x242cbd(0x1f9)],pathToArray(_0x395001+_0x242cbd(0x1de)))}),_0xecde31;return _0xecde31['push'](...checkConditions(_0x2bf8d7[_0x242cbd(0x1e7)],_0x395001,_0x4c8f36)),_0xecde31;}function checkConditions(_0x2b44a1,_0x25ae4f,_0x2b26f3){const _0x479263=a146_0x3dd0,_0xf0b23f=[];for(let _0x44c235=0x0;_0x44c235<_0x2b44a1[_0x479263(0x1f8)];_0x44c235++){const _0x5cb910=_0x2b44a1[_0x44c235],_0x348b21=_0x25ae4f+'.conditions['+_0x44c235+']';_0xf0b23f[_0x479263(0x1fe)](...checkCondition(_0x5cb910,_0x348b21,_0x2b26f3));}return _0xf0b23f;}function checkCondition(_0x408839,_0x41afc1,_0x59522e){const _0x4ad70b=a146_0x3dd0,_0x8bfc79=[];if(_0x408839[_0x4ad70b(0x1d3)]===_0x4ad70b(0x1e2)||_0x408839[_0x4ad70b(0x1d3)]==='Or')return _0x408839[_0x4ad70b(0x1e7)]['length']===0x0?_0x8bfc79['push']({'level':_0x4ad70b(0x1fd),'path':_0x41afc1+_0x4ad70b(0x1de),'code':_0x4ad70b(0x209),'message':_0x408839[_0x4ad70b(0x1d3)]+_0x4ad70b(0x1ff),'location':getLocationFromPath(_0x59522e[_0x4ad70b(0x1ea)],_0x59522e[_0x4ad70b(0x1f9)],pathToArray(_0x41afc1+'.conditions'))}):(_0x8bfc79[_0x4ad70b(0x1fe)]({'level':_0x4ad70b(0x1cf),'path':_0x41afc1,'code':_0x4ad70b(0x1ec),'message':_0x408839['type']+_0x4ad70b(0x1da)+_0x4ad70b(0x201)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x59522e['document'],_0x59522e[_0x4ad70b(0x1f9)],pathToArray(_0x41afc1))}),_0x8bfc79['push'](...checkConditions(_0x408839[_0x4ad70b(0x1e7)],_0x41afc1,_0x59522e))),_0x8bfc79;if(_0x408839['type']===_0x4ad70b(0x20a)||_0x408839[_0x4ad70b(0x1d3)]===_0x4ad70b(0x1e5)){const _0x4dd515=_0x408839,_0xcb2083=_0x4dd515[_0x4ad70b(0x1f9)],_0x4cc125=_0x4dd515[_0x4ad70b(0x208)],_0x5b76c9=_0xcb2083||_0x4cc125;(!_0x4dd515['attribute']||_0x4dd515[_0x4ad70b(0x1f7)]==='')&&(!_0x5b76c9&&_0x8bfc79[_0x4ad70b(0x1fe)]({'level':_0x4ad70b(0x1fd),'path':_0x41afc1+_0x4ad70b(0x20c),'code':'EMPTY_ATTRIBUTE','message':_0x4ad70b(0x1d6),'location':getLocationFromPath(_0x59522e['document'],_0x59522e['source'],pathToArray(_0x41afc1+_0x4ad70b(0x20c)))}));_0x4dd515[_0x4ad70b(0x1e4)]&&_0x8bfc79[_0x4ad70b(0x1fe)](...checkRule(_0x4dd515[_0x4ad70b(0x1e4)],_0x41afc1+_0x4ad70b(0x20d),_0x59522e));if(_0x4dd515['source']){const _0x4e5748=_0x4dd515[_0x4ad70b(0x1f7)]&&_0x4dd515[_0x4ad70b(0x1f7)]!=='';_0x4e5748&&!_0x4dd515['filter']&&_0x8bfc79[_0x4ad70b(0x1fe)]({'level':_0x4ad70b(0x1fd),'path':_0x41afc1+_0x4ad70b(0x1f1),'code':_0x4ad70b(0x1d9),'message':_0x4ad70b(0x1dd)+_0x4dd515[_0x4ad70b(0x1f9)]+_0x4ad70b(0x1f5)+_0x4dd515[_0x4ad70b(0x1f7)]+'\x27\x20'+_0x4ad70b(0x1db)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x4ad70b(0x1d0),'location':getLocationFromPath(_0x59522e[_0x4ad70b(0x1ea)],_0x59522e[_0x4ad70b(0x1f9)],pathToArray(_0x41afc1+_0x4ad70b(0x1f1)))}),_0x4e5748&&_0x4dd515[_0x4ad70b(0x1e4)]&&_0x8bfc79[_0x4ad70b(0x1fe)]({'level':_0x4ad70b(0x1cf),'path':_0x41afc1+_0x4ad70b(0x20c),'code':_0x4ad70b(0x206),'message':_0x4ad70b(0x202)+_0x4dd515[_0x4ad70b(0x1f7)]+_0x4ad70b(0x200)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x59522e[_0x4ad70b(0x1ea)],_0x59522e['source'],pathToArray(_0x41afc1+'.attribute'))});}}return _0x8bfc79;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5169f0,_0x43cb4e){const _0x1ee530=a147_0x59f3,_0x340c5e=_0x5169f0();while(!![]){try{const _0xc0f3ad=-parseInt(_0x1ee530(0x1e0))/0x1+-parseInt(_0x1ee530(0x1e6))/0x2*(parseInt(_0x1ee530(0x1ed))/0x3)+-parseInt(_0x1ee530(0x201))/0x4+-parseInt(_0x1ee530(0x206))/0x5*(parseInt(_0x1ee530(0x1f7))/0x6)+parseInt(_0x1ee530(0x1f1))/0x7*(-parseInt(_0x1ee530(0x1db))/0x8)+parseInt(_0x1ee530(0x1ea))/0x9+parseInt(_0x1ee530(0x1ff))/0xa;if(_0xc0f3ad===_0x43cb4e)break;else _0x340c5e['push'](_0x340c5e['shift']());}catch(_0x481036){_0x340c5e['push'](_0x340c5e['shift']());}}}(a147_0x5a97,0x3572b));import a147_0x1522a8 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(_0xd40825){const _0x222b29=a147_0x59f3;return _0xd40825[_0x222b29(0x1fb)]!=='error';}export function isScopedResolution(_0x87fd0f){const _0x5ef5bf=a147_0x59f3;return _0x87fd0f[_0x5ef5bf(0x1fb)]===_0x5ef5bf(0x1d5)||_0x87fd0f[_0x5ef5bf(0x1fb)]===_0x5ef5bf(0x209)||_0x87fd0f['type']===_0x5ef5bf(0x200);}function a147_0x5a97(){const _0x2ac822=['resourceType','no_parent','configDir','error','directory','No\x20tdx.json\x20found','isScoped','startsWith','join','journey','168znqxxm','message','match','parent_segment','isFile','393145LHtCNu','scopedFolderPath','isDirectory','string','cwd','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','2cdwksO','basename','tdx.json','extname','3603996HrsUku','segmentName','Not\x20a\x20YAML\x20file:\x20','305178QpfmxQ','resolve','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','file_not_found','3031rWiokA','parentSegment','no_config','No\x20tdx.json\x20found\x20for\x20file:\x20','parse','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','132LjbyYb','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','Parent\x20segment\x20not\x20specified','parent_name','type','includes','readFile','File\x20not\x20found','9280040TnRPsL','context','1092036jrOHKq','stat','trim','segment','dirname','75580xmarbZ','exists','root','file','folderPath','invalid_yaml'];a147_0x5a97=function(){return _0x2ac822;};return a147_0x5a97();}function a147_0x59f3(_0x447ee9,_0x5577d7){_0x447ee9=_0x447ee9-0x1d2;const _0x5a9738=a147_0x5a97();let _0x59f386=_0x5a9738[_0x447ee9];return _0x59f386;}export function getScopedDetails(_0x4abb19){const _0x5a60ce=a147_0x59f3;if(isScopedResolution(_0x4abb19))return{'isScoped':_0x4abb19[_0x5a60ce(0x1d7)],'scopedFolderPath':_0x4abb19['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x4dd9b2,_0x5e3dff){const _0x48b814=a147_0x59f3;let _0x5cafe4=a147_0x1522a8[_0x48b814(0x1ee)](_0x4dd9b2);const _0x5b3769=a147_0x1522a8['parse'](_0x5cafe4)[_0x48b814(0x208)];while(_0x5cafe4!==_0x5b3769){const _0x99f718=a147_0x1522a8[_0x48b814(0x1d9)](_0x5cafe4,_0x48b814(0x1e8));if(await _0x5e3dff['exists'](_0x99f718))try{const _0x3eff19=await _0x5e3dff[_0x48b814(0x1fd)](_0x99f718),_0x40ab6b=JSON[_0x48b814(0x1f5)](_0x3eff19);if(_0x40ab6b[_0x48b814(0x1de)]&&typeof _0x40ab6b['parent_segment']===_0x48b814(0x1e3))return{'configPath':_0x99f718,'configDir':_0x5cafe4,'parentSegment':_0x40ab6b['parent_segment']};}catch{}_0x5cafe4=a147_0x1522a8[_0x48b814(0x205)](_0x5cafe4);}return null;}function calculateScopedPath(_0xc03e98,_0x4ae058){const _0x246e15=a147_0x59f3,_0x1cddd3=a147_0x1522a8['relative'](_0x4ae058,_0xc03e98),_0x38543b=_0x1cddd3!==''&&_0x1cddd3!=='.'&&!_0x1cddd3[_0x246e15(0x1d8)]('..');return{'isScoped':_0x38543b,'scopedFolderPath':_0x38543b?_0x1cddd3['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x1f4950){const _0x554362=a147_0x59f3,{arg:_0x5b5676,contextParent:_0x427503,cwd:cwd=process[_0x554362(0x1e4)](),fs:fs=nodeFileSystem}=_0x1f4950;if(_0x5b5676&&isYamlFilePath(_0x5b5676))try{const _0x2db77c=await resolveYamlFilePath(_0x5b5676,fs),_0x5c62fb=a147_0x1522a8[_0x554362(0x1ee)](_0x5b5676),_0x1d65f9=a147_0x1522a8[_0x554362(0x205)](_0x5c62fb),_0x233c53=await findTdxConfigAsync(_0x1d65f9,fs);if(!_0x233c53){if(_0x427503){const _0x16cff8=a147_0x1522a8[_0x554362(0x205)](_0x5c62fb);return{'type':_0x554362(0x209),'parentName':_0x427503,'targetDir':_0x16cff8,'configRoot':_0x16cff8,'filePath':_0x5c62fb,'resourceName':_0x2db77c[_0x554362(0x1eb)],'folderPath':_0x2db77c[_0x554362(0x20a)],'resourceType':_0x2db77c[_0x554362(0x20c)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x554362(0x1f3),'message':_0x554362(0x1f4)+_0x5b5676,'arg':_0x5b5676,'helpText':_0x554362(0x1f8)};}const _0x45a2d1=calculateScopedPath(_0x1d65f9,_0x233c53['configDir']);return{'type':_0x554362(0x209),'parentName':_0x233c53[_0x554362(0x1f2)],'targetDir':_0x233c53['configDir'],'configRoot':_0x233c53[_0x554362(0x1d3)],'filePath':_0x5c62fb,'resourceName':_0x2db77c[_0x554362(0x1eb)],'folderPath':_0x2db77c[_0x554362(0x20a)],'resourceType':_0x2db77c[_0x554362(0x20c)],'isScoped':_0x45a2d1[_0x554362(0x1d7)],'scopedFolderPath':_0x45a2d1[_0x554362(0x1e1)]};}catch(_0x42cf6b){const _0x1fae15=_0x42cf6b instanceof Error?_0x42cf6b[_0x554362(0x1dc)]:String(_0x42cf6b);if(_0x1fae15[_0x554362(0x1fc)](_0x554362(0x1fe)))return{'type':_0x554362(0x1d4),'errorCode':_0x554362(0x1f0),'message':'File\x20not\x20found:\x20'+_0x5b5676,'arg':_0x5b5676};if(_0x1fae15['includes'](_0x554362(0x1d6))){if(_0x427503){const _0x47a236=a147_0x1522a8[_0x554362(0x1ee)](_0x5b5676);if(await fs[_0x554362(0x207)](_0x47a236)){const _0x5e859f=a147_0x1522a8[_0x554362(0x205)](_0x47a236),_0x29fa72=await fs[_0x554362(0x1fd)](_0x47a236),_0x14a10c=_0x29fa72[_0x554362(0x1dd)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5ce689=_0x29fa72[_0x554362(0x1dd)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x26d806=_0x14a10c?_0x14a10c[0x1][_0x554362(0x203)]():a147_0x1522a8[_0x554362(0x1e7)](_0x5b5676,a147_0x1522a8[_0x554362(0x1e9)](_0x5b5676)),_0x430c1c=_0x5ce689&&_0x5ce689[0x1][_0x554362(0x203)]()===_0x554362(0x1da)?_0x554362(0x1da):_0x554362(0x204);return{'type':_0x554362(0x209),'parentName':_0x427503,'targetDir':_0x5e859f,'configRoot':_0x5e859f,'filePath':_0x47a236,'resourceName':_0x26d806,'folderPath':'','resourceType':_0x430c1c,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x554362(0x1d4),'errorCode':'no_config','message':_0x554362(0x1f4)+_0x5b5676,'arg':_0x5b5676,'helpText':_0x554362(0x1f8)};}return{'type':_0x554362(0x1d4),'errorCode':_0x554362(0x20b),'message':_0x1fae15,'arg':_0x5b5676};}if(_0x5b5676){const _0x27c74f=a147_0x1522a8[_0x554362(0x1ee)](cwd,_0x5b5676);let _0xebad06=null;try{_0xebad06=await fs[_0x554362(0x202)](_0x27c74f);}catch{}if(_0xebad06?.[_0x554362(0x1e2)]()){const _0x218a53=await findTdxConfigAsync(_0x27c74f,fs);if(_0x218a53){const _0x30b791=calculateScopedPath(_0x27c74f,_0x218a53[_0x554362(0x1d3)]);return{'type':'directory','parentName':_0x218a53[_0x554362(0x1f2)],'targetDir':_0x27c74f,'configRoot':_0x218a53['configDir'],'isScoped':_0x30b791['isScoped'],'scopedFolderPath':_0x30b791[_0x554362(0x1e1)]};}if(_0x427503)return{'type':'directory','parentName':_0x427503,'targetDir':_0x27c74f,'configRoot':_0x27c74f,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x554362(0x1f3),'message':_0x554362(0x1f6)+_0x5b5676,'arg':_0x5b5676,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0xebad06?.[_0x554362(0x1df)]())return{'type':'error','errorCode':_0x554362(0x20b),'message':_0x554362(0x1ec)+_0x5b5676,'arg':_0x5b5676,'helpText':_0x554362(0x1e5)};const _0x292bb5=sanitizeFileName(_0x5b5676),_0x492992=getSegmentRootDir(_0x292bb5,cwd);return{'type':_0x554362(0x1fa),'parentName':_0x5b5676,'targetDir':_0x492992,'configRoot':_0x492992};}const _0x2521cb=await findTdxConfigAsync(cwd,fs);if(_0x2521cb){const _0x271474=calculateScopedPath(cwd,_0x2521cb['configDir']);return{'type':_0x554362(0x200),'parentName':_0x2521cb['parentSegment'],'targetDir':cwd,'configRoot':_0x2521cb[_0x554362(0x1d3)],'isScoped':_0x271474['isScoped'],'scopedFolderPath':_0x271474[_0x554362(0x1e1)]};}if(_0x427503){const _0x2a4135=sanitizeFileName(_0x427503),_0xb59301=getSegmentRootDir(_0x2a4135,cwd);return{'type':_0x554362(0x200),'parentName':_0x427503,'targetDir':_0xb59301,'configRoot':_0xb59301,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x554362(0x1d4),'errorCode':_0x554362(0x1d2),'message':_0x554362(0x1f9),'helpText':_0x554362(0x1ef)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x2972(_0x43108a,_0x8a92d8){_0x43108a=_0x43108a-0x1ca;const _0x1e2bf7=a148_0x1e2b();let _0x297293=_0x1e2bf7[_0x43108a];return _0x297293;}const a148_0x1fc512=a148_0x2972;(function(_0x1d2668,_0x2ae1bf){const _0x29ab2b=a148_0x2972,_0x47d1bc=_0x1d2668();while(!![]){try{const _0x234c23=-parseInt(_0x29ab2b(0x1df))/0x1+-parseInt(_0x29ab2b(0x1e0))/0x2*(parseInt(_0x29ab2b(0x1e5))/0x3)+parseInt(_0x29ab2b(0x1d7))/0x4*(parseInt(_0x29ab2b(0x1e2))/0x5)+-parseInt(_0x29ab2b(0x1cf))/0x6+parseInt(_0x29ab2b(0x1d3))/0x7*(parseInt(_0x29ab2b(0x1e7))/0x8)+-parseInt(_0x29ab2b(0x1ca))/0x9*(parseInt(_0x29ab2b(0x1da))/0xa)+-parseInt(_0x29ab2b(0x1e3))/0xb*(-parseInt(_0x29ab2b(0x1dc))/0xc);if(_0x234c23===_0x2ae1bf)break;else _0x47d1bc['push'](_0x47d1bc['shift']());}catch(_0x18fcc0){_0x47d1bc['push'](_0x47d1bc['shift']());}}}(a148_0x1e2b,0xe14a1));import{existsSync,readFileSync}from'fs';import a148_0x4d26cf from'path';const TDX_CONFIG_FILE=a148_0x1fc512(0x1de),SEGMENTS_DIR=a148_0x1fc512(0x1e4);export function findTdxConfigPath(_0x112e1e=process[a148_0x1fc512(0x1d1)]()){const _0x1011f1=a148_0x1fc512;let _0x6fd909=a148_0x4d26cf[_0x1011f1(0x1cd)](_0x112e1e);const _0x166011=a148_0x4d26cf[_0x1011f1(0x1d9)](_0x6fd909)[_0x1011f1(0x1cc)];while(_0x6fd909!==_0x166011){const _0x332942=a148_0x4d26cf['join'](_0x6fd909,TDX_CONFIG_FILE);if(existsSync(_0x332942))return _0x332942;_0x6fd909=a148_0x4d26cf[_0x1011f1(0x1d0)](_0x6fd909);}return null;}export function loadTdxConfig(_0x3a04b5){const _0x485025=a148_0x1fc512,_0x217a71=readFileSync(_0x3a04b5,'utf-8');let _0x2cd4f0;try{_0x2cd4f0=JSON[_0x485025(0x1d9)](_0x217a71);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x3a04b5);}if(!_0x2cd4f0||typeof _0x2cd4f0!==_0x485025(0x1e1))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x3b37d7=_0x2cd4f0,_0x1d1d13=_0x3b37d7['parent_segment']&&typeof _0x3b37d7[_0x485025(0x1ce)]===_0x485025(0x1d8),_0xac01ad=_0x3b37d7[_0x485025(0x1e6)]&&typeof _0x3b37d7[_0x485025(0x1e6)]===_0x485025(0x1d8);if(!_0x1d1d13&&!_0xac01ad)throw new Error(_0x485025(0x1d6));const _0x294a15={};return _0x1d1d13&&(_0x294a15['parent_segment']=_0x3b37d7['parent_segment']),_0xac01ad&&(_0x294a15[_0x485025(0x1e6)]=_0x3b37d7[_0x485025(0x1e6)]),_0x294a15;}export function findTdxConfig(_0x4e245e=process[a148_0x1fc512(0x1d1)]()){const _0x37ee69=a148_0x1fc512,_0x355918=findTdxConfigPath(_0x4e245e);if(!_0x355918)throw new Error(_0x37ee69(0x1d2));const _0x16d45d=loadTdxConfig(_0x355918),_0x3a95e8=a148_0x4d26cf[_0x37ee69(0x1d0)](_0x355918);return{'config':_0x16d45d,'configPath':_0x355918,'configDir':_0x3a95e8};}export function tryFindTdxConfig(_0x278f8c){try{return findTdxConfig(_0x278f8c);}catch{return null;}}export function getSegmentRootDir(_0x3a553b,_0x215462=process[a148_0x1fc512(0x1d1)]()){const _0x5c6b2b=a148_0x1fc512;return a148_0x4d26cf[_0x5c6b2b(0x1cb)](_0x215462,SEGMENTS_DIR,_0x3a553b);}function a148_0x1e2b(){const _0xba6ef6=['5iWobFd','16337849DglVeL','segments','4908vNqFfM','engage_workspace','72BslkTG','819KwiAQQ','join','root','resolve','parent_segment','7160736VyIMjZ','dirname','cwd','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','628397QlMfCp','stringify','replace','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','6039532xSaXNL','string','parse','14030ahfrwf','startsWith','12ZWZlRq','relative','tdx.json','271635GqQqOW','1574xVvQTj','object'];a148_0x1e2b=function(){return _0xba6ef6;};return a148_0x1e2b();}export function getTdxConfigPath(_0x4e872b,_0x431e72=process[a148_0x1fc512(0x1d1)]()){return a148_0x4d26cf['join'](getSegmentRootDir(_0x4e872b,_0x431e72),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3563a4,_0x747ac0){const _0x11ac70=a148_0x1fc512,_0x4dc2b7=a148_0x4d26cf['resolve'](_0x3563a4),_0x32895d=a148_0x4d26cf[_0x11ac70(0x1dd)](_0x747ac0,_0x4dc2b7);if(_0x32895d[_0x11ac70(0x1db)]('..'))return'';return _0x32895d;}export function localPathToTdFolderPath(_0x5e0e6d){const _0x3506a8=a148_0x1fc512,_0x3393a1=a148_0x4d26cf[_0x3506a8(0x1d0)](_0x5e0e6d);if(_0x3393a1==='.'||_0x3393a1==='')return'';return _0x3393a1[_0x3506a8(0x1d5)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0xddb6f7,_0x30a141){if(!_0xddb6f7)return _0x30a141;return a148_0x4d26cf['join'](_0x30a141,_0xddb6f7);}export function createTdxConfigContent(_0x531739){const _0x5e703f=a148_0x1fc512,_0xcfc20d={'parent_segment':_0x531739};return JSON[_0x5e703f(0x1d4)](_0xcfc20d,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x5049c1){const _0x33a65f=a148_0x1fc512,_0x2fb0ac={'engage_workspace':_0x5049c1};return JSON[_0x33a65f(0x1d4)](_0x2fb0ac,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x1bbc83=a149_0x2ade;function a149_0x4f46(){const _0x1a8e04=['hourly','Connection\x20name\x20is\x20required','boolean','Last','once','hour','nullable','46348BvDPRc','onFailure','291pLxoZp','7213500NdTJuj','onSuccess','weekly','cols','7DSTWPF','optional','min','enum','array','monthly','month','masked','8701263OybRhx','none','record','string','193uPvXam','194414TtUqyK','unknown','Activation\x20name\x20is\x20required','day','minutes_interval','1810cXubRp','week','object','8216264RIMDJj','number','clear','6274zGJpmh','4499538fleXvV'];a149_0x4f46=function(){return _0x1a8e04;};return a149_0x4f46();}(function(_0x268888,_0x1bb838){const _0x3b1637=a149_0x2ade,_0x4aa9af=_0x268888();while(!![]){try{const _0x281daa=parseInt(_0x3b1637(0x1a2))/0x1*(parseInt(_0x3b1637(0x186))/0x2)+-parseInt(_0x3b1637(0x191))/0x3*(-parseInt(_0x3b1637(0x18f))/0x4)+parseInt(_0x3b1637(0x192))/0x5+parseInt(_0x3b1637(0x187))/0x6*(parseInt(_0x3b1637(0x196))/0x7)+parseInt(_0x3b1637(0x183))/0x8+-parseInt(_0x3b1637(0x19e))/0x9+-parseInt(_0x3b1637(0x180))/0xa*(parseInt(_0x3b1637(0x1a3))/0xb);if(_0x281daa===_0x1bb838)break;else _0x4aa9af['push'](_0x4aa9af['shift']());}catch(_0x5988a8){_0x4aa9af['push'](_0x4aa9af['shift']());}}}(a149_0x4f46,0xbf383));import{z}from'zod';export const ScheduleTypeSchema=z[a149_0x1bbc83(0x199)]([a149_0x1bbc83(0x19f),a149_0x1bbc83(0x188),'daily',a149_0x1bbc83(0x194),a149_0x1bbc83(0x19b),'cron',a149_0x1bbc83(0x17f)]);export const RepeatUnitSchema=z[a149_0x1bbc83(0x199)](['minute',a149_0x1bbc83(0x18d),a149_0x1bbc83(0x17e),a149_0x1bbc83(0x181),a149_0x1bbc83(0x19c),a149_0x1bbc83(0x18c),a149_0x1bbc83(0x19f)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a149_0x1bbc83(0x197)](),'repeat_unit':RepeatUnitSchema[a149_0x1bbc83(0x197)](),'repeat_frequency':z['number']()[a149_0x1bbc83(0x197)](),'repeat_sub_frequency':z[a149_0x1bbc83(0x19a)](z[a149_0x1bbc83(0x184)]())[a149_0x1bbc83(0x197)](),'start_at':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x18e)]()['optional'](),'end_on':z[a149_0x1bbc83(0x1a1)]()['nullable']()[a149_0x1bbc83(0x197)](),'timezone':z['string']()[a149_0x1bbc83(0x197)]()});export const NotificationDefSchema=z[a149_0x1bbc83(0x182)]({'notify_on':z[a149_0x1bbc83(0x19a)](z[a149_0x1bbc83(0x199)]([a149_0x1bbc83(0x193),a149_0x1bbc83(0x190)]))[a149_0x1bbc83(0x197)](),'email_recipients':z[a149_0x1bbc83(0x19a)](z[a149_0x1bbc83(0x1a1)]())[a149_0x1bbc83(0x197)]()});export const ActivationColumnDefSchema=z['union']([z[a149_0x1bbc83(0x1a1)](),z[a149_0x1bbc83(0x182)]({'name':z[a149_0x1bbc83(0x1a1)](),'type':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x197)](),'visibility':z[a149_0x1bbc83(0x199)]([a149_0x1bbc83(0x185),'masked'])['optional']()})]);function a149_0x2ade(_0x6b4e21,_0x2bde09){_0x6b4e21=_0x6b4e21-0x17c;const _0x4f46f8=a149_0x4f46();let _0x2adeeb=_0x4f46f8[_0x6b4e21];return _0x2adeeb;}export const ActivationBehaviorDefSchema=z['object']({'columns':z[a149_0x1bbc83(0x19a)](z['object']({'name':z[a149_0x1bbc83(0x1a1)](),'type':z['string']()[a149_0x1bbc83(0x197)](),'visibility':z['enum']([a149_0x1bbc83(0x185),a149_0x1bbc83(0x19d)])[a149_0x1bbc83(0x197)]()}))[a149_0x1bbc83(0x197)](),'behavior_table':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x197)](),'join_row':z[a149_0x1bbc83(0x184)]()['nullable']()[a149_0x1bbc83(0x197)](),'join_strategy':z[a149_0x1bbc83(0x199)](['All','First',a149_0x1bbc83(0x18b),'Top-N'])[a149_0x1bbc83(0x197)](),'formatting':z[a149_0x1bbc83(0x199)](['rows',a149_0x1bbc83(0x195)])[a149_0x1bbc83(0x197)](),'order_by':z['array'](z['object']({'key':z[a149_0x1bbc83(0x1a1)](),'order':z[a149_0x1bbc83(0x199)](['asc','desc'])}))[a149_0x1bbc83(0x197)]()});export const ActivationDefSchema=z[a149_0x1bbc83(0x182)]({'name':z[a149_0x1bbc83(0x1a1)]()['min'](0x1,a149_0x1bbc83(0x17d)),'description':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x197)](),'connection':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x198)](0x1,a149_0x1bbc83(0x189)),'all_columns':z[a149_0x1bbc83(0x18a)]()[a149_0x1bbc83(0x197)](),'columns':z['array'](ActivationColumnDefSchema)[a149_0x1bbc83(0x197)](),'schedule':ScheduleDefSchema[a149_0x1bbc83(0x197)](),'notification':NotificationDefSchema[a149_0x1bbc83(0x197)](),'connector_config':z[a149_0x1bbc83(0x1a0)](z['string'](),z[a149_0x1bbc83(0x17c)]())[a149_0x1bbc83(0x197)](),'activation_template_id':z[a149_0x1bbc83(0x1a1)]()[a149_0x1bbc83(0x18e)]()[a149_0x1bbc83(0x197)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a149_0x1bbc83(0x18a)]()[a149_0x1bbc83(0x197)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x1580(_0x342c3d,_0x497992){_0x342c3d=_0x342c3d-0xa6;var _0x285fcb=a150_0x285f();var _0x158063=_0x285fcb[_0x342c3d];return _0x158063;}(function(_0x20ca7a,_0x56717f){var _0xd212d8=a150_0x1580,_0x30b1a8=_0x20ca7a();while(!![]){try{var _0x27f529=-parseInt(_0xd212d8(0xb0))/0x1*(-parseInt(_0xd212d8(0xab))/0x2)+-parseInt(_0xd212d8(0xa9))/0x3*(parseInt(_0xd212d8(0xa7))/0x4)+-parseInt(_0xd212d8(0xac))/0x5*(-parseInt(_0xd212d8(0xaf))/0x6)+parseInt(_0xd212d8(0xa6))/0x7*(parseInt(_0xd212d8(0xae))/0x8)+parseInt(_0xd212d8(0xad))/0x9+-parseInt(_0xd212d8(0xb1))/0xa*(parseInt(_0xd212d8(0xaa))/0xb)+parseInt(_0xd212d8(0xa8))/0xc*(-parseInt(_0xd212d8(0xb2))/0xd);if(_0x27f529===_0x56717f)break;else _0x30b1a8['push'](_0x30b1a8['shift']());}catch(_0x4caed4){_0x30b1a8['push'](_0x30b1a8['shift']());}}}(a150_0x285f,0x7dfcd));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a150_0x285f(){var _0x43cd24=['8276373vOeNOV','16KhLHQY','4267680zHHXji','15698QiSDkO','13680KVauXD','390MSfTXo','2922157BbAfGn','648ZtqjpJ','280044LHOsRm','10479StDaUC','7139wQjDRv','26Sdzarh','5SlvOuk'];a150_0x285f=function(){return _0x43cd24;};return a150_0x285f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x131a94=a151_0x41ee;(function(_0x561bea,_0x1de489){const _0x45a793=a151_0x41ee,_0x5ea636=_0x561bea();while(!![]){try{const _0x13353f=parseInt(_0x45a793(0x198))/0x1+-parseInt(_0x45a793(0x19a))/0x2*(parseInt(_0x45a793(0x194))/0x3)+parseInt(_0x45a793(0x17f))/0x4*(parseInt(_0x45a793(0x19c))/0x5)+parseInt(_0x45a793(0x18d))/0x6*(-parseInt(_0x45a793(0x177))/0x7)+parseInt(_0x45a793(0x19d))/0x8*(-parseInt(_0x45a793(0x191))/0x9)+parseInt(_0x45a793(0x1a2))/0xa+parseInt(_0x45a793(0x18f))/0xb*(-parseInt(_0x45a793(0x197))/0xc);if(_0x13353f===_0x1de489)break;else _0x5ea636['push'](_0x5ea636['shift']());}catch(_0x3ab2de){_0x5ea636['push'](_0x5ea636['shift']());}}}(a151_0x1a98,0xa3371));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a151_0x131a94(0x17e)]([a151_0x131a94(0x188),a151_0x131a94(0x18c),a151_0x131a94(0x17b)]);export const ReentryModeTypeSchema=z[a151_0x131a94(0x17e)](['no_reentry',a151_0x131a94(0x1a4),a151_0x131a94(0x195)]);export const WaitUnitTypeSchema=z[a151_0x131a94(0x17e)]([a151_0x131a94(0x17d),a151_0x131a94(0x190)]);export const StepTypeValueSchema=z[a151_0x131a94(0x17e)]([a151_0x131a94(0x181),a151_0x131a94(0x18e),a151_0x131a94(0x178),a151_0x131a94(0x1a6),a151_0x131a94(0x189),a151_0x131a94(0x179),a151_0x131a94(0x19b)]);export const EmbeddedSegmentDefSchema=z[a151_0x131a94(0x1a5)]({'description':z['string']()[a151_0x131a94(0x192)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a151_0x131a94(0x1a5)]({'journey':z[a151_0x131a94(0x186)](),'stage':z['string'](),'bundle_id':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'segment':z[a151_0x131a94(0x186)](),'target':JumpTargetDefSchema[a151_0x131a94(0x192)]()});const WaitConditionTimeoutDefSchema=z[a151_0x131a94(0x1a5)]({'duration':z[a151_0x131a94(0x182)](),'unit':WaitUnitTypeSchema,'next':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)]()}),WaitConditionDefSchema=z['object']({'segment':z[a151_0x131a94(0x186)](),'next':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'timeout':WaitConditionTimeoutDefSchema[a151_0x131a94(0x192)]()}),WaitStepParamsDefSchema=z[a151_0x131a94(0x1a5)]({'duration':z[a151_0x131a94(0x182)]()['optional'](),'unit':WaitUnitTypeSchema[a151_0x131a94(0x192)](),'wait_until':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a151_0x131a94(0x18b)](z[a151_0x131a94(0x186)]())[a151_0x131a94(0x192)]()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()[a151_0x131a94(0x192)](),'next':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)]()},WaitStepDefSchema=z[a151_0x131a94(0x1a5)]({...StepBaseFields,'type':z['literal'](a151_0x131a94(0x181)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a151_0x131a94(0x1a5)]({'activation':z['string']()}),ActivationStepDefSchema=z[a151_0x131a94(0x1a5)]({...StepBaseFields,'type':z[a151_0x131a94(0x18a)](a151_0x131a94(0x18e)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a151_0x131a94(0x1a5)]({'name':z['string'](),'segment':z['string']()[a151_0x131a94(0x192)](),'segment_id':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'excluded':z['boolean']()[a151_0x131a94(0x192)](),'next':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)]()}),DecisionPointStepParamsDefSchema=z[a151_0x131a94(0x1a5)]({'branches':z[a151_0x131a94(0x18b)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a151_0x131a94(0x1a5)]({...StepBaseFields,'type':z[a151_0x131a94(0x18a)](a151_0x131a94(0x178)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'name':z[a151_0x131a94(0x186)](),'percentage':z[a151_0x131a94(0x182)](),'next':z['string']()['optional']()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a151_0x131a94(0x18b)](AbTestVariantDefSchema),'unique_id':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'customized_split':z['boolean']()[a151_0x131a94(0x192)]()}),AbTestStepDefSchema=z[a151_0x131a94(0x1a5)]({...StepBaseFields,'type':z['literal'](a151_0x131a94(0x1a6)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a151_0x131a94(0x18a)]('merge')}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a151_0x131a94(0x1a5)]({...StepBaseFields,'type':z[a151_0x131a94(0x18a)](a151_0x131a94(0x179)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a151_0x131a94(0x18a)](a151_0x131a94(0x19b))})['passthrough']();function a151_0x1a98(){const _0x265528=['8wZbXEf','journeys','wait','number','refine','filter','length','string','type','draft','merge','literal','array','simulation','60pdVzNG','activation','6250607IHMMou','week','693WiuOIL','optional','record','3147yzLckZ','reentry_always','Journey\x20name\x20is\x20required','24TsFkfY','481797XnrIRM','stages','740WfSqll','end','2586305veSNtV','9080DJWjnB','versions','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','journey','boolean','8167190yEKFcX','lazy','reentry_unless_goal_achieved','object','ab_test','36757CFSGqE','decision_point','jump','min','launched','isArray','day','enum'];a151_0x1a98=function(){return _0x265528;};return a151_0x1a98();}export const StepDefSchema=z['discriminatedUnion'](a151_0x131a94(0x187),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a151_0x131a94(0x186)](),'description':z[a151_0x131a94(0x186)]()['optional'](),'id':z[a151_0x131a94(0x186)]()['optional'](),'entry_criteria':CriteriaDefSchema[a151_0x131a94(0x192)](),'exit_criteria':z[a151_0x131a94(0x18b)](CriteriaDefSchema)[a151_0x131a94(0x192)](),'milestone':CriteriaDefSchema[a151_0x131a94(0x192)](),'root_step':z[a151_0x131a94(0x186)]()['optional'](),'steps':z[a151_0x131a94(0x18b)](StepDefSchema)[a151_0x131a94(0x192)]()});function a151_0x41ee(_0xaf9e39,_0x33a1bd){_0xaf9e39=_0xaf9e39-0x177;const _0x1a98a6=a151_0x1a98();let _0x41ee68=_0x1a98a6[_0xaf9e39];return _0x41ee68;}export const JourneyEntryDefSchema=z[a151_0x131a94(0x1a5)]({'name':z['string']()[a151_0x131a94(0x192)](),'version':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'state':JourneyStateTypeSchema[a151_0x131a94(0x192)](),'latest':z[a151_0x131a94(0x1a1)]()[a151_0x131a94(0x192)](),'stages':z[a151_0x131a94(0x18b)](StageDefSchema),'id':z['string']()[a151_0x131a94(0x192)](),'version_number':z['number']()['optional'](),'goal':CriteriaDefSchema[a151_0x131a94(0x192)](),'reentry':ReentryModeTypeSchema[a151_0x131a94(0x192)]()});export const JourneyDefSchema=z[a151_0x131a94(0x1a3)](()=>z[a151_0x131a94(0x1a5)]({'type':z[a151_0x131a94(0x18a)](a151_0x131a94(0x1a0)),'name':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x17a)](0x1,a151_0x131a94(0x196)),'description':z['string']()['optional'](),'bundle_id':z['string']()[a151_0x131a94(0x192)](),'bundle_name':z['string']()['optional'](),'folder_id':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a151_0x131a94(0x1a1)]()[a151_0x131a94(0x192)](),'goal':CriteriaDefSchema['optional'](),'id':z[a151_0x131a94(0x186)]()['optional'](),'version':z[a151_0x131a94(0x186)]()[a151_0x131a94(0x192)](),'version_number':z[a151_0x131a94(0x182)]()['optional'](),'stages':z[a151_0x131a94(0x18b)](StageDefSchema)[a151_0x131a94(0x192)](),'versions':z[a151_0x131a94(0x18b)](JourneyEntryDefSchema)['optional'](),'journeys':z[a151_0x131a94(0x18b)](JourneyEntryDefSchema)[a151_0x131a94(0x192)](),'segments':z[a151_0x131a94(0x193)](z['string'](),EmbeddedSegmentDefSchema)[a151_0x131a94(0x192)](),'activations':z[a151_0x131a94(0x193)](z[a151_0x131a94(0x186)](),ActivationDefSchema)[a151_0x131a94(0x192)]()})[a151_0x131a94(0x183)](_0x488015=>{const _0x15ea7b=a151_0x131a94,_0x3fd7dd=[_0x488015[_0x15ea7b(0x180)],_0x488015[_0x15ea7b(0x199)],_0x488015[_0x15ea7b(0x19e)]][_0x15ea7b(0x184)](_0x637e08=>Array[_0x15ea7b(0x17c)](_0x637e08)&&_0x637e08[_0x15ea7b(0x185)]>0x0)[_0x15ea7b(0x185)];return _0x3fd7dd===0x1;},{'message':a151_0x131a94(0x19f)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a153_0x49e2(){var _0x564549=['329640tzNeoG','101qwAaPG','12hwQHBc','4300DxpoCq','750300VWzrpx','28Yyliyt','755936qZzHtB','1272425szQAty','671IVhhiT','3291858fHvYZb','1234JFHiZZ','6zAvEbI'];a153_0x49e2=function(){return _0x564549;};return a153_0x49e2();}(function(_0x53df68,_0x280f3f){var _0x551da2=a153_0x421f,_0x43eee3=_0x53df68();while(!![]){try{var _0x5d09b4=-parseInt(_0x551da2(0xcb))/0x1*(-parseInt(_0x551da2(0xc8))/0x2)+parseInt(_0x551da2(0xc9))/0x3*(-parseInt(_0x551da2(0xd0))/0x4)+-parseInt(_0x551da2(0xc5))/0x5*(-parseInt(_0x551da2(0xcc))/0x6)+-parseInt(_0x551da2(0xcf))/0x7*(parseInt(_0x551da2(0xca))/0x8)+parseInt(_0x551da2(0xc7))/0x9+-parseInt(_0x551da2(0xcd))/0xa*(-parseInt(_0x551da2(0xc6))/0xb)+-parseInt(_0x551da2(0xce))/0xc;if(_0x5d09b4===_0x280f3f)break;else _0x43eee3['push'](_0x43eee3['shift']());}catch(_0x49b71d){_0x43eee3['push'](_0x43eee3['shift']());}}}(a153_0x49e2,0x5764e));function a153_0x421f(_0x3468ce,_0x3fa833){_0x3468ce=_0x3468ce-0xc5;var _0x49e29f=a153_0x49e2();var _0x421f3d=_0x49e29f[_0x3468ce];return _0x421f3d;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x5567b1=a154_0x4bfb;(function(_0x139630,_0x29dfed){const _0x25f605=a154_0x4bfb,_0x53d46e=_0x139630();while(!![]){try{const _0x437b3f=-parseInt(_0x25f605(0x170))/0x1+parseInt(_0x25f605(0x172))/0x2+parseInt(_0x25f605(0x17c))/0x3+-parseInt(_0x25f605(0x152))/0x4*(parseInt(_0x25f605(0x169))/0x5)+parseInt(_0x25f605(0x189))/0x6+parseInt(_0x25f605(0x15f))/0x7+-parseInt(_0x25f605(0x148))/0x8;if(_0x437b3f===_0x29dfed)break;else _0x53d46e['push'](_0x53d46e['shift']());}catch(_0xff8292){_0x53d46e['push'](_0x53d46e['shift']());}}}(a154_0x1ab0,0x90d33));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x192),a154_0x5567b1(0x178),'Less',a154_0x5567b1(0x156),a154_0x5567b1(0x168),'In',a154_0x5567b1(0x17d),a154_0x5567b1(0x160),'IsNull','TimeWithinPast',a154_0x5567b1(0x174),a154_0x5567b1(0x149),a154_0x5567b1(0x15b),a154_0x5567b1(0x181),a154_0x5567b1(0x15c)]);function a154_0x4bfb(_0x18e7bf,_0x4bf9a4){_0x18e7bf=_0x18e7bf-0x148;const _0x1ab088=a154_0x1ab0();let _0x4bfb9d=_0x1ab088[_0x18e7bf];return _0x4bfb9d;}export const TimeUnitSchema=z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x14e),'minute',a154_0x5567b1(0x18e),'day','week','month',a154_0x5567b1(0x17b)]);export const AggregationTypeSchema=z['enum']([a154_0x5567b1(0x153),a154_0x5567b1(0x15e),'Average',a154_0x5567b1(0x182),'Max',a154_0x5567b1(0x188),a154_0x5567b1(0x179),a154_0x5567b1(0x151)]);const TemporalValueSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x17a)]({'timestamp':z[a154_0x5567b1(0x164)]()}),z[a154_0x5567b1(0x17a)]({'last':z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x16e)](z['string'](),z[a154_0x5567b1(0x16d)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x164)](),z['number'](),z[a154_0x5567b1(0x166)](),TemporalValueSchema,z[a154_0x5567b1(0x186)](z['union']([z[a154_0x5567b1(0x164)](),z['number'](),z[a154_0x5567b1(0x166)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a154_0x5567b1(0x192),a154_0x5567b1(0x178),a154_0x5567b1(0x156),a154_0x5567b1(0x16c),a154_0x5567b1(0x168),'In','Contain',a154_0x5567b1(0x15b),a154_0x5567b1(0x181),'Regexp',a154_0x5567b1(0x15d),a154_0x5567b1(0x174)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0x5567b1(0x15d),a154_0x5567b1(0x174)]);export const OperatorDefSchema=z[a154_0x5567b1(0x17a)]({'type':OperatorTypeSchema,'not':z[a154_0x5567b1(0x166)]()['optional'](),'value':OperatorValueSchema[a154_0x5567b1(0x173)](),'min':z['union']([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)](),TemporalValueSchema])[a154_0x5567b1(0x173)](),'unit':TimeUnitSchema[a154_0x5567b1(0x173)](),'duration':z[a154_0x5567b1(0x17a)]({'day':z['number']()[a154_0x5567b1(0x173)](),'week':z['number']()[a154_0x5567b1(0x173)](),'month':z['number']()[a154_0x5567b1(0x173)](),'year':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'hour':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'minute':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)](),'second':z[a154_0x5567b1(0x16d)]()['optional']()})[a154_0x5567b1(0x173)](),'from':z['object']({'last':z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x16d)](),z[a154_0x5567b1(0x164)]()]),'unit':TimeUnitSchema})[a154_0x5567b1(0x173)](),'reverse':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)]()})[a154_0x5567b1(0x18b)]((_0x2082cf,_0x4ee9e7)=>{const _0x5a830c=a154_0x5567b1;OPERATORS_REQUIRING_VALUE[_0x5a830c(0x154)](_0x2082cf[_0x5a830c(0x159)])&&(_0x2082cf[_0x5a830c(0x14d)]===undefined||_0x2082cf[_0x5a830c(0x14d)]===null)&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':'custom','message':_0x5a830c(0x17f)+_0x2082cf['type']+_0x5a830c(0x193),'path':[_0x5a830c(0x14d)]}),_0x2082cf[_0x5a830c(0x159)]===_0x5a830c(0x17d)&&_0x2082cf[_0x5a830c(0x16b)]===undefined&&_0x2082cf[_0x5a830c(0x14a)]===undefined&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':_0x5a830c(0x167),'params':{'validationCode':_0x5a830c(0x14f)}}),OPERATORS_REQUIRING_UNIT[_0x5a830c(0x154)](_0x2082cf[_0x5a830c(0x159)])&&_0x2082cf[_0x5a830c(0x14d)]!==undefined&&!_0x2082cf[_0x5a830c(0x18d)]&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':'Operator\x20\x27'+_0x2082cf[_0x5a830c(0x159)]+_0x5a830c(0x14c),'path':[_0x5a830c(0x18d)],'params':{'validationCode':_0x5a830c(0x180)}}),_0x2082cf[_0x5a830c(0x159)]==='TimeRange'&&(!_0x2082cf[_0x5a830c(0x161)]&&_0x4ee9e7[_0x5a830c(0x14b)]({'code':_0x5a830c(0x163),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x5a830c(0x161)]}),!_0x2082cf['from']&&_0x4ee9e7['addIssue']({'code':_0x5a830c(0x163),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x5a830c(0x185)]}));});export const ArrayMatchingSchema=z[a154_0x5567b1(0x157)]([z[a154_0x5567b1(0x150)](a154_0x5567b1(0x191)),z[a154_0x5567b1(0x150)](a154_0x5567b1(0x16f)),z['object']({'atLeast':z[a154_0x5567b1(0x16d)]()}),z['object']({'atMost':z[a154_0x5567b1(0x16d)]()}),z['object']({'exactly':z[a154_0x5567b1(0x16d)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a154_0x5567b1(0x159),[z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x15e),'Min',a154_0x5567b1(0x162),a154_0x5567b1(0x194)]),'column':z[a154_0x5567b1(0x164)](),'groupingColumns':z[a154_0x5567b1(0x186)](z[a154_0x5567b1(0x164)]())[a154_0x5567b1(0x173)]()}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)]('Count'),'groupingColumns':z[a154_0x5567b1(0x186)](z['string']())[a154_0x5567b1(0x173)]()}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x188)),'columns':z[a154_0x5567b1(0x186)](z['string']())}),z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x179),a154_0x5567b1(0x151)]),'column':z['string'](),'orderColumn':z[a154_0x5567b1(0x164)](),'groupingColumns':z[a154_0x5567b1(0x186)](z[a154_0x5567b1(0x164)]())[a154_0x5567b1(0x173)]()})]);export const TimeWindowDefSchema=z[a154_0x5567b1(0x17a)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a154_0x5567b1(0x15d),a154_0x5567b1(0x174),'TimeRange']);export const FilterColumnConditionDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x183)),'column':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5567b1(0x173)]()})[a154_0x5567b1(0x18b)]((_0x3ea409,_0x46f84e)=>{const _0x33df43=a154_0x5567b1,_0x23b286=_0x3ea409['operator'][_0x33df43(0x159)];_0x3ea409[_0x33df43(0x177)]===_0x33df43(0x184)?!TIMESTAMP_OPERATORS[_0x33df43(0x154)](_0x23b286)&&_0x46f84e[_0x33df43(0x14b)]({'code':'custom','message':_0x33df43(0x17e)+_0x23b286+'\x27)','path':['operator',_0x33df43(0x159)]}):TIMESTAMP_OPERATORS[_0x33df43(0x154)](_0x23b286)&&_0x46f84e[_0x33df43(0x14b)]({'code':_0x33df43(0x163),'message':_0x33df43(0x17f)+_0x23b286+_0x33df43(0x18a),'path':[_0x33df43(0x195),_0x33df43(0x159)]});});export const FilterRuleDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x18c)),'conditions':z[a154_0x5567b1(0x186)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x165)),'attribute':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)](),'aggregation':AggregationDefSchema[a154_0x5567b1(0x173)](),'source':z[a154_0x5567b1(0x164)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a154_0x5567b1(0x17a)]({'type':z['literal'](a154_0x5567b1(0x176)),'attribute':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5567b1(0x173)](),'exclude':z[a154_0x5567b1(0x166)]()[a154_0x5567b1(0x173)](),'aggregation':AggregationDefSchema[a154_0x5567b1(0x173)](),'source':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)](),'filter':FilterRuleDefSchema[a154_0x5567b1(0x173)](),'timeWindow':TimeWindowDefSchema[a154_0x5567b1(0x173)](),'limit':z[a154_0x5567b1(0x16d)]()[a154_0x5567b1(0x173)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x183)),'column':z[a154_0x5567b1(0x164)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x18f)](['And','Or']),'conditions':z[a154_0x5567b1(0x186)](ConditionDefSchema),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)]()}));export const SegmentRefConditionDefSchema=z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x16a),a154_0x5567b1(0x171)]),'segment':z[a154_0x5567b1(0x164)]()['min'](0x1,a154_0x5567b1(0x175))});export const ConditionDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x157)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a154_0x5567b1(0x190)](()=>z[a154_0x5567b1(0x17a)]({'type':z['enum']([a154_0x5567b1(0x18c),'Or']),'conditions':z[a154_0x5567b1(0x186)](ConditionDefSchema),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)]()}));export const SegmentDefSchema=z[a154_0x5567b1(0x17a)]({'type':z[a154_0x5567b1(0x150)](a154_0x5567b1(0x155))[a154_0x5567b1(0x173)](),'name':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x16b)](0x1,a154_0x5567b1(0x187)),'description':z[a154_0x5567b1(0x164)]()[a154_0x5567b1(0x173)](),'folder':z['string']()[a154_0x5567b1(0x173)](),'rule':RuleDefSchema['optional'](),'kind':z[a154_0x5567b1(0x18f)]([a154_0x5567b1(0x15a),a154_0x5567b1(0x158),'funnel_stage'])[a154_0x5567b1(0x173)](),'visible':z['boolean']()[a154_0x5567b1(0x173)](),'activations':z['array'](z[a154_0x5567b1(0x191)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];function a154_0x1ab0(){const _0x53d171=['5147490wpURaJ','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','superRefine','And','unit','hour','enum','lazy','any','Equal','\x27\x20requires\x20a\x20value','Average','operator','5134592kikomt','Contain','max','addIssue','\x27\x20requires\x20a\x20time\x20unit','value','second','MISSING_BETWEEN_BOUNDS','literal','Last','196256yhhvUg','Count','has','segment','GreaterEqual','union','realtime','type','batch','StartWith','TimeRange','TimeWithinPast','Sum','7278649augKdq','Regexp','duration','Max','custom','string','Value','boolean','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','LessEqual','95iFZbmZ','include','min','Less','number','record','all','1058757nHQVqz','exclude','1465136NNrope','optional','TimeWithinNext','Segment\x20reference\x20must\x20not\x20be\x20empty','Behavior','column','Greater','First','object','year','1787130nSAUgk','Between','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Operator\x20\x27','MISSING_TIME_UNIT','EndWith','Min','Column','timestamp','from','array','Segment\x20name\x20is\x20required','CountDistinct'];a154_0x1ab0=function(){return _0x53d171;};return a154_0x1ab0();}void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a154_0xe57f0a=a154_0x5d23;(function(_0x160f8e,_0x2f4f71){const _0x29edc9=a154_0x5d23,_0x346bd0=_0x160f8e();while(!![]){try{const _0x992011=parseInt(_0x29edc9(0xd5))/0x1*(parseInt(_0x29edc9(0xce))/0x2)+-parseInt(_0x29edc9(0xe4))/0x3*(parseInt(_0x29edc9(0xb8))/0x4)+parseInt(_0x29edc9(0xc9))/0x5*(-parseInt(_0x29edc9(0xb6))/0x6)+parseInt(_0x29edc9(0xef))/0x7*(-parseInt(_0x29edc9(0xb0))/0x8)+-parseInt(_0x29edc9(0xc0))/0x9+-parseInt(_0x29edc9(0xeb))/0xa*(-parseInt(_0x29edc9(0xdd))/0xb)+-parseInt(_0x29edc9(0xdb))/0xc*(-parseInt(_0x29edc9(0xbc))/0xd);if(_0x992011===_0x2f4f71)break;else _0x346bd0['push'](_0x346bd0['shift']());}catch(_0x35cbeb){_0x346bd0['push'](_0x346bd0['shift']());}}}(a154_0x26f1,0x334a9));import{z}from'zod';function a154_0x26f1(){const _0x33c7c2=['TimeRange\x20operator\x20requires\x20\x27from\x27','2251691TlCrqt','funnel_stage','year','timestamp','2959002WzUjEA','And','include','addIssue','value','Regexp','First','all','minute','5qWYzhH','week','Last','day','Behavior','20RFivjb','Segment\x20name\x20is\x20required','array','TimeWithinPast','lazy','Between','segment','8222UIytqQ','MISSING_BETWEEN_BOUNDS','Max','exclude','TimeWithinNext','Less','60FsCWSx','TimeRange\x20operator\x20requires\x20\x27duration\x27','319UIACrj','Value','Column','union','any','Min','LessEqual','645hIMgTB','Segment\x20reference\x20must\x20not\x20be\x20empty','discriminatedUnion','number','Operator\x20\x27','\x27\x20requires\x20a\x20time\x20unit','literal','16710MXuJcJ','superRefine','EndWith','realtime','203shAoYf','min','Average','month','object','operator','Equal','type','CountDistinct','record','optional','custom','has','TimeRange','batch','from','unit','GreaterEqual','33736UgQWqG','enum','Count','max','duration','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','244734TWFXym','boolean','5484tuLHit','string','column'];a154_0x26f1=function(){return _0x33c7c2;};return a154_0x26f1();}export const OperatorTypeSchema=z[a154_0xe57f0a(0xb1)]([a154_0xe57f0a(0xf5),'Greater',a154_0xe57f0a(0xda),a154_0xe57f0a(0xaf),a154_0xe57f0a(0xe3),'In','Between',a154_0xe57f0a(0xc5),'IsNull',a154_0xe57f0a(0xd1),a154_0xe57f0a(0xd9),'Contain','StartWith',a154_0xe57f0a(0xed),'TimeRange']);export const TimeUnitSchema=z[a154_0xe57f0a(0xb1)](['second',a154_0xe57f0a(0xc8),'hour',a154_0xe57f0a(0xcc),a154_0xe57f0a(0xca),a154_0xe57f0a(0xf2),a154_0xe57f0a(0xbe)]);export const AggregationTypeSchema=z[a154_0xe57f0a(0xb1)]([a154_0xe57f0a(0xb2),'Sum',a154_0xe57f0a(0xf1),a154_0xe57f0a(0xe2),'Max',a154_0xe57f0a(0xf7),a154_0xe57f0a(0xc6),'Last']);const TemporalValueSchema=z[a154_0xe57f0a(0xe0)]([z[a154_0xe57f0a(0xf3)]({'timestamp':z[a154_0xe57f0a(0xb9)]()}),z['object']({'last':z[a154_0xe57f0a(0xe0)]([z[a154_0xe57f0a(0xe7)](),z[a154_0xe57f0a(0xf8)](z['string'](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z[a154_0xe57f0a(0xe0)]([z['string'](),z[a154_0xe57f0a(0xe7)](),z[a154_0xe57f0a(0xb7)](),TemporalValueSchema,z['array'](z['union']([z[a154_0xe57f0a(0xb9)](),z[a154_0xe57f0a(0xe7)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a154_0xe57f0a(0xf5),'Greater',a154_0xe57f0a(0xaf),a154_0xe57f0a(0xda),'LessEqual','In','Contain','StartWith',a154_0xe57f0a(0xed),'Regexp',a154_0xe57f0a(0xd1),a154_0xe57f0a(0xd9)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0xe57f0a(0xd1),a154_0xe57f0a(0xd9)]);export const OperatorDefSchema=z[a154_0xe57f0a(0xf3)]({'type':OperatorTypeSchema,'not':z[a154_0xe57f0a(0xb7)]()[a154_0xe57f0a(0xf9)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z[a154_0xe57f0a(0xe7)](),z[a154_0xe57f0a(0xb9)](),TemporalValueSchema])['optional'](),'max':z[a154_0xe57f0a(0xe0)]([z[a154_0xe57f0a(0xe7)](),z[a154_0xe57f0a(0xb9)](),TemporalValueSchema])[a154_0xe57f0a(0xf9)](),'unit':TimeUnitSchema[a154_0xe57f0a(0xf9)](),'duration':z[a154_0xe57f0a(0xf3)]({'day':z['number']()[a154_0xe57f0a(0xf9)](),'week':z['number']()[a154_0xe57f0a(0xf9)](),'month':z[a154_0xe57f0a(0xe7)]()[a154_0xe57f0a(0xf9)](),'year':z[a154_0xe57f0a(0xe7)]()['optional'](),'hour':z[a154_0xe57f0a(0xe7)]()['optional'](),'minute':z['number']()['optional'](),'second':z[a154_0xe57f0a(0xe7)]()[a154_0xe57f0a(0xf9)]()})['optional'](),'from':z['object']({'last':z[a154_0xe57f0a(0xe0)]([z[a154_0xe57f0a(0xe7)](),z[a154_0xe57f0a(0xb9)]()]),'unit':TimeUnitSchema})[a154_0xe57f0a(0xf9)](),'reverse':z[a154_0xe57f0a(0xb7)]()[a154_0xe57f0a(0xf9)]()})[a154_0xe57f0a(0xec)]((_0x18c9d2,_0x3b2861)=>{const _0x4158d8=a154_0xe57f0a;OPERATORS_REQUIRING_VALUE['has'](_0x18c9d2[_0x4158d8(0xf6)])&&(_0x18c9d2[_0x4158d8(0xc4)]===undefined||_0x18c9d2['value']===null)&&_0x3b2861[_0x4158d8(0xc3)]({'code':'custom','message':_0x4158d8(0xe8)+_0x18c9d2[_0x4158d8(0xf6)]+'\x27\x20requires\x20a\x20value','path':[_0x4158d8(0xc4)]}),_0x18c9d2[_0x4158d8(0xf6)]===_0x4158d8(0xd3)&&_0x18c9d2[_0x4158d8(0xf0)]===undefined&&_0x18c9d2[_0x4158d8(0xb3)]===undefined&&_0x3b2861[_0x4158d8(0xc3)]({'code':_0x4158d8(0xfa),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x4158d8(0xd6)}}),OPERATORS_REQUIRING_UNIT[_0x4158d8(0xfb)](_0x18c9d2[_0x4158d8(0xf6)])&&_0x18c9d2[_0x4158d8(0xc4)]!==undefined&&!_0x18c9d2[_0x4158d8(0xae)]&&_0x3b2861[_0x4158d8(0xc3)]({'code':_0x4158d8(0xfa),'message':_0x4158d8(0xe8)+_0x18c9d2[_0x4158d8(0xf6)]+_0x4158d8(0xe9),'path':[_0x4158d8(0xae)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x18c9d2['type']==='TimeRange'&&(!_0x18c9d2[_0x4158d8(0xb4)]&&_0x3b2861[_0x4158d8(0xc3)]({'code':_0x4158d8(0xfa),'message':_0x4158d8(0xdc),'path':[_0x4158d8(0xb4)]}),!_0x18c9d2['from']&&_0x3b2861[_0x4158d8(0xc3)]({'code':_0x4158d8(0xfa),'message':_0x4158d8(0xbb),'path':[_0x4158d8(0xad)]}));});export const ArrayMatchingSchema=z[a154_0xe57f0a(0xe0)]([z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xe1)),z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xc7)),z[a154_0xe57f0a(0xf3)]({'atLeast':z['number']()}),z[a154_0xe57f0a(0xf3)]({'atMost':z[a154_0xe57f0a(0xe7)]()}),z[a154_0xe57f0a(0xf3)]({'exactly':z[a154_0xe57f0a(0xe7)]()})]);export const AggregationDefSchema=z[a154_0xe57f0a(0xe6)]('type',[z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xb1)](['Sum',a154_0xe57f0a(0xe2),a154_0xe57f0a(0xd7),a154_0xe57f0a(0xf1)]),'column':z['string'](),'groupingColumns':z[a154_0xe57f0a(0xd0)](z[a154_0xe57f0a(0xb9)]())[a154_0xe57f0a(0xf9)]()}),z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xb2)),'groupingColumns':z[a154_0xe57f0a(0xd0)](z[a154_0xe57f0a(0xb9)]())[a154_0xe57f0a(0xf9)]()}),z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xf7)),'columns':z[a154_0xe57f0a(0xd0)](z[a154_0xe57f0a(0xb9)]())}),z[a154_0xe57f0a(0xf3)]({'type':z['enum']([a154_0xe57f0a(0xc6),a154_0xe57f0a(0xcb)]),'column':z[a154_0xe57f0a(0xb9)](),'orderColumn':z[a154_0xe57f0a(0xb9)](),'groupingColumns':z[a154_0xe57f0a(0xd0)](z[a154_0xe57f0a(0xb9)]())[a154_0xe57f0a(0xf9)]()})]);export const TimeWindowDefSchema=z[a154_0xe57f0a(0xf3)]({'duration':z[a154_0xe57f0a(0xe7)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a154_0xe57f0a(0xd1),a154_0xe57f0a(0xd9),a154_0xe57f0a(0xfc)]);export const FilterColumnConditionDefSchema=z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xdf)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x1a2b2f,_0x251872)=>{const _0x573967=a154_0xe57f0a,_0x320c7a=_0x1a2b2f[_0x573967(0xf4)][_0x573967(0xf6)];_0x1a2b2f[_0x573967(0xba)]===_0x573967(0xbf)?!TIMESTAMP_OPERATORS[_0x573967(0xfb)](_0x320c7a)&&_0x251872[_0x573967(0xc3)]({'code':_0x573967(0xfa),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x320c7a+'\x27)','path':[_0x573967(0xf4),_0x573967(0xf6)]}):TIMESTAMP_OPERATORS[_0x573967(0xfb)](_0x320c7a)&&_0x251872[_0x573967(0xc3)]({'code':_0x573967(0xfa),'message':'Operator\x20\x27'+_0x320c7a+_0x573967(0xb5),'path':[_0x573967(0xf4),_0x573967(0xf6)]});});export const FilterRuleDefSchema=z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xc1)),'conditions':z[a154_0xe57f0a(0xd0)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a154_0xe57f0a(0xd2)](()=>z[a154_0xe57f0a(0xf3)]({'type':z['literal'](a154_0xe57f0a(0xde)),'attribute':z[a154_0xe57f0a(0xb9)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0xe57f0a(0xf9)](),'exclude':z[a154_0xe57f0a(0xb7)]()[a154_0xe57f0a(0xf9)](),'aggregation':AggregationDefSchema[a154_0xe57f0a(0xf9)](),'source':z[a154_0xe57f0a(0xb9)]()[a154_0xe57f0a(0xf9)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a154_0xe57f0a(0xe7)]()[a154_0xe57f0a(0xf9)]()}));export const BehaviorConditionDefSchema=z[a154_0xe57f0a(0xd2)](()=>z['object']({'type':z['literal'](a154_0xe57f0a(0xcd)),'attribute':z[a154_0xe57f0a(0xb9)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0xe57f0a(0xf9)](),'exclude':z[a154_0xe57f0a(0xb7)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a154_0xe57f0a(0xf9)](),'limit':z['number']()[a154_0xe57f0a(0xf9)]()}));export const ColumnConditionDefSchema=z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xdf)),'column':z[a154_0xe57f0a(0xb9)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xb1)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a154_0xe57f0a(0xb9)]()[a154_0xe57f0a(0xf9)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a154_0xe57f0a(0xb1)]([a154_0xe57f0a(0xc2),a154_0xe57f0a(0xd8)]),'segment':z[a154_0xe57f0a(0xb9)]()[a154_0xe57f0a(0xf0)](0x1,a154_0xe57f0a(0xe5))});export const ConditionDefSchema=z[a154_0xe57f0a(0xd2)](()=>z[a154_0xe57f0a(0xe0)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a154_0xe57f0a(0xd2)](()=>z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xb1)](['And','Or']),'conditions':z[a154_0xe57f0a(0xd0)](ConditionDefSchema),'description':z[a154_0xe57f0a(0xb9)]()[a154_0xe57f0a(0xf9)]()}));export const SegmentDefSchema=z[a154_0xe57f0a(0xf3)]({'type':z[a154_0xe57f0a(0xea)](a154_0xe57f0a(0xd4))[a154_0xe57f0a(0xf9)](),'name':z['string']()[a154_0xe57f0a(0xf0)](0x1,a154_0xe57f0a(0xcf)),'description':z['string']()[a154_0xe57f0a(0xf9)](),'folder':z[a154_0xe57f0a(0xb9)]()[a154_0xe57f0a(0xf9)](),'rule':RuleDefSchema[a154_0xe57f0a(0xf9)](),'kind':z[a154_0xe57f0a(0xb1)]([a154_0xe57f0a(0xac),a154_0xe57f0a(0xee),a154_0xe57f0a(0xbd)])[a154_0xe57f0a(0xf9)](),'visible':z[a154_0xe57f0a(0xb7)]()[a154_0xe57f0a(0xf9)](),'activations':z[a154_0xe57f0a(0xd0)](z[a154_0xe57f0a(0xe1)]())[a154_0xe57f0a(0xf9)]()});const _syncCheck1=!![],_syncCheck2=!![];function a154_0x5d23(_0x3111e0,_0x30ae47){_0x3111e0=_0x3111e0-0xac;const _0x26f1c8=a154_0x26f1();let _0x5d235f=_0x26f1c8[_0x3111e0];return _0x5d235f;}void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x578c5e=a155_0x4cfb;(function(_0x44dfb8,_0x172ec3){const _0x259805=a155_0x4cfb,_0x19607b=_0x44dfb8();while(!![]){try{const _0x3602eb=parseInt(_0x259805(0x183))/0x1*(parseInt(_0x259805(0x173))/0x2)+-parseInt(_0x259805(0x178))/0x3+parseInt(_0x259805(0x171))/0x4+parseInt(_0x259805(0x177))/0x5+parseInt(_0x259805(0x16d))/0x6+parseInt(_0x259805(0x16c))/0x7+parseInt(_0x259805(0x180))/0x8*(-parseInt(_0x259805(0x182))/0x9);if(_0x3602eb===_0x172ec3)break;else _0x19607b['push'](_0x19607b['shift']());}catch(_0x12e8ac){_0x19607b['push'](_0x19607b['shift']());}}}(a155_0x2f2c,0xa9c55));import{readFileSync}from'fs';import*as a155_0x1f43fe from'path';import*as a155_0x575422 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(['email','push']);export function isJourneyDef(_0x562b22){const _0x4c6f0f=a155_0x4cfb;return typeof _0x562b22===_0x4c6f0f(0x187)&&_0x562b22!==null&&_0x4c6f0f(0x17c)in _0x562b22&&_0x562b22[_0x4c6f0f(0x17c)]==='journey';}function a155_0x4cfb(_0x5a5271,_0x3f60ea){_0x5a5271=_0x5a5271-0x16c;const _0x2f2c2d=a155_0x2f2c();let _0x4cfb2f=_0x2f2c2d[_0x5a5271];return _0x4cfb2f;}export function isCampaignDef(_0x1006dc){const _0x50793f=a155_0x4cfb;if(typeof _0x1006dc!==_0x50793f(0x187)||_0x1006dc===null)return![];const _0x4e72c7=_0x1006dc,_0x4e26a9=VALID_CAMPAIGN_TYPES['has'](_0x4e72c7[_0x50793f(0x17e)]);if(_0x4e72c7[_0x50793f(0x17c)]==='campaign'&&_0x4e26a9)return!![];if(_0x4e26a9&&!_0x4e72c7[_0x50793f(0x17c)])return!![];return![];}export function isTemplateDef(_0x28e997){const _0x4e1507=a155_0x4cfb;return typeof _0x28e997===_0x4e1507(0x187)&&_0x28e997!==null&&_0x4e1507(0x17c)in _0x28e997&&_0x28e997[_0x4e1507(0x17c)]===_0x4e1507(0x17a);}function a155_0x2f2c(){const _0x18bfd8=['6423750jGoHZy','valid','result','toJSON','827260hosNVB','relative','77152JRqCCn','error','segment','parseDocument','5870205DZXowE','349947TfKWMg','length','template','skipped','type','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','campaign_type','YAML_PARSE_ERROR','40GfDQIw','campaign','6096474kxONTL','26jqfjZB','warnings','journey','filterType','object','5211521dHnfvc'];a155_0x2f2c=function(){return _0x18bfd8;};return a155_0x2f2c();}export function isValidationResult(_0x3b0376){const _0x581cb7=a155_0x4cfb;return!(_0x581cb7(0x17b)in _0x3b0376);}export function createParseErrorResult(_0x217e4e,_0x233d2a,_0x4af690,_0x53372a,_0x11f137=a155_0x578c5e(0x175)){const _0x49e7dd=a155_0x578c5e;return{'filePath':_0x217e4e,'relativePath':_0x233d2a,'source':_0x4af690,'result':{'valid':![],'errors':[{'level':_0x49e7dd(0x174),'path':'','code':_0x49e7dd(0x17f),'message':_0x53372a}],'warnings':[]},'fileType':_0x11f137};}export function validateYamlFile(_0x30504f,_0x3eb960,_0xb84192={}){const _0x21231f=a155_0x578c5e,_0x580a2a=a155_0x1f43fe[_0x21231f(0x172)](_0x3eb960,_0x30504f)||a155_0x1f43fe['basename'](_0x30504f);try{const _0x559abd=readFileSync(_0x30504f,'utf-8'),_0x557776=a155_0x575422[_0x21231f(0x176)](_0x559abd),_0x1ae220=_0x557776[_0x21231f(0x170)]();if(!_0x1ae220)return createParseErrorResult(_0x30504f,_0x580a2a,_0x559abd,_0x21231f(0x17d));let _0x8ad563;if(isJourneyDef(_0x1ae220))_0x8ad563=_0x21231f(0x185);else{if(isCampaignDef(_0x1ae220))_0x8ad563='campaign';else isTemplateDef(_0x1ae220)?_0x8ad563='template':_0x8ad563=_0x21231f(0x175);}if(_0xb84192['filterType']&&_0x8ad563!==_0xb84192[_0x21231f(0x186)])return{'filePath':_0x30504f,'relativePath':_0x580a2a,'skipped':!![],'reason':'not\x20a\x20'+_0xb84192[_0x21231f(0x186)]};const _0x562fb7={'source':_0x559abd,'document':_0x557776};let _0x23b5d5;if(_0x8ad563===_0x21231f(0x185))_0x23b5d5=validateJourneyDef(_0x1ae220,_0x562fb7);else{if(_0x8ad563===_0x21231f(0x181))_0x23b5d5=validateCampaignDef(_0x1ae220,_0x562fb7);else _0x8ad563===_0x21231f(0x17a)?_0x23b5d5=validateTemplateDef(_0x1ae220,_0x562fb7):_0x23b5d5=validateSegmentDef(_0x1ae220,_0x562fb7);}return{'filePath':_0x30504f,'relativePath':_0x580a2a,'source':_0x559abd,'result':_0x23b5d5,'fileType':_0x8ad563};}catch(_0x1dcc4c){const _0x5f0cbd=_0x1dcc4c instanceof Error?_0x1dcc4c['message']:String(_0x1dcc4c);return createParseErrorResult(_0x30504f,_0x580a2a,'','YAML\x20parse\x20error:\x20'+_0x5f0cbd);}}export function validateYamlFiles(_0x373bf8,_0x40f933,_0x1ba30c={}){return _0x373bf8['map'](_0xfeb721=>validateYamlFile(_0xfeb721,_0x40f933,_0x1ba30c));}export function calculateSummary(_0x3b4bf7){const _0x1f5408=a155_0x578c5e;let _0x43366a=0x0,_0x1805f3=0x0,_0x29deeb=0x0,_0x16ac9a=0x0;for(const _0x51decf of _0x3b4bf7){if(!isValidationResult(_0x51decf)){_0x16ac9a++;continue;}_0x51decf[_0x1f5408(0x16f)][_0x1f5408(0x16e)]?_0x43366a++:_0x1805f3++,_0x29deeb+=_0x51decf[_0x1f5408(0x16f)][_0x1f5408(0x184)][_0x1f5408(0x179)];}return{'validCount':_0x43366a,'invalidCount':_0x1805f3,'warningCount':_0x29deeb,'skippedCount':_0x16ac9a,'hasErrors':_0x1805f3>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5526f8,_0x1fe39c){const _0x55e625=a156_0x1036,_0xf12176=_0x5526f8();while(!![]){try{const _0x28e76a=-parseInt(_0x55e625(0x19a))/0x1+parseInt(_0x55e625(0x186))/0x2+-parseInt(_0x55e625(0x182))/0x3*(parseInt(_0x55e625(0x175))/0x4)+-parseInt(_0x55e625(0x18c))/0x5*(-parseInt(_0x55e625(0x179))/0x6)+-parseInt(_0x55e625(0x17c))/0x7*(-parseInt(_0x55e625(0x185))/0x8)+parseInt(_0x55e625(0x188))/0x9*(parseInt(_0x55e625(0x180))/0xa)+-parseInt(_0x55e625(0x19f))/0xb*(parseInt(_0x55e625(0x177))/0xc);if(_0x28e76a===_0x1fe39c)break;else _0xf12176['push'](_0xf12176['shift']());}catch(_0x50978f){_0xf12176['push'](_0xf12176['shift']());}}}(a156_0x5f17,0x61016));import*as a156_0x4ef406 from'yaml';import a156_0x1cc0d5 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x131431,_0x10f7c4,_0x385607){const _0xdb55b=a156_0x1036;if(!_0x131431||!_0x10f7c4)return undefined;try{let _0x47a0e0=_0x131431[_0xdb55b(0x18b)](_0x385607,!![]),_0x305cb5=[..._0x385607];while((!_0x47a0e0||typeof _0x47a0e0!==_0xdb55b(0x17d)||!(_0xdb55b(0x1a0)in _0x47a0e0)||!_0x47a0e0[_0xdb55b(0x1a0)])&&_0x305cb5[_0xdb55b(0x192)]>0x0){_0x305cb5['pop'](),_0x47a0e0=_0x305cb5[_0xdb55b(0x192)]>0x0?_0x131431[_0xdb55b(0x18b)](_0x305cb5,!![]):_0x131431[_0xdb55b(0x187)];}if(!_0x47a0e0||typeof _0x47a0e0!=='object'||!(_0xdb55b(0x1a0)in _0x47a0e0)||!_0x47a0e0[_0xdb55b(0x1a0)])return undefined;const [_0x42f615]=_0x47a0e0[_0xdb55b(0x1a0)];return offsetToLocation(_0x10f7c4,_0x42f615);}catch{return undefined;}}export function offsetToLocation(_0x27126d,_0x25c0df){let _0x37c67a=0x1,_0x567769=0x1;for(let _0x2001c6=0x0;_0x2001c6<_0x25c0df&&_0x2001c6<_0x27126d['length'];_0x2001c6++){_0x27126d[_0x2001c6]==='\x0a'?(_0x37c67a++,_0x567769=0x1):_0x567769++;}return{'line':_0x37c67a,'column':_0x567769,'offset':_0x25c0df};}export function pathToArray(_0x538b85){const _0x37a936=a156_0x1036;if(!_0x538b85)return[];return _0x538b85[_0x37a936(0x17e)]('.')[_0x37a936(0x1a2)](_0x40f3ea=>{const _0x532421=_0x37a936,_0x5afbb8=_0x40f3ea[_0x532421(0x1a6)](/^(\w+)\[(\d+)\]$/);if(_0x5afbb8)return[_0x5afbb8[0x1],parseInt(_0x5afbb8[0x2],0xa)];return[_0x40f3ea];});}export function formatZodPath(_0x307473){let _0x3be7c7='';for(const _0x93b463 of _0x307473){if(typeof _0x93b463==='number')_0x3be7c7+='['+_0x93b463+']';else{const _0x4c4352=String(_0x93b463);_0x3be7c7+=_0x3be7c7?'.'+_0x4c4352:_0x4c4352;}}return _0x3be7c7;}export function flattenZodIssues(_0x507b4e){const _0x5c2128=a156_0x1036,_0x1b3bdb=[];for(const _0x5b55f9 of _0x507b4e){if(_0x5b55f9['code']===_0x5c2128(0x18d)&&_0x5c2128(0x199)in _0x5b55f9){const _0x569bb9=_0x5b55f9[_0x5c2128(0x199)];let _0x3bcab9=_0x569bb9[0x0]||[];for(const _0x22e009 of _0x569bb9){_0x22e009[_0x5c2128(0x192)]<_0x3bcab9['length']&&(_0x3bcab9=_0x22e009);}const _0x2a3d6f=_0x3bcab9[_0x5c2128(0x17a)](_0x19ea42=>({..._0x19ea42,'path':[..._0x5b55f9[_0x5c2128(0x178)],..._0x19ea42[_0x5c2128(0x178)]]}));_0x1b3bdb['push'](...flattenZodIssues(_0x2a3d6f));}else _0x1b3bdb[_0x5c2128(0x1a3)](_0x5b55f9);}return _0x1b3bdb;}export function safeParseYaml(_0xf614ae,_0x1dfd7f){const _0x2a47ce=a156_0x1036,_0x40f41c=a156_0x4ef406['parse'](_0xf614ae);if(!_0x40f41c||typeof _0x40f41c!==_0x2a47ce(0x17d))throw new Error(_0x2a47ce(0x181));const _0x2bd0b9=_0x1dfd7f[_0x2a47ce(0x198)](_0x40f41c);if(!_0x2bd0b9[_0x2a47ce(0x18e)]){const _0x8d76ea=_0x2bd0b9[_0x2a47ce(0x17f)]['issues'][0x0],_0x3077c2=formatZodPath(_0x8d76ea[_0x2a47ce(0x178)]);throw new Error(_0x3077c2?_0x2a47ce(0x19d)+_0x3077c2+_0x2a47ce(0x176)+_0x8d76ea[_0x2a47ce(0x191)]:_0x2a47ce(0x1a4)+_0x8d76ea[_0x2a47ce(0x191)]);}return _0x2bd0b9[_0x2a47ce(0x190)];}function a156_0x5f17(){const _0x213504=['YAML\x20validation\x20error\x20at\x20\x27','padStart','33748ECyONf','range','code','flatMap','push','YAML\x20validation\x20error:\x20','yellow','match','4596YNQCHE','\x27:\x20','312kSSioi','path','1399896qntCVQ','map','red','95683DRyvmw','object','split','error','37190OJPIzF','Invalid\x20YAML:\x20expected\x20an\x20object','168HnmUUv','repeat','level','56Rrwqnw','1569298kqVFtK','contents','333gaippQ','toString','min','getIn','5JeiXXB','invalid_union','success','cyan','data','message','length','line','dim','column','location','\x20|\x20','safeParse','errors','709805RyFbmM','join','max'];a156_0x5f17=function(){return _0x213504;};return a156_0x5f17();}function a156_0x1036(_0x2eb9dd,_0x35385a){_0x2eb9dd=_0x2eb9dd-0x175;const _0x5f174b=a156_0x5f17();let _0x103698=_0x5f174b[_0x2eb9dd];return _0x103698;}export function formatIssueWithContext(_0x2113a6,_0x45a409,_0x1aec08){const _0x2a4a15=a156_0x1036,_0xde726c=[],_0x28726e=_0x2113a6[_0x2a4a15(0x184)]===_0x2a4a15(0x17f),_0x350533=_0x28726e?a156_0x1cc0d5[_0x2a4a15(0x17b)]:a156_0x1cc0d5[_0x2a4a15(0x1a5)],_0x396cc6=_0x28726e?a156_0x1cc0d5[_0x2a4a15(0x17b)]:a156_0x1cc0d5[_0x2a4a15(0x1a5)],_0x1644f2=_0x1aec08?a156_0x1cc0d5[_0x2a4a15(0x18f)](_0x1aec08+':'):'';if(_0x2113a6[_0x2a4a15(0x196)]){const _0x507aa4=a156_0x1cc0d5['cyan'](_0x2113a6[_0x2a4a15(0x196)][_0x2a4a15(0x193)]+':'+_0x2113a6[_0x2a4a15(0x196)][_0x2a4a15(0x195)]);_0xde726c[_0x2a4a15(0x1a3)](''+_0x1644f2+_0x507aa4+':\x20'+_0x350533(_0x2113a6[_0x2a4a15(0x184)])+'\x20'+_0x396cc6('['+_0x2113a6[_0x2a4a15(0x1a1)]+']'));}else _0xde726c['push'](''+_0x1644f2+a156_0x1cc0d5[_0x2a4a15(0x194)](_0x2113a6[_0x2a4a15(0x178)])+':\x20'+_0x350533(_0x2113a6[_0x2a4a15(0x184)])+'\x20'+_0x396cc6('['+_0x2113a6[_0x2a4a15(0x1a1)]+']'));_0xde726c[_0x2a4a15(0x1a3)](_0x2113a6['message']);if(_0x2113a6[_0x2a4a15(0x196)]&&_0x45a409){const _0x21de9a=_0x45a409[_0x2a4a15(0x17e)]('\x0a'),{line:_0x20e542,column:_0x323be9}=_0x2113a6[_0x2a4a15(0x196)],_0x250982=Math[_0x2a4a15(0x19c)](0x1,_0x20e542-0x1),_0x42ffc4=Math[_0x2a4a15(0x18a)](_0x21de9a[_0x2a4a15(0x192)],_0x20e542+0x1);_0xde726c[_0x2a4a15(0x1a3)]('');for(let _0x1ab007=_0x250982;_0x1ab007<=_0x42ffc4;_0x1ab007++){const _0x3a8fd5=_0x21de9a[_0x1ab007-0x1]||'',_0x209b07=a156_0x1cc0d5['dim'](_0x1ab007[_0x2a4a15(0x189)]()[_0x2a4a15(0x19e)](0x4)),_0x10bad9=a156_0x1cc0d5[_0x2a4a15(0x194)](_0x2a4a15(0x197));if(_0x1ab007===_0x20e542){_0xde726c[_0x2a4a15(0x1a3)]('\x20\x20'+_0x209b07+_0x10bad9+_0x350533(_0x3a8fd5));const _0x1ab9d6='\x20'[_0x2a4a15(0x183)](0x4+0x3+_0x323be9-0x1);_0xde726c[_0x2a4a15(0x1a3)]('\x20\x20'+_0x1ab9d6+_0x350533('^'));}else _0xde726c[_0x2a4a15(0x1a3)]('\x20\x20'+_0x209b07+_0x10bad9+a156_0x1cc0d5[_0x2a4a15(0x194)](_0x3a8fd5));}}return _0xde726c[_0x2a4a15(0x19b)]('\x0a');}export function formatValidationResult(_0x5742b9,_0x2735a8,_0x1ed545){const _0x3d4677=a156_0x1036,_0x174d6c=[];for(const _0x45c67f of _0x5742b9[_0x3d4677(0x199)]){_0x174d6c[_0x3d4677(0x1a3)](formatIssueWithContext(_0x45c67f,_0x2735a8,_0x1ed545)),_0x174d6c[_0x3d4677(0x1a3)]('');}for(const _0x1e8195 of _0x5742b9['warnings']){_0x174d6c[_0x3d4677(0x1a3)](formatIssueWithContext(_0x1e8195,_0x2735a8,_0x1ed545)),_0x174d6c[_0x3d4677(0x1a3)]('');}return _0x174d6c[_0x3d4677(0x19b)]('\x0a');}
|