@blux.ai/web-sdk 1.1.7 → 1.2.1
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/package.json +1 -1
- package/dist/src/BluxClient.d.ts +5 -2
- package/dist/src/BluxClient.js +110 -37
- package/dist/src/BluxClient.js.map +1 -1
- package/dist/src/apis/APIs.d.ts +240 -65
- package/dist/src/apis/APIs.js +14 -19
- package/dist/src/apis/APIs.js.map +1 -1
- package/dist/src/apis/getItemRecommendations.d.ts +4 -0
- package/dist/src/apis/getItemRecommendations.js +7 -0
- package/dist/src/apis/getItemRecommendations.js.map +1 -0
- package/dist/src/events/AddCartaddEvent.d.ts +1 -1
- package/dist/src/events/AddCartaddEvent.js +2 -1
- package/dist/src/events/AddCartaddEvent.js.map +1 -1
- package/dist/src/events/AddInstantImpressionEvent.d.ts +1 -1
- package/dist/src/events/AddInstantImpressionEvent.js +2 -1
- package/dist/src/events/AddInstantImpressionEvent.js.map +1 -1
- package/dist/src/events/AddPageViewEvent.d.ts +1 -1
- package/dist/src/events/AddPageViewEvent.js +2 -2
- package/dist/src/events/AddPageViewEvent.js.map +1 -1
- package/dist/src/events/AddPersistentImpressionEvent.d.ts +1 -1
- package/dist/src/events/AddPersistentImpressionEvent.js +2 -1
- package/dist/src/events/AddPersistentImpressionEvent.js.map +1 -1
- package/dist/src/events/AddProductDetailViewEvent.d.ts +1 -1
- package/dist/src/events/AddProductDetailViewEvent.js +2 -1
- package/dist/src/events/AddProductDetailViewEvent.js.map +1 -1
- package/dist/src/events/AddSectionViewEvent.d.ts +1 -1
- package/dist/src/events/AddSectionViewEvent.js +2 -1
- package/dist/src/events/AddSectionViewEvent.js.map +1 -1
- package/dist/src/events/types.d.ts +12 -0
- package/dist/src/events/types.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/recs/ItemRec.d.ts +14 -0
- package/dist/src/recs/ItemRec.js +42 -0
- package/dist/src/recs/ItemRec.js.map +1 -0
- package/dist/src/recs/Rec.d.ts +5 -0
- package/dist/src/{recommendations/Recommendation.js → recs/Rec.js} +2 -2
- package/dist/src/recs/Rec.js.map +1 -0
- package/dist/src/recs/index.d.ts +1 -0
- package/dist/src/recs/index.js +2 -0
- package/dist/src/recs/index.js.map +1 -0
- package/dist/src/recs/types.d.ts +23 -0
- package/dist/src/recs/types.js.map +1 -0
- package/dist/src/utils/zodSchemas.d.ts +124 -11
- package/dist/src/utils/zodSchemas.js +64 -22
- package/dist/src/utils/zodSchemas.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/apis/getItemRecommendation.d.ts +0 -4
- package/dist/src/apis/getItemRecommendation.js +0 -7
- package/dist/src/apis/getItemRecommendation.js.map +0 -1
- package/dist/src/recommendations/ItemRecommendation.d.ts +0 -5
- package/dist/src/recommendations/ItemRecommendation.js +0 -13
- package/dist/src/recommendations/ItemRecommendation.js.map +0 -1
- package/dist/src/recommendations/Recommendation.d.ts +0 -5
- package/dist/src/recommendations/Recommendation.js.map +0 -1
- package/dist/src/recommendations/index.d.ts +0 -1
- package/dist/src/recommendations/index.js +0 -2
- package/dist/src/recommendations/index.js.map +0 -1
- package/dist/src/recommendations/types.d.ts +0 -12
- package/dist/src/recommendations/types.js.map +0 -1
- /package/dist/src/{recommendations → recs}/types.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event, EventType } from "./Event";
|
|
2
2
|
export class AddInstantImpressionEvent extends Event {
|
|
3
|
-
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, }) {
|
|
3
|
+
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, trackings, }) {
|
|
4
4
|
super({
|
|
5
5
|
event_type: EventType.instant_impression,
|
|
6
6
|
event_properties: {
|
|
@@ -9,6 +9,7 @@ export class AddInstantImpressionEvent extends Event {
|
|
|
9
9
|
section,
|
|
10
10
|
position,
|
|
11
11
|
recommendation_id,
|
|
12
|
+
trackings,
|
|
12
13
|
},
|
|
13
14
|
custom_event_properties,
|
|
14
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddInstantImpressionEvent.js","sourceRoot":"/","sources":["src/events/AddInstantImpressionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AddInstantImpressionEvent.js","sourceRoot":"/","sources":["src/events/AddInstantImpressionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,uBAAuB,EACvB,SAAS,GACkB;QAC3B,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,kBAAkB;YACxC,gBAAgB,EAAE;gBAChB,OAAO;gBACP,IAAI;gBACJ,OAAO;gBACP,QAAQ;gBACR,iBAAiB;gBACjB,SAAS;aACV;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddInstantImpressionEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddInstantImpressionEvent extends Event {\n constructor({\n page,\n section,\n position,\n recommendation_id,\n item_id,\n custom_event_properties,\n trackings,\n }: IAddInstantImpressionEvent) {\n super({\n event_type: EventType.instant_impression,\n event_properties: {\n item_id,\n page,\n section,\n position,\n recommendation_id,\n trackings,\n },\n custom_event_properties,\n });\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAddPageViewEvent } from "./types";
|
|
2
2
|
import { Event } from "./Event";
|
|
3
3
|
export declare class AddPageViewEvent extends Event {
|
|
4
|
-
constructor({ page, custom_event_properties }: IAddPageViewEvent);
|
|
4
|
+
constructor({ page, custom_event_properties, trackings }: IAddPageViewEvent);
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Event, EventType } from "./Event";
|
|
2
2
|
export class AddPageViewEvent extends Event {
|
|
3
|
-
constructor({ page, custom_event_properties }) {
|
|
3
|
+
constructor({ page, custom_event_properties, trackings }) {
|
|
4
4
|
super({
|
|
5
5
|
event_type: EventType.page_view,
|
|
6
|
-
event_properties: { page },
|
|
6
|
+
event_properties: { page, trackings },
|
|
7
7
|
custom_event_properties,
|
|
8
8
|
});
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddPageViewEvent.js","sourceRoot":"/","sources":["src/events/AddPageViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,EAAE,IAAI,EAAE,uBAAuB,EAAqB;
|
|
1
|
+
{"version":3,"file":"AddPageViewEvent.js","sourceRoot":"/","sources":["src/events/AddPageViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,EAAE,IAAI,EAAE,uBAAuB,EAAE,SAAS,EAAqB;QACzE,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,SAAS;YAC/B,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddPageViewEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddPageViewEvent extends Event {\n constructor({ page, custom_event_properties, trackings }: IAddPageViewEvent) {\n super({\n event_type: EventType.page_view,\n event_properties: { page, trackings },\n custom_event_properties,\n });\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAddPersistentImpressionEvent } from "./types";
|
|
2
2
|
import { Event } from "./Event";
|
|
3
3
|
export declare class AddPersistentImpressionEvent extends Event {
|
|
4
|
-
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, }: IAddPersistentImpressionEvent);
|
|
4
|
+
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, trackings, }: IAddPersistentImpressionEvent);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event, EventType } from "./Event";
|
|
2
2
|
export class AddPersistentImpressionEvent extends Event {
|
|
3
|
-
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, }) {
|
|
3
|
+
constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, trackings, }) {
|
|
4
4
|
super({
|
|
5
5
|
event_type: EventType.persistent_impression,
|
|
6
6
|
event_properties: {
|
|
@@ -9,6 +9,7 @@ export class AddPersistentImpressionEvent extends Event {
|
|
|
9
9
|
section,
|
|
10
10
|
position,
|
|
11
11
|
recommendation_id,
|
|
12
|
+
trackings,
|
|
12
13
|
},
|
|
13
14
|
custom_event_properties,
|
|
14
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddPersistentImpressionEvent.js","sourceRoot":"/","sources":["src/events/AddPersistentImpressionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,YAAY,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AddPersistentImpressionEvent.js","sourceRoot":"/","sources":["src/events/AddPersistentImpressionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,YAAY,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,uBAAuB,EACvB,SAAS,GACqB;QAC9B,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,qBAAqB;YAC3C,gBAAgB,EAAE;gBAChB,OAAO;gBACP,IAAI;gBACJ,OAAO;gBACP,QAAQ;gBACR,iBAAiB;gBACjB,SAAS;aACV;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddPersistentImpressionEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddPersistentImpressionEvent extends Event {\n constructor({\n page,\n section,\n position,\n recommendation_id,\n item_id,\n custom_event_properties,\n trackings,\n }: IAddPersistentImpressionEvent) {\n super({\n event_type: EventType.persistent_impression,\n event_properties: {\n item_id,\n page,\n section,\n position,\n recommendation_id,\n trackings,\n },\n custom_event_properties,\n });\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAddProductDetailViewEvent } from "./types";
|
|
2
2
|
import { Event } from "./Event";
|
|
3
3
|
export declare class AddProductDetailViewEvent extends Event {
|
|
4
|
-
constructor({ item_id, prev_page, prev_section, recommendation_id, custom_event_properties, }: IAddProductDetailViewEvent);
|
|
4
|
+
constructor({ item_id, prev_page, prev_section, recommendation_id, custom_event_properties, trackings, }: IAddProductDetailViewEvent);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event, EventType } from "./Event";
|
|
2
2
|
export class AddProductDetailViewEvent extends Event {
|
|
3
|
-
constructor({ item_id, prev_page, prev_section, recommendation_id, custom_event_properties, }) {
|
|
3
|
+
constructor({ item_id, prev_page, prev_section, recommendation_id, custom_event_properties, trackings, }) {
|
|
4
4
|
super({
|
|
5
5
|
event_type: EventType.product_detail_view,
|
|
6
6
|
event_properties: {
|
|
@@ -8,6 +8,7 @@ export class AddProductDetailViewEvent extends Event {
|
|
|
8
8
|
prev_page,
|
|
9
9
|
prev_section,
|
|
10
10
|
recommendation_id,
|
|
11
|
+
trackings,
|
|
11
12
|
},
|
|
12
13
|
custom_event_properties,
|
|
13
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddProductDetailViewEvent.js","sourceRoot":"/","sources":["src/events/AddProductDetailViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AddProductDetailViewEvent.js","sourceRoot":"/","sources":["src/events/AddProductDetailViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,SAAS,GACkB;QAC3B,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,mBAAmB;YACzC,gBAAgB,EAAE;gBAChB,OAAO;gBACP,SAAS;gBACT,YAAY;gBACZ,iBAAiB;gBACjB,SAAS;aACV;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddProductDetailViewEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddProductDetailViewEvent extends Event {\n constructor({\n item_id,\n prev_page,\n prev_section,\n recommendation_id,\n custom_event_properties,\n trackings,\n }: IAddProductDetailViewEvent) {\n super({\n event_type: EventType.product_detail_view,\n event_properties: {\n item_id,\n prev_page,\n prev_section,\n recommendation_id,\n trackings,\n },\n custom_event_properties,\n });\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAddSectionViewEvent } from "./types";
|
|
2
2
|
import { Event } from "./Event";
|
|
3
3
|
export declare class AddSectionViewEvent extends Event {
|
|
4
|
-
constructor({ section, recommendation_id, custom_event_properties, }: IAddSectionViewEvent);
|
|
4
|
+
constructor({ section, recommendation_id, custom_event_properties, trackings, }: IAddSectionViewEvent);
|
|
5
5
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Event, EventType } from "./Event";
|
|
2
2
|
export class AddSectionViewEvent extends Event {
|
|
3
|
-
constructor({ section, recommendation_id, custom_event_properties, }) {
|
|
3
|
+
constructor({ section, recommendation_id, custom_event_properties, trackings, }) {
|
|
4
4
|
super({
|
|
5
5
|
event_type: EventType.section_view,
|
|
6
6
|
event_properties: {
|
|
7
7
|
section,
|
|
8
8
|
recommendation_id,
|
|
9
|
+
trackings,
|
|
9
10
|
},
|
|
10
11
|
custom_event_properties,
|
|
11
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddSectionViewEvent.js","sourceRoot":"/","sources":["src/events/AddSectionViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AddSectionViewEvent.js","sourceRoot":"/","sources":["src/events/AddSectionViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,SAAS,GACY;QACrB,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,YAAY;YAClC,gBAAgB,EAAE;gBAChB,OAAO;gBACP,iBAAiB;gBACjB,SAAS;aACV;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddSectionViewEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddSectionViewEvent extends Event {\n constructor({\n section,\n recommendation_id,\n custom_event_properties,\n trackings,\n }: IAddSectionViewEvent) {\n super({\n event_type: EventType.section_view,\n event_properties: {\n section,\n recommendation_id,\n trackings,\n },\n custom_event_properties,\n });\n }\n}\n"]}
|
|
@@ -10,6 +10,12 @@ type EventProperties = {
|
|
|
10
10
|
page?: string;
|
|
11
11
|
position?: number;
|
|
12
12
|
search_query?: string;
|
|
13
|
+
order_amount?: number;
|
|
14
|
+
paid_amount?: number;
|
|
15
|
+
trackings?: {
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}[];
|
|
13
19
|
};
|
|
14
20
|
export interface EventRequest {
|
|
15
21
|
id: string;
|
|
@@ -28,12 +34,14 @@ export interface IAddProductDetailViewEvent extends BaseEvent {
|
|
|
28
34
|
recommendation_id?: string;
|
|
29
35
|
prev_page?: string;
|
|
30
36
|
prev_section?: string;
|
|
37
|
+
trackings?: EventProperties["trackings"];
|
|
31
38
|
}
|
|
32
39
|
export interface IAddLikeEvent extends BaseEvent {
|
|
33
40
|
item_id: string;
|
|
34
41
|
}
|
|
35
42
|
export interface IAddCartaddEvent extends BaseEvent {
|
|
36
43
|
item_id: string;
|
|
44
|
+
trackings?: EventProperties["trackings"];
|
|
37
45
|
}
|
|
38
46
|
export interface IAddRateEvent extends BaseEvent {
|
|
39
47
|
item_id: string;
|
|
@@ -52,10 +60,12 @@ export type IVisitEvent = BaseEvent;
|
|
|
52
60
|
export type IAddPageVisitEvent = BaseEvent;
|
|
53
61
|
export interface IAddPageViewEvent extends Omit<BaseEvent, "item_id"> {
|
|
54
62
|
page: string;
|
|
63
|
+
trackings?: EventProperties["trackings"];
|
|
55
64
|
}
|
|
56
65
|
export interface IAddSectionViewEvent extends Omit<BaseEvent, "item_id"> {
|
|
57
66
|
section: string;
|
|
58
67
|
recommendation_id?: string;
|
|
68
|
+
trackings?: EventProperties["trackings"];
|
|
59
69
|
}
|
|
60
70
|
export interface IAddInstantImpressionEvent extends BaseEvent {
|
|
61
71
|
item_id: string;
|
|
@@ -63,6 +73,7 @@ export interface IAddInstantImpressionEvent extends BaseEvent {
|
|
|
63
73
|
section: string;
|
|
64
74
|
position: number;
|
|
65
75
|
recommendation_id?: string;
|
|
76
|
+
trackings?: EventProperties["trackings"];
|
|
66
77
|
}
|
|
67
78
|
export interface IAddPersistentImpressionEvent extends BaseEvent {
|
|
68
79
|
item_id: string;
|
|
@@ -70,6 +81,7 @@ export interface IAddPersistentImpressionEvent extends BaseEvent {
|
|
|
70
81
|
section: string;
|
|
71
82
|
position: number;
|
|
72
83
|
recommendation_id?: string;
|
|
84
|
+
trackings?: EventProperties["trackings"];
|
|
73
85
|
}
|
|
74
86
|
export interface IAddSearchEvent extends BaseEvent {
|
|
75
87
|
search_query: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["src/events/types.ts"],"names":[],"mappings":"AAAA,uDAAuD","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype EventProperties = {\n item_id?: string;\n section?: string;\n prev_section?: string;\n recommendation_id?: string;\n price?: number;\n order_id?: string;\n rating?: number;\n prev_page?: string;\n page?: string;\n position?: number;\n search_query?: string;\n};\nexport interface EventRequest {\n id: string;\n event_type: string;\n event_properties?: EventProperties;\n custom_event_properties?: Record<string, any>;\n internal_event_properties?: { url?: string; ref?: string };\n captured_at: string;\n}\n\ntype BaseEvent = Omit<\n EventRequest,\n | \"event_type\"\n | \"id\"\n | \"captured_at\"\n | \"internal_event_properties\"\n | \"event_properties\"\n>;\n\nexport interface IAddProductDetailViewEvent extends BaseEvent {\n item_id: string;\n recommendation_id?: string;\n prev_page?: string;\n prev_section?: string;\n}\n\nexport interface IAddLikeEvent extends BaseEvent {\n item_id: string;\n}\n\nexport interface IAddCartaddEvent extends BaseEvent {\n item_id: string;\n}\n\nexport interface IAddRateEvent extends BaseEvent {\n item_id: string;\n rating: number;\n}\n\nexport interface IAddPurchaseEvent extends BaseEvent {\n item_id: string;\n price: number;\n order_id?: string;\n}\n\nexport interface IAddCustomEvent extends BaseEvent {\n event_type: string;\n event_properties?: EventProperties;\n}\n\nexport type IVisitEvent = BaseEvent;\n\nexport type IAddPageVisitEvent = BaseEvent;\n\nexport interface IAddPageViewEvent extends Omit<BaseEvent, \"item_id\"> {\n page: string;\n}\n\nexport interface IAddSectionViewEvent extends Omit<BaseEvent, \"item_id\"> {\n section: string;\n recommendation_id?: string;\n}\n\nexport interface IAddInstantImpressionEvent extends BaseEvent {\n item_id: string;\n page: string;\n section: string;\n position: number;\n recommendation_id?: string;\n}\n\nexport interface IAddPersistentImpressionEvent extends BaseEvent {\n item_id: string;\n page: string;\n section: string;\n position: number;\n recommendation_id?: string;\n}\n\nexport interface IAddSearchEvent extends BaseEvent {\n search_query: string;\n recommendation_id?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["src/events/types.ts"],"names":[],"mappings":"AAAA,uDAAuD","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype EventProperties = {\n item_id?: string;\n section?: string;\n prev_section?: string;\n recommendation_id?: string;\n price?: number;\n order_id?: string;\n rating?: number;\n prev_page?: string;\n page?: string;\n position?: number;\n search_query?: string;\n order_amount?: number;\n paid_amount?: number;\n trackings?: {\n id: string;\n type: string;\n }[];\n};\nexport interface EventRequest {\n id: string;\n event_type: string;\n event_properties?: EventProperties;\n custom_event_properties?: Record<string, any>;\n internal_event_properties?: { url?: string; ref?: string };\n captured_at: string;\n}\n\ntype BaseEvent = Omit<\n EventRequest,\n | \"event_type\"\n | \"id\"\n | \"captured_at\"\n | \"internal_event_properties\"\n | \"event_properties\"\n>;\n\nexport interface IAddProductDetailViewEvent extends BaseEvent {\n item_id: string;\n recommendation_id?: string;\n prev_page?: string;\n prev_section?: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddLikeEvent extends BaseEvent {\n item_id: string;\n}\n\nexport interface IAddCartaddEvent extends BaseEvent {\n item_id: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddRateEvent extends BaseEvent {\n item_id: string;\n rating: number;\n}\n\nexport interface IAddPurchaseEvent extends BaseEvent {\n item_id: string;\n price: number;\n order_id?: string;\n}\n\nexport interface IAddCustomEvent extends BaseEvent {\n event_type: string;\n event_properties?: EventProperties;\n}\n\nexport type IVisitEvent = BaseEvent;\n\nexport type IAddPageVisitEvent = BaseEvent;\n\nexport interface IAddPageViewEvent extends Omit<BaseEvent, \"item_id\"> {\n page: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddSectionViewEvent extends Omit<BaseEvent, \"item_id\"> {\n section: string;\n recommendation_id?: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddInstantImpressionEvent extends BaseEvent {\n item_id: string;\n page: string;\n section: string;\n position: number;\n recommendation_id?: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddPersistentImpressionEvent extends BaseEvent {\n item_id: string;\n page: string;\n section: string;\n position: number;\n recommendation_id?: string;\n trackings?: EventProperties[\"trackings\"];\n}\n\nexport interface IAddSearchEvent extends BaseEvent {\n search_query: string;\n recommendation_id?: string;\n}\n"]}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { BluxClient } from \"./BluxClient\";\n\nexport * from \"./events\";\nexport * from \"./recs\";\n\nexport { BluxClient };\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Rec } from "./Rec";
|
|
2
|
+
import type { ICategoryRec, IItemRec, IItemsRec, IUserRec } from "./types";
|
|
3
|
+
export declare class UserRec extends Rec {
|
|
4
|
+
constructor({ call_type, limit, offset }: IUserRec);
|
|
5
|
+
}
|
|
6
|
+
export declare class ItemRec extends Rec {
|
|
7
|
+
constructor({ call_type, item_id, limit, offset }: IItemRec);
|
|
8
|
+
}
|
|
9
|
+
export declare class ItemsRec extends Rec {
|
|
10
|
+
constructor({ call_type, item_ids, limit, offset }: IItemsRec);
|
|
11
|
+
}
|
|
12
|
+
export declare class CategoryRec extends Rec {
|
|
13
|
+
constructor({ call_type, category_id, limit, offset }: ICategoryRec);
|
|
14
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Rec } from "./Rec";
|
|
2
|
+
export class UserRec extends Rec {
|
|
3
|
+
constructor({ call_type, limit, offset }) {
|
|
4
|
+
super({
|
|
5
|
+
call_type,
|
|
6
|
+
limit,
|
|
7
|
+
offset,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
// (단일) 상품 기반 추천
|
|
12
|
+
export class ItemRec extends Rec {
|
|
13
|
+
constructor({ call_type, item_id, limit, offset }) {
|
|
14
|
+
super({
|
|
15
|
+
call_type,
|
|
16
|
+
item_id,
|
|
17
|
+
limit,
|
|
18
|
+
offset,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class ItemsRec extends Rec {
|
|
23
|
+
constructor({ call_type, item_ids, limit, offset }) {
|
|
24
|
+
super({
|
|
25
|
+
call_type,
|
|
26
|
+
item_ids,
|
|
27
|
+
limit,
|
|
28
|
+
offset,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class CategoryRec extends Rec {
|
|
33
|
+
constructor({ call_type, category_id, limit, offset }) {
|
|
34
|
+
super({
|
|
35
|
+
call_type,
|
|
36
|
+
category_id,
|
|
37
|
+
limit,
|
|
38
|
+
offset,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ItemRec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemRec.js","sourceRoot":"/","sources":["src/recs/ItemRec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,MAAM,OAAO,OAAQ,SAAQ,GAAG;IAC9B,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAY;QAChD,KAAK,CAAC;YACJ,SAAS;YACT,KAAK;YACL,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,OAAO,OAAQ,SAAQ,GAAG;IAC9B,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAY;QACzD,KAAK,CAAC;YACJ,SAAS;YACT,OAAO;YACP,KAAK;YACL,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,QAAS,SAAQ,GAAG;IAC/B,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAa;QAC3D,KAAK,CAAC;YACJ,SAAS;YACT,QAAQ;YACR,KAAK;YACL,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,GAAG;IAClC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAgB;QACjE,KAAK,CAAC;YACJ,SAAS;YACT,WAAW;YACX,KAAK;YACL,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Rec } from \"./Rec\";\nimport type { ICategoryRec, IItemRec, IItemsRec, IUserRec } from \"./types\";\n\nexport class UserRec extends Rec {\n constructor({ call_type, limit, offset }: IUserRec) {\n super({\n call_type,\n limit,\n offset,\n });\n }\n}\n\n// (단일) 상품 기반 추천\nexport class ItemRec extends Rec {\n constructor({ call_type, item_id, limit, offset }: IItemRec) {\n super({\n call_type,\n item_id,\n limit,\n offset,\n });\n }\n}\n\nexport class ItemsRec extends Rec {\n constructor({ call_type, item_ids, limit, offset }: IItemsRec) {\n super({\n call_type,\n item_ids,\n limit,\n offset,\n });\n }\n}\n\nexport class CategoryRec extends Rec {\n constructor({ call_type, category_id, limit, offset }: ICategoryRec) {\n super({\n call_type,\n category_id,\n limit,\n offset,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rec.js","sourceRoot":"/","sources":["src/recs/Rec.ts"],"names":[],"mappings":"AAEA,MAAM,OAAgB,GAAG;IACP,OAAO,CAAa;IAEpC,YAAY,IAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI;SACR,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { RecRequest } from \"./types\";\n\nexport abstract class Rec {\n public readonly request: RecRequest;\n\n constructor(data: RecRequest) {\n this.request = {\n ...data,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ItemRec";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/recs/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from \"./ItemRec\";\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface RecRequest {
|
|
2
|
+
call_type: string;
|
|
3
|
+
limit: number;
|
|
4
|
+
offset?: number;
|
|
5
|
+
item_id?: string;
|
|
6
|
+
item_ids?: string[];
|
|
7
|
+
category_id?: string;
|
|
8
|
+
}
|
|
9
|
+
type BaseRec = Omit<RecRequest, "call_type" | "item_id" | "item_ids" | "category_id">;
|
|
10
|
+
export interface BaseItemRec extends BaseRec {
|
|
11
|
+
call_type: string;
|
|
12
|
+
}
|
|
13
|
+
export type IUserRec = BaseItemRec;
|
|
14
|
+
export interface IItemRec extends BaseItemRec {
|
|
15
|
+
item_id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IItemsRec extends BaseItemRec {
|
|
18
|
+
item_ids: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface ICategoryRec extends BaseItemRec {
|
|
21
|
+
category_id: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["src/recs/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RecRequest {\n call_type: string;\n limit: number;\n offset?: number;\n item_id?: string;\n item_ids?: string[];\n category_id?: string;\n}\n\ntype BaseRec = Omit<\n RecRequest,\n \"call_type\" | \"item_id\" | \"item_ids\" | \"category_id\"\n>;\n\nexport interface BaseItemRec extends BaseRec {\n call_type: string;\n}\n\nexport type IUserRec = BaseItemRec;\n\nexport interface IItemRec extends BaseItemRec {\n item_id: string;\n}\n\nexport interface IItemsRec extends BaseItemRec {\n item_ids: string[];\n}\n\nexport interface ICategoryRec extends BaseItemRec {\n category_id: string;\n}\n"]}
|
|
@@ -4,16 +4,129 @@ export declare const objectIdSchema: z.ZodEffects<z.ZodEffects<z.ZodString, stri
|
|
|
4
4
|
export declare const stringToNumberSchema: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>, number, string | number>;
|
|
5
5
|
export declare const dateSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
|
|
6
6
|
export declare const anonymousObjectSchema: <T extends object = object>() => z.ZodEffects<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, T, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
|
7
|
-
export declare const countryCodeWithLowerCaseSchema: z.ZodEffects<z.ZodEnum<["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW")[]]
|
|
8
|
-
export declare const customPropertiesRequestSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodNull]>>;
|
|
9
|
-
export declare const customPropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many"
|
|
7
|
+
export declare const countryCodeWithLowerCaseSchema: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodLiteral<"419">, z.ZodEnum<["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW")[]]>]>>, "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW" | undefined, string>;
|
|
8
|
+
export declare const customPropertiesRequestSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodNull, z.ZodUndefined]>>;
|
|
9
|
+
export declare const customPropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodUndefined]>>;
|
|
10
10
|
export type CustomProperties = z.infer<typeof customPropertiesSchema>;
|
|
11
|
-
export declare enum CustomPropertyDataType {
|
|
12
|
-
DATE = "DATE",
|
|
13
|
-
STRING = "STRING",
|
|
14
|
-
NUMBER = "NUMBER",
|
|
15
|
-
BOOLEAN = "BOOLEAN",
|
|
16
|
-
ARRAY_OF_STRING = "ARRAY_OF_STRING"
|
|
17
|
-
}
|
|
18
|
-
export declare const stringToObjectIdsSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string[], string>, string[], string>, ObjectId[], string>;
|
|
19
11
|
export declare const stringToArraySchema: z.ZodEffects<z.ZodEffects<z.ZodString, string[], string>, string[], string>;
|
|
12
|
+
export declare const eventPropertiesSchema: z.ZodObject<{
|
|
13
|
+
section: z.ZodOptional<z.ZodString>;
|
|
14
|
+
prev_section: z.ZodOptional<z.ZodString>;
|
|
15
|
+
recommendation_id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
prev_page: z.ZodOptional<z.ZodString>;
|
|
20
|
+
page: z.ZodOptional<z.ZodString>;
|
|
21
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
item_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
price: z.ZodNumber;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
id: string;
|
|
28
|
+
price: number;
|
|
29
|
+
}, {
|
|
30
|
+
id: string;
|
|
31
|
+
price: number;
|
|
32
|
+
}>, "many">>;
|
|
33
|
+
search_query: z.ZodOptional<z.ZodString>;
|
|
34
|
+
order_amount: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
paid_amount: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
trackings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
type: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
id: string;
|
|
41
|
+
type: string;
|
|
42
|
+
}, {
|
|
43
|
+
id: string;
|
|
44
|
+
type: string;
|
|
45
|
+
}>, "many">>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
item_id?: string | undefined;
|
|
48
|
+
recommendation_id?: string | undefined;
|
|
49
|
+
prev_page?: string | undefined;
|
|
50
|
+
prev_section?: string | undefined;
|
|
51
|
+
trackings?: {
|
|
52
|
+
id: string;
|
|
53
|
+
type: string;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
rating?: number | undefined;
|
|
56
|
+
price?: number | undefined;
|
|
57
|
+
order_id?: string | undefined;
|
|
58
|
+
page?: string | undefined;
|
|
59
|
+
section?: string | undefined;
|
|
60
|
+
position?: number | undefined;
|
|
61
|
+
search_query?: string | undefined;
|
|
62
|
+
items?: {
|
|
63
|
+
id: string;
|
|
64
|
+
price: number;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
order_amount?: number | undefined;
|
|
67
|
+
paid_amount?: number | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
item_id?: string | undefined;
|
|
70
|
+
recommendation_id?: string | undefined;
|
|
71
|
+
prev_page?: string | undefined;
|
|
72
|
+
prev_section?: string | undefined;
|
|
73
|
+
trackings?: {
|
|
74
|
+
id: string;
|
|
75
|
+
type: string;
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
rating?: number | undefined;
|
|
78
|
+
price?: number | undefined;
|
|
79
|
+
order_id?: string | undefined;
|
|
80
|
+
page?: string | undefined;
|
|
81
|
+
section?: string | undefined;
|
|
82
|
+
position?: number | undefined;
|
|
83
|
+
search_query?: string | undefined;
|
|
84
|
+
items?: {
|
|
85
|
+
id: string;
|
|
86
|
+
price: number;
|
|
87
|
+
}[] | undefined;
|
|
88
|
+
order_amount?: number | undefined;
|
|
89
|
+
paid_amount?: number | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export type EventProperties = z.infer<typeof eventPropertiesSchema>;
|
|
92
|
+
export declare const recommendationRequestSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
|
|
93
|
+
application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, ObjectId, string>;
|
|
94
|
+
blux_user_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, ObjectId, string>>>;
|
|
95
|
+
pipeline: z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
kwargs: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
name: string;
|
|
100
|
+
kwargs: Record<string, any>;
|
|
101
|
+
}, {
|
|
102
|
+
name: string;
|
|
103
|
+
kwargs: Record<string, any>;
|
|
104
|
+
}>, "many">;
|
|
105
|
+
item_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
item_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
107
|
+
limit: z.ZodNumber;
|
|
108
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
109
|
+
options: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
110
|
+
}, "item_id" | "item_ids" | "limit" | "offset">, {
|
|
111
|
+
call_type: z.ZodString;
|
|
112
|
+
category_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
}>, "strip", z.ZodTypeAny, {
|
|
114
|
+
limit: number;
|
|
115
|
+
offset: number | null;
|
|
116
|
+
call_type: string;
|
|
117
|
+
item_id?: string | null | undefined;
|
|
118
|
+
item_ids?: string[] | null | undefined;
|
|
119
|
+
category_id?: string | null | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
limit: number;
|
|
122
|
+
call_type: string;
|
|
123
|
+
item_id?: string | null | undefined;
|
|
124
|
+
item_ids?: string[] | null | undefined;
|
|
125
|
+
offset?: number | null | undefined;
|
|
126
|
+
category_id?: string | null | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
export type RecResponse = {
|
|
129
|
+
item_ids: string[];
|
|
130
|
+
metadata: Record<string, unknown>;
|
|
131
|
+
recommendation_id: string | null;
|
|
132
|
+
};
|