@pushwoosh/rpc-gateway-statistics-api 1.3.689
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/commonTypes.d.ts +18 -0
- package/commonTypes.js +3 -0
- package/data.d.ts +2 -0
- package/data.js +4192 -0
- package/index.d.ts +13 -0
- package/index.js +3 -0
- package/package.json +19 -0
- package/pushwoosh_statistics_statistics_v1.d.ts +796 -0
- package/pushwoosh_statistics_statistics_v1.js +3 -0
- package/pushwoosh_statistics_statistics_v2.d.ts +189 -0
- package/pushwoosh_statistics_statistics_v2.js +3 -0
- package/pushwoosh_statistics_statistics_v2_dashboards.d.ts +143 -0
- package/pushwoosh_statistics_statistics_v2_dashboards.js +3 -0
- package/pushwoosh_statistics_statistics_v2_overview.d.ts +59 -0
- package/pushwoosh_statistics_statistics_v2_overview.js +3 -0
- package/pushwoosh_statistics_statistics_v2_statistics.d.ts +706 -0
- package/pushwoosh_statistics_statistics_v2_statistics.js +3 -0
- package/pushwoosh_statistics_types.d.ts +23 -0
- package/pushwoosh_statistics_types.js +3 -0
- package/types.d.ts +59 -0
- package/types.js +3 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { RpcMethod, JsonObject } from './commonTypes';
|
|
2
|
+
import { Platform as pushwoosh_statistics_types_Platform } from './pushwoosh_statistics_types';
|
|
3
|
+
import { DateRange as pushwoosh_statistics_types_DateRange } from './pushwoosh_statistics_types';
|
|
4
|
+
import { Source as pushwoosh_statistics_types_Source } from './pushwoosh_statistics_types';
|
|
5
|
+
import { MessageType as pushwoosh_statistics_types_MessageType } from './pushwoosh_statistics_types';
|
|
6
|
+
export type MessagesService_List = RpcMethod<ListRequest, ListResponse>;
|
|
7
|
+
export type MessagesService_LoadByCodes = RpcMethod<LoadByCodesRequest, LoadByCodesResponse>;
|
|
8
|
+
export type MessagesService_GetByIDs = RpcMethod<GetByIDsRequest, GetByIDsResponse>;
|
|
9
|
+
export type MessagesService_LoadByCode = RpcMethod<LoadByCodeRequest, LoadByCodeResponse>;
|
|
10
|
+
export type MessagesService_GetByID = RpcMethod<GetByIDRequest, GetByIDResponse>;
|
|
11
|
+
export type MessagesService_Load = RpcMethod<LoadRequest, LoadResponse>;
|
|
12
|
+
export interface MessagesService {
|
|
13
|
+
List: MessagesService_List;
|
|
14
|
+
LoadByCodes: MessagesService_LoadByCodes;
|
|
15
|
+
GetByIDs: MessagesService_GetByIDs;
|
|
16
|
+
LoadByCode: MessagesService_LoadByCode;
|
|
17
|
+
GetByID: MessagesService_GetByID;
|
|
18
|
+
Load: MessagesService_Load;
|
|
19
|
+
}
|
|
20
|
+
export type ListRequest_Filter = {
|
|
21
|
+
platforms: pushwoosh_statistics_types_Platform[];
|
|
22
|
+
dateRange: pushwoosh_statistics_types_DateRange;
|
|
23
|
+
source: pushwoosh_statistics_types_Source;
|
|
24
|
+
campaign: string;
|
|
25
|
+
messagesIds: number[];
|
|
26
|
+
messagesCodes: string[];
|
|
27
|
+
application: string;
|
|
28
|
+
messageType: pushwoosh_statistics_types_MessageType;
|
|
29
|
+
};
|
|
30
|
+
export type ListRequest_Params = {
|
|
31
|
+
withDetails: boolean;
|
|
32
|
+
withMetrics: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type ListRequest = {
|
|
35
|
+
filters: ListRequest_Filter;
|
|
36
|
+
params: ListRequest_Params;
|
|
37
|
+
perPage: number;
|
|
38
|
+
page: number;
|
|
39
|
+
};
|
|
40
|
+
export type PushDetails_PlatformParameters = {
|
|
41
|
+
androidHeader: string;
|
|
42
|
+
androidRootParams: Record<string, string>;
|
|
43
|
+
iosTitle: string;
|
|
44
|
+
iosSubtitle: string;
|
|
45
|
+
iosRootParams: Record<string, string>;
|
|
46
|
+
chromeHeader: string;
|
|
47
|
+
chromeRootParams: Record<string, string>;
|
|
48
|
+
firefoxHeader: string;
|
|
49
|
+
firefoxRootParams: Record<string, string>;
|
|
50
|
+
};
|
|
51
|
+
export type PushDetails = {
|
|
52
|
+
filterName: string;
|
|
53
|
+
filterCode: string;
|
|
54
|
+
content: Record<string, string>;
|
|
55
|
+
title: Record<string, string>;
|
|
56
|
+
platformParameters: PushDetails_PlatformParameters;
|
|
57
|
+
followUserTimezone: boolean;
|
|
58
|
+
conditions: string;
|
|
59
|
+
data: JsonObject;
|
|
60
|
+
conditionsOperator: string;
|
|
61
|
+
filterConditions: string;
|
|
62
|
+
devicesFilter: string;
|
|
63
|
+
};
|
|
64
|
+
export type EmailDetails = {
|
|
65
|
+
template: string;
|
|
66
|
+
filterName: string;
|
|
67
|
+
filterCode: string;
|
|
68
|
+
subject: Record<string, string>;
|
|
69
|
+
fromName: string;
|
|
70
|
+
fromEmail: string;
|
|
71
|
+
replyName: string;
|
|
72
|
+
replyEmail: string;
|
|
73
|
+
followUserTimezone: boolean;
|
|
74
|
+
conditions: string;
|
|
75
|
+
conditionsOperator: string;
|
|
76
|
+
filterConditions: string;
|
|
77
|
+
devicesFilter: string;
|
|
78
|
+
data: string;
|
|
79
|
+
};
|
|
80
|
+
export type PushMetrics = {
|
|
81
|
+
sends: number;
|
|
82
|
+
opens: number;
|
|
83
|
+
deliveries: number;
|
|
84
|
+
inboxOpens: number;
|
|
85
|
+
unshowableSends: number;
|
|
86
|
+
errors: number;
|
|
87
|
+
platform: number;
|
|
88
|
+
};
|
|
89
|
+
export type EmailMetrics = {
|
|
90
|
+
sends: number;
|
|
91
|
+
opens: number;
|
|
92
|
+
deliveries: number;
|
|
93
|
+
hardBounces: number;
|
|
94
|
+
softBounces: number;
|
|
95
|
+
rejects: number;
|
|
96
|
+
confirmedSends: number;
|
|
97
|
+
unsubs: number;
|
|
98
|
+
complaints: number;
|
|
99
|
+
errors: number;
|
|
100
|
+
};
|
|
101
|
+
export type PushInfo = {
|
|
102
|
+
details: PushDetails;
|
|
103
|
+
metrics: PushMetrics[];
|
|
104
|
+
};
|
|
105
|
+
export type EmailInfo = {
|
|
106
|
+
details: EmailDetails;
|
|
107
|
+
metrics: EmailMetrics[];
|
|
108
|
+
};
|
|
109
|
+
export type ListResponseItem_info_pushInfo = {
|
|
110
|
+
type: 'pushInfo';
|
|
111
|
+
data: PushInfo;
|
|
112
|
+
};
|
|
113
|
+
export type ListResponseItem_info_emailInfo = {
|
|
114
|
+
type: 'emailInfo';
|
|
115
|
+
data: EmailInfo;
|
|
116
|
+
};
|
|
117
|
+
export type ListResponseItem_info = ListResponseItem_info_pushInfo | ListResponseItem_info_emailInfo;
|
|
118
|
+
export type ListResponseItem = {
|
|
119
|
+
id: number;
|
|
120
|
+
code: string;
|
|
121
|
+
createdDate: string;
|
|
122
|
+
sendDate: string;
|
|
123
|
+
status: string;
|
|
124
|
+
platforms: number[];
|
|
125
|
+
source: string;
|
|
126
|
+
info: ListResponseItem_info;
|
|
127
|
+
};
|
|
128
|
+
export type ListResponse = {
|
|
129
|
+
total: number;
|
|
130
|
+
items: ListResponseItem[];
|
|
131
|
+
};
|
|
132
|
+
export type Message_Status = 'status_unknown' | 'creating' | 'waiting' | 'pending' | 'processing' | 'done' | 'canceled' | 'fail';
|
|
133
|
+
export type Message_Type = 'type_unknown' | 'broadcast' | 'devices' | 'users';
|
|
134
|
+
export type Message = {
|
|
135
|
+
id: number;
|
|
136
|
+
code: string;
|
|
137
|
+
accountId: number;
|
|
138
|
+
campaignId: number;
|
|
139
|
+
applicationIds: number[];
|
|
140
|
+
platforms: number[];
|
|
141
|
+
status: Message_Status;
|
|
142
|
+
sendType: Message_Type;
|
|
143
|
+
isCanceled: boolean;
|
|
144
|
+
icon: string;
|
|
145
|
+
banner: string;
|
|
146
|
+
createdVia: pushwoosh_statistics_types_Source;
|
|
147
|
+
title: Record<string, string>;
|
|
148
|
+
subtitle: Record<string, string>;
|
|
149
|
+
content: Record<string, string>;
|
|
150
|
+
createdTimestamp: Date;
|
|
151
|
+
updatedTimestamp: Date;
|
|
152
|
+
sentTimestamp: Date;
|
|
153
|
+
properties: Record<string, string>;
|
|
154
|
+
childMessages: Message[];
|
|
155
|
+
};
|
|
156
|
+
export type LoadByCodesRequest = {
|
|
157
|
+
codes: string[];
|
|
158
|
+
};
|
|
159
|
+
export type LoadByCodesResponse = {
|
|
160
|
+
messages: Message[];
|
|
161
|
+
};
|
|
162
|
+
export type GetByIDsRequest = {
|
|
163
|
+
ids: number[];
|
|
164
|
+
};
|
|
165
|
+
export type GetByIDsResponse = {
|
|
166
|
+
messages: Message[];
|
|
167
|
+
};
|
|
168
|
+
export type LoadByCodeRequest = {
|
|
169
|
+
code: string;
|
|
170
|
+
};
|
|
171
|
+
export type LoadByCodeResponse = {
|
|
172
|
+
message: Message;
|
|
173
|
+
};
|
|
174
|
+
export type GetByIDRequest = {
|
|
175
|
+
id: number;
|
|
176
|
+
};
|
|
177
|
+
export type GetByIDResponse = {
|
|
178
|
+
message: Message;
|
|
179
|
+
};
|
|
180
|
+
export type LoadRequest = {
|
|
181
|
+
application: string;
|
|
182
|
+
code: string;
|
|
183
|
+
id: number;
|
|
184
|
+
relationUuid: string;
|
|
185
|
+
relationParentUuid: string;
|
|
186
|
+
};
|
|
187
|
+
export type LoadResponse = {
|
|
188
|
+
message: Message;
|
|
189
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
import { TimeInterval as pushwoosh_statistics_types_TimeInterval } from './pushwoosh_statistics_types';
|
|
3
|
+
export type DashboardsService_GetLinearChartMetrics = RpcMethod<GetLinearChartMetricsRequest, GetLinearChartMetricsResponse>;
|
|
4
|
+
export type DashboardsService_GetTotalsChartMetrics = RpcMethod<GetTotalsChartMetricsRequest, GetTotalsChartMetricsResponse>;
|
|
5
|
+
export type DashboardsService_GetFunnel = RpcMethod<GetFunnelRequest, GetFunnelResponse>;
|
|
6
|
+
export interface DashboardsService {
|
|
7
|
+
/** GetLinearChartMetrics returns metrics for linear charts based on provided parameters */
|
|
8
|
+
GetLinearChartMetrics: DashboardsService_GetLinearChartMetrics;
|
|
9
|
+
/** GetTotalsChartMetrics returns total metrics for charts based on provided parameters */
|
|
10
|
+
GetTotalsChartMetrics: DashboardsService_GetTotalsChartMetrics;
|
|
11
|
+
/** GetFunnel returns funnel data based on provided parameters */
|
|
12
|
+
GetFunnel: DashboardsService_GetFunnel;
|
|
13
|
+
}
|
|
14
|
+
export type Breakdown = 'BREAKDOWN_UNKNOWN' | 'PLATFORMS' | 'EVENT_ATTRIBUTE' | 'TAG_VALUES' | 'CAMPAIGNS' | 'MESSAGES' | 'JOURNEYS';
|
|
15
|
+
export type MathOperator = 'MATH_OPERATOR_UNSPECIFIED' | 'EQ' | 'NOT_EQ' | 'GTE' | 'LTE' | 'BETWEEN' | 'IN' | 'NOT_IN' | 'ANY' | 'NOT_SET';
|
|
16
|
+
export type EventCalcType = 'EVENT_CALC_TYPE_ALL' | 'EVENT_CALC_TYPE_UNIQUE';
|
|
17
|
+
export type Value_kind_string = {
|
|
18
|
+
type: 'string';
|
|
19
|
+
data: string;
|
|
20
|
+
};
|
|
21
|
+
export type Value_kind_integer = {
|
|
22
|
+
type: 'integer';
|
|
23
|
+
data: number;
|
|
24
|
+
};
|
|
25
|
+
export type Value_kind_decimal = {
|
|
26
|
+
type: 'decimal';
|
|
27
|
+
data: number;
|
|
28
|
+
};
|
|
29
|
+
export type Value_kind_boolean = {
|
|
30
|
+
type: 'boolean';
|
|
31
|
+
data: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type Value_kind_list = {
|
|
34
|
+
type: 'list';
|
|
35
|
+
data: List;
|
|
36
|
+
};
|
|
37
|
+
export type Value_kind_date = {
|
|
38
|
+
type: 'date';
|
|
39
|
+
data: Date;
|
|
40
|
+
};
|
|
41
|
+
export type Value_kind = Value_kind_string | Value_kind_integer | Value_kind_decimal | Value_kind_boolean | Value_kind_list | Value_kind_date;
|
|
42
|
+
export type Value = {
|
|
43
|
+
kind: Value_kind;
|
|
44
|
+
};
|
|
45
|
+
export type List = {
|
|
46
|
+
values: string[];
|
|
47
|
+
};
|
|
48
|
+
export type AttributeCondition = {
|
|
49
|
+
name: string;
|
|
50
|
+
operator: MathOperator;
|
|
51
|
+
values: Value[];
|
|
52
|
+
};
|
|
53
|
+
export type Metric = {
|
|
54
|
+
id: number;
|
|
55
|
+
eventName: string;
|
|
56
|
+
attributeConditions: AttributeCondition[];
|
|
57
|
+
tag: string;
|
|
58
|
+
eventCalcType: EventCalcType;
|
|
59
|
+
};
|
|
60
|
+
/** TypeFilter defines the type of filter to apply */
|
|
61
|
+
export type ChartParams_TypeFilter = 'Platform' | 'Segment' | 'Push' | 'Email' | 'Campaign' | 'Journey';
|
|
62
|
+
export type ChartParams_TimeRange = {
|
|
63
|
+
from: Date;
|
|
64
|
+
to: Date;
|
|
65
|
+
interval: pushwoosh_statistics_types_TimeInterval;
|
|
66
|
+
};
|
|
67
|
+
export type ChartParams_Filters = {
|
|
68
|
+
/** platforms - list of platform IDs to filter by */
|
|
69
|
+
platforms: number[];
|
|
70
|
+
messagesIds: number[];
|
|
71
|
+
campaignsCodes: string[];
|
|
72
|
+
attributeConditions: AttributeCondition[];
|
|
73
|
+
segment: string;
|
|
74
|
+
};
|
|
75
|
+
export type ChartParams_Filter = {
|
|
76
|
+
type: ChartParams_TypeFilter;
|
|
77
|
+
platforms: number[];
|
|
78
|
+
segment: string;
|
|
79
|
+
pushId: number;
|
|
80
|
+
emailId: number;
|
|
81
|
+
campaign: string;
|
|
82
|
+
journey: string;
|
|
83
|
+
jPoints: string[];
|
|
84
|
+
disabled: boolean;
|
|
85
|
+
};
|
|
86
|
+
export type ChartParams_BreakdownParams = {
|
|
87
|
+
type: Breakdown;
|
|
88
|
+
eventAttribute: string;
|
|
89
|
+
/** should be one of the metrics from the metrics array */
|
|
90
|
+
metric: Metric;
|
|
91
|
+
};
|
|
92
|
+
/** ChartParams defines the parameters for chart metrics requests */
|
|
93
|
+
export type ChartParams = {
|
|
94
|
+
timeRange: ChartParams_TimeRange;
|
|
95
|
+
metrics: Metric[];
|
|
96
|
+
filters: ChartParams_Filters;
|
|
97
|
+
fltrs: ChartParams_Filter[];
|
|
98
|
+
breakdown: ChartParams_BreakdownParams;
|
|
99
|
+
application: string;
|
|
100
|
+
timezone: string;
|
|
101
|
+
};
|
|
102
|
+
export type GetLinearChartMetricsRequest = {
|
|
103
|
+
params: ChartParams;
|
|
104
|
+
};
|
|
105
|
+
export type GetLinearChartMetricsResponse_Breakdown = {
|
|
106
|
+
breakdown: string;
|
|
107
|
+
values: number[];
|
|
108
|
+
total: number;
|
|
109
|
+
};
|
|
110
|
+
export type GetLinearChartMetricsResponse_Metric = {
|
|
111
|
+
metric: string;
|
|
112
|
+
breakdowns: GetLinearChartMetricsResponse_Breakdown[];
|
|
113
|
+
};
|
|
114
|
+
export type GetLinearChartMetricsResponse = {
|
|
115
|
+
timestamps: Date[];
|
|
116
|
+
metrics: GetLinearChartMetricsResponse_Metric[];
|
|
117
|
+
};
|
|
118
|
+
export type GetTotalsChartMetricsRequest = {
|
|
119
|
+
params: ChartParams;
|
|
120
|
+
};
|
|
121
|
+
export type GetTotalsChartMetricsResponse_Breakdown = {
|
|
122
|
+
breakdown: string;
|
|
123
|
+
value: number;
|
|
124
|
+
total: number;
|
|
125
|
+
};
|
|
126
|
+
export type GetTotalsChartMetricsResponse_Metric = {
|
|
127
|
+
metric: string;
|
|
128
|
+
breakdowns: GetTotalsChartMetricsResponse_Breakdown[];
|
|
129
|
+
};
|
|
130
|
+
export type GetTotalsChartMetricsResponse = {
|
|
131
|
+
metrics: GetTotalsChartMetricsResponse_Metric[];
|
|
132
|
+
};
|
|
133
|
+
export type GetFunnelRequest = {
|
|
134
|
+
params: ChartParams;
|
|
135
|
+
};
|
|
136
|
+
export type GetFunnelResponse_Step = {
|
|
137
|
+
breakdown: string;
|
|
138
|
+
count: number;
|
|
139
|
+
percent: number;
|
|
140
|
+
};
|
|
141
|
+
export type GetFunnelResponse = {
|
|
142
|
+
steps: GetFunnelResponse_Step[];
|
|
143
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type OverviewService_Get = RpcMethod<GetRequest, GetResponse>;
|
|
3
|
+
export type OverviewService_GetMessagesStatByApplications = RpcMethod<GetMessagesStatByApplicationsRequest, GetMessagesStatByApplicationsResponse>;
|
|
4
|
+
export type OverviewService_GetAudienceStatByApplications = RpcMethod<GetAudienceStatByApplicationsRequest, GetAudienceStatByApplicationsResponse>;
|
|
5
|
+
export interface OverviewService {
|
|
6
|
+
/** Get returns overview statistics for pushwoosh. */
|
|
7
|
+
Get: OverviewService_Get;
|
|
8
|
+
GetMessagesStatByApplications: OverviewService_GetMessagesStatByApplications;
|
|
9
|
+
GetAudienceStatByApplications: OverviewService_GetAudienceStatByApplications;
|
|
10
|
+
}
|
|
11
|
+
export type GetRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* day to get statistics for.
|
|
14
|
+
* only year-month-day are used.
|
|
15
|
+
*/
|
|
16
|
+
day: Date;
|
|
17
|
+
};
|
|
18
|
+
export type GetResponse = {
|
|
19
|
+
/** total sends by platform */
|
|
20
|
+
sends: Record<number, number>;
|
|
21
|
+
};
|
|
22
|
+
export type GetMessagesStatByApplicationsRequest = {
|
|
23
|
+
/**
|
|
24
|
+
* days to get statistics for.
|
|
25
|
+
* only year-month-day are used.
|
|
26
|
+
*/
|
|
27
|
+
dayFrom: Date;
|
|
28
|
+
dayTo: Date;
|
|
29
|
+
applicationIds: number[];
|
|
30
|
+
};
|
|
31
|
+
export type GetMessagesStatByApplicationsResponse_Statistics = {
|
|
32
|
+
applicationId: number;
|
|
33
|
+
platform: number;
|
|
34
|
+
sends: number;
|
|
35
|
+
opens: number;
|
|
36
|
+
};
|
|
37
|
+
export type GetMessagesStatByApplicationsResponse = {
|
|
38
|
+
/** total metrics by apps and platforms */
|
|
39
|
+
statistics: GetMessagesStatByApplicationsResponse_Statistics[];
|
|
40
|
+
};
|
|
41
|
+
export type GetAudienceStatByApplicationsRequest = {
|
|
42
|
+
/**
|
|
43
|
+
* days to get statistics for.
|
|
44
|
+
* only year-month-day are used.
|
|
45
|
+
*/
|
|
46
|
+
dayFrom: Date;
|
|
47
|
+
dayTo: Date;
|
|
48
|
+
applicationIds: number[];
|
|
49
|
+
};
|
|
50
|
+
export type GetAudienceStatByApplicationsResponse_Statistics = {
|
|
51
|
+
applicationId: number;
|
|
52
|
+
platform: number;
|
|
53
|
+
installs: number;
|
|
54
|
+
subscriptions: number;
|
|
55
|
+
};
|
|
56
|
+
export type GetAudienceStatByApplicationsResponse = {
|
|
57
|
+
/** total metrics by apps and platforms */
|
|
58
|
+
statistics: GetAudienceStatByApplicationsResponse_Statistics[];
|
|
59
|
+
};
|