@cakemail-org/ui-components-v2 2.2.104 → 2.2.105
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/cjs/factories/eventTracking/index.d.ts +14 -0
- package/dist/cjs/factories/eventTracking/types.d.ts +91 -0
- package/dist/cjs/factories/index.d.ts +1 -0
- package/dist/cjs/index.js +273 -0
- package/dist/cjs/models/eventTracking/index.d.ts +31 -0
- package/dist/cjs/models/eventTracking/types.d.ts +47 -0
- package/dist/cjs/models/index.d.ts +1 -0
- package/dist/cjs/services/eventTracking/index.d.ts +8 -0
- package/dist/cjs/services/eventTracking/types.d.ts +92 -0
- package/dist/cjs/services/index.d.ts +1 -0
- package/dist/esm/factories/eventTracking/index.d.ts +14 -0
- package/dist/esm/factories/eventTracking/types.d.ts +91 -0
- package/dist/esm/factories/index.d.ts +1 -0
- package/dist/esm/index.js +266 -1
- package/dist/esm/models/eventTracking/index.d.ts +31 -0
- package/dist/esm/models/eventTracking/types.d.ts +47 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/services/eventTracking/index.d.ts +8 -0
- package/dist/esm/services/eventTracking/types.d.ts +92 -0
- package/dist/esm/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventModel } from "../../models/eventTracking";
|
|
2
|
+
import { TGetEventBreakdown, TGetEventFunnel, TGetEventPropertyKeys, TGetEventSummary, TGetEventTimeseries, TListEvents } from "../../services/eventTracking";
|
|
3
|
+
import { TEventBreakdown, TEventFunnel, TEventListResponse, TEventPropertyKeys, TEventSummary, TEventTimeseries } from "./types";
|
|
4
|
+
export declare class EventTrackingFactory {
|
|
5
|
+
static list({ ...options }: TListEvents): Promise<Omit<TEventListResponse, "items"> & {
|
|
6
|
+
items: EventModel[];
|
|
7
|
+
}>;
|
|
8
|
+
static getSummary({ ...options }: TGetEventSummary): Promise<TEventSummary>;
|
|
9
|
+
static getTimeseries({ ...options }: TGetEventTimeseries): Promise<TEventTimeseries>;
|
|
10
|
+
static getBreakdown({ ...options }: TGetEventBreakdown): Promise<TEventBreakdown>;
|
|
11
|
+
static getPropertyKeys({ ...options }: TGetEventPropertyKeys): Promise<TEventPropertyKeys>;
|
|
12
|
+
static getFunnel({ ...options }: TGetEventFunnel): Promise<TEventFunnel>;
|
|
13
|
+
}
|
|
14
|
+
export * from "./types";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ETrackedEntityType, ETrackedEventType } from "../../models/eventTracking/types";
|
|
2
|
+
export type TEventRow = {
|
|
3
|
+
event_id: string;
|
|
4
|
+
event_type: ETrackedEventType | string;
|
|
5
|
+
entity_type: ETrackedEntityType | string;
|
|
6
|
+
entity_id: string;
|
|
7
|
+
session_id?: string | null;
|
|
8
|
+
visitor_id?: string | null;
|
|
9
|
+
occurred_at: string;
|
|
10
|
+
device_type?: string | null;
|
|
11
|
+
browser?: string | null;
|
|
12
|
+
os?: string | null;
|
|
13
|
+
source?: string | null;
|
|
14
|
+
utm_source?: string | null;
|
|
15
|
+
utm_medium?: string | null;
|
|
16
|
+
utm_campaign?: string | null;
|
|
17
|
+
referrer?: string | null;
|
|
18
|
+
properties: Record<string, unknown>;
|
|
19
|
+
scroll_depth?: number | null;
|
|
20
|
+
element_id?: string | null;
|
|
21
|
+
popup_trigger?: string | null;
|
|
22
|
+
page_url?: string | null;
|
|
23
|
+
email?: string | null;
|
|
24
|
+
list_id?: string | null;
|
|
25
|
+
contact_id?: string | null;
|
|
26
|
+
form_id?: string | null;
|
|
27
|
+
ip?: string | null;
|
|
28
|
+
};
|
|
29
|
+
export type TEventListResponse = {
|
|
30
|
+
total: number;
|
|
31
|
+
limit: number;
|
|
32
|
+
offset: number;
|
|
33
|
+
items: TEventRow[];
|
|
34
|
+
};
|
|
35
|
+
export type TSummaryByEventType = {
|
|
36
|
+
event_type: string;
|
|
37
|
+
count: number;
|
|
38
|
+
};
|
|
39
|
+
export type TEventSummary = {
|
|
40
|
+
total: number;
|
|
41
|
+
by_event_type: TSummaryByEventType[];
|
|
42
|
+
new_visitors: number;
|
|
43
|
+
returning_visitors: number;
|
|
44
|
+
};
|
|
45
|
+
export type TTimeseriesPoint = {
|
|
46
|
+
timestamp: string;
|
|
47
|
+
count: number;
|
|
48
|
+
};
|
|
49
|
+
export type TTimeseriesPointBreakdown = {
|
|
50
|
+
timestamp: string;
|
|
51
|
+
values: Array<{
|
|
52
|
+
dimension_value?: string | null;
|
|
53
|
+
count: number;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
export type TEventTimeseries = {
|
|
57
|
+
granularity: string;
|
|
58
|
+
event_type?: string | null;
|
|
59
|
+
breakdown?: string | null;
|
|
60
|
+
series: Array<TTimeseriesPoint | TTimeseriesPointBreakdown>;
|
|
61
|
+
};
|
|
62
|
+
export type TBreakdownItem = {
|
|
63
|
+
value?: string | null;
|
|
64
|
+
count: number;
|
|
65
|
+
percentage: number;
|
|
66
|
+
};
|
|
67
|
+
export type TEventBreakdown = {
|
|
68
|
+
dimension: string;
|
|
69
|
+
total: number;
|
|
70
|
+
items: TBreakdownItem[];
|
|
71
|
+
};
|
|
72
|
+
export type TPropertyKey = {
|
|
73
|
+
key: string;
|
|
74
|
+
count: number;
|
|
75
|
+
};
|
|
76
|
+
export type TEventPropertyKeys = {
|
|
77
|
+
keys: TPropertyKey[];
|
|
78
|
+
};
|
|
79
|
+
export type TFunnelStep = {
|
|
80
|
+
event_type: string;
|
|
81
|
+
count: number;
|
|
82
|
+
step_conversion_rate: number;
|
|
83
|
+
overall_conversion_rate: number;
|
|
84
|
+
};
|
|
85
|
+
export type TEventFunnel = {
|
|
86
|
+
window_hours: number;
|
|
87
|
+
steps: TFunnelStep[];
|
|
88
|
+
total_entered: number;
|
|
89
|
+
total_completed: number;
|
|
90
|
+
overall_conversion_rate: number;
|
|
91
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -11306,6 +11306,128 @@ function renderEmail(_a) {
|
|
|
11306
11306
|
});
|
|
11307
11307
|
}
|
|
11308
11308
|
|
|
11309
|
+
exports.EEventBreakdownDimension = void 0;
|
|
11310
|
+
(function (EEventBreakdownDimension) {
|
|
11311
|
+
EEventBreakdownDimension["deviceType"] = "device_type";
|
|
11312
|
+
EEventBreakdownDimension["browser"] = "browser";
|
|
11313
|
+
EEventBreakdownDimension["os"] = "os";
|
|
11314
|
+
EEventBreakdownDimension["source"] = "source";
|
|
11315
|
+
EEventBreakdownDimension["utmSource"] = "utm_source";
|
|
11316
|
+
EEventBreakdownDimension["utmMedium"] = "utm_medium";
|
|
11317
|
+
EEventBreakdownDimension["utmCampaign"] = "utm_campaign";
|
|
11318
|
+
EEventBreakdownDimension["entityType"] = "entity_type";
|
|
11319
|
+
EEventBreakdownDimension["elementId"] = "element_id";
|
|
11320
|
+
EEventBreakdownDimension["popupTrigger"] = "popup_trigger";
|
|
11321
|
+
EEventBreakdownDimension["pageUrl"] = "page_url";
|
|
11322
|
+
EEventBreakdownDimension["listId"] = "list_id";
|
|
11323
|
+
EEventBreakdownDimension["contactId"] = "contact_id";
|
|
11324
|
+
EEventBreakdownDimension["formId"] = "form_id";
|
|
11325
|
+
})(exports.EEventBreakdownDimension || (exports.EEventBreakdownDimension = {}));
|
|
11326
|
+
exports.EEventTimeseriesGranularity = void 0;
|
|
11327
|
+
(function (EEventTimeseriesGranularity) {
|
|
11328
|
+
EEventTimeseriesGranularity["hour"] = "hour";
|
|
11329
|
+
EEventTimeseriesGranularity["day"] = "day";
|
|
11330
|
+
EEventTimeseriesGranularity["week"] = "week";
|
|
11331
|
+
EEventTimeseriesGranularity["month"] = "month";
|
|
11332
|
+
})(exports.EEventTimeseriesGranularity || (exports.EEventTimeseriesGranularity = {}));
|
|
11333
|
+
exports.EEventSortField = void 0;
|
|
11334
|
+
(function (EEventSortField) {
|
|
11335
|
+
EEventSortField["occurredAt"] = "occurred_at";
|
|
11336
|
+
EEventSortField["eventType"] = "event_type";
|
|
11337
|
+
EEventSortField["entityId"] = "entity_id";
|
|
11338
|
+
EEventSortField["deviceType"] = "device_type";
|
|
11339
|
+
EEventSortField["source"] = "source";
|
|
11340
|
+
})(exports.EEventSortField || (exports.EEventSortField = {}));
|
|
11341
|
+
|
|
11342
|
+
var eventsBaseUrl = uiKitConfig.GATEWAY_PROXY + "/events";
|
|
11343
|
+
function buildEventQuery(options) {
|
|
11344
|
+
if (options === void 0) { options = {}; }
|
|
11345
|
+
var query = __assign({}, options);
|
|
11346
|
+
if (Array.isArray(query.eventType)) {
|
|
11347
|
+
query.eventType = query.eventType.join(",");
|
|
11348
|
+
}
|
|
11349
|
+
if (query.properties && typeof query.properties === "object") {
|
|
11350
|
+
query.properties = JSON.stringify(query.properties);
|
|
11351
|
+
}
|
|
11352
|
+
return camelCase(query);
|
|
11353
|
+
}
|
|
11354
|
+
function buildEventBody(body) {
|
|
11355
|
+
var payload = __assign({}, body);
|
|
11356
|
+
if (Array.isArray(payload.steps)) {
|
|
11357
|
+
payload.steps = payload.steps.map(function (step) {
|
|
11358
|
+
var funnelStep = step;
|
|
11359
|
+
return camelCase(funnelStep);
|
|
11360
|
+
});
|
|
11361
|
+
}
|
|
11362
|
+
return camelCase(payload);
|
|
11363
|
+
}
|
|
11364
|
+
function listEvents(_a) {
|
|
11365
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11366
|
+
return callApi({
|
|
11367
|
+
url: eventsBaseUrl,
|
|
11368
|
+
query: buildEventQuery(options),
|
|
11369
|
+
useImpersonationTree: useImpersonationTree,
|
|
11370
|
+
fetchOptions: {
|
|
11371
|
+
method: exports.EMethods.get,
|
|
11372
|
+
},
|
|
11373
|
+
});
|
|
11374
|
+
}
|
|
11375
|
+
function getEventSummary(_a) {
|
|
11376
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11377
|
+
return callApi({
|
|
11378
|
+
url: eventsBaseUrl + "/summary",
|
|
11379
|
+
query: buildEventQuery(options),
|
|
11380
|
+
useImpersonationTree: useImpersonationTree,
|
|
11381
|
+
fetchOptions: {
|
|
11382
|
+
method: exports.EMethods.get,
|
|
11383
|
+
},
|
|
11384
|
+
});
|
|
11385
|
+
}
|
|
11386
|
+
function getEventTimeseries(_a) {
|
|
11387
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11388
|
+
return callApi({
|
|
11389
|
+
url: eventsBaseUrl + "/timeseries",
|
|
11390
|
+
query: buildEventQuery(options),
|
|
11391
|
+
useImpersonationTree: useImpersonationTree,
|
|
11392
|
+
fetchOptions: {
|
|
11393
|
+
method: exports.EMethods.get,
|
|
11394
|
+
},
|
|
11395
|
+
});
|
|
11396
|
+
}
|
|
11397
|
+
function getEventBreakdown(_a) {
|
|
11398
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11399
|
+
return callApi({
|
|
11400
|
+
url: eventsBaseUrl + "/breakdown",
|
|
11401
|
+
query: buildEventQuery(options),
|
|
11402
|
+
useImpersonationTree: useImpersonationTree,
|
|
11403
|
+
fetchOptions: {
|
|
11404
|
+
method: exports.EMethods.get,
|
|
11405
|
+
},
|
|
11406
|
+
});
|
|
11407
|
+
}
|
|
11408
|
+
function getEventPropertyKeys(_a) {
|
|
11409
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11410
|
+
return callApi({
|
|
11411
|
+
url: eventsBaseUrl + "/properties",
|
|
11412
|
+
query: buildEventQuery(options),
|
|
11413
|
+
useImpersonationTree: useImpersonationTree,
|
|
11414
|
+
fetchOptions: {
|
|
11415
|
+
method: exports.EMethods.get,
|
|
11416
|
+
},
|
|
11417
|
+
});
|
|
11418
|
+
}
|
|
11419
|
+
function getEventFunnel(_a) {
|
|
11420
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11421
|
+
return callApi({
|
|
11422
|
+
url: eventsBaseUrl + "/funnel",
|
|
11423
|
+
useImpersonationTree: useImpersonationTree,
|
|
11424
|
+
fetchOptions: {
|
|
11425
|
+
method: exports.EMethods.post,
|
|
11426
|
+
body: buildEventBody(options),
|
|
11427
|
+
},
|
|
11428
|
+
});
|
|
11429
|
+
}
|
|
11430
|
+
|
|
11309
11431
|
function createForm(_a) {
|
|
11310
11432
|
var form = _a.form, type = _a.type;
|
|
11311
11433
|
return callApi({
|
|
@@ -12440,6 +12562,65 @@ var Email = /** @class */ (function () {
|
|
|
12440
12562
|
return Email;
|
|
12441
12563
|
}());
|
|
12442
12564
|
|
|
12565
|
+
exports.ETrackedEventType = void 0;
|
|
12566
|
+
(function (ETrackedEventType) {
|
|
12567
|
+
ETrackedEventType["pageView"] = "page_view";
|
|
12568
|
+
ETrackedEventType["scrollDepth"] = "scroll_depth";
|
|
12569
|
+
ETrackedEventType["pageConversion"] = "page_conversion";
|
|
12570
|
+
ETrackedEventType["pageExit"] = "page_exit";
|
|
12571
|
+
ETrackedEventType["popupView"] = "popup_view";
|
|
12572
|
+
ETrackedEventType["popupDismiss"] = "popup_dismiss";
|
|
12573
|
+
ETrackedEventType["popupConversion"] = "popup_conversion";
|
|
12574
|
+
ETrackedEventType["click"] = "click";
|
|
12575
|
+
ETrackedEventType["formSubmit"] = "form_submit";
|
|
12576
|
+
})(exports.ETrackedEventType || (exports.ETrackedEventType = {}));
|
|
12577
|
+
exports.ETrackedEntityType = void 0;
|
|
12578
|
+
(function (ETrackedEntityType) {
|
|
12579
|
+
ETrackedEntityType["page"] = "page";
|
|
12580
|
+
ETrackedEntityType["popup"] = "popup";
|
|
12581
|
+
})(exports.ETrackedEntityType || (exports.ETrackedEntityType = {}));
|
|
12582
|
+
exports.ETrackedDeviceType = void 0;
|
|
12583
|
+
(function (ETrackedDeviceType) {
|
|
12584
|
+
ETrackedDeviceType["mobile"] = "mobile";
|
|
12585
|
+
ETrackedDeviceType["desktop"] = "desktop";
|
|
12586
|
+
ETrackedDeviceType["tablet"] = "tablet";
|
|
12587
|
+
})(exports.ETrackedDeviceType || (exports.ETrackedDeviceType = {}));
|
|
12588
|
+
|
|
12589
|
+
var EventModel = /** @class */ (function () {
|
|
12590
|
+
function EventModel(params) {
|
|
12591
|
+
var _a;
|
|
12592
|
+
this.eventId = params.eventId;
|
|
12593
|
+
this.eventType = params.eventType;
|
|
12594
|
+
this.entityType = params.entityType;
|
|
12595
|
+
this.entityId = params.entityId;
|
|
12596
|
+
this.sessionId = params.sessionId;
|
|
12597
|
+
this.visitorId = params.visitorId;
|
|
12598
|
+
this.occurredAt = params.occurredAt;
|
|
12599
|
+
this.deviceType = params.deviceType;
|
|
12600
|
+
this.browser = params.browser;
|
|
12601
|
+
this.os = params.os;
|
|
12602
|
+
this.source = params.source;
|
|
12603
|
+
this.utmSource = params.utmSource;
|
|
12604
|
+
this.utmMedium = params.utmMedium;
|
|
12605
|
+
this.utmCampaign = params.utmCampaign;
|
|
12606
|
+
this.referrer = params.referrer;
|
|
12607
|
+
this.properties = (_a = params.properties) !== null && _a !== void 0 ? _a : {};
|
|
12608
|
+
this.scrollDepth = params.scrollDepth;
|
|
12609
|
+
this.elementId = params.elementId;
|
|
12610
|
+
this.popupTrigger = params.popupTrigger;
|
|
12611
|
+
this.pageUrl = params.pageUrl;
|
|
12612
|
+
this.email = params.email;
|
|
12613
|
+
this.listId = params.listId;
|
|
12614
|
+
this.contactId = params.contactId;
|
|
12615
|
+
this.formId = params.formId;
|
|
12616
|
+
this.ip = params.ip;
|
|
12617
|
+
}
|
|
12618
|
+
EventModel.prototype.toJson = function () {
|
|
12619
|
+
return modelToJson(this);
|
|
12620
|
+
};
|
|
12621
|
+
return EventModel;
|
|
12622
|
+
}());
|
|
12623
|
+
|
|
12443
12624
|
var CommonFormModel = /** @class */ (function () {
|
|
12444
12625
|
function CommonFormModel(_a) {
|
|
12445
12626
|
var id = _a.id, name = _a.name, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
@@ -19981,6 +20162,90 @@ var EmailAPIFactory = /** @class */ (function () {
|
|
|
19981
20162
|
return EmailAPIFactory;
|
|
19982
20163
|
}());
|
|
19983
20164
|
|
|
20165
|
+
function mapEventRow(row) {
|
|
20166
|
+
var _a;
|
|
20167
|
+
return new EventModel({
|
|
20168
|
+
eventId: row.event_id,
|
|
20169
|
+
eventType: row.event_type,
|
|
20170
|
+
entityType: row.entity_type,
|
|
20171
|
+
entityId: row.entity_id,
|
|
20172
|
+
sessionId: row.session_id,
|
|
20173
|
+
visitorId: row.visitor_id,
|
|
20174
|
+
occurredAt: row.occurred_at,
|
|
20175
|
+
deviceType: row.device_type,
|
|
20176
|
+
browser: row.browser,
|
|
20177
|
+
os: row.os,
|
|
20178
|
+
source: row.source,
|
|
20179
|
+
utmSource: row.utm_source,
|
|
20180
|
+
utmMedium: row.utm_medium,
|
|
20181
|
+
utmCampaign: row.utm_campaign,
|
|
20182
|
+
referrer: row.referrer,
|
|
20183
|
+
properties: (_a = row.properties) !== null && _a !== void 0 ? _a : {},
|
|
20184
|
+
scrollDepth: row.scroll_depth,
|
|
20185
|
+
elementId: row.element_id,
|
|
20186
|
+
popupTrigger: row.popup_trigger,
|
|
20187
|
+
pageUrl: row.page_url,
|
|
20188
|
+
email: row.email,
|
|
20189
|
+
listId: row.list_id,
|
|
20190
|
+
contactId: row.contact_id,
|
|
20191
|
+
formId: row.form_id,
|
|
20192
|
+
ip: row.ip,
|
|
20193
|
+
});
|
|
20194
|
+
}
|
|
20195
|
+
var EventTrackingFactory = /** @class */ (function () {
|
|
20196
|
+
function EventTrackingFactory() {
|
|
20197
|
+
}
|
|
20198
|
+
EventTrackingFactory.list = function (_a) {
|
|
20199
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20200
|
+
var options = __rest(_a, []);
|
|
20201
|
+
return __generator(this, function (_b) {
|
|
20202
|
+
return [2 /*return*/, listEvents(options).then(function (response) { return (__assign(__assign({}, response), { items: response.items.map(mapEventRow) })); })];
|
|
20203
|
+
});
|
|
20204
|
+
});
|
|
20205
|
+
};
|
|
20206
|
+
EventTrackingFactory.getSummary = function (_a) {
|
|
20207
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20208
|
+
var options = __rest(_a, []);
|
|
20209
|
+
return __generator(this, function (_b) {
|
|
20210
|
+
return [2 /*return*/, getEventSummary(options)];
|
|
20211
|
+
});
|
|
20212
|
+
});
|
|
20213
|
+
};
|
|
20214
|
+
EventTrackingFactory.getTimeseries = function (_a) {
|
|
20215
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20216
|
+
var options = __rest(_a, []);
|
|
20217
|
+
return __generator(this, function (_b) {
|
|
20218
|
+
return [2 /*return*/, getEventTimeseries(options)];
|
|
20219
|
+
});
|
|
20220
|
+
});
|
|
20221
|
+
};
|
|
20222
|
+
EventTrackingFactory.getBreakdown = function (_a) {
|
|
20223
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20224
|
+
var options = __rest(_a, []);
|
|
20225
|
+
return __generator(this, function (_b) {
|
|
20226
|
+
return [2 /*return*/, getEventBreakdown(options)];
|
|
20227
|
+
});
|
|
20228
|
+
});
|
|
20229
|
+
};
|
|
20230
|
+
EventTrackingFactory.getPropertyKeys = function (_a) {
|
|
20231
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20232
|
+
var options = __rest(_a, []);
|
|
20233
|
+
return __generator(this, function (_b) {
|
|
20234
|
+
return [2 /*return*/, getEventPropertyKeys(options)];
|
|
20235
|
+
});
|
|
20236
|
+
});
|
|
20237
|
+
};
|
|
20238
|
+
EventTrackingFactory.getFunnel = function (_a) {
|
|
20239
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20240
|
+
var options = __rest(_a, []);
|
|
20241
|
+
return __generator(this, function (_b) {
|
|
20242
|
+
return [2 /*return*/, getEventFunnel(options)];
|
|
20243
|
+
});
|
|
20244
|
+
});
|
|
20245
|
+
};
|
|
20246
|
+
return EventTrackingFactory;
|
|
20247
|
+
}());
|
|
20248
|
+
|
|
19984
20249
|
var FormsFactory = /** @class */ (function () {
|
|
19985
20250
|
function FormsFactory() {
|
|
19986
20251
|
}
|
|
@@ -20657,6 +20922,8 @@ exports.Email = Email;
|
|
|
20657
20922
|
exports.EmailAPIFactory = EmailAPIFactory;
|
|
20658
20923
|
exports.EmptyContent = EmptyContent;
|
|
20659
20924
|
exports.EnhancedFormModel = EnhancedFormModel;
|
|
20925
|
+
exports.EventModel = EventModel;
|
|
20926
|
+
exports.EventTrackingFactory = EventTrackingFactory;
|
|
20660
20927
|
exports.FileUpload = FileUpload;
|
|
20661
20928
|
exports.FilterBar = FilterBar;
|
|
20662
20929
|
exports.FormModel = FormModel;
|
|
@@ -20835,6 +21102,11 @@ exports.getEmail = getEmail;
|
|
|
20835
21102
|
exports.getEmailActivitySummary = getEmailActivitySummary;
|
|
20836
21103
|
exports.getEmailReport = getEmailReport;
|
|
20837
21104
|
exports.getEndOfDate = getEndOfDate;
|
|
21105
|
+
exports.getEventBreakdown = getEventBreakdown;
|
|
21106
|
+
exports.getEventFunnel = getEventFunnel;
|
|
21107
|
+
exports.getEventPropertyKeys = getEventPropertyKeys;
|
|
21108
|
+
exports.getEventSummary = getEventSummary;
|
|
21109
|
+
exports.getEventTimeseries = getEventTimeseries;
|
|
20838
21110
|
exports.getForm = getForm;
|
|
20839
21111
|
exports.getHashQueryWithoutHistory = getHashQueryWithoutHistory;
|
|
20840
21112
|
exports.getIconSize = getIconSize;
|
|
@@ -20878,6 +21150,7 @@ exports.listContacts = listContacts;
|
|
|
20878
21150
|
exports.listCustomDomains = listCustomDomains;
|
|
20879
21151
|
exports.listDkimService = listDkimService;
|
|
20880
21152
|
exports.listEmailLogs = listEmailLogs;
|
|
21153
|
+
exports.listEvents = listEvents;
|
|
20881
21154
|
exports.listForms = listForms;
|
|
20882
21155
|
exports.listList = listList;
|
|
20883
21156
|
exports.listListAttributes = listListAttributes;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TEventModel } from "./types";
|
|
2
|
+
export declare class EventModel {
|
|
3
|
+
readonly eventId: string;
|
|
4
|
+
readonly eventType: TEventModel["eventType"];
|
|
5
|
+
readonly entityType: TEventModel["entityType"];
|
|
6
|
+
readonly entityId: string;
|
|
7
|
+
readonly sessionId?: string | null;
|
|
8
|
+
readonly visitorId?: string | null;
|
|
9
|
+
readonly occurredAt: string;
|
|
10
|
+
readonly deviceType?: TEventModel["deviceType"];
|
|
11
|
+
readonly browser?: string | null;
|
|
12
|
+
readonly os?: string | null;
|
|
13
|
+
readonly source?: string | null;
|
|
14
|
+
readonly utmSource?: string | null;
|
|
15
|
+
readonly utmMedium?: string | null;
|
|
16
|
+
readonly utmCampaign?: string | null;
|
|
17
|
+
readonly referrer?: string | null;
|
|
18
|
+
readonly properties: Record<string, unknown>;
|
|
19
|
+
readonly scrollDepth?: number | null;
|
|
20
|
+
readonly elementId?: string | null;
|
|
21
|
+
readonly popupTrigger?: string | null;
|
|
22
|
+
readonly pageUrl?: string | null;
|
|
23
|
+
readonly email?: string | null;
|
|
24
|
+
readonly listId?: string | null;
|
|
25
|
+
readonly contactId?: string | null;
|
|
26
|
+
readonly formId?: string | null;
|
|
27
|
+
readonly ip?: string | null;
|
|
28
|
+
constructor(params: TEventModel);
|
|
29
|
+
toJson(): any;
|
|
30
|
+
}
|
|
31
|
+
export * from "./types";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum ETrackedEventType {
|
|
2
|
+
pageView = "page_view",
|
|
3
|
+
scrollDepth = "scroll_depth",
|
|
4
|
+
pageConversion = "page_conversion",
|
|
5
|
+
pageExit = "page_exit",
|
|
6
|
+
popupView = "popup_view",
|
|
7
|
+
popupDismiss = "popup_dismiss",
|
|
8
|
+
popupConversion = "popup_conversion",
|
|
9
|
+
click = "click",
|
|
10
|
+
formSubmit = "form_submit"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ETrackedEntityType {
|
|
13
|
+
page = "page",
|
|
14
|
+
popup = "popup"
|
|
15
|
+
}
|
|
16
|
+
export declare enum ETrackedDeviceType {
|
|
17
|
+
mobile = "mobile",
|
|
18
|
+
desktop = "desktop",
|
|
19
|
+
tablet = "tablet"
|
|
20
|
+
}
|
|
21
|
+
export type TEventModel = {
|
|
22
|
+
eventId: string;
|
|
23
|
+
eventType: ETrackedEventType | string;
|
|
24
|
+
entityType: ETrackedEntityType | string;
|
|
25
|
+
entityId: string;
|
|
26
|
+
sessionId?: string | null;
|
|
27
|
+
visitorId?: string | null;
|
|
28
|
+
occurredAt: string;
|
|
29
|
+
deviceType?: ETrackedDeviceType | string | null;
|
|
30
|
+
browser?: string | null;
|
|
31
|
+
os?: string | null;
|
|
32
|
+
source?: string | null;
|
|
33
|
+
utmSource?: string | null;
|
|
34
|
+
utmMedium?: string | null;
|
|
35
|
+
utmCampaign?: string | null;
|
|
36
|
+
referrer?: string | null;
|
|
37
|
+
properties: Record<string, unknown>;
|
|
38
|
+
scrollDepth?: number | null;
|
|
39
|
+
elementId?: string | null;
|
|
40
|
+
popupTrigger?: string | null;
|
|
41
|
+
pageUrl?: string | null;
|
|
42
|
+
email?: string | null;
|
|
43
|
+
listId?: string | null;
|
|
44
|
+
contactId?: string | null;
|
|
45
|
+
formId?: string | null;
|
|
46
|
+
ip?: string | null;
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TGetEventBreakdown, TGetEventFunnel, TGetEventPropertyKeys, TGetEventSummary, TGetEventTimeseries, TListEvents } from "./types";
|
|
2
|
+
export declare function listEvents({ useImpersonationTree, ...options }: TListEvents): Promise<any>;
|
|
3
|
+
export declare function getEventSummary({ useImpersonationTree, ...options }: TGetEventSummary): Promise<any>;
|
|
4
|
+
export declare function getEventTimeseries({ useImpersonationTree, ...options }: TGetEventTimeseries): Promise<any>;
|
|
5
|
+
export declare function getEventBreakdown({ useImpersonationTree, ...options }: TGetEventBreakdown): Promise<any>;
|
|
6
|
+
export declare function getEventPropertyKeys({ useImpersonationTree, ...options }: TGetEventPropertyKeys): Promise<any>;
|
|
7
|
+
export declare function getEventFunnel({ useImpersonationTree, ...options }: TGetEventFunnel): Promise<any>;
|
|
8
|
+
export * from "./types";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ETrackedEntityType, ETrackedEventType } from "../../models/eventTracking/types";
|
|
2
|
+
export declare enum EEventBreakdownDimension {
|
|
3
|
+
deviceType = "device_type",
|
|
4
|
+
browser = "browser",
|
|
5
|
+
os = "os",
|
|
6
|
+
source = "source",
|
|
7
|
+
utmSource = "utm_source",
|
|
8
|
+
utmMedium = "utm_medium",
|
|
9
|
+
utmCampaign = "utm_campaign",
|
|
10
|
+
entityType = "entity_type",
|
|
11
|
+
elementId = "element_id",
|
|
12
|
+
popupTrigger = "popup_trigger",
|
|
13
|
+
pageUrl = "page_url",
|
|
14
|
+
listId = "list_id",
|
|
15
|
+
contactId = "contact_id",
|
|
16
|
+
formId = "form_id"
|
|
17
|
+
}
|
|
18
|
+
export declare enum EEventTimeseriesGranularity {
|
|
19
|
+
hour = "hour",
|
|
20
|
+
day = "day",
|
|
21
|
+
week = "week",
|
|
22
|
+
month = "month"
|
|
23
|
+
}
|
|
24
|
+
export declare enum EEventSortField {
|
|
25
|
+
occurredAt = "occurred_at",
|
|
26
|
+
eventType = "event_type",
|
|
27
|
+
entityId = "entity_id",
|
|
28
|
+
deviceType = "device_type",
|
|
29
|
+
source = "source"
|
|
30
|
+
}
|
|
31
|
+
export type TEventDateRangeParams = {
|
|
32
|
+
fromDate?: string;
|
|
33
|
+
toDate?: string;
|
|
34
|
+
};
|
|
35
|
+
export type TEventEntityFilterParams = {
|
|
36
|
+
entityId?: string;
|
|
37
|
+
entityType?: ETrackedEntityType | string;
|
|
38
|
+
};
|
|
39
|
+
export type TEventAttributionFilterParams = {
|
|
40
|
+
email?: string;
|
|
41
|
+
listId?: string;
|
|
42
|
+
contactId?: string;
|
|
43
|
+
formId?: string;
|
|
44
|
+
elementId?: string;
|
|
45
|
+
popupTrigger?: string;
|
|
46
|
+
pageUrl?: string;
|
|
47
|
+
};
|
|
48
|
+
export type TEventLineageParams = {
|
|
49
|
+
subLineage?: string;
|
|
50
|
+
includeSubAccounts?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export type TEventCommonFilterParams = TEventDateRangeParams & TEventEntityFilterParams & TEventAttributionFilterParams & TEventLineageParams;
|
|
53
|
+
export type TListEvents = TEventCommonFilterParams & {
|
|
54
|
+
eventType?: ETrackedEventType | string | Array<ETrackedEventType | string>;
|
|
55
|
+
sortBy?: EEventSortField | string;
|
|
56
|
+
sortOrder?: "asc" | "desc";
|
|
57
|
+
properties?: string | Record<string, unknown>;
|
|
58
|
+
scrollDepthGte?: number;
|
|
59
|
+
scrollDepthLte?: number;
|
|
60
|
+
limit?: number;
|
|
61
|
+
offset?: number;
|
|
62
|
+
useImpersonationTree?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export type TGetEventSummary = TEventCommonFilterParams & {
|
|
65
|
+
useImpersonationTree?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type TGetEventTimeseries = TEventCommonFilterParams & {
|
|
68
|
+
eventType?: ETrackedEventType | string;
|
|
69
|
+
granularity?: EEventTimeseriesGranularity | string;
|
|
70
|
+
breakdown?: EEventBreakdownDimension | string;
|
|
71
|
+
useImpersonationTree?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export type TGetEventBreakdown = TEventCommonFilterParams & {
|
|
74
|
+
dimension: EEventBreakdownDimension | string;
|
|
75
|
+
eventType?: ETrackedEventType | string;
|
|
76
|
+
useImpersonationTree?: boolean;
|
|
77
|
+
};
|
|
78
|
+
export type TGetEventPropertyKeys = TEventDateRangeParams & TEventEntityFilterParams & TEventLineageParams & {
|
|
79
|
+
eventType?: ETrackedEventType | string;
|
|
80
|
+
search?: string;
|
|
81
|
+
email?: string;
|
|
82
|
+
useImpersonationTree?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type TEventFunnelStep = {
|
|
85
|
+
eventType: ETrackedEventType | string;
|
|
86
|
+
properties?: Record<string, unknown>;
|
|
87
|
+
};
|
|
88
|
+
export type TGetEventFunnel = TEventCommonFilterParams & {
|
|
89
|
+
steps: TEventFunnelStep[];
|
|
90
|
+
windowHours?: number;
|
|
91
|
+
useImpersonationTree?: boolean;
|
|
92
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventModel } from "../../models/eventTracking";
|
|
2
|
+
import { TGetEventBreakdown, TGetEventFunnel, TGetEventPropertyKeys, TGetEventSummary, TGetEventTimeseries, TListEvents } from "../../services/eventTracking";
|
|
3
|
+
import { TEventBreakdown, TEventFunnel, TEventListResponse, TEventPropertyKeys, TEventSummary, TEventTimeseries } from "./types";
|
|
4
|
+
export declare class EventTrackingFactory {
|
|
5
|
+
static list({ ...options }: TListEvents): Promise<Omit<TEventListResponse, "items"> & {
|
|
6
|
+
items: EventModel[];
|
|
7
|
+
}>;
|
|
8
|
+
static getSummary({ ...options }: TGetEventSummary): Promise<TEventSummary>;
|
|
9
|
+
static getTimeseries({ ...options }: TGetEventTimeseries): Promise<TEventTimeseries>;
|
|
10
|
+
static getBreakdown({ ...options }: TGetEventBreakdown): Promise<TEventBreakdown>;
|
|
11
|
+
static getPropertyKeys({ ...options }: TGetEventPropertyKeys): Promise<TEventPropertyKeys>;
|
|
12
|
+
static getFunnel({ ...options }: TGetEventFunnel): Promise<TEventFunnel>;
|
|
13
|
+
}
|
|
14
|
+
export * from "./types";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ETrackedEntityType, ETrackedEventType } from "../../models/eventTracking/types";
|
|
2
|
+
export type TEventRow = {
|
|
3
|
+
event_id: string;
|
|
4
|
+
event_type: ETrackedEventType | string;
|
|
5
|
+
entity_type: ETrackedEntityType | string;
|
|
6
|
+
entity_id: string;
|
|
7
|
+
session_id?: string | null;
|
|
8
|
+
visitor_id?: string | null;
|
|
9
|
+
occurred_at: string;
|
|
10
|
+
device_type?: string | null;
|
|
11
|
+
browser?: string | null;
|
|
12
|
+
os?: string | null;
|
|
13
|
+
source?: string | null;
|
|
14
|
+
utm_source?: string | null;
|
|
15
|
+
utm_medium?: string | null;
|
|
16
|
+
utm_campaign?: string | null;
|
|
17
|
+
referrer?: string | null;
|
|
18
|
+
properties: Record<string, unknown>;
|
|
19
|
+
scroll_depth?: number | null;
|
|
20
|
+
element_id?: string | null;
|
|
21
|
+
popup_trigger?: string | null;
|
|
22
|
+
page_url?: string | null;
|
|
23
|
+
email?: string | null;
|
|
24
|
+
list_id?: string | null;
|
|
25
|
+
contact_id?: string | null;
|
|
26
|
+
form_id?: string | null;
|
|
27
|
+
ip?: string | null;
|
|
28
|
+
};
|
|
29
|
+
export type TEventListResponse = {
|
|
30
|
+
total: number;
|
|
31
|
+
limit: number;
|
|
32
|
+
offset: number;
|
|
33
|
+
items: TEventRow[];
|
|
34
|
+
};
|
|
35
|
+
export type TSummaryByEventType = {
|
|
36
|
+
event_type: string;
|
|
37
|
+
count: number;
|
|
38
|
+
};
|
|
39
|
+
export type TEventSummary = {
|
|
40
|
+
total: number;
|
|
41
|
+
by_event_type: TSummaryByEventType[];
|
|
42
|
+
new_visitors: number;
|
|
43
|
+
returning_visitors: number;
|
|
44
|
+
};
|
|
45
|
+
export type TTimeseriesPoint = {
|
|
46
|
+
timestamp: string;
|
|
47
|
+
count: number;
|
|
48
|
+
};
|
|
49
|
+
export type TTimeseriesPointBreakdown = {
|
|
50
|
+
timestamp: string;
|
|
51
|
+
values: Array<{
|
|
52
|
+
dimension_value?: string | null;
|
|
53
|
+
count: number;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
export type TEventTimeseries = {
|
|
57
|
+
granularity: string;
|
|
58
|
+
event_type?: string | null;
|
|
59
|
+
breakdown?: string | null;
|
|
60
|
+
series: Array<TTimeseriesPoint | TTimeseriesPointBreakdown>;
|
|
61
|
+
};
|
|
62
|
+
export type TBreakdownItem = {
|
|
63
|
+
value?: string | null;
|
|
64
|
+
count: number;
|
|
65
|
+
percentage: number;
|
|
66
|
+
};
|
|
67
|
+
export type TEventBreakdown = {
|
|
68
|
+
dimension: string;
|
|
69
|
+
total: number;
|
|
70
|
+
items: TBreakdownItem[];
|
|
71
|
+
};
|
|
72
|
+
export type TPropertyKey = {
|
|
73
|
+
key: string;
|
|
74
|
+
count: number;
|
|
75
|
+
};
|
|
76
|
+
export type TEventPropertyKeys = {
|
|
77
|
+
keys: TPropertyKey[];
|
|
78
|
+
};
|
|
79
|
+
export type TFunnelStep = {
|
|
80
|
+
event_type: string;
|
|
81
|
+
count: number;
|
|
82
|
+
step_conversion_rate: number;
|
|
83
|
+
overall_conversion_rate: number;
|
|
84
|
+
};
|
|
85
|
+
export type TEventFunnel = {
|
|
86
|
+
window_hours: number;
|
|
87
|
+
steps: TFunnelStep[];
|
|
88
|
+
total_entered: number;
|
|
89
|
+
total_completed: number;
|
|
90
|
+
overall_conversion_rate: number;
|
|
91
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -11286,6 +11286,128 @@ function renderEmail(_a) {
|
|
|
11286
11286
|
});
|
|
11287
11287
|
}
|
|
11288
11288
|
|
|
11289
|
+
var EEventBreakdownDimension;
|
|
11290
|
+
(function (EEventBreakdownDimension) {
|
|
11291
|
+
EEventBreakdownDimension["deviceType"] = "device_type";
|
|
11292
|
+
EEventBreakdownDimension["browser"] = "browser";
|
|
11293
|
+
EEventBreakdownDimension["os"] = "os";
|
|
11294
|
+
EEventBreakdownDimension["source"] = "source";
|
|
11295
|
+
EEventBreakdownDimension["utmSource"] = "utm_source";
|
|
11296
|
+
EEventBreakdownDimension["utmMedium"] = "utm_medium";
|
|
11297
|
+
EEventBreakdownDimension["utmCampaign"] = "utm_campaign";
|
|
11298
|
+
EEventBreakdownDimension["entityType"] = "entity_type";
|
|
11299
|
+
EEventBreakdownDimension["elementId"] = "element_id";
|
|
11300
|
+
EEventBreakdownDimension["popupTrigger"] = "popup_trigger";
|
|
11301
|
+
EEventBreakdownDimension["pageUrl"] = "page_url";
|
|
11302
|
+
EEventBreakdownDimension["listId"] = "list_id";
|
|
11303
|
+
EEventBreakdownDimension["contactId"] = "contact_id";
|
|
11304
|
+
EEventBreakdownDimension["formId"] = "form_id";
|
|
11305
|
+
})(EEventBreakdownDimension || (EEventBreakdownDimension = {}));
|
|
11306
|
+
var EEventTimeseriesGranularity;
|
|
11307
|
+
(function (EEventTimeseriesGranularity) {
|
|
11308
|
+
EEventTimeseriesGranularity["hour"] = "hour";
|
|
11309
|
+
EEventTimeseriesGranularity["day"] = "day";
|
|
11310
|
+
EEventTimeseriesGranularity["week"] = "week";
|
|
11311
|
+
EEventTimeseriesGranularity["month"] = "month";
|
|
11312
|
+
})(EEventTimeseriesGranularity || (EEventTimeseriesGranularity = {}));
|
|
11313
|
+
var EEventSortField;
|
|
11314
|
+
(function (EEventSortField) {
|
|
11315
|
+
EEventSortField["occurredAt"] = "occurred_at";
|
|
11316
|
+
EEventSortField["eventType"] = "event_type";
|
|
11317
|
+
EEventSortField["entityId"] = "entity_id";
|
|
11318
|
+
EEventSortField["deviceType"] = "device_type";
|
|
11319
|
+
EEventSortField["source"] = "source";
|
|
11320
|
+
})(EEventSortField || (EEventSortField = {}));
|
|
11321
|
+
|
|
11322
|
+
var eventsBaseUrl = uiKitConfig.GATEWAY_PROXY + "/events";
|
|
11323
|
+
function buildEventQuery(options) {
|
|
11324
|
+
if (options === void 0) { options = {}; }
|
|
11325
|
+
var query = __assign({}, options);
|
|
11326
|
+
if (Array.isArray(query.eventType)) {
|
|
11327
|
+
query.eventType = query.eventType.join(",");
|
|
11328
|
+
}
|
|
11329
|
+
if (query.properties && typeof query.properties === "object") {
|
|
11330
|
+
query.properties = JSON.stringify(query.properties);
|
|
11331
|
+
}
|
|
11332
|
+
return camelCase(query);
|
|
11333
|
+
}
|
|
11334
|
+
function buildEventBody(body) {
|
|
11335
|
+
var payload = __assign({}, body);
|
|
11336
|
+
if (Array.isArray(payload.steps)) {
|
|
11337
|
+
payload.steps = payload.steps.map(function (step) {
|
|
11338
|
+
var funnelStep = step;
|
|
11339
|
+
return camelCase(funnelStep);
|
|
11340
|
+
});
|
|
11341
|
+
}
|
|
11342
|
+
return camelCase(payload);
|
|
11343
|
+
}
|
|
11344
|
+
function listEvents(_a) {
|
|
11345
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11346
|
+
return callApi({
|
|
11347
|
+
url: eventsBaseUrl,
|
|
11348
|
+
query: buildEventQuery(options),
|
|
11349
|
+
useImpersonationTree: useImpersonationTree,
|
|
11350
|
+
fetchOptions: {
|
|
11351
|
+
method: EMethods.get,
|
|
11352
|
+
},
|
|
11353
|
+
});
|
|
11354
|
+
}
|
|
11355
|
+
function getEventSummary(_a) {
|
|
11356
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11357
|
+
return callApi({
|
|
11358
|
+
url: eventsBaseUrl + "/summary",
|
|
11359
|
+
query: buildEventQuery(options),
|
|
11360
|
+
useImpersonationTree: useImpersonationTree,
|
|
11361
|
+
fetchOptions: {
|
|
11362
|
+
method: EMethods.get,
|
|
11363
|
+
},
|
|
11364
|
+
});
|
|
11365
|
+
}
|
|
11366
|
+
function getEventTimeseries(_a) {
|
|
11367
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11368
|
+
return callApi({
|
|
11369
|
+
url: eventsBaseUrl + "/timeseries",
|
|
11370
|
+
query: buildEventQuery(options),
|
|
11371
|
+
useImpersonationTree: useImpersonationTree,
|
|
11372
|
+
fetchOptions: {
|
|
11373
|
+
method: EMethods.get,
|
|
11374
|
+
},
|
|
11375
|
+
});
|
|
11376
|
+
}
|
|
11377
|
+
function getEventBreakdown(_a) {
|
|
11378
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11379
|
+
return callApi({
|
|
11380
|
+
url: eventsBaseUrl + "/breakdown",
|
|
11381
|
+
query: buildEventQuery(options),
|
|
11382
|
+
useImpersonationTree: useImpersonationTree,
|
|
11383
|
+
fetchOptions: {
|
|
11384
|
+
method: EMethods.get,
|
|
11385
|
+
},
|
|
11386
|
+
});
|
|
11387
|
+
}
|
|
11388
|
+
function getEventPropertyKeys(_a) {
|
|
11389
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11390
|
+
return callApi({
|
|
11391
|
+
url: eventsBaseUrl + "/properties",
|
|
11392
|
+
query: buildEventQuery(options),
|
|
11393
|
+
useImpersonationTree: useImpersonationTree,
|
|
11394
|
+
fetchOptions: {
|
|
11395
|
+
method: EMethods.get,
|
|
11396
|
+
},
|
|
11397
|
+
});
|
|
11398
|
+
}
|
|
11399
|
+
function getEventFunnel(_a) {
|
|
11400
|
+
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
11401
|
+
return callApi({
|
|
11402
|
+
url: eventsBaseUrl + "/funnel",
|
|
11403
|
+
useImpersonationTree: useImpersonationTree,
|
|
11404
|
+
fetchOptions: {
|
|
11405
|
+
method: EMethods.post,
|
|
11406
|
+
body: buildEventBody(options),
|
|
11407
|
+
},
|
|
11408
|
+
});
|
|
11409
|
+
}
|
|
11410
|
+
|
|
11289
11411
|
function createForm(_a) {
|
|
11290
11412
|
var form = _a.form, type = _a.type;
|
|
11291
11413
|
return callApi({
|
|
@@ -12420,6 +12542,65 @@ var Email = /** @class */ (function () {
|
|
|
12420
12542
|
return Email;
|
|
12421
12543
|
}());
|
|
12422
12544
|
|
|
12545
|
+
var ETrackedEventType;
|
|
12546
|
+
(function (ETrackedEventType) {
|
|
12547
|
+
ETrackedEventType["pageView"] = "page_view";
|
|
12548
|
+
ETrackedEventType["scrollDepth"] = "scroll_depth";
|
|
12549
|
+
ETrackedEventType["pageConversion"] = "page_conversion";
|
|
12550
|
+
ETrackedEventType["pageExit"] = "page_exit";
|
|
12551
|
+
ETrackedEventType["popupView"] = "popup_view";
|
|
12552
|
+
ETrackedEventType["popupDismiss"] = "popup_dismiss";
|
|
12553
|
+
ETrackedEventType["popupConversion"] = "popup_conversion";
|
|
12554
|
+
ETrackedEventType["click"] = "click";
|
|
12555
|
+
ETrackedEventType["formSubmit"] = "form_submit";
|
|
12556
|
+
})(ETrackedEventType || (ETrackedEventType = {}));
|
|
12557
|
+
var ETrackedEntityType;
|
|
12558
|
+
(function (ETrackedEntityType) {
|
|
12559
|
+
ETrackedEntityType["page"] = "page";
|
|
12560
|
+
ETrackedEntityType["popup"] = "popup";
|
|
12561
|
+
})(ETrackedEntityType || (ETrackedEntityType = {}));
|
|
12562
|
+
var ETrackedDeviceType;
|
|
12563
|
+
(function (ETrackedDeviceType) {
|
|
12564
|
+
ETrackedDeviceType["mobile"] = "mobile";
|
|
12565
|
+
ETrackedDeviceType["desktop"] = "desktop";
|
|
12566
|
+
ETrackedDeviceType["tablet"] = "tablet";
|
|
12567
|
+
})(ETrackedDeviceType || (ETrackedDeviceType = {}));
|
|
12568
|
+
|
|
12569
|
+
var EventModel = /** @class */ (function () {
|
|
12570
|
+
function EventModel(params) {
|
|
12571
|
+
var _a;
|
|
12572
|
+
this.eventId = params.eventId;
|
|
12573
|
+
this.eventType = params.eventType;
|
|
12574
|
+
this.entityType = params.entityType;
|
|
12575
|
+
this.entityId = params.entityId;
|
|
12576
|
+
this.sessionId = params.sessionId;
|
|
12577
|
+
this.visitorId = params.visitorId;
|
|
12578
|
+
this.occurredAt = params.occurredAt;
|
|
12579
|
+
this.deviceType = params.deviceType;
|
|
12580
|
+
this.browser = params.browser;
|
|
12581
|
+
this.os = params.os;
|
|
12582
|
+
this.source = params.source;
|
|
12583
|
+
this.utmSource = params.utmSource;
|
|
12584
|
+
this.utmMedium = params.utmMedium;
|
|
12585
|
+
this.utmCampaign = params.utmCampaign;
|
|
12586
|
+
this.referrer = params.referrer;
|
|
12587
|
+
this.properties = (_a = params.properties) !== null && _a !== void 0 ? _a : {};
|
|
12588
|
+
this.scrollDepth = params.scrollDepth;
|
|
12589
|
+
this.elementId = params.elementId;
|
|
12590
|
+
this.popupTrigger = params.popupTrigger;
|
|
12591
|
+
this.pageUrl = params.pageUrl;
|
|
12592
|
+
this.email = params.email;
|
|
12593
|
+
this.listId = params.listId;
|
|
12594
|
+
this.contactId = params.contactId;
|
|
12595
|
+
this.formId = params.formId;
|
|
12596
|
+
this.ip = params.ip;
|
|
12597
|
+
}
|
|
12598
|
+
EventModel.prototype.toJson = function () {
|
|
12599
|
+
return modelToJson(this);
|
|
12600
|
+
};
|
|
12601
|
+
return EventModel;
|
|
12602
|
+
}());
|
|
12603
|
+
|
|
12423
12604
|
var CommonFormModel = /** @class */ (function () {
|
|
12424
12605
|
function CommonFormModel(_a) {
|
|
12425
12606
|
var id = _a.id, name = _a.name, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
@@ -19961,6 +20142,90 @@ var EmailAPIFactory = /** @class */ (function () {
|
|
|
19961
20142
|
return EmailAPIFactory;
|
|
19962
20143
|
}());
|
|
19963
20144
|
|
|
20145
|
+
function mapEventRow(row) {
|
|
20146
|
+
var _a;
|
|
20147
|
+
return new EventModel({
|
|
20148
|
+
eventId: row.event_id,
|
|
20149
|
+
eventType: row.event_type,
|
|
20150
|
+
entityType: row.entity_type,
|
|
20151
|
+
entityId: row.entity_id,
|
|
20152
|
+
sessionId: row.session_id,
|
|
20153
|
+
visitorId: row.visitor_id,
|
|
20154
|
+
occurredAt: row.occurred_at,
|
|
20155
|
+
deviceType: row.device_type,
|
|
20156
|
+
browser: row.browser,
|
|
20157
|
+
os: row.os,
|
|
20158
|
+
source: row.source,
|
|
20159
|
+
utmSource: row.utm_source,
|
|
20160
|
+
utmMedium: row.utm_medium,
|
|
20161
|
+
utmCampaign: row.utm_campaign,
|
|
20162
|
+
referrer: row.referrer,
|
|
20163
|
+
properties: (_a = row.properties) !== null && _a !== void 0 ? _a : {},
|
|
20164
|
+
scrollDepth: row.scroll_depth,
|
|
20165
|
+
elementId: row.element_id,
|
|
20166
|
+
popupTrigger: row.popup_trigger,
|
|
20167
|
+
pageUrl: row.page_url,
|
|
20168
|
+
email: row.email,
|
|
20169
|
+
listId: row.list_id,
|
|
20170
|
+
contactId: row.contact_id,
|
|
20171
|
+
formId: row.form_id,
|
|
20172
|
+
ip: row.ip,
|
|
20173
|
+
});
|
|
20174
|
+
}
|
|
20175
|
+
var EventTrackingFactory = /** @class */ (function () {
|
|
20176
|
+
function EventTrackingFactory() {
|
|
20177
|
+
}
|
|
20178
|
+
EventTrackingFactory.list = function (_a) {
|
|
20179
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20180
|
+
var options = __rest(_a, []);
|
|
20181
|
+
return __generator(this, function (_b) {
|
|
20182
|
+
return [2 /*return*/, listEvents(options).then(function (response) { return (__assign(__assign({}, response), { items: response.items.map(mapEventRow) })); })];
|
|
20183
|
+
});
|
|
20184
|
+
});
|
|
20185
|
+
};
|
|
20186
|
+
EventTrackingFactory.getSummary = function (_a) {
|
|
20187
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20188
|
+
var options = __rest(_a, []);
|
|
20189
|
+
return __generator(this, function (_b) {
|
|
20190
|
+
return [2 /*return*/, getEventSummary(options)];
|
|
20191
|
+
});
|
|
20192
|
+
});
|
|
20193
|
+
};
|
|
20194
|
+
EventTrackingFactory.getTimeseries = function (_a) {
|
|
20195
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20196
|
+
var options = __rest(_a, []);
|
|
20197
|
+
return __generator(this, function (_b) {
|
|
20198
|
+
return [2 /*return*/, getEventTimeseries(options)];
|
|
20199
|
+
});
|
|
20200
|
+
});
|
|
20201
|
+
};
|
|
20202
|
+
EventTrackingFactory.getBreakdown = function (_a) {
|
|
20203
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20204
|
+
var options = __rest(_a, []);
|
|
20205
|
+
return __generator(this, function (_b) {
|
|
20206
|
+
return [2 /*return*/, getEventBreakdown(options)];
|
|
20207
|
+
});
|
|
20208
|
+
});
|
|
20209
|
+
};
|
|
20210
|
+
EventTrackingFactory.getPropertyKeys = function (_a) {
|
|
20211
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20212
|
+
var options = __rest(_a, []);
|
|
20213
|
+
return __generator(this, function (_b) {
|
|
20214
|
+
return [2 /*return*/, getEventPropertyKeys(options)];
|
|
20215
|
+
});
|
|
20216
|
+
});
|
|
20217
|
+
};
|
|
20218
|
+
EventTrackingFactory.getFunnel = function (_a) {
|
|
20219
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20220
|
+
var options = __rest(_a, []);
|
|
20221
|
+
return __generator(this, function (_b) {
|
|
20222
|
+
return [2 /*return*/, getEventFunnel(options)];
|
|
20223
|
+
});
|
|
20224
|
+
});
|
|
20225
|
+
};
|
|
20226
|
+
return EventTrackingFactory;
|
|
20227
|
+
}());
|
|
20228
|
+
|
|
19964
20229
|
var FormsFactory = /** @class */ (function () {
|
|
19965
20230
|
function FormsFactory() {
|
|
19966
20231
|
}
|
|
@@ -20587,4 +20852,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
20587
20852
|
return UsersFactory;
|
|
20588
20853
|
}());
|
|
20589
20854
|
|
|
20590
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomDomainModel, CustomDomainsFactory, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, ECertificateStatus, EDnsStatus, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EIngressRouteStatus, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PersonalAccessTokenModel, PersonalAccessTokensFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, ScopePicker, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createCustomDomain, createForm, createPage, createPat, createPopup, createSender, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteCustomDomain, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, domainHasValidCertificateService, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountMetadata, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomDomain, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPat, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isPublicEmailProviderService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listCustomDomains, listDkimService, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPats, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchAccountDomainsService, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, revokePat, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePat, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, verifyCustomDomain, verifyTrackingCnamesService, wait, whiteLabelBrand, whoAmi };
|
|
20855
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomDomainModel, CustomDomainsFactory, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, ECertificateStatus, EDnsStatus, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEventBreakdownDimension, EEventSortField, EEventTimeseriesGranularity, EEvents, EIngressRouteStatus, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ETrackedDeviceType, ETrackedEntityType, ETrackedEventType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, EventModel, EventTrackingFactory, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PersonalAccessTokenModel, PersonalAccessTokensFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, ScopePicker, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createCustomDomain, createForm, createPage, createPat, createPopup, createSender, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteCustomDomain, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, domainHasValidCertificateService, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountMetadata, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomDomain, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getEventBreakdown, getEventFunnel, getEventPropertyKeys, getEventSummary, getEventTimeseries, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPat, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isPublicEmailProviderService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listCustomDomains, listDkimService, listEmailLogs, listEvents, listForms, listList, listListAttributes, listListInterests, listPages, listPats, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchAccountDomainsService, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, revokePat, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePat, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, verifyCustomDomain, verifyTrackingCnamesService, wait, whiteLabelBrand, whoAmi };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TEventModel } from "./types";
|
|
2
|
+
export declare class EventModel {
|
|
3
|
+
readonly eventId: string;
|
|
4
|
+
readonly eventType: TEventModel["eventType"];
|
|
5
|
+
readonly entityType: TEventModel["entityType"];
|
|
6
|
+
readonly entityId: string;
|
|
7
|
+
readonly sessionId?: string | null;
|
|
8
|
+
readonly visitorId?: string | null;
|
|
9
|
+
readonly occurredAt: string;
|
|
10
|
+
readonly deviceType?: TEventModel["deviceType"];
|
|
11
|
+
readonly browser?: string | null;
|
|
12
|
+
readonly os?: string | null;
|
|
13
|
+
readonly source?: string | null;
|
|
14
|
+
readonly utmSource?: string | null;
|
|
15
|
+
readonly utmMedium?: string | null;
|
|
16
|
+
readonly utmCampaign?: string | null;
|
|
17
|
+
readonly referrer?: string | null;
|
|
18
|
+
readonly properties: Record<string, unknown>;
|
|
19
|
+
readonly scrollDepth?: number | null;
|
|
20
|
+
readonly elementId?: string | null;
|
|
21
|
+
readonly popupTrigger?: string | null;
|
|
22
|
+
readonly pageUrl?: string | null;
|
|
23
|
+
readonly email?: string | null;
|
|
24
|
+
readonly listId?: string | null;
|
|
25
|
+
readonly contactId?: string | null;
|
|
26
|
+
readonly formId?: string | null;
|
|
27
|
+
readonly ip?: string | null;
|
|
28
|
+
constructor(params: TEventModel);
|
|
29
|
+
toJson(): any;
|
|
30
|
+
}
|
|
31
|
+
export * from "./types";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum ETrackedEventType {
|
|
2
|
+
pageView = "page_view",
|
|
3
|
+
scrollDepth = "scroll_depth",
|
|
4
|
+
pageConversion = "page_conversion",
|
|
5
|
+
pageExit = "page_exit",
|
|
6
|
+
popupView = "popup_view",
|
|
7
|
+
popupDismiss = "popup_dismiss",
|
|
8
|
+
popupConversion = "popup_conversion",
|
|
9
|
+
click = "click",
|
|
10
|
+
formSubmit = "form_submit"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ETrackedEntityType {
|
|
13
|
+
page = "page",
|
|
14
|
+
popup = "popup"
|
|
15
|
+
}
|
|
16
|
+
export declare enum ETrackedDeviceType {
|
|
17
|
+
mobile = "mobile",
|
|
18
|
+
desktop = "desktop",
|
|
19
|
+
tablet = "tablet"
|
|
20
|
+
}
|
|
21
|
+
export type TEventModel = {
|
|
22
|
+
eventId: string;
|
|
23
|
+
eventType: ETrackedEventType | string;
|
|
24
|
+
entityType: ETrackedEntityType | string;
|
|
25
|
+
entityId: string;
|
|
26
|
+
sessionId?: string | null;
|
|
27
|
+
visitorId?: string | null;
|
|
28
|
+
occurredAt: string;
|
|
29
|
+
deviceType?: ETrackedDeviceType | string | null;
|
|
30
|
+
browser?: string | null;
|
|
31
|
+
os?: string | null;
|
|
32
|
+
source?: string | null;
|
|
33
|
+
utmSource?: string | null;
|
|
34
|
+
utmMedium?: string | null;
|
|
35
|
+
utmCampaign?: string | null;
|
|
36
|
+
referrer?: string | null;
|
|
37
|
+
properties: Record<string, unknown>;
|
|
38
|
+
scrollDepth?: number | null;
|
|
39
|
+
elementId?: string | null;
|
|
40
|
+
popupTrigger?: string | null;
|
|
41
|
+
pageUrl?: string | null;
|
|
42
|
+
email?: string | null;
|
|
43
|
+
listId?: string | null;
|
|
44
|
+
contactId?: string | null;
|
|
45
|
+
formId?: string | null;
|
|
46
|
+
ip?: string | null;
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TGetEventBreakdown, TGetEventFunnel, TGetEventPropertyKeys, TGetEventSummary, TGetEventTimeseries, TListEvents } from "./types";
|
|
2
|
+
export declare function listEvents({ useImpersonationTree, ...options }: TListEvents): Promise<any>;
|
|
3
|
+
export declare function getEventSummary({ useImpersonationTree, ...options }: TGetEventSummary): Promise<any>;
|
|
4
|
+
export declare function getEventTimeseries({ useImpersonationTree, ...options }: TGetEventTimeseries): Promise<any>;
|
|
5
|
+
export declare function getEventBreakdown({ useImpersonationTree, ...options }: TGetEventBreakdown): Promise<any>;
|
|
6
|
+
export declare function getEventPropertyKeys({ useImpersonationTree, ...options }: TGetEventPropertyKeys): Promise<any>;
|
|
7
|
+
export declare function getEventFunnel({ useImpersonationTree, ...options }: TGetEventFunnel): Promise<any>;
|
|
8
|
+
export * from "./types";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ETrackedEntityType, ETrackedEventType } from "../../models/eventTracking/types";
|
|
2
|
+
export declare enum EEventBreakdownDimension {
|
|
3
|
+
deviceType = "device_type",
|
|
4
|
+
browser = "browser",
|
|
5
|
+
os = "os",
|
|
6
|
+
source = "source",
|
|
7
|
+
utmSource = "utm_source",
|
|
8
|
+
utmMedium = "utm_medium",
|
|
9
|
+
utmCampaign = "utm_campaign",
|
|
10
|
+
entityType = "entity_type",
|
|
11
|
+
elementId = "element_id",
|
|
12
|
+
popupTrigger = "popup_trigger",
|
|
13
|
+
pageUrl = "page_url",
|
|
14
|
+
listId = "list_id",
|
|
15
|
+
contactId = "contact_id",
|
|
16
|
+
formId = "form_id"
|
|
17
|
+
}
|
|
18
|
+
export declare enum EEventTimeseriesGranularity {
|
|
19
|
+
hour = "hour",
|
|
20
|
+
day = "day",
|
|
21
|
+
week = "week",
|
|
22
|
+
month = "month"
|
|
23
|
+
}
|
|
24
|
+
export declare enum EEventSortField {
|
|
25
|
+
occurredAt = "occurred_at",
|
|
26
|
+
eventType = "event_type",
|
|
27
|
+
entityId = "entity_id",
|
|
28
|
+
deviceType = "device_type",
|
|
29
|
+
source = "source"
|
|
30
|
+
}
|
|
31
|
+
export type TEventDateRangeParams = {
|
|
32
|
+
fromDate?: string;
|
|
33
|
+
toDate?: string;
|
|
34
|
+
};
|
|
35
|
+
export type TEventEntityFilterParams = {
|
|
36
|
+
entityId?: string;
|
|
37
|
+
entityType?: ETrackedEntityType | string;
|
|
38
|
+
};
|
|
39
|
+
export type TEventAttributionFilterParams = {
|
|
40
|
+
email?: string;
|
|
41
|
+
listId?: string;
|
|
42
|
+
contactId?: string;
|
|
43
|
+
formId?: string;
|
|
44
|
+
elementId?: string;
|
|
45
|
+
popupTrigger?: string;
|
|
46
|
+
pageUrl?: string;
|
|
47
|
+
};
|
|
48
|
+
export type TEventLineageParams = {
|
|
49
|
+
subLineage?: string;
|
|
50
|
+
includeSubAccounts?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export type TEventCommonFilterParams = TEventDateRangeParams & TEventEntityFilterParams & TEventAttributionFilterParams & TEventLineageParams;
|
|
53
|
+
export type TListEvents = TEventCommonFilterParams & {
|
|
54
|
+
eventType?: ETrackedEventType | string | Array<ETrackedEventType | string>;
|
|
55
|
+
sortBy?: EEventSortField | string;
|
|
56
|
+
sortOrder?: "asc" | "desc";
|
|
57
|
+
properties?: string | Record<string, unknown>;
|
|
58
|
+
scrollDepthGte?: number;
|
|
59
|
+
scrollDepthLte?: number;
|
|
60
|
+
limit?: number;
|
|
61
|
+
offset?: number;
|
|
62
|
+
useImpersonationTree?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export type TGetEventSummary = TEventCommonFilterParams & {
|
|
65
|
+
useImpersonationTree?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type TGetEventTimeseries = TEventCommonFilterParams & {
|
|
68
|
+
eventType?: ETrackedEventType | string;
|
|
69
|
+
granularity?: EEventTimeseriesGranularity | string;
|
|
70
|
+
breakdown?: EEventBreakdownDimension | string;
|
|
71
|
+
useImpersonationTree?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export type TGetEventBreakdown = TEventCommonFilterParams & {
|
|
74
|
+
dimension: EEventBreakdownDimension | string;
|
|
75
|
+
eventType?: ETrackedEventType | string;
|
|
76
|
+
useImpersonationTree?: boolean;
|
|
77
|
+
};
|
|
78
|
+
export type TGetEventPropertyKeys = TEventDateRangeParams & TEventEntityFilterParams & TEventLineageParams & {
|
|
79
|
+
eventType?: ETrackedEventType | string;
|
|
80
|
+
search?: string;
|
|
81
|
+
email?: string;
|
|
82
|
+
useImpersonationTree?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type TEventFunnelStep = {
|
|
85
|
+
eventType: ETrackedEventType | string;
|
|
86
|
+
properties?: Record<string, unknown>;
|
|
87
|
+
};
|
|
88
|
+
export type TGetEventFunnel = TEventCommonFilterParams & {
|
|
89
|
+
steps: TEventFunnelStep[];
|
|
90
|
+
windowHours?: number;
|
|
91
|
+
useImpersonationTree?: boolean;
|
|
92
|
+
};
|