@treasuredata/tdx 0.13.0 → 0.13.2
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.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +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/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts +1 -0
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.d.ts.map +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-command.js.map +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +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/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.d.ts.map +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-pull-command.js.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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.d.ts +1 -1
- package/dist/commands/segments.d.ts.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts +13 -1
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +68 -17
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +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-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.d.ts +47 -3
- package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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.d.ts +2 -0
- package/dist/sdk/segment/pull-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/pull-workflow.js.map +1 -1
- package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.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.d.ts +42 -11
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cdp.d.ts +71 -1
- package/dist/sdk/types/cdp.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/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.d.ts +3 -5
- package/dist/sdk/util/tree-formatter.d.ts.map +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-formatter.js.map +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/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/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.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
|
-
const
|
|
1
|
+
const a79_0x1d6a67=a79_0x4a62;(function(_0x3c3659,_0x5dbc24){const _0x5acc1a=a79_0x4a62,_0x5f1a7b=_0x3c3659();while(!![]){try{const _0x3caa4b=-parseInt(_0x5acc1a(0x8b))/0x1+parseInt(_0x5acc1a(0x98))/0x2+parseInt(_0x5acc1a(0x8f))/0x3*(parseInt(_0x5acc1a(0x8a))/0x4)+-parseInt(_0x5acc1a(0x8e))/0x5+-parseInt(_0x5acc1a(0x9b))/0x6*(parseInt(_0x5acc1a(0x9f))/0x7)+parseInt(_0x5acc1a(0x8c))/0x8*(parseInt(_0x5acc1a(0x8d))/0x9)+parseInt(_0x5acc1a(0x9a))/0xa;if(_0x3caa4b===_0x5dbc24)break;else _0x5f1a7b['push'](_0x5f1a7b['shift']());}catch(_0x52937f){_0x5f1a7b['push'](_0x5f1a7b['shift']());}}}(a79_0x41bb,0xd386e));function a79_0x4a62(_0x1bfe0b,_0x3ce65c){_0x1bfe0b=_0x1bfe0b-0x8a;const _0x41bb6b=a79_0x41bb();let _0x4a626d=_0x41bb6b[_0x1bfe0b];return _0x4a626d;}import*as a79_0x37773e from'node:fs';import*as a79_0x18b6cd from'node:fs/promises';function a79_0x41bb(){const _0x1937e4=['140yYSCCX','58640ampYTW','1549052uOlccc','40QXoBvE','2112597ZfTTST','5176620tGXZiQ','282LEwBQU','writeFile','unlinkSync','readdirSync','readFile','isFile','writeFileSync','stat','utf-8','355704HAlizg','isDirectory','14887730DNBykU','230262tYldxG','readdir','readFileSync','unlink'];a79_0x41bb=function(){return _0x1937e4;};return a79_0x41bb();}export const nodeFileSystem={'readFile':_0x29e987=>a79_0x18b6cd[a79_0x1d6a67(0x93)](_0x29e987,a79_0x1d6a67(0x97)),'writeFile':(_0x11da8c,_0x5bf868)=>a79_0x18b6cd[a79_0x1d6a67(0x90)](_0x11da8c,_0x5bf868,a79_0x1d6a67(0x97)),'exists':async _0x1aa0de=>{try{return await a79_0x18b6cd['access'](_0x1aa0de),!![];}catch{return![];}},'mkdir':async(_0x5cad79,_0x1a8b26)=>{await a79_0x18b6cd['mkdir'](_0x5cad79,_0x1a8b26);},'readdir':_0x2cf8f1=>a79_0x18b6cd[a79_0x1d6a67(0x9c)](_0x2cf8f1),'stat':async _0x24afe2=>{const _0x9369f7=a79_0x1d6a67,_0x50d6fd=await a79_0x18b6cd[_0x9369f7(0x96)](_0x24afe2);return{'isDirectory':()=>_0x50d6fd[_0x9369f7(0x99)](),'isFile':()=>_0x50d6fd[_0x9369f7(0x94)]()};},'unlink':_0x46521c=>a79_0x18b6cd[a79_0x1d6a67(0x9e)](_0x46521c)};export const nodeFileSystemSync={'readFileSync':_0x3ce943=>a79_0x37773e[a79_0x1d6a67(0x9d)](_0x3ce943,'utf-8'),'writeFileSync':(_0x58f197,_0x4ce027)=>a79_0x37773e[a79_0x1d6a67(0x95)](_0x58f197,_0x4ce027,a79_0x1d6a67(0x97)),'existsSync':_0x3f3831=>a79_0x37773e['existsSync'](_0x3f3831),'mkdirSync':(_0x2861f8,_0x3a8a6f)=>{a79_0x37773e['mkdirSync'](_0x2861f8,_0x3a8a6f);},'readdirSync':_0x52b5a0=>a79_0x37773e[a79_0x1d6a67(0x92)](_0x52b5a0),'statSync':_0x33e945=>{const _0x3a9eb8=a79_0x1d6a67,_0x5da04b=a79_0x37773e['statSync'](_0x33e945);return{'isDirectory':()=>_0x5da04b[_0x3a9eb8(0x99)](),'isFile':()=>_0x5da04b[_0x3a9eb8(0x94)]()};},'unlinkSync':_0x15d7ed=>a79_0x37773e[a79_0x1d6a67(0x91)](_0x15d7ed)};
|
package/dist/sdk/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a81_0x196c9f=a81_0x1c27;(function(_0x46fc98,_0x6af1a2){const _0x4d1571=a81_0x1c27,_0x10bdca=_0x46fc98();while(!![]){try{const _0x39ebbd=parseInt(_0x4d1571(0x141))/0x1*(-parseInt(_0x4d1571(0x127))/0x2)+parseInt(_0x4d1571(0x129))/0x3+-parseInt(_0x4d1571(0x12d))/0x4*(parseInt(_0x4d1571(0x142))/0x5)+-parseInt(_0x4d1571(0x128))/0x6+-parseInt(_0x4d1571(0x12b))/0x7+-parseInt(_0x4d1571(0x130))/0x8+-parseInt(_0x4d1571(0x13d))/0x9*(-parseInt(_0x4d1571(0x131))/0xa);if(_0x39ebbd===_0x6af1a2)break;else _0x10bdca['push'](_0x10bdca['shift']());}catch(_0x26f849){_0x10bdca['push'](_0x10bdca['shift']());}}}(a81_0x56f7,0x1fdf4));function a81_0x1c27(_0x2e7ecc,_0xbe35a1){_0x2e7ecc=_0x2e7ecc-0x127;const _0x56f722=a81_0x56f7();let _0x1c277c=_0x56f722[_0x2e7ecc];return _0x1c277c;}import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x5d439c){const _0x3bcbfd=a81_0x1c27;if(!_0x5d439c)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x5d439c))return _0x5d439c;return _0x5d439c[_0x3bcbfd(0x136)]('\x20UTC','Z')[_0x3bcbfd(0x136)]('\x20','T');}export class JobSDK{[a81_0x196c9f(0x139)];constructor(_0x36ae79){const _0x25449c=a81_0x196c9f;this[_0x25449c(0x139)]=new TDApiClient(_0x36ae79,_0x36ae79[_0x25449c(0x13e)]);}async[a81_0x196c9f(0x132)](_0xf48ff){const _0x5cd4ee=a81_0x196c9f,_0x590417=await this['client']['listJobs'](_0xf48ff);return _0x590417[_0x5cd4ee(0x134)](_0x5618e2=>({..._0x5618e2,'created_at':normalizeTimestamp(_0x5618e2[_0x5cd4ee(0x140)]),'updated_at':normalizeTimestamp(_0x5618e2[_0x5cd4ee(0x13c)]),'start_at':normalizeTimestamp(_0x5618e2[_0x5cd4ee(0x13f)]),'end_at':normalizeTimestamp(_0x5618e2['end_at'])}));}async['show'](_0x529918){const _0x29a5a6=a81_0x196c9f,_0xd9b583=await this[_0x29a5a6(0x139)][_0x29a5a6(0x12e)](_0x529918);return{..._0xd9b583,'created_at':normalizeTimestamp(_0xd9b583['created_at']),'updated_at':normalizeTimestamp(_0xd9b583[_0x29a5a6(0x13c)]),'start_at':normalizeTimestamp(_0xd9b583[_0x29a5a6(0x13f)]),'end_at':normalizeTimestamp(_0xd9b583[_0x29a5a6(0x137)])};}async['kill'](_0x371760){const _0x17efe8=a81_0x196c9f;await this[_0x17efe8(0x139)][_0x17efe8(0x13b)](_0x371760);}async[a81_0x196c9f(0x12c)](_0x30391c,_0x1a2d79,_0x315ec5=a81_0x196c9f(0x138)){const _0x5abf01=a81_0x196c9f;return _0x315ec5===_0x5abf01(0x12f)?await this[_0x5abf01(0x139)][_0x5abf01(0x12a)](_0x30391c,_0x1a2d79):await this[_0x5abf01(0x139)][_0x5abf01(0x13a)](_0x30391c,_0x1a2d79);}async[a81_0x196c9f(0x143)](_0x3e021c){const _0x2eeda8=a81_0x196c9f;return await this[_0x2eeda8(0x139)][_0x2eeda8(0x133)](_0x3e021c);}async[a81_0x196c9f(0x135)](){const _0x576636=a81_0x196c9f;return await this[_0x576636(0x139)]['getUserInfo']();}}function a81_0x56f7(){const _0x4317e3=['getJobResult','map','getUserInfo','replace','end_at','trino','client','submitPrestoJob','cancelJob','updated_at','9CadGjM','logger','start_at','created_at','89FygLMx','840430kREVtZ','result','2358sTJqfL','1244772jDqCJx','769806ZHVmZc','submitHiveJob','1407035ThbKlL','submit','4QzyFti','showJob','hive','20568jxQLJG','5580010bknxks','list'];a81_0x56f7=function(){return _0x4317e3;};return a81_0x56f7();}
|
package/dist/sdk/journey.d.ts
CHANGED
|
@@ -4,7 +4,37 @@
|
|
|
4
4
|
* Provides high-level API for CDP Journey Orchestration
|
|
5
5
|
*/
|
|
6
6
|
import type { SDKContext } from './index.js';
|
|
7
|
-
import type { Journey, JourneyListItem, JourneyStatistics, JourneyActivationStep, CreateJourneyActivationRequest } from './types/index.js';
|
|
7
|
+
import type { Journey, JourneyListItem, JourneyStatistics, JourneyActivationStep, CreateJourneyActivationRequest, EntityByFolder, JourneyState } from './types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Deduplicate journeys by bundle name, keeping only the latest version.
|
|
10
|
+
* This ensures each journey bundle appears only once in listings.
|
|
11
|
+
* Supports both JourneyListItem (flat) and Journey (nested attributes) types.
|
|
12
|
+
*
|
|
13
|
+
* @param journeys - Array of journeys (may contain multiple versions per bundle)
|
|
14
|
+
* @returns Array with only the latest version of each journey bundle
|
|
15
|
+
*/
|
|
16
|
+
export declare function deduplicateJourneysByBundle<T extends {
|
|
17
|
+
journeyBundleId?: string;
|
|
18
|
+
versionNumber?: number;
|
|
19
|
+
attributes?: {
|
|
20
|
+
journeyBundleId?: string | null;
|
|
21
|
+
versionNumber?: number;
|
|
22
|
+
};
|
|
23
|
+
}>(journeys: T[]): T[];
|
|
24
|
+
/**
|
|
25
|
+
* Safely parse journey state, returning 'draft' for invalid values.
|
|
26
|
+
* Exported for use in other modules that need to validate journey state.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseJourneyState(state: unknown): JourneyState;
|
|
29
|
+
/**
|
|
30
|
+
* Convert an EntityByFolder to JourneyListItem format.
|
|
31
|
+
* Shared utility used by both JourneySDK and SegmentSDK.
|
|
32
|
+
*
|
|
33
|
+
* @param entity - Entity from /entities/by-folder API
|
|
34
|
+
* @param audienceId - Parent segment ID
|
|
35
|
+
* @returns JourneyListItem with safe defaults for missing fields
|
|
36
|
+
*/
|
|
37
|
+
export declare function entityToJourneyListItem(entity: EntityByFolder, audienceId: string): JourneyListItem;
|
|
8
38
|
/**
|
|
9
39
|
* Journey operations API
|
|
10
40
|
*/
|
|
@@ -13,30 +43,50 @@ export declare class JourneySDK {
|
|
|
13
43
|
/** @internal */
|
|
14
44
|
constructor(context: SDKContext);
|
|
15
45
|
/**
|
|
16
|
-
*
|
|
46
|
+
* Helper: Conditionally deduplicate journeys based on includeAllVersions option.
|
|
47
|
+
* Centralizes deduplication logic to prevent inconsistencies.
|
|
17
48
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
49
|
+
* Works with both Journey (nested attributes) and JourneyListItem (flat) types
|
|
50
|
+
* by accepting the generic constraint that deduplicateJourneysByBundle supports.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
20
53
|
*/
|
|
21
|
-
|
|
54
|
+
private applyVersionDeduplication;
|
|
22
55
|
/**
|
|
23
56
|
* List journeys with full details (including journeyStages and activations) from a folder.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @param folderId - Folder ID to list journeys from
|
|
27
|
-
* @returns Journeys and activation steps map
|
|
57
|
+
* This uses the /entities/journeys API which provides full journey details.
|
|
58
|
+
* @internal
|
|
28
59
|
*/
|
|
29
|
-
listJourneysWithDetails
|
|
30
|
-
journeys: Journey[];
|
|
31
|
-
activationStepsById: Map<string, JourneyActivationStep>;
|
|
32
|
-
}>;
|
|
60
|
+
private listJourneysWithDetails;
|
|
33
61
|
/**
|
|
34
62
|
* List journeys across all folders in a parent segment
|
|
35
63
|
*
|
|
64
|
+
* Uses the /entities/by-folder API for efficient single-call retrieval.
|
|
65
|
+
*
|
|
36
66
|
* @param parentSegmentId - Parent segment ID
|
|
67
|
+
* @param rootFolderId - Optional root folder ID (if already known, avoids extra API call)
|
|
37
68
|
* @returns List of journeys from all folders (deduplicated)
|
|
38
69
|
*/
|
|
39
|
-
listJourneysFromParentSegment(parentSegmentId: string
|
|
70
|
+
listJourneysFromParentSegment(parentSegmentId: string, rootFolderId?: string, options?: {
|
|
71
|
+
includeAllVersions?: boolean;
|
|
72
|
+
}): Promise<JourneyListItem[]>;
|
|
73
|
+
/**
|
|
74
|
+
* List journeys and folders from a parent segment in a single API call.
|
|
75
|
+
* Returns both journeys and folder name map for display purposes.
|
|
76
|
+
*
|
|
77
|
+
* @param parentSegmentId - Parent segment ID
|
|
78
|
+
* @param rootFolderId - Root folder ID (required)
|
|
79
|
+
* @returns Object with journeys array and folders array
|
|
80
|
+
*/
|
|
81
|
+
listJourneysWithFolders(parentSegmentId: string, rootFolderId?: string, options?: {
|
|
82
|
+
includeAllVersions?: boolean;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
journeys: JourneyListItem[];
|
|
85
|
+
folders: Array<{
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
}>;
|
|
89
|
+
}>;
|
|
40
90
|
/**
|
|
41
91
|
* List journeys with full details across all folders in a parent segment.
|
|
42
92
|
* This is more efficient than listJourneysFromParentSegment + getJourney() for each.
|
|
@@ -44,7 +94,9 @@ export declare class JourneySDK {
|
|
|
44
94
|
* @param parentSegmentId - Parent segment ID
|
|
45
95
|
* @returns Journeys and activation steps from all folders (deduplicated)
|
|
46
96
|
*/
|
|
47
|
-
listJourneysWithDetailsFromParentSegment(parentSegmentId: string
|
|
97
|
+
listJourneysWithDetailsFromParentSegment(parentSegmentId: string, options?: {
|
|
98
|
+
includeAllVersions?: boolean;
|
|
99
|
+
}): Promise<{
|
|
48
100
|
journeys: Journey[];
|
|
49
101
|
activationStepsById: Map<string, JourneyActivationStep>;
|
|
50
102
|
}>;
|
|
@@ -60,10 +112,9 @@ export declare class JourneySDK {
|
|
|
60
112
|
*
|
|
61
113
|
* @param parentId - Parent segment ID
|
|
62
114
|
* @param journeyName - Journey name to find
|
|
63
|
-
* @param folderId - Optional folder ID to search in (if not provided, searches all folders)
|
|
64
115
|
* @returns Journey ID if found
|
|
65
116
|
*/
|
|
66
|
-
resolveJourneyId(parentId: string, journeyName: string
|
|
117
|
+
resolveJourneyId(parentId: string, journeyName: string): Promise<string>;
|
|
67
118
|
/**
|
|
68
119
|
* Get journey statistics
|
|
69
120
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/sdk/journey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,iBAAiB,EAEjB,qBAAqB,EACrB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/sdk/journey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,iBAAiB,EAEjB,qBAAqB,EACrB,8BAA8B,EAC9B,cAAc,EACd,YAAY,EACb,MAAM,kBAAkB,CAAC;AAiB1B;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS;IAAE,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAClL,QAAQ,EAAE,CAAC,EAAE,GACZ,CAAC,EAAE,CA4BL;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAK9D;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAgBnG;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAe;IAE7B,gBAAgB;gBACJ,OAAO,EAAE,UAAU;IAI/B;;;;;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G;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C;;;;;;OAMG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAelE;;;;;;OAMG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,qBAAqB,CAAC;IAejC;;;;;OAKG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAW1E;;;;;;;;;;;;OAYG;IACG,gBAAgB,CACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,qBAAqB,CAAC;CAGlC"}
|
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a82_0x567f25=a82_0x3a7f;function a82_0x5ba9(){const _0x3f995a=['getActivation','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','activationStepsById','resumeJourney','3254229YVSCdp','filter','listJourneyActivations','390ypXonD','all','Journey\x20activation\x20step\x20not\x20found:\x20','map','getStatistics','2ljDtVL','11001080TLBpkv','1830016NLeWBE','has','createJourneyActivation','JOURNEY_NOT_FOUND','25570GUABGB','listJourneysFromParentSegment','listSegmentFolders','Journey\x20not\x20found:\x20','journeyBundleName','NOT_FOUND','createJourney','pause','910rGCCPA','push','update','createActivation','9vxeURf','listJourneysWithDetailsFromParentSegment','1121738futesP','737CnePTL','listJourneys','journeys','resolveJourneyId','client','listActivations','toLowerCase','resume','listJourneysWithDetails','updateJourney','279685ijaqCP'];a82_0x5ba9=function(){return _0x3f995a;};return a82_0x5ba9();}(function(_0x194d7c,_0x3c5a93){const _0x449bf0=a82_0x3a7f,_0x1d4bb0=_0x194d7c();while(!![]){try{const _0x427ec4=-parseInt(_0x449bf0(0x170))/0x1*(parseInt(_0x449bf0(0x15c))/0x2)+parseInt(_0x449bf0(0x154))/0x3+-parseInt(_0x449bf0(0x15e))/0x4+parseInt(_0x449bf0(0x14f))/0x5+-parseInt(_0x449bf0(0x157))/0x6*(-parseInt(_0x449bf0(0x16a))/0x7)+-parseInt(_0x449bf0(0x15d))/0x8*(-parseInt(_0x449bf0(0x16e))/0x9)+parseInt(_0x449bf0(0x162))/0xa*(-parseInt(_0x449bf0(0x171))/0xb);if(_0x427ec4===_0x3c5a93)break;else _0x1d4bb0['push'](_0x1d4bb0['shift']());}catch(_0x3f831d){_0x1d4bb0['push'](_0x1d4bb0['shift']());}}}(a82_0x5ba9,0xbce48));import{CDPApiClient}from'./client/cdp-api-client.js';function a82_0x3a7f(_0x3f7872,_0x210efb){_0x3f7872=_0x3f7872-0x14b;const _0x5ba9ab=a82_0x5ba9();let _0x3a7fa9=_0x5ba9ab[_0x3f7872];return _0x3a7fa9;}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';export class JourneySDK{[a82_0x567f25(0x175)];constructor(_0x2cc27c){const _0x26e51e=a82_0x567f25;this[_0x26e51e(0x175)]=new CDPApiClient(_0x2cc27c,_0x2cc27c['logger']);}async[a82_0x567f25(0x172)](_0x350945){const _0x5de40c=a82_0x567f25;try{return await this[_0x5de40c(0x175)][_0x5de40c(0x172)](_0x350945);}catch(_0x3e56d9){if(isHttp404Error(_0x3e56d9))return[];throw _0x3e56d9;}}async[a82_0x567f25(0x14d)](_0x1c3e63){const _0x189ca0=a82_0x567f25;try{return await this['client'][_0x189ca0(0x14d)](_0x1c3e63);}catch(_0x5e514e){if(isHttp404Error(_0x5e514e))return{'journeys':[],'activationStepsById':new Map()};throw _0x5e514e;}}async['listJourneysFromParentSegment'](_0x108e72){const _0x4fed42=a82_0x567f25;let _0x1ee397;try{_0x1ee397=await this['client'][_0x4fed42(0x164)](_0x108e72);}catch(_0x39b702){if(isHttp404Error(_0x39b702))return[];throw _0x39b702;}const _0x2ea6a8=_0x1ee397[_0x4fed42(0x15a)](async _0x4e238b=>{return await this['listJourneys'](_0x4e238b['id']);}),_0x4ecee3=await Promise[_0x4fed42(0x158)](_0x2ea6a8),_0x39bd7d=_0x4ecee3['flat'](),_0x46a9dd=new Set();return _0x39bd7d[_0x4fed42(0x155)](_0x506441=>{const _0x44fa1e=_0x4fed42;if(_0x46a9dd[_0x44fa1e(0x15f)](_0x506441['id']))return![];return _0x46a9dd['add'](_0x506441['id']),!![];});}async[a82_0x567f25(0x16f)](_0x27ef34){const _0x3474ca=a82_0x567f25;let _0x3df0b6;try{_0x3df0b6=await this[_0x3474ca(0x175)]['listSegmentFolders'](_0x27ef34);}catch(_0x4c0e9d){if(isHttp404Error(_0x4c0e9d))return{'journeys':[],'activationStepsById':new Map()};throw _0x4c0e9d;}const _0x505c17=_0x3df0b6[_0x3474ca(0x15a)](async _0x5cc1a6=>{const _0x4b47b5=_0x3474ca;return await this[_0x4b47b5(0x14d)](_0x5cc1a6['id']);}),_0x9e4cb2=await Promise[_0x3474ca(0x158)](_0x505c17),_0xf01d46=new Map(),_0x146e5f=[];for(const _0x1d0615 of _0x9e4cb2){_0x146e5f[_0x3474ca(0x16b)](..._0x1d0615[_0x3474ca(0x173)]);for(const [_0x2740db,_0x9abc6d]of _0x1d0615[_0x3474ca(0x152)]){_0xf01d46['set'](_0x2740db,_0x9abc6d);}}const _0x500117=new Set(),_0x19d489=_0x146e5f[_0x3474ca(0x155)](_0x1eb5e8=>{if(_0x500117['has'](_0x1eb5e8['id']))return![];return _0x500117['add'](_0x1eb5e8['id']),!![];});return{'journeys':_0x19d489,'activationStepsById':_0xf01d46};}async['getJourney'](_0x219b18){const _0xb43349=a82_0x567f25;try{return await this[_0xb43349(0x175)]['getJourney'](_0x219b18);}catch(_0x2760f3){if(isHttp404Error(_0x2760f3))throw new SDKError(ErrorCode[_0xb43349(0x161)],_0xb43349(0x165)+_0x219b18,_0x2760f3);throw _0x2760f3;}}async[a82_0x567f25(0x174)](_0x56ba4c,_0x16f613,_0x26bb92){const _0x5a5a65=a82_0x567f25,_0x58f86b=_0x26bb92?await this[_0x5a5a65(0x172)](_0x26bb92):await this[_0x5a5a65(0x163)](_0x56ba4c),_0x325c69=_0x58f86b['find'](_0xe7000a=>_0xe7000a[_0x5a5a65(0x166)]['toLowerCase']()===_0x16f613[_0x5a5a65(0x14b)]());if(!_0x325c69)throw new SDKError(ErrorCode[_0x5a5a65(0x161)],_0x5a5a65(0x165)+_0x16f613,undefined,{'helpText':_0x5a5a65(0x151)});return _0x325c69['id'];}async[a82_0x567f25(0x15b)](_0x1f4ca0){const _0x37aaa5=a82_0x567f25;try{return await this[_0x37aaa5(0x175)]['getJourneyStatistics'](_0x1f4ca0);}catch(_0x31ac8d){if(isHttp404Error(_0x31ac8d))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x37aaa5(0x165)+_0x1f4ca0,_0x31ac8d);throw _0x31ac8d;}}async[a82_0x567f25(0x169)](_0x3f6d79){const _0x518e6e=a82_0x567f25;try{return await this[_0x518e6e(0x175)]['pauseJourney'](_0x3f6d79);}catch(_0x1299d7){if(isHttp404Error(_0x1299d7))throw new SDKError(ErrorCode[_0x518e6e(0x161)],_0x518e6e(0x165)+_0x3f6d79,_0x1299d7);throw _0x1299d7;}}async[a82_0x567f25(0x14c)](_0x5218da){const _0x32c952=a82_0x567f25;try{return await this['client'][_0x32c952(0x153)](_0x5218da);}catch(_0x28cd01){if(isHttp404Error(_0x28cd01))throw new SDKError(ErrorCode[_0x32c952(0x161)],'Journey\x20not\x20found:\x20'+_0x5218da,_0x28cd01);throw _0x28cd01;}}async['create'](_0x40b872){const _0x59abc3=a82_0x567f25;return await this[_0x59abc3(0x175)][_0x59abc3(0x168)](_0x40b872);}async[a82_0x567f25(0x16c)](_0x241ddd,_0x43e463){const _0xfd3080=a82_0x567f25;try{return await this[_0xfd3080(0x175)][_0xfd3080(0x14e)](_0x241ddd,_0x43e463);}catch(_0x2ae664){if(isHttp404Error(_0x2ae664))throw new SDKError(ErrorCode[_0xfd3080(0x161)],_0xfd3080(0x165)+_0x241ddd,_0x2ae664);throw _0x2ae664;}}async[a82_0x567f25(0x150)](_0xb58421,_0x431f64){const _0xe18cb9=a82_0x567f25;try{return await this['client']['getJourneyActivation'](_0xb58421,_0x431f64);}catch(_0x3e9f73){if(isHttp404Error(_0x3e9f73))throw new SDKError(ErrorCode[_0xe18cb9(0x167)],_0xe18cb9(0x159)+_0x431f64+'\x20in\x20journey\x20'+_0xb58421,_0x3e9f73);throw _0x3e9f73;}}async[a82_0x567f25(0x176)](_0x3c0cb7){const _0x4b561f=a82_0x567f25;try{return await this['client'][_0x4b561f(0x156)](_0x3c0cb7);}catch(_0x26682c){if(isHttp404Error(_0x26682c))return[];throw _0x26682c;}}async[a82_0x567f25(0x16d)](_0x5c86a7,_0x5b9e70){const _0x26c706=a82_0x567f25;return await this[_0x26c706(0x175)][_0x26c706(0x160)](_0x5c86a7,_0x5b9e70);}}
|
|
1
|
+
const a82_0x5a0f6b=a82_0x3844;(function(_0xc7a9fa,_0x51b5c0){const _0x265859=a82_0x3844,_0x4dc80a=_0xc7a9fa();while(!![]){try{const _0x3a1f40=-parseInt(_0x265859(0xc7))/0x1*(parseInt(_0x265859(0xb9))/0x2)+-parseInt(_0x265859(0xf5))/0x3*(-parseInt(_0x265859(0xc8))/0x4)+parseInt(_0x265859(0xb8))/0x5+-parseInt(_0x265859(0xdb))/0x6*(-parseInt(_0x265859(0xf0))/0x7)+-parseInt(_0x265859(0xe7))/0x8*(parseInt(_0x265859(0xd9))/0x9)+-parseInt(_0x265859(0xca))/0xa*(parseInt(_0x265859(0xee))/0xb)+-parseInt(_0x265859(0xcd))/0xc*(-parseInt(_0x265859(0xd1))/0xd);if(_0x3a1f40===_0x51b5c0)break;else _0x4dc80a['push'](_0x4dc80a['shift']());}catch(_0x14996a){_0x4dc80a['push'](_0x4dc80a['shift']());}}}(a82_0x3b4c,0x74b0b));import{CDPApiClient}from'./client/cdp-api-client.js';function a82_0x3b4c(){const _0x4384db=['state','draft','52996OxcpzY','25276UrnnDj','toLowerCase','11290UXUgff','attributes','filter','5556Ladzgz','add','createdAt','all','4199aBfHOg','journeyBundleName','has','parentFolder','relationships','journeyBundleId','getStatistics','getJourneyActivation','3796137OzQEUL','rootFolderId','12162nBitWb','updateJourney','Journey\x20not\x20found:\x20','type','simulation','listJourneys','updatedAt','flat','createJourney','journeys','client','pause','8EHzNBQ','getJourney','activationStepsById','listJourneysFromParentSegment','getJourneyStatistics','listJourneysWithFolders','values','209ZheBLa','name','847yxmctU','data','launched','listJourneysWithDetails','map','153igJLOb','find','string','\x20in\x20journey\x20','Journey\x20activation\x20step\x20not\x20found:\x20','folder-segment','pauseJourney','segmentFolderId','listEntitiesByFolder','JOURNEY_NOT_FOUND','paused','3405430wTqWJC','18ihzmkF','description','versionNumber','getActivation','resolveJourneyId','logger','listJourneysWithDetailsFromParentSegment','applyVersionDeduplication','journey','getParentSegmentFull','set','includeAllVersions'];a82_0x3b4c=function(){return _0x4384db;};return a82_0x3b4c();}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x53a6bb){const _0x41c10e=a82_0x3844;return _0x53a6bb['journeyBundleId']??_0x53a6bb[_0x41c10e(0xcb)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0x3ef643){const _0x849fef=a82_0x3844;return _0x3ef643[_0x849fef(0xbb)]??_0x3ef643[_0x849fef(0xcb)]?.[_0x849fef(0xbb)]??0x0;}export function deduplicateJourneysByBundle(_0x1df7d5){const _0x5f438a=a82_0x3844,_0x147dbd=new Map();let _0x3562d2=0x0;for(const _0x4bf67d of _0x1df7d5){const _0xa74940=getBundleId(_0x4bf67d);if(!_0xa74940){const _0x4e8ae1='no-bundle-'+(_0x4bf67d['id']??'idx-'+_0x3562d2++);_0x147dbd[_0x5f438a(0xc3)](_0x4e8ae1,_0x4bf67d);continue;}const _0x4596b6=_0x147dbd['get'](_0xa74940);if(!_0x4596b6)_0x147dbd[_0x5f438a(0xc3)](_0xa74940,_0x4bf67d);else{const _0x2f5a7a=getVersionNumber(_0x4596b6),_0x2efcc2=getVersionNumber(_0x4bf67d);_0x2efcc2>_0x2f5a7a&&_0x147dbd['set'](_0xa74940,_0x4bf67d);}}return Array['from'](_0x147dbd[_0x5f438a(0xed)]());}function a82_0x3844(_0x1b9c24,_0x266fea){_0x1b9c24=_0x1b9c24-0xb8;const _0x3b4ca7=a82_0x3b4c();let _0x3844e4=_0x3b4ca7[_0x1b9c24];return _0x3844e4;}const VALID_JOURNEY_STATES=new Set([a82_0x5a0f6b(0xc6),a82_0x5a0f6b(0xdf),a82_0x5a0f6b(0xf2)]);export function parseJourneyState(_0xd7cf8b){const _0x39d8ff=a82_0x5a0f6b;if(typeof _0xd7cf8b===_0x39d8ff(0xf7)&&VALID_JOURNEY_STATES[_0x39d8ff(0xd3)](_0xd7cf8b))return _0xd7cf8b;return _0x39d8ff(0xc6);}export function entityToJourneyListItem(_0x45f9cc,_0x1229f0){const _0x4f6a56=a82_0x5a0f6b,_0x29ad5a=_0x45f9cc[_0x4f6a56(0xcb)];return{'id':_0x45f9cc['id'],'name':_0x29ad5a[_0x4f6a56(0xef)]??'','journeyBundleName':_0x29ad5a['journeyBundleName']??_0x29ad5a['name']??'','journeyBundleId':_0x29ad5a[_0x4f6a56(0xd6)]??'','versionNumber':_0x29ad5a[_0x4f6a56(0xbb)],'description':_0x29ad5a[_0x4f6a56(0xba)]??null,'state':parseJourneyState(_0x29ad5a[_0x4f6a56(0xc5)]),'paused':_0x29ad5a[_0x4f6a56(0xff)]??![],'audienceId':_0x1229f0,'folderId':_0x29ad5a[_0x4f6a56(0xfc)]??_0x45f9cc[_0x4f6a56(0xd5)]?.[_0x4f6a56(0xd4)]?.['data']?.['id']??null,'createdAt':_0x29ad5a[_0x4f6a56(0xcf)]??'','updatedAt':_0x29ad5a[_0x4f6a56(0xe1)]??''};}export class JourneySDK{[a82_0x5a0f6b(0xe5)];constructor(_0x1c9314){const _0x5e52be=a82_0x5a0f6b;this[_0x5e52be(0xe5)]=new CDPApiClient(_0x1c9314,_0x1c9314[_0x5e52be(0xbe)]);}['applyVersionDeduplication'](_0x58bc9d,_0x50616b){return _0x50616b?_0x58bc9d:deduplicateJourneysByBundle(_0x58bc9d);}async['listJourneysWithDetails'](_0x2ea5d9,_0x43f329){const _0x2c8bb8=a82_0x5a0f6b;try{const _0x2adecf=await this[_0x2c8bb8(0xe5)][_0x2c8bb8(0xf3)](_0x2ea5d9);return{'journeys':this[_0x2c8bb8(0xc0)](_0x2adecf[_0x2c8bb8(0xe4)],_0x43f329),'activationStepsById':_0x2adecf[_0x2c8bb8(0xe9)]};}catch(_0x2b2fd7){if(isHttp404Error(_0x2b2fd7))return{'journeys':[],'activationStepsById':new Map()};throw _0x2b2fd7;}}async[a82_0x5a0f6b(0xea)](_0x424bc4,_0x962941,_0x85aaea){const _0x4d56b9=a82_0x5a0f6b;let _0x5888d7=_0x962941;if(!_0x5888d7)try{const _0x2e3364=await this[_0x4d56b9(0xe5)][_0x4d56b9(0xc2)](_0x424bc4);_0x5888d7=_0x2e3364[_0x4d56b9(0xda)]??undefined;}catch(_0xfea0f4){if(isHttp404Error(_0xfea0f4))return[];throw _0xfea0f4;}if(!_0x5888d7)return[];let _0x20db15;if(_0x85aaea?.[_0x4d56b9(0xc4)]){const _0x6ca668=await this[_0x4d56b9(0xe5)]['listSegmentFolders'](_0x424bc4),_0x2347b6=_0x6ca668['map'](_0xf41d79=>this[_0x4d56b9(0xe5)][_0x4d56b9(0xe0)](_0xf41d79['id'])),_0x592f6b=await Promise['all'](_0x2347b6);_0x20db15=_0x592f6b[_0x4d56b9(0xe2)]();}else{const _0x5f12f0=await this[_0x4d56b9(0xe5)][_0x4d56b9(0xfd)](_0x5888d7,0x20,![]),_0xddca89=_0x5f12f0[_0x4d56b9(0xf1)],_0x1bd04d=_0xddca89[_0x4d56b9(0xcc)](_0x4e47d1=>_0x4e47d1[_0x4d56b9(0xde)]===_0x4d56b9(0xc1));_0x20db15=_0x1bd04d['map'](_0x3c3494=>entityToJourneyListItem(_0x3c3494,_0x424bc4));}return this[_0x4d56b9(0xc0)](_0x20db15,_0x85aaea?.[_0x4d56b9(0xc4)]);}async[a82_0x5a0f6b(0xec)](_0x3d4f03,_0x2195b2,_0x5594b0){const _0x1a5a85=a82_0x5a0f6b;if(!_0x2195b2)return{'journeys':[],'folders':[]};const _0x293823=await this[_0x1a5a85(0xe5)][_0x1a5a85(0xfd)](_0x2195b2,0x20,![]),_0x71b85e=_0x293823[_0x1a5a85(0xf1)],_0x4eb7c8=_0x71b85e[_0x1a5a85(0xcc)](_0x4c432f=>_0x4c432f[_0x1a5a85(0xde)]===_0x1a5a85(0xfa)&&_0x4c432f['id']!==_0x2195b2),_0x9f9940=_0x4eb7c8[_0x1a5a85(0xf4)](_0x33b14f=>({'id':_0x33b14f['id'],'name':_0x33b14f[_0x1a5a85(0xcb)][_0x1a5a85(0xef)]})),_0x23fa55=_0x71b85e[_0x1a5a85(0xcc)](_0x2d1a7d=>_0x2d1a7d[_0x1a5a85(0xde)]==='journey'),_0x212ada=_0x23fa55[_0x1a5a85(0xf4)](_0x2d5a8d=>entityToJourneyListItem(_0x2d5a8d,_0x3d4f03));return{'journeys':this[_0x1a5a85(0xc0)](_0x212ada,_0x5594b0?.[_0x1a5a85(0xc4)]),'folders':_0x9f9940};}async[a82_0x5a0f6b(0xbf)](_0x24e793,_0x229c94){const _0x17c39a=a82_0x5a0f6b;let _0x4667e4;try{_0x4667e4=await this['client']['listSegmentFolders'](_0x24e793);}catch(_0x5c7b1c){if(isHttp404Error(_0x5c7b1c))return{'journeys':[],'activationStepsById':new Map()};throw _0x5c7b1c;}const _0x4bde06=_0x4667e4[_0x17c39a(0xf4)](async _0x1debd6=>{const _0xdf7d92=_0x17c39a;return await this[_0xdf7d92(0xf3)](_0x1debd6['id'],_0x229c94?.[_0xdf7d92(0xc4)]);}),_0x5cddd8=await Promise[_0x17c39a(0xd0)](_0x4bde06),_0x3759b7=new Map(),_0x3757f5=[];for(const _0x2eb939 of _0x5cddd8){_0x3757f5['push'](..._0x2eb939['journeys']);for(const [_0x40bf19,_0x28ed2c]of _0x2eb939[_0x17c39a(0xe9)]){_0x3759b7[_0x17c39a(0xc3)](_0x40bf19,_0x28ed2c);}}const _0x473632=new Set(),_0x2563b0=_0x3757f5['filter'](_0x436945=>{const _0x2166bd=_0x17c39a;if(_0x473632['has'](_0x436945['id']))return![];return _0x473632[_0x2166bd(0xce)](_0x436945['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x2563b0,_0x229c94?.[_0x17c39a(0xc4)]),'activationStepsById':_0x3759b7};}async[a82_0x5a0f6b(0xe8)](_0x5b198d){const _0x2427f8=a82_0x5a0f6b;try{return await this[_0x2427f8(0xe5)][_0x2427f8(0xe8)](_0x5b198d);}catch(_0x549a40){if(isHttp404Error(_0x549a40))throw new SDKError(ErrorCode[_0x2427f8(0xfe)],_0x2427f8(0xdd)+_0x5b198d,_0x549a40);throw _0x549a40;}}async[a82_0x5a0f6b(0xbd)](_0xf8a9a4,_0xb1a424){const _0x150bbc=a82_0x5a0f6b,_0x40fcd8=await this[_0x150bbc(0xea)](_0xf8a9a4),_0x13028e=_0x40fcd8[_0x150bbc(0xf6)](_0xcdd3f=>_0xcdd3f[_0x150bbc(0xd2)]['toLowerCase']()===_0xb1a424[_0x150bbc(0xc9)]());if(!_0x13028e)throw new SDKError(ErrorCode[_0x150bbc(0xfe)],_0x150bbc(0xdd)+_0xb1a424,undefined,{'helpText':'Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'});return _0x13028e['id'];}async[a82_0x5a0f6b(0xd7)](_0x6ec602){const _0x2bb873=a82_0x5a0f6b;try{return await this[_0x2bb873(0xe5)][_0x2bb873(0xeb)](_0x6ec602);}catch(_0x6304d2){if(isHttp404Error(_0x6304d2))throw new SDKError(ErrorCode[_0x2bb873(0xfe)],'Journey\x20not\x20found:\x20'+_0x6ec602,_0x6304d2);throw _0x6304d2;}}async[a82_0x5a0f6b(0xe6)](_0x4d8da4){const _0x5e18d6=a82_0x5a0f6b;try{return await this[_0x5e18d6(0xe5)][_0x5e18d6(0xfb)](_0x4d8da4);}catch(_0x47c6bd){if(isHttp404Error(_0x47c6bd))throw new SDKError(ErrorCode[_0x5e18d6(0xfe)],'Journey\x20not\x20found:\x20'+_0x4d8da4,_0x47c6bd);throw _0x47c6bd;}}async['resume'](_0x6f6e81){const _0x549e83=a82_0x5a0f6b;try{return await this[_0x549e83(0xe5)]['resumeJourney'](_0x6f6e81);}catch(_0x4f1323){if(isHttp404Error(_0x4f1323))throw new SDKError(ErrorCode[_0x549e83(0xfe)],_0x549e83(0xdd)+_0x6f6e81,_0x4f1323);throw _0x4f1323;}}async['create'](_0x395c6e){const _0x40f997=a82_0x5a0f6b;return await this['client'][_0x40f997(0xe3)](_0x395c6e);}async['update'](_0x4ac275,_0x9d9b06){const _0x49b118=a82_0x5a0f6b;try{return await this['client'][_0x49b118(0xdc)](_0x4ac275,_0x9d9b06);}catch(_0x5b3533){if(isHttp404Error(_0x5b3533))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x4ac275,_0x5b3533);throw _0x5b3533;}}async[a82_0x5a0f6b(0xbc)](_0x5698e1,_0x505fda){const _0x262d15=a82_0x5a0f6b;try{return await this['client'][_0x262d15(0xd8)](_0x5698e1,_0x505fda);}catch(_0x32e51e){if(isHttp404Error(_0x32e51e))throw new SDKError(ErrorCode['NOT_FOUND'],_0x262d15(0xf9)+_0x505fda+_0x262d15(0xf8)+_0x5698e1,_0x32e51e);throw _0x32e51e;}}async['listActivations'](_0x592727){const _0x1e122a=a82_0x5a0f6b;try{return await this[_0x1e122a(0xe5)]['listJourneyActivations'](_0x592727);}catch(_0x2ff3e2){if(isHttp404Error(_0x2ff3e2))return[];throw _0x2ff3e2;}}async['createActivation'](_0x1fb566,_0x1f4990){const _0x13ecaa=a82_0x5a0f6b;return await this[_0x13ecaa(0xe5)]['createJourneyActivation'](_0x1fb566,_0x1f4990);}}
|
package/dist/sdk/journey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey.js","sourceRoot":"","sources":["../../src/sdk/journey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"journey.js","sourceRoot":"","sources":["../../src/sdk/journey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAY1D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE;;GAEG;AACH,SAAS,WAAW,CAAC,OAAuF;IAC1G,OAAO,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,UAAU,EAAE,eAAe,IAAI,SAAS,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,OAA4E;IACpG,OAAO,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,UAAU,EAAE,aAAa,IAAI,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAa;IAEb,kEAAkE;IAClE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAa,CAAC;IACtC,IAAI,eAAe,GAAG,CAAC,CAAC;IAExB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,4FAA4F;YAC5F,MAAM,SAAS,GAAG,aAAc,OAA2B,CAAC,EAAE,IAAI,OAAO,eAAe,EAAE,EAAE,EAAE,CAAC;YAC/F,QAAQ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Aa,CACjB,SAAiB,EACjB,uBAA+B;QAE/B,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;QACpF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,SAAS,EACnB,sCAAsC,uBAAuB,eAAe,SAAS,EAAE,EACvF,KAAK,CACN,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CAAC,SAAiB;QACrC,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,gBAAgB,CACpB,SAAiB,EACjB,OAAuC;QAEvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e9087,_0xab261c){const _0x2a538f=a83_0x48a9,_0x30c870=_0x1e9087();while(!![]){try{const _0x4e9893=parseInt(_0x2a538f(0x9f))/0x1*(parseInt(_0x2a538f(0x98))/0x2)+parseInt(_0x2a538f(0x9d))/0x3+-parseInt(_0x2a538f(0x97))/0x4+parseInt(_0x2a538f(0x9e))/0x5*(-parseInt(_0x2a538f(0xa0))/0x6)+parseInt(_0x2a538f(0x95))/0x7*(-parseInt(_0x2a538f(0x9a))/0x8)+parseInt(_0x2a538f(0x9c))/0x9+parseInt(_0x2a538f(0x96))/0xa;if(_0x4e9893===_0xab261c)break;else _0x30c870['push'](_0x30c870['shift']());}catch(_0x4fb67b){_0x30c870['push'](_0x30c870['shift']());}}}(a83_0x51d0,0xe8021));function a83_0x51d0(){const _0x4ec75b=['2SmNcAK','last_chat_id','8uXiGdK','tdx','5284215fOqFNW','2002458Nxccdc','688105IYOwVi','1694761dMRxsa','48nkMGGx','utf-8','trim','11002243CaLwjA','19921400XIGMAL','5274000gJOhxP'];a83_0x51d0=function(){return _0x4ec75b;};return a83_0x51d0();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x7480e7=a83_0x48a9;return join(process['cwd'](),'.cache',_0x7480e7(0x9b));}function getLastChatIdPath(){const _0x3ff2d3=a83_0x48a9;return join(getCacheDir(),_0x3ff2d3(0x99));}function ensureCacheDir(){const _0x2d61e3=getCacheDir();!existsSync(_0x2d61e3)&&mkdirSync(_0x2d61e3,{'recursive':!![]});}export function saveLastChatId(_0x452dec){const _0x1b173a=a83_0x48a9;ensureCacheDir();const _0x1c0683=getLastChatIdPath();writeFileSync(_0x1c0683,_0x452dec,_0x1b173a(0xa1));}function a83_0x48a9(_0x5d8a63,_0x852b6e){_0x5d8a63=_0x5d8a63-0x94;const _0x51d0e2=a83_0x51d0();let _0x48a964=_0x51d0e2[_0x5d8a63];return _0x48a964;}export function loadLastChatId(){const _0xbc36f2=a83_0x48a9,_0x45a28d=getLastChatIdPath();if(!existsSync(_0x45a28d))return undefined;try{const _0x385552=readFileSync(_0x45a28d,'utf-8')[_0xbc36f2(0x94)]();return _0x385552||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x34ce44=a83_0x48a9,_0x43390b=getLastChatIdPath();if(existsSync(_0x43390b))try{writeFileSync(_0x43390b,'',_0x34ce44(0xa1));}catch{}}
|