@treasuredata/tdx 2026.3.39 → 2026.3.40
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-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/work-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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.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/types/workspace.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/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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(_0x4092f8,_0x20dcb0){const _0x32a46b=a153_0x647d,_0x299a96=_0x4092f8();while(!![]){try{const _0x4e082e=-parseInt(_0x32a46b(0x110))/0x1*(parseInt(_0x32a46b(0x10e))/0x2)+-parseInt(_0x32a46b(0x101))/0x3+-parseInt(_0x32a46b(0x104))/0x4+parseInt(_0x32a46b(0x108))/0x5*(parseInt(_0x32a46b(0x107))/0x6)+parseInt(_0x32a46b(0x102))/0x7+-parseInt(_0x32a46b(0x10b))/0x8*(parseInt(_0x32a46b(0x10a))/0x9)+parseInt(_0x32a46b(0x103))/0xa;if(_0x4e082e===_0x20dcb0)break;else _0x299a96['push'](_0x299a96['shift']());}catch(_0x578004){_0x299a96['push'](_0x299a96['shift']());}}}(a153_0x3d00,0x9b25b));function a153_0x647d(_0x4a2168,_0x4c66ef){_0x4a2168=_0x4a2168-0x101;const _0x3d00de=a153_0x3d00();let _0x647d8=_0x3d00de[_0x4a2168];return _0x647d8;}export function buildFolderIdToPathMap(_0x8471b7){const _0x420ab0=a153_0x647d,_0x19f2dc=new Map(),_0x1374e8=new Map();for(const _0x147be5 of _0x8471b7){_0x1374e8[_0x420ab0(0x10c)](_0x147be5['id'],_0x147be5);}const _0x2af252=new Set();for(const _0x4736a3 of _0x8471b7){!_0x4736a3[_0x420ab0(0x106)]&&_0x2af252[_0x420ab0(0x10d)](_0x4736a3['id']);}function _0x59322e(_0x9ac3cc){const _0x422df4=_0x420ab0;if(_0x19f2dc[_0x422df4(0x109)](_0x9ac3cc['id']))return _0x19f2dc[_0x422df4(0x105)](_0x9ac3cc['id']);if(_0x2af252[_0x422df4(0x109)](_0x9ac3cc['id']))return _0x19f2dc[_0x422df4(0x10c)](_0x9ac3cc['id'],''),'';if(_0x9ac3cc[_0x422df4(0x106)]){const _0x516f40=_0x1374e8[_0x422df4(0x105)](_0x9ac3cc[_0x422df4(0x106)]);if(_0x516f40){const _0x1feb42=_0x59322e(_0x516f40),_0x402d3a=_0x1feb42?_0x1feb42+'/'+_0x9ac3cc[_0x422df4(0x10f)]:_0x9ac3cc[_0x422df4(0x10f)];return _0x19f2dc[_0x422df4(0x10c)](_0x9ac3cc['id'],_0x402d3a),_0x402d3a;}}const _0x1e3bc7=_0x9ac3cc[_0x422df4(0x10f)];return _0x19f2dc[_0x422df4(0x10c)](_0x9ac3cc['id'],_0x1e3bc7),_0x1e3bc7;}for(const _0x50f7a0 of _0x8471b7){_0x59322e(_0x50f7a0);}return _0x19f2dc;}export function buildFolderPathToIdMap(_0x11b64f){const _0x5b53ef=a153_0x647d,_0x1b5562=new Map(),_0x54278d=new Map();for(const _0x299258 of _0x11b64f){_0x54278d[_0x5b53ef(0x10c)](_0x299258['id'],_0x299258);}const _0x68d016=new Set();for(const _0x5e1891 of _0x11b64f){!_0x5e1891[_0x5b53ef(0x106)]&&_0x68d016[_0x5b53ef(0x10d)](_0x5e1891['id']);}function _0x15fb13(_0x241494){if(_0x68d016['has'](_0x241494['id']))return'';if(_0x241494['parentFolderId']){const _0x17a17a=_0x54278d['get'](_0x241494['parentFolderId']);if(_0x17a17a){const _0x102a85=_0x15fb13(_0x17a17a);return _0x102a85?_0x102a85+'/'+_0x241494['name']:_0x241494['name'];}}return _0x241494['name'];}for(const _0x3bb5cd of _0x11b64f){const _0x2c3eb5=_0x15fb13(_0x3bb5cd);_0x1b5562[_0x5b53ef(0x10c)](_0x2c3eb5,_0x3bb5cd['id']);}return _0x1b5562;}export function buildFolderMaps(_0x2f9e6d){const _0x416a7c=a153_0x647d,_0x30b6aa=buildFolderIdToPathMap(_0x2f9e6d),_0x35dfdf=new Map();for(const [_0x7ac10e,_0x35b274]of _0x30b6aa){_0x35dfdf[_0x416a7c(0x10c)](_0x35b274,_0x7ac10e);}return{'idToPath':_0x30b6aa,'pathToId':_0x35dfdf};}function a153_0x3d00(){const _0x33a4a9=['23889270XtMuaw','2381644ymdrlP','get','parentFolderId','24IdgeNB','1299525OUUSRY','has','417879vYQSjq','80WBdjUF','set','add','382VEyLUj','name','6101DehvdR','3555918oBLRgl','4320778LlLtUO'];a153_0x3d00=function(){return _0x33a4a9;};return a153_0x3d00();}export function getFolderPath(_0xee07b2,_0x25687b){if(!_0xee07b2)return'';return _0x25687b['get'](_0xee07b2)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5438cf,_0x54cc3d){const _0x2ee959=a154_0x2e8b,_0x26d1e4=_0x5438cf();while(!![]){try{const _0x74c74e=-parseInt(_0x2ee959(0x146))/0x1+parseInt(_0x2ee959(0x15d))/0x2+parseInt(_0x2ee959(0x15a))/0x3+parseInt(_0x2ee959(0x159))/0x4*(parseInt(_0x2ee959(0x14c))/0x5)+-parseInt(_0x2ee959(0x14d))/0x6+parseInt(_0x2ee959(0x13e))/0x7*(parseInt(_0x2ee959(0x147))/0x8)+parseInt(_0x2ee959(0x164))/0x9*(parseInt(_0x2ee959(0x13a))/0xa);if(_0x74c74e===_0x54cc3d)break;else _0x26d1e4['push'](_0x26d1e4['shift']());}catch(_0x275ce6){_0x26d1e4['push'](_0x26d1e4['shift']());}}}(a154_0x1cdf,0xbda40));function a154_0x1cdf(){const _0xb2a782=['pop','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','push','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','40zKmqvU','856968KepHRB','Path\x20segment\x20cannot\x20be\x20empty','segment','1705380CdgFPo','raw','trim','replace','.yml','startsWith','join','2007MGpuMR','slice','Relative\x20path\x20cannot\x20be\x20empty','isAbsolute','length','parse','13540DUiKRs','filter','segments','exists','60116nFLVxf','test','dirname','readFile','Cannot\x20navigate\x20above\x20root','tdx.json','relative','parent_segment','1411005qLnsoo','344KPzsao','Path\x20attempts\x20to\x20navigate\x20above\x20root','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','journey','File\x20not\x20found:\x20','695135ILSUDw','6072414qrrHor','endsWith','resolve','split','type','Path\x20cannot\x20be\x20empty','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','Cannot\x20split\x20empty\x20path'];a154_0x1cdf=function(){return _0xb2a782;};return a154_0x1cdf();}import a154_0x496399 from'path';import{parse as a154_0xfe0204}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x4eb0b6){const _0x21f20a=a154_0x2e8b;if(!_0x4eb0b6||_0x4eb0b6[_0x21f20a(0x15f)]()==='')throw new Error(_0x21f20a(0x152));const _0x33cccb=_0x4eb0b6[_0x21f20a(0x15f)]();if(_0x33cccb==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x4eb0b6};const _0x43c665=_0x33cccb[_0x21f20a(0x162)]('/')?_0x33cccb['substring'](0x1):_0x33cccb,_0x245b70=_0x43c665[_0x21f20a(0x150)]('/')[_0x21f20a(0x13b)](_0x155cb9=>_0x155cb9!=='');if(_0x245b70[_0x21f20a(0x168)]===0x0)throw new Error(_0x21f20a(0x158));const _0x1b0553=_0x33cccb[_0x21f20a(0x162)]('/')||!isRelativePathSegment(_0x245b70[0x0]);for(const _0x162a6f of _0x245b70){validatePathSegment(_0x162a6f);}return{'segments':_0x245b70,'isAbsolute':_0x1b0553,'raw':_0x4eb0b6};}function isRelativePathSegment(_0x2ad8ab){return _0x2ad8ab==='.'||_0x2ad8ab==='..';}function validatePathSegment(_0xad69bc){const _0x1d7786=a154_0x2e8b;if(_0xad69bc==='')throw new Error(_0x1d7786(0x15b));if(_0xad69bc==='.'||_0xad69bc==='..')return;if(/[\x00-\x1F\x7F]/[_0x1d7786(0x13f)](_0xad69bc))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0xad69bc);if(_0xad69bc!==_0xad69bc[_0x1d7786(0x15f)]()){}}export function validatePath(_0x4dacd6){const _0x45b655=a154_0x2e8b;if(_0x4dacd6[_0x45b655(0x13c)][_0x45b655(0x168)]===0x0&&!_0x4dacd6['isAbsolute'])throw new Error(_0x45b655(0x166));if(_0x4dacd6[_0x45b655(0x167)]){if(_0x4dacd6[_0x45b655(0x13c)][0x0]==='..')throw new Error(_0x45b655(0x153));let _0xc8238e=0x0;for(const _0x3902b5 of _0x4dacd6[_0x45b655(0x13c)]){if(_0x3902b5==='..'){if(_0xc8238e===0x0)throw new Error(_0x45b655(0x148));_0xc8238e--;}else _0x3902b5!=='.'&&_0xc8238e++;}}}export function joinPaths(_0xc2e092,_0x3d3077){const _0x58fd2d=a154_0x2e8b;if(!_0xc2e092||_0xc2e092==='/')return _0x3d3077;if(!_0x3d3077||_0x3d3077==='.')return _0xc2e092;if(_0x3d3077[_0x58fd2d(0x162)]('/'))return _0x3d3077;const _0x4db595=parsePath(_0xc2e092),_0x312b9d=parsePath(_0x3d3077),_0x538f53=[..._0x4db595['segments']];for(const _0x46bc45 of _0x312b9d['segments']){if(_0x46bc45==='.')continue;else{if(_0x46bc45==='..'){if(_0x538f53[_0x58fd2d(0x168)]===0x0)throw new Error(_0x58fd2d(0x142));_0x538f53[_0x58fd2d(0x155)]();}else _0x538f53['push'](_0x46bc45);}}const _0x4e8c67=_0x538f53[_0x58fd2d(0x163)]('/');return _0x4db595[_0x58fd2d(0x15e)][_0x58fd2d(0x162)]('/')?'/'+_0x4e8c67:_0x4e8c67;}export function normalizePath(_0x2a9a9a){const _0x159844=a154_0x2e8b,_0x5ecec8=parsePath(_0x2a9a9a),_0x21c715=[];for(const _0x1911ae of _0x5ecec8['segments']){if(_0x1911ae==='.')continue;else{if(_0x1911ae==='..'){if(_0x21c715[_0x159844(0x168)]===0x0){if(_0x5ecec8[_0x159844(0x167)])throw new Error(_0x159844(0x142));_0x21c715[_0x159844(0x157)]('..');}else _0x21c715[_0x21c715[_0x159844(0x168)]-0x1]==='..'?_0x21c715['push']('..'):_0x21c715[_0x159844(0x155)]();}else _0x21c715[_0x159844(0x157)](_0x1911ae);}}if(_0x21c715[_0x159844(0x168)]===0x0)return _0x5ecec8[_0x159844(0x167)]?'/':'.';const _0x186ed9=_0x21c715['join']('/');return _0x5ecec8['raw'][_0x159844(0x162)]('/')?'/'+_0x186ed9:_0x186ed9;}export function getParentPath(_0x9823f4){const _0x249174=a154_0x2e8b,_0x4984ed=parsePath(_0x9823f4);if(_0x4984ed[_0x249174(0x13c)][_0x249174(0x168)]<=0x1)return'/';const _0x105fde=_0x4984ed[_0x249174(0x13c)][_0x249174(0x165)](0x0,-0x1)[_0x249174(0x163)]('/');return _0x4984ed[_0x249174(0x15e)][_0x249174(0x162)]('/')?'/'+_0x105fde:_0x105fde;}function a154_0x2e8b(_0x57f973,_0x2703db){_0x57f973=_0x57f973-0x139;const _0x1cdf55=a154_0x1cdf();let _0x2e8be9=_0x1cdf55[_0x57f973];return _0x2e8be9;}export function getBaseName(_0x575b2b){const _0x7c17e3=a154_0x2e8b,_0x59cffe=parsePath(_0x575b2b);return _0x59cffe[_0x7c17e3(0x13c)][_0x59cffe[_0x7c17e3(0x13c)][_0x7c17e3(0x168)]-0x1]||'';}export function isChildPath(_0x232d71,_0x11adc4){const _0x4ba72d=a154_0x2e8b,_0x5f1f94=parsePath(_0x232d71),_0x11bb55=parsePath(_0x11adc4);if(_0x5f1f94[_0x4ba72d(0x13c)][_0x4ba72d(0x168)]<=_0x11bb55['segments'][_0x4ba72d(0x168)])return![];for(let _0x50dfa2=0x0;_0x50dfa2<_0x11bb55[_0x4ba72d(0x13c)][_0x4ba72d(0x168)];_0x50dfa2++){if(_0x5f1f94[_0x4ba72d(0x13c)][_0x50dfa2]!==_0x11bb55['segments'][_0x50dfa2])return![];}return!![];}export function splitPath(_0x362595){const _0x28ec7f=a154_0x2e8b,_0x4d7272=parsePath(_0x362595);if(_0x4d7272[_0x28ec7f(0x13c)]['length']===0x0)throw new Error(_0x28ec7f(0x154));if(_0x4d7272[_0x28ec7f(0x13c)]['length']===0x1)return{'parent':_0x4d7272[_0x28ec7f(0x13c)][0x0]};return{'parent':_0x4d7272[_0x28ec7f(0x13c)][0x0],'child':_0x4d7272[_0x28ec7f(0x13c)][_0x28ec7f(0x165)](0x1)[_0x28ec7f(0x163)]('/')};}export function isYamlFilePath(_0x59cc6a){const _0x24ac88=a154_0x2e8b;return _0x59cc6a[_0x24ac88(0x14e)](_0x24ac88(0x161))||_0x59cc6a[_0x24ac88(0x14e)]('.yaml');}export async function resolveYamlFilePath(_0x526281,_0x5081dd=nodeFileSystem){const _0x1b8b17=a154_0x2e8b,_0x503343=a154_0x496399[_0x1b8b17(0x14f)](_0x526281);if(!await _0x5081dd[_0x1b8b17(0x13d)](_0x503343))throw new Error(_0x1b8b17(0x14b)+_0x526281);let _0x4667d1=a154_0x496399[_0x1b8b17(0x140)](_0x503343),_0x5ac430=null,_0x53361b=null;const _0x3c7bac=a154_0x496399[_0x1b8b17(0x139)](_0x4667d1)['root'];while(_0x4667d1!==_0x3c7bac){const _0x3c5152=a154_0x496399['join'](_0x4667d1,_0x1b8b17(0x143));if(await _0x5081dd[_0x1b8b17(0x13d)](_0x3c5152)){_0x5ac430=_0x3c5152,_0x53361b=_0x4667d1;break;}_0x4667d1=a154_0x496399[_0x1b8b17(0x140)](_0x4667d1);}if(!_0x5ac430||!_0x53361b)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x526281+'\x0a'+'Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.');const _0x4ba132=await _0x5081dd[_0x1b8b17(0x141)](_0x5ac430),_0x15446e=JSON['parse'](_0x4ba132),_0x418cad=_0x15446e[_0x1b8b17(0x145)];if(!_0x418cad)throw new Error(_0x1b8b17(0x156));const _0x4afb78=await _0x5081dd[_0x1b8b17(0x141)](_0x503343),_0x5ecea7=a154_0xfe0204(_0x4afb78),_0x3508ba=_0x5ecea7['name'];if(!_0x3508ba)throw new Error(_0x1b8b17(0x149)+_0x526281);const _0x4697af=_0x5ecea7[_0x1b8b17(0x151)]===_0x1b8b17(0x14a)?_0x1b8b17(0x14a):_0x1b8b17(0x15c),_0x5882ab=a154_0x496399[_0x1b8b17(0x144)](_0x53361b,_0x503343),_0x3adba7=a154_0x496399[_0x1b8b17(0x140)](_0x5882ab),_0x53ee55=_0x3adba7==='.'?'':_0x3adba7[_0x1b8b17(0x160)](/\\/g,'/'),_0x1f699b=_0x53ee55?_0x418cad+'/'+_0x53ee55+'/'+_0x3508ba:_0x418cad+'/'+_0x3508ba;return{'parentSegment':_0x418cad,'segmentName':_0x3508ba,'folderPath':_0x53ee55,'fullPath':_0x1f699b,'resourceType':_0x4697af,'content':_0x4afb78};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ad66d,_0x6e538b){const _0xb218a=a155_0x3342,_0x54d07b=_0x2ad66d();while(!![]){try{const _0x23a90f=-parseInt(_0xb218a(0xd6))/0x1*(parseInt(_0xb218a(0xda))/0x2)+parseInt(_0xb218a(0xde))/0x3*(-parseInt(_0xb218a(0xd7))/0x4)+parseInt(_0xb218a(0xdc))/0x5+-parseInt(_0xb218a(0xe2))/0x6+-parseInt(_0xb218a(0xd5))/0x7*(-parseInt(_0xb218a(0xdd))/0x8)+parseInt(_0xb218a(0xdf))/0x9*(-parseInt(_0xb218a(0xe1))/0xa)+parseInt(_0xb218a(0xd4))/0xb*(parseInt(_0xb218a(0xe3))/0xc);if(_0x23a90f===_0x6e538b)break;else _0x54d07b['push'](_0x54d07b['shift']());}catch(_0x495348){_0x54d07b['push'](_0x54d07b['shift']());}}}(a155_0x1ab6,0x368d8));function a155_0x1ab6(){const _0x6bf479=['Invalid\x20segment\x20reference\x20format:\x20','11DHPFPZ','686ZrthHN','317887OaqDob','8524UBpGdO','substring','indexOf','2QKmDea','.\x20Parent\x20name\x20cannot\x20be\x20empty','705740PnaaEr','14080ersqfE','393FOZvfY','93861RVArRK','.\x20Child\x20name\x20cannot\x20be\x20empty','390OjraJd','118890nkHZph','11200968AxmekR'];a155_0x1ab6=function(){return _0x6bf479;};return a155_0x1ab6();}function a155_0x3342(_0x5c7c57,_0x35ed34){_0x5c7c57=_0x5c7c57-0xd3;const _0x1ab608=a155_0x1ab6();let _0x3342d5=_0x1ab608[_0x5c7c57];return _0x3342d5;}export function parseSegmentRef(_0x15f38c){const _0x465b71=a155_0x3342,_0x129712=_0x15f38c[_0x465b71(0xd9)]('/');if(_0x129712===-0x1)return{'parentId':_0x15f38c};if(_0x129712===0x0)throw new Error(_0x465b71(0xd3)+_0x15f38c+_0x465b71(0xdb));const _0x8570e4=_0x15f38c[_0x465b71(0xd8)](0x0,_0x129712),_0x4b6bc5=_0x15f38c['substring'](_0x129712+0x1);if(_0x4b6bc5==='')throw new Error(_0x465b71(0xd3)+_0x15f38c+_0x465b71(0xe0));return{'parentId':_0x8570e4,'childId':_0x4b6bc5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a156_0x4e49(_0x1efe7b,_0xd6baff){_0x1efe7b=_0x1efe7b-0x81;const _0x361ed3=a156_0x361e();let _0x4e494d=_0x361ed3[_0x1efe7b];return _0x4e494d;}(function(_0x18b978,_0x5429a8){const _0x3c4c5f=a156_0x4e49,_0x1a079d=_0x18b978();while(!![]){try{const _0x41b9c2=parseInt(_0x3c4c5f(0xaf))/0x1+parseInt(_0x3c4c5f(0xa5))/0x2+parseInt(_0x3c4c5f(0xb4))/0x3*(parseInt(_0x3c4c5f(0x8c))/0x4)+-parseInt(_0x3c4c5f(0x83))/0x5+parseInt(_0x3c4c5f(0x93))/0x6*(parseInt(_0x3c4c5f(0x98))/0x7)+-parseInt(_0x3c4c5f(0x94))/0x8*(-parseInt(_0x3c4c5f(0x99))/0x9)+-parseInt(_0x3c4c5f(0x84))/0xa;if(_0x41b9c2===_0x5429a8)break;else _0x1a079d['push'](_0x1a079d['shift']());}catch(_0xe5e9dc){_0x1a079d['push'](_0x1a079d['shift']());}}}(a156_0x361e,0x6908e));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x33fea7,_0x171941={},_0x3f4329={}){const _0x186fe7=a156_0x4e49;if(_0x3f4329[_0x186fe7(0xb2)])return runSemanticChecks(_0x33fea7,_0x171941);const _0x4ef0f4=SegmentDefSchema[_0x186fe7(0x96)](_0x33fea7);if(_0x4ef0f4[_0x186fe7(0x89)])return runSemanticChecks(_0x4ef0f4['data'],_0x171941);return zodErrorsToValidationResult(_0x4ef0f4[_0x186fe7(0xc1)],_0x171941);}export function validateRuleDef(_0x1bd765,_0x4a6651,_0x33ffec){const _0x4945c8=a156_0x4e49;if(!_0x1bd765)return[];const _0x1e98d6=RuleDefSchema[_0x4945c8(0x96)](_0x1bd765);if(_0x1e98d6[_0x4945c8(0x89)])return checkRule(_0x1e98d6['data'],_0x4a6651,_0x33ffec);const _0x34ba1a=flattenZodIssues(_0x1e98d6[_0x4945c8(0xc1)][_0x4945c8(0x88)]);return _0x34ba1a['map'](_0x1d783f=>{const _0x31349e=_0x4945c8,_0xab01ea=formatZodPath(_0x1d783f[_0x31349e(0x9c)]),_0x5433ca=_0xab01ea?_0x4a6651+'.'+_0xab01ea:_0x4a6651,_0x34ca75=mapZodIssueToCode(_0x1d783f,_0xab01ea),_0x5eca7a=getLocationFromPath(_0x33ffec[_0x31349e(0xbc)],_0x33ffec[_0x31349e(0xa7)],pathToArray(_0x5433ca));return{'level':_0x31349e(0xc1),'path':_0x5433ca,'code':_0x34ca75,'message':_0x1d783f['message'],..._0x5eca7a&&{'location':_0x5eca7a}};});}function zodErrorsToValidationResult(_0x1091ef,_0x151351){const _0x4f81c1=a156_0x4e49,_0x1e2000=flattenZodIssues(_0x1091ef['issues']),_0xa1aa70=_0x1e2000[_0x4f81c1(0x9a)](_0x2a58a5=>{const _0x46b75a=_0x4f81c1,_0xdb8d4f=formatZodPath(_0x2a58a5[_0x46b75a(0x9c)]),_0x2437e6=mapZodIssueToCode(_0x2a58a5,_0xdb8d4f),_0x2584b6=getLocationFromPath(_0x151351[_0x46b75a(0xbc)],_0x151351[_0x46b75a(0xa7)],_0x2a58a5[_0x46b75a(0x9c)][_0x46b75a(0x9a)](_0x3556a1=>typeof _0x3556a1===_0x46b75a(0xbf)?String(_0x3556a1):_0x3556a1));return{'level':_0x46b75a(0xc1),'path':_0xdb8d4f,'code':_0x2437e6,'message':_0x2a58a5[_0x46b75a(0x8e)],..._0x2584b6&&{'location':_0x2584b6}};});return{'valid':![],'errors':_0xa1aa70,'warnings':[]};}function mapZodIssueToCode(_0x32c572,_0x121660){const _0x40995e=a156_0x4e49,_0x5c6f8c=_0x32c572[_0x40995e(0x8b)]===_0x40995e(0x9e)?_0x32c572[_0x40995e(0xa3)]:undefined;if(_0x121660===_0x40995e(0x9f))return'MISSING_NAME';if(_0x121660==='rule.type'||_0x121660['endsWith'](_0x40995e(0xb7))){if(_0x32c572['code']===_0x40995e(0xbe)){if(_0x121660===_0x40995e(0xa6)||_0x121660['match'](/\.conditions\[\d+\]\.type$/))return _0x40995e(0xa8);}}if(_0x121660[_0x40995e(0xc4)]('.operator.type'))return'INVALID_OPERATOR_TYPE';if(_0x121660[_0x40995e(0xc4)](_0x40995e(0x86)))return _0x40995e(0xa2);if(_0x5c6f8c?.[_0x40995e(0x81)]===_0x40995e(0xbd))return _0x40995e(0xbd);if(_0x5c6f8c?.[_0x40995e(0x81)]===_0x40995e(0x8d))return _0x40995e(0x8d);if(_0x121660[_0x40995e(0xc4)](_0x40995e(0xc0))||_0x121660===_0x40995e(0xb8))return'MISSING_CONDITIONS';if(_0x121660[_0x40995e(0xa9)](_0x40995e(0xb6)))return _0x40995e(0x85);if(_0x121660[_0x40995e(0xc4)]('.segment'))return'MISSING_SEGMENT_REFERENCE';return _0x40995e(0xa1);}function runSemanticChecks(_0x49914b,_0x2f221b){const _0x3f7cab=a156_0x4e49,_0x2d27fc=[];_0x49914b[_0x3f7cab(0x9d)]&&_0x2d27fc[_0x3f7cab(0x87)](...checkRule(_0x49914b['rule'],_0x3f7cab(0x9d),_0x2f221b));const _0x32c632=_0x2d27fc[_0x3f7cab(0xa4)](_0x5eb9b0=>_0x5eb9b0[_0x3f7cab(0xac)]===_0x3f7cab(0xc1)),_0x330a1a=_0x2d27fc[_0x3f7cab(0xa4)](_0x3dd207=>_0x3dd207[_0x3f7cab(0xac)]===_0x3f7cab(0xaa));return{'valid':_0x32c632[_0x3f7cab(0xb3)]===0x0,'errors':_0x32c632,'warnings':_0x330a1a};}function checkRule(_0x56ffe3,_0x4487d0,_0x1ab3fd){const _0x24acd0=a156_0x4e49,_0x11633d=[];if(_0x56ffe3[_0x24acd0(0xb8)][_0x24acd0(0xb3)]===0x0)return _0x11633d[_0x24acd0(0x87)]({'level':_0x24acd0(0xc1),'path':_0x4487d0+_0x24acd0(0xc0),'code':_0x24acd0(0x92),'message':_0x24acd0(0xc5),'location':getLocationFromPath(_0x1ab3fd['document'],_0x1ab3fd['source'],pathToArray(_0x4487d0+'.conditions'))}),_0x11633d;return _0x11633d[_0x24acd0(0x87)](...checkConditions(_0x56ffe3[_0x24acd0(0xb8)],_0x4487d0,_0x1ab3fd)),_0x11633d;}function a156_0x361e(){const _0x22ce78=['Attribute\x20\x27','\x27\x20with\x20attribute\x20\x27','And','EMPTY_CONDITIONS','1646826LpVnbX','1001760NTDKrx','Behavior\x20source\x20\x27','safeParse','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','14JFkszj','18Zymjcp','map','type','path','rule','custom','name','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','SEGMENT_SCHEMA_ERROR','MISSING_OPERATOR_VALUE','params','filter','1171830lvQLIa','rule.type','source','INVALID_RULE_TYPE','includes','warning','.filter','level','BEHAVIOR_SOURCE_MISSING_FILTER','.conditions[','305517QSdDwK','attribute','NESTED_CONDITION_GROUP','skipSchema','length','42879XWHgtq','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','arrayMatching','.type','conditions','aggregation','.source','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','document','MISSING_BETWEEN_BOUNDS','invalid_value','symbol','.conditions','error','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','endsWith','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','Attribute\x20name\x20cannot\x20be\x20empty','validationCode','.attribute','2566810aowmFC','9187460fyhKCl','INVALID_ARRAY_MATCHING','.operator.value','push','issues','success','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','code','48UmVJzS','MISSING_TIME_UNIT','message'];a156_0x361e=function(){return _0x22ce78;};return a156_0x361e();}function checkConditions(_0xe3d541,_0x46bbb0,_0x2721d6){const _0x113c2e=a156_0x4e49,_0x58f71f=[];for(let _0x4df05a=0x0;_0x4df05a<_0xe3d541[_0x113c2e(0xb3)];_0x4df05a++){const _0x447f6c=_0xe3d541[_0x4df05a],_0x2f5cf5=_0x46bbb0+_0x113c2e(0xae)+_0x4df05a+']';_0x58f71f[_0x113c2e(0x87)](...checkCondition(_0x447f6c,_0x2f5cf5,_0x2721d6));}return _0x58f71f;}function checkCondition(_0x57ab69,_0x3234c6,_0x1ce08f){const _0xe16445=a156_0x4e49,_0x28a72b=[];if(_0x57ab69[_0xe16445(0x9b)]===_0xe16445(0x91)||_0x57ab69[_0xe16445(0x9b)]==='Or')return _0x57ab69[_0xe16445(0xb8)][_0xe16445(0xb3)]===0x0?_0x28a72b[_0xe16445(0x87)]({'level':_0xe16445(0xc1),'path':_0x3234c6+_0xe16445(0xc0),'code':_0xe16445(0x92),'message':_0x57ab69[_0xe16445(0x9b)]+_0xe16445(0x97),'location':getLocationFromPath(_0x1ce08f[_0xe16445(0xbc)],_0x1ce08f['source'],pathToArray(_0x3234c6+'.conditions'))}):(_0x28a72b['push']({'level':'warning','path':_0x3234c6,'code':_0xe16445(0xb1),'message':_0x57ab69['type']+_0xe16445(0xc3)+_0xe16445(0xc2)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x1ce08f['document'],_0x1ce08f[_0xe16445(0xa7)],pathToArray(_0x3234c6))}),_0x28a72b['push'](...checkConditions(_0x57ab69[_0xe16445(0xb8)],_0x3234c6,_0x1ce08f))),_0x28a72b;if(_0x57ab69[_0xe16445(0x9b)]==='Value'||_0x57ab69[_0xe16445(0x9b)]==='Behavior'){const _0x4c7c3f=_0x57ab69,_0x5dda58=_0x4c7c3f[_0xe16445(0xa7)],_0x2c9df7=_0x4c7c3f[_0xe16445(0xb9)],_0x320b5b=_0x5dda58||_0x2c9df7;(!_0x4c7c3f['attribute']||_0x4c7c3f[_0xe16445(0xb0)]==='')&&(!_0x320b5b&&_0x28a72b['push']({'level':_0xe16445(0xc1),'path':_0x3234c6+_0xe16445(0x82),'code':'EMPTY_ATTRIBUTE','message':_0xe16445(0xc6),'location':getLocationFromPath(_0x1ce08f['document'],_0x1ce08f[_0xe16445(0xa7)],pathToArray(_0x3234c6+_0xe16445(0x82)))}));_0x4c7c3f[_0xe16445(0xa4)]&&_0x28a72b[_0xe16445(0x87)](...checkRule(_0x4c7c3f['filter'],_0x3234c6+_0xe16445(0xab),_0x1ce08f));if(_0x4c7c3f[_0xe16445(0xa7)]){const _0x514287=_0x4c7c3f[_0xe16445(0xb0)]&&_0x4c7c3f[_0xe16445(0xb0)]!=='';_0x514287&&!_0x4c7c3f['filter']&&_0x28a72b[_0xe16445(0x87)]({'level':_0xe16445(0xc1),'path':_0x3234c6+_0xe16445(0xba),'code':_0xe16445(0xad),'message':_0xe16445(0x95)+_0x4c7c3f[_0xe16445(0xa7)]+_0xe16445(0x90)+_0x4c7c3f[_0xe16445(0xb0)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0xe16445(0xb5)+_0xe16445(0x8a),'location':getLocationFromPath(_0x1ce08f['document'],_0x1ce08f[_0xe16445(0xa7)],pathToArray(_0x3234c6+_0xe16445(0xba)))}),_0x514287&&_0x4c7c3f[_0xe16445(0xa4)]&&_0x28a72b['push']({'level':_0xe16445(0xaa),'path':_0x3234c6+_0xe16445(0x82),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0xe16445(0x8f)+_0x4c7c3f[_0xe16445(0xb0)]+_0xe16445(0xbb)+_0xe16445(0xa0),'location':getLocationFromPath(_0x1ce08f[_0xe16445(0xbc)],_0x1ce08f[_0xe16445(0xa7)],pathToArray(_0x3234c6+_0xe16445(0x82)))});}}return _0x28a72b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55f932,_0x539e19){const _0x3643d7=a157_0x16e7,_0x1d66fd=_0x55f932();while(!![]){try{const _0x29f8d0=-parseInt(_0x3643d7(0x126))/0x1*(parseInt(_0x3643d7(0x112))/0x2)+-parseInt(_0x3643d7(0x113))/0x3+parseInt(_0x3643d7(0x12b))/0x4*(parseInt(_0x3643d7(0x125))/0x5)+parseInt(_0x3643d7(0x118))/0x6+-parseInt(_0x3643d7(0x134))/0x7+-parseInt(_0x3643d7(0x128))/0x8+parseInt(_0x3643d7(0x136))/0x9;if(_0x29f8d0===_0x539e19)break;else _0x1d66fd['push'](_0x1d66fd['shift']());}catch(_0x8faf88){_0x1d66fd['push'](_0x1d66fd['shift']());}}}(a157_0x215d,0x33733));import a157_0x31320a 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(_0x4c9c61){const _0x9fdc60=a157_0x16e7;return _0x4c9c61[_0x9fdc60(0x13c)]!=='error';}function a157_0x16e7(_0x5a0d3c,_0xa76ccd){_0x5a0d3c=_0x5a0d3c-0x111;const _0x215dcb=a157_0x215d();let _0x16e702=_0x215dcb[_0x5a0d3c];return _0x16e702;}export function isScopedResolution(_0x560dd3){const _0x387d88=a157_0x16e7;return _0x560dd3[_0x387d88(0x13c)]==='directory'||_0x560dd3[_0x387d88(0x13c)]===_0x387d88(0x12c)||_0x560dd3[_0x387d88(0x13c)]==='context';}function a157_0x215d(){const _0x27fcda=['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','isScoped','35IvqDvs','43118VkdVAO','isDirectory','812416XSxAyW','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','error','102996iocLUQ','file','dirname','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','segmentName','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','tdx.json','no_config','invalid_yaml','1003856xzLRWG','relative','5089509Rsnsvg','segment','exists','scopedFolderPath','parent_name','join','type','parent_segment','message','readFile','cwd','journey','configDir','trim','File\x20not\x20found','resolve','No\x20tdx.json\x20found\x20for\x20file:\x20','18AlWcgn','737955LQmqRU','includes','parentSegment','directory','extname','2064012ggRfDg','resourceType','context','no_parent','File\x20not\x20found:\x20','match','Parent\x20segment\x20not\x20specified','startsWith','replace','stat','folderPath'];a157_0x215d=function(){return _0x27fcda;};return a157_0x215d();}export function getScopedDetails(_0x8c2fe4){if(isScopedResolution(_0x8c2fe4))return{'isScoped':_0x8c2fe4['isScoped'],'scopedFolderPath':_0x8c2fe4['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x406fc6,_0x98879d){const _0x592ee6=a157_0x16e7;let _0x4eeab4=a157_0x31320a['resolve'](_0x406fc6);const _0x57b094=a157_0x31320a['parse'](_0x4eeab4)['root'];while(_0x4eeab4!==_0x57b094){const _0x3683c1=a157_0x31320a[_0x592ee6(0x13b)](_0x4eeab4,_0x592ee6(0x131));if(await _0x98879d['exists'](_0x3683c1))try{const _0x4f24a3=await _0x98879d[_0x592ee6(0x13f)](_0x3683c1),_0x437927=JSON['parse'](_0x4f24a3);if(_0x437927[_0x592ee6(0x13d)]&&typeof _0x437927['parent_segment']==='string')return{'configPath':_0x3683c1,'configDir':_0x4eeab4,'parentSegment':_0x437927[_0x592ee6(0x13d)]};}catch{}_0x4eeab4=a157_0x31320a[_0x592ee6(0x12d)](_0x4eeab4);}return null;}function calculateScopedPath(_0x522ead,_0x1f96d3){const _0x4dd3c1=a157_0x16e7,_0x37109e=a157_0x31320a[_0x4dd3c1(0x135)](_0x1f96d3,_0x522ead),_0x3fcf06=_0x37109e!==''&&_0x37109e!=='.'&&!_0x37109e[_0x4dd3c1(0x11f)]('..');return{'isScoped':_0x3fcf06,'scopedFolderPath':_0x3fcf06?_0x37109e[_0x4dd3c1(0x120)](/\\/g,'/'):''};}export async function resolveTarget(_0x39d34e){const _0x826fb9=a157_0x16e7,{arg:_0x18ee5b,contextParent:_0x214f86,cwd:cwd=process[_0x826fb9(0x140)](),fs:fs=nodeFileSystem}=_0x39d34e;if(_0x18ee5b&&isYamlFilePath(_0x18ee5b))try{const _0x1ef3db=await resolveYamlFilePath(_0x18ee5b,fs),_0x214bfe=a157_0x31320a[_0x826fb9(0x145)](_0x18ee5b),_0x28e761=a157_0x31320a[_0x826fb9(0x12d)](_0x214bfe),_0x5aec17=await findTdxConfigAsync(_0x28e761,fs);if(!_0x5aec17){if(_0x214f86){const _0x460926=a157_0x31320a[_0x826fb9(0x12d)](_0x214bfe);return{'type':_0x826fb9(0x12c),'parentName':_0x214f86,'targetDir':_0x460926,'configRoot':_0x460926,'filePath':_0x214bfe,'resourceName':_0x1ef3db[_0x826fb9(0x12f)],'folderPath':_0x1ef3db['folderPath'],'resourceType':_0x1ef3db[_0x826fb9(0x119)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x826fb9(0x12a),'errorCode':_0x826fb9(0x132),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x18ee5b,'arg':_0x18ee5b,'helpText':_0x826fb9(0x129)};}const _0x3a2fa6=calculateScopedPath(_0x28e761,_0x5aec17[_0x826fb9(0x142)]);return{'type':_0x826fb9(0x12c),'parentName':_0x5aec17['parentSegment'],'targetDir':_0x5aec17[_0x826fb9(0x142)],'configRoot':_0x5aec17[_0x826fb9(0x142)],'filePath':_0x214bfe,'resourceName':_0x1ef3db[_0x826fb9(0x12f)],'folderPath':_0x1ef3db[_0x826fb9(0x122)],'resourceType':_0x1ef3db[_0x826fb9(0x119)],'isScoped':_0x3a2fa6[_0x826fb9(0x124)],'scopedFolderPath':_0x3a2fa6[_0x826fb9(0x139)]};}catch(_0x57b785){const _0x4124a3=_0x57b785 instanceof Error?_0x57b785[_0x826fb9(0x13e)]:String(_0x57b785);if(_0x4124a3[_0x826fb9(0x114)](_0x826fb9(0x144)))return{'type':_0x826fb9(0x12a),'errorCode':'file_not_found','message':_0x826fb9(0x11c)+_0x18ee5b,'arg':_0x18ee5b};if(_0x4124a3['includes']('No\x20tdx.json\x20found')){if(_0x214f86){const _0x50ea2f=a157_0x31320a[_0x826fb9(0x145)](_0x18ee5b);if(await fs[_0x826fb9(0x138)](_0x50ea2f)){const _0x34969e=a157_0x31320a[_0x826fb9(0x12d)](_0x50ea2f),_0x4c80e9=await fs[_0x826fb9(0x13f)](_0x50ea2f),_0x47b60a=_0x4c80e9['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x37d4d2=_0x4c80e9[_0x826fb9(0x11d)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x1109ae=_0x47b60a?_0x47b60a[0x1]['trim']():a157_0x31320a['basename'](_0x18ee5b,a157_0x31320a[_0x826fb9(0x117)](_0x18ee5b)),_0x184b8b=_0x37d4d2&&_0x37d4d2[0x1][_0x826fb9(0x143)]()===_0x826fb9(0x141)?_0x826fb9(0x141):_0x826fb9(0x137);return{'type':_0x826fb9(0x12c),'parentName':_0x214f86,'targetDir':_0x34969e,'configRoot':_0x34969e,'filePath':_0x50ea2f,'resourceName':_0x1109ae,'folderPath':'','resourceType':_0x184b8b,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x826fb9(0x12a),'errorCode':'no_config','message':_0x826fb9(0x111)+_0x18ee5b,'arg':_0x18ee5b,'helpText':_0x826fb9(0x129)};}return{'type':_0x826fb9(0x12a),'errorCode':'invalid_yaml','message':_0x4124a3,'arg':_0x18ee5b};}if(_0x18ee5b){const _0x28c645=a157_0x31320a[_0x826fb9(0x145)](cwd,_0x18ee5b);let _0x435130=null;try{_0x435130=await fs[_0x826fb9(0x121)](_0x28c645);}catch{}if(_0x435130?.[_0x826fb9(0x127)]()){const _0x380683=await findTdxConfigAsync(_0x28c645,fs);if(_0x380683){const _0x478fbb=calculateScopedPath(_0x28c645,_0x380683[_0x826fb9(0x142)]);return{'type':_0x826fb9(0x116),'parentName':_0x380683['parentSegment'],'targetDir':_0x28c645,'configRoot':_0x380683[_0x826fb9(0x142)],'isScoped':_0x478fbb['isScoped'],'scopedFolderPath':_0x478fbb[_0x826fb9(0x139)]};}if(_0x214f86)return{'type':'directory','parentName':_0x214f86,'targetDir':_0x28c645,'configRoot':_0x28c645,'isScoped':![],'scopedFolderPath':''};return{'type':_0x826fb9(0x12a),'errorCode':'no_config','message':_0x826fb9(0x12e)+_0x18ee5b,'arg':_0x18ee5b,'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(_0x435130?.['isFile']())return{'type':_0x826fb9(0x12a),'errorCode':_0x826fb9(0x133),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x18ee5b,'arg':_0x18ee5b,'helpText':_0x826fb9(0x130)};const _0x3598bc=sanitizeFileName(_0x18ee5b),_0x1a54d4=getSegmentRootDir(_0x3598bc,cwd);return{'type':_0x826fb9(0x13a),'parentName':_0x18ee5b,'targetDir':_0x1a54d4,'configRoot':_0x1a54d4};}const _0x3f881e=await findTdxConfigAsync(cwd,fs);if(_0x3f881e){const _0x90dffe=calculateScopedPath(cwd,_0x3f881e[_0x826fb9(0x142)]);return{'type':_0x826fb9(0x11a),'parentName':_0x3f881e[_0x826fb9(0x115)],'targetDir':cwd,'configRoot':_0x3f881e[_0x826fb9(0x142)],'isScoped':_0x90dffe[_0x826fb9(0x124)],'scopedFolderPath':_0x90dffe[_0x826fb9(0x139)]};}if(_0x214f86){const _0x333ede=sanitizeFileName(_0x214f86),_0x317e82=getSegmentRootDir(_0x333ede,cwd);return{'type':'context','parentName':_0x214f86,'targetDir':_0x317e82,'configRoot':_0x317e82,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x826fb9(0x11b),'message':_0x826fb9(0x11e),'helpText':_0x826fb9(0x123)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x39f99f=a158_0x488b;function a158_0xcf98(){const _0x3a30dd=['replace','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','startsWith','4311YXFWXg','dirname','stringify','utf-8','197340HpQBuE','1684668NjqZRL','Invalid\x20JSON\x20in\x20','resolve','string','object','60rPlPLU','33170fQzeyy','500268TptNyI','cwd','445563saEjBX','root','605UDrXwF','80HekjWD','relative','segments','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','159425hMoOJO','engage_workspace','25wVsKcc','tdx.json','parent_segment','join','parse'];a158_0xcf98=function(){return _0x3a30dd;};return a158_0xcf98();}(function(_0x445e78,_0x37d6d1){const _0x15602a=a158_0x488b,_0x2af596=_0x445e78();while(!![]){try{const _0x4810dc=-parseInt(_0x15602a(0x72))/0x1*(parseInt(_0x15602a(0x7c))/0x2)+parseInt(_0x15602a(0x7e))/0x3+parseInt(_0x15602a(0x76))/0x4*(-parseInt(_0x15602a(0x6a))/0x5)+parseInt(_0x15602a(0x77))/0x6+-parseInt(_0x15602a(0x68))/0x7*(-parseInt(_0x15602a(0x64))/0x8)+parseInt(_0x15602a(0x80))/0x9+-parseInt(_0x15602a(0x7d))/0xa*(parseInt(_0x15602a(0x82))/0xb);if(_0x4810dc===_0x37d6d1)break;else _0x2af596['push'](_0x2af596['shift']());}catch(_0x48867d){_0x2af596['push'](_0x2af596['shift']());}}}(a158_0xcf98,0x289cf));import{existsSync,readFileSync}from'fs';import a158_0x5b4b68 from'path';const TDX_CONFIG_FILE=a158_0x39f99f(0x6b),SEGMENTS_DIR=a158_0x39f99f(0x66);export function findTdxConfigPath(_0x45f8cb=process[a158_0x39f99f(0x7f)]()){const _0x5caf71=a158_0x39f99f;let _0x57ef00=a158_0x5b4b68[_0x5caf71(0x79)](_0x45f8cb);const _0x5246fe=a158_0x5b4b68[_0x5caf71(0x6e)](_0x57ef00)[_0x5caf71(0x81)];while(_0x57ef00!==_0x5246fe){const _0x54eec8=a158_0x5b4b68[_0x5caf71(0x6d)](_0x57ef00,TDX_CONFIG_FILE);if(existsSync(_0x54eec8))return _0x54eec8;_0x57ef00=a158_0x5b4b68[_0x5caf71(0x73)](_0x57ef00);}return null;}export function loadTdxConfig(_0x252020){const _0x3da517=a158_0x39f99f,_0x56cd1f=readFileSync(_0x252020,_0x3da517(0x75));let _0x10d0ac;try{_0x10d0ac=JSON[_0x3da517(0x6e)](_0x56cd1f);}catch{throw new Error(_0x3da517(0x78)+_0x252020);}if(!_0x10d0ac||typeof _0x10d0ac!==_0x3da517(0x7b))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x20e407=_0x10d0ac,_0x38c796=_0x20e407[_0x3da517(0x6c)]&&typeof _0x20e407['parent_segment']===_0x3da517(0x7a),_0x5d0c29=_0x20e407[_0x3da517(0x69)]&&typeof _0x20e407[_0x3da517(0x69)]===_0x3da517(0x7a);if(!_0x38c796&&!_0x5d0c29)throw new Error(_0x3da517(0x67));const _0x2f7792={};return _0x38c796&&(_0x2f7792[_0x3da517(0x6c)]=_0x20e407['parent_segment']),_0x5d0c29&&(_0x2f7792['engage_workspace']=_0x20e407[_0x3da517(0x69)]),_0x2f7792;}export function findTdxConfig(_0x2abbbe=process[a158_0x39f99f(0x7f)]()){const _0x1c8a7b=a158_0x39f99f,_0x5c581b=findTdxConfigPath(_0x2abbbe);if(!_0x5c581b)throw new Error(_0x1c8a7b(0x70));const _0x44d882=loadTdxConfig(_0x5c581b),_0x40e6eb=a158_0x5b4b68[_0x1c8a7b(0x73)](_0x5c581b);return{'config':_0x44d882,'configPath':_0x5c581b,'configDir':_0x40e6eb};}export function tryFindTdxConfig(_0x59a141){try{return findTdxConfig(_0x59a141);}catch{return null;}}export function getSegmentRootDir(_0x5ad0ab,_0x3656c7=process[a158_0x39f99f(0x7f)]()){const _0x44ba9c=a158_0x39f99f;return a158_0x5b4b68[_0x44ba9c(0x6d)](_0x3656c7,SEGMENTS_DIR,_0x5ad0ab);}export function getTdxConfigPath(_0x5655bb,_0x477bdf=process['cwd']()){const _0x39cc9a=a158_0x39f99f;return a158_0x5b4b68[_0x39cc9a(0x6d)](getSegmentRootDir(_0x5655bb,_0x477bdf),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5a6131,_0xb2675e){const _0x2820c1=a158_0x39f99f,_0x56b636=a158_0x5b4b68[_0x2820c1(0x79)](_0x5a6131),_0x4f4275=a158_0x5b4b68[_0x2820c1(0x65)](_0xb2675e,_0x56b636);if(_0x4f4275[_0x2820c1(0x71)]('..'))return'';return _0x4f4275;}export function localPathToTdFolderPath(_0x5b66e7){const _0x1329b6=a158_0x39f99f,_0x4feea4=a158_0x5b4b68['dirname'](_0x5b66e7);if(_0x4feea4==='.'||_0x4feea4==='')return'';return _0x4feea4[_0x1329b6(0x6f)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x100c7c,_0x33bd20){const _0x4301eb=a158_0x39f99f;if(!_0x100c7c)return _0x33bd20;return a158_0x5b4b68[_0x4301eb(0x6d)](_0x33bd20,_0x100c7c);}export function createTdxConfigContent(_0x419630){const _0x1d0d8c={'parent_segment':_0x419630};return JSON['stringify'](_0x1d0d8c,null,0x2)+'\x0a';}function a158_0x488b(_0x4b5f93,_0x42dc7c){_0x4b5f93=_0x4b5f93-0x64;const _0xcf98cd=a158_0xcf98();let _0x488bf2=_0xcf98cd[_0x4b5f93];return _0x488bf2;}export function createEngageTdxConfigContent(_0xda8fbf){const _0x8130bc=a158_0x39f99f,_0x42ded1={'engage_workspace':_0xda8fbf};return JSON[_0x8130bc(0x74)](_0x42ded1,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a159_0x3a7056=a159_0x7e56;(function(_0x35afbc,_0x3d02bc){const _0x83594b=a159_0x7e56,_0x4f89fb=_0x35afbc();while(!![]){try{const _0x28b067=-parseInt(_0x83594b(0x1dd))/0x1+-parseInt(_0x83594b(0x1f3))/0x2*(-parseInt(_0x83594b(0x206))/0x3)+parseInt(_0x83594b(0x1e9))/0x4+-parseInt(_0x83594b(0x1ed))/0x5*(-parseInt(_0x83594b(0x1f6))/0x6)+parseInt(_0x83594b(0x1ea))/0x7*(parseInt(_0x83594b(0x203))/0x8)+parseInt(_0x83594b(0x1e3))/0x9*(parseInt(_0x83594b(0x1f0))/0xa)+-parseInt(_0x83594b(0x1ff))/0xb*(parseInt(_0x83594b(0x1f2))/0xc);if(_0x28b067===_0x3d02bc)break;else _0x4f89fb['push'](_0x4f89fb['shift']());}catch(_0x5c82a6){_0x4f89fb['push'](_0x4f89fb['shift']());}}}(a159_0x485f,0x3896a));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x1f8),a159_0x3a7056(0x1fb),a159_0x3a7056(0x1fc),a159_0x3a7056(0x202),a159_0x3a7056(0x1e4),a159_0x3a7056(0x1e8),a159_0x3a7056(0x1de)]);export const RepeatUnitSchema=z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x1fe),'hour',a159_0x3a7056(0x1f5),'week',a159_0x3a7056(0x207),a159_0x3a7056(0x1e6),a159_0x3a7056(0x1f8)]);export const ScheduleDefSchema=z[a159_0x3a7056(0x1ec)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a159_0x3a7056(0x1fd)](),'repeat_frequency':z[a159_0x3a7056(0x1f9)]()[a159_0x3a7056(0x1fd)](),'repeat_sub_frequency':z[a159_0x3a7056(0x1e2)](z['number']())[a159_0x3a7056(0x1fd)](),'start_at':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1f7)]()[a159_0x3a7056(0x1fd)](),'end_on':z['string']()[a159_0x3a7056(0x1f7)]()[a159_0x3a7056(0x1fd)](),'timezone':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1fd)]()});export const NotificationDefSchema=z[a159_0x3a7056(0x1ec)]({'notify_on':z[a159_0x3a7056(0x1e2)](z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x1e0),a159_0x3a7056(0x1df)]))[a159_0x3a7056(0x1fd)](),'email_recipients':z[a159_0x3a7056(0x1e2)](z[a159_0x3a7056(0x1e1)]())[a159_0x3a7056(0x1fd)]()});export const ActivationColumnDefSchema=z['union']([z['string'](),z[a159_0x3a7056(0x1ec)]({'name':z[a159_0x3a7056(0x1e1)](),'type':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1fd)](),'visibility':z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x1fa),a159_0x3a7056(0x1e5)])[a159_0x3a7056(0x1fd)]()})]);function a159_0x7e56(_0x596d24,_0xedab8c){_0x596d24=_0x596d24-0x1dd;const _0x485ff5=a159_0x485f();let _0x7e5657=_0x485ff5[_0x596d24];return _0x7e5657;}export const ActivationBehaviorDefSchema=z[a159_0x3a7056(0x1ec)]({'columns':z[a159_0x3a7056(0x1e2)](z[a159_0x3a7056(0x1ec)]({'name':z[a159_0x3a7056(0x1e1)](),'type':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1fd)](),'visibility':z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x1fa),a159_0x3a7056(0x1e5)])[a159_0x3a7056(0x1fd)]()}))[a159_0x3a7056(0x1fd)](),'behavior_table':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1fd)](),'join_row':z[a159_0x3a7056(0x1f9)]()[a159_0x3a7056(0x1f7)]()[a159_0x3a7056(0x1fd)](),'join_strategy':z['enum'](['All',a159_0x3a7056(0x1ef),a159_0x3a7056(0x204),a159_0x3a7056(0x1f1)])['optional'](),'formatting':z[a159_0x3a7056(0x1f4)]([a159_0x3a7056(0x201),'cols'])[a159_0x3a7056(0x1fd)](),'order_by':z[a159_0x3a7056(0x1e2)](z[a159_0x3a7056(0x1ec)]({'key':z[a159_0x3a7056(0x1e1)](),'order':z['enum']([a159_0x3a7056(0x200),'desc'])}))[a159_0x3a7056(0x1fd)]()});function a159_0x485f(){const _0x1f8611=['2438682EFkahZ','nullable','none','number','clear','hourly','daily','optional','minute','1905838EzDIOm','asc','rows','weekly','136216ZOHMWJ','Last','record','6yMhpGG','month','207110KDscvd','minutes_interval','onFailure','onSuccess','string','array','5715TEXZec','monthly','masked','once','boolean','cron','1037096fYWRkp','77sYgPex','Activation\x20name\x20is\x20required','object','5aniijY','min','First','380HRKlcH','Top-N','48ZxGSuX','254780jwwCvl','enum','day'];a159_0x485f=function(){return _0x1f8611;};return a159_0x485f();}export const ActivationDefSchema=z[a159_0x3a7056(0x1ec)]({'name':z[a159_0x3a7056(0x1e1)]()[a159_0x3a7056(0x1ee)](0x1,a159_0x3a7056(0x1eb)),'description':z['string']()[a159_0x3a7056(0x1fd)](),'connection':z[a159_0x3a7056(0x1e1)]()['min'](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a159_0x3a7056(0x1fd)](),'columns':z[a159_0x3a7056(0x1e2)](ActivationColumnDefSchema)[a159_0x3a7056(0x1fd)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x3a7056(0x1fd)](),'connector_config':z[a159_0x3a7056(0x205)](z[a159_0x3a7056(0x1e1)](),z['unknown']())[a159_0x3a7056(0x1fd)](),'activation_template_id':z[a159_0x3a7056(0x1e1)]()['nullable']()[a159_0x3a7056(0x1fd)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a159_0x3a7056(0x1fd)](),'run_after_journey_refresh':z[a159_0x3a7056(0x1e7)]()['optional'](),'nested_workflow_project_name':z['string']()['optional'](),'nested_workflow_name':z['string']()['optional'](),'lock_enabled':z[a159_0x3a7056(0x1e7)]()[a159_0x3a7056(0x1fd)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x7e2e09,_0x12e918){var _0x4156c7=a160_0x3fe2,_0x1f4072=_0x7e2e09();while(!![]){try{var _0x2c3a3c=-parseInt(_0x4156c7(0x1d3))/0x1*(-parseInt(_0x4156c7(0x1d2))/0x2)+parseInt(_0x4156c7(0x1d5))/0x3*(parseInt(_0x4156c7(0x1d6))/0x4)+-parseInt(_0x4156c7(0x1d0))/0x5*(-parseInt(_0x4156c7(0x1d4))/0x6)+parseInt(_0x4156c7(0x1d1))/0x7*(parseInt(_0x4156c7(0x1d8))/0x8)+-parseInt(_0x4156c7(0x1d7))/0x9+-parseInt(_0x4156c7(0x1da))/0xa+-parseInt(_0x4156c7(0x1d9))/0xb;if(_0x2c3a3c===_0x12e918)break;else _0x1f4072['push'](_0x1f4072['shift']());}catch(_0x380501){_0x1f4072['push'](_0x1f4072['shift']());}}}(a160_0x51bf,0x584d0));function a160_0x3fe2(_0x5a5e1f,_0xcc1822){_0x5a5e1f=_0x5a5e1f-0x1d0;var _0x51bfbb=a160_0x51bf();var _0x3fe29d=_0x51bfbb[_0x5a5e1f];return _0x3fe29d;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x51bf(){var _0x56c771=['13NnZoWC','283362AVqZkj','56340kSikIf','152JagpLv','2065275JIMqmr','1075808PIeFIC','4460434MUoteK','1104290KbkQbV','5EdHVzJ','14LxCocq','11886fDgyVG'];a160_0x51bf=function(){return _0x56c771;};return a160_0x51bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x71f79b=a161_0x120c;(function(_0x42221f,_0x1d6fc9){const _0xef80af=a161_0x120c,_0x57dfec=_0x42221f();while(!![]){try{const _0x5bb5a4=parseInt(_0xef80af(0x95))/0x1+-parseInt(_0xef80af(0x85))/0x2*(-parseInt(_0xef80af(0x84))/0x3)+parseInt(_0xef80af(0x8a))/0x4*(-parseInt(_0xef80af(0x86))/0x5)+-parseInt(_0xef80af(0x97))/0x6*(-parseInt(_0xef80af(0x7e))/0x7)+parseInt(_0xef80af(0x8b))/0x8+parseInt(_0xef80af(0x8e))/0x9+-parseInt(_0xef80af(0x7d))/0xa;if(_0x5bb5a4===_0x1d6fc9)break;else _0x57dfec['push'](_0x57dfec['shift']());}catch(_0x25bf37){_0x57dfec['push'](_0x57dfec['shift']());}}}(a161_0x138f,0xeb594));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a161_0x120c(_0x10e97e,_0x766c6d){_0x10e97e=_0x10e97e-0x73;const _0x138f74=a161_0x138f();let _0x120ccf=_0x138f74[_0x10e97e];return _0x120ccf;}export const JourneyStateTypeSchema=z[a161_0x71f79b(0x77)]([a161_0x71f79b(0x94),a161_0x71f79b(0x80),a161_0x71f79b(0x7a)]);export const ReentryModeTypeSchema=z['enum']([a161_0x71f79b(0x87),a161_0x71f79b(0x99),'reentry_always']);export const WaitUnitTypeSchema=z[a161_0x71f79b(0x77)]([a161_0x71f79b(0x8f),'week']);export const StepTypeValueSchema=z['enum'](['wait',a161_0x71f79b(0x82),'decision_point',a161_0x71f79b(0x89),a161_0x71f79b(0x9b),'jump',a161_0x71f79b(0x75)]);export const EmbeddedSegmentDefSchema=z[a161_0x71f79b(0x7f)]({'description':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a161_0x71f79b(0x9a)](),'stage':z[a161_0x71f79b(0x9a)](),'bundle_id':z[a161_0x71f79b(0x9a)]()['optional']()});export const CriteriaDefSchema=z[a161_0x71f79b(0x7f)]({'name':z['string'](),'description':z[a161_0x71f79b(0x9a)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x71f79b(0x73)]()});const WaitConditionTimeoutDefSchema=z[a161_0x71f79b(0x7f)]({'duration':z[a161_0x71f79b(0x8d)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)]()}),WaitConditionDefSchema=z[a161_0x71f79b(0x7f)]({'segment':z[a161_0x71f79b(0x9a)](),'next':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x71f79b(0x73)]()}),WaitStepParamsDefSchema=z[a161_0x71f79b(0x7f)]({'duration':z[a161_0x71f79b(0x8d)]()[a161_0x71f79b(0x73)](),'unit':WaitUnitTypeSchema[a161_0x71f79b(0x73)](),'wait_until':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'condition':WaitConditionDefSchema[a161_0x71f79b(0x73)](),'days_of_week':z[a161_0x71f79b(0x93)](z[a161_0x71f79b(0x9a)]())[a161_0x71f79b(0x73)]()}),StepBaseFields={'name':z[a161_0x71f79b(0x9a)](),'uuid':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'next':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)]()},WaitStepDefSchema=z[a161_0x71f79b(0x7f)]({...StepBaseFields,'type':z[a161_0x71f79b(0x91)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x71f79b(0x9a)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x71f79b(0x91)](a161_0x71f79b(0x82)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x71f79b(0x7f)]({'name':z[a161_0x71f79b(0x9a)](),'segment':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'segment_id':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'excluded':z[a161_0x71f79b(0x7b)]()[a161_0x71f79b(0x73)](),'next':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)]()}),DecisionPointStepParamsDefSchema=z[a161_0x71f79b(0x7f)]({'branches':z[a161_0x71f79b(0x93)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x71f79b(0x7f)]({...StepBaseFields,'type':z[a161_0x71f79b(0x91)](a161_0x71f79b(0x98)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x71f79b(0x7f)]({'id':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'name':z['string'](),'percentage':z['number'](),'next':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a161_0x71f79b(0x93)](AbTestVariantDefSchema),'unique_id':z[a161_0x71f79b(0x9a)]()['optional'](),'customized_split':z[a161_0x71f79b(0x7b)]()[a161_0x71f79b(0x73)]()}),AbTestStepDefSchema=z[a161_0x71f79b(0x7f)]({...StepBaseFields,'type':z['literal'](a161_0x71f79b(0x89)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x71f79b(0x9b))}),JumpStepParamsDefSchema=z[a161_0x71f79b(0x7f)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x71f79b(0x7f)]({...StepBaseFields,'type':z['literal'](a161_0x71f79b(0x96)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x71f79b(0x7f)]({...StepBaseFields,'type':z[a161_0x71f79b(0x91)](a161_0x71f79b(0x75))})['passthrough']();export const StepDefSchema=z[a161_0x71f79b(0x78)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a161_0x71f79b(0x9a)](),'description':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'id':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'entry_criteria':CriteriaDefSchema[a161_0x71f79b(0x73)](),'exit_criteria':z[a161_0x71f79b(0x93)](CriteriaDefSchema)[a161_0x71f79b(0x73)](),'milestone':CriteriaDefSchema[a161_0x71f79b(0x73)](),'root_step':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'steps':z[a161_0x71f79b(0x93)](StepDefSchema)[a161_0x71f79b(0x73)]()});export const JourneyEntryDefSchema=z[a161_0x71f79b(0x7f)]({'name':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'version':z['string']()[a161_0x71f79b(0x73)](),'state':JourneyStateTypeSchema[a161_0x71f79b(0x73)](),'latest':z['boolean']()[a161_0x71f79b(0x73)](),'stages':z['array'](StageDefSchema),'id':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'version_number':z[a161_0x71f79b(0x8d)]()[a161_0x71f79b(0x73)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a161_0x71f79b(0x8c)](()=>z[a161_0x71f79b(0x7f)]({'type':z[a161_0x71f79b(0x91)](a161_0x71f79b(0x9c)),'name':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x7c)](0x1,a161_0x71f79b(0x92)),'description':z['string']()[a161_0x71f79b(0x73)](),'bundle_id':z[a161_0x71f79b(0x9a)]()['optional'](),'bundle_name':z[a161_0x71f79b(0x9a)]()[a161_0x71f79b(0x73)](),'folder_id':z['string']()[a161_0x71f79b(0x73)](),'reentry':ReentryModeTypeSchema[a161_0x71f79b(0x73)](),'allow_reentry':z[a161_0x71f79b(0x7b)]()[a161_0x71f79b(0x73)](),'goal':CriteriaDefSchema[a161_0x71f79b(0x73)](),'id':z['string']()[a161_0x71f79b(0x73)](),'version':z['string']()[a161_0x71f79b(0x73)](),'version_number':z[a161_0x71f79b(0x8d)]()['optional'](),'stages':z[a161_0x71f79b(0x93)](StageDefSchema)[a161_0x71f79b(0x73)](),'versions':z[a161_0x71f79b(0x93)](JourneyEntryDefSchema)['optional'](),'journeys':z[a161_0x71f79b(0x93)](JourneyEntryDefSchema)['optional'](),'segments':z[a161_0x71f79b(0x79)](z['string'](),EmbeddedSegmentDefSchema)[a161_0x71f79b(0x73)](),'activations':z[a161_0x71f79b(0x79)](z[a161_0x71f79b(0x9a)](),ActivationDefSchema)[a161_0x71f79b(0x73)]()})['refine'](_0x457df8=>{const _0x3e3cca=a161_0x71f79b,_0x4341fe=[_0x457df8[_0x3e3cca(0x76)],_0x457df8[_0x3e3cca(0x90)],_0x457df8[_0x3e3cca(0x74)]][_0x3e3cca(0x81)](_0x112306=>Array[_0x3e3cca(0x83)](_0x112306)&&_0x112306['length']>0x0)[_0x3e3cca(0x88)];return _0x4341fe===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;function a161_0x138f(){const _0x1c06cc=['day','stages','literal','Journey\x20name\x20is\x20required','array','draft','783203TaDaHj','jump','3102CQrtlo','decision_point','reentry_unless_goal_achieved','string','merge','journey','optional','versions','end','journeys','enum','discriminatedUnion','record','launched','boolean','min','16828410CyDTus','1596CtNcSs','object','simulation','filter','activation','isArray','3qSKQJu','1115990HKYMjr','2250Qbbvfr','no_reentry','length','ab_test','9736uYIbhi','12966432cWdTGh','lazy','number','5960259tAxVNQ'];a161_0x138f=function(){return _0x1c06cc;};return a161_0x138f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a163_0xae51(_0x36044a,_0x332130){_0x36044a=_0x36044a-0x8e;var _0x2fafce=a163_0x2faf();var _0xae51c0=_0x2fafce[_0x36044a];return _0xae51c0;}(function(_0xabea4c,_0x2a1b07){var _0x5e81a8=a163_0xae51,_0x2e26ec=_0xabea4c();while(!![]){try{var _0x523a04=-parseInt(_0x5e81a8(0x91))/0x1*(parseInt(_0x5e81a8(0x99))/0x2)+parseInt(_0x5e81a8(0x97))/0x3*(-parseInt(_0x5e81a8(0x95))/0x4)+-parseInt(_0x5e81a8(0x8e))/0x5+-parseInt(_0x5e81a8(0x94))/0x6*(parseInt(_0x5e81a8(0x98))/0x7)+-parseInt(_0x5e81a8(0x96))/0x8+parseInt(_0x5e81a8(0x92))/0x9*(-parseInt(_0x5e81a8(0x8f))/0xa)+parseInt(_0x5e81a8(0x93))/0xb*(parseInt(_0x5e81a8(0x90))/0xc);if(_0x523a04===_0x2a1b07)break;else _0x2e26ec['push'](_0x2e26ec['shift']());}catch(_0x5c2b96){_0x2e26ec['push'](_0x2e26ec['shift']());}}}(a163_0x2faf,0x7361d));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';function a163_0x2faf(){var _0x4bcf87=['11260QJMJbj','1365864dJrOKc','573NCdkAq','2518544IOaOvr','538286rjOxfr','4518840yvqYzJ','6140EZElDF','12dXQflL','3ZjjThc','9567cVWuNe','42951414rgnntL','6TZhlMx'];a163_0x2faf=function(){return _0x4bcf87;};return a163_0x2faf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x450081=a164_0x38df;function a164_0x59bc(){const _0x227e61=['GreaterEqual','Behavior','3403284hKrFkZ','8pKIYSg','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','17192640VoLoIH','batch','Contain','TimeRange\x20operator\x20requires\x20\x27duration\x27','Regexp','funnel_stage','object','Value','union','3094008NmtTwY','Equal','discriminatedUnion','Count','1982730yBVkaR','Segment\x20reference\x20must\x20not\x20be\x20empty','Operator\x20\x27','Max','Column','type','EndWith','literal','First','And','CountDistinct','day','unit','enum','realtime','boolean','TimeWithinNext','Sum','array','Between','exclude','2253662TPfhGI','Average','custom','duration','8ODgmBi','4273520JvNxRK','MISSING_TIME_UNIT','minute','\x27\x20requires\x20a\x20value','from','number','string','Min','LessEqual','11fSzRwu','month','35cyeoar','Segment\x20name\x20is\x20required','Last','value','\x27\x20requires\x20a\x20time\x20unit','StartWith','has','1mDQefM','addIssue','lazy','superRefine','operator','TimeRange','segment','Less','any','min','TimeRange\x20operator\x20requires\x20\x27from\x27','3716937RryuWQ','all','TimeWithinPast','optional','Greater','week'];a164_0x59bc=function(){return _0x227e61;};return a164_0x59bc();}(function(_0x558f53,_0x5ad823){const _0x34e5ae=a164_0x38df,_0x253327=_0x558f53();while(!![]){try{const _0x23d338=-parseInt(_0x34e5ae(0x14d))/0x1*(parseInt(_0x34e5ae(0x185))/0x2)+parseInt(_0x34e5ae(0x16c))/0x3+parseInt(_0x34e5ae(0x13a))/0x4*(-parseInt(_0x34e5ae(0x13b))/0x5)+parseInt(_0x34e5ae(0x170))/0x6*(parseInt(_0x34e5ae(0x146))/0x7)+parseInt(_0x34e5ae(0x161))/0x8*(-parseInt(_0x34e5ae(0x158))/0x9)+parseInt(_0x34e5ae(0x163))/0xa+parseInt(_0x34e5ae(0x144))/0xb*(-parseInt(_0x34e5ae(0x160))/0xc);if(_0x23d338===_0x5ad823)break;else _0x253327['push'](_0x253327['shift']());}catch(_0x5de244){_0x253327['push'](_0x253327['shift']());}}}(a164_0x59bc,0xd4694));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x450081(0x17d)]([a164_0x450081(0x16d),a164_0x450081(0x15c),a164_0x450081(0x154),a164_0x450081(0x15e),'LessEqual','In',a164_0x450081(0x183),a164_0x450081(0x167),'IsNull','TimeWithinPast','TimeWithinNext',a164_0x450081(0x165),a164_0x450081(0x14b),'EndWith',a164_0x450081(0x152)]);export const TimeUnitSchema=z[a164_0x450081(0x17d)](['second',a164_0x450081(0x13d),'hour',a164_0x450081(0x17b),a164_0x450081(0x15d),a164_0x450081(0x145),'year']);export const AggregationTypeSchema=z[a164_0x450081(0x17d)](['Count',a164_0x450081(0x181),'Average',a164_0x450081(0x142),a164_0x450081(0x173),a164_0x450081(0x17a),a164_0x450081(0x178),'Last']);const TemporalValueSchema=z[a164_0x450081(0x16b)]([z[a164_0x450081(0x169)]({'timestamp':z[a164_0x450081(0x141)]()}),z[a164_0x450081(0x169)]({'last':z[a164_0x450081(0x16b)]([z['number'](),z['record'](z[a164_0x450081(0x141)](),z[a164_0x450081(0x140)]())]),'unit':z[a164_0x450081(0x141)]()})]),OperatorValueSchema=z['union']([z[a164_0x450081(0x141)](),z[a164_0x450081(0x140)](),z[a164_0x450081(0x17f)](),TemporalValueSchema,z[a164_0x450081(0x182)](z[a164_0x450081(0x16b)]([z[a164_0x450081(0x141)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x450081(0x16d),a164_0x450081(0x15c),a164_0x450081(0x15e),'Less',a164_0x450081(0x143),'In',a164_0x450081(0x165),'StartWith',a164_0x450081(0x176),a164_0x450081(0x167),a164_0x450081(0x15a),a164_0x450081(0x180)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x450081(0x15a),a164_0x450081(0x180)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x450081(0x15b)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x450081(0x16b)]([z[a164_0x450081(0x140)](),z[a164_0x450081(0x141)](),TemporalValueSchema])[a164_0x450081(0x15b)](),'max':z[a164_0x450081(0x16b)]([z[a164_0x450081(0x140)](),z[a164_0x450081(0x141)](),TemporalValueSchema])[a164_0x450081(0x15b)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z['number']()['optional'](),'week':z[a164_0x450081(0x140)]()[a164_0x450081(0x15b)](),'month':z[a164_0x450081(0x140)]()[a164_0x450081(0x15b)](),'year':z[a164_0x450081(0x140)]()['optional'](),'hour':z['number']()['optional'](),'minute':z[a164_0x450081(0x140)]()[a164_0x450081(0x15b)](),'second':z['number']()['optional']()})[a164_0x450081(0x15b)](),'from':z[a164_0x450081(0x169)]({'last':z['union']([z[a164_0x450081(0x140)](),z[a164_0x450081(0x141)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z['boolean']()[a164_0x450081(0x15b)]()})['superRefine']((_0x5e3f1d,_0x109acd)=>{const _0x1808d8=a164_0x450081;OPERATORS_REQUIRING_VALUE[_0x1808d8(0x14c)](_0x5e3f1d[_0x1808d8(0x175)])&&(_0x5e3f1d[_0x1808d8(0x149)]===undefined||_0x5e3f1d[_0x1808d8(0x149)]===null)&&_0x109acd[_0x1808d8(0x14e)]({'code':_0x1808d8(0x138),'message':_0x1808d8(0x172)+_0x5e3f1d[_0x1808d8(0x175)]+_0x1808d8(0x13e),'path':[_0x1808d8(0x149)]}),_0x5e3f1d[_0x1808d8(0x175)]==='Between'&&_0x5e3f1d[_0x1808d8(0x156)]===undefined&&_0x5e3f1d['max']===undefined&&_0x109acd['addIssue']({'code':_0x1808d8(0x138),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT['has'](_0x5e3f1d['type'])&&_0x5e3f1d['value']!==undefined&&!_0x5e3f1d['unit']&&_0x109acd[_0x1808d8(0x14e)]({'code':_0x1808d8(0x138),'message':_0x1808d8(0x172)+_0x5e3f1d[_0x1808d8(0x175)]+_0x1808d8(0x14a),'path':[_0x1808d8(0x17c)],'params':{'validationCode':_0x1808d8(0x13c)}}),_0x5e3f1d[_0x1808d8(0x175)]==='TimeRange'&&(!_0x5e3f1d[_0x1808d8(0x139)]&&_0x109acd['addIssue']({'code':'custom','message':_0x1808d8(0x166),'path':['duration']}),!_0x5e3f1d['from']&&_0x109acd[_0x1808d8(0x14e)]({'code':'custom','message':_0x1808d8(0x157),'path':[_0x1808d8(0x13f)]}));});export const ArrayMatchingSchema=z[a164_0x450081(0x16b)]([z[a164_0x450081(0x177)](a164_0x450081(0x155)),z['literal'](a164_0x450081(0x159)),z[a164_0x450081(0x169)]({'atLeast':z[a164_0x450081(0x140)]()}),z[a164_0x450081(0x169)]({'atMost':z[a164_0x450081(0x140)]()}),z['object']({'exactly':z[a164_0x450081(0x140)]()})]);export const AggregationDefSchema=z[a164_0x450081(0x16e)](a164_0x450081(0x175),[z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x17d)]([a164_0x450081(0x181),a164_0x450081(0x142),'Max',a164_0x450081(0x186)]),'column':z[a164_0x450081(0x141)](),'groupingColumns':z['array'](z[a164_0x450081(0x141)]())[a164_0x450081(0x15b)]()}),z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x177)](a164_0x450081(0x16f)),'groupingColumns':z[a164_0x450081(0x182)](z[a164_0x450081(0x141)]())[a164_0x450081(0x15b)]()}),z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x177)]('CountDistinct'),'columns':z[a164_0x450081(0x182)](z[a164_0x450081(0x141)]())}),z[a164_0x450081(0x169)]({'type':z['enum']([a164_0x450081(0x178),a164_0x450081(0x148)]),'column':z[a164_0x450081(0x141)](),'orderColumn':z[a164_0x450081(0x141)](),'groupingColumns':z[a164_0x450081(0x182)](z[a164_0x450081(0x141)]())[a164_0x450081(0x15b)]()})]);export const TimeWindowDefSchema=z[a164_0x450081(0x169)]({'duration':z[a164_0x450081(0x140)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x450081(0x15a),a164_0x450081(0x180),'TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x450081(0x177)]('Column'),'column':z[a164_0x450081(0x141)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x450081(0x15b)]()})[a164_0x450081(0x150)]((_0x2859de,_0x213303)=>{const _0xa1335c=a164_0x450081,_0x3e64c6=_0x2859de[_0xa1335c(0x151)]['type'];_0x2859de['column']==='timestamp'?!TIMESTAMP_OPERATORS['has'](_0x3e64c6)&&_0x213303[_0xa1335c(0x14e)]({'code':_0xa1335c(0x138),'message':_0xa1335c(0x162)+_0x3e64c6+'\x27)','path':['operator',_0xa1335c(0x175)]}):TIMESTAMP_OPERATORS[_0xa1335c(0x14c)](_0x3e64c6)&&_0x213303[_0xa1335c(0x14e)]({'code':_0xa1335c(0x138),'message':_0xa1335c(0x172)+_0x3e64c6+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0xa1335c(0x151),_0xa1335c(0x175)]});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0x450081(0x177)](a164_0x450081(0x179)),'conditions':z[a164_0x450081(0x182)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x450081(0x14f)](()=>z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x177)](a164_0x450081(0x16a)),'attribute':z[a164_0x450081(0x141)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a164_0x450081(0x15b)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x450081(0x141)]()[a164_0x450081(0x15b)](),'filter':FilterRuleDefSchema[a164_0x450081(0x15b)](),'limit':z['number']()[a164_0x450081(0x15b)]()}));export const BehaviorConditionDefSchema=z[a164_0x450081(0x14f)](()=>z['object']({'type':z[a164_0x450081(0x177)](a164_0x450081(0x15f)),'attribute':z[a164_0x450081(0x141)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x450081(0x15b)](),'exclude':z[a164_0x450081(0x17f)]()[a164_0x450081(0x15b)](),'aggregation':AggregationDefSchema[a164_0x450081(0x15b)](),'source':z['string']()[a164_0x450081(0x15b)](),'filter':FilterRuleDefSchema[a164_0x450081(0x15b)](),'timeWindow':TimeWindowDefSchema[a164_0x450081(0x15b)](),'limit':z[a164_0x450081(0x140)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x177)](a164_0x450081(0x174)),'column':z[a164_0x450081(0x141)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x17d)](['And','Or']),'conditions':z[a164_0x450081(0x182)](ConditionDefSchema),'description':z[a164_0x450081(0x141)]()[a164_0x450081(0x15b)]()}));export const SegmentRefConditionDefSchema=z[a164_0x450081(0x169)]({'type':z[a164_0x450081(0x17d)](['include',a164_0x450081(0x184)]),'segment':z[a164_0x450081(0x141)]()[a164_0x450081(0x156)](0x1,a164_0x450081(0x171))});function a164_0x38df(_0x5c32a5,_0x3fdfed){_0x5c32a5=_0x5c32a5-0x138;const _0x59bc77=a164_0x59bc();let _0x38df9e=_0x59bc77[_0x5c32a5];return _0x38df9e;}export const ConditionDefSchema=z['lazy'](()=>z[a164_0x450081(0x16b)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z['object']({'type':z[a164_0x450081(0x17d)]([a164_0x450081(0x179),'Or']),'conditions':z[a164_0x450081(0x182)](ConditionDefSchema),'description':z[a164_0x450081(0x141)]()['optional']()}));export const SegmentDefSchema=z['object']({'type':z[a164_0x450081(0x177)](a164_0x450081(0x153))[a164_0x450081(0x15b)](),'name':z[a164_0x450081(0x141)]()[a164_0x450081(0x156)](0x1,a164_0x450081(0x147)),'description':z[a164_0x450081(0x141)]()[a164_0x450081(0x15b)](),'folder':z[a164_0x450081(0x141)]()[a164_0x450081(0x15b)](),'rule':RuleDefSchema[a164_0x450081(0x15b)](),'kind':z[a164_0x450081(0x17d)]([a164_0x450081(0x164),a164_0x450081(0x17e),a164_0x450081(0x168)])['optional'](),'visible':z[a164_0x450081(0x17f)]()[a164_0x450081(0x15b)](),'activations':z['array'](z[a164_0x450081(0x155)]())[a164_0x450081(0x15b)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x346533=a164_0x1f5a;(function(_0x52ad4e,_0x237ba6){const _0x57f3b3=a164_0x1f5a,_0x10eeb9=_0x52ad4e();while(!![]){try{const _0x56ecde=parseInt(_0x57f3b3(0x11e))/0x1*(parseInt(_0x57f3b3(0xe2))/0x2)+parseInt(_0x57f3b3(0xd9))/0x3*(parseInt(_0x57f3b3(0xe6))/0x4)+parseInt(_0x57f3b3(0x11a))/0x5+parseInt(_0x57f3b3(0xd8))/0x6+-parseInt(_0x57f3b3(0xf8))/0x7*(parseInt(_0x57f3b3(0xfc))/0x8)+parseInt(_0x57f3b3(0x102))/0x9*(-parseInt(_0x57f3b3(0x11f))/0xa)+-parseInt(_0x57f3b3(0x10e))/0xb*(parseInt(_0x57f3b3(0x10f))/0xc);if(_0x56ecde===_0x237ba6)break;else _0x10eeb9['push'](_0x10eeb9['shift']());}catch(_0x4991a5){_0x10eeb9['push'](_0x10eeb9['shift']());}}}(a164_0x2eff,0x37e26));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x346533(0xd0)]([a164_0x346533(0xe9),a164_0x346533(0x105),a164_0x346533(0x10a),a164_0x346533(0xd6),a164_0x346533(0x117),'In',a164_0x346533(0xcf),a164_0x346533(0xff),a164_0x346533(0xf2),a164_0x346533(0x101),a164_0x346533(0xd3),'Contain',a164_0x346533(0xea),a164_0x346533(0x113),a164_0x346533(0xeb)]);export const TimeUnitSchema=z[a164_0x346533(0xd0)]([a164_0x346533(0xd4),a164_0x346533(0x116),a164_0x346533(0x106),a164_0x346533(0xfe),'week',a164_0x346533(0xe5),'year']);export const AggregationTypeSchema=z[a164_0x346533(0xd0)]([a164_0x346533(0xec),'Sum','Average',a164_0x346533(0xde),'Max',a164_0x346533(0x104),'First','Last']);const TemporalValueSchema=z[a164_0x346533(0x107)]([z[a164_0x346533(0x109)]({'timestamp':z[a164_0x346533(0xee)]()}),z['object']({'last':z[a164_0x346533(0x107)]([z[a164_0x346533(0x114)](),z['record'](z['string'](),z['number']())]),'unit':z[a164_0x346533(0xee)]()})]),OperatorValueSchema=z[a164_0x346533(0x107)]([z['string'](),z['number'](),z[a164_0x346533(0x118)](),TemporalValueSchema,z[a164_0x346533(0xe4)](z[a164_0x346533(0x107)]([z[a164_0x346533(0xee)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x346533(0xe9),'Greater','GreaterEqual',a164_0x346533(0x10a),a164_0x346533(0x117),'In',a164_0x346533(0xd1),a164_0x346533(0xea),a164_0x346533(0x113),a164_0x346533(0xff),a164_0x346533(0x101),a164_0x346533(0xd3)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x346533(0x101),a164_0x346533(0xd3)]);export const OperatorDefSchema=z[a164_0x346533(0x109)]({'type':OperatorTypeSchema,'not':z[a164_0x346533(0x118)]()[a164_0x346533(0xf4)](),'value':OperatorValueSchema[a164_0x346533(0xf4)](),'min':z[a164_0x346533(0x107)]([z[a164_0x346533(0x114)](),z['string'](),TemporalValueSchema])[a164_0x346533(0xf4)](),'max':z[a164_0x346533(0x107)]([z['number'](),z[a164_0x346533(0xee)](),TemporalValueSchema])[a164_0x346533(0xf4)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x346533(0x109)]({'day':z[a164_0x346533(0x114)]()[a164_0x346533(0xf4)](),'week':z[a164_0x346533(0x114)]()[a164_0x346533(0xf4)](),'month':z[a164_0x346533(0x114)]()[a164_0x346533(0xf4)](),'year':z['number']()[a164_0x346533(0xf4)](),'hour':z[a164_0x346533(0x114)]()['optional'](),'minute':z[a164_0x346533(0x114)]()[a164_0x346533(0xf4)](),'second':z['number']()['optional']()})[a164_0x346533(0xf4)](),'from':z[a164_0x346533(0x109)]({'last':z[a164_0x346533(0x107)]([z[a164_0x346533(0x114)](),z[a164_0x346533(0xee)]()]),'unit':TimeUnitSchema})[a164_0x346533(0xf4)](),'reverse':z[a164_0x346533(0x118)]()[a164_0x346533(0xf4)]()})['superRefine']((_0x4deb1c,_0x5e6f76)=>{const _0x5220e2=a164_0x346533;OPERATORS_REQUIRING_VALUE[_0x5220e2(0xd2)](_0x4deb1c['type'])&&(_0x4deb1c['value']===undefined||_0x4deb1c[_0x5220e2(0x110)]===null)&&_0x5e6f76['addIssue']({'code':_0x5220e2(0xf7),'message':_0x5220e2(0xf9)+_0x4deb1c[_0x5220e2(0x100)]+_0x5220e2(0xef),'path':['value']}),_0x4deb1c['type']===_0x5220e2(0xcf)&&_0x4deb1c['min']===undefined&&_0x4deb1c[_0x5220e2(0xfb)]===undefined&&_0x5e6f76[_0x5220e2(0x119)]({'code':_0x5220e2(0xf7),'message':_0x5220e2(0xf1),'params':{'validationCode':_0x5220e2(0xfa)}}),OPERATORS_REQUIRING_UNIT[_0x5220e2(0xd2)](_0x4deb1c[_0x5220e2(0x100)])&&_0x4deb1c[_0x5220e2(0x110)]!==undefined&&!_0x4deb1c['unit']&&_0x5e6f76[_0x5220e2(0x119)]({'code':_0x5220e2(0xf7),'message':_0x5220e2(0xf9)+_0x4deb1c[_0x5220e2(0x100)]+_0x5220e2(0x11b),'path':[_0x5220e2(0xfd)],'params':{'validationCode':_0x5220e2(0xda)}}),_0x4deb1c[_0x5220e2(0x100)]===_0x5220e2(0xeb)&&(!_0x4deb1c[_0x5220e2(0x10b)]&&_0x5e6f76[_0x5220e2(0x119)]({'code':_0x5220e2(0xf7),'message':_0x5220e2(0xf6),'path':[_0x5220e2(0x10b)]}),!_0x4deb1c[_0x5220e2(0xe1)]&&_0x5e6f76[_0x5220e2(0x119)]({'code':_0x5220e2(0xf7),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x5220e2(0xe1)]}));});export const ArrayMatchingSchema=z[a164_0x346533(0x107)]([z[a164_0x346533(0xed)](a164_0x346533(0xdf)),z[a164_0x346533(0xed)](a164_0x346533(0xd5)),z['object']({'atLeast':z['number']()}),z['object']({'atMost':z['number']()}),z[a164_0x346533(0x109)]({'exactly':z[a164_0x346533(0x114)]()})]);export const AggregationDefSchema=z[a164_0x346533(0x111)]('type',[z[a164_0x346533(0x109)]({'type':z['enum'](['Sum',a164_0x346533(0xde),a164_0x346533(0x11c),'Average']),'column':z['string'](),'groupingColumns':z[a164_0x346533(0xe4)](z[a164_0x346533(0xee)]())['optional']()}),z['object']({'type':z[a164_0x346533(0xed)](a164_0x346533(0xec)),'groupingColumns':z[a164_0x346533(0xe4)](z[a164_0x346533(0xee)]())[a164_0x346533(0xf4)]()}),z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xed)](a164_0x346533(0x104)),'columns':z['array'](z[a164_0x346533(0xee)]())}),z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xd0)]([a164_0x346533(0x112),a164_0x346533(0x103)]),'column':z[a164_0x346533(0xee)](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x346533(0xe4)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a164_0x346533(0x114)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast','TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x346533(0x109)]({'type':z['literal'](a164_0x346533(0x11d)),'column':z[a164_0x346533(0xee)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x346533(0xf4)]()})[a164_0x346533(0x10d)]((_0x3d4f30,_0x162440)=>{const _0x3f9af7=a164_0x346533,_0x34c500=_0x3d4f30[_0x3f9af7(0xe0)]['type'];_0x3d4f30['column']===_0x3f9af7(0xf5)?!TIMESTAMP_OPERATORS[_0x3f9af7(0xd2)](_0x34c500)&&_0x162440[_0x3f9af7(0x119)]({'code':'custom','message':_0x3f9af7(0x120)+_0x34c500+'\x27)','path':[_0x3f9af7(0xe0),_0x3f9af7(0x100)]}):TIMESTAMP_OPERATORS[_0x3f9af7(0xd2)](_0x34c500)&&_0x162440[_0x3f9af7(0x119)]({'code':_0x3f9af7(0xf7),'message':'Operator\x20\x27'+_0x34c500+_0x3f9af7(0xe3),'path':[_0x3f9af7(0xe0),_0x3f9af7(0x100)]});});function a164_0x2eff(){const _0x6c12d3=['1188420faetXC','value','discriminatedUnion','First','EndWith','number','lazy','minute','LessEqual','boolean','addIssue','893960nkuMwa','\x27\x20requires\x20a\x20time\x20unit','Max','Column','9719NmDyXi','299170XBQTyt','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Between','enum','Contain','has','TimeWithinNext','second','all','GreaterEqual','batch','2119494YEBbWt','11661NhmxCr','MISSING_TIME_UNIT','Segment\x20name\x20is\x20required','Value','include','Min','any','operator','from','38HAVAmU','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','array','month','28nEYpIh','Behavior','realtime','Equal','StartWith','TimeRange','Count','literal','string','\x27\x20requires\x20a\x20value','min','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','IsNull','And','optional','timestamp','TimeRange\x20operator\x20requires\x20\x27duration\x27','custom','21HtrxOb','Operator\x20\x27','MISSING_BETWEEN_BOUNDS','max','391256ZArECe','unit','day','Regexp','type','TimeWithinPast','81BvcZLA','Last','CountDistinct','Greater','hour','union','exclude','object','Less','duration','Segment\x20reference\x20must\x20not\x20be\x20empty','superRefine','11hBZssM'];a164_0x2eff=function(){return _0x6c12d3;};return a164_0x2eff();}export const FilterRuleDefSchema=z[a164_0x346533(0x109)]({'type':z['literal']('And'),'conditions':z[a164_0x346533(0xe4)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x346533(0x115)](()=>z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xed)](a164_0x346533(0xdc)),'attribute':z[a164_0x346533(0xee)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x346533(0xf4)](),'exclude':z[a164_0x346533(0x118)]()[a164_0x346533(0xf4)](),'aggregation':AggregationDefSchema[a164_0x346533(0xf4)](),'source':z[a164_0x346533(0xee)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x346533(0x114)]()[a164_0x346533(0xf4)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xed)](a164_0x346533(0xe7)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x346533(0xf4)](),'exclude':z[a164_0x346533(0x118)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x346533(0xee)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x346533(0xf4)](),'limit':z[a164_0x346533(0x114)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xed)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});function a164_0x1f5a(_0x55bc35,_0x1f545c){_0x55bc35=_0x55bc35-0xcf;const _0x2eff59=a164_0x2eff();let _0x1f5aa8=_0x2eff59[_0x55bc35];return _0x1f5aa8;}export const CompositeConditionDefSchema=z[a164_0x346533(0x115)](()=>z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xd0)]([a164_0x346533(0xf3),'Or']),'conditions':z[a164_0x346533(0xe4)](ConditionDefSchema),'description':z[a164_0x346533(0xee)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x346533(0x109)]({'type':z[a164_0x346533(0xd0)]([a164_0x346533(0xdd),a164_0x346533(0x108)]),'segment':z[a164_0x346533(0xee)]()[a164_0x346533(0xf0)](0x1,a164_0x346533(0x10c))});export const ConditionDefSchema=z[a164_0x346533(0x115)](()=>z[a164_0x346533(0x107)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a164_0x346533(0x109)]({'type':z['enum']([a164_0x346533(0xf3),'Or']),'conditions':z[a164_0x346533(0xe4)](ConditionDefSchema),'description':z[a164_0x346533(0xee)]()[a164_0x346533(0xf4)]()}));export const SegmentDefSchema=z['object']({'type':z[a164_0x346533(0xed)]('segment')[a164_0x346533(0xf4)](),'name':z[a164_0x346533(0xee)]()['min'](0x1,a164_0x346533(0xdb)),'description':z[a164_0x346533(0xee)]()[a164_0x346533(0xf4)](),'folder':z[a164_0x346533(0xee)]()[a164_0x346533(0xf4)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x346533(0xd0)]([a164_0x346533(0xd7),a164_0x346533(0xe8),'funnel_stage'])[a164_0x346533(0xf4)](),'visible':z[a164_0x346533(0x118)]()[a164_0x346533(0xf4)](),'activations':z[a164_0x346533(0xe4)](z[a164_0x346533(0xdf)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x34d601=a165_0x5784;function a165_0x5784(_0x132fb0,_0x2fc901){_0x132fb0=_0x132fb0-0x83;const _0x1cc05f=a165_0x1cc0();let _0x578430=_0x1cc05f[_0x132fb0];return _0x578430;}(function(_0x3e3ccf,_0xb9a621){const _0x399712=a165_0x5784,_0x2fc9ff=_0x3e3ccf();while(!![]){try{const _0xea1803=parseInt(_0x399712(0x98))/0x1+parseInt(_0x399712(0x9f))/0x2+-parseInt(_0x399712(0x96))/0x3+parseInt(_0x399712(0x8b))/0x4*(parseInt(_0x399712(0x84))/0x5)+parseInt(_0x399712(0x8e))/0x6+-parseInt(_0x399712(0x83))/0x7+parseInt(_0x399712(0x8c))/0x8;if(_0xea1803===_0xb9a621)break;else _0x2fc9ff['push'](_0x2fc9ff['shift']());}catch(_0x8f2c9){_0x2fc9ff['push'](_0x2fc9ff['shift']());}}}(a165_0x1cc0,0x4c001));function a165_0x1cc0(){const _0x59a1f9=['length','1518792ykUUUO','template','skipped','map','result','utf-8','filterType','YAML_PARSE_ERROR','1025337gejgot','object','331416NFXGak','error','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','email','toJSON','not\x20a\x20','basename','260654JHxqMU','warnings','type','message','valid','2957962LcZMKN','415mriTBz','segment','campaign','journey','parseDocument','has','campaign_type','3372qwudmu','2326384SnaHau'];a165_0x1cc0=function(){return _0x59a1f9;};return a165_0x1cc0();}import{readFileSync}from'fs';import*as a165_0x1b997c from'path';import*as a165_0x63bc81 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([a165_0x34d601(0x9b),'push']);export function isJourneyDef(_0x2b123f){const _0x282d03=a165_0x34d601;return typeof _0x2b123f===_0x282d03(0x97)&&_0x2b123f!==null&&_0x282d03(0xa1)in _0x2b123f&&_0x2b123f[_0x282d03(0xa1)]===_0x282d03(0x87);}export function isCampaignDef(_0x5df25b){const _0x4829f6=a165_0x34d601;if(typeof _0x5df25b!==_0x4829f6(0x97)||_0x5df25b===null)return![];const _0x316a27=_0x5df25b,_0x1f7996=VALID_CAMPAIGN_TYPES[_0x4829f6(0x89)](_0x316a27[_0x4829f6(0x8a)]);if(_0x316a27['type']==='campaign'&&_0x1f7996)return!![];if(_0x1f7996&&!_0x316a27[_0x4829f6(0xa1)])return!![];return![];}export function isTemplateDef(_0x38015b){const _0x5b9cee=a165_0x34d601;return typeof _0x38015b===_0x5b9cee(0x97)&&_0x38015b!==null&&_0x5b9cee(0xa1)in _0x38015b&&_0x38015b['type']===_0x5b9cee(0x8f);}export function isValidationResult(_0x2db7f6){const _0x50c3f9=a165_0x34d601;return!(_0x50c3f9(0x90)in _0x2db7f6);}export function createParseErrorResult(_0x322d08,_0xe3c22e,_0x17215f,_0x5d2283,_0x3dda09=a165_0x34d601(0x85)){const _0x464dc6=a165_0x34d601;return{'filePath':_0x322d08,'relativePath':_0xe3c22e,'source':_0x17215f,'result':{'valid':![],'errors':[{'level':_0x464dc6(0x99),'path':'','code':_0x464dc6(0x95),'message':_0x5d2283}],'warnings':[]},'fileType':_0x3dda09};}export function validateYamlFile(_0x2856fa,_0x12ca4e,_0x547092={}){const _0x5b3067=a165_0x34d601,_0x4825d3=a165_0x1b997c['relative'](_0x12ca4e,_0x2856fa)||a165_0x1b997c[_0x5b3067(0x9e)](_0x2856fa);try{const _0x128be9=readFileSync(_0x2856fa,_0x5b3067(0x93)),_0x2a0254=a165_0x63bc81[_0x5b3067(0x88)](_0x128be9),_0x3af9f5=_0x2a0254[_0x5b3067(0x9c)]();if(!_0x3af9f5)return createParseErrorResult(_0x2856fa,_0x4825d3,_0x128be9,_0x5b3067(0x9a));let _0x524962;if(isJourneyDef(_0x3af9f5))_0x524962='journey';else{if(isCampaignDef(_0x3af9f5))_0x524962=_0x5b3067(0x86);else isTemplateDef(_0x3af9f5)?_0x524962=_0x5b3067(0x8f):_0x524962=_0x5b3067(0x85);}if(_0x547092[_0x5b3067(0x94)]&&_0x524962!==_0x547092[_0x5b3067(0x94)])return{'filePath':_0x2856fa,'relativePath':_0x4825d3,'skipped':!![],'reason':_0x5b3067(0x9d)+_0x547092[_0x5b3067(0x94)]};const _0x13cd57={'source':_0x128be9,'document':_0x2a0254};let _0x5a39b6;if(_0x524962==='journey')_0x5a39b6=validateJourneyDef(_0x3af9f5,_0x13cd57);else{if(_0x524962==='campaign')_0x5a39b6=validateCampaignDef(_0x3af9f5,_0x13cd57);else _0x524962==='template'?_0x5a39b6=validateTemplateDef(_0x3af9f5,_0x13cd57):_0x5a39b6=validateSegmentDef(_0x3af9f5,_0x13cd57);}return{'filePath':_0x2856fa,'relativePath':_0x4825d3,'source':_0x128be9,'result':_0x5a39b6,'fileType':_0x524962};}catch(_0x31475f){const _0x4abfa2=_0x31475f instanceof Error?_0x31475f[_0x5b3067(0xa2)]:String(_0x31475f);return createParseErrorResult(_0x2856fa,_0x4825d3,'','YAML\x20parse\x20error:\x20'+_0x4abfa2);}}export function validateYamlFiles(_0x2e98a8,_0x2d18eb,_0x232917={}){const _0x20631d=a165_0x34d601;return _0x2e98a8[_0x20631d(0x91)](_0x153b43=>validateYamlFile(_0x153b43,_0x2d18eb,_0x232917));}export function calculateSummary(_0xe6c1ef){const _0x51aa77=a165_0x34d601;let _0x180167=0x0,_0x370659=0x0,_0x24e2e3=0x0,_0x2a382c=0x0;for(const _0x503ea5 of _0xe6c1ef){if(!isValidationResult(_0x503ea5)){_0x2a382c++;continue;}_0x503ea5[_0x51aa77(0x92)][_0x51aa77(0xa3)]?_0x180167++:_0x370659++,_0x24e2e3+=_0x503ea5[_0x51aa77(0x92)][_0x51aa77(0xa0)][_0x51aa77(0x8d)];}return{'validCount':_0x180167,'invalidCount':_0x370659,'warningCount':_0x24e2e3,'skippedCount':_0x2a382c,'hasErrors':_0x370659>0x0};}
|