@treasuredata/tdx 2026.4.18 → 2026.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.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.d.ts +38 -0
- package/dist/commands/engage-command.d.ts.map +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +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/tools/work-create-item.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.d.ts +26 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +1 -1
- package/dist/sdk/client/http-client.d.ts +1 -1
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +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-validator.js.map +1 -1
- package/dist/sdk/engage/campaign-yaml.d.ts +1 -1
- package/dist/sdk/engage/campaign-yaml.d.ts.map +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js.map +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.d.ts +2 -2
- package/dist/sdk/engage/types/campaign-def.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +256 -8
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.d.ts +28 -1
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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/engage.d.ts +125 -1
- package/dist/sdk/types/engage.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +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/access-tracker.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
|
-
|
|
1
|
+
(function(_0x105275,_0x513dbc){const _0x1a8119=a153_0x4171,_0x40421b=_0x105275();while(!![]){try{const _0x5bdc1a=parseInt(_0x1a8119(0x154))/0x1*(-parseInt(_0x1a8119(0x158))/0x2)+parseInt(_0x1a8119(0x14f))/0x3+-parseInt(_0x1a8119(0x156))/0x4+-parseInt(_0x1a8119(0x14c))/0x5*(-parseInt(_0x1a8119(0x151))/0x6)+-parseInt(_0x1a8119(0x152))/0x7*(parseInt(_0x1a8119(0x14d))/0x8)+-parseInt(_0x1a8119(0x157))/0x9*(parseInt(_0x1a8119(0x150))/0xa)+parseInt(_0x1a8119(0x14b))/0xb*(parseInt(_0x1a8119(0x149))/0xc);if(_0x5bdc1a===_0x513dbc)break;else _0x40421b['push'](_0x40421b['shift']());}catch(_0x26a751){_0x40421b['push'](_0x40421b['shift']());}}}(a153_0x1d82,0x76079));export function buildFolderIdToPathMap(_0x53ad86){const _0x4bf742=a153_0x4171,_0x4c413f=new Map(),_0x438b15=new Map();for(const _0x4d47c1 of _0x53ad86){_0x438b15[_0x4bf742(0x14e)](_0x4d47c1['id'],_0x4d47c1);}const _0x4b9531=new Set();for(const _0x397608 of _0x53ad86){!_0x397608[_0x4bf742(0x155)]&&_0x4b9531[_0x4bf742(0x153)](_0x397608['id']);}function _0x348e8b(_0x1ee1b9){const _0x9e6b61=_0x4bf742;if(_0x4c413f[_0x9e6b61(0x159)](_0x1ee1b9['id']))return _0x4c413f[_0x9e6b61(0x148)](_0x1ee1b9['id']);if(_0x4b9531[_0x9e6b61(0x159)](_0x1ee1b9['id']))return _0x4c413f[_0x9e6b61(0x14e)](_0x1ee1b9['id'],''),'';if(_0x1ee1b9['parentFolderId']){const _0x4cc152=_0x438b15[_0x9e6b61(0x148)](_0x1ee1b9[_0x9e6b61(0x155)]);if(_0x4cc152){const _0x263868=_0x348e8b(_0x4cc152),_0x42cf9e=_0x263868?_0x263868+'/'+_0x1ee1b9[_0x9e6b61(0x14a)]:_0x1ee1b9[_0x9e6b61(0x14a)];return _0x4c413f['set'](_0x1ee1b9['id'],_0x42cf9e),_0x42cf9e;}}const _0x727818=_0x1ee1b9[_0x9e6b61(0x14a)];return _0x4c413f['set'](_0x1ee1b9['id'],_0x727818),_0x727818;}for(const _0x2a31e0 of _0x53ad86){_0x348e8b(_0x2a31e0);}return _0x4c413f;}export function buildFolderPathToIdMap(_0x2495b2){const _0x1939ac=a153_0x4171,_0x4a898c=new Map(),_0x267c23=new Map();for(const _0x390ee9 of _0x2495b2){_0x267c23['set'](_0x390ee9['id'],_0x390ee9);}const _0x159793=new Set();for(const _0x1d65e2 of _0x2495b2){!_0x1d65e2[_0x1939ac(0x155)]&&_0x159793['add'](_0x1d65e2['id']);}function _0x2ffbb0(_0x1624be){const _0x5e34d9=_0x1939ac;if(_0x159793[_0x5e34d9(0x159)](_0x1624be['id']))return'';if(_0x1624be['parentFolderId']){const _0x2139af=_0x267c23['get'](_0x1624be['parentFolderId']);if(_0x2139af){const _0x560735=_0x2ffbb0(_0x2139af);return _0x560735?_0x560735+'/'+_0x1624be['name']:_0x1624be[_0x5e34d9(0x14a)];}}return _0x1624be[_0x5e34d9(0x14a)];}for(const _0x149824 of _0x2495b2){const _0x4d4381=_0x2ffbb0(_0x149824);_0x4a898c['set'](_0x4d4381,_0x149824['id']);}return _0x4a898c;}function a153_0x4171(_0x501057,_0x3fd3c6){_0x501057=_0x501057-0x148;const _0x1d8281=a153_0x1d82();let _0x417112=_0x1d8281[_0x501057];return _0x417112;}export function buildFolderMaps(_0x26a21b){const _0x16e466=a153_0x4171,_0x4e3693=buildFolderIdToPathMap(_0x26a21b),_0x3faa32=new Map();for(const [_0x4f0862,_0x3af9c3]of _0x4e3693){_0x3faa32[_0x16e466(0x14e)](_0x3af9c3,_0x4f0862);}return{'idToPath':_0x4e3693,'pathToId':_0x3faa32};}function a153_0x1d82(){const _0x5336cc=['15084sMhIIb','name','18799FiNwVp','2254015oWwbdA','984pXaHYL','set','1603041laBcKH','632470MLPWfu','6UdsJsn','26341VCXcPn','add','57775jiqECh','parentFolderId','1761816HrotWV','117pkRlxR','32vCxjgw','has','get'];a153_0x1d82=function(){return _0x5336cc;};return a153_0x1d82();}export function getFolderPath(_0x3b763a,_0x2cdc8d){const _0x5a70a2=a153_0x4171;if(!_0x3b763a)return'';return _0x2cdc8d[_0x5a70a2(0x148)](_0x3b763a)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13144f,_0x4e5000){const _0x415d18=a154_0x1b04,_0x238057=_0x13144f();while(!![]){try{const _0x478d70=-parseInt(_0x415d18(0x12d))/0x1+parseInt(_0x415d18(0x129))/0x2*(parseInt(_0x415d18(0x11b))/0x3)+parseInt(_0x415d18(0x147))/0x4*(parseInt(_0x415d18(0x133))/0x5)+parseInt(_0x415d18(0x135))/0x6*(parseInt(_0x415d18(0x121))/0x7)+-parseInt(_0x415d18(0x127))/0x8+parseInt(_0x415d18(0x131))/0x9*(parseInt(_0x415d18(0x134))/0xa)+-parseInt(_0x415d18(0x12e))/0xb;if(_0x478d70===_0x4e5000)break;else _0x238057['push'](_0x238057['shift']());}catch(_0x3482b1){_0x238057['push'](_0x238057['shift']());}}}(a154_0x5443,0x3d2a8));import a154_0x4360b8 from'path';import{parse as a154_0x13ea9b}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x229da2){const _0x8ae8a4=a154_0x1b04;if(!_0x229da2||_0x229da2['trim']()==='')throw new Error(_0x8ae8a4(0x13c));const _0x352ad8=_0x229da2[_0x8ae8a4(0x120)]();if(_0x352ad8==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x229da2};const _0x338f74=_0x352ad8[_0x8ae8a4(0x12c)]('/')?_0x352ad8[_0x8ae8a4(0x14b)](0x1):_0x352ad8,_0x235183=_0x338f74[_0x8ae8a4(0x122)]('/')[_0x8ae8a4(0x145)](_0x500192=>_0x500192!=='');if(_0x235183['length']===0x0)throw new Error(_0x8ae8a4(0x130));const _0x31b8e4=_0x352ad8['startsWith']('/')||!isRelativePathSegment(_0x235183[0x0]);for(const _0x507faf of _0x235183){validatePathSegment(_0x507faf);}return{'segments':_0x235183,'isAbsolute':_0x31b8e4,'raw':_0x229da2};}function isRelativePathSegment(_0x1d3cfa){return _0x1d3cfa==='.'||_0x1d3cfa==='..';}function validatePathSegment(_0x562799){const _0x160ce3=a154_0x1b04;if(_0x562799==='')throw new Error(_0x160ce3(0x128));if(_0x562799==='.'||_0x562799==='..')return;if(/[\x00-\x1F\x7F]/['test'](_0x562799))throw new Error(_0x160ce3(0x125)+_0x562799);if(_0x562799!==_0x562799[_0x160ce3(0x120)]()){}}export function validatePath(_0x3b59d7){const _0x1e5b7e=a154_0x1b04;if(_0x3b59d7[_0x1e5b7e(0x146)][_0x1e5b7e(0x12b)]===0x0&&!_0x3b59d7[_0x1e5b7e(0x140)])throw new Error(_0x1e5b7e(0x141));if(_0x3b59d7['isAbsolute']){if(_0x3b59d7[_0x1e5b7e(0x146)][0x0]==='..')throw new Error('Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22');let _0x2e8fd5=0x0;for(const _0x1eb739 of _0x3b59d7[_0x1e5b7e(0x146)]){if(_0x1eb739==='..'){if(_0x2e8fd5===0x0)throw new Error(_0x1e5b7e(0x11e));_0x2e8fd5--;}else _0x1eb739!=='.'&&_0x2e8fd5++;}}}export function joinPaths(_0x2df909,_0xe84beb){const _0x198102=a154_0x1b04;if(!_0x2df909||_0x2df909==='/')return _0xe84beb;if(!_0xe84beb||_0xe84beb==='.')return _0x2df909;if(_0xe84beb[_0x198102(0x12c)]('/'))return _0xe84beb;const _0x4ee2f7=parsePath(_0x2df909),_0x2510bf=parsePath(_0xe84beb),_0x821155=[..._0x4ee2f7[_0x198102(0x146)]];for(const _0x47282a of _0x2510bf[_0x198102(0x146)]){if(_0x47282a==='.')continue;else{if(_0x47282a==='..'){if(_0x821155['length']===0x0)throw new Error(_0x198102(0x132));_0x821155[_0x198102(0x124)]();}else _0x821155[_0x198102(0x144)](_0x47282a);}}const _0x15a3c8=_0x821155[_0x198102(0x12f)]('/');return _0x4ee2f7[_0x198102(0x123)][_0x198102(0x12c)]('/')?'/'+_0x15a3c8:_0x15a3c8;}export function normalizePath(_0x39beec){const _0xa0b944=a154_0x1b04,_0x203243=parsePath(_0x39beec),_0x3d96c1=[];for(const _0x7c8cfb of _0x203243[_0xa0b944(0x146)]){if(_0x7c8cfb==='.')continue;else{if(_0x7c8cfb==='..'){if(_0x3d96c1['length']===0x0){if(_0x203243[_0xa0b944(0x140)])throw new Error(_0xa0b944(0x132));_0x3d96c1[_0xa0b944(0x144)]('..');}else _0x3d96c1[_0x3d96c1[_0xa0b944(0x12b)]-0x1]==='..'?_0x3d96c1[_0xa0b944(0x144)]('..'):_0x3d96c1['pop']();}else _0x3d96c1[_0xa0b944(0x144)](_0x7c8cfb);}}if(_0x3d96c1[_0xa0b944(0x12b)]===0x0)return _0x203243[_0xa0b944(0x140)]?'/':'.';const _0x4373ac=_0x3d96c1['join']('/');return _0x203243['raw'][_0xa0b944(0x12c)]('/')?'/'+_0x4373ac:_0x4373ac;}function a154_0x1b04(_0x4f130c,_0x39625e){_0x4f130c=_0x4f130c-0x11b;const _0x5443e1=a154_0x5443();let _0x1b0444=_0x5443e1[_0x4f130c];return _0x1b0444;}export function getParentPath(_0x48ad40){const _0x8255dc=a154_0x1b04,_0x54c86d=parsePath(_0x48ad40);if(_0x54c86d[_0x8255dc(0x146)][_0x8255dc(0x12b)]<=0x1)return'/';const _0x4eacf7=_0x54c86d[_0x8255dc(0x146)][_0x8255dc(0x149)](0x0,-0x1)['join']('/');return _0x54c86d['raw'][_0x8255dc(0x12c)]('/')?'/'+_0x4eacf7:_0x4eacf7;}export function getBaseName(_0x2e56f5){const _0x3a24f1=a154_0x1b04,_0x3228c3=parsePath(_0x2e56f5);return _0x3228c3[_0x3a24f1(0x146)][_0x3228c3['segments']['length']-0x1]||'';}function a154_0x5443(){const _0x45610a=['filter','segments','16wwlRHp','parent_segment','slice','File\x20not\x20found:\x20','substring','12531NKRlHt','replace','name','Path\x20attempts\x20to\x20navigate\x20above\x20root','readFile','trim','47649kEWrxV','split','raw','pop','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','.yml','2148568okUAQY','Path\x20segment\x20cannot\x20be\x20empty','38wQziZS','journey','length','startsWith','378393Ibvhfj','82742bqsfXe','join','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','2819133hEyffp','Cannot\x20navigate\x20above\x20root','78950COrBmR','10RYghbR','396JQLyNg','dirname','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','exists','No\x20tdx.json\x20found\x20for\x20file:\x20','.yaml','type','Path\x20cannot\x20be\x20empty','Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.','parse','relative','isAbsolute','Relative\x20path\x20cannot\x20be\x20empty','Cannot\x20split\x20empty\x20path','tdx.json','push'];a154_0x5443=function(){return _0x45610a;};return a154_0x5443();}export function isChildPath(_0x4a3f40,_0x437083){const _0x45cb46=a154_0x1b04,_0x407ccc=parsePath(_0x4a3f40),_0x337abe=parsePath(_0x437083);if(_0x407ccc[_0x45cb46(0x146)][_0x45cb46(0x12b)]<=_0x337abe[_0x45cb46(0x146)][_0x45cb46(0x12b)])return![];for(let _0x4e9a0d=0x0;_0x4e9a0d<_0x337abe[_0x45cb46(0x146)][_0x45cb46(0x12b)];_0x4e9a0d++){if(_0x407ccc[_0x45cb46(0x146)][_0x4e9a0d]!==_0x337abe[_0x45cb46(0x146)][_0x4e9a0d])return![];}return!![];}export function splitPath(_0x21fc09){const _0x203bd2=a154_0x1b04,_0x16f6ca=parsePath(_0x21fc09);if(_0x16f6ca[_0x203bd2(0x146)][_0x203bd2(0x12b)]===0x0)throw new Error(_0x203bd2(0x142));if(_0x16f6ca['segments'][_0x203bd2(0x12b)]===0x1)return{'parent':_0x16f6ca['segments'][0x0]};return{'parent':_0x16f6ca['segments'][0x0],'child':_0x16f6ca['segments']['slice'](0x1)['join']('/')};}export function isYamlFilePath(_0x5e2e07){const _0x5c10e7=a154_0x1b04;return _0x5e2e07['endsWith'](_0x5c10e7(0x126))||_0x5e2e07['endsWith'](_0x5c10e7(0x13a));}export async function resolveYamlFilePath(_0x103431,_0x109378=nodeFileSystem){const _0xeaa27e=a154_0x1b04,_0x4d42be=a154_0x4360b8['resolve'](_0x103431);if(!await _0x109378[_0xeaa27e(0x138)](_0x4d42be))throw new Error(_0xeaa27e(0x14a)+_0x103431);let _0x3c0c1f=a154_0x4360b8[_0xeaa27e(0x136)](_0x4d42be),_0x2fcfb6=null,_0x48c0a6=null;const _0x786995=a154_0x4360b8['parse'](_0x3c0c1f)['root'];while(_0x3c0c1f!==_0x786995){const _0x5e04e8=a154_0x4360b8[_0xeaa27e(0x12f)](_0x3c0c1f,_0xeaa27e(0x143));if(await _0x109378[_0xeaa27e(0x138)](_0x5e04e8)){_0x2fcfb6=_0x5e04e8,_0x48c0a6=_0x3c0c1f;break;}_0x3c0c1f=a154_0x4360b8['dirname'](_0x3c0c1f);}if(!_0x2fcfb6||!_0x48c0a6)throw new Error(_0xeaa27e(0x139)+_0x103431+'\x0a'+_0xeaa27e(0x13d));const _0x2e680c=await _0x109378['readFile'](_0x2fcfb6),_0x4aee9e=JSON[_0xeaa27e(0x13e)](_0x2e680c),_0x370584=_0x4aee9e[_0xeaa27e(0x148)];if(!_0x370584)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x259a4a=await _0x109378[_0xeaa27e(0x11f)](_0x4d42be),_0x28bad5=a154_0x13ea9b(_0x259a4a),_0x59bc18=_0x28bad5[_0xeaa27e(0x11d)];if(!_0x59bc18)throw new Error(_0xeaa27e(0x137)+_0x103431);const _0x1def79=_0x28bad5[_0xeaa27e(0x13b)]===_0xeaa27e(0x12a)?_0xeaa27e(0x12a):'segment',_0x15ef76=a154_0x4360b8[_0xeaa27e(0x13f)](_0x48c0a6,_0x4d42be),_0x1bc8eb=a154_0x4360b8[_0xeaa27e(0x136)](_0x15ef76),_0x33b76e=_0x1bc8eb==='.'?'':_0x1bc8eb[_0xeaa27e(0x11c)](/\\/g,'/'),_0x7beece=_0x33b76e?_0x370584+'/'+_0x33b76e+'/'+_0x59bc18:_0x370584+'/'+_0x59bc18;return{'parentSegment':_0x370584,'segmentName':_0x59bc18,'folderPath':_0x33b76e,'fullPath':_0x7beece,'resourceType':_0x1def79,'content':_0x259a4a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d0428,_0x5b9ab0){const _0x45ea47=a155_0x3341,_0x120b3c=_0x1d0428();while(!![]){try{const _0x4abc53=-parseInt(_0x45ea47(0x1e8))/0x1+-parseInt(_0x45ea47(0x1e2))/0x2*(-parseInt(_0x45ea47(0x1eb))/0x3)+parseInt(_0x45ea47(0x1e0))/0x4*(-parseInt(_0x45ea47(0x1e3))/0x5)+-parseInt(_0x45ea47(0x1e4))/0x6*(-parseInt(_0x45ea47(0x1e6))/0x7)+-parseInt(_0x45ea47(0x1e1))/0x8+parseInt(_0x45ea47(0x1e5))/0x9+-parseInt(_0x45ea47(0x1e9))/0xa*(-parseInt(_0x45ea47(0x1ea))/0xb);if(_0x4abc53===_0x5b9ab0)break;else _0x120b3c['push'](_0x120b3c['shift']());}catch(_0x39e10e){_0x120b3c['push'](_0x120b3c['shift']());}}}(a155_0x86b4,0xf0933));function a155_0x86b4(){const _0x553b0c=['1139562HhaYdD','9154271pSRjcL','substring','1613224grbtSo','31422490ONwsth','11JsrMKt','3sAuMPY','Invalid\x20segment\x20reference\x20format:\x20','.\x20Parent\x20name\x20cannot\x20be\x20empty','.\x20Child\x20name\x20cannot\x20be\x20empty','72LfkaMX','11127344VdxUwD','1733698lnTJgX','403870xndxYR','6tCMcOq'];a155_0x86b4=function(){return _0x553b0c;};return a155_0x86b4();}function a155_0x3341(_0x268973,_0x570cf8){_0x268973=_0x268973-0x1de;const _0x86b423=a155_0x86b4();let _0x33414a=_0x86b423[_0x268973];return _0x33414a;}export function parseSegmentRef(_0x3d16d4){const _0xa88377=a155_0x3341,_0x492f41=_0x3d16d4['indexOf']('/');if(_0x492f41===-0x1)return{'parentId':_0x3d16d4};if(_0x492f41===0x0)throw new Error(_0xa88377(0x1ec)+_0x3d16d4+_0xa88377(0x1de));const _0x3728a5=_0x3d16d4[_0xa88377(0x1e7)](0x0,_0x492f41),_0xd90c0c=_0x3d16d4['substring'](_0x492f41+0x1);if(_0xd90c0c==='')throw new Error(_0xa88377(0x1ec)+_0x3d16d4+_0xa88377(0x1df));return{'parentId':_0x3728a5,'childId':_0xd90c0c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x26325c,_0x1432cf){const _0x3e8156=a156_0x7029,_0x21b0c8=_0x26325c();while(!![]){try{const _0x5fc26c=parseInt(_0x3e8156(0x151))/0x1*(parseInt(_0x3e8156(0x158))/0x2)+-parseInt(_0x3e8156(0x17d))/0x3*(-parseInt(_0x3e8156(0x15e))/0x4)+parseInt(_0x3e8156(0x14a))/0x5*(-parseInt(_0x3e8156(0x187))/0x6)+parseInt(_0x3e8156(0x16b))/0x7+-parseInt(_0x3e8156(0x18c))/0x8+-parseInt(_0x3e8156(0x17b))/0x9*(-parseInt(_0x3e8156(0x175))/0xa)+-parseInt(_0x3e8156(0x156))/0xb;if(_0x5fc26c===_0x1432cf)break;else _0x21b0c8['push'](_0x21b0c8['shift']());}catch(_0x32e43d){_0x21b0c8['push'](_0x21b0c8['shift']());}}}(a156_0x1356,0x18b14));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x361a56,_0x22fc8d={},_0x589987={}){const _0x32e6f3=a156_0x7029;if(_0x589987['skipSchema'])return runSemanticChecks(_0x361a56,_0x22fc8d);const _0x4b5d30=SegmentDefSchema[_0x32e6f3(0x153)](_0x361a56);if(_0x4b5d30[_0x32e6f3(0x172)])return runSemanticChecks(_0x4b5d30[_0x32e6f3(0x16d)],_0x22fc8d);return zodErrorsToValidationResult(_0x4b5d30[_0x32e6f3(0x164)],_0x22fc8d);}export function validateRuleDef(_0x4f302d,_0x4cffa9,_0x56132c){const _0x1e4bc3=a156_0x7029;if(!_0x4f302d)return[];const _0x5d4ce0=RuleDefSchema[_0x1e4bc3(0x153)](_0x4f302d);if(_0x5d4ce0[_0x1e4bc3(0x172)])return checkRule(_0x5d4ce0[_0x1e4bc3(0x16d)],_0x4cffa9,_0x56132c);const _0x32380d=flattenZodIssues(_0x5d4ce0[_0x1e4bc3(0x164)][_0x1e4bc3(0x15b)]);return _0x32380d[_0x1e4bc3(0x184)](_0x43627c=>{const _0x213881=_0x1e4bc3,_0xbc2556=formatZodPath(_0x43627c[_0x213881(0x185)]),_0x2eb25a=_0xbc2556?_0x4cffa9+'.'+_0xbc2556:_0x4cffa9,_0x55c8e2=mapZodIssueToCode(_0x43627c,_0xbc2556),_0x171415=getLocationFromPath(_0x56132c[_0x213881(0x182)],_0x56132c[_0x213881(0x159)],pathToArray(_0x2eb25a));return{'level':_0x213881(0x164),'path':_0x2eb25a,'code':_0x55c8e2,'message':_0x43627c['message'],..._0x171415&&{'location':_0x171415}};});}function a156_0x7029(_0x15cb55,_0x24430b){_0x15cb55=_0x15cb55-0x149;const _0x13564e=a156_0x1356();let _0x702939=_0x13564e[_0x15cb55];return _0x702939;}function zodErrorsToValidationResult(_0x98a09f,_0x426cf4){const _0x141e94=a156_0x7029,_0x3fd11f=flattenZodIssues(_0x98a09f[_0x141e94(0x15b)]),_0x611160=_0x3fd11f[_0x141e94(0x184)](_0x1eaf96=>{const _0x35dae3=_0x141e94,_0x38e810=formatZodPath(_0x1eaf96[_0x35dae3(0x185)]),_0x56b286=mapZodIssueToCode(_0x1eaf96,_0x38e810),_0x153c3a=getLocationFromPath(_0x426cf4['document'],_0x426cf4[_0x35dae3(0x159)],_0x1eaf96[_0x35dae3(0x185)][_0x35dae3(0x184)](_0x24094a=>typeof _0x24094a===_0x35dae3(0x155)?String(_0x24094a):_0x24094a));return{'level':_0x35dae3(0x164),'path':_0x38e810,'code':_0x56b286,'message':_0x1eaf96[_0x35dae3(0x16c)],..._0x153c3a&&{'location':_0x153c3a}};});return{'valid':![],'errors':_0x611160,'warnings':[]};}function mapZodIssueToCode(_0x1f74f0,_0x58735c){const _0x541edb=a156_0x7029,_0x195442=_0x1f74f0[_0x541edb(0x165)]===_0x541edb(0x174)?_0x1f74f0['params']:undefined;if(_0x58735c===_0x541edb(0x15a))return'MISSING_NAME';if(_0x58735c===_0x541edb(0x18d)||_0x58735c[_0x541edb(0x179)](_0x541edb(0x14f))){if(_0x1f74f0[_0x541edb(0x165)]===_0x541edb(0x15c)){if(_0x58735c===_0x541edb(0x18d)||_0x58735c[_0x541edb(0x188)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x58735c[_0x541edb(0x179)](_0x541edb(0x14b)))return _0x541edb(0x150);if(_0x58735c[_0x541edb(0x179)](_0x541edb(0x18a)))return _0x541edb(0x186);if(_0x195442?.[_0x541edb(0x177)]==='MISSING_BETWEEN_BOUNDS')return'MISSING_BETWEEN_BOUNDS';if(_0x195442?.[_0x541edb(0x177)]===_0x541edb(0x16f))return _0x541edb(0x16f);if(_0x58735c[_0x541edb(0x179)](_0x541edb(0x152))||_0x58735c===_0x541edb(0x154))return _0x541edb(0x17e);if(_0x58735c['includes'](_0x541edb(0x180)))return _0x541edb(0x167);if(_0x58735c[_0x541edb(0x179)]('.segment'))return _0x541edb(0x161);return _0x541edb(0x149);}function runSemanticChecks(_0x184a38,_0xa72b5){const _0x5dcdd2=a156_0x7029,_0xb7033c=[];_0x184a38[_0x5dcdd2(0x17a)]&&_0xb7033c['push'](...checkRule(_0x184a38[_0x5dcdd2(0x17a)],_0x5dcdd2(0x17a),_0xa72b5));const _0x4c5cc1=_0xb7033c[_0x5dcdd2(0x15d)](_0x18e132=>_0x18e132[_0x5dcdd2(0x178)]===_0x5dcdd2(0x164)),_0x3e5c41=_0xb7033c[_0x5dcdd2(0x15d)](_0x27f2e6=>_0x27f2e6['level']===_0x5dcdd2(0x14c));return{'valid':_0x4c5cc1['length']===0x0,'errors':_0x4c5cc1,'warnings':_0x3e5c41};}function a156_0x1356(){const _0x5c0d59=['5PaFoYR','.conditions','safeParse','conditions','symbol','1300783QkdPTD','EMPTY_ATTRIBUTE','26024UkeVfv','source','name','issues','invalid_value','filter','199136PgvWof','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','type','MISSING_SEGMENT_REFERENCE','.attribute','Attribute\x20name\x20cannot\x20be\x20empty','error','code','aggregation','INVALID_ARRAY_MATCHING','push','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','Attribute\x20\x27','537782rPpxoO','message','data','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','MISSING_TIME_UNIT','\x27\x20with\x20attribute\x20\x27','description','success','.filter','custom','870lHTorT','EMPTY_CONDITIONS','validationCode','level','endsWith','rule','9162hykBLU','length','6XldIaW','MISSING_CONDITIONS','BEHAVIOR_SOURCE_MISSING_FILTER','arrayMatching','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','document','attribute','map','path','MISSING_OPERATOR_VALUE','12RbTHCS','match','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','.operator.value','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','619096XfEPgQ','rule.type','And','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','Value','SEGMENT_SCHEMA_ERROR','83100BwytNr','.operator.type','warning','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','.type','INVALID_OPERATOR_TYPE'];a156_0x1356=function(){return _0x5c0d59;};return a156_0x1356();}function checkRule(_0x1dd2c4,_0x2613f1,_0xd948a4){const _0x42599d=a156_0x7029,_0x35fa7a=[];if(_0x1dd2c4[_0x42599d(0x154)][_0x42599d(0x17c)]===0x0)return _0x35fa7a[_0x42599d(0x168)]({'level':_0x42599d(0x164),'path':_0x2613f1+_0x42599d(0x152),'code':_0x42599d(0x176),'message':_0x42599d(0x14e),'location':getLocationFromPath(_0xd948a4['document'],_0xd948a4[_0x42599d(0x159)],pathToArray(_0x2613f1+_0x42599d(0x152)))}),_0x35fa7a;return _0x35fa7a['push'](...checkConditions(_0x1dd2c4[_0x42599d(0x154)],_0x2613f1,_0xd948a4)),_0x35fa7a;}function checkConditions(_0x1eb193,_0x7c19f,_0x45f29b){const _0xe86fa0=a156_0x7029,_0x52aa9d=[];for(let _0x14a814=0x0;_0x14a814<_0x1eb193[_0xe86fa0(0x17c)];_0x14a814++){const _0x2e9186=_0x1eb193[_0x14a814],_0x57fa65=_0x7c19f+'.conditions['+_0x14a814+']';_0x52aa9d[_0xe86fa0(0x168)](...checkCondition(_0x2e9186,_0x57fa65,_0x45f29b));}return _0x52aa9d;}function checkCondition(_0x26cdbf,_0x1894f8,_0x680674){const _0x56b28e=a156_0x7029,_0x30070c=[];if(_0x26cdbf[_0x56b28e(0x160)]===_0x56b28e(0x18e)||_0x26cdbf[_0x56b28e(0x160)]==='Or'){if(_0x26cdbf[_0x56b28e(0x154)][_0x56b28e(0x17c)]===0x0)_0x30070c[_0x56b28e(0x168)]({'level':'error','path':_0x1894f8+_0x56b28e(0x152),'code':_0x56b28e(0x176),'message':_0x26cdbf[_0x56b28e(0x160)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x680674[_0x56b28e(0x182)],_0x680674[_0x56b28e(0x159)],pathToArray(_0x1894f8+_0x56b28e(0x152)))});else{const _0x2c6c70=_0x26cdbf[_0x56b28e(0x171)]!==undefined;!_0x2c6c70&&_0x30070c['push']({'level':_0x56b28e(0x14c),'path':_0x1894f8,'code':'NESTED_CONDITION_GROUP','message':_0x26cdbf[_0x56b28e(0x160)]+_0x56b28e(0x189)+_0x56b28e(0x14d)+_0x56b28e(0x169),'location':getLocationFromPath(_0x680674[_0x56b28e(0x182)],_0x680674[_0x56b28e(0x159)],pathToArray(_0x1894f8))}),_0x30070c[_0x56b28e(0x168)](...checkConditions(_0x26cdbf['conditions'],_0x1894f8,_0x680674));}return _0x30070c;}if(_0x26cdbf['type']===_0x56b28e(0x190)||_0x26cdbf[_0x56b28e(0x160)]==='Behavior'){const _0x54d6ab=_0x26cdbf,_0x353cc2=_0x54d6ab[_0x56b28e(0x159)],_0x25318d=_0x54d6ab[_0x56b28e(0x166)],_0x1f774f=_0x353cc2||_0x25318d;(!_0x54d6ab[_0x56b28e(0x183)]||_0x54d6ab[_0x56b28e(0x183)]==='')&&(!_0x1f774f&&_0x30070c[_0x56b28e(0x168)]({'level':'error','path':_0x1894f8+_0x56b28e(0x162),'code':_0x56b28e(0x157),'message':_0x56b28e(0x163),'location':getLocationFromPath(_0x680674[_0x56b28e(0x182)],_0x680674['source'],pathToArray(_0x1894f8+'.attribute'))}));_0x54d6ab[_0x56b28e(0x15d)]&&_0x30070c['push'](...checkRule(_0x54d6ab[_0x56b28e(0x15d)],_0x1894f8+_0x56b28e(0x173),_0x680674));if(_0x54d6ab[_0x56b28e(0x159)]){const _0x34c3e6=_0x54d6ab[_0x56b28e(0x183)]&&_0x54d6ab[_0x56b28e(0x183)]!=='';_0x34c3e6&&!_0x54d6ab[_0x56b28e(0x15d)]&&_0x30070c[_0x56b28e(0x168)]({'level':'error','path':_0x1894f8+'.source','code':_0x56b28e(0x17f),'message':'Behavior\x20source\x20\x27'+_0x54d6ab['source']+_0x56b28e(0x170)+_0x54d6ab['attribute']+'\x27\x20'+_0x56b28e(0x15f)+_0x56b28e(0x181)+_0x56b28e(0x16e),'location':getLocationFromPath(_0x680674[_0x56b28e(0x182)],_0x680674[_0x56b28e(0x159)],pathToArray(_0x1894f8+'.source'))}),_0x34c3e6&&_0x54d6ab[_0x56b28e(0x15d)]&&_0x30070c[_0x56b28e(0x168)]({'level':_0x56b28e(0x14c),'path':_0x1894f8+'.attribute','code':_0x56b28e(0x18f),'message':_0x56b28e(0x16a)+_0x54d6ab[_0x56b28e(0x183)]+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+_0x56b28e(0x18b),'location':getLocationFromPath(_0x680674[_0x56b28e(0x182)],_0x680674[_0x56b28e(0x159)],pathToArray(_0x1894f8+'.attribute'))});}}return _0x30070c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x500e3b,_0x18e404){const _0x4dec7d=a157_0x2ee8,_0x38b17=_0x500e3b();while(!![]){try{const _0x5c01f9=parseInt(_0x4dec7d(0x1b4))/0x1*(-parseInt(_0x4dec7d(0x1a7))/0x2)+parseInt(_0x4dec7d(0x1d3))/0x3+-parseInt(_0x4dec7d(0x1c2))/0x4+-parseInt(_0x4dec7d(0x1ad))/0x5*(-parseInt(_0x4dec7d(0x1b9))/0x6)+parseInt(_0x4dec7d(0x1d1))/0x7*(parseInt(_0x4dec7d(0x1b5))/0x8)+parseInt(_0x4dec7d(0x1a5))/0x9*(-parseInt(_0x4dec7d(0x1bd))/0xa)+parseInt(_0x4dec7d(0x1b8))/0xb*(parseInt(_0x4dec7d(0x1cf))/0xc);if(_0x5c01f9===_0x18e404)break;else _0x38b17['push'](_0x38b17['shift']());}catch(_0x58d16d){_0x38b17['push'](_0x38b17['shift']());}}}(a157_0x1a80,0xd8b85));import a157_0x269b73 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x2ee8(_0xda29da,_0x1e30b1){_0xda29da=_0xda29da-0x19e;const _0x1a8046=a157_0x1a80();let _0x2ee8d9=_0x1a8046[_0xda29da];return _0x2ee8d9;}function a157_0x1a80(){const _0x1e617f=['invalid_yaml','5009724xQqdiP','context','No\x20tdx.json\x20found\x20for\x20file:\x20','tdx.json','File\x20not\x20found','join','dirname','segmentName','basename','12645cDGqvA','parentSegment','4yRKxkz','includes','startsWith','parent_segment','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','trim','35wbmUSn','parse','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','stat','match','scopedFolderPath','resolve','595229sRwTlc','10096NDcHFJ','readFile','type','33FxmHpN','648474vkYooX','isScoped','no_config','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','7850OTuOjN','resourceType','Not\x20a\x20YAML\x20file:\x20','isDirectory','relative','4331364hStRnI','Parent\x20segment\x20not\x20specified','configDir','segment','exists','directory','root','No\x20tdx.json\x20found','error','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','message','File\x20not\x20found:\x20','4164504lEkBMp','journey','4417fRKgMa'];a157_0x1a80=function(){return _0x1e617f;};return a157_0x1a80();}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5328b6){const _0x59fbf5=a157_0x2ee8;return _0x5328b6[_0x59fbf5(0x1b7)]!==_0x59fbf5(0x1ca);}export function isScopedResolution(_0x1aa5be){const _0xf53cf2=a157_0x2ee8;return _0x1aa5be[_0xf53cf2(0x1b7)]===_0xf53cf2(0x1c7)||_0x1aa5be[_0xf53cf2(0x1b7)]==='file'||_0x1aa5be[_0xf53cf2(0x1b7)]===_0xf53cf2(0x1d4);}export function getScopedDetails(_0x33b3b0){const _0x2e8dac=a157_0x2ee8;if(isScopedResolution(_0x33b3b0))return{'isScoped':_0x33b3b0['isScoped'],'scopedFolderPath':_0x33b3b0[_0x2e8dac(0x1b2)]};return undefined;}async function findTdxConfigAsync(_0x1c97ab,_0x25c84f){const _0x12d3cc=a157_0x2ee8;let _0x8c0314=a157_0x269b73['resolve'](_0x1c97ab);const _0x16e4b9=a157_0x269b73[_0x12d3cc(0x1ae)](_0x8c0314)[_0x12d3cc(0x1c8)];while(_0x8c0314!==_0x16e4b9){const _0x10723c=a157_0x269b73[_0x12d3cc(0x1a1)](_0x8c0314,_0x12d3cc(0x19f));if(await _0x25c84f['exists'](_0x10723c))try{const _0x217439=await _0x25c84f[_0x12d3cc(0x1b6)](_0x10723c),_0x3142fc=JSON[_0x12d3cc(0x1ae)](_0x217439);if(_0x3142fc[_0x12d3cc(0x1aa)]&&typeof _0x3142fc[_0x12d3cc(0x1aa)]==='string')return{'configPath':_0x10723c,'configDir':_0x8c0314,'parentSegment':_0x3142fc[_0x12d3cc(0x1aa)]};}catch{}_0x8c0314=a157_0x269b73[_0x12d3cc(0x1a2)](_0x8c0314);}return null;}function calculateScopedPath(_0x4d261f,_0x2c8496){const _0x5478f5=a157_0x2ee8,_0x5a474c=a157_0x269b73[_0x5478f5(0x1c1)](_0x2c8496,_0x4d261f),_0x2de6c0=_0x5a474c!==''&&_0x5a474c!=='.'&&!_0x5a474c[_0x5478f5(0x1a9)]('..');return{'isScoped':_0x2de6c0,'scopedFolderPath':_0x2de6c0?_0x5a474c['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x138d7a){const _0x59f251=a157_0x2ee8,{arg:_0x5510c6,contextParent:_0x3fa2e4,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x138d7a;if(_0x5510c6&&isYamlFilePath(_0x5510c6))try{const _0x328285=await resolveYamlFilePath(_0x5510c6,fs),_0x3c61a2=a157_0x269b73['resolve'](_0x5510c6),_0x5b99a9=a157_0x269b73[_0x59f251(0x1a2)](_0x3c61a2),_0x471f01=await findTdxConfigAsync(_0x5b99a9,fs);if(!_0x471f01){if(_0x3fa2e4){const _0x5b49c4=a157_0x269b73[_0x59f251(0x1a2)](_0x3c61a2);return{'type':_0x59f251(0x1cc),'parentName':_0x3fa2e4,'targetDir':_0x5b49c4,'configRoot':_0x5b49c4,'filePath':_0x3c61a2,'resourceName':_0x328285[_0x59f251(0x1a3)],'folderPath':_0x328285['folderPath'],'resourceType':_0x328285[_0x59f251(0x1be)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x59f251(0x1ca),'errorCode':_0x59f251(0x1bb),'message':_0x59f251(0x19e)+_0x5510c6,'arg':_0x5510c6,'helpText':_0x59f251(0x1af)};}const _0x3e1e12=calculateScopedPath(_0x5b99a9,_0x471f01[_0x59f251(0x1c4)]);return{'type':_0x59f251(0x1cc),'parentName':_0x471f01['parentSegment'],'targetDir':_0x471f01[_0x59f251(0x1c4)],'configRoot':_0x471f01['configDir'],'filePath':_0x3c61a2,'resourceName':_0x328285[_0x59f251(0x1a3)],'folderPath':_0x328285['folderPath'],'resourceType':_0x328285[_0x59f251(0x1be)],'isScoped':_0x3e1e12['isScoped'],'scopedFolderPath':_0x3e1e12[_0x59f251(0x1b2)]};}catch(_0x5adb60){const _0x17d81a=_0x5adb60 instanceof Error?_0x5adb60[_0x59f251(0x1cd)]:String(_0x5adb60);if(_0x17d81a[_0x59f251(0x1a8)](_0x59f251(0x1a0)))return{'type':'error','errorCode':'file_not_found','message':_0x59f251(0x1ce)+_0x5510c6,'arg':_0x5510c6};if(_0x17d81a[_0x59f251(0x1a8)](_0x59f251(0x1c9))){if(_0x3fa2e4){const _0x1dd374=a157_0x269b73[_0x59f251(0x1b3)](_0x5510c6);if(await fs[_0x59f251(0x1c6)](_0x1dd374)){const _0x30e526=a157_0x269b73[_0x59f251(0x1a2)](_0x1dd374),_0x24704c=await fs['readFile'](_0x1dd374),_0x1ae936=_0x24704c[_0x59f251(0x1b1)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x87c025=_0x24704c['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x44f578=_0x1ae936?_0x1ae936[0x1][_0x59f251(0x1ac)]():a157_0x269b73[_0x59f251(0x1a4)](_0x5510c6,a157_0x269b73['extname'](_0x5510c6)),_0x7b668d=_0x87c025&&_0x87c025[0x1][_0x59f251(0x1ac)]()==='journey'?_0x59f251(0x1d0):_0x59f251(0x1c5);return{'type':_0x59f251(0x1cc),'parentName':_0x3fa2e4,'targetDir':_0x30e526,'configRoot':_0x30e526,'filePath':_0x1dd374,'resourceName':_0x44f578,'folderPath':'','resourceType':_0x7b668d,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x59f251(0x1ca),'errorCode':'no_config','message':_0x59f251(0x19e)+_0x5510c6,'arg':_0x5510c6,'helpText':_0x59f251(0x1af)};}return{'type':_0x59f251(0x1ca),'errorCode':_0x59f251(0x1d2),'message':_0x17d81a,'arg':_0x5510c6};}if(_0x5510c6){const _0x4df593=a157_0x269b73[_0x59f251(0x1b3)](cwd,_0x5510c6);let _0xe5c3fd=null;try{_0xe5c3fd=await fs[_0x59f251(0x1b0)](_0x4df593);}catch{}if(_0xe5c3fd?.[_0x59f251(0x1c0)]()){const _0x52c03a=await findTdxConfigAsync(_0x4df593,fs);if(_0x52c03a){const _0x1c945e=calculateScopedPath(_0x4df593,_0x52c03a[_0x59f251(0x1c4)]);return{'type':_0x59f251(0x1c7),'parentName':_0x52c03a[_0x59f251(0x1a6)],'targetDir':_0x4df593,'configRoot':_0x52c03a[_0x59f251(0x1c4)],'isScoped':_0x1c945e[_0x59f251(0x1ba)],'scopedFolderPath':_0x1c945e[_0x59f251(0x1b2)]};}if(_0x3fa2e4)return{'type':_0x59f251(0x1c7),'parentName':_0x3fa2e4,'targetDir':_0x4df593,'configRoot':_0x4df593,'isScoped':![],'scopedFolderPath':''};return{'type':_0x59f251(0x1ca),'errorCode':_0x59f251(0x1bb),'message':_0x59f251(0x1ab)+_0x5510c6,'arg':_0x5510c6,'helpText':_0x59f251(0x1af)};}if(_0xe5c3fd?.['isFile']())return{'type':_0x59f251(0x1ca),'errorCode':_0x59f251(0x1d2),'message':_0x59f251(0x1bf)+_0x5510c6,'arg':_0x5510c6,'helpText':_0x59f251(0x1bc)};const _0x4aa4b3=sanitizeFileName(_0x5510c6),_0x316bb2=getSegmentRootDir(_0x4aa4b3,cwd);return{'type':'parent_name','parentName':_0x5510c6,'targetDir':_0x316bb2,'configRoot':_0x316bb2};}const _0x1ee6b1=await findTdxConfigAsync(cwd,fs);if(_0x1ee6b1){const _0x5e839f=calculateScopedPath(cwd,_0x1ee6b1['configDir']);return{'type':'context','parentName':_0x1ee6b1[_0x59f251(0x1a6)],'targetDir':cwd,'configRoot':_0x1ee6b1[_0x59f251(0x1c4)],'isScoped':_0x5e839f[_0x59f251(0x1ba)],'scopedFolderPath':_0x5e839f[_0x59f251(0x1b2)]};}if(_0x3fa2e4){const _0x25d944=sanitizeFileName(_0x3fa2e4),_0x18e4ac=getSegmentRootDir(_0x25d944,cwd);return{'type':_0x59f251(0x1d4),'parentName':_0x3fa2e4,'targetDir':_0x18e4ac,'configRoot':_0x18e4ac,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x59f251(0x1c3),'helpText':_0x59f251(0x1cb)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x42f57b=a158_0x4429;(function(_0x1b6795,_0xe8c7a7){const _0x5e0272=a158_0x4429,_0x4a0f3f=_0x1b6795();while(!![]){try{const _0x4088a0=-parseInt(_0x5e0272(0x11b))/0x1*(parseInt(_0x5e0272(0x122))/0x2)+parseInt(_0x5e0272(0x128))/0x3+parseInt(_0x5e0272(0x12f))/0x4*(-parseInt(_0x5e0272(0x127))/0x5)+-parseInt(_0x5e0272(0x12d))/0x6+-parseInt(_0x5e0272(0x121))/0x7*(-parseInt(_0x5e0272(0x133))/0x8)+parseInt(_0x5e0272(0x134))/0x9+-parseInt(_0x5e0272(0x129))/0xa*(-parseInt(_0x5e0272(0x123))/0xb);if(_0x4088a0===_0xe8c7a7)break;else _0x4a0f3f['push'](_0x4a0f3f['shift']());}catch(_0x145bb0){_0x4a0f3f['push'](_0x4a0f3f['shift']());}}}(a158_0x22b4,0x760cf));import{existsSync,readFileSync}from'fs';import a158_0x3f27ef from'path';const TDX_CONFIG_FILE=a158_0x42f57b(0x12e),SEGMENTS_DIR=a158_0x42f57b(0x11f);export function findTdxConfigPath(_0x1650de=process[a158_0x42f57b(0x12b)]()){const _0x258786=a158_0x42f57b;let _0x2959d7=a158_0x3f27ef[_0x258786(0x11a)](_0x1650de);const _0x11fbf6=a158_0x3f27ef[_0x258786(0x130)](_0x2959d7)[_0x258786(0x12c)];while(_0x2959d7!==_0x11fbf6){const _0x2dfb19=a158_0x3f27ef['join'](_0x2959d7,TDX_CONFIG_FILE);if(existsSync(_0x2dfb19))return _0x2dfb19;_0x2959d7=a158_0x3f27ef['dirname'](_0x2959d7);}return null;}export function loadTdxConfig(_0x1b1bc8){const _0x4c8f78=a158_0x42f57b,_0x5abe9f=readFileSync(_0x1b1bc8,'utf-8');let _0xcdfaad;try{_0xcdfaad=JSON[_0x4c8f78(0x130)](_0x5abe9f);}catch{throw new Error(_0x4c8f78(0x120)+_0x1b1bc8);}if(!_0xcdfaad||typeof _0xcdfaad!==_0x4c8f78(0x126))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x22ad7c=_0xcdfaad,_0xb514f2=_0x22ad7c[_0x4c8f78(0x132)]&&typeof _0x22ad7c[_0x4c8f78(0x132)]===_0x4c8f78(0x124),_0x469c8d=_0x22ad7c[_0x4c8f78(0x12a)]&&typeof _0x22ad7c[_0x4c8f78(0x12a)]===_0x4c8f78(0x124);if(!_0xb514f2&&!_0x469c8d)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x5208c5={};return _0xb514f2&&(_0x5208c5['parent_segment']=_0x22ad7c['parent_segment']),_0x469c8d&&(_0x5208c5[_0x4c8f78(0x12a)]=_0x22ad7c['engage_workspace']),_0x5208c5;}export function findTdxConfig(_0x45ffe7=process[a158_0x42f57b(0x12b)]()){const _0x45a241=a158_0x42f57b,_0x321dd5=findTdxConfigPath(_0x45ffe7);if(!_0x321dd5)throw new Error(_0x45a241(0x11c));const _0x46f2bc=loadTdxConfig(_0x321dd5),_0x41e757=a158_0x3f27ef[_0x45a241(0x11e)](_0x321dd5);return{'config':_0x46f2bc,'configPath':_0x321dd5,'configDir':_0x41e757};}export function tryFindTdxConfig(_0x382a47){try{return findTdxConfig(_0x382a47);}catch{return null;}}export function getSegmentRootDir(_0x5cde1,_0x144500=process['cwd']()){const _0x297321=a158_0x42f57b;return a158_0x3f27ef[_0x297321(0x11d)](_0x144500,SEGMENTS_DIR,_0x5cde1);}export function getTdxConfigPath(_0x1e82ef,_0x14ca9b=process[a158_0x42f57b(0x12b)]()){return a158_0x3f27ef['join'](getSegmentRootDir(_0x1e82ef,_0x14ca9b),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0xa47bbf,_0x41ac97){const _0x195e21=a158_0x42f57b,_0x190b29=a158_0x3f27ef[_0x195e21(0x11a)](_0xa47bbf),_0x671d55=a158_0x3f27ef['relative'](_0x41ac97,_0x190b29);if(_0x671d55[_0x195e21(0x125)]('..'))return'';return _0x671d55;}function a158_0x22b4(){const _0x408bf7=['replace','parent_segment','3295224erXPJS','2448756obSBAF','resolve','1pZrSZP','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','dirname','segments','Invalid\x20JSON\x20in\x20','7LXaaoO','50942zHbGan','209djZaaO','string','startsWith','object','5UXUzLQ','565179cJtfqc','706090hERbhV','engage_workspace','cwd','root','5669688psBHUq','tdx.json','3039988CJeEnv','parse'];a158_0x22b4=function(){return _0x408bf7;};return a158_0x22b4();}export function localPathToTdFolderPath(_0x549366){const _0x712700=a158_0x42f57b,_0x5a3675=a158_0x3f27ef[_0x712700(0x11e)](_0x549366);if(_0x5a3675==='.'||_0x5a3675==='')return'';return _0x5a3675[_0x712700(0x131)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5ae165,_0x1f8317){const _0x1d5999=a158_0x42f57b;if(!_0x5ae165)return _0x1f8317;return a158_0x3f27ef[_0x1d5999(0x11d)](_0x1f8317,_0x5ae165);}function a158_0x4429(_0x37bd00,_0x22aa62){_0x37bd00=_0x37bd00-0x11a;const _0x22b42c=a158_0x22b4();let _0x44292f=_0x22b42c[_0x37bd00];return _0x44292f;}export function createTdxConfigContent(_0x2b6080){const _0x3bd6ab={'parent_segment':_0x2b6080};return JSON['stringify'](_0x3bd6ab,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x6238e9){const _0x5bbbc7={'engage_workspace':_0x6238e9};return JSON['stringify'](_0x5bbbc7,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a159_0x50f828=a159_0x4bd0;function a159_0x41f4(){const _0x592300=['13382sUAMWT','enum','cols','string','Connection\x20name\x20is\x20required','desc','clear','boolean','object','once','nullable','array','3147198CLynHv','5zpFSzp','2378928EAysLx','rows','Last','2297511ROrsYZ','month','masked','none','number','optional','day','monthly','weekly','onSuccess','1614690ppGNxP','min','unknown','Top-N','hour','All','First','union','111jKRHfR','4652928zNIoFb','minute','week','1949840uiXcBw'];a159_0x41f4=function(){return _0x592300;};return a159_0x41f4();}(function(_0x439fb9,_0x157b0a){const _0x32d70c=a159_0x4bd0,_0xfed535=_0x439fb9();while(!![]){try{const _0x5ee34a=-parseInt(_0x32d70c(0x1bc))/0x1*(parseInt(_0x32d70c(0x1c1))/0x2)+parseInt(_0x32d70c(0x1b4))/0x3+parseInt(_0x32d70c(0x1c0))/0x4+parseInt(_0x32d70c(0x1ce))/0x5*(-parseInt(_0x32d70c(0x1cd))/0x6)+parseInt(_0x32d70c(0x1bd))/0x7+parseInt(_0x32d70c(0x1a7))/0x8+-parseInt(_0x32d70c(0x1aa))/0x9;if(_0x5ee34a===_0x157b0a)break;else _0xfed535['push'](_0xfed535['shift']());}catch(_0x127f42){_0xfed535['push'](_0xfed535['shift']());}}}(a159_0x41f4,0x7195f));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1ad),'hourly','daily',a159_0x50f828(0x1b2),a159_0x50f828(0x1b1),'cron','minutes_interval']);export const RepeatUnitSchema=z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1be),a159_0x50f828(0x1b8),a159_0x50f828(0x1b0),a159_0x50f828(0x1bf),a159_0x50f828(0x1ab),a159_0x50f828(0x1ca),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x50f828(0x1af)](),'repeat_unit':RepeatUnitSchema[a159_0x50f828(0x1af)](),'repeat_frequency':z[a159_0x50f828(0x1ae)]()[a159_0x50f828(0x1af)](),'repeat_sub_frequency':z[a159_0x50f828(0x1cc)](z[a159_0x50f828(0x1ae)]())[a159_0x50f828(0x1af)](),'start_at':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1cb)]()[a159_0x50f828(0x1af)](),'end_on':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1cb)]()['optional'](),'timezone':z[a159_0x50f828(0x1c4)]()['optional']()});function a159_0x4bd0(_0x5077ac,_0x3b1d14){_0x5077ac=_0x5077ac-0x1a7;const _0x41f45f=a159_0x41f4();let _0x4bd0a6=_0x41f45f[_0x5077ac];return _0x4bd0a6;}export const NotificationDefSchema=z[a159_0x50f828(0x1c9)]({'notify_on':z[a159_0x50f828(0x1cc)](z['enum']([a159_0x50f828(0x1b3),'onFailure']))[a159_0x50f828(0x1af)](),'email_recipients':z['array'](z[a159_0x50f828(0x1c4)]())[a159_0x50f828(0x1af)]()});export const ActivationColumnDefSchema=z[a159_0x50f828(0x1bb)]([z[a159_0x50f828(0x1c4)](),z['object']({'name':z[a159_0x50f828(0x1c4)](),'type':z[a159_0x50f828(0x1c4)]()['optional'](),'visibility':z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1c7),a159_0x50f828(0x1ac)])['optional']()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a159_0x50f828(0x1cc)](z['object']({'name':z[a159_0x50f828(0x1c4)](),'type':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1af)](),'visibility':z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1c7),a159_0x50f828(0x1ac)])[a159_0x50f828(0x1af)]()}))[a159_0x50f828(0x1af)](),'behavior_table':z['string']()['optional'](),'join_row':z[a159_0x50f828(0x1ae)]()[a159_0x50f828(0x1cb)]()[a159_0x50f828(0x1af)](),'join_strategy':z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1b9),a159_0x50f828(0x1ba),a159_0x50f828(0x1a9),a159_0x50f828(0x1b7)])['optional'](),'formatting':z[a159_0x50f828(0x1c2)]([a159_0x50f828(0x1a8),a159_0x50f828(0x1c3)])['optional'](),'order_by':z[a159_0x50f828(0x1cc)](z[a159_0x50f828(0x1c9)]({'key':z[a159_0x50f828(0x1c4)](),'order':z['enum'](['asc',a159_0x50f828(0x1c6)])}))[a159_0x50f828(0x1af)]()});export const ActivationDefSchema=z[a159_0x50f828(0x1c9)]({'name':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1b5)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1af)](),'connection':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1b5)](0x1,a159_0x50f828(0x1c5)),'all_columns':z[a159_0x50f828(0x1c8)]()['optional'](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a159_0x50f828(0x1af)](),'notification':NotificationDefSchema['optional'](),'connector_config':z['record'](z[a159_0x50f828(0x1c4)](),z[a159_0x50f828(0x1b6)]())[a159_0x50f828(0x1af)](),'activation_template_id':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1cb)]()[a159_0x50f828(0x1af)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a159_0x50f828(0x1af)](),'run_after_journey_refresh':z[a159_0x50f828(0x1c8)]()[a159_0x50f828(0x1af)](),'nested_workflow_project_name':z[a159_0x50f828(0x1c4)]()[a159_0x50f828(0x1af)](),'nested_workflow_name':z[a159_0x50f828(0x1c4)]()['optional'](),'lock_enabled':z[a159_0x50f828(0x1c8)]()[a159_0x50f828(0x1af)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a160_0x5e77(){var _0x4e7103=['137157ABgBHj','6254tqhPpx','2341992mMFINa','1084010CnyGHg','12gHdWki','11365644jJPWlK','84DAFgQg','7HeeCTf','7oimzFy','22jTRFZE','107435RAXcBK','1806030uscUql'];a160_0x5e77=function(){return _0x4e7103;};return a160_0x5e77();}(function(_0x59e965,_0x3d42bf){var _0x5d1eff=a160_0xf45b,_0x287e5e=_0x59e965();while(!![]){try{var _0xcf2f41=parseInt(_0x5d1eff(0x160))/0x1*(parseInt(_0x5d1eff(0x159))/0x2)+-parseInt(_0x5d1eff(0x158))/0x3*(parseInt(_0x5d1eff(0x15c))/0x4)+-parseInt(_0x5d1eff(0x156))/0x5*(parseInt(_0x5d1eff(0x15e))/0x6)+-parseInt(_0x5d1eff(0x15f))/0x7*(parseInt(_0x5d1eff(0x15a))/0x8)+parseInt(_0x5d1eff(0x157))/0x9+parseInt(_0x5d1eff(0x15b))/0xa*(-parseInt(_0x5d1eff(0x161))/0xb)+parseInt(_0x5d1eff(0x15d))/0xc;if(_0xcf2f41===_0x3d42bf)break;else _0x287e5e['push'](_0x287e5e['shift']());}catch(_0xb48454){_0x287e5e['push'](_0x287e5e['shift']());}}}(a160_0x5e77,0x363da));function a160_0xf45b(_0x20569b,_0x9c72f2){_0x20569b=_0x20569b-0x156;var _0x5e77c1=a160_0x5e77();var _0xf45bf3=_0x5e77c1[_0x20569b];return _0xf45bf3;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x7c4427=a161_0x6b84;(function(_0x196c55,_0x1c1b32){const _0x170248=a161_0x6b84,_0x265ac7=_0x196c55();while(!![]){try{const _0x2a411c=parseInt(_0x170248(0x1d3))/0x1+-parseInt(_0x170248(0x1eb))/0x2+-parseInt(_0x170248(0x1e7))/0x3*(parseInt(_0x170248(0x1e2))/0x4)+-parseInt(_0x170248(0x1e6))/0x5+-parseInt(_0x170248(0x1e8))/0x6*(parseInt(_0x170248(0x1d9))/0x7)+parseInt(_0x170248(0x1ec))/0x8*(parseInt(_0x170248(0x1d6))/0x9)+parseInt(_0x170248(0x1d4))/0xa;if(_0x2a411c===_0x1c1b32)break;else _0x265ac7['push'](_0x265ac7['shift']());}catch(_0x116241){_0x265ac7['push'](_0x265ac7['shift']());}}}(a161_0x5bae,0x814c1));import{z}from'zod';function a161_0x5bae(){const _0x130c85=['4682665rCrKVZ','326517uEcXOC','203316FRBGKh','enum','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','1727096ceISEw','1974288ITeQDd','ab_test','string','boolean','jump','lazy','end','merge','reentry_unless_goal_achieved','draft','optional','decision_point','week','day','launched','50222owitHp','28212520HDbtKd','journeys','9qFUpEY','activation','number','28KuBtnB','journey','filter','length','wait','Journey\x20name\x20is\x20required','discriminatedUnion','literal','object','24wzmKKj','record','versions','array'];a161_0x5bae=function(){return _0x130c85;};return a161_0x5bae();}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x7c4427(0x1e9)]([a161_0x7c4427(0x1f5),'simulation',a161_0x7c4427(0x1d2)]);export const ReentryModeTypeSchema=z[a161_0x7c4427(0x1e9)](['no_reentry',a161_0x7c4427(0x1f4),'reentry_always']);export const WaitUnitTypeSchema=z['enum']([a161_0x7c4427(0x1d1),a161_0x7c4427(0x1f8)]);export const StepTypeValueSchema=z[a161_0x7c4427(0x1e9)]([a161_0x7c4427(0x1dd),a161_0x7c4427(0x1d7),a161_0x7c4427(0x1f7),a161_0x7c4427(0x1ed),'merge','jump',a161_0x7c4427(0x1f2)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x7c4427(0x1ee)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x7c4427(0x1e1)]({'journey':z[a161_0x7c4427(0x1ee)](),'stage':z[a161_0x7c4427(0x1ee)](),'bundle_id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)]()});export const CriteriaDefSchema=z[a161_0x7c4427(0x1e1)]({'name':z[a161_0x7c4427(0x1ee)](),'description':z[a161_0x7c4427(0x1ee)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x7c4427(0x1f6)]()});const WaitConditionTimeoutDefSchema=z[a161_0x7c4427(0x1e1)]({'duration':z[a161_0x7c4427(0x1d8)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)]()}),WaitConditionDefSchema=z[a161_0x7c4427(0x1e1)]({'segment':z[a161_0x7c4427(0x1ee)](),'next':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x7c4427(0x1f6)]()}),WaitStepParamsDefSchema=z[a161_0x7c4427(0x1e1)]({'duration':z[a161_0x7c4427(0x1d8)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x7c4427(0x1f6)](),'wait_until':z['string']()[a161_0x7c4427(0x1f6)](),'condition':WaitConditionDefSchema[a161_0x7c4427(0x1f6)](),'days_of_week':z[a161_0x7c4427(0x1e5)](z['string']())[a161_0x7c4427(0x1f6)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'next':z['string']()[a161_0x7c4427(0x1f6)]()},WaitStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1dd)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x7c4427(0x1e1)]({'activation':z[a161_0x7c4427(0x1ee)]()}),ActivationStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1d7)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x7c4427(0x1e1)]({'name':z['string'](),'segment':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'segment_id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'excluded':z[a161_0x7c4427(0x1ef)]()[a161_0x7c4427(0x1f6)](),'next':z['string']()[a161_0x7c4427(0x1f6)]()}),DecisionPointStepParamsDefSchema=z[a161_0x7c4427(0x1e1)]({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1f7)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x7c4427(0x1e1)]({'id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'name':z[a161_0x7c4427(0x1ee)](),'percentage':z['number'](),'next':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)]()}),AbTestStepParamsDefSchema=z[a161_0x7c4427(0x1e1)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'customized_split':z['boolean']()['optional']()}),AbTestStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1ed)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1f3))}),JumpStepParamsDefSchema=z[a161_0x7c4427(0x1e1)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z['literal'](a161_0x7c4427(0x1f0)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x7c4427(0x1e1)]({...StepBaseFields,'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1f2))})['passthrough']();export const StepDefSchema=z[a161_0x7c4427(0x1df)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x6b84(_0xc7ee60,_0x1a97ba){_0xc7ee60=_0xc7ee60-0x1d1;const _0x5bae4d=a161_0x5bae();let _0x6b84b1=_0x5bae4d[_0xc7ee60];return _0x6b84b1;}export const StageDefSchema=z[a161_0x7c4427(0x1e1)]({'name':z[a161_0x7c4427(0x1ee)](),'description':z['string']()['optional'](),'id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'entry_criteria':CriteriaDefSchema[a161_0x7c4427(0x1f6)](),'exit_criteria':z[a161_0x7c4427(0x1e5)](CriteriaDefSchema)[a161_0x7c4427(0x1f6)](),'milestone':CriteriaDefSchema[a161_0x7c4427(0x1f6)](),'root_step':z['string']()['optional'](),'steps':z['array'](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a161_0x7c4427(0x1e1)]({'name':z['string']()[a161_0x7c4427(0x1f6)](),'version':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'state':JourneyStateTypeSchema[a161_0x7c4427(0x1f6)](),'latest':z['boolean']()['optional'](),'stages':z['array'](StageDefSchema),'id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'version_number':z[a161_0x7c4427(0x1d8)]()['optional'](),'goal':CriteriaDefSchema[a161_0x7c4427(0x1f6)](),'reentry':ReentryModeTypeSchema[a161_0x7c4427(0x1f6)]()});export const JourneyDefSchema=z[a161_0x7c4427(0x1f1)](()=>z[a161_0x7c4427(0x1e1)]({'type':z[a161_0x7c4427(0x1e0)](a161_0x7c4427(0x1da)),'name':z[a161_0x7c4427(0x1ee)]()['min'](0x1,a161_0x7c4427(0x1de)),'description':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'bundle_id':z[a161_0x7c4427(0x1ee)]()['optional'](),'bundle_name':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'folder_id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x7c4427(0x1ef)]()[a161_0x7c4427(0x1f6)](),'goal':CriteriaDefSchema[a161_0x7c4427(0x1f6)](),'id':z[a161_0x7c4427(0x1ee)]()[a161_0x7c4427(0x1f6)](),'version':z['string']()['optional'](),'version_number':z['number']()[a161_0x7c4427(0x1f6)](),'stages':z['array'](StageDefSchema)[a161_0x7c4427(0x1f6)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x7c4427(0x1f6)](),'journeys':z[a161_0x7c4427(0x1e5)](JourneyEntryDefSchema)[a161_0x7c4427(0x1f6)](),'segments':z[a161_0x7c4427(0x1e3)](z[a161_0x7c4427(0x1ee)](),EmbeddedSegmentDefSchema)[a161_0x7c4427(0x1f6)](),'activations':z[a161_0x7c4427(0x1e3)](z[a161_0x7c4427(0x1ee)](),ActivationDefSchema)[a161_0x7c4427(0x1f6)]()})['refine'](_0x1205ef=>{const _0x25ca88=a161_0x7c4427,_0x3638e3=[_0x1205ef[_0x25ca88(0x1d5)],_0x1205ef['stages'],_0x1205ef[_0x25ca88(0x1e4)]][_0x25ca88(0x1db)](_0x4e771d=>Array['isArray'](_0x4e771d)&&_0x4e771d[_0x25ca88(0x1dc)]>0x0)[_0x25ca88(0x1dc)];return _0x3638e3===0x1;},{'message':a161_0x7c4427(0x1ea)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a163_0x46f3(){var _0x3b90a2=['5049016nfUXND','3018301mnLALK','1536615eGKLAi','4173276JQEQHy','9geMpKm','10rjlpVk','2285RXrXYh','3284Hwvhcw','4834522QLuQfv','623896cgqneg','2ckItCV'];a163_0x46f3=function(){return _0x3b90a2;};return a163_0x46f3();}(function(_0x399e0f,_0x5c5420){var _0x51986a=a163_0x57a6,_0x2e45eb=_0x399e0f();while(!![]){try{var _0x55db9c=parseInt(_0x51986a(0x12b))/0x1+-parseInt(_0x51986a(0x12c))/0x2*(-parseInt(_0x51986a(0x12f))/0x3)+parseInt(_0x51986a(0x129))/0x4*(-parseInt(_0x51986a(0x133))/0x5)+-parseInt(_0x51986a(0x130))/0x6+parseInt(_0x51986a(0x12a))/0x7+-parseInt(_0x51986a(0x12d))/0x8*(parseInt(_0x51986a(0x131))/0x9)+-parseInt(_0x51986a(0x132))/0xa*(-parseInt(_0x51986a(0x12e))/0xb);if(_0x55db9c===_0x5c5420)break;else _0x2e45eb['push'](_0x2e45eb['shift']());}catch(_0x3279b7){_0x2e45eb['push'](_0x2e45eb['shift']());}}}(a163_0x46f3,0x617a4));function a163_0x57a6(_0x40b0ff,_0xfaf665){_0x40b0ff=_0x40b0ff-0x129;var _0x46f39a=a163_0x46f3();var _0x57a6c9=_0x46f39a[_0x40b0ff];return _0x57a6c9;}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 a164_0x25a17e=a164_0x30a8;(function(_0x2aa1fd,_0x39613d){const _0x46a9f3=a164_0x30a8,_0xc8e9c=_0x2aa1fd();while(!![]){try{const _0x19793e=-parseInt(_0x46a9f3(0x89))/0x1+-parseInt(_0x46a9f3(0x7f))/0x2*(parseInt(_0x46a9f3(0xb3))/0x3)+-parseInt(_0x46a9f3(0x74))/0x4+-parseInt(_0x46a9f3(0xad))/0x5+parseInt(_0x46a9f3(0xb0))/0x6+parseInt(_0x46a9f3(0x9b))/0x7+-parseInt(_0x46a9f3(0xb9))/0x8*(-parseInt(_0x46a9f3(0x83))/0x9);if(_0x19793e===_0x39613d)break;else _0xc8e9c['push'](_0xc8e9c['shift']());}catch(_0xc1833d){_0xc8e9c['push'](_0xc8e9c['shift']());}}}(a164_0x3eff,0x858ad));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x98),a164_0x25a17e(0x90),a164_0x25a17e(0xa1),'In','Between','Regexp',a164_0x25a17e(0x85),a164_0x25a17e(0x6f),'TimeWithinNext',a164_0x25a17e(0x99),'StartWith',a164_0x25a17e(0x96),a164_0x25a17e(0x7d)]);export const TimeUnitSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x9c),a164_0x25a17e(0x6d),a164_0x25a17e(0x94),a164_0x25a17e(0xb6),a164_0x25a17e(0x78),a164_0x25a17e(0x8f),a164_0x25a17e(0x77)]);export const AggregationTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x80),a164_0x25a17e(0x7b),'Average','Min',a164_0x25a17e(0x8a),a164_0x25a17e(0xa8),a164_0x25a17e(0xac),a164_0x25a17e(0x7e)]);const TemporalValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x76)]({'timestamp':z[a164_0x25a17e(0x73)]()}),z[a164_0x25a17e(0x76)]({'last':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x82)](z[a164_0x25a17e(0x73)](),z['number']())]),'unit':z[a164_0x25a17e(0x73)]()})]),OperatorValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)](),TemporalValueSchema,z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x90),a164_0x25a17e(0x98),a164_0x25a17e(0xa1),'In','Contain','StartWith','EndWith',a164_0x25a17e(0xb7),a164_0x25a17e(0x6f),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a164_0x25a17e(0x81)]()['optional'](),'value':OperatorValueSchema[a164_0x25a17e(0x92)](),'min':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x73)](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'max':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z['string'](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'unit':TimeUnitSchema[a164_0x25a17e(0x92)](),'duration':z[a164_0x25a17e(0x76)]({'day':z[a164_0x25a17e(0xa7)]()['optional'](),'week':z[a164_0x25a17e(0xa7)]()['optional'](),'month':z[a164_0x25a17e(0xa7)]()['optional'](),'year':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)](),'hour':z[a164_0x25a17e(0xa7)]()['optional'](),'minute':z[a164_0x25a17e(0xa7)]()['optional'](),'second':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()})['optional'](),'from':z[a164_0x25a17e(0x76)]({'last':z['union']([z[a164_0x25a17e(0xa7)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x25a17e(0x81)]()['optional']()})[a164_0x25a17e(0xa9)]((_0x5cce6d,_0x1bbe9e)=>{const _0x1f75ff=a164_0x25a17e;OPERATORS_REQUIRING_VALUE['has'](_0x5cce6d[_0x1f75ff(0xa6)])&&(_0x5cce6d[_0x1f75ff(0x95)]===undefined||_0x5cce6d[_0x1f75ff(0x95)]===null)&&_0x1bbe9e['addIssue']({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d[_0x1f75ff(0xa6)]+_0x1f75ff(0xae),'path':[_0x1f75ff(0x95)]}),_0x5cce6d[_0x1f75ff(0xa6)]==='Between'&&_0x5cce6d['min']===undefined&&_0x5cce6d[_0x1f75ff(0x8c)]===undefined&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':'custom','message':_0x1f75ff(0xaf),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x1f75ff(0x75)](_0x5cce6d[_0x1f75ff(0xa6)])&&_0x5cce6d[_0x1f75ff(0x95)]!==undefined&&!_0x5cce6d[_0x1f75ff(0x8b)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d['type']+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x1f75ff(0x8b)],'params':{'validationCode':_0x1f75ff(0x9d)}}),_0x5cce6d[_0x1f75ff(0xa6)]===_0x1f75ff(0x7d)&&(!_0x5cce6d[_0x1f75ff(0x70)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0xb8),'path':[_0x1f75ff(0x70)]}),!_0x5cce6d[_0x1f75ff(0x8e)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x84),'path':['from']}));});function a164_0x30a8(_0x131158,_0x1433b8){_0x131158=_0x131158-0x6d;const _0x3effa5=a164_0x3eff();let _0x30a84b=_0x3effa5[_0x131158];return _0x30a84b;}export const ArrayMatchingSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x87)](a164_0x25a17e(0x71)),z['literal'](a164_0x25a17e(0x9e)),z['object']({'atLeast':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'atMost':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x7b),a164_0x25a17e(0xa5),a164_0x25a17e(0x8a),a164_0x25a17e(0x72)]),'column':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z['string']())[a164_0x25a17e(0x92)]()}),z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0x80)),'groupingColumns':z[a164_0x25a17e(0x9a)](z['string']())['optional']()}),z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xa8)),'columns':z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x73)]())}),z[a164_0x25a17e(0x76)]({'type':z['enum']([a164_0x25a17e(0xac),'Last']),'column':z[a164_0x25a17e(0x73)](),'orderColumn':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z[a164_0x25a17e(0x73)]())[a164_0x25a17e(0x92)]()})]);export const TimeWindowDefSchema=z[a164_0x25a17e(0x76)]({'duration':z[a164_0x25a17e(0xa7)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4),'TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a164_0x25a17e(0xa9)]((_0x4aa514,_0x5e0774)=>{const _0x518dd6=a164_0x25a17e,_0x144bb6=_0x4aa514[_0x518dd6(0x9f)][_0x518dd6(0xa6)];_0x4aa514[_0x518dd6(0xa4)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x144bb6+'\x27)','path':['operator',_0x518dd6(0xa6)]}):TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Operator\x20\x27'+_0x144bb6+_0x518dd6(0x97),'path':[_0x518dd6(0x9f),_0x518dd6(0xa6)]});});function a164_0x3eff(){const _0x3c752f=['First','3504720bbGxFl','\x27\x20requires\x20a\x20value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','3642906RvocYu','realtime','Equal','24RAkzNS','TimeWithinNext','Value','day','Regexp','TimeRange\x20operator\x20requires\x20\x27duration\x27','12968XFtXrj','minute','Operator\x20\x27','TimeWithinPast','duration','any','Average','string','4192840fHtjod','has','object','year','week','custom','funnel_stage','Sum','enum','TimeRange','Last','124024YHmfKI','Count','boolean','record','11241RbjqDy','TimeRange\x20operator\x20requires\x20\x27from\x27','IsNull','addIssue','literal','include','2277CaTRGu','Max','unit','max','exclude','from','month','GreaterEqual','Greater','optional','union','hour','value','EndWith','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Less','Contain','array','1139152aejPUx','second','MISSING_TIME_UNIT','all','operator','batch','LessEqual','lazy','Segment\x20reference\x20must\x20not\x20be\x20empty','column','Min','type','number','CountDistinct','superRefine','Segment\x20name\x20is\x20required','And'];a164_0x3eff=function(){return _0x3c752f;};return a164_0x3eff();}export const FilterRuleDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xab)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x25a17e(0xa2)](()=>z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xb5)),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'filter':FilterRuleDefSchema[a164_0x25a17e(0x92)](),'limit':z['number']()[a164_0x25a17e(0x92)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Behavior'),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x25a17e(0x92)](),'limit':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z[a164_0x25a17e(0x9a)](ConditionDefSchema),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a164_0x25a17e(0x88),a164_0x25a17e(0x8d)]),'segment':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xa3))});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x93)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x25a17e(0xa2)](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x25a17e(0x92)]()}));export const SegmentDefSchema=z[a164_0x25a17e(0x76)]({'type':z['literal']('segment')[a164_0x25a17e(0x92)](),'name':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xaa)),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'folder':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'rule':RuleDefSchema[a164_0x25a17e(0x92)](),'kind':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xa0),a164_0x25a17e(0xb1),a164_0x25a17e(0x7a)])[a164_0x25a17e(0x92)](),'visible':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'activations':z['array'](z['any']())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x4d645f=a164_0x2d01;(function(_0x220f33,_0x35b17c){const _0x24b5ca=a164_0x2d01,_0x3aa17a=_0x220f33();while(!![]){try{const _0x27a9cc=parseInt(_0x24b5ca(0x1cf))/0x1+-parseInt(_0x24b5ca(0x20a))/0x2+parseInt(_0x24b5ca(0x1c0))/0x3+parseInt(_0x24b5ca(0x1d6))/0x4+parseInt(_0x24b5ca(0x1bb))/0x5+parseInt(_0x24b5ca(0x1c1))/0x6+-parseInt(_0x24b5ca(0x209))/0x7;if(_0x27a9cc===_0x35b17c)break;else _0x3aa17a['push'](_0x3aa17a['shift']());}catch(_0x2e8f80){_0x3aa17a['push'](_0x3aa17a['shift']());}}}(a164_0x2cbe,0xa665e));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1da),'Greater',a164_0x4d645f(0x1e5),a164_0x4d645f(0x1e2),'LessEqual','In',a164_0x4d645f(0x1ff),a164_0x4d645f(0x1f7),a164_0x4d645f(0x1e6),'TimeWithinPast',a164_0x4d645f(0x1e9),'Contain',a164_0x4d645f(0x1f5),a164_0x4d645f(0x1d5),a164_0x4d645f(0x1f8)]);export const TimeUnitSchema=z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1e1),a164_0x4d645f(0x1c4),a164_0x4d645f(0x1f4),a164_0x4d645f(0x1eb),a164_0x4d645f(0x1fa),a164_0x4d645f(0x1be),a164_0x4d645f(0x1e3)]);export const AggregationTypeSchema=z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1c7),a164_0x4d645f(0x1c6),a164_0x4d645f(0x1e0),a164_0x4d645f(0x1de),a164_0x4d645f(0x1c5),a164_0x4d645f(0x1e8),'First',a164_0x4d645f(0x1d9)]);const TemporalValueSchema=z[a164_0x4d645f(0x1c8)]([z[a164_0x4d645f(0x1ef)]({'timestamp':z['string']()}),z['object']({'last':z['union']([z['number'](),z[a164_0x4d645f(0x1ba)](z[a164_0x4d645f(0x1f2)](),z[a164_0x4d645f(0x202)]())]),'unit':z[a164_0x4d645f(0x1f2)]()})]),OperatorValueSchema=z['union']([z['string'](),z[a164_0x4d645f(0x202)](),z['boolean'](),TemporalValueSchema,z[a164_0x4d645f(0x1d8)](z[a164_0x4d645f(0x1c8)]([z[a164_0x4d645f(0x1f2)](),z[a164_0x4d645f(0x202)](),z[a164_0x4d645f(0x1dc)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x4d645f(0x1da),a164_0x4d645f(0x1d0),'GreaterEqual',a164_0x4d645f(0x1e5),'LessEqual','In',a164_0x4d645f(0x1d2),'StartWith',a164_0x4d645f(0x1d5),a164_0x4d645f(0x1f7),'TimeWithinPast',a164_0x4d645f(0x1e9)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x4d645f(0x1e9)]);export const OperatorDefSchema=z[a164_0x4d645f(0x1ef)]({'type':OperatorTypeSchema,'not':z['boolean']()['optional'](),'value':OperatorValueSchema[a164_0x4d645f(0x1fd)](),'min':z[a164_0x4d645f(0x1c8)]([z[a164_0x4d645f(0x202)](),z[a164_0x4d645f(0x1f2)](),TemporalValueSchema])['optional'](),'max':z[a164_0x4d645f(0x1c8)]([z[a164_0x4d645f(0x202)](),z[a164_0x4d645f(0x1f2)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a164_0x4d645f(0x1fd)](),'duration':z[a164_0x4d645f(0x1ef)]({'day':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)](),'week':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)](),'month':z['number']()[a164_0x4d645f(0x1fd)](),'year':z['number']()[a164_0x4d645f(0x1fd)](),'hour':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)](),'minute':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)](),'second':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)]()})[a164_0x4d645f(0x1fd)](),'from':z[a164_0x4d645f(0x1ef)]({'last':z[a164_0x4d645f(0x1c8)]([z[a164_0x4d645f(0x202)](),z['string']()]),'unit':TimeUnitSchema})[a164_0x4d645f(0x1fd)](),'reverse':z[a164_0x4d645f(0x1dc)]()['optional']()})[a164_0x4d645f(0x1d7)]((_0x13043c,_0x5c452e)=>{const _0x26e25f=a164_0x4d645f;OPERATORS_REQUIRING_VALUE[_0x26e25f(0x1d4)](_0x13043c[_0x26e25f(0x203)])&&(_0x13043c[_0x26e25f(0x1bd)]===undefined||_0x13043c[_0x26e25f(0x1bd)]===null)&&_0x5c452e[_0x26e25f(0x205)]({'code':'custom','message':'Operator\x20\x27'+_0x13043c[_0x26e25f(0x203)]+'\x27\x20requires\x20a\x20value','path':[_0x26e25f(0x1bd)]}),_0x13043c[_0x26e25f(0x203)]===_0x26e25f(0x1ff)&&_0x13043c['min']===undefined&&_0x13043c[_0x26e25f(0x1ca)]===undefined&&_0x5c452e[_0x26e25f(0x205)]({'code':'custom','message':_0x26e25f(0x1bc),'params':{'validationCode':_0x26e25f(0x1f6)}}),OPERATORS_REQUIRING_UNIT['has'](_0x13043c['type'])&&_0x13043c[_0x26e25f(0x1bd)]!==undefined&&!_0x13043c[_0x26e25f(0x1e4)]&&_0x5c452e[_0x26e25f(0x205)]({'code':'custom','message':_0x26e25f(0x1e7)+_0x13043c['type']+_0x26e25f(0x1f9),'path':[_0x26e25f(0x1e4)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x13043c[_0x26e25f(0x203)]===_0x26e25f(0x1f8)&&(!_0x13043c['duration']&&_0x5c452e[_0x26e25f(0x205)]({'code':_0x26e25f(0x1ea),'message':_0x26e25f(0x201),'path':[_0x26e25f(0x206)]}),!_0x13043c[_0x26e25f(0x1ec)]&&_0x5c452e['addIssue']({'code':_0x26e25f(0x1ea),'message':_0x26e25f(0x207),'path':[_0x26e25f(0x1ec)]}));});export const ArrayMatchingSchema=z['union']([z['literal']('any'),z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x1fe)),z[a164_0x4d645f(0x1ef)]({'atLeast':z['number']()}),z['object']({'atMost':z[a164_0x4d645f(0x202)]()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x4d645f(0x203),[z['object']({'type':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1c6),'Min','Max',a164_0x4d645f(0x1e0)]),'column':z[a164_0x4d645f(0x1f2)](),'groupingColumns':z[a164_0x4d645f(0x1d8)](z['string']())['optional']()}),z['object']({'type':z[a164_0x4d645f(0x1ed)]('Count'),'groupingColumns':z['array'](z['string']())[a164_0x4d645f(0x1fd)]()}),z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x1e8)),'columns':z[a164_0x4d645f(0x1d8)](z[a164_0x4d645f(0x1f2)]())}),z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1fc),a164_0x4d645f(0x1d9)]),'column':z['string'](),'orderColumn':z[a164_0x4d645f(0x1f2)](),'groupingColumns':z[a164_0x4d645f(0x1d8)](z[a164_0x4d645f(0x1f2)]())[a164_0x4d645f(0x1fd)]()})]);function a164_0x2d01(_0x422d5e,_0x2fcd9c){_0x422d5e=_0x422d5e-0x1ba;const _0x2cbe89=a164_0x2cbe();let _0x2d01de=_0x2cbe89[_0x422d5e];return _0x2d01de;}export const TimeWindowDefSchema=z[a164_0x4d645f(0x1ef)]({'duration':z['number'](),'unit':TimeUnitSchema});function a164_0x2cbe(){const _0x5ebb9e=['3230580vuUflG','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','value','month','batch','869484ezAprq','1148604gRZRGR','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','enum','minute','Max','Sum','Count','union','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','max','Behavior','exclude','funnel_stage','TimeWithinPast','583297MqocCq','Greater','Column','Contain','Segment\x20name\x20is\x20required','has','EndWith','5077280TGjgCV','superRefine','array','Last','Equal','column','boolean','any','Min','min','Average','second','GreaterEqual','year','unit','Less','IsNull','Operator\x20\x27','CountDistinct','TimeWithinNext','custom','day','from','literal','Value','object','include','And','string','operator','hour','StartWith','MISSING_BETWEEN_BOUNDS','Regexp','TimeRange','\x27\x20requires\x20a\x20time\x20unit','week','lazy','First','optional','all','Between','Segment\x20reference\x20must\x20not\x20be\x20empty','TimeRange\x20operator\x20requires\x20\x27duration\x27','number','type','timestamp','addIssue','duration','TimeRange\x20operator\x20requires\x20\x27from\x27','segment','8131970OhlnSw','2273438TqrJqp','record'];a164_0x2cbe=function(){return _0x5ebb9e;};return a164_0x2cbe();}const TIMESTAMP_OPERATORS=new Set([a164_0x4d645f(0x1ce),a164_0x4d645f(0x1e9),a164_0x4d645f(0x1f8)]);export const FilterColumnConditionDefSchema=z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x1d1)),'column':z[a164_0x4d645f(0x1f2)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x4d645f(0x1fd)]()})[a164_0x4d645f(0x1d7)]((_0x41a03f,_0x3e164c)=>{const _0x236e28=a164_0x4d645f,_0x57c8c8=_0x41a03f[_0x236e28(0x1f3)][_0x236e28(0x203)];_0x41a03f[_0x236e28(0x1db)]===_0x236e28(0x204)?!TIMESTAMP_OPERATORS['has'](_0x57c8c8)&&_0x3e164c['addIssue']({'code':_0x236e28(0x1ea),'message':_0x236e28(0x1c2)+_0x57c8c8+'\x27)','path':[_0x236e28(0x1f3),_0x236e28(0x203)]}):TIMESTAMP_OPERATORS[_0x236e28(0x1d4)](_0x57c8c8)&&_0x3e164c[_0x236e28(0x205)]({'code':_0x236e28(0x1ea),'message':_0x236e28(0x1e7)+_0x57c8c8+_0x236e28(0x1c9),'path':[_0x236e28(0x1f3),_0x236e28(0x203)]});});export const FilterRuleDefSchema=z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)]('And'),'conditions':z[a164_0x4d645f(0x1d8)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x4d645f(0x1fb)](()=>z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x1ee)),'attribute':z[a164_0x4d645f(0x1f2)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x4d645f(0x1dc)]()[a164_0x4d645f(0x1fd)](),'aggregation':AggregationDefSchema[a164_0x4d645f(0x1fd)](),'source':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1fd)](),'filter':FilterRuleDefSchema[a164_0x4d645f(0x1fd)](),'limit':z[a164_0x4d645f(0x202)]()[a164_0x4d645f(0x1fd)]()}));export const BehaviorConditionDefSchema=z[a164_0x4d645f(0x1fb)](()=>z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x1cb)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x4d645f(0x1fd)](),'exclude':z[a164_0x4d645f(0x1dc)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x4d645f(0x1fd)](),'source':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1fd)](),'filter':FilterRuleDefSchema[a164_0x4d645f(0x1fd)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a164_0x4d645f(0x202)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x4d645f(0x1ef)]({'type':z['literal']('Column'),'column':z[a164_0x4d645f(0x1f2)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x4d645f(0x1fb)](()=>z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1f1),'Or']),'conditions':z[a164_0x4d645f(0x1d8)](ConditionDefSchema),'description':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1fd)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1f0),a164_0x4d645f(0x1cc)]),'segment':z['string']()[a164_0x4d645f(0x1df)](0x1,a164_0x4d645f(0x200))});export const ConditionDefSchema=z[a164_0x4d645f(0x1fb)](()=>z[a164_0x4d645f(0x1c8)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x4d645f(0x1fb)](()=>z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1f1),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1fd)]()}));export const SegmentDefSchema=z[a164_0x4d645f(0x1ef)]({'type':z[a164_0x4d645f(0x1ed)](a164_0x4d645f(0x208))[a164_0x4d645f(0x1fd)](),'name':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1df)](0x1,a164_0x4d645f(0x1d3)),'description':z['string']()[a164_0x4d645f(0x1fd)](),'folder':z[a164_0x4d645f(0x1f2)]()[a164_0x4d645f(0x1fd)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x4d645f(0x1c3)]([a164_0x4d645f(0x1bf),'realtime',a164_0x4d645f(0x1cd)])[a164_0x4d645f(0x1fd)](),'visible':z[a164_0x4d645f(0x1dc)]()[a164_0x4d645f(0x1fd)](),'activations':z['array'](z[a164_0x4d645f(0x1dd)]())[a164_0x4d645f(0x1fd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x1c93ee=a165_0x859b;(function(_0x53ca7d,_0x24ece3){const _0xda5297=a165_0x859b,_0x4c8e38=_0x53ca7d();while(!![]){try{const _0x16989d=-parseInt(_0xda5297(0x1a8))/0x1+parseInt(_0xda5297(0x1a2))/0x2+-parseInt(_0xda5297(0x1a6))/0x3*(parseInt(_0xda5297(0x1aa))/0x4)+-parseInt(_0xda5297(0x1ae))/0x5+-parseInt(_0xda5297(0x1ab))/0x6*(parseInt(_0xda5297(0x1a3))/0x7)+parseInt(_0xda5297(0x19b))/0x8+parseInt(_0xda5297(0x196))/0x9;if(_0x16989d===_0x24ece3)break;else _0x4c8e38['push'](_0x4c8e38['shift']());}catch(_0x52312b){_0x4c8e38['push'](_0x4c8e38['shift']());}}}(a165_0x1305,0xefdec));import{readFileSync}from'fs';import*as a165_0x4c07a0 from'path';import*as a165_0x419fea 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';function a165_0x859b(_0x615279,_0x4974fc){_0x615279=_0x615279-0x193;const _0x1305c8=a165_0x1305();let _0x859b78=_0x1305c8[_0x615279];return _0x859b78;}function a165_0x1305(){const _0x216cb4=['434751RNaWAP','email','236PvLfyZ','6GtdgOa','type','relative','5242475ToOxiV','YAML_PARSE_ERROR','campaign_type','parseDocument','message','object','not\x20a\x20','length','campaign','44930196CpkOQz','basename','error','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','utf-8','531336VsfWET','toJSON','journey','filterType','segment','push','template','956112jtgZow','11623563ZtXNyx','result','warnings','71718XpxSJJ','map'];a165_0x1305=function(){return _0x216cb4;};return a165_0x1305();}const VALID_CAMPAIGN_TYPES=new Set([a165_0x1c93ee(0x1a9),a165_0x1c93ee(0x1a0)]);export function isJourneyDef(_0xa1509c){const _0x407388=a165_0x1c93ee;return typeof _0xa1509c===_0x407388(0x1b3)&&_0xa1509c!==null&&_0x407388(0x1ac)in _0xa1509c&&_0xa1509c[_0x407388(0x1ac)]===_0x407388(0x19d);}export function isCampaignDef(_0x3e8ab9){const _0x2346cb=a165_0x1c93ee;if(typeof _0x3e8ab9!==_0x2346cb(0x1b3)||_0x3e8ab9===null)return![];const _0x448f2d=_0x3e8ab9,_0x1ea53e=VALID_CAMPAIGN_TYPES['has'](_0x448f2d[_0x2346cb(0x1b0)]);if(_0x448f2d[_0x2346cb(0x1ac)]===_0x2346cb(0x195)&&_0x1ea53e)return!![];if(_0x1ea53e&&!_0x448f2d[_0x2346cb(0x1ac)])return!![];return![];}export function isTemplateDef(_0x5142aa){const _0x3c6137=a165_0x1c93ee;return typeof _0x5142aa===_0x3c6137(0x1b3)&&_0x5142aa!==null&&_0x3c6137(0x1ac)in _0x5142aa&&_0x5142aa['type']===_0x3c6137(0x1a1);}export function isValidationResult(_0x6317fd){return!('skipped'in _0x6317fd);}export function createParseErrorResult(_0x2999d3,_0x3e2f50,_0x5ec895,_0x322a32,_0x5ea365='segment'){const _0x358a7c=a165_0x1c93ee;return{'filePath':_0x2999d3,'relativePath':_0x3e2f50,'source':_0x5ec895,'result':{'valid':![],'errors':[{'level':_0x358a7c(0x198),'path':'','code':_0x358a7c(0x1af),'message':_0x322a32}],'warnings':[]},'fileType':_0x5ea365};}export function validateYamlFile(_0x121427,_0x10021b,_0x2b2df8={}){const _0x5b7c74=a165_0x1c93ee,_0x16d63b=a165_0x4c07a0[_0x5b7c74(0x1ad)](_0x10021b,_0x121427)||a165_0x4c07a0[_0x5b7c74(0x197)](_0x121427);try{const _0x6ddbdf=readFileSync(_0x121427,_0x5b7c74(0x19a)),_0x28ddd4=a165_0x419fea[_0x5b7c74(0x1b1)](_0x6ddbdf),_0x14dcd0=_0x28ddd4[_0x5b7c74(0x19c)]();if(!_0x14dcd0)return createParseErrorResult(_0x121427,_0x16d63b,_0x6ddbdf,_0x5b7c74(0x199));let _0x1029be;if(isJourneyDef(_0x14dcd0))_0x1029be=_0x5b7c74(0x19d);else{if(isCampaignDef(_0x14dcd0))_0x1029be=_0x5b7c74(0x195);else isTemplateDef(_0x14dcd0)?_0x1029be=_0x5b7c74(0x1a1):_0x1029be=_0x5b7c74(0x19f);}if(_0x2b2df8[_0x5b7c74(0x19e)]&&_0x1029be!==_0x2b2df8[_0x5b7c74(0x19e)])return{'filePath':_0x121427,'relativePath':_0x16d63b,'skipped':!![],'reason':_0x5b7c74(0x193)+_0x2b2df8[_0x5b7c74(0x19e)]};const _0x275873={'source':_0x6ddbdf,'document':_0x28ddd4};let _0x516f6e;if(_0x1029be==='journey')_0x516f6e=validateJourneyDef(_0x14dcd0,_0x275873);else{if(_0x1029be===_0x5b7c74(0x195))_0x516f6e=validateCampaignDef(_0x14dcd0,_0x275873);else _0x1029be==='template'?_0x516f6e=validateTemplateDef(_0x14dcd0,_0x275873):_0x516f6e=validateSegmentDef(_0x14dcd0,_0x275873);}return{'filePath':_0x121427,'relativePath':_0x16d63b,'source':_0x6ddbdf,'result':_0x516f6e,'fileType':_0x1029be};}catch(_0x59357f){const _0x21092f=_0x59357f instanceof Error?_0x59357f[_0x5b7c74(0x1b2)]:String(_0x59357f);return createParseErrorResult(_0x121427,_0x16d63b,'','YAML\x20parse\x20error:\x20'+_0x21092f);}}export function validateYamlFiles(_0x6a173e,_0x10798a,_0x982249={}){const _0x3f8923=a165_0x1c93ee;return _0x6a173e[_0x3f8923(0x1a7)](_0x550c57=>validateYamlFile(_0x550c57,_0x10798a,_0x982249));}export function calculateSummary(_0x1575d0){const _0x188cc4=a165_0x1c93ee;let _0x340e22=0x0,_0x2e5370=0x0,_0x3f6f66=0x0,_0x353a6d=0x0;for(const _0x1e4097 of _0x1575d0){if(!isValidationResult(_0x1e4097)){_0x353a6d++;continue;}_0x1e4097[_0x188cc4(0x1a4)]['valid']?_0x340e22++:_0x2e5370++,_0x3f6f66+=_0x1e4097[_0x188cc4(0x1a4)][_0x188cc4(0x1a5)][_0x188cc4(0x194)];}return{'validCount':_0x340e22,'invalidCount':_0x2e5370,'warningCount':_0x3f6f66,'skippedCount':_0x353a6d,'hasErrors':_0x2e5370>0x0};}
|