@pushwoosh/rpc-gateway-messaging 0.6.219 → 0.6.221
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 +16 -4
- package/data.js +24 -18
- package/package.json +1 -1
- package/pushwoosh_channels_messagingApi_v2.d.ts +23 -19
package/commonTypes.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
export type Duration = number;
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/** Arbitrary JSON value (google.protobuf.Value). */
|
|
3
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
};
|
|
6
|
+
/** Arbitrary JSON object (google.protobuf.Struct). */
|
|
7
|
+
export type JsonObject = {
|
|
8
|
+
[key: string]: JsonValue;
|
|
9
|
+
};
|
|
10
|
+
/** Per-call options accepted by every method. */
|
|
11
|
+
export type RpcCallOptions = {
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
};
|
|
14
|
+
export type RpcMethod<Req, Res> = ((request: Req, options?: RpcCallOptions) => Promise<Res>) & {
|
|
15
|
+
safe(request: Req, options?: RpcCallOptions): Promise<[{
|
|
4
16
|
error: unknown;
|
|
5
17
|
}, null] | [null, Res]>;
|
|
6
18
|
};
|
|
7
|
-
export type RpcMethodV3<Req, Res, Err> = ((request: Req) => Promise<Res>) & {
|
|
8
|
-
safe(request: Req): Promise<[Err, null] | [null, Res]>;
|
|
19
|
+
export type RpcMethodV3<Req, Res, Err> = ((request: Req, options?: RpcCallOptions) => Promise<Res>) & {
|
|
20
|
+
safe(request: Req, options?: RpcCallOptions): Promise<[Err, null] | [null, Res]>;
|
|
9
21
|
parseError(e: unknown): Err;
|
|
10
22
|
};
|
package/data.js
CHANGED
|
@@ -313,7 +313,7 @@ export const data = {
|
|
|
313
313
|
"type": "pushwoosh.channels.messagingApi.v2.SendRate"
|
|
314
314
|
},
|
|
315
315
|
"metaData": {
|
|
316
|
-
"type": "
|
|
316
|
+
"type": "JsonObject"
|
|
317
317
|
},
|
|
318
318
|
"dynamicContentPlaceholders": {
|
|
319
319
|
"type": "string",
|
|
@@ -338,7 +338,7 @@ export const data = {
|
|
|
338
338
|
"type": "pushwoosh.channels.messagingApi.v2.MessageTypeSource"
|
|
339
339
|
},
|
|
340
340
|
"contentPlaceholders": {
|
|
341
|
-
"type": "
|
|
341
|
+
"type": "JsonObject"
|
|
342
342
|
},
|
|
343
343
|
"resend": {
|
|
344
344
|
"type": "pushwoosh.channels.messagingApi.v2.Resend"
|
|
@@ -463,7 +463,7 @@ export const data = {
|
|
|
463
463
|
"type": "pushwoosh.channels.messagingApi.v2.SendRate"
|
|
464
464
|
},
|
|
465
465
|
"metaData": {
|
|
466
|
-
"type": "
|
|
466
|
+
"type": "JsonObject"
|
|
467
467
|
},
|
|
468
468
|
"dynamicContentPlaceholders": {
|
|
469
469
|
"type": "string",
|
|
@@ -491,7 +491,7 @@ export const data = {
|
|
|
491
491
|
"type": "pushwoosh.channels.messagingApi.v2.MessageTypeSource"
|
|
492
492
|
},
|
|
493
493
|
"contentPlaceholders": {
|
|
494
|
-
"type": "
|
|
494
|
+
"type": "JsonObject"
|
|
495
495
|
},
|
|
496
496
|
"resend": {
|
|
497
497
|
"type": "pushwoosh.channels.messagingApi.v2.Resend"
|
|
@@ -671,7 +671,7 @@ export const data = {
|
|
|
671
671
|
"type": "number"
|
|
672
672
|
},
|
|
673
673
|
"contentState": {
|
|
674
|
-
"type": "
|
|
674
|
+
"type": "JsonObject"
|
|
675
675
|
},
|
|
676
676
|
"staleDate": {
|
|
677
677
|
"type": "number"
|
|
@@ -683,7 +683,7 @@ export const data = {
|
|
|
683
683
|
"type": "string"
|
|
684
684
|
},
|
|
685
685
|
"attributes": {
|
|
686
|
-
"type": "
|
|
686
|
+
"type": "JsonObject"
|
|
687
687
|
},
|
|
688
688
|
"start": {
|
|
689
689
|
"type": "number"
|
|
@@ -765,7 +765,7 @@ export const data = {
|
|
|
765
765
|
"array": true
|
|
766
766
|
},
|
|
767
767
|
"extras": {
|
|
768
|
-
"type": "
|
|
768
|
+
"type": "JsonObject"
|
|
769
769
|
},
|
|
770
770
|
"when": {
|
|
771
771
|
"type": "number"
|
|
@@ -918,6 +918,9 @@ export const data = {
|
|
|
918
918
|
},
|
|
919
919
|
"expiresIn": {
|
|
920
920
|
"type": "Duration"
|
|
921
|
+
},
|
|
922
|
+
"tab": {
|
|
923
|
+
"type": "string"
|
|
921
924
|
}
|
|
922
925
|
}
|
|
923
926
|
},
|
|
@@ -972,7 +975,7 @@ export const data = {
|
|
|
972
975
|
"type": "string"
|
|
973
976
|
},
|
|
974
977
|
"rootParams": {
|
|
975
|
-
"type": "
|
|
978
|
+
"type": "JsonObject"
|
|
976
979
|
},
|
|
977
980
|
"liveActivity": {
|
|
978
981
|
"type": "pushwoosh.channels.messagingApi.v2.LiveActivity"
|
|
@@ -1040,7 +1043,7 @@ export const data = {
|
|
|
1040
1043
|
"type": "boolean"
|
|
1041
1044
|
},
|
|
1042
1045
|
"rootParams": {
|
|
1043
|
-
"type": "
|
|
1046
|
+
"type": "JsonObject"
|
|
1044
1047
|
},
|
|
1045
1048
|
"customIcon": {
|
|
1046
1049
|
"type": "string"
|
|
@@ -1084,7 +1087,7 @@ export const data = {
|
|
|
1084
1087
|
"type": "string"
|
|
1085
1088
|
},
|
|
1086
1089
|
"rootParams": {
|
|
1087
|
-
"type": "
|
|
1090
|
+
"type": "JsonObject"
|
|
1088
1091
|
},
|
|
1089
1092
|
"duration": {
|
|
1090
1093
|
"type": "Duration"
|
|
@@ -1119,7 +1122,7 @@ export const data = {
|
|
|
1119
1122
|
"type": "string"
|
|
1120
1123
|
},
|
|
1121
1124
|
"rootParams": {
|
|
1122
|
-
"type": "
|
|
1125
|
+
"type": "JsonObject"
|
|
1123
1126
|
},
|
|
1124
1127
|
"inbox": {
|
|
1125
1128
|
"type": "pushwoosh.channels.messagingApi.v2.Inbox"
|
|
@@ -1175,7 +1178,7 @@ export const data = {
|
|
|
1175
1178
|
"type": "string"
|
|
1176
1179
|
},
|
|
1177
1180
|
"rootParams": {
|
|
1178
|
-
"type": "
|
|
1181
|
+
"type": "JsonObject"
|
|
1179
1182
|
},
|
|
1180
1183
|
"inbox": {
|
|
1181
1184
|
"type": "pushwoosh.channels.messagingApi.v2.Inbox"
|
|
@@ -1207,7 +1210,7 @@ export const data = {
|
|
|
1207
1210
|
"type": "boolean"
|
|
1208
1211
|
},
|
|
1209
1212
|
"rootParams": {
|
|
1210
|
-
"type": "
|
|
1213
|
+
"type": "JsonObject"
|
|
1211
1214
|
},
|
|
1212
1215
|
"icon": {
|
|
1213
1216
|
"type": "string"
|
|
@@ -1266,7 +1269,7 @@ export const data = {
|
|
|
1266
1269
|
"type": "boolean"
|
|
1267
1270
|
},
|
|
1268
1271
|
"rootParams": {
|
|
1269
|
-
"type": "
|
|
1272
|
+
"type": "JsonObject"
|
|
1270
1273
|
},
|
|
1271
1274
|
"customIcon": {
|
|
1272
1275
|
"type": "string"
|
|
@@ -1328,7 +1331,7 @@ export const data = {
|
|
|
1328
1331
|
"type": "boolean"
|
|
1329
1332
|
},
|
|
1330
1333
|
"rootParams": {
|
|
1331
|
-
"type": "
|
|
1334
|
+
"type": "JsonObject"
|
|
1332
1335
|
},
|
|
1333
1336
|
"customIcon": {
|
|
1334
1337
|
"type": "string"
|
|
@@ -1458,7 +1461,7 @@ export const data = {
|
|
|
1458
1461
|
"type": "pushwoosh.channels.messagingApi.v2.OpenAction"
|
|
1459
1462
|
},
|
|
1460
1463
|
"customData": {
|
|
1461
|
-
"type": "
|
|
1464
|
+
"type": "JsonObject"
|
|
1462
1465
|
},
|
|
1463
1466
|
"layoutType": {
|
|
1464
1467
|
"type": "string"
|
|
@@ -1748,7 +1751,7 @@ export const data = {
|
|
|
1748
1751
|
"type": "boolean"
|
|
1749
1752
|
},
|
|
1750
1753
|
"customData": {
|
|
1751
|
-
"type": "
|
|
1754
|
+
"type": "JsonObject"
|
|
1752
1755
|
},
|
|
1753
1756
|
"openAction": {
|
|
1754
1757
|
"type": "pushwoosh.channels.messagingApi.v2.OpenAction"
|
|
@@ -1876,6 +1879,9 @@ export const data = {
|
|
|
1876
1879
|
},
|
|
1877
1880
|
"expiresIn": {
|
|
1878
1881
|
"type": "Duration"
|
|
1882
|
+
},
|
|
1883
|
+
"tab": {
|
|
1884
|
+
"type": "string"
|
|
1879
1885
|
}
|
|
1880
1886
|
},
|
|
1881
1887
|
"oneofs": {
|
|
@@ -1894,7 +1900,7 @@ export const data = {
|
|
|
1894
1900
|
"type": "pushwoosh.channels.messagingApi.v2.RichMedia"
|
|
1895
1901
|
},
|
|
1896
1902
|
"customData": {
|
|
1897
|
-
"type": "
|
|
1903
|
+
"type": "JsonObject"
|
|
1898
1904
|
},
|
|
1899
1905
|
"timeToLive": {
|
|
1900
1906
|
"type": "Duration"
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RpcMethod, Duration } from './commonTypes';
|
|
1
|
+
import { RpcMethod, JsonObject, Duration } from './commonTypes';
|
|
2
2
|
import { FilterExpression as pushwoosh_objects_filters_v1_FilterExpression } from './pushwoosh_objects_filters_v1';
|
|
3
3
|
export type MessagingService_Notify = RpcMethod<NotifyRequest, NotifyResponse>;
|
|
4
4
|
export type MessagingService_NotifyBatch = RpcMethod<NotifyBatchRequest, NotifyBatchResponse>;
|
|
@@ -239,7 +239,7 @@ export type NotifySegment = {
|
|
|
239
239
|
/** Throttling for this message. */
|
|
240
240
|
sendRate: SendRate;
|
|
241
241
|
/** Free-form JSON stored with the message and echoed in tracking-log events. */
|
|
242
|
-
metaData:
|
|
242
|
+
metaData: JsonObject;
|
|
243
243
|
/** Placeholder name to the value substituted into the message content. */
|
|
244
244
|
dynamicContentPlaceholders: Record<string, string>;
|
|
245
245
|
/**
|
|
@@ -267,7 +267,7 @@ export type NotifySegment = {
|
|
|
267
267
|
/** Internal: where message_type came from, e.g. a journey default baked at publish; ignored for external requests. */
|
|
268
268
|
messageTypeSource: MessageTypeSource;
|
|
269
269
|
/** Placeholder name to the value substituted into the message content; wins over dynamic_content_placeholders on the same key. */
|
|
270
|
-
contentPlaceholders:
|
|
270
|
+
contentPlaceholders: JsonObject;
|
|
271
271
|
resend: Resend;
|
|
272
272
|
geoZone: GeoZone;
|
|
273
273
|
/** Application silent hours for this message. */
|
|
@@ -346,7 +346,7 @@ export type NotifyTransactional = {
|
|
|
346
346
|
/** Throttling for this message. */
|
|
347
347
|
sendRate: SendRate;
|
|
348
348
|
/** Free-form JSON stored with the message and echoed in tracking-log events. */
|
|
349
|
-
metaData:
|
|
349
|
+
metaData: JsonObject;
|
|
350
350
|
/** Placeholder name to the value substituted into the message content. */
|
|
351
351
|
dynamicContentPlaceholders: Record<string, string>;
|
|
352
352
|
/**
|
|
@@ -381,7 +381,7 @@ export type NotifyTransactional = {
|
|
|
381
381
|
/** Internal: where message_type came from, e.g. a journey default baked at publish; ignored for external requests. */
|
|
382
382
|
messageTypeSource: MessageTypeSource;
|
|
383
383
|
/** Placeholder name to the value substituted into the message content; wins over dynamic_content_placeholders on the same key. */
|
|
384
|
-
contentPlaceholders:
|
|
384
|
+
contentPlaceholders: JsonObject;
|
|
385
385
|
resend: Resend;
|
|
386
386
|
/** Application silent hours for this message. */
|
|
387
387
|
silentHours: SilentHoursOptions;
|
|
@@ -479,7 +479,7 @@ export type LiveActivity = {
|
|
|
479
479
|
/** Unix time after which an ended activity is dismissed. */
|
|
480
480
|
dismissalDate: number;
|
|
481
481
|
/** Dynamic ContentState of the activity. */
|
|
482
|
-
contentState:
|
|
482
|
+
contentState: JsonObject;
|
|
483
483
|
/** Unix time after which the shown content counts as stale. */
|
|
484
484
|
staleDate: number;
|
|
485
485
|
/** Ordering hint when several activities compete for the same slot. */
|
|
@@ -487,7 +487,7 @@ export type LiveActivity = {
|
|
|
487
487
|
/** Name of the ActivityAttributes type; required to start an activity. */
|
|
488
488
|
attributesType: string;
|
|
489
489
|
/** Static attributes passed when the activity starts. */
|
|
490
|
-
attributes:
|
|
490
|
+
attributes: JsonObject;
|
|
491
491
|
/** Unix time the activity starts. */
|
|
492
492
|
start: number;
|
|
493
493
|
};
|
|
@@ -542,7 +542,7 @@ export type LiveUpdate = {
|
|
|
542
542
|
/** Colored segments the progress bar is split into. */
|
|
543
543
|
segments: LiveUpdate_Segment[];
|
|
544
544
|
/** Free-form data passed to the app with the update. */
|
|
545
|
-
extras:
|
|
545
|
+
extras: JsonObject;
|
|
546
546
|
/** Unix time the update refers to. */
|
|
547
547
|
when: number;
|
|
548
548
|
/** Render `when` as a running timer. */
|
|
@@ -618,6 +618,8 @@ export type Inbox = {
|
|
|
618
618
|
expirationDate: Date;
|
|
619
619
|
/** How long after the send date the entry stays in the Message Inbox; ignored when expiration_date is set. */
|
|
620
620
|
expiresIn: Duration;
|
|
621
|
+
/** Inbox tab the entry is filed under, by tab code. Unset entries show in the "All" tab only. */
|
|
622
|
+
tab: string;
|
|
621
623
|
};
|
|
622
624
|
export type Content_GlobalProperties = {
|
|
623
625
|
/** TTL applied to every platform block that has none of its own. */
|
|
@@ -651,7 +653,7 @@ export type Content_PlatformPropertiesIos = {
|
|
|
651
653
|
/** iOS interruption level: passive, active, time-sensitive or critical. */
|
|
652
654
|
interruptionLevel: string;
|
|
653
655
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
654
|
-
rootParams:
|
|
656
|
+
rootParams: JsonObject;
|
|
655
657
|
/** Live Activity payload. */
|
|
656
658
|
liveActivity: LiveActivity;
|
|
657
659
|
/** APNs collapse identifier: a newer notification replaces one with the same id. */
|
|
@@ -697,7 +699,7 @@ export type Content_PlatformPropertiesAndroid = {
|
|
|
697
699
|
/** Show the notification on the lock screen. */
|
|
698
700
|
showOnLockscreen: boolean;
|
|
699
701
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
700
|
-
rootParams:
|
|
702
|
+
rootParams: JsonObject;
|
|
701
703
|
/** URL of a large custom icon. */
|
|
702
704
|
customIcon: string;
|
|
703
705
|
/** In-tray notification priority. */
|
|
@@ -724,7 +726,7 @@ export type Content_PlatformPropertiesChrome = {
|
|
|
724
726
|
/** Large image URL. */
|
|
725
727
|
image: string;
|
|
726
728
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
727
|
-
rootParams:
|
|
729
|
+
rootParams: JsonObject;
|
|
728
730
|
/** Auto-close timer for the notification. */
|
|
729
731
|
duration: Duration;
|
|
730
732
|
/** Label of the first action button. */
|
|
@@ -746,7 +748,7 @@ export type Content_PlatformPropertiesFirefox = {
|
|
|
746
748
|
/** Notification small icon. */
|
|
747
749
|
icon: string;
|
|
748
750
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
749
|
-
rootParams:
|
|
751
|
+
rootParams: JsonObject;
|
|
750
752
|
/** Message Inbox entry created for this notification. */
|
|
751
753
|
inbox: Inbox;
|
|
752
754
|
};
|
|
@@ -780,7 +782,7 @@ export type Content_PlatformPropertiesMacOS = {
|
|
|
780
782
|
/** Badge value: absolute ("5") or relative ("+1"). */
|
|
781
783
|
badges: string;
|
|
782
784
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
783
|
-
rootParams:
|
|
785
|
+
rootParams: JsonObject;
|
|
784
786
|
/** Message Inbox entry created for this notification. */
|
|
785
787
|
inbox: Inbox;
|
|
786
788
|
/** Notification subtitle. */
|
|
@@ -800,7 +802,7 @@ export type Content_PlatformPropertiesAmazon = {
|
|
|
800
802
|
/** Enables or suppresses the notification sound. */
|
|
801
803
|
soundEnabled: boolean;
|
|
802
804
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
803
|
-
rootParams:
|
|
805
|
+
rootParams: JsonObject;
|
|
804
806
|
/** Notification small icon. */
|
|
805
807
|
icon: string;
|
|
806
808
|
/** URL of a large custom icon. */
|
|
@@ -838,7 +840,7 @@ export type Content_PlatformPropertiesBaiduAndroid = {
|
|
|
838
840
|
/** Show the notification on the lock screen. */
|
|
839
841
|
showOnLockscreen: boolean;
|
|
840
842
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
841
|
-
rootParams:
|
|
843
|
+
rootParams: JsonObject;
|
|
842
844
|
/** URL of a large custom icon. */
|
|
843
845
|
customIcon: string;
|
|
844
846
|
/** In-tray notification priority. */
|
|
@@ -877,7 +879,7 @@ export type Content_PlatformPropertiesHuaweiAndroid = {
|
|
|
877
879
|
/** Show the notification on the lock screen. */
|
|
878
880
|
showOnLockscreen: boolean;
|
|
879
881
|
/** Raw platform payload overrides merged into the outgoing push. */
|
|
880
|
-
rootParams:
|
|
882
|
+
rootParams: JsonObject;
|
|
881
883
|
/** URL of a large custom icon. */
|
|
882
884
|
customIcon: string;
|
|
883
885
|
/** In-tray notification priority. */
|
|
@@ -949,7 +951,7 @@ export type Content_PlatformPropertiesAppInbox = {
|
|
|
949
951
|
/** Action performed when the user taps the entry. */
|
|
950
952
|
openAction: OpenAction;
|
|
951
953
|
/** Free-form JSON delivered to the SDK with the entry. */
|
|
952
|
-
customData:
|
|
954
|
+
customData: JsonObject;
|
|
953
955
|
/** Inbox cell layout: classic (default when empty), captioned, banner or carousel. */
|
|
954
956
|
layoutType: string;
|
|
955
957
|
/** Slides of the carousel layout. */
|
|
@@ -1173,7 +1175,7 @@ export type Payload = {
|
|
|
1173
1175
|
*/
|
|
1174
1176
|
preset: string;
|
|
1175
1177
|
/** Free-form JSON delivered to the SDK as the `u` parameter. */
|
|
1176
|
-
customData:
|
|
1178
|
+
customData: JsonObject;
|
|
1177
1179
|
/** Action performed when the user opens the notification. */
|
|
1178
1180
|
openAction: OpenAction;
|
|
1179
1181
|
/** Per-platform override of open_action, keyed by the numeric platform code. */
|
|
@@ -1260,13 +1262,15 @@ export type AppInboxPayload = {
|
|
|
1260
1262
|
preset: string;
|
|
1261
1263
|
/** Per-locale content. The inbox entry is read from Content.app_inbox of each locale. */
|
|
1262
1264
|
content: LocalizedContent;
|
|
1265
|
+
/** Inbox tab the entry is filed under, by tab code. Unset entries show in the "All" tab only. */
|
|
1266
|
+
tab: string;
|
|
1263
1267
|
expiration: AppInboxPayload_expiration;
|
|
1264
1268
|
};
|
|
1265
1269
|
export type InAppPayload = {
|
|
1266
1270
|
/** Rich media page to show: a code or a remote page URL. Required. */
|
|
1267
1271
|
richMedia: RichMedia;
|
|
1268
1272
|
/** Free-form JSON delivered to the SDK as the `u` parameter. */
|
|
1269
|
-
customData:
|
|
1273
|
+
customData: JsonObject;
|
|
1270
1274
|
/** How long the push service keeps the message for an offline device on iOS, Android and Huawei. */
|
|
1271
1275
|
timeToLive: Duration;
|
|
1272
1276
|
};
|