@pushwoosh/rpc-gateway-messaging 0.6.105 → 0.6.107
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 +136 -101
- package/index.d.ts +0 -2
- package/package.json +1 -1
- package/pushwoosh_channels_messagingApi_v2.d.ts +119 -45
package/data.js
CHANGED
|
@@ -1,105 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
/* Autogenerated code */
|
|
3
3
|
export const data = {
|
|
4
|
-
"pushwoosh.channels.messagingApi.v2.MessagesInProgressService": {
|
|
5
|
-
"type": "S",
|
|
6
|
-
"key": "messagesInProgress",
|
|
7
|
-
"methods": {}
|
|
8
|
-
},
|
|
9
|
-
"pushwoosh.channels.messagingApi.v2.MessageStalledStatusState": {
|
|
10
|
-
"type": "E",
|
|
11
|
-
"values": [
|
|
12
|
-
"MESSAGE_STATUS_STATE_UNKNOWN",
|
|
13
|
-
"MESSAGE_STATUS_STATE_ALIVE",
|
|
14
|
-
"MESSAGE_STATUS_STATE_STUCK",
|
|
15
|
-
"MESSAGE_STATUS_STATE_DEAD"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"pushwoosh.channels.messagingApi.v2.MessageStalled": {
|
|
19
|
-
"type": "I",
|
|
20
|
-
"fields": {
|
|
21
|
-
"messageCode": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"clientId": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"state": {
|
|
28
|
-
"type": "pushwoosh.channels.messagingApi.v2.MessageStalledStatusState"
|
|
29
|
-
},
|
|
30
|
-
"processed": {
|
|
31
|
-
"type": "number"
|
|
32
|
-
},
|
|
33
|
-
"isClientAlive": {
|
|
34
|
-
"type": "boolean"
|
|
35
|
-
},
|
|
36
|
-
"accountId": {
|
|
37
|
-
"type": "number"
|
|
38
|
-
},
|
|
39
|
-
"lastUpdated": {
|
|
40
|
-
"type": "Date"
|
|
41
|
-
},
|
|
42
|
-
"lastResend": {
|
|
43
|
-
"type": "Date"
|
|
44
|
-
},
|
|
45
|
-
"sendDate": {
|
|
46
|
-
"type": "Date"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"pushwoosh.channels.messagingApi.v2.ListRequest": {
|
|
51
|
-
"type": "I",
|
|
52
|
-
"fields": {}
|
|
53
|
-
},
|
|
54
|
-
"pushwoosh.channels.messagingApi.v2.ListResponse": {
|
|
55
|
-
"type": "I",
|
|
56
|
-
"fields": {
|
|
57
|
-
"messages": {
|
|
58
|
-
"type": "pushwoosh.channels.messagingApi.v2.MessageStalled",
|
|
59
|
-
"array": true
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"pushwoosh.channels.messagingApi.v2.GetStalledMessageRequest": {
|
|
64
|
-
"type": "I",
|
|
65
|
-
"fields": {
|
|
66
|
-
"messageCode": {
|
|
67
|
-
"type": "string"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"pushwoosh.channels.messagingApi.v2.GetStalledMessageResponse": {
|
|
72
|
-
"type": "I",
|
|
73
|
-
"fields": {
|
|
74
|
-
"message": {
|
|
75
|
-
"type": "pushwoosh.channels.messagingApi.v2.MessageStalled"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"pushwoosh.channels.messagingApi.v2.ResendMessageRequest": {
|
|
80
|
-
"type": "I",
|
|
81
|
-
"fields": {
|
|
82
|
-
"messageCode": {
|
|
83
|
-
"type": "string"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"pushwoosh.channels.messagingApi.v2.ResendMessageResponse": {
|
|
88
|
-
"type": "I",
|
|
89
|
-
"fields": {}
|
|
90
|
-
},
|
|
91
|
-
"pushwoosh.channels.messagingApi.v2.ClearMessageRequest": {
|
|
92
|
-
"type": "I",
|
|
93
|
-
"fields": {
|
|
94
|
-
"messageCode": {
|
|
95
|
-
"type": "string"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"pushwoosh.channels.messagingApi.v2.ClearMessageResponse": {
|
|
100
|
-
"type": "I",
|
|
101
|
-
"fields": {}
|
|
102
|
-
},
|
|
103
4
|
"pushwoosh.channels.messagingApi.v2.MessagingService": {
|
|
104
5
|
"type": "S",
|
|
105
6
|
"key": "messaging",
|
|
@@ -110,6 +11,12 @@ export const data = {
|
|
|
110
11
|
"method": "post",
|
|
111
12
|
"path": "/messaging/v2/notify"
|
|
112
13
|
},
|
|
14
|
+
"NotifyBatch": {
|
|
15
|
+
"request": "pushwoosh.channels.messagingApi.v2.NotifyBatchRequest",
|
|
16
|
+
"response": "pushwoosh.channels.messagingApi.v2.NotifyBatchResponse",
|
|
17
|
+
"method": "post",
|
|
18
|
+
"path": "/messaging/v2/notify/batch"
|
|
19
|
+
},
|
|
113
20
|
"Cancel": {
|
|
114
21
|
"request": "pushwoosh.channels.messagingApi.v2.CancelRequest",
|
|
115
22
|
"response": "pushwoosh.channels.messagingApi.v2.CancelResponse",
|
|
@@ -172,6 +79,75 @@ export const data = {
|
|
|
172
79
|
}
|
|
173
80
|
}
|
|
174
81
|
},
|
|
82
|
+
"pushwoosh.channels.messagingApi.v2.NotifyBatchRequest": {
|
|
83
|
+
"type": "I",
|
|
84
|
+
"fields": {
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "pushwoosh.channels.messagingApi.v2.NotifyBatchItem",
|
|
87
|
+
"array": true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"pushwoosh.channels.messagingApi.v2.NotifyBatchItem": {
|
|
92
|
+
"type": "I",
|
|
93
|
+
"fields": {
|
|
94
|
+
"itemId": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"request": {
|
|
98
|
+
"type": "pushwoosh.channels.messagingApi.v2.NotifyRequest"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"pushwoosh.channels.messagingApi.v2.NotifyBatchResponse": {
|
|
103
|
+
"type": "I",
|
|
104
|
+
"fields": {
|
|
105
|
+
"results": {
|
|
106
|
+
"type": "pushwoosh.channels.messagingApi.v2.NotifyBatchResult",
|
|
107
|
+
"array": true
|
|
108
|
+
},
|
|
109
|
+
"succeeded": {
|
|
110
|
+
"type": "number"
|
|
111
|
+
},
|
|
112
|
+
"failed": {
|
|
113
|
+
"type": "number"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"pushwoosh.channels.messagingApi.v2.NotifyBatchResult": {
|
|
118
|
+
"type": "I",
|
|
119
|
+
"fields": {
|
|
120
|
+
"itemId": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"index": {
|
|
124
|
+
"type": "number"
|
|
125
|
+
},
|
|
126
|
+
"result": {
|
|
127
|
+
"type": "pushwoosh.channels.messagingApi.v2.NotifyResult"
|
|
128
|
+
},
|
|
129
|
+
"error": {
|
|
130
|
+
"type": "pushwoosh.channels.messagingApi.v2.NotifyBatchError"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"pushwoosh.channels.messagingApi.v2.NotifyBatchError": {
|
|
135
|
+
"type": "I",
|
|
136
|
+
"fields": {
|
|
137
|
+
"code": {
|
|
138
|
+
"type": "number"
|
|
139
|
+
},
|
|
140
|
+
"message": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"reason": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"domain": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
175
151
|
"pushwoosh.channels.messagingApi.v2.CancelRequest": {
|
|
176
152
|
"type": "I",
|
|
177
153
|
"fields": {
|
|
@@ -289,6 +265,9 @@ export const data = {
|
|
|
289
265
|
"smsPayload": {
|
|
290
266
|
"type": "pushwoosh.channels.messagingApi.v2.SMSPayload"
|
|
291
267
|
},
|
|
268
|
+
"appInboxPayload": {
|
|
269
|
+
"type": "pushwoosh.channels.messagingApi.v2.AppInboxPayload"
|
|
270
|
+
},
|
|
292
271
|
"frequencyCapping": {
|
|
293
272
|
"type": "pushwoosh.channels.messagingApi.v2.FrequencyCapping"
|
|
294
273
|
},
|
|
@@ -327,7 +306,8 @@ export const data = {
|
|
|
327
306
|
"oneof": [
|
|
328
307
|
"payload",
|
|
329
308
|
"emailPayload",
|
|
330
|
-
"smsPayload"
|
|
309
|
+
"smsPayload",
|
|
310
|
+
"appInboxPayload"
|
|
331
311
|
]
|
|
332
312
|
}
|
|
333
313
|
}
|
|
@@ -393,6 +373,9 @@ export const data = {
|
|
|
393
373
|
"smsPayload": {
|
|
394
374
|
"type": "pushwoosh.channels.messagingApi.v2.SMSPayload"
|
|
395
375
|
},
|
|
376
|
+
"appInboxPayload": {
|
|
377
|
+
"type": "pushwoosh.channels.messagingApi.v2.AppInboxPayload"
|
|
378
|
+
},
|
|
396
379
|
"returnUnknownIdentifiers": {
|
|
397
380
|
"type": "boolean"
|
|
398
381
|
},
|
|
@@ -441,7 +424,8 @@ export const data = {
|
|
|
441
424
|
"oneof": [
|
|
442
425
|
"payload",
|
|
443
426
|
"emailPayload",
|
|
444
|
-
"smsPayload"
|
|
427
|
+
"smsPayload",
|
|
428
|
+
"appInboxPayload"
|
|
445
429
|
]
|
|
446
430
|
}
|
|
447
431
|
}
|
|
@@ -1202,6 +1186,29 @@ export const data = {
|
|
|
1202
1186
|
}
|
|
1203
1187
|
}
|
|
1204
1188
|
},
|
|
1189
|
+
"pushwoosh.channels.messagingApi.v2.Content.PlatformPropertiesAppInbox": {
|
|
1190
|
+
"type": "I",
|
|
1191
|
+
"fields": {
|
|
1192
|
+
"title": {
|
|
1193
|
+
"type": "string"
|
|
1194
|
+
},
|
|
1195
|
+
"body": {
|
|
1196
|
+
"type": "string"
|
|
1197
|
+
},
|
|
1198
|
+
"iconUrl": {
|
|
1199
|
+
"type": "string"
|
|
1200
|
+
},
|
|
1201
|
+
"bannerUrl": {
|
|
1202
|
+
"type": "string"
|
|
1203
|
+
},
|
|
1204
|
+
"openAction": {
|
|
1205
|
+
"type": "pushwoosh.channels.messagingApi.v2.OpenAction"
|
|
1206
|
+
},
|
|
1207
|
+
"customData": {
|
|
1208
|
+
"type": "object"
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1205
1212
|
"pushwoosh.channels.messagingApi.v2.Content.PlatformPropertiesSMS": {
|
|
1206
1213
|
"type": "I",
|
|
1207
1214
|
"fields": {
|
|
@@ -1359,6 +1366,9 @@ export const data = {
|
|
|
1359
1366
|
},
|
|
1360
1367
|
"viber": {
|
|
1361
1368
|
"type": "pushwoosh.channels.messagingApi.v2.Content.PlatformPropertiesViber"
|
|
1369
|
+
},
|
|
1370
|
+
"appInbox": {
|
|
1371
|
+
"type": "pushwoosh.channels.messagingApi.v2.Content.PlatformPropertiesAppInbox"
|
|
1362
1372
|
}
|
|
1363
1373
|
}
|
|
1364
1374
|
},
|
|
@@ -1462,6 +1472,31 @@ export const data = {
|
|
|
1462
1472
|
}
|
|
1463
1473
|
}
|
|
1464
1474
|
},
|
|
1475
|
+
"pushwoosh.channels.messagingApi.v2.AppInboxPayload": {
|
|
1476
|
+
"type": "I",
|
|
1477
|
+
"fields": {
|
|
1478
|
+
"preset": {
|
|
1479
|
+
"type": "string"
|
|
1480
|
+
},
|
|
1481
|
+
"content": {
|
|
1482
|
+
"type": "pushwoosh.channels.messagingApi.v2.LocalizedContent"
|
|
1483
|
+
},
|
|
1484
|
+
"expirationDate": {
|
|
1485
|
+
"type": "Date"
|
|
1486
|
+
},
|
|
1487
|
+
"expiresIn": {
|
|
1488
|
+
"type": "Duration"
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"oneofs": {
|
|
1492
|
+
"expiration": {
|
|
1493
|
+
"oneof": [
|
|
1494
|
+
"expirationDate",
|
|
1495
|
+
"expiresIn"
|
|
1496
|
+
]
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1465
1500
|
"pushwoosh.channels.messagingApi.v2.SMSPayload": {
|
|
1466
1501
|
"type": "I",
|
|
1467
1502
|
"fields": {
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { MessagesInProgressService as pushwoosh_channels_messagingApi_v2_MessagesInProgressService } from './pushwoosh_channels_messagingApi_v2';
|
|
2
1
|
import { MessagingService as pushwoosh_channels_messagingApi_v2_MessagingService } from './pushwoosh_channels_messagingApi_v2';
|
|
3
2
|
import { FiltersCrudService as pushwoosh_objects_filters_v1_FiltersCrudService } from './pushwoosh_objects_filters_v1';
|
|
4
3
|
export type API = {
|
|
5
|
-
messagesInProgress: pushwoosh_channels_messagingApi_v2_MessagesInProgressService;
|
|
6
4
|
messaging: pushwoosh_channels_messagingApi_v2_MessagingService;
|
|
7
5
|
filtersCrud: pushwoosh_objects_filters_v1_FiltersCrudService;
|
|
8
6
|
};
|
package/package.json
CHANGED
|
@@ -1,55 +1,26 @@
|
|
|
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 = {};
|
|
46
3
|
export type MessagingService_Notify = RpcMethod<NotifyRequest, NotifyResponse>;
|
|
4
|
+
export type MessagingService_NotifyBatch = RpcMethod<NotifyBatchRequest, NotifyBatchResponse>;
|
|
47
5
|
export type MessagingService_Cancel = RpcMethod<CancelRequest, CancelResponse>;
|
|
48
6
|
export type MessagingService_Update = RpcMethod<UpdateRequest, UpdateResponse>;
|
|
49
7
|
export type MessagingService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
|
|
50
8
|
export interface MessagingService {
|
|
51
9
|
/** Notify creates a new message. Can be targeted to a segment or a list of users. */
|
|
52
10
|
Notify: MessagingService_Notify;
|
|
11
|
+
/**
|
|
12
|
+
* NotifyBatch creates several messages in one call. Every item is an
|
|
13
|
+
* independent Notify: it is validated, authorized and sent on its own, and it
|
|
14
|
+
* gets its own result. The call itself succeeds even when every item failed,
|
|
15
|
+
* so the caller must read the per-item results and not just the status code.
|
|
16
|
+
*
|
|
17
|
+
* Intended for callers that cannot issue concurrent requests. It is not
|
|
18
|
+
* faster than the same items sent in parallel through Notify.
|
|
19
|
+
*
|
|
20
|
+
* Public API only: the fan-out re-enters through the public port, so calling
|
|
21
|
+
* this on the private port fails with Unimplemented.
|
|
22
|
+
*/
|
|
23
|
+
NotifyBatch: MessagingService_NotifyBatch;
|
|
53
24
|
/**
|
|
54
25
|
* Cancel cancels a previously created message identified by message_code.
|
|
55
26
|
* Only messages in a cancelable state (pending, waiting, processing) can be canceled.
|
|
@@ -96,6 +67,65 @@ export type NotifyResult = {
|
|
|
96
67
|
/** Requested identifiers no device or user was found for. */
|
|
97
68
|
unknownIdentifiers: string[];
|
|
98
69
|
};
|
|
70
|
+
export type NotifyBatchRequest = {
|
|
71
|
+
/**
|
|
72
|
+
* At most 500 entries; the exact limit is server-configured. Items are
|
|
73
|
+
* processed concurrently, but results come back in request order.
|
|
74
|
+
*/
|
|
75
|
+
items: NotifyBatchItem[];
|
|
76
|
+
};
|
|
77
|
+
export type NotifyBatchItem = {
|
|
78
|
+
/**
|
|
79
|
+
* Caller-supplied correlation id, echoed back in the matching result and
|
|
80
|
+
* otherwise ignored. Optional.
|
|
81
|
+
*/
|
|
82
|
+
itemId: string;
|
|
83
|
+
/**
|
|
84
|
+
* Same body as a single Notify, transaction_id included. Setting
|
|
85
|
+
* transaction_id per item is what makes retrying a batch safe.
|
|
86
|
+
*/
|
|
87
|
+
request: NotifyRequest;
|
|
88
|
+
};
|
|
89
|
+
export type NotifyBatchResponse = {
|
|
90
|
+
/** One result per requested item, in the order the items were sent. */
|
|
91
|
+
results: NotifyBatchResult[];
|
|
92
|
+
/** Counts over results, so a caller can check the outcome without scanning. */
|
|
93
|
+
succeeded: number;
|
|
94
|
+
failed: number;
|
|
95
|
+
};
|
|
96
|
+
export type NotifyBatchResult = {
|
|
97
|
+
/** Echo of NotifyBatchItem.item_id. */
|
|
98
|
+
itemId: string;
|
|
99
|
+
/**
|
|
100
|
+
* Zero-based position of the item in the request, so results can be
|
|
101
|
+
* correlated even when item_id was left empty.
|
|
102
|
+
*/
|
|
103
|
+
index: number;
|
|
104
|
+
/** Set when the item succeeded. */
|
|
105
|
+
result: NotifyResult;
|
|
106
|
+
/** Set when the item failed. */
|
|
107
|
+
error: NotifyBatchError;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* NotifyBatchError carries what a single Notify would have returned as a gRPC
|
|
111
|
+
* error. It mirrors google.rpc.Status, but is declared here and with the
|
|
112
|
+
* ErrorInfo detail flattened into plain fields: the TypeScript client generator
|
|
113
|
+
* resolves only google.protobuf.* imports, and a flat shape spares REST callers
|
|
114
|
+
* from unpacking an Any.
|
|
115
|
+
*/
|
|
116
|
+
export type NotifyBatchError = {
|
|
117
|
+
/** gRPC status code, as in google.rpc.Code. */
|
|
118
|
+
code: number;
|
|
119
|
+
/** Developer-facing message, in English. */
|
|
120
|
+
message: string;
|
|
121
|
+
/**
|
|
122
|
+
* Short name of the messaging status code, same value a single Notify puts
|
|
123
|
+
* into the ErrorInfo detail. Empty when the failure carried no ErrorInfo.
|
|
124
|
+
*/
|
|
125
|
+
reason: string;
|
|
126
|
+
/** Domain of the reason above. */
|
|
127
|
+
domain: string;
|
|
128
|
+
};
|
|
99
129
|
export type CancelRequest = {
|
|
100
130
|
/** Code of the message to cancel (as returned by Notify in NotifyResult.message_code). */
|
|
101
131
|
messageCode: string;
|
|
@@ -161,7 +191,11 @@ export type NotifySegment_messagePayload_smsPayload = {
|
|
|
161
191
|
type: 'smsPayload';
|
|
162
192
|
data: SMSPayload;
|
|
163
193
|
};
|
|
164
|
-
export type
|
|
194
|
+
export type NotifySegment_messagePayload_appInboxPayload = {
|
|
195
|
+
type: 'appInboxPayload';
|
|
196
|
+
data: AppInboxPayload;
|
|
197
|
+
};
|
|
198
|
+
export type NotifySegment_messagePayload = NotifySegment_messagePayload_payload | NotifySegment_messagePayload_emailPayload | NotifySegment_messagePayload_smsPayload | NotifySegment_messagePayload_appInboxPayload;
|
|
165
199
|
/**
|
|
166
200
|
* NotifySegment defines a request to send a message to a segment of users.
|
|
167
201
|
* Segment can be defined either by a segment code or by a seglang expression.
|
|
@@ -236,7 +270,11 @@ export type NotifyTransactional_messagePayload_smsPayload = {
|
|
|
236
270
|
type: 'smsPayload';
|
|
237
271
|
data: SMSPayload;
|
|
238
272
|
};
|
|
239
|
-
export type
|
|
273
|
+
export type NotifyTransactional_messagePayload_appInboxPayload = {
|
|
274
|
+
type: 'appInboxPayload';
|
|
275
|
+
data: AppInboxPayload;
|
|
276
|
+
};
|
|
277
|
+
export type NotifyTransactional_messagePayload = NotifyTransactional_messagePayload_payload | NotifyTransactional_messagePayload_emailPayload | NotifyTransactional_messagePayload_smsPayload | NotifyTransactional_messagePayload_appInboxPayload;
|
|
240
278
|
export type NotifyTransactional = {
|
|
241
279
|
/** Message schedule. */
|
|
242
280
|
schedule: Schedule;
|
|
@@ -748,6 +786,20 @@ export type Content_PlatformPropertiesWindows = {
|
|
|
748
786
|
timeToLive: Duration;
|
|
749
787
|
content: Content_PlatformPropertiesWindows_content;
|
|
750
788
|
};
|
|
789
|
+
export type Content_PlatformPropertiesAppInbox = {
|
|
790
|
+
/** Title of the inbox entry. */
|
|
791
|
+
title: string;
|
|
792
|
+
/** Body of the inbox entry. */
|
|
793
|
+
body: string;
|
|
794
|
+
/** Small image shown next to the entry. */
|
|
795
|
+
iconUrl: string;
|
|
796
|
+
/** Large image shown inside the entry. */
|
|
797
|
+
bannerUrl: string;
|
|
798
|
+
/** Action performed when the user taps the entry. */
|
|
799
|
+
openAction: OpenAction;
|
|
800
|
+
/** Free-form JSON delivered to the SDK with the entry. */
|
|
801
|
+
customData: object;
|
|
802
|
+
};
|
|
751
803
|
export type Content_PlatformPropertiesSMS = {
|
|
752
804
|
/** Notification body text. */
|
|
753
805
|
body: string;
|
|
@@ -877,6 +929,8 @@ export type Content = {
|
|
|
877
929
|
sms: Content_PlatformPropertiesSMS;
|
|
878
930
|
/** Viber message content. */
|
|
879
931
|
viber: Content_PlatformPropertiesViber;
|
|
932
|
+
/** App Inbox message content. */
|
|
933
|
+
appInbox: Content_PlatformPropertiesAppInbox;
|
|
880
934
|
};
|
|
881
935
|
export type LocalizedContent = {
|
|
882
936
|
/** Locale code (ISO 639-1, "zh-Hant"/"zh-Hans", or "default") to the content sent to devices in that language. */
|
|
@@ -938,6 +992,26 @@ export type EmailPayload = {
|
|
|
938
992
|
*/
|
|
939
993
|
emailPreset: string;
|
|
940
994
|
};
|
|
995
|
+
export type AppInboxPayload_expiration_expirationDate = {
|
|
996
|
+
type: 'expirationDate';
|
|
997
|
+
data: Date;
|
|
998
|
+
};
|
|
999
|
+
export type AppInboxPayload_expiration_expiresIn = {
|
|
1000
|
+
type: 'expiresIn';
|
|
1001
|
+
data: Duration;
|
|
1002
|
+
};
|
|
1003
|
+
export type AppInboxPayload_expiration = AppInboxPayload_expiration_expirationDate | AppInboxPayload_expiration_expiresIn;
|
|
1004
|
+
/** AppInboxPayload is a message of the App Inbox channel. */
|
|
1005
|
+
export type AppInboxPayload = {
|
|
1006
|
+
/**
|
|
1007
|
+
* preset references a saved App Inbox preset by code. When set, messaging-api resolves the
|
|
1008
|
+
* preset content into the per-language entry; inline content overrides the preset per language.
|
|
1009
|
+
*/
|
|
1010
|
+
preset: string;
|
|
1011
|
+
/** Per-locale content. The inbox entry is read from Content.app_inbox of each locale. */
|
|
1012
|
+
content: LocalizedContent;
|
|
1013
|
+
expiration: AppInboxPayload_expiration;
|
|
1014
|
+
};
|
|
941
1015
|
export type SMSPayload = {
|
|
942
1016
|
/**
|
|
943
1017
|
* preset references a saved SMS preset by code. When set, messaging-api resolves the
|