@pushwoosh/rpc-v2-http-api-data 0.2.330 → 0.2.331
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/data.js +581 -26
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/pushwoosh_channels_messagingApi_v2.d.ts +642 -26
|
@@ -1,16 +1,86 @@
|
|
|
1
1
|
import { RpcMethod, Duration } from './commonTypes';
|
|
2
2
|
import { FilterExpression as pushwoosh_objects_filters_v1_FilterExpression } from './pushwoosh_objects_filters_v1';
|
|
3
|
+
/**
|
|
4
|
+
* MessagesInProgressService is an INTERNAL service (exposed on the private gRPC
|
|
5
|
+
* port only). It surfaces the in-flight messages that the publisher tracks in
|
|
6
|
+
* Redis so operators can list stalled sends, inspect one, re-dispatch them, or
|
|
7
|
+
* clear their records from the admin panel.
|
|
8
|
+
*
|
|
9
|
+
* It deliberately has no HTTP gateway annotations: it is reached over gRPC by
|
|
10
|
+
* internal services (admin-grpc), never by public clients.
|
|
11
|
+
*/
|
|
12
|
+
export interface MessagesInProgressService {
|
|
13
|
+
}
|
|
14
|
+
export type MessageStalledStatusState = 'MESSAGE_STATUS_STATE_UNKNOWN' | 'MESSAGE_STATUS_STATE_ALIVE' | 'MESSAGE_STATUS_STATE_STUCK' | 'MESSAGE_STATUS_STATE_DEAD';
|
|
15
|
+
export type MessageStalled = {
|
|
16
|
+
messageCode: string;
|
|
17
|
+
clientId: string;
|
|
18
|
+
state: MessageStalledStatusState;
|
|
19
|
+
processed: number;
|
|
20
|
+
isClientAlive: boolean;
|
|
21
|
+
accountId: number;
|
|
22
|
+
/** Last progress update; unset if absent. */
|
|
23
|
+
lastUpdated: Date;
|
|
24
|
+
/** Last resend; unset if the message was never resent. */
|
|
25
|
+
lastResend: Date;
|
|
26
|
+
sendDate: Date;
|
|
27
|
+
};
|
|
28
|
+
export type ListRequest = {};
|
|
29
|
+
export type ListResponse = {
|
|
30
|
+
messages: MessageStalled[];
|
|
31
|
+
};
|
|
32
|
+
export type GetStalledMessageRequest = {
|
|
33
|
+
messageCode: string;
|
|
34
|
+
};
|
|
35
|
+
export type GetStalledMessageResponse = {
|
|
36
|
+
message: MessageStalled;
|
|
37
|
+
};
|
|
38
|
+
export type ResendMessageRequest = {
|
|
39
|
+
messageCode: string;
|
|
40
|
+
};
|
|
41
|
+
export type ResendMessageResponse = {};
|
|
42
|
+
export type ClearMessageRequest = {
|
|
43
|
+
messageCode: string;
|
|
44
|
+
};
|
|
45
|
+
export type ClearMessageResponse = {};
|
|
3
46
|
export type MessagingService_Notify = RpcMethod<NotifyRequest, NotifyResponse>;
|
|
4
|
-
export type
|
|
47
|
+
export type MessagingService_NotifyBatch = RpcMethod<NotifyBatchRequest, NotifyBatchResponse>;
|
|
48
|
+
export type MessagingService_Cancel = RpcMethod<CancelRequest, CancelResponse>;
|
|
49
|
+
export type MessagingService_Update = RpcMethod<UpdateRequest, UpdateResponse>;
|
|
50
|
+
export type MessagingService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
|
|
5
51
|
export interface MessagingService {
|
|
6
52
|
/** Notify creates a new message. Can be targeted to a segment or a list of users. */
|
|
7
53
|
Notify: MessagingService_Notify;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
54
|
+
/**
|
|
55
|
+
* NotifyBatch creates several messages in one call. Every item is an
|
|
56
|
+
* independent Notify: it is validated, authorized and sent on its own, and it
|
|
57
|
+
* gets its own result. The call itself succeeds even when every item failed,
|
|
58
|
+
* so the caller must read the per-item results and not just the status code.
|
|
59
|
+
*
|
|
60
|
+
* Intended for callers that cannot issue concurrent requests. It is not
|
|
61
|
+
* faster than the same items sent in parallel through Notify.
|
|
62
|
+
*
|
|
63
|
+
* Public API only: the fan-out re-enters through the public port, so calling
|
|
64
|
+
* this on the private port fails with Unimplemented.
|
|
65
|
+
*/
|
|
66
|
+
NotifyBatch: MessagingService_NotifyBatch;
|
|
67
|
+
/**
|
|
68
|
+
* Cancel cancels a previously created message identified by message_code.
|
|
69
|
+
* Only messages in a cancelable state (pending, waiting, processing) can be canceled.
|
|
70
|
+
*/
|
|
71
|
+
Cancel: MessagingService_Cancel;
|
|
72
|
+
/**
|
|
73
|
+
* Update replaces a previously created message identified by message_code with
|
|
74
|
+
* a new definition. Only messages still in the pending (scheduled) state can be
|
|
75
|
+
* updated. The message_code does not change.
|
|
76
|
+
*/
|
|
77
|
+
Update: MessagingService_Update;
|
|
78
|
+
/**
|
|
79
|
+
* Delete permanently removes a previously created message identified by
|
|
80
|
+
* message_code. Only messages in a cancelable state (pending, waiting,
|
|
81
|
+
* processing) can be deleted.
|
|
82
|
+
*/
|
|
83
|
+
Delete: MessagingService_Delete;
|
|
14
84
|
}
|
|
15
85
|
export type NotifyRequest_kind_segment = {
|
|
16
86
|
type: 'segment';
|
|
@@ -22,27 +92,123 @@ export type NotifyRequest_kind_transactional = {
|
|
|
22
92
|
};
|
|
23
93
|
export type NotifyRequest_kind = NotifyRequest_kind_segment | NotifyRequest_kind_transactional;
|
|
24
94
|
export type NotifyRequest = {
|
|
95
|
+
/**
|
|
96
|
+
* Optional idempotency key. When set, a repeated Notify with the same
|
|
97
|
+
* transaction_id (within the dedup TTL) does not resend the message and
|
|
98
|
+
* returns the original message_code. Mirrors legacy gateway transactionId.
|
|
99
|
+
*/
|
|
100
|
+
transactionId?: string;
|
|
25
101
|
kind: NotifyRequest_kind;
|
|
26
102
|
};
|
|
27
103
|
export type NotifyResponse = {
|
|
104
|
+
/** Result of the send. */
|
|
28
105
|
result: NotifyResult;
|
|
29
106
|
};
|
|
30
|
-
export type
|
|
31
|
-
|
|
107
|
+
export type NotifyResult = {
|
|
108
|
+
/** Code of the created message; use it with cancel, update and delete. */
|
|
109
|
+
messageCode: string;
|
|
110
|
+
/** Requested identifiers no device or user was found for. */
|
|
111
|
+
unknownIdentifiers: string[];
|
|
112
|
+
};
|
|
113
|
+
export type NotifyBatchRequest = {
|
|
114
|
+
/**
|
|
115
|
+
* At most 500 entries; the exact limit is server-configured. Items are
|
|
116
|
+
* processed concurrently, but results come back in request order.
|
|
117
|
+
*/
|
|
118
|
+
items?: NotifyBatchItem[];
|
|
32
119
|
};
|
|
33
|
-
export type
|
|
34
|
-
|
|
120
|
+
export type NotifyBatchItem = {
|
|
121
|
+
/**
|
|
122
|
+
* Caller-supplied correlation id, echoed back in the matching result and
|
|
123
|
+
* otherwise ignored. Optional.
|
|
124
|
+
*/
|
|
125
|
+
itemId: string;
|
|
126
|
+
/**
|
|
127
|
+
* Same body as a single Notify, transaction_id included. Setting
|
|
128
|
+
* transaction_id per item is what makes retrying a batch safe.
|
|
129
|
+
*/
|
|
130
|
+
request: NotifyRequest;
|
|
131
|
+
};
|
|
132
|
+
export type NotifyBatchResponse = {
|
|
133
|
+
/** One result per requested item, in the order the items were sent. */
|
|
134
|
+
results: NotifyBatchResult[];
|
|
135
|
+
/** Counts over results, so a caller can check the outcome without scanning. */
|
|
136
|
+
succeeded: number;
|
|
137
|
+
failed: number;
|
|
138
|
+
};
|
|
139
|
+
export type NotifyBatchResult = {
|
|
140
|
+
/** Echo of NotifyBatchItem.item_id. */
|
|
141
|
+
itemId: string;
|
|
142
|
+
/**
|
|
143
|
+
* Zero-based position of the item in the request, so results can be
|
|
144
|
+
* correlated even when item_id was left empty.
|
|
145
|
+
*/
|
|
146
|
+
index: number;
|
|
147
|
+
/** Set when the item succeeded. */
|
|
148
|
+
result: NotifyResult;
|
|
149
|
+
/** Set when the item failed. */
|
|
150
|
+
error: NotifyBatchError;
|
|
35
151
|
};
|
|
36
|
-
|
|
152
|
+
/**
|
|
153
|
+
* NotifyBatchError carries what a single Notify would have returned as a gRPC
|
|
154
|
+
* error. It mirrors google.rpc.Status, but is declared here and with the
|
|
155
|
+
* ErrorInfo detail flattened into plain fields: the TypeScript client generator
|
|
156
|
+
* resolves only google.protobuf.* imports, and a flat shape spares REST callers
|
|
157
|
+
* from unpacking an Any.
|
|
158
|
+
*/
|
|
159
|
+
export type NotifyBatchError = {
|
|
160
|
+
/** gRPC status code, as in google.rpc.Code. */
|
|
161
|
+
code: number;
|
|
162
|
+
/** Developer-facing message, in English. */
|
|
163
|
+
message: string;
|
|
164
|
+
/**
|
|
165
|
+
* Short name of the messaging status code, same value a single Notify puts
|
|
166
|
+
* into the ErrorInfo detail. Empty when the failure carried no ErrorInfo.
|
|
167
|
+
*/
|
|
168
|
+
reason: string;
|
|
169
|
+
/** Domain of the reason above. */
|
|
170
|
+
domain: string;
|
|
171
|
+
};
|
|
172
|
+
export type CancelRequest = {
|
|
173
|
+
/** Code of the message to cancel (as returned by Notify in NotifyResult.message_code). */
|
|
174
|
+
messageCode?: string;
|
|
175
|
+
};
|
|
176
|
+
export type CancelResponse = {};
|
|
177
|
+
export type UpdateRequest = {
|
|
178
|
+
/** Code of the message to update (as returned by Notify in NotifyResult.message_code). */
|
|
179
|
+
messageCode?: string;
|
|
180
|
+
/** Full new definition of the message. Same shape as Notify (full replace, not a patch). */
|
|
37
181
|
request?: NotifyRequest;
|
|
38
182
|
};
|
|
39
|
-
export type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
unknownIdentifiers: string[];
|
|
183
|
+
export type UpdateResponse = {
|
|
184
|
+
/** Result carries the (unchanged) message_code and any unknown identifiers. */
|
|
185
|
+
result: NotifyResult;
|
|
43
186
|
};
|
|
187
|
+
export type DeleteRequest = {
|
|
188
|
+
/** Code of the message to delete (as returned by Notify in NotifyResult.message_code). */
|
|
189
|
+
messageCode?: string;
|
|
190
|
+
};
|
|
191
|
+
export type DeleteResponse = {};
|
|
44
192
|
export type MessageType = 'MESSAGE_TYPE_UNSPECIFIED' | 'MESSAGE_TYPE_MARKETING' | 'MESSAGE_TYPE_TRANSACTIONAL';
|
|
45
|
-
|
|
193
|
+
/**
|
|
194
|
+
* RegistrationType controls whether destinations referenced by hwid / push token /
|
|
195
|
+
* user_id / email address / phone number that are NOT yet present in Pushwoosh
|
|
196
|
+
* should be created on the fly when the message is dispatched.
|
|
197
|
+
*
|
|
198
|
+
* Channel-agnostic: applies to email, SMS, WhatsApp, push tokens, hwids — anything
|
|
199
|
+
* the gateway tries to resolve to an existing device/user record.
|
|
200
|
+
*/
|
|
201
|
+
export type RegistrationType =
|
|
202
|
+
/** Use the application's default behaviour (skip unknown identifiers). */
|
|
203
|
+
'REGISTRATION_TYPE_DEFAULT'
|
|
204
|
+
/** Do not auto-create unknown identifiers; treat them as unknown. */
|
|
205
|
+
| 'REGISTRATION_TYPE_NONE'
|
|
206
|
+
/**
|
|
207
|
+
* Force-create a device/user record for every recipient identifier provided
|
|
208
|
+
* in the request, even if it is unknown to Pushwoosh.
|
|
209
|
+
*/
|
|
210
|
+
| 'REGISTRATION_TYPE_FORCE';
|
|
211
|
+
export type Platform = 'UNKNOWN' | 'IOS' | 'ANDROID' | 'OSX' | 'WINDOWS' | 'AMAZON' | 'SAFARI' | 'CHROME' | 'FIREFOX' | 'IE' | 'EMAIL' | 'FB_MESSENGER' | 'BAIDU_ANDROID' | 'HUAWEI_ANDROID' | 'SMS' | 'WEB' | 'WHATS_APP' | 'LINE' | 'KAKAO' | 'TELEGRAM' | 'APPLE_WALLET' | 'GOOGLE_WALLET' | 'VIBER';
|
|
46
212
|
export type NotifySegment_target_code = {
|
|
47
213
|
type: 'code';
|
|
48
214
|
data: string;
|
|
@@ -64,7 +230,15 @@ export type NotifySegment_messagePayload_emailPayload = {
|
|
|
64
230
|
type: 'emailPayload';
|
|
65
231
|
data: EmailPayload;
|
|
66
232
|
};
|
|
67
|
-
export type
|
|
233
|
+
export type NotifySegment_messagePayload_smsPayload = {
|
|
234
|
+
type: 'smsPayload';
|
|
235
|
+
data: SMSPayload;
|
|
236
|
+
};
|
|
237
|
+
export type NotifySegment_messagePayload_appInboxPayload = {
|
|
238
|
+
type: 'appInboxPayload';
|
|
239
|
+
data: AppInboxPayload;
|
|
240
|
+
};
|
|
241
|
+
export type NotifySegment_messagePayload = NotifySegment_messagePayload_payload | NotifySegment_messagePayload_emailPayload | NotifySegment_messagePayload_smsPayload | NotifySegment_messagePayload_appInboxPayload;
|
|
68
242
|
/**
|
|
69
243
|
* NotifySegment defines a request to send a message to a segment of users.
|
|
70
244
|
* Segment can be defined either by a segment code or by a seglang expression.
|
|
@@ -80,14 +254,29 @@ export type NotifySegment = {
|
|
|
80
254
|
frequencyCapping: FrequencyCapping;
|
|
81
255
|
/** Campaign code */
|
|
82
256
|
campaign: string;
|
|
257
|
+
/** Throttling for this message. */
|
|
83
258
|
sendRate: SendRate;
|
|
259
|
+
/** Free-form JSON stored with the message and echoed in tracking-log events. */
|
|
84
260
|
metaData: object;
|
|
261
|
+
/** Placeholder name to the value substituted into the message content. */
|
|
85
262
|
dynamicContentPlaceholders: Record<string, string>;
|
|
86
263
|
/**
|
|
87
264
|
* Message type: marketing or transactional.
|
|
88
265
|
* Used to control behavior like control group filtering.
|
|
89
266
|
*/
|
|
90
267
|
messageType: MessageType;
|
|
268
|
+
/** When true, sends only to the device with the most recent Last Application Open timestamp per user. */
|
|
269
|
+
useLatestUserDevice: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Control group to measure this message against, by group code or by group
|
|
272
|
+
* name. Empty uses the application's default control group.
|
|
273
|
+
*/
|
|
274
|
+
controlGroup: string;
|
|
275
|
+
/**
|
|
276
|
+
* Share of users held out of this send, 1..20, drawn into a control group of
|
|
277
|
+
* its own. Mutually exclusive with control_group.
|
|
278
|
+
*/
|
|
279
|
+
holdoutPercentage: number;
|
|
91
280
|
target: NotifySegment_target;
|
|
92
281
|
messagePayload: NotifySegment_messagePayload;
|
|
93
282
|
};
|
|
@@ -125,7 +314,15 @@ export type NotifyTransactional_messagePayload_emailPayload = {
|
|
|
125
314
|
type: 'emailPayload';
|
|
126
315
|
data: EmailPayload;
|
|
127
316
|
};
|
|
128
|
-
export type
|
|
317
|
+
export type NotifyTransactional_messagePayload_smsPayload = {
|
|
318
|
+
type: 'smsPayload';
|
|
319
|
+
data: SMSPayload;
|
|
320
|
+
};
|
|
321
|
+
export type NotifyTransactional_messagePayload_appInboxPayload = {
|
|
322
|
+
type: 'appInboxPayload';
|
|
323
|
+
data: AppInboxPayload;
|
|
324
|
+
};
|
|
325
|
+
export type NotifyTransactional_messagePayload = NotifyTransactional_messagePayload_payload | NotifyTransactional_messagePayload_emailPayload | NotifyTransactional_messagePayload_smsPayload | NotifyTransactional_messagePayload_appInboxPayload;
|
|
129
326
|
export type NotifyTransactional = {
|
|
130
327
|
/** Message schedule. */
|
|
131
328
|
schedule: Schedule;
|
|
@@ -142,8 +339,11 @@ export type NotifyTransactional = {
|
|
|
142
339
|
frequencyCapping: FrequencyCapping;
|
|
143
340
|
/** Campaign code */
|
|
144
341
|
campaign: string;
|
|
342
|
+
/** Throttling for this message. */
|
|
145
343
|
sendRate: SendRate;
|
|
344
|
+
/** Free-form JSON stored with the message and echoed in tracking-log events. */
|
|
146
345
|
metaData: object;
|
|
346
|
+
/** Placeholder name to the value substituted into the message content. */
|
|
147
347
|
dynamicContentPlaceholders: Record<string, string>;
|
|
148
348
|
/**
|
|
149
349
|
* Message type: marketing or transactional.
|
|
@@ -151,12 +351,24 @@ export type NotifyTransactional = {
|
|
|
151
351
|
*/
|
|
152
352
|
messageType: MessageType;
|
|
153
353
|
/**
|
|
154
|
-
*
|
|
354
|
+
* Global TTL. When set, it overrides per-platform TTL
|
|
155
355
|
* values and the preset-level TTL, and is applied uniformly across every
|
|
156
|
-
* push platform (iOS, Android, Huawei, Baidu, Chrome, macOS, Safari, Amazon,
|
|
157
|
-
* Windows).
|
|
356
|
+
* push platform (iOS, Android, Huawei, Baidu, Chrome, macOS, Safari, Amazon, Windows).
|
|
158
357
|
*/
|
|
159
358
|
ttl: Duration;
|
|
359
|
+
/** When true and target is Users, sends only to the device with the most recent Last Application Open timestamp. */
|
|
360
|
+
useLatestUserDevice: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Whether to auto-create unknown destination identifiers.
|
|
363
|
+
* See RegistrationType for semantics. Applies across channels (email, SMS, …).
|
|
364
|
+
*/
|
|
365
|
+
registrationType: RegistrationType;
|
|
366
|
+
/**
|
|
367
|
+
* Control group to measure this message against, by group code or by group
|
|
368
|
+
* name. Empty uses the application's default control group. Only has an
|
|
369
|
+
* effect on a marketing message: a transactional one is never held back.
|
|
370
|
+
*/
|
|
371
|
+
controlGroup: string;
|
|
160
372
|
target: NotifyTransactional_target;
|
|
161
373
|
messagePayload: NotifyTransactional_messagePayload;
|
|
162
374
|
};
|
|
@@ -184,28 +396,121 @@ export type Schedule = {
|
|
|
184
396
|
pastTimezonesBehaviour: Schedule_PastTimezonesBehaviour;
|
|
185
397
|
sendDate: Schedule_sendDate;
|
|
186
398
|
};
|
|
399
|
+
/** FrequencyCappingMode anchors the capping counting window. */
|
|
400
|
+
export type FrequencyCappingMode =
|
|
401
|
+
/** Rolling window: the last days*24 hours from the moment of sending. */
|
|
402
|
+
'FREQUENCY_CAPPING_MODE_DEFAULT'
|
|
403
|
+
/** Calendar days: the window starts at local midnight in the configured timezone. */
|
|
404
|
+
| 'FREQUENCY_CAPPING_MODE_CALENDAR_DAY';
|
|
187
405
|
/** Message frequency capping. */
|
|
188
406
|
export type FrequencyCapping = {
|
|
407
|
+
/** Length of the capping window in days; counted together with count. */
|
|
189
408
|
days: number;
|
|
409
|
+
/** How many messages a user may receive within the window. */
|
|
190
410
|
count: number;
|
|
411
|
+
/** Do not count this message towards the user's capping quota. */
|
|
191
412
|
exclude: boolean;
|
|
413
|
+
/** Ignore capping for this message and send it anyway. */
|
|
192
414
|
avoid: boolean;
|
|
415
|
+
/** How the counting window is anchored. Applies only together with explicit days and count. */
|
|
416
|
+
mode: FrequencyCappingMode;
|
|
417
|
+
/** IANA timezone name midnight is calculated in for the calendar day mode; empty means UTC. */
|
|
418
|
+
timezone: string;
|
|
193
419
|
};
|
|
194
420
|
export type SendRate = {
|
|
421
|
+
/** Messages per bucket; bounded by the account's send-rate restrictions. */
|
|
195
422
|
value: number;
|
|
423
|
+
/** Time window the value applies to, e.g. "1s". */
|
|
196
424
|
bucket: string;
|
|
425
|
+
/** Send at full speed, ignoring any configured send rate. */
|
|
197
426
|
avoid: boolean;
|
|
198
427
|
};
|
|
199
428
|
export type DeliveryPriority = 'NORMAL' | 'HIGH';
|
|
200
429
|
export type NotificationPriority = 'PRIORITY_UNSPECIFIED' | 'PRIORITY_MIN' | 'PRIORITY_LOW' | 'PRIORITY_DEFAULT' | 'PRIORITY_HIGH' | 'PRIORITY_MAX';
|
|
201
430
|
export type LiveActivity = {
|
|
431
|
+
/** Live Activity event: "start", "update" or "end". */
|
|
202
432
|
event: string;
|
|
433
|
+
/** Unix time after which an ended activity is dismissed. */
|
|
203
434
|
dismissalDate: number;
|
|
435
|
+
/** Dynamic ContentState of the activity. */
|
|
204
436
|
contentState: object;
|
|
437
|
+
/** Unix time after which the shown content counts as stale. */
|
|
438
|
+
staleDate: number;
|
|
439
|
+
/** Ordering hint when several activities compete for the same slot. */
|
|
440
|
+
relevanceScore: number;
|
|
441
|
+
/** Name of the ActivityAttributes type; required to start an activity. */
|
|
442
|
+
attributesType: string;
|
|
443
|
+
/** Static attributes passed when the activity starts. */
|
|
444
|
+
attributes: object;
|
|
445
|
+
/** Unix time the activity starts. */
|
|
446
|
+
start: number;
|
|
447
|
+
};
|
|
448
|
+
export type Stories_Page = {
|
|
449
|
+
/** URL of the full-screen image; required. */
|
|
450
|
+
image: string;
|
|
451
|
+
/** Seconds the page stays on screen; the SDK defaults to about 5. */
|
|
452
|
+
duration: number;
|
|
453
|
+
/** Text overlaid on the page. */
|
|
454
|
+
title: string;
|
|
455
|
+
/** Secondary text overlaid on the page. */
|
|
456
|
+
subtitle: string;
|
|
457
|
+
/** Deep link or URL the page button opens; the button needs it. */
|
|
458
|
+
link: string;
|
|
459
|
+
/** Title of the page button. */
|
|
460
|
+
buttonTitle: string;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Stories is the iOS push stories block the SDK Content Extension plays when the push is
|
|
464
|
+
* expanded. It reaches the device as `pw_stories` with the proto field names as keys.
|
|
465
|
+
*/
|
|
466
|
+
export type Stories = {
|
|
467
|
+
/** Pages in playback order, from 1 to 10. */
|
|
468
|
+
pages: Stories_Page[];
|
|
469
|
+
};
|
|
470
|
+
export type LiveUpdate_Operation = 'OPERATION_UNSPECIFIED' | 'OPERATION_START' | 'OPERATION_UPDATE' | 'OPERATION_END';
|
|
471
|
+
export type LiveUpdate_Segment = {
|
|
472
|
+
/** Segment color, hex. */
|
|
473
|
+
color: string;
|
|
474
|
+
/** Segment length in progress units. */
|
|
475
|
+
length: number;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* LiveUpdate is the Android Live Updates payload (Android 16 / API 36),
|
|
479
|
+
* the Android counterpart of LiveActivity. It is serialized with protojson
|
|
480
|
+
* into the android_live_update message property and emitted on the wire as a
|
|
481
|
+
* dedicated pw_live object (never via root_params). Declared top-level so that
|
|
482
|
+
* Huawei/Baidu can adopt it later with a one-line proto change; FCM only for now.
|
|
483
|
+
* The json_name annotations define the exact pw_live wire keys verbatim.
|
|
484
|
+
*/
|
|
485
|
+
export type LiveUpdate = {
|
|
486
|
+
/** required */
|
|
487
|
+
operation: LiveUpdate_Operation;
|
|
488
|
+
/** required */
|
|
489
|
+
id: string;
|
|
490
|
+
/** Current progress value. */
|
|
491
|
+
progress: number;
|
|
492
|
+
/** Show the progress bar without a known end. */
|
|
493
|
+
progressIndeterminate: boolean;
|
|
494
|
+
/** Whether a progress bar is shown at all. */
|
|
495
|
+
progressBar: boolean;
|
|
496
|
+
/** Colored segments the progress bar is split into. */
|
|
497
|
+
segments: LiveUpdate_Segment[];
|
|
498
|
+
/** Free-form data passed to the app with the update. */
|
|
499
|
+
extras: object;
|
|
500
|
+
/** Unix time the update refers to. */
|
|
501
|
+
when: number;
|
|
502
|
+
/** Render `when` as a running timer. */
|
|
503
|
+
chronometer: boolean;
|
|
504
|
+
/** Make the chronometer count down instead of up. */
|
|
505
|
+
chronometerCountDown: boolean;
|
|
506
|
+
/** Show the `when` timestamp on the notification. */
|
|
507
|
+
showWhen: boolean;
|
|
205
508
|
};
|
|
206
509
|
export type Link_Shortener = 'NONE' | 'BITLY';
|
|
207
510
|
export type Link = {
|
|
511
|
+
/** URL opened when the user taps the notification. */
|
|
208
512
|
url: string;
|
|
513
|
+
/** Link shortener applied to the URL: NONE or BITLY. */
|
|
209
514
|
shortener: Link_Shortener;
|
|
210
515
|
};
|
|
211
516
|
export type RichMedia_kind_code = {
|
|
@@ -221,9 +526,15 @@ export type RichMedia = {
|
|
|
221
526
|
kind: RichMedia_kind;
|
|
222
527
|
};
|
|
223
528
|
export type DeepLink = {
|
|
529
|
+
/** Deep link code configured in the Control Panel. */
|
|
224
530
|
code: string;
|
|
531
|
+
/** Parameters substituted into the deep link; values support Liquid. */
|
|
225
532
|
params: Record<string, string>;
|
|
226
533
|
};
|
|
534
|
+
export type WebPopup = {
|
|
535
|
+
/** Web popup (popup form content) code configured in the Control Panel. */
|
|
536
|
+
code: string;
|
|
537
|
+
};
|
|
227
538
|
export type OpenAction_kind_richMedia = {
|
|
228
539
|
type: 'richMedia';
|
|
229
540
|
data: RichMedia;
|
|
@@ -236,161 +547,307 @@ export type OpenAction_kind_link = {
|
|
|
236
547
|
type: 'link';
|
|
237
548
|
data: Link;
|
|
238
549
|
};
|
|
239
|
-
export type
|
|
550
|
+
export type OpenAction_kind_webPopup = {
|
|
551
|
+
type: 'webPopup';
|
|
552
|
+
data: WebPopup;
|
|
553
|
+
};
|
|
554
|
+
export type OpenAction_kind = OpenAction_kind_richMedia | OpenAction_kind_deepLink | OpenAction_kind_link | OpenAction_kind_webPopup;
|
|
240
555
|
export type OpenAction = {
|
|
241
556
|
kind: OpenAction_kind;
|
|
242
557
|
};
|
|
243
558
|
export type Inbox = {
|
|
559
|
+
/** Image shown in the Message Inbox entry. */
|
|
244
560
|
imageUrl: string;
|
|
561
|
+
/** When the entry is removed from the Message Inbox. */
|
|
245
562
|
expirationDate: Date;
|
|
246
563
|
};
|
|
564
|
+
export type Content_GlobalProperties = {
|
|
565
|
+
/** TTL applied to every platform block that has none of its own. */
|
|
566
|
+
timeToLive: Duration;
|
|
567
|
+
};
|
|
247
568
|
export type Content_PlatformPropertiesIos = {
|
|
569
|
+
/** Notification title. */
|
|
248
570
|
title: string;
|
|
571
|
+
/** Notification subtitle. */
|
|
249
572
|
subtitle: string;
|
|
573
|
+
/** Notification body text. */
|
|
250
574
|
body: string;
|
|
575
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
251
576
|
timeToLive: Duration;
|
|
577
|
+
/** Critical alert; requires the Apple critical-alerts entitlement. */
|
|
252
578
|
isCritical: boolean;
|
|
579
|
+
/** URL of a media attachment; needs the Notification Service Extension in the app. */
|
|
253
580
|
attachment: string;
|
|
581
|
+
/** Sound file name played on arrival. */
|
|
254
582
|
sound: string;
|
|
583
|
+
/** Thread identifier iOS groups notifications by. */
|
|
255
584
|
threadId: string;
|
|
585
|
+
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
256
586
|
badges: string;
|
|
587
|
+
/** Trim the content to fit the notification. */
|
|
257
588
|
trimContent: boolean;
|
|
589
|
+
/** UNNotificationCategory identifier holding the interactive actions. */
|
|
258
590
|
categoryId: string;
|
|
591
|
+
/** Enables or suppresses the notification sound. */
|
|
259
592
|
soundEnabled: boolean;
|
|
593
|
+
/** iOS interruption level: passive, active, time-sensitive or critical. */
|
|
260
594
|
interruptionLevel: string;
|
|
595
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
261
596
|
rootParams: object;
|
|
597
|
+
/** Live Activity payload. */
|
|
262
598
|
liveActivity: LiveActivity;
|
|
599
|
+
/** APNs collapse identifier: a newer notification replaces one with the same id. */
|
|
263
600
|
collapseId: string;
|
|
601
|
+
/** Message Inbox entry created for this notification. */
|
|
264
602
|
inbox: Inbox;
|
|
603
|
+
/** Id of the Live Activity this push starts or updates. */
|
|
604
|
+
liveActivityId: string;
|
|
605
|
+
/**
|
|
606
|
+
* APNs delivery priority: 10 delivers immediately, 5 lets iOS batch it.
|
|
607
|
+
* Live Activity updates default to 5 and stay silent until 10 is set here.
|
|
608
|
+
*/
|
|
609
|
+
apnsPriority: number;
|
|
610
|
+
/** Push stories shown when the notification is expanded; needs the SDK stories Content Extension. */
|
|
611
|
+
stories: Stories;
|
|
265
612
|
};
|
|
266
613
|
export type Content_PlatformPropertiesAndroid = {
|
|
614
|
+
/** Notification title. */
|
|
267
615
|
title: string;
|
|
616
|
+
/** Notification body text. */
|
|
268
617
|
body: string;
|
|
618
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
269
619
|
timeToLive: Duration;
|
|
620
|
+
/** Notification small icon. */
|
|
270
621
|
icon: string;
|
|
622
|
+
/** Big-picture image URL shown in the expanded notification. */
|
|
271
623
|
banner: string;
|
|
624
|
+
/** FCM delivery priority: NORMAL or HIGH. */
|
|
272
625
|
deliveryPriority: DeliveryPriority;
|
|
626
|
+
/** Vibrate when the notification arrives. */
|
|
273
627
|
vibration: boolean;
|
|
628
|
+
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
274
629
|
badges: string;
|
|
630
|
+
/** Sound file name played on arrival. */
|
|
275
631
|
sound: string;
|
|
632
|
+
/** Notification LED color, hex. */
|
|
276
633
|
ledColor: string;
|
|
634
|
+
/** Enables or suppresses the notification sound. */
|
|
277
635
|
soundEnabled: boolean;
|
|
636
|
+
/** Icon background color, hex. */
|
|
278
637
|
iconBackgroundColor: string;
|
|
638
|
+
/** Show the notification on the lock screen. */
|
|
279
639
|
showOnLockscreen: boolean;
|
|
640
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
280
641
|
rootParams: object;
|
|
642
|
+
/** URL of a large custom icon. */
|
|
281
643
|
customIcon: string;
|
|
644
|
+
/** In-tray notification priority. */
|
|
282
645
|
priority: NotificationPriority;
|
|
646
|
+
/** Notification group key the device stacks notifications by. */
|
|
283
647
|
groupId: string;
|
|
648
|
+
/** FCM collapse key: a newer notification replaces an undelivered one with the same key. */
|
|
284
649
|
collapseKey: string;
|
|
650
|
+
/** Message Inbox entry created for this notification. */
|
|
285
651
|
inbox: Inbox;
|
|
652
|
+
/** Android Live Updates payload (Android 16+, FCM only). */
|
|
653
|
+
liveUpdate: LiveUpdate;
|
|
286
654
|
};
|
|
287
655
|
export type Content_PlatformPropertiesChrome = {
|
|
656
|
+
/** Notification title. */
|
|
288
657
|
title: string;
|
|
658
|
+
/** Notification body text. */
|
|
289
659
|
body: string;
|
|
660
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
290
661
|
timeToLive: Duration;
|
|
662
|
+
/** Notification small icon. */
|
|
291
663
|
icon: string;
|
|
664
|
+
/** Large image URL. */
|
|
292
665
|
image: string;
|
|
666
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
293
667
|
rootParams: object;
|
|
668
|
+
/** Auto-close timer for the notification. */
|
|
294
669
|
duration: Duration;
|
|
670
|
+
/** Label of the first action button. */
|
|
295
671
|
buttonText1: string;
|
|
672
|
+
/** URL opened by the first action button. */
|
|
296
673
|
buttonUrl1: string;
|
|
674
|
+
/** Label of the second action button. */
|
|
297
675
|
buttonText2: string;
|
|
676
|
+
/** URL opened by the second action button. */
|
|
298
677
|
buttonUrl2: string;
|
|
678
|
+
/** Message Inbox entry created for this notification. */
|
|
299
679
|
inbox: Inbox;
|
|
300
680
|
};
|
|
301
681
|
export type Content_PlatformPropertiesFirefox = {
|
|
682
|
+
/** Notification title. */
|
|
302
683
|
title: string;
|
|
684
|
+
/** Notification body text. */
|
|
303
685
|
body: string;
|
|
686
|
+
/** Notification small icon. */
|
|
304
687
|
icon: string;
|
|
688
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
305
689
|
rootParams: object;
|
|
690
|
+
/** Message Inbox entry created for this notification. */
|
|
306
691
|
inbox: Inbox;
|
|
307
692
|
};
|
|
308
693
|
export type Content_PlatformPropertiesSafari = {
|
|
694
|
+
/** Notification title. */
|
|
309
695
|
title: string;
|
|
696
|
+
/** Notification body text. */
|
|
310
697
|
body: string;
|
|
698
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
311
699
|
timeToLive: Duration;
|
|
700
|
+
/** URL opened when the user clicks the notification. */
|
|
312
701
|
action: string;
|
|
702
|
+
/** Arguments substituted into the site's Web Push URL template. */
|
|
313
703
|
urlArguments: string[];
|
|
704
|
+
/** Message Inbox entry created for this notification. */
|
|
314
705
|
inbox: Inbox;
|
|
315
706
|
};
|
|
316
707
|
export type Content_PlatformPropertiesMacOS = {
|
|
708
|
+
/** Notification title. */
|
|
317
709
|
title: string;
|
|
710
|
+
/** Notification body text. */
|
|
318
711
|
body: string;
|
|
712
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
319
713
|
timeToLive: Duration;
|
|
714
|
+
/** URL opened when the user clicks the notification. */
|
|
320
715
|
action: string;
|
|
716
|
+
/** Sound file name played on arrival. */
|
|
321
717
|
sound: string;
|
|
718
|
+
/** Enables or suppresses the notification sound. */
|
|
322
719
|
soundEnabled: boolean;
|
|
720
|
+
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
323
721
|
badges: string;
|
|
722
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
324
723
|
rootParams: object;
|
|
724
|
+
/** Message Inbox entry created for this notification. */
|
|
325
725
|
inbox: Inbox;
|
|
726
|
+
/** Notification subtitle. */
|
|
326
727
|
subtitle: string;
|
|
327
728
|
};
|
|
328
729
|
export type Content_PlatformPropertiesAmazon = {
|
|
730
|
+
/** Notification title. */
|
|
329
731
|
title: string;
|
|
732
|
+
/** Notification body text. */
|
|
330
733
|
body: string;
|
|
734
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
331
735
|
timeToLive: Duration;
|
|
736
|
+
/** Big-picture image URL shown in the expanded notification. */
|
|
332
737
|
banner: string;
|
|
738
|
+
/** Sound file name played on arrival. */
|
|
333
739
|
sound: string;
|
|
740
|
+
/** Enables or suppresses the notification sound. */
|
|
334
741
|
soundEnabled: boolean;
|
|
742
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
335
743
|
rootParams: object;
|
|
744
|
+
/** Notification small icon. */
|
|
336
745
|
icon: string;
|
|
746
|
+
/** URL of a large custom icon. */
|
|
337
747
|
customIcon: string;
|
|
748
|
+
/** In-tray notification priority. */
|
|
338
749
|
priority: NotificationPriority;
|
|
750
|
+
/** Message Inbox entry created for this notification. */
|
|
339
751
|
inbox: Inbox;
|
|
340
752
|
};
|
|
341
753
|
export type Content_PlatformPropertiesBaiduAndroid = {
|
|
754
|
+
/** Notification title. */
|
|
342
755
|
title: string;
|
|
756
|
+
/** Notification body text. */
|
|
343
757
|
body: string;
|
|
758
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
344
759
|
timeToLive: Duration;
|
|
760
|
+
/** Notification small icon. */
|
|
345
761
|
icon: string;
|
|
762
|
+
/** Big-picture image URL shown in the expanded notification. */
|
|
346
763
|
banner: string;
|
|
764
|
+
/** FCM delivery priority: NORMAL or HIGH. */
|
|
347
765
|
deliveryPriority: DeliveryPriority;
|
|
766
|
+
/** Vibrate when the notification arrives. */
|
|
348
767
|
vibration: boolean;
|
|
768
|
+
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
349
769
|
badges: string;
|
|
770
|
+
/** Sound file name played on arrival. */
|
|
350
771
|
sound: string;
|
|
772
|
+
/** Notification LED color, hex. */
|
|
351
773
|
ledColor: string;
|
|
774
|
+
/** Enables or suppresses the notification sound. */
|
|
352
775
|
soundEnabled: boolean;
|
|
776
|
+
/** Icon background color, hex. */
|
|
353
777
|
iconBackgroundColor: string;
|
|
778
|
+
/** Show the notification on the lock screen. */
|
|
354
779
|
showOnLockscreen: boolean;
|
|
780
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
355
781
|
rootParams: object;
|
|
782
|
+
/** URL of a large custom icon. */
|
|
356
783
|
customIcon: string;
|
|
784
|
+
/** In-tray notification priority. */
|
|
357
785
|
priority: NotificationPriority;
|
|
786
|
+
/** Notification group key the device stacks notifications by. */
|
|
358
787
|
groupId: string;
|
|
788
|
+
/** Message Inbox entry created for this notification. */
|
|
359
789
|
inbox: Inbox;
|
|
360
790
|
};
|
|
361
791
|
export type Content_PlatformPropertiesHuaweiAndroid = {
|
|
792
|
+
/** Notification title. */
|
|
362
793
|
title: string;
|
|
794
|
+
/** Notification body text. */
|
|
363
795
|
body: string;
|
|
796
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
364
797
|
timeToLive: Duration;
|
|
798
|
+
/** Notification small icon. */
|
|
365
799
|
icon: string;
|
|
800
|
+
/** Big-picture image URL shown in the expanded notification. */
|
|
366
801
|
banner: string;
|
|
802
|
+
/** FCM delivery priority: NORMAL or HIGH. */
|
|
367
803
|
deliveryPriority: DeliveryPriority;
|
|
804
|
+
/** Vibrate when the notification arrives. */
|
|
368
805
|
vibration: boolean;
|
|
806
|
+
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
369
807
|
badges: string;
|
|
808
|
+
/** Sound file name played on arrival. */
|
|
370
809
|
sound: string;
|
|
810
|
+
/** Notification LED color, hex. */
|
|
371
811
|
ledColor: string;
|
|
812
|
+
/** Enables or suppresses the notification sound. */
|
|
372
813
|
soundEnabled: boolean;
|
|
814
|
+
/** Icon background color, hex. */
|
|
373
815
|
iconBackgroundColor: string;
|
|
816
|
+
/** Show the notification on the lock screen. */
|
|
374
817
|
showOnLockscreen: boolean;
|
|
818
|
+
/** Raw platform payload overrides merged into the outgoing push. */
|
|
375
819
|
rootParams: object;
|
|
820
|
+
/** URL of a large custom icon. */
|
|
376
821
|
customIcon: string;
|
|
822
|
+
/** In-tray notification priority. */
|
|
377
823
|
priority: NotificationPriority;
|
|
824
|
+
/** Notification group key the device stacks notifications by. */
|
|
378
825
|
groupId: string;
|
|
826
|
+
/** Message Inbox entry created for this notification. */
|
|
379
827
|
inbox: Inbox;
|
|
380
828
|
};
|
|
381
829
|
export type Content_PlatformPropertiesIE = {
|
|
830
|
+
/** Notification title. */
|
|
382
831
|
title: string;
|
|
832
|
+
/** Badge icon URL. */
|
|
383
833
|
iconBadge: string;
|
|
834
|
+
/** Notification body text. */
|
|
384
835
|
body: string;
|
|
836
|
+
/** Message Inbox entry created for this notification. */
|
|
385
837
|
inbox: Inbox;
|
|
386
838
|
};
|
|
387
839
|
export type Content_PlatformPropertiesWindows_Raw = {
|
|
840
|
+
/** Raw toast/tile XML sent to WNS as is. */
|
|
388
841
|
content: string;
|
|
389
842
|
};
|
|
390
843
|
export type Content_PlatformPropertiesWindows_Template = {
|
|
844
|
+
/** Notification title. */
|
|
391
845
|
title: string;
|
|
846
|
+
/** Notification subtitle. */
|
|
392
847
|
subtitle: string;
|
|
848
|
+
/** Notification body text. */
|
|
393
849
|
body: string;
|
|
850
|
+
/** Image shown in the notification. */
|
|
394
851
|
imageUrl: string;
|
|
395
852
|
};
|
|
396
853
|
export type Content_PlatformPropertiesWindows_Type = 'TILE' | 'TOAST' | 'BADGE';
|
|
@@ -404,24 +861,105 @@ export type Content_PlatformPropertiesWindows_content_template = {
|
|
|
404
861
|
};
|
|
405
862
|
export type Content_PlatformPropertiesWindows_content = Content_PlatformPropertiesWindows_content_raw | Content_PlatformPropertiesWindows_content_template;
|
|
406
863
|
export type Content_PlatformPropertiesWindows = {
|
|
864
|
+
/** Notification kind: TILE, TOAST or BADGE. */
|
|
407
865
|
type: Content_PlatformPropertiesWindows_Type;
|
|
866
|
+
/** WNS tag; a newer notification with the same tag replaces the previous one. */
|
|
408
867
|
tag: string;
|
|
868
|
+
/** Let WNS cache the notification for an offline device. */
|
|
409
869
|
cache: boolean;
|
|
870
|
+
/** How long the push service keeps the notification for a device that is offline. */
|
|
410
871
|
timeToLive: Duration;
|
|
411
872
|
content: Content_PlatformPropertiesWindows_content;
|
|
412
873
|
};
|
|
413
|
-
export type
|
|
874
|
+
export type Content_PlatformPropertiesAppInbox_CarouselSlide = {
|
|
875
|
+
imageUrl: string;
|
|
876
|
+
caption: string;
|
|
877
|
+
};
|
|
878
|
+
export type Content_PlatformPropertiesAppInbox = {
|
|
879
|
+
/** Title of the inbox entry. */
|
|
880
|
+
title: string;
|
|
881
|
+
/** Body of the inbox entry. */
|
|
882
|
+
body: string;
|
|
883
|
+
/** Small image shown next to the entry. */
|
|
884
|
+
iconUrl: string;
|
|
885
|
+
/** Large image shown inside the entry. */
|
|
886
|
+
bannerUrl: string;
|
|
887
|
+
/** Action performed when the user taps the entry. */
|
|
888
|
+
openAction: OpenAction;
|
|
889
|
+
/** Free-form JSON delivered to the SDK with the entry. */
|
|
890
|
+
customData: object;
|
|
891
|
+
/** Inbox cell layout: classic (default when empty), captioned, banner or carousel. */
|
|
892
|
+
layoutType: string;
|
|
893
|
+
/** Slides of the carousel layout. */
|
|
894
|
+
carousel: Content_PlatformPropertiesAppInbox_CarouselSlide[];
|
|
895
|
+
/** Per-platform override of open_action, keyed by the numeric platform code. */
|
|
896
|
+
openActions: Record<number, OpenAction>;
|
|
897
|
+
};
|
|
898
|
+
export type Content_PlatformPropertiesSMS = {
|
|
899
|
+
/** Notification body text. */
|
|
900
|
+
body: string;
|
|
901
|
+
/**
|
|
902
|
+
* MMS: a subject and attachment URLs turn the message into an MMS. Only providers with
|
|
903
|
+
* an MMS endpoint (AbleMobile) deliver them, the rest ignore both fields.
|
|
904
|
+
*/
|
|
905
|
+
subject: string;
|
|
906
|
+
fileUrls: string[];
|
|
907
|
+
/** Attachment index the body text is shown after; 0 means after the first attachment. */
|
|
908
|
+
messageAt: number;
|
|
909
|
+
};
|
|
414
910
|
export type Content_PlatformPropertiesTelegram = {
|
|
911
|
+
/** Message text. */
|
|
415
912
|
body: string;
|
|
913
|
+
/** JSON string with variables for the bot-side template. */
|
|
416
914
|
contentVariables: string;
|
|
417
915
|
};
|
|
916
|
+
export type Content_PlatformPropertiesFBMessenger = {
|
|
917
|
+
/** Message text. */
|
|
918
|
+
body: string;
|
|
919
|
+
/** JSON string with variables substituted into the body. */
|
|
920
|
+
contentVariables: string;
|
|
921
|
+
/**
|
|
922
|
+
* Meta message tag (CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE,
|
|
923
|
+
* HUMAN_AGENT). Required to reach a user outside the 24-hour messaging window.
|
|
924
|
+
*/
|
|
925
|
+
messageTag: string;
|
|
926
|
+
};
|
|
927
|
+
export type Content_PlatformPropertiesViber = {
|
|
928
|
+
/** Notification body text. */
|
|
929
|
+
body: string;
|
|
930
|
+
/**
|
|
931
|
+
* Transactional template (Omni Messaging / MStat): reference a pre-approved template by
|
|
932
|
+
* id + language with key/value params instead of a free-text body.
|
|
933
|
+
*/
|
|
934
|
+
templateId: string;
|
|
935
|
+
templateLang: string;
|
|
936
|
+
templateParams: Record<string, string>;
|
|
937
|
+
/**
|
|
938
|
+
* all_devices = false sends to the primary device (type 1701); true sends to all of the
|
|
939
|
+
* user's devices (type 1702). Unset == false == primary-only, so a plain bool is enough
|
|
940
|
+
* (no need to distinguish unset from false).
|
|
941
|
+
*/
|
|
942
|
+
allDevices: boolean;
|
|
943
|
+
/**
|
|
944
|
+
* Rich media (MStat types 107/108/109), ignored with template_id. image is a public URL;
|
|
945
|
+
* the button needs both caption and action (URL or viber:// deep link) and a body.
|
|
946
|
+
*/
|
|
947
|
+
image: string;
|
|
948
|
+
buttonCaption: string;
|
|
949
|
+
buttonAction: string;
|
|
950
|
+
};
|
|
418
951
|
export type Content_PlatformPropertiesKakao = {
|
|
952
|
+
/** Message text. */
|
|
419
953
|
content: string;
|
|
954
|
+
/** Code of the approved Kakao template. */
|
|
420
955
|
template: string;
|
|
956
|
+
/** JSON string with the template variable bindings. */
|
|
421
957
|
contentVariables: string;
|
|
422
958
|
};
|
|
423
959
|
export type Content_PlatformPropertiesLine = {
|
|
960
|
+
/** Plain text body. */
|
|
424
961
|
content: string;
|
|
962
|
+
/** Code of a LINE template configured in the Control Panel (image, carousel or flex message). */
|
|
425
963
|
template: string;
|
|
426
964
|
};
|
|
427
965
|
export type Content_PlatformPropertiesWhatsApp = {
|
|
@@ -446,8 +984,14 @@ export type Content_PlatformPropertiesWhatsApp = {
|
|
|
446
984
|
/** JSON string, map of template body placeholders (e.g. {"1":"John"}). */
|
|
447
985
|
contentVariables: string;
|
|
448
986
|
/**
|
|
449
|
-
* JSON string, map of button
|
|
450
|
-
* (
|
|
987
|
+
* JSON string, map of button placeholders keyed by the button's 0-based
|
|
988
|
+
* Meta index (its position among all of the template's buttons).
|
|
989
|
+
* A URL button uses the bare index as the key and its dynamic URL text as
|
|
990
|
+
* the value (e.g. {"0":"summer-sale"}). Buttons of other types encode the
|
|
991
|
+
* type in the key as "<index>:<type>": "<i>:coupon_code" for a COPY_CODE
|
|
992
|
+
* button (value = the coupon code), "<i>:CATALOG" (value = ""), "<i>:MPM"
|
|
993
|
+
* (value = JSON of product-section actions). A bare numeric key is sent as
|
|
994
|
+
* a URL button.
|
|
451
995
|
*/
|
|
452
996
|
buttonUrlVariables: string;
|
|
453
997
|
/**
|
|
@@ -455,25 +999,56 @@ export type Content_PlatformPropertiesWhatsApp = {
|
|
|
455
999
|
* (e.g. {"image":"https://..."}).
|
|
456
1000
|
*/
|
|
457
1001
|
headerVariables: string;
|
|
1002
|
+
/**
|
|
1003
|
+
* Public https link to one media file sent with `content` as its caption.
|
|
1004
|
+
* The media kind (image / document / video) is derived from the extension.
|
|
1005
|
+
*/
|
|
1006
|
+
attachment: string;
|
|
458
1007
|
};
|
|
459
1008
|
export type Content = {
|
|
1009
|
+
/** iOS push content. */
|
|
460
1010
|
ios: Content_PlatformPropertiesIos;
|
|
1011
|
+
/** Android (FCM) push content. */
|
|
461
1012
|
android: Content_PlatformPropertiesAndroid;
|
|
1013
|
+
/** macOS push content. */
|
|
462
1014
|
macOs: Content_PlatformPropertiesMacOS;
|
|
1015
|
+
/** Amazon (ADM) push content. */
|
|
463
1016
|
amazon: Content_PlatformPropertiesAmazon;
|
|
1017
|
+
/** Safari web push content. */
|
|
464
1018
|
safari: Content_PlatformPropertiesSafari;
|
|
1019
|
+
/** Chrome web push content. */
|
|
465
1020
|
chrome: Content_PlatformPropertiesChrome;
|
|
1021
|
+
/** Firefox web push content. */
|
|
466
1022
|
firefox: Content_PlatformPropertiesFirefox;
|
|
1023
|
+
/** Baidu Android push content. */
|
|
467
1024
|
baiduAndroid: Content_PlatformPropertiesBaiduAndroid;
|
|
1025
|
+
/** Huawei Android push content. */
|
|
468
1026
|
huaweiAndroid: Content_PlatformPropertiesHuaweiAndroid;
|
|
1027
|
+
/** Internet Explorer web push content. */
|
|
469
1028
|
ie: Content_PlatformPropertiesIE;
|
|
1029
|
+
/** Windows tile/toast/badge content. */
|
|
470
1030
|
windows: Content_PlatformPropertiesWindows;
|
|
1031
|
+
/** Telegram message content. */
|
|
471
1032
|
telegram: Content_PlatformPropertiesTelegram;
|
|
1033
|
+
/** Kakao message content. */
|
|
472
1034
|
kakao: Content_PlatformPropertiesKakao;
|
|
1035
|
+
/** LINE message content. */
|
|
473
1036
|
line: Content_PlatformPropertiesLine;
|
|
1037
|
+
/** WhatsApp message content. */
|
|
474
1038
|
whatsapp: Content_PlatformPropertiesWhatsApp;
|
|
1039
|
+
/** Settings applied to every platform block of this locale. */
|
|
1040
|
+
globalProperties: Content_GlobalProperties;
|
|
1041
|
+
/** SMS (and MMS) message content. */
|
|
1042
|
+
sms: Content_PlatformPropertiesSMS;
|
|
1043
|
+
/** Viber message content. */
|
|
1044
|
+
viber: Content_PlatformPropertiesViber;
|
|
1045
|
+
/** App Inbox message content. */
|
|
1046
|
+
appInbox: Content_PlatformPropertiesAppInbox;
|
|
1047
|
+
/** Facebook Messenger message content. */
|
|
1048
|
+
fbMessenger: Content_PlatformPropertiesFBMessenger;
|
|
475
1049
|
};
|
|
476
1050
|
export type LocalizedContent = {
|
|
1051
|
+
/** Locale code (ISO 639-1, "zh-Hant"/"zh-Hans", or "default") to the content sent to devices in that language. */
|
|
477
1052
|
localizedContent: Record<string, Content>;
|
|
478
1053
|
};
|
|
479
1054
|
export type Payload_kind_content = {
|
|
@@ -486,11 +1061,18 @@ export type Payload_kind_silent = {
|
|
|
486
1061
|
};
|
|
487
1062
|
export type Payload_kind = Payload_kind_content | Payload_kind_silent;
|
|
488
1063
|
export type Payload = {
|
|
1064
|
+
/** Push preset code (XXXXX-XXXXX) whose content this message starts from. */
|
|
489
1065
|
preset: string;
|
|
1066
|
+
/** Free-form JSON delivered to the SDK as the `u` parameter. */
|
|
490
1067
|
customData: object;
|
|
1068
|
+
/** Action performed when the user opens the notification. */
|
|
491
1069
|
openAction: OpenAction;
|
|
1070
|
+
/** Per-platform override of open_action, keyed by the numeric platform code. */
|
|
492
1071
|
openActions: Record<number, OpenAction>;
|
|
1072
|
+
/** Send as an iOS VoIP notification. */
|
|
493
1073
|
voipPush: boolean;
|
|
1074
|
+
/** Serial of the Apple Wallet pass to update; requires the APPLE_WALLET platform. */
|
|
1075
|
+
appleWalletPassSerial: string;
|
|
494
1076
|
kind: Payload_kind;
|
|
495
1077
|
};
|
|
496
1078
|
/** Email attachments. */
|
|
@@ -519,4 +1101,38 @@ export type EmailPayload = {
|
|
|
519
1101
|
replyTo: EmailPayload_Address;
|
|
520
1102
|
/** Email template code to use for this email, must reference an existing Email Template. */
|
|
521
1103
|
emailTemplate: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Email preset code. When set, messaging-api resolves the preset into
|
|
1106
|
+
* email_template + subject + from + reply_to (inline fields override the preset).
|
|
1107
|
+
*/
|
|
1108
|
+
emailPreset: string;
|
|
1109
|
+
};
|
|
1110
|
+
export type AppInboxPayload_expiration_expirationDate = {
|
|
1111
|
+
type: 'expirationDate';
|
|
1112
|
+
data: Date;
|
|
1113
|
+
};
|
|
1114
|
+
export type AppInboxPayload_expiration_expiresIn = {
|
|
1115
|
+
type: 'expiresIn';
|
|
1116
|
+
data: Duration;
|
|
1117
|
+
};
|
|
1118
|
+
export type AppInboxPayload_expiration = AppInboxPayload_expiration_expirationDate | AppInboxPayload_expiration_expiresIn;
|
|
1119
|
+
/** AppInboxPayload is a message of the App Inbox channel. */
|
|
1120
|
+
export type AppInboxPayload = {
|
|
1121
|
+
/**
|
|
1122
|
+
* preset references a saved App Inbox preset by code. When set, messaging-api resolves the
|
|
1123
|
+
* preset content into the per-language entry; inline content overrides the preset per language.
|
|
1124
|
+
*/
|
|
1125
|
+
preset: string;
|
|
1126
|
+
/** Per-locale content. The inbox entry is read from Content.app_inbox of each locale. */
|
|
1127
|
+
content: LocalizedContent;
|
|
1128
|
+
expiration: AppInboxPayload_expiration;
|
|
1129
|
+
};
|
|
1130
|
+
export type SMSPayload = {
|
|
1131
|
+
/**
|
|
1132
|
+
* preset references a saved SMS preset by code. When set, messaging-api resolves the
|
|
1133
|
+
* preset content into the per-language SMS body; inline content overrides the preset per language.
|
|
1134
|
+
*/
|
|
1135
|
+
preset: string;
|
|
1136
|
+
/** Per-locale SMS content. SMS body is read from Content.sms.body of each locale. */
|
|
1137
|
+
content: LocalizedContent;
|
|
522
1138
|
};
|