Skip to content

Commit 2e110e1

Browse files
authored
Merge pull request #23 from spring-media/SPR-10621
SPR-10621: add new temp api for rosetta
2 parents 49ceacd + bc953f4 commit 2e110e1

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/coverage
2+
/dist
23
/node_modules
34
/.rpt2_cache
45

5-
.idea
6+
.idea

src/model.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export interface TealiumEventData {
2+
page_env?: string;
3+
page_brand?: string;
4+
page_app_name?: string;
5+
page_doc_type?: string;
6+
page_cms_id?: string;
7+
page_cms_path?: string;
8+
page_platform?: string;
9+
page_layout_breakpoint_class?: string;
10+
page_mode?: string;
11+
page_template_variant_abc?: string;
12+
page_template_variant_xyz?: string;
13+
page_abtest_id?: string;
14+
page_abtest_variant?: string;
15+
product_id_array?: string[];
16+
product_title_array?: string[];
17+
product_value_array?: string[];
18+
user_is_loggedin?: string;
19+
user_sso_id?: string;
20+
user_c1_tracking_id?: string;
21+
}
22+
23+
export interface TealiumData {
24+
event_name?: string;
25+
event_action?: string;
26+
event_label?: string;
27+
event_data?: TealiumEventData;
28+
}

src/ps-web-apis.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { TealiumData } from "./model";
2+
13
function requireApi<T>(name: string): Promise<T> {
24
// -- START -- static loader
35
const unresolvedPackages = {} as any;
@@ -93,3 +95,11 @@ export interface WhoamiV1 {
9395
export function whoamiV1(): Promise<WhoamiV1> {
9496
return requireApi("whoami:v1");
9597
}
98+
99+
export interface RosettaV1 {
100+
trackEvent(event: TealiumData): void;
101+
}
102+
103+
export function rosettaV1(): Promise<RosettaV1> {
104+
return requireApi("rosetta:v1");
105+
}

0 commit comments

Comments
 (0)