@pushwoosh/rpc-v2-http-api-data 0.2.150 → 0.2.152
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/applications.d.ts +0 -111
- package/applications_controlgroup.d.ts +138 -0
- package/applications_controlgroup.js +3 -0
- package/data.js +708 -283
- package/index.d.ts +2 -0
- package/internal_alerts.d.ts +8 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_alerts_v1.d.ts +143 -2
package/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { ApplicationEmailFromsService as pushwoosh_rpc_v2_applications_email_fro
|
|
|
11
11
|
import { ApplicationSoundsService as pushwoosh_rpc_v2_applications_sounds_ApplicationSoundsService } from './applications_sounds';
|
|
12
12
|
import { ApplicationsAlertsService as pushwoosh_rpc_v2_applications_alerts_ApplicationsAlertsService } from './applications_alerts';
|
|
13
13
|
import { ApplicationsConfigurationsService as pushwoosh_rpc_v2_applications_configurations_ApplicationsConfigurationsService } from './applications_configurations';
|
|
14
|
+
import { ApplicationsControlGroupService as pushwoosh_rpc_v2_applications_controlgroup_ApplicationsControlGroupService } from './applications_controlgroup';
|
|
14
15
|
import { ApplicationsGroupsService as pushwoosh_rpc_v2_applications_groups_ApplicationsGroupsService } from './applications_groups';
|
|
15
16
|
import { ApplicationsInfoService as pushwoosh_rpc_v2_applications_info_ApplicationsInfoService } from './applications_info';
|
|
16
17
|
import { ApplicationsStatisticsService as pushwoosh_rpc_v2_applications_statistics_ApplicationsStatisticsService } from './applications_statistics';
|
|
@@ -79,6 +80,7 @@ export type API = {
|
|
|
79
80
|
applicationSounds: pushwoosh_rpc_v2_applications_sounds_ApplicationSoundsService;
|
|
80
81
|
applicationsAlerts: pushwoosh_rpc_v2_applications_alerts_ApplicationsAlertsService;
|
|
81
82
|
applicationsConfigurations: pushwoosh_rpc_v2_applications_configurations_ApplicationsConfigurationsService;
|
|
83
|
+
applicationsControlGroup: pushwoosh_rpc_v2_applications_controlgroup_ApplicationsControlGroupService;
|
|
82
84
|
applicationsGroups: pushwoosh_rpc_v2_applications_groups_ApplicationsGroupsService;
|
|
83
85
|
applicationsInfo: pushwoosh_rpc_v2_applications_info_ApplicationsInfoService;
|
|
84
86
|
applicationsStatistics: pushwoosh_rpc_v2_applications_statistics_ApplicationsStatisticsService;
|
package/internal_alerts.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export type ListRequest = {
|
|
|
30
30
|
orderBy?: pushwoosh_accounts_alerts_v1_OrderBy;
|
|
31
31
|
/** Ascending or descending order. */
|
|
32
32
|
orderDirection?: pushwoosh_accounts_alerts_v1_OrderDirection;
|
|
33
|
+
/** Optional filter: drop alerts of these types from the result. */
|
|
34
|
+
excludeTypes?: pushwoosh_accounts_alerts_v1_AlertType[];
|
|
33
35
|
};
|
|
34
36
|
export type Alert = {
|
|
35
37
|
type: pushwoosh_accounts_alerts_v1_AlertType;
|
|
@@ -44,6 +46,10 @@ export type Alert = {
|
|
|
44
46
|
application?: string;
|
|
45
47
|
actionLink?: string;
|
|
46
48
|
actionLinkLabel?: string;
|
|
49
|
+
/** Illustration of a product update card; empty means the client draws its own fallback. */
|
|
50
|
+
imageUrl?: string;
|
|
51
|
+
secondaryActionLink?: string;
|
|
52
|
+
secondaryActionLinkLabel?: string;
|
|
47
53
|
};
|
|
48
54
|
export type ListResponse = {
|
|
49
55
|
alerts: Alert[];
|
|
@@ -65,6 +71,8 @@ export type UpdateStatusResponse = {};
|
|
|
65
71
|
export type GetHighestSeverityRequest = {
|
|
66
72
|
/** Optional filter: consider only alerts in this status (e.g. read/unread). */
|
|
67
73
|
status?: pushwoosh_accounts_alerts_v1_AlertStatus;
|
|
74
|
+
/** Optional filter: ignore alerts of these types when picking the severity. */
|
|
75
|
+
excludeTypes?: pushwoosh_accounts_alerts_v1_AlertType[];
|
|
68
76
|
};
|
|
69
77
|
export type GetHighestSeverityResponse = {
|
|
70
78
|
severity: pushwoosh_accounts_alerts_v1_AlertSeverity;
|
package/package.json
CHANGED
|
@@ -4,25 +4,38 @@ export type AlertsService_Send = RpcMethod<SendRequest, SendResponse>;
|
|
|
4
4
|
export type AlertsService_UpdateStatus = RpcMethod<UpdateStatusRequest, UpdateStatusResponse>;
|
|
5
5
|
export type AlertsService_GetHighestSeverity = RpcMethod<GetHighestSeverityRequest, GetHighestSeverityResponse>;
|
|
6
6
|
export type AlertsService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
|
|
7
|
+
export type AlertsService_Get = RpcMethod<GetRequest, GetResponse>;
|
|
8
|
+
export type AlertsService_ListGroup = RpcMethod<ListGroupRequest, ListGroupResponse>;
|
|
9
|
+
export type AlertsService_UpdateUnread = RpcMethod<UpdateUnreadRequest, UpdateUnreadResponse>;
|
|
10
|
+
export type AlertsService_Recall = RpcMethod<RecallRequest, RecallResponse>;
|
|
11
|
+
export type AlertsService_UpdateGroup = RpcMethod<UpdateGroupRequest, UpdateGroupResponse>;
|
|
7
12
|
export interface AlertsService {
|
|
8
13
|
List: AlertsService_List;
|
|
9
14
|
Send: AlertsService_Send;
|
|
10
15
|
UpdateStatus: AlertsService_UpdateStatus;
|
|
11
16
|
GetHighestSeverity: AlertsService_GetHighestSeverity;
|
|
12
17
|
Delete: AlertsService_Delete;
|
|
18
|
+
Get: AlertsService_Get;
|
|
19
|
+
ListGroup: AlertsService_ListGroup;
|
|
20
|
+
UpdateUnread: AlertsService_UpdateUnread;
|
|
21
|
+
Recall: AlertsService_Recall;
|
|
22
|
+
UpdateGroup: AlertsService_UpdateGroup;
|
|
13
23
|
}
|
|
14
24
|
export type AlertBanner = {
|
|
15
25
|
type: AlertType;
|
|
16
26
|
content?: string;
|
|
17
27
|
actionLink?: string;
|
|
18
28
|
actionLinkLabel?: string;
|
|
29
|
+
imageUrl?: string;
|
|
30
|
+
secondaryActionLink?: string;
|
|
31
|
+
secondaryActionLinkLabel?: string;
|
|
19
32
|
};
|
|
20
33
|
export type AlertEmail = {
|
|
21
34
|
to: string[];
|
|
22
35
|
template: string;
|
|
23
36
|
placeholders: Record<string, any>;
|
|
24
37
|
};
|
|
25
|
-
export type AlertType = 'ALERT_TYPE_UNSPECIFIED' | 'ALERT_TYPE_BLOCKING' | 'ALERT_TYPE_DISMISSABLE' | 'ALERT_TYPE_TOP_BANNER';
|
|
38
|
+
export type AlertType = 'ALERT_TYPE_UNSPECIFIED' | 'ALERT_TYPE_BLOCKING' | 'ALERT_TYPE_DISMISSABLE' | 'ALERT_TYPE_TOP_BANNER' | 'ALERT_TYPE_PRODUCT_UPDATE';
|
|
26
39
|
export type AlertStatus = 'ALERT_STATUS_UNSPECIFIED' | 'ALERT_STATUS_READ' | 'ALERT_STATUS_UNREAD';
|
|
27
40
|
export type AlertSeverity = 'ALERT_SEVERITY_UNSPECIFIED' | 'ALERT_SEVERITY_INFO' | 'ALERT_SEVERITY_WARNING' | 'ALERT_SEVERITY_CRITICAL';
|
|
28
41
|
export type OrderBy = 'ORDER_BY_CREATED' | 'ORDER_BY_SEVERITY';
|
|
@@ -36,6 +49,10 @@ export type ListRequest = {
|
|
|
36
49
|
orderBy?: OrderBy;
|
|
37
50
|
orderDirection?: OrderDirection;
|
|
38
51
|
accountId?: number;
|
|
52
|
+
/** Read state is resolved for this user; 0 keeps the account-wide read flag. */
|
|
53
|
+
userId?: number;
|
|
54
|
+
/** Drops alerts of these types from the result; `type` above still selects a single type. */
|
|
55
|
+
excludeTypes?: AlertType[];
|
|
39
56
|
};
|
|
40
57
|
export type ListResponse_Alert = {
|
|
41
58
|
type: AlertType;
|
|
@@ -51,6 +68,9 @@ export type ListResponse_Alert = {
|
|
|
51
68
|
meta?: object;
|
|
52
69
|
actionLink?: string;
|
|
53
70
|
actionLinkLabel?: string;
|
|
71
|
+
imageUrl?: string;
|
|
72
|
+
secondaryActionLink?: string;
|
|
73
|
+
secondaryActionLinkLabel?: string;
|
|
54
74
|
};
|
|
55
75
|
export type ListResponse = {
|
|
56
76
|
alerts: ListResponse_Alert[];
|
|
@@ -69,6 +89,16 @@ export type SendRequest = {
|
|
|
69
89
|
meta?: object;
|
|
70
90
|
/** check unique alert within the `unique_key` in the provided request */
|
|
71
91
|
uniqueKey?: string;
|
|
92
|
+
/**
|
|
93
|
+
* When non-empty, takes precedence over `account_id` and one alert is created per id.
|
|
94
|
+
* Server generates a shared `group_id` (UUID) so the batch can be patched / recalled later.
|
|
95
|
+
*/
|
|
96
|
+
accountIds?: number[];
|
|
97
|
+
/**
|
|
98
|
+
* When true, the server enumerates all active accounts itself and creates one alert
|
|
99
|
+
* per account (shared group_uuid), ignoring `account_id` and `account_ids`.
|
|
100
|
+
*/
|
|
101
|
+
allAccounts?: boolean;
|
|
72
102
|
};
|
|
73
103
|
export type UpdateStatusRequest_Alert = {
|
|
74
104
|
id: number;
|
|
@@ -76,12 +106,92 @@ export type UpdateStatusRequest_Alert = {
|
|
|
76
106
|
};
|
|
77
107
|
export type UpdateStatusRequest = {
|
|
78
108
|
alerts?: UpdateStatusRequest_Alert[];
|
|
109
|
+
/** Marks the alerts read/unread for this user; 0 keeps the account-wide read flag. */
|
|
110
|
+
userId?: number;
|
|
79
111
|
};
|
|
80
112
|
export type UpdateStatusResponse = {};
|
|
81
|
-
export type SendResponse = {
|
|
113
|
+
export type SendResponse = {
|
|
114
|
+
groupUuid: string;
|
|
115
|
+
created: number;
|
|
116
|
+
};
|
|
117
|
+
export type UpdateUnreadRequest = {
|
|
118
|
+
groupUuid?: string;
|
|
119
|
+
/** Patch fields. Only set fields are applied. */
|
|
120
|
+
title?: string;
|
|
121
|
+
content?: string;
|
|
122
|
+
actionLink?: string;
|
|
123
|
+
actionLinkLabel?: string;
|
|
124
|
+
severity?: AlertSeverity;
|
|
125
|
+
expiry?: Date;
|
|
126
|
+
imageUrl?: string;
|
|
127
|
+
secondaryActionLink?: string;
|
|
128
|
+
secondaryActionLinkLabel?: string;
|
|
129
|
+
};
|
|
130
|
+
export type UpdateUnreadResponse = {
|
|
131
|
+
updated: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* UpdateGroup patches every alert of the group, read ones included, unlike UpdateUnread.
|
|
135
|
+
* Content-only edits (picture, CTA, type) stay correct after a user has seen the card.
|
|
136
|
+
*/
|
|
137
|
+
export type UpdateGroupRequest = {
|
|
138
|
+
groupUuid?: string;
|
|
139
|
+
/** Patch fields. Only set fields are applied. */
|
|
140
|
+
title?: string;
|
|
141
|
+
content?: string;
|
|
142
|
+
actionLink?: string;
|
|
143
|
+
actionLinkLabel?: string;
|
|
144
|
+
severity?: AlertSeverity;
|
|
145
|
+
expiry?: Date;
|
|
146
|
+
imageUrl?: string;
|
|
147
|
+
secondaryActionLink?: string;
|
|
148
|
+
secondaryActionLinkLabel?: string;
|
|
149
|
+
type?: AlertType;
|
|
150
|
+
};
|
|
151
|
+
export type UpdateGroupResponse = {
|
|
152
|
+
updated: number;
|
|
153
|
+
};
|
|
154
|
+
export type ListGroupRequest = {
|
|
155
|
+
status?: AlertStatus;
|
|
156
|
+
titleSearch?: string;
|
|
157
|
+
page?: number;
|
|
158
|
+
perPage?: number;
|
|
159
|
+
orderBy?: OrderBy;
|
|
160
|
+
orderDirection?: OrderDirection;
|
|
161
|
+
};
|
|
162
|
+
export type ListGroupResponse_AlertGroup = {
|
|
163
|
+
groupUuid: string;
|
|
164
|
+
type: AlertType;
|
|
165
|
+
severity: AlertSeverity;
|
|
166
|
+
title: string;
|
|
167
|
+
content?: string;
|
|
168
|
+
created?: Date;
|
|
169
|
+
expiry?: Date;
|
|
170
|
+
actionLink?: string;
|
|
171
|
+
actionLinkLabel?: string;
|
|
172
|
+
recipientsCount: number;
|
|
173
|
+
unreadCount: number;
|
|
174
|
+
readCount: number;
|
|
175
|
+
};
|
|
176
|
+
export type ListGroupResponse = {
|
|
177
|
+
groups: ListGroupResponse_AlertGroup[];
|
|
178
|
+
page: number;
|
|
179
|
+
perPage: number;
|
|
180
|
+
total: number;
|
|
181
|
+
};
|
|
182
|
+
export type RecallRequest = {
|
|
183
|
+
groupUuid?: string;
|
|
184
|
+
};
|
|
185
|
+
export type RecallResponse = {
|
|
186
|
+
recalled: number;
|
|
187
|
+
};
|
|
82
188
|
export type GetHighestSeverityRequest = {
|
|
83
189
|
accountId?: number;
|
|
84
190
|
status?: AlertStatus;
|
|
191
|
+
/** Read state is resolved for this user; 0 keeps the account-wide read flag. */
|
|
192
|
+
userId?: number;
|
|
193
|
+
/** Drops alerts of these types before picking the highest severity. */
|
|
194
|
+
excludeTypes?: AlertType[];
|
|
85
195
|
};
|
|
86
196
|
export type GetHighestSeverityResponse = {
|
|
87
197
|
severity: AlertSeverity;
|
|
@@ -93,3 +203,34 @@ export type DeleteRequest = {
|
|
|
93
203
|
accountId?: number;
|
|
94
204
|
};
|
|
95
205
|
export type DeleteResponse = {};
|
|
206
|
+
export type GetRequest = {
|
|
207
|
+
/**
|
|
208
|
+
* any of identifier
|
|
209
|
+
* uuid has highest prior
|
|
210
|
+
*/
|
|
211
|
+
uuid?: string;
|
|
212
|
+
uniqueKey?: string;
|
|
213
|
+
accountId?: number;
|
|
214
|
+
};
|
|
215
|
+
export type GetResponse_Alert = {
|
|
216
|
+
type: AlertType;
|
|
217
|
+
status: AlertStatus;
|
|
218
|
+
severity: AlertSeverity;
|
|
219
|
+
title: string;
|
|
220
|
+
content?: string;
|
|
221
|
+
created?: Date;
|
|
222
|
+
expiry?: Date;
|
|
223
|
+
uuid: string;
|
|
224
|
+
uniqueKey: string;
|
|
225
|
+
accountId: number;
|
|
226
|
+
applicationId?: number;
|
|
227
|
+
meta?: object;
|
|
228
|
+
actionLink?: string;
|
|
229
|
+
actionLinkLabel?: string;
|
|
230
|
+
imageUrl?: string;
|
|
231
|
+
secondaryActionLink?: string;
|
|
232
|
+
secondaryActionLinkLabel?: string;
|
|
233
|
+
};
|
|
234
|
+
export type GetResponse = {
|
|
235
|
+
alert: GetResponse_Alert;
|
|
236
|
+
};
|