@cakemail-org/ui-components-v2 2.2.107 → 2.2.109
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/components/textField/types.d.ts +1 -1
- package/dist/cjs/data/theme/MuiTextField.d.ts +27 -0
- 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 +310 -4
- 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/cjs/types/promisePool.d.ts +4 -1
- package/dist/esm/components/textField/types.d.ts +1 -1
- package/dist/esm/data/theme/MuiTextField.d.ts +27 -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 +303 -5
- 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/dist/esm/types/promisePool.d.ts +4 -1
- package/package.json +1 -1
|
@@ -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
|
+
};
|
|
@@ -33,8 +33,11 @@ export declare enum EPartialInfoPool {
|
|
|
33
33
|
"partialUsers" = "partialUsers",
|
|
34
34
|
"partialLists" = "partialLists",
|
|
35
35
|
"partialListReports" = "partialListReports",
|
|
36
|
-
"partialCampaignReports" = "partialCampaignReports"
|
|
36
|
+
"partialCampaignReports" = "partialCampaignReports",
|
|
37
|
+
"partialPageEventSummaries" = "partialPageEventSummaries",
|
|
38
|
+
"partialPopupEventSummaries" = "partialPopupEventSummaries"
|
|
37
39
|
}
|
|
40
|
+
export type TPromisePoolPartialEventSummary = Partial<Record<string, number>>;
|
|
38
41
|
export type TPromisePoolPartialUser = Pick<TUserModel, "id" | "email" | "status" | "last_activity_on" | "first_name" | "last_name" | "language" | "timezone"> | undefined;
|
|
39
42
|
export type TPromisePoolPartialSender = Pick<TSenderModel, "email" | "name" | "confirmed"> | undefined;
|
|
40
43
|
export type TPromisePoolPartialTemplates = Pick<TTemplateModel | TListTemplateModel, "name" | "thumbnail_url" | "description"> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseTextFieldProps } from "@mui/material";
|
|
2
2
|
import { ChangeEventHandler } from "react";
|
|
3
3
|
import { TIconName } from "../icon/types";
|
|
4
|
-
export interface TTextField extends Omit<BaseTextFieldProps, "onMouseUp" | "FormHelperTextProps" | "fullWidth" | "select" | "margin" | "component" | "InputLabelProps" | "SelectProps" | "classes" | "
|
|
4
|
+
export interface TTextField extends Omit<BaseTextFieldProps, "onMouseUp" | "FormHelperTextProps" | "fullWidth" | "select" | "margin" | "component" | "InputLabelProps" | "SelectProps" | "classes" | "color"> {
|
|
5
5
|
onChange?: TTextFieldChange;
|
|
6
6
|
labelTooltipText?: string;
|
|
7
7
|
useBareBoneInput?: boolean;
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import { Theme } from "@mui/material";
|
|
2
2
|
export default function getMuiTextField(theme: Theme): {
|
|
3
|
+
variants: ({
|
|
4
|
+
props: {
|
|
5
|
+
size: string;
|
|
6
|
+
};
|
|
7
|
+
style: {
|
|
8
|
+
".MuiInputBase-root > input, .MuiInputBase-root > textarea": {
|
|
9
|
+
padding: string;
|
|
10
|
+
fontSize: import("csstype").Property.FontSize<string | number> | undefined;
|
|
11
|
+
lineHeight: import("csstype").Property.LineHeight<string | number> | undefined;
|
|
12
|
+
};
|
|
13
|
+
".MuiSvgIcon-root": {
|
|
14
|
+
top: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
props: {
|
|
19
|
+
size: string;
|
|
20
|
+
};
|
|
21
|
+
style: {
|
|
22
|
+
".MuiInputBase-root > input, .MuiInputBase-root > textarea": {
|
|
23
|
+
padding: string;
|
|
24
|
+
fontSize?: undefined;
|
|
25
|
+
lineHeight?: undefined;
|
|
26
|
+
};
|
|
27
|
+
".MuiSvgIcon-root"?: undefined;
|
|
28
|
+
};
|
|
29
|
+
})[];
|
|
3
30
|
styleOverrides: {
|
|
4
31
|
root: {
|
|
5
32
|
".MuiInputLabel-root": {
|
|
@@ -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
|
+
};
|