@azure/notification-hubs 2.0.1-alpha.20241111.1 → 2.0.1-alpha.20241113.1

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.
@@ -1,2636 +0,0 @@
1
- import type { ClientOptions } from '@azure-rest/core-client';
2
- import type { OperationOptions } from '@azure-rest/core-client';
3
- import type { OperationState } from '@azure/core-lro';
4
- import type { PollerLike } from '@azure/core-lro';
5
-
6
- /**
7
- * Represents an Amazon Device Messaging (ADM) based installation.
8
- */
9
- export declare interface AdmInstallation extends DeviceTokenInstallation {
10
- /**
11
- * The platform for the installation.
12
- */
13
- platform: "adm";
14
- }
15
-
16
- /**
17
- * Represents a native ADM notification message payload.
18
- */
19
- export declare interface AdmNativeMessage {
20
- /**
21
- * The notification payload to send with the message.
22
- */
23
- notification?: AdmNativeNotification;
24
- /**
25
- * The payload data to send with the message.
26
- */
27
- data?: Record<string, string>;
28
- /**
29
- * The priority of the msssage.
30
- */
31
- priority?: "normal" | "high";
32
- /**
33
- * This is an arbitrary string used to indicate that multiple messages are logically the same
34
- * and that ADM is allowed to drop previously enqueued messages in favor of this new one.
35
- */
36
- consolidationKey?: string;
37
- /**
38
- * The number of seconds that ADM should retain the message if the device is offline.
39
- */
40
- expiresAfter?: number;
41
- /**
42
- * This is a base-64-encoded MD5 checksum of the data parameter.
43
- */
44
- md5?: string;
45
- }
46
-
47
- /**
48
- * Describes ADM notification messages.
49
- */
50
- export declare interface AdmNativeNotification {
51
- /**
52
- * The notification's title.
53
- */
54
- title?: string;
55
- /**
56
- * The notification's body text.
57
- */
58
- body?: string;
59
- /**
60
- * The notification's icon.
61
- */
62
- icon?: string;
63
- /**
64
- * The notification's icon color, expressed in #rrggbb format.
65
- */
66
- color?: string;
67
- /**
68
- * The sound to play when the device receives the notification. Supports "default" or the filename of a sound resource bundled in the app.
69
- */
70
- sound?: string;
71
- /**
72
- * Identifier used to replace existing notifications in the notification drawer.
73
- */
74
- tag?: string;
75
- /**
76
- * The action associated with a user click on the notification.
77
- */
78
- click_action?: string;
79
- /**
80
- * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
81
- */
82
- body_loc_key?: string;
83
- /**
84
- * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.
85
- */
86
- body_loc_args?: string[];
87
- /**
88
- * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
89
- */
90
- title_loc_key?: string;
91
- /**
92
- * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.
93
- */
94
- title_loc_args?: string[];
95
- /**
96
- * The notification's channel id.
97
- */
98
- channel_id?: string;
99
- /**
100
- * Sets the "ticker" text, which is sent to accessibility services.
101
- */
102
- ticker?: string;
103
- /**
104
- * When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel.
105
- */
106
- sticky?: boolean;
107
- /**
108
- * Set the time that the event in the notification occurred. Must be a timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
109
- */
110
- event_time?: string;
111
- /**
112
- * Set whether or not this notification is relevant only to the current device.
113
- */
114
- local_only?: boolean;
115
- /**
116
- * Set the relative priority for this notification.
117
- */
118
- notification_priority?: number;
119
- /**
120
- * If set to true, use the Android framework's default sound for the notification.
121
- */
122
- default_sound?: boolean;
123
- /**
124
- * Set the Notification.visibility of the notification.
125
- */
126
- visibility?: number;
127
- /**
128
- * Sets the number of items this notification represents.
129
- */
130
- notification_count?: number;
131
- /**
132
- * Contains the URL of an image that is going to be displayed in a notification.
133
- */
134
- image?: string;
135
- }
136
-
137
- /**
138
- * Represents an Amazon Device Messaging (ADM) push notification.
139
- */
140
- export declare interface AdmNotification extends JsonNotification {
141
- /**
142
- * The platform for the push notification.
143
- */
144
- platform: "adm";
145
- }
146
-
147
- /**
148
- * Represents an ADM notification that can be sent to a device.
149
- */
150
- export declare interface AdmNotificationParams {
151
- /**
152
- * The body for the push notification.
153
- */
154
- body: string | AdmNativeMessage;
155
- /**
156
- * The headers to include for the push notification.
157
- */
158
- headers?: Record<string, string>;
159
- }
160
-
161
- /**
162
- * Describes an ADM Registration channel query.
163
- */
164
- export declare interface AdmRegistrationChannel {
165
- /**
166
- * The ADM Registration ID.
167
- */
168
- admRegistrationId: string;
169
- /**
170
- * The kind of the registration channel.
171
- */
172
- kind: "adm";
173
- }
174
-
175
- /**
176
- * Represents the description of the Amazon Device Messaging (ADM) registration.
177
- */
178
- export declare interface AdmRegistrationDescription extends AdmRegistrationDescriptionCommon {
179
- /**
180
- * The kind of the registration.
181
- */
182
- kind: "Adm";
183
- }
184
-
185
- export declare interface AdmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
186
- /**
187
- * The Amazon Device Messaging registration identifier.
188
- */
189
- admRegistrationId: string;
190
- }
191
-
192
- /**
193
- * Represents the description of the Amazon Device Messaging (ADM) template registration.
194
- */
195
- export declare interface AdmTemplateRegistrationDescription extends AdmTemplateRegistrationDescriptionCommon {
196
- /**
197
- * The kind of the registration.
198
- */
199
- kind: "AdmTemplate";
200
- }
201
-
202
- /**
203
- * Represents the description of the Amazon Device Messaging (ADM) template registration.
204
- */
205
- export declare interface AdmTemplateRegistrationDescriptionCommon extends AdmRegistrationDescriptionCommon, TemplateRegistrationDescription {
206
- }
207
-
208
- /**
209
- * Describes the types of APNs pushes.
210
- */
211
- export declare type ApnsPushTypes = "alert" | "background" | "voip" | "complication" | "fileprovider" | "mdm" | "location" | "liveactivity" | "pushtotalk";
212
-
213
- /**
214
- * Represents what is in the APNs alert body.
215
- */
216
- export declare interface AppleAlert {
217
- /**
218
- * The title of the notification. Apple Watch displays this string in the short look notification
219
- * interface. Specify a string that’s quickly understood by the user.
220
- */
221
- title?: string;
222
- /**
223
- * Additional information that explains the purpose of the notification.
224
- */
225
- subtitle?: string;
226
- /**
227
- * The content of the alert message.
228
- */
229
- body?: string;
230
- /**
231
- * The name of the launch image file to display. If the user chooses to launch your app,
232
- * the contents of the specified image or storyboard file are displayed instead of your app’s normal launch image.
233
- */
234
- "launch-image"?: string;
235
- /**
236
- * The key for a localized title string. Specify this key instead of the title key to retrieve
237
- * the title from your app’s Localizable.strings files. The value must contain the name of a key in your strings file.
238
- */
239
- "title-loc-key"?: string;
240
- /**
241
- * An array of strings containing replacement values for variables in your title string.
242
- * Each %\@ character in the string specified by the title-loc-key is replaced by a value
243
- * from this array. The first item in the array replaces the first instance
244
- * of the %\@ character in the string, the second item replaces the second instance, and so on.
245
- */
246
- "title-loc-args"?: string[];
247
- /**
248
- * The key for a localized subtitle string. Use this key, instead of the subtitle key, to
249
- * retrieve the subtitle from your app’s Localizable.strings file.
250
- * The value must contain the name of a key in your strings file.
251
- */
252
- "subtitle-loc-key"?: string;
253
- /**
254
- * An array of strings containing replacement values for variables in your title string.
255
- * Each %\@ character in the string specified by subtitle-loc-key is replaced by a value
256
- * from this array. The first item in the array replaces the first instance of the
257
- * %\@ character in the string, the second item replaces the second instance, and so on.
258
- */
259
- "subtitle-loc-args"?: string[];
260
- /**
261
- * The key for a localized message string. Use this key, instead of the body key, to
262
- * retrieve the message text from your app’s Localizable.strings file. The value must contain
263
- * the name of a key in your strings file.
264
- */
265
- "loc-key"?: string;
266
- /**
267
- * An array of strings containing replacement values for variables in your message text.
268
- * Each %\@ character in the string specified by loc-key is replaced by a value from
269
- * this array. The first item in the array replaces the first instance of the %\@ character
270
- * in the string, the second item replaces the second instance, and so on.
271
- */
272
- "loc-args"?: string[];
273
- }
274
-
275
- /**
276
- * Represents a native APNs APS message.
277
- */
278
- export declare interface AppleApsNativeMessage extends Record<string, any> {
279
- /**
280
- * The information for displaying an alert.
281
- */
282
- alert?: string | AppleAlert;
283
- /**
284
- * The number to display in a badge on your app’s icon.
285
- */
286
- badge?: number;
287
- /**
288
- * The name of a sound file in your app’s main bundle or in the Library/Sounds
289
- * folder of your app’s container directory. Specify the string “default” to
290
- * play the system sound. Use this key for regular notifications.
291
- * For critical alerts, use the sound dictionary instead.
292
- */
293
- sound?: string | AppleCriticalSound;
294
- /**
295
- * An app-specific identifier for grouping related notifications.
296
- */
297
- "thread-id"?: string;
298
- /**
299
- * The notification’s type.
300
- */
301
- category?: string;
302
- /**
303
- * The background notification flag. To perform a silent background update,
304
- * specify the value 1 and don’t include the alert, badge, or sound keys in your payload.
305
- */
306
- "content-available"?: number;
307
- /**
308
- * The notification service app extension flag. If the value is 1, the system passes
309
- * the notification to your notification service app extension before delivery.
310
- */
311
- "mutable-content"?: number;
312
- /**
313
- * The identifier of the window brought forward.
314
- */
315
- "target-content-id"?: string;
316
- /**
317
- * The importance and delivery timing of a notification.
318
- */
319
- "interruption-level"?: "passive" | "active" | "time-sensitive" | "critical";
320
- /**
321
- * The relevance score, a number between 0 and 1, that the system uses to sort the
322
- * notifications from your app. The highest score gets featured in the notification summary.
323
- */
324
- "relevance-score"?: number;
325
- /**
326
- * The criteria the system evaluates to determine if it displays the notification in the current Focus.
327
- */
328
- "filter-criteria"?: string;
329
- /**
330
- * The UNIX timestamp that represents the date at which a Live Activity becomes stale, or out of date.
331
- */
332
- "stale-date"?: number;
333
- /**
334
- * The updated or final content for a Live Activity.
335
- */
336
- "content-state"?: Record<string, any>;
337
- /**
338
- * The UNIX timestamp that marks the time when you send the remote notification that updates or ends a Live Activity.
339
- */
340
- timestamp?: number;
341
- /**
342
- * The string that describes whether you update or end an ongoing Live Activity with the remote push notification. To update the Live Activity, use update. To end the Live Activity, use end.
343
- */
344
- events?: string;
345
- /**
346
- * The UNIX timestamp that represents the date at which the system ends a Live Activity and removes it from the Dynamic Island and the Lock Screen.
347
- */
348
- "dismissal-date"?: number;
349
- }
350
-
351
- /**
352
- * Represents an APNs critical sound
353
- */
354
- export declare interface AppleCriticalSound {
355
- /**
356
- * The critical alert flag. Set to 1 to enable the critical alert.
357
- */
358
- critical: number;
359
- /**
360
- * The name of a sound file in your app’s main bundle or in the Library/Sounds folder
361
- * of your app’s container directory. Specify the string “default” to play the system sound.
362
- */
363
- name: string;
364
- /**
365
- * The volume for the critical alert’s sound. Set this to a value between 0 (silent) and 1 (full volume).
366
- */
367
- volume: number;
368
- }
369
-
370
- /**
371
- * The list of APNs specific headers.
372
- */
373
- export declare interface AppleHeaders extends Record<string, unknown> {
374
- /**
375
- * The value of this header must accurately reflect the contents of your notification’s payload.
376
- */
377
- "apns-push-type"?: ApnsPushTypes;
378
- /**
379
- * A canonical UUID that’s the unique ID for the notification.
380
- */
381
- "apns-id"?: string;
382
- /**
383
- * The date at which the notification is no longer valid. This value is a UNIX epoch expressed in seconds (UTC).
384
- */
385
- "apns-expiration"?: string;
386
- /**
387
- * The priority of the notification. If you omit this header, APNs sets the notification priority to 10.
388
- */
389
- "apns-priority"?: "5" | "10";
390
- /**
391
- * The topic for the notification. In general, the topic is your app’s bundle ID/app ID.
392
- */
393
- "apns-topic"?: string;
394
- /**
395
- * An identifier you use to merge multiple notifications into a single notification for the user.
396
- */
397
- "apns-collapse-id"?: string;
398
- }
399
-
400
- /**
401
- * Represents an Apple APNs based installation.
402
- */
403
- export declare interface AppleInstallation extends DeviceTokenInstallation {
404
- /**
405
- * The platform for the installation.
406
- */
407
- platform: "apns";
408
- }
409
-
410
- /**
411
- * Represents a native APNs message.
412
- */
413
- export declare interface AppleNativeMessage extends Record<string, any> {
414
- /**
415
- * The Apple specific push notification information.
416
- */
417
- aps?: AppleApsNativeMessage;
418
- }
419
-
420
- /**
421
- * Represents an Apple APNs push notification.
422
- */
423
- export declare interface AppleNotification extends JsonNotification {
424
- /**
425
- * The platform for the push notification.
426
- */
427
- platform: "apple";
428
- }
429
-
430
- /**
431
- * Represents an Apple notification that can be sent to a device.
432
- */
433
- export declare interface AppleNotificationParams {
434
- /**
435
- * The body for the push notification.
436
- */
437
- body: string | AppleNativeMessage;
438
- /**
439
- * The headers to include for the push notification.
440
- */
441
- headers?: AppleHeaders;
442
- }
443
-
444
- /**
445
- * Describes an Apple Registration channel query.
446
- */
447
- export declare interface AppleRegistrationChannel {
448
- /**
449
- * The APNs device token.
450
- */
451
- deviceToken: string;
452
- /**
453
- * The kind of the registration channel.
454
- */
455
- kind: "apple";
456
- }
457
-
458
- /**
459
- * Represents the description of apple registration.
460
- */
461
- export declare interface AppleRegistrationDescription extends AppleRegistrationDescriptionCommon {
462
- /**
463
- * The kind of the registration.
464
- */
465
- kind: "Apple";
466
- }
467
-
468
- /**
469
- * Represents the description of apple registration.
470
- */
471
- export declare interface AppleRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
472
- /**
473
- * The APNs device token.
474
- */
475
- deviceToken: string;
476
- }
477
-
478
- /**
479
- * Represents the description of the Apple template registration.
480
- */
481
- export declare interface AppleTemplateRegistrationDescription extends AppleTemplateRegistrationDescriptionCommon {
482
- /**
483
- * The kind of the registration.
484
- */
485
- kind: "AppleTemplate";
486
- }
487
-
488
- /**
489
- * Represents the description of the Apple template registration.
490
- */
491
- export declare interface AppleTemplateRegistrationDescriptionCommon extends AppleRegistrationDescriptionCommon, TemplateRegistrationDescription {
492
- /**
493
- * The expiry date.
494
- */
495
- expiry?: Date;
496
- /**
497
- * The notification priority.
498
- */
499
- priority?: "10" | "5";
500
- /**
501
- * The APNS headers.
502
- */
503
- apnsHeaders?: Record<string, string>;
504
- }
505
-
506
- /**
507
- * Represents the Baidu Apple native payload.
508
- */
509
- export declare interface BaiduAppleNativePayload {
510
- /**
511
- * The alert string.
512
- */
513
- alert?: string;
514
- /**
515
- * The APNs sound to play.
516
- */
517
- sound?: string;
518
- /**
519
- * The APNs badge count.
520
- */
521
- badge?: number;
522
- }
523
-
524
- /**
525
- * Represents a Baidu based installation.
526
- */
527
- export declare interface BaiduInstallation extends DeviceTokenInstallation {
528
- /**
529
- * The platform for the installation.
530
- */
531
- platform: "baidu";
532
- }
533
-
534
- /**
535
- * Baidu Native Format:
536
- * https://stackoverflow.com/questions/42591815/customize-baidu-push-json-payload
537
- * http://www.tuicool.com/articles/ZnmANn
538
- */
539
- export declare interface BaiduNativeMessage extends Record<string, any> {
540
- /**
541
- * Notification title for Android.
542
- */
543
- title?: string;
544
- /**
545
- * Baidu Notification description for Android.
546
- */
547
- description?: string;
548
- /**
549
- * Baidu Notification builder ID.
550
- */
551
- notification_builder_id?: number;
552
- /**
553
- * Baidu Notification Android basic style.
554
- */
555
- notification_basic_style?: number;
556
- /**
557
- * Baidu Android open type.
558
- */
559
- open_type?: number;
560
- /**
561
- * Baidu Android net support option.
562
- */
563
- net_support?: number;
564
- /**
565
- * Baidu Android user confirm.
566
- */
567
- user_confirm?: number;
568
- /**
569
- * Baidu Android URL.
570
- */
571
- url?: string;
572
- /**
573
- * Baidu Android package content.
574
- */
575
- pkg_content?: string;
576
- /**
577
- * Baidu Android package version.
578
- */
579
- pkg_version?: string;
580
- /**
581
- * Baidu Android custom content dictionary.
582
- */
583
- custom_content?: Record<string, any>;
584
- /**
585
- * Baidu APNs support.
586
- */
587
- aps?: BaiduAppleNativePayload;
588
- }
589
-
590
- /**
591
- * Represents a Baidu push notification.
592
- */
593
- export declare interface BaiduNotification extends JsonNotification {
594
- /**
595
- * The platform for the push notification.
596
- */
597
- platform: "baidu";
598
- }
599
-
600
- /**
601
- * Describes an Baidu Registration channel query.
602
- */
603
- export declare interface BaiduRegistrationChannel {
604
- /**
605
- * The Baidu Channel ID.
606
- */
607
- baiduChannelId: string;
608
- /**
609
- * The Baidu User ID.
610
- */
611
- baiduUserId: string;
612
- /**
613
- * The kind of the registration channel.
614
- */
615
- kind: "baidu";
616
- }
617
-
618
- /**
619
- * Represents a Baidu registration description.
620
- */
621
- export declare interface BaiduRegistrationDescription extends BaiduRegistrationDescriptionCommon {
622
- /**
623
- * The kind of the registration.
624
- */
625
- kind: "Baidu";
626
- }
627
-
628
- export declare interface BaiduRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
629
- /**
630
- * The Baidu user identifier.
631
- */
632
- baiduUserId: string;
633
- /**
634
- * The Baidu channel identifier.
635
- */
636
- baiduChannelId: string;
637
- }
638
-
639
- /**
640
- * Represents a Baidu template registration description.
641
- */
642
- export declare interface BaiduTemplateRegistrationDescription extends BaiduTemplateRegistrationDescriptionCommon {
643
- /**
644
- * The kind of the registration.
645
- */
646
- kind: "BaiduTemplate";
647
- }
648
-
649
- /**
650
- * Represents a Baidu template registration description.
651
- */
652
- export declare interface BaiduTemplateRegistrationDescriptionCommon extends BaiduRegistrationDescriptionCommon, TemplateRegistrationDescription {
653
- }
654
-
655
- /**
656
- * Options for sending notifications for test send.
657
- */
658
- export declare interface BroadcastSendNotificationOptions extends OperationOptions {
659
- /**
660
- * Set to true to enable test send.
661
- */
662
- enableTestSend?: boolean;
663
- }
664
-
665
- /**
666
- * Represents a Browser/Web Push based installation.
667
- */
668
- export declare interface BrowserInstallation extends BrowserInstallationCommon {
669
- /**
670
- * The platform for the installation.
671
- */
672
- platform: "browser";
673
- }
674
-
675
- /**
676
- * Represents a Browser/Web Push based installation.
677
- */
678
- export declare interface BrowserInstallationCommon extends InstallationCommon {
679
- /**
680
- * The push channel for the Web Push API.
681
- */
682
- pushChannel: BrowserPushChannel;
683
- }
684
-
685
- /**
686
- * Represents a Browser push notification.
687
- */
688
- export declare interface BrowserNotification extends JsonNotification {
689
- /**
690
- * The platform for the push notification.
691
- */
692
- platform: "browser";
693
- }
694
-
695
- /**
696
- * Represents the push channel for a Browser Push installation.
697
- */
698
- export declare interface BrowserPushChannel {
699
- /**
700
- * The P256DH for the browser push installation.
701
- */
702
- p256dh: string;
703
- /**
704
- * The auth secret for the browser push installation.
705
- */
706
- auth: string;
707
- /**
708
- * The endpoint URL for the browser push installation.
709
- */
710
- endpoint: string;
711
- }
712
-
713
- /**
714
- * Describes an Browser Registration channel query.
715
- */
716
- export declare interface BrowserRegistrationChannel {
717
- /**
718
- * The Web Push endpoint URL.
719
- */
720
- endpoint: string;
721
- /**
722
- * The Web Push subscription P256DH.
723
- */
724
- p256dh: string;
725
- /**
726
- * The Web Push subscription auth secret.
727
- */
728
- auth: string;
729
- /**
730
- * The kind of the registration channel.
731
- */
732
- kind: "browser";
733
- }
734
-
735
- /**
736
- * Represents a Browser Push registration description.
737
- */
738
- export declare interface BrowserRegistrationDescription extends BrowserRegistrationDescriptionCommon {
739
- /**
740
- * The kind of the registration.
741
- */
742
- kind: "Browser";
743
- }
744
-
745
- /**
746
- * Represents a Browser Push registration description.
747
- */
748
- export declare interface BrowserRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
749
- /**
750
- * The Browser push endpoint.
751
- */
752
- endpoint: string;
753
- /**
754
- * The Browser push P256DH.
755
- */
756
- p256dh: string;
757
- /**
758
- * The Browser push auth secret.
759
- */
760
- auth: string;
761
- }
762
-
763
- /**
764
- * Represents a Browser Push remplate registration description.
765
- */
766
- export declare interface BrowserTemplateRegistrationDescription extends BrowserTemplateRegistrationDescriptionCommon {
767
- /**
768
- * The kind of the registration.
769
- */
770
- kind: "BrowserTemplate";
771
- }
772
-
773
- /**
774
- * Represents a Browser Push remplate registration description.
775
- */
776
- export declare interface BrowserTemplateRegistrationDescriptionCommon extends BrowserRegistrationDescriptionCommon, TemplateRegistrationDescription {
777
- }
778
-
779
- /**
780
- * Creates an Amazon Device Messaging (ADM) based installation.
781
- * @param installation - A partial installation used to create the ADM installation.
782
- * @returns The newly created ADM installation.
783
- */
784
- export declare function createAdmInstallation(installation: DeviceTokenInstallation): AdmInstallation;
785
-
786
- /**
787
- * Creates a notification to send to an Amazon Device Messaging device.
788
- * @param notification - A partial message used to create a message for Amazon Device Messaging.
789
- * @returns A newly created Amazon Device Messaging.
790
- */
791
- export declare function createAdmNotification(notification: AdmNotificationParams): AdmNotification;
792
-
793
- /**
794
- * Creates a AdmNotification from a native ADM payload.
795
- * @param nativeMessage - The native message payload to send to Notification Hubs.
796
- * @returns The AdmNotification to send to Notification Hubs.
797
- */
798
- export declare function createAdmNotificationBody(nativeMessage: AdmNativeMessage): string;
799
-
800
- /**
801
- * Creates an ADM registration description.
802
- * @param description - A partial ADM registration description.
803
- * @returns A created ADM registration description.
804
- */
805
- export declare function createAdmRegistrationDescription(description: AdmRegistrationDescriptionCommon): AdmRegistrationDescription;
806
-
807
- /**
808
- * Creates an ADM template registration description.
809
- * @param description - A partial ADM template registration description.
810
- * @returns A created ADM template registration description.
811
- */
812
- export declare function createAdmTemplateRegistrationDescription(description: AdmTemplateRegistrationDescriptionCommon): AdmTemplateRegistrationDescription;
813
-
814
- /**
815
- * Creates an Apple based installation.
816
- * @param installation - A partial installation used to create the Apple installation.
817
- * @returns The newly created Apple installation.
818
- */
819
- export declare function createAppleInstallation(installation: DeviceTokenInstallation): AppleInstallation;
820
-
821
- /**
822
- * Creates a notification to send to an Apple device.
823
- * @param notification - A partial message used to create a message for Apple.
824
- * @returns A newly created Apple.
825
- */
826
- export declare function createAppleNotification(notification: AppleNotificationParams): AppleNotification;
827
-
828
- /**
829
- * Creates an APNs native message to send to Notification Hubs.
830
- * @param nativeMessage - The Apple native message properties to set.
831
- * @param additionalProperties - Additional properties for Apple messages.
832
- * @returns An AppleNotification to send to Notification Hubs.
833
- */
834
- export declare function createAppleNotificationBody(nativeMessage: AppleNativeMessage): string;
835
-
836
- /**
837
- * Creates an Apple registration description.
838
- * @param description - A partial Apple registration description.
839
- * @returns A created Apple registration description.
840
- */
841
- export declare function createAppleRegistrationDescription(description: AppleRegistrationDescriptionCommon): AppleRegistrationDescription;
842
-
843
- /**
844
- * Creates an Apple template registration description.
845
- * @param description - A partial Apple template registration description.
846
- * @returns A created Apple template registration description.
847
- */
848
- export declare function createAppleTemplateRegistrationDescription(description: AppleTemplateRegistrationDescriptionCommon): AppleTemplateRegistrationDescription;
849
-
850
- /**
851
- * Creates a Baidu based installation.
852
- * @param installation - A partial installation used to create the Baidu installation.
853
- * @returns The newly created Baidu installation.
854
- */
855
- export declare function createBaiduInstallation(installation: DeviceTokenInstallation): BaiduInstallation;
856
-
857
- /**
858
- * Creates a notification to send to a Baidu registered device.
859
- * @param notification - A partial message used to create a message for Baidu.
860
- * @returns A newly created Baidu.
861
- */
862
- export declare function createBaiduNotification(notification: NotificationCommonParams): BaiduNotification;
863
-
864
- /**
865
- * Creates a BaiduNotification from a native Baidu payload.
866
- * @param nativeMessage - The native message payload to send to Notification Hubs.
867
- * @returns The JSON body to send to Notification Hubs.
868
- */
869
- export declare function createBaiduNotificationBody(nativeMessage: BaiduNativeMessage): string;
870
-
871
- /**
872
- * Creates a Baidu registration description.
873
- * @param description - A partial Baidu registration description.
874
- * @returns A created Baidu registration description.
875
- */
876
- export declare function createBaiduRegistrationDescription(description: BaiduRegistrationDescriptionCommon): BaiduRegistrationDescription;
877
-
878
- /**
879
- * Creates a Baidu template registration description.
880
- * @param description - A partial Baidu template registration description.
881
- * @returns A created Baidu template registration description.
882
- */
883
- export declare function createBaiduTemplateRegistrationDescription(description: BaiduTemplateRegistrationDescriptionCommon): BaiduTemplateRegistrationDescription;
884
-
885
- /**
886
- * Creates a Web Push based installation.
887
- * @param installation - A partial installation used to create the Web Push installation.
888
- * @returns The newly created Web Push installation.
889
- */
890
- export declare function createBrowserInstallation(installation: BrowserInstallationCommon): BrowserInstallation;
891
-
892
- /**
893
- * Creates a notification to send to a browser.
894
- * @param notification - A partial message used to create a message for a browser.
895
- * @returns A newly created Web Push browser.
896
- */
897
- export declare function createBrowserNotification(notification: NotificationCommonParams): BrowserNotification;
898
-
899
- /**
900
- * Creates a Web Push registration description.
901
- * @param description - A partial Web Push registration description.
902
- * @returns A created Web Push registration description.
903
- */
904
- export declare function createBrowserRegistrationDescription(description: BrowserRegistrationDescriptionCommon): BrowserRegistrationDescription;
905
-
906
- /**
907
- * Creates a Web Push registration description.
908
- * @param description - A partial Web Push template registration description.
909
- * @returns A created Web Push template registration description.
910
- */
911
- export declare function createBrowserTemplateRegistrationDescription(description: BrowserTemplateRegistrationDescriptionCommon): BrowserTemplateRegistrationDescription;
912
-
913
- /**
914
- * Creates a Firebase legacy HTTP based installation.
915
- * @param installation - A partial installation used to create the Firebase Legacy HTTP installation.
916
- * @returns The newly created Baidu installation.
917
- */
918
- export declare function createFcmLegacyInstallation(installation: DeviceTokenInstallation): FcmLegacyInstallation;
919
-
920
- /**
921
- * Creates a notification to send to Firebase.
922
- * @param notification - A partial message used to create a message for Firebase.
923
- * @returns A newly created Firebase notification.
924
- */
925
- export declare function createFcmLegacyNotification(notification: FcmLegacyNotificationParams): FcmLegacyNotification;
926
-
927
- /**
928
- * Creates a Firebase Legacy registration description.
929
- * @param description - A partial GCM registration description.
930
- * @returns A created GCM registration description.
931
- */
932
- export declare function createFcmLegacyRegistrationDescription(description: GcmRegistrationDescriptionCommon): GcmRegistrationDescription;
933
-
934
- /**
935
- * Creates a GCM template registration description.
936
- * @param description - A partial GCM template registration description.
937
- * @returns A created GCM template registration description.
938
- */
939
- export declare function createFcmLegacyTemplateRegistrationDescription(description: GcmTemplateRegistrationDescriptionCommon): GcmTemplateRegistrationDescription;
940
-
941
- /**
942
- * Creates an Firebase V1 Cloud Messaging based installation.
943
- * @param installation - A partial installation used to create the Firebase V1 Cloud Messaging installation.
944
- * @returns The newly created Firebase V1 Cloud Messaging installation.
945
- */
946
- export declare function createFcmV1Installation(installation: DeviceTokenInstallation): FcmV1Installation;
947
-
948
- /**
949
- * Creates a notification to send to Firebase.
950
- * @param notification - A partial message used to create a message for Firebase.
951
- * @returns A newly created Firebase notification.
952
- */
953
- export declare function createFcmV1Notification(notification: FcmV1NotificationParams): FcmV1Notification;
954
-
955
- /**
956
- * Creates a Firebase V1 registration description.
957
- * @param description - A partial FCM V1 registration description.
958
- * @returns A created FCM V1 registration description.
959
- */
960
- export declare function createFcmV1RegistrationDescription(description: FcmV1RegistrationDescriptionCommon): FcmV1RegistrationDescription;
961
-
962
- /**
963
- * Creates a FCM V1 template registration description.
964
- * @param description - A partial FCM V1 template registration description.
965
- * @returns A created FCM V1 template registration description.
966
- */
967
- export declare function createFcmV1TemplateRegistrationDescription(description: FcmV1TemplateRegistrationDescriptionCommon): FcmV1TemplateRegistrationDescription;
968
-
969
- /**
970
- * Creates a FcmLegacyNotification from a native Firebase payload.
971
- * @param nativeMessage - The native message payload to send to Notification Hubs.
972
- * @returns The JSON body to send to Notification Hubs.
973
- */
974
- export declare function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseLegacyNativeMessage): string;
975
-
976
- /**
977
- * Creates a FcmV1Notification from a native Firebase payload.
978
- * @param nativeMessage - The native message payload to send to Notification Hubs.
979
- * @returns The JSON body to send to Notification Hubs.
980
- */
981
- export declare function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
982
-
983
- /**
984
- * Creates a tag expression from a list of tags as a || expression.
985
- * @param tags - The tags to create the || expression
986
- * @returns The tag expression made from the array of strings into an || expression.
987
- */
988
- export declare function createTagExpression(tags: string[]): string;
989
-
990
- /**
991
- * Creates a template notification.
992
- * @param notification - A partial message used to be used for a template notification.
993
- * @returns A newly created Firebase.
994
- */
995
- export declare function createTemplateNotification(notification: NotificationCommonParams): TemplateNotification;
996
-
997
- /**
998
- * Creates a badge message to send to WNS.
999
- * @param notification - A partial message used to create a badge message for WNS.
1000
- * @returns A newly created WNS badge.
1001
- */
1002
- export declare function createWindowsBadgeNotification(notification: WnsNotificationParams): WindowsNotification;
1003
-
1004
- /**
1005
- * Builds a WindowsNotification from a Windows Badge.
1006
- * @param nativeMessage - The Windows Badge Message to build.
1007
- * @returns The WNS XML created with the badge information.
1008
- */
1009
- export declare function createWindowsBadgeNotificationBody(nativeMessage: WindowsBadgeNativeMessage): string;
1010
-
1011
- /**
1012
- * Creates a Windows Notification Services (WNS) based installation.
1013
- * @param installation - A partial installation used to create the WNS installation.
1014
- * @returns The newly created WNS installation.
1015
- */
1016
- export declare function createWindowsInstallation(installation: DeviceTokenInstallation): WindowsInstallation;
1017
-
1018
- /**
1019
- * Creates a notification to send to WNS.
1020
- * @param notification - The WNS notification to send.
1021
- * @returns A newly created WNS message.
1022
- */
1023
- export declare function createWindowsNotification(notification: WnsNotificationParams): WindowsNotification;
1024
-
1025
- /**
1026
- * Creates a notification to send to WNS in wns/raw format..
1027
- * @param notification - A partial message used to create a message for WNS in XML format.
1028
- * @returns A newly created WNS message using XML.
1029
- */
1030
- export declare function createWindowsRawNotification(notification: WnsNotificationParams): WindowsNotification;
1031
-
1032
- /**
1033
- * Creates a Windows registration description.
1034
- * @param description - A partial Windows registration description.
1035
- * @returns A created Windows registration description.
1036
- */
1037
- export declare function createWindowsRegistrationDescription(description: WindowsRegistrationDescriptionCommon): WindowsRegistrationDescription;
1038
-
1039
- /**
1040
- * Creates a Windows template registration description.
1041
- * @param description - A partial Windows template registration description.
1042
- * @returns A created Windows template registration description.
1043
- */
1044
- export declare function createWindowsTemplateRegistrationDescription(description: WindowsTemplateRegistrationDescriptionCommon): WindowsTemplateRegistrationDescription;
1045
-
1046
- /**
1047
- * Creates a tile message to send to WNS.
1048
- * @param notification - A partial message used to create a tile message for WNS.
1049
- * @returns A newly created WNS tile.
1050
- */
1051
- export declare function createWindowsTileNotification(notification: WnsNotificationParams): WindowsNotification;
1052
-
1053
- /**
1054
- * Creates a toast message to send to WNS.
1055
- * @param notification - A partial message used to create a toast message for WNS.
1056
- * @returns A newly created WNS toast.
1057
- */
1058
- export declare function createWindowsToastNotification(notification: WnsNotificationParams): WindowsNotification;
1059
-
1060
- /**
1061
- * Creates a Xiaomi based installation.
1062
- * @param installation - A partial installation used to create the Xiaomi installation.
1063
- * @returns The newly created Xiaomi installation.
1064
- */
1065
- export declare function createXiaomiInstallation(installation: DeviceTokenInstallation): XiaomiInstallation;
1066
-
1067
- /**
1068
- * Creates a notification to send to Xiaomi.
1069
- * @param notification - A partial message used to create a message for Xiaomi.
1070
- * @returns A newly created Xiaomi notification.
1071
- */
1072
- export declare function createXiaomiNotification(notification: NotificationCommonParams): XiaomiNotification;
1073
-
1074
- /**
1075
- * Creates a Xiaomi registration description.
1076
- * @param description - A partial Xiaomi registration description.
1077
- * @returns A created Xiaomi registration description.
1078
- */
1079
- export declare function createXiaomiRegistrationDescription(description: XiaomiRegistrationDescriptionCommon): XiaomiRegistrationDescription;
1080
-
1081
- /**
1082
- * Creates a Xiaomi template registration description.
1083
- * @param description - A partial Xiaomi template registration description.
1084
- * @returns A created Xiaomi template registration description.
1085
- */
1086
- export declare function createXiaomiTemplateRegistrationDescription(description: XiaomiTemplateRegistrationDescriptionCommon): XiaomiTemplateRegistrationDescription;
1087
-
1088
- /**
1089
- * Represents an installation with a string based device token.
1090
- */
1091
- export declare interface DeviceTokenInstallation extends InstallationCommon {
1092
- /**
1093
- * The push channel for a device.
1094
- */
1095
- pushChannel: string;
1096
- }
1097
-
1098
- /**
1099
- * Options for sending notifications to individual devices.
1100
- */
1101
- export declare interface DirectSendNotificationOptions extends OperationOptions {
1102
- /**
1103
- * The device handle to send the notification. If an array is provided, this uses batch direct send which is only available in Standard SKU and above.
1104
- */
1105
- deviceHandle: string | BrowserPushChannel | string[];
1106
- }
1107
-
1108
- /**
1109
- * Represents entity update operation options that can be set.
1110
- */
1111
- export declare interface EntityOperationOptions extends OperationOptions {
1112
- /**
1113
- * ETag as returned by creation, update, and retrieval, or ‘*’ (overwrite).
1114
- */
1115
- etag?: string;
1116
- }
1117
-
1118
- /**
1119
- * Represents a Firebase Legacy HTTP installation.
1120
- */
1121
- export declare interface FcmLegacyInstallation extends DeviceTokenInstallation {
1122
- /**
1123
- * The platform for the installation.
1124
- */
1125
- platform: "gcm";
1126
- }
1127
-
1128
- /**
1129
- * Represents a Firebase legacy HTTP push notification.
1130
- */
1131
- export declare interface FcmLegacyNotification extends JsonNotification {
1132
- /**
1133
- * The platform for the push notification.
1134
- */
1135
- platform: "gcm";
1136
- }
1137
-
1138
- /**
1139
- * Represents an Firebase Legacy notification that can be sent to a device.
1140
- */
1141
- export declare interface FcmLegacyNotificationParams {
1142
- /**
1143
- * The body for the push notification.
1144
- */
1145
- body: string | FirebaseLegacyNativeMessage;
1146
- /**
1147
- * The headers to include for the push notification.
1148
- */
1149
- headers?: Record<string, string>;
1150
- }
1151
-
1152
- /**
1153
- * Represents an Firebase V1 Cloud Messaging based installation.
1154
- */
1155
- export declare interface FcmV1Installation extends DeviceTokenInstallation {
1156
- /**
1157
- * The platform for the installation.
1158
- */
1159
- platform: "fcmv1";
1160
- }
1161
-
1162
- /**
1163
- * Represents an Firebase V1 API notification that can be sent to a device.
1164
- */
1165
- export declare interface FcmV1Notification extends JsonNotification {
1166
- /**
1167
- * The platform for the push notification.
1168
- */
1169
- platform: "fcmv1";
1170
- }
1171
-
1172
- /**
1173
- * Represents an Firebase V1 notification that can be sent to a device.
1174
- */
1175
- export declare interface FcmV1NotificationParams {
1176
- /**
1177
- * The body for the push notification.
1178
- */
1179
- body: string | FirebaseV1NativeMessage;
1180
- /**
1181
- * The headers to include for the push notification.
1182
- */
1183
- headers?: Record<string, string>;
1184
- }
1185
-
1186
- /**
1187
- * Represents Notification Hub registration description for Google Cloud Messaging.
1188
- */
1189
- export declare interface FcmV1RegistrationDescription extends FcmV1RegistrationDescriptionCommon {
1190
- /**
1191
- * The kind of the registration.
1192
- */
1193
- kind: "FcmV1";
1194
- }
1195
-
1196
- /**
1197
- * Represents Notification Hub registration description for Google Cloud Messaging.
1198
- */
1199
- export declare interface FcmV1RegistrationDescriptionCommon extends RegistrationDescriptionCommon {
1200
- /**
1201
- * Registration id obtained from the Firebase Cloud Messaging service.
1202
- */
1203
- fcmV1RegistrationId: string;
1204
- }
1205
-
1206
- /**
1207
- * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.
1208
- */
1209
- export declare interface FcmV1TemplateRegistrationDescription extends FcmV1TemplateRegistrationDescriptionCommon {
1210
- /**
1211
- * The kind of the registration.
1212
- */
1213
- kind: "FcmV1Template";
1214
- }
1215
-
1216
- /**
1217
- * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.
1218
- */
1219
- export declare interface FcmV1TemplateRegistrationDescriptionCommon extends FcmV1RegistrationDescriptionCommon, TemplateRegistrationDescription {
1220
- }
1221
-
1222
- /**
1223
- * Represents an Android native payload for the Firebase Legacy HTTP interface.
1224
- */
1225
- export declare interface FirebaseLegacyAndroidNativePayload {
1226
- /**
1227
- * The notification's title.
1228
- */
1229
- title?: string;
1230
- /**
1231
- * The notification's body text.
1232
- */
1233
- body?: string;
1234
- /**
1235
- * The notification's channel ID.
1236
- */
1237
- android_channel_id?: string;
1238
- /**
1239
- * The notification's icon.
1240
- */
1241
- icon?: string;
1242
- /**
1243
- * The sound to play when the device receives the notification.
1244
- */
1245
- sound?: string;
1246
- /**
1247
- * Identifier used to replace existing notifications in the notification drawer.
1248
- */
1249
- tag?: string;
1250
- /**
1251
- * The notification's icon color, expressed in #rrggbb format.
1252
- */
1253
- color?: string;
1254
- /**
1255
- * The action associated with a user click on the notification.
1256
- */
1257
- click_action?: string;
1258
- /**
1259
- * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
1260
- */
1261
- body_loc_key?: string;
1262
- /**
1263
- * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.
1264
- */
1265
- body_loc_args?: string[];
1266
- /**
1267
- * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
1268
- */
1269
- title_loc_key?: string;
1270
- /**
1271
- * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.
1272
- */
1273
- title_loc_args?: string[];
1274
- }
1275
-
1276
- /**
1277
- * Represents an APNs native payload for the Firebase Legacy HTTP interface.
1278
- */
1279
- export declare interface FirebaseLegacyAppleNativePayload {
1280
- /**
1281
- * The notification's title.
1282
- */
1283
- title?: string;
1284
- /**
1285
- * The notification's body text.
1286
- */
1287
- body?: string;
1288
- /**
1289
- * The sound to play when the device receives the notification.
1290
- */
1291
- sound?: string;
1292
- /**
1293
- * The value of the badge on the home screen app icon.
1294
- */
1295
- badge?: string;
1296
- /**
1297
- * The action associated with a user click on the notification which corresponds to the APNs category.
1298
- */
1299
- click_action?: string;
1300
- /**
1301
- * The notification's subtitle.
1302
- */
1303
- subtitle?: string;
1304
- /**
1305
- * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
1306
- */
1307
- body_loc_key?: string;
1308
- /**
1309
- * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.
1310
- */
1311
- body_loc_args?: string[];
1312
- /**
1313
- * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
1314
- */
1315
- title_loc_key?: string;
1316
- /**
1317
- * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.
1318
- */
1319
- title_loc_args?: string[];
1320
- }
1321
-
1322
- /**
1323
- * Represents the targets, options, and payload for HTTP JSON messages for the Firebase Legacy HTTP interface.
1324
- */
1325
- export declare interface FirebaseLegacyNativeMessage {
1326
- /**
1327
- * The recipient of a message.
1328
- */
1329
- to?: string;
1330
- /**
1331
- * The recipient of a multicast message, a message sent to more than one registration token.
1332
- */
1333
- registration_ids?: string[];
1334
- /**
1335
- * A logical expression of conditions that determine the message target.
1336
- */
1337
- condition?: string;
1338
- /**
1339
- * Used to identify a group of messages.
1340
- */
1341
- collapse_key?: string;
1342
- /**
1343
- * The priority of the message.
1344
- */
1345
- priority?: "normal" | "high";
1346
- /**
1347
- * The background notification flag. To perform a silent background update,
1348
- * specify the value 1 and don’t include the alert, badge, or sound keys in your payload.
1349
- */
1350
- content_available?: boolean;
1351
- /**
1352
- * The notification service app extension flag. If the value is 1, the system passes
1353
- * the notification to your notification service app extension before delivery.
1354
- */
1355
- mutable_content?: number;
1356
- /**
1357
- * Specifies how long (in seconds) the message should be kept in FCM storage if the device is offline
1358
- */
1359
- time_to_live?: number;
1360
- /**
1361
- * The package name of the application where the registration tokens must match in order to receive the message.
1362
- */
1363
- restricted_package_name?: string;
1364
- /**
1365
- * When set to true, allows developers to test a request without actually sending a message.
1366
- */
1367
- dry_run?: boolean;
1368
- /**
1369
- * Custom key-value pairs of the message's payload.
1370
- */
1371
- data?: Record<string, any>;
1372
- /**
1373
- * The predefined, user-visible key-value pairs of the notification payload.
1374
- */
1375
- notification?: FirebaseLegacyAppleNativePayload | FirebaseLegacyAndroidNativePayload | FirebaseLegacyWebNativePayload;
1376
- }
1377
-
1378
- /**
1379
- * Describes an Firebase Legacy Registration channel query.
1380
- */
1381
- export declare interface FirebaseLegacyRegistrationChannel {
1382
- /**
1383
- * The FCM Legacy registration ID.
1384
- */
1385
- gcmRegistrationId: string;
1386
- /**
1387
- * The kind of the registration channel.
1388
- */
1389
- kind: "gcm";
1390
- }
1391
-
1392
- /**
1393
- * Represents an Web Push native payload for the Firebase Legacy HTTP interface.
1394
- */
1395
- export declare interface FirebaseLegacyWebNativePayload {
1396
- /**
1397
- * The notification's title.
1398
- */
1399
- title?: string;
1400
- /**
1401
- * The notification's body text.
1402
- */
1403
- body?: string;
1404
- /**
1405
- * The URL to use for the notification's icon.
1406
- */
1407
- icon?: string;
1408
- /**
1409
- * The action associated with a user click on the notification.
1410
- */
1411
- click_action?: string;
1412
- }
1413
-
1414
- /**
1415
- * Android specific options for messages sent through FCM connection server.
1416
- */
1417
- export declare interface FirebaseV1AndroidConfig {
1418
- /**
1419
- * An identifier of a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed.
1420
- */
1421
- collapse_key?: string;
1422
- /**
1423
- * Message priority. Can take "normal" and "high" values.
1424
- */
1425
- priority?: "normal" | "high";
1426
- /**
1427
- * How long (in seconds) the message should be kept in FCM storage if the device is offline.
1428
- */
1429
- ttl?: string;
1430
- /**
1431
- * Package name of the application where the registration token must match in order to receive the message.
1432
- */
1433
- restricted_package_name?: string;
1434
- /**
1435
- * Custom key-value pairs of the message's payload.
1436
- */
1437
- data?: Record<string, string>;
1438
- /**
1439
- * Notification to send to android devices.
1440
- */
1441
- notification?: FirebaseV1AndroidNotification;
1442
- /**
1443
- * Options for features provided by the FCM SDK for Android.
1444
- */
1445
- fcm_options?: FirebaseV1AndroidFcmOptions;
1446
- /**
1447
- * If set to true, messages will be allowed to be delivered to the app while the device is in direct boot mode.
1448
- */
1449
- direct_boot_ok?: boolean;
1450
- }
1451
-
1452
- /**
1453
- * Options for features provided by the FCM SDK for Android.
1454
- */
1455
- export declare interface FirebaseV1AndroidFcmOptions {
1456
- /**
1457
- * The label associated with the message's analytics data.
1458
- */
1459
- analytics_label?: string;
1460
- }
1461
-
1462
- /**
1463
- * Notification to send to android devices.
1464
- */
1465
- export declare interface FirebaseV1AndroidNotification {
1466
- /**
1467
- * The notification's title.
1468
- */
1469
- title?: string;
1470
- /**
1471
- * The notification's body text.
1472
- */
1473
- body?: string;
1474
- /**
1475
- * The notification's icon.
1476
- */
1477
- icon?: string;
1478
- /**
1479
- * The notification's icon color, expressed in #rrggbb format.
1480
- */
1481
- color?: string;
1482
- /**
1483
- * The sound to play when the device receives the notification.
1484
- */
1485
- sound?: string;
1486
- /**
1487
- * Identifier used to replace existing notifications in the notification drawer.
1488
- */
1489
- tag?: string;
1490
- /**
1491
- * The action associated with a user click on the notification.
1492
- */
1493
- click_action?: string;
1494
- /**
1495
- * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
1496
- */
1497
- body_loc_key?: string;
1498
- /**
1499
- * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.
1500
- */
1501
- body_loc_args?: string[];
1502
- /**
1503
- * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
1504
- */
1505
- title_loc_key?: string;
1506
- /**
1507
- * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.
1508
- */
1509
- title_loc_args?: string[];
1510
- /**
1511
- * The notification's channel id (new in Android O).
1512
- */
1513
- channel_id?: string;
1514
- /**
1515
- * Sets the "ticker" text, which is sent to accessibility services.
1516
- */
1517
- ticker?: string;
1518
- /**
1519
- * When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel.
1520
- */
1521
- sticky?: boolean;
1522
- /**
1523
- * Set the time that the event in the notification occurred.
1524
- */
1525
- event_time?: string;
1526
- /**
1527
- * Set whether or not this notification is relevant only to the current device.
1528
- */
1529
- local_only?: boolean;
1530
- /**
1531
- * Set the relative priority for this notification.
1532
- */
1533
- notification_priority?: number;
1534
- /**
1535
- * If set to true, use the Android framework's default sound for the notification.
1536
- */
1537
- default_sound?: boolean;
1538
- /**
1539
- * If set to true, use the Android framework's default vibrate pattern for the notification.
1540
- */
1541
- default_vibrate_timings?: boolean;
1542
- /**
1543
- * If set to true, use the Android framework's default light settings for the notification.
1544
- */
1545
- default_light_settings?: boolean;
1546
- /**
1547
- * Set the vibration pattern to use.
1548
- */
1549
- vibrate_timings?: string[];
1550
- /**
1551
- * Set the Notification.visibility of the notification.
1552
- */
1553
- visibility?: number;
1554
- /**
1555
- * Sets the number of items this notification represents.
1556
- */
1557
- notification_count?: number;
1558
- /**
1559
- * Settings to control the notification's LED blinking rate and color if LED is available on the device.
1560
- */
1561
- light_settings?: {
1562
- color: {
1563
- red: number;
1564
- green: number;
1565
- blue: number;
1566
- alpha: number;
1567
- };
1568
- light_on_duration: string;
1569
- light_off_duration: string;
1570
- };
1571
- /**
1572
- * Contains the URL of an image that is going to be displayed in a notification.
1573
- */
1574
- image?: string;
1575
- }
1576
-
1577
- /**
1578
- * Apple Push Notification Service specific options.
1579
- */
1580
- export declare interface FirebaseV1ApnsConfig {
1581
- /**
1582
- * A collection of APNs headers.
1583
- */
1584
- headers?: Record<string, string>;
1585
- /**
1586
- * A collection of APNs headers.
1587
- */
1588
- payload?: AppleNativeMessage;
1589
- /**
1590
- * A collection of APNs headers.
1591
- */
1592
- fcm_options?: FirebaseV1ApnsFcmOptions;
1593
- }
1594
-
1595
- /**
1596
- * Options for features provided by the FCM SDK for iOS.
1597
- */
1598
- export declare interface FirebaseV1ApnsFcmOptions {
1599
- /**
1600
- * Label associated with the message's analytics data.
1601
- */
1602
- analytics_label?: string;
1603
- /**
1604
- * Contains the URL of an image that is going to be displayed in a notification.
1605
- */
1606
- image?: string;
1607
- }
1608
-
1609
- export declare interface FirebaseV1FcmOptions {
1610
- /**
1611
- * Label associated with the message's analytics data.
1612
- */
1613
- analytics_label?: string;
1614
- }
1615
-
1616
- /**
1617
- * Represents the targets, options, and payload for HTTP JSON messages for the Firebase V1 interface.
1618
- */
1619
- export declare interface FirebaseV1NativeMessage {
1620
- /**
1621
- * Custom key-value pairs of the message's payload.
1622
- */
1623
- data?: Record<string, string>;
1624
- /**
1625
- * The predefined, user-visible key-value pairs of the notification payload.
1626
- */
1627
- notification?: FirebaseV1NativeNotification;
1628
- /**
1629
- * Android specific options for messages sent through FCM connection server.
1630
- */
1631
- android?: FirebaseV1AndroidConfig;
1632
- /**
1633
- * Webpush protocol options.
1634
- */
1635
- webpush?: FirebaseV1WebPushConfig;
1636
- /**
1637
- * APNs specific options.
1638
- */
1639
- apns?: FirebaseV1ApnsConfig;
1640
- /**
1641
- * FCM options.
1642
- */
1643
- fcm_options?: FirebaseV1FcmOptions;
1644
- /**
1645
- * Registration token to send a message to.
1646
- */
1647
- token?: string;
1648
- /**
1649
- * Topic name to send a message to, e.g. "weather".
1650
- */
1651
- topic?: string;
1652
- /**
1653
- * Condition to send a message to, e.g. "'foo' in topics && 'bar' in topics".
1654
- */
1655
- condition?: string;
1656
- }
1657
-
1658
- /**
1659
- * Represents the Firebase V1 native message envelope.
1660
- */
1661
- export declare interface FirebaseV1NativeMessageEnvelope {
1662
- /**
1663
- * The Firebase V1 native message.
1664
- */
1665
- message: FirebaseV1NativeMessage;
1666
- }
1667
-
1668
- /**
1669
- * Represents a native FCM V1 notification message payload.
1670
- */
1671
- export declare interface FirebaseV1NativeNotification {
1672
- /**
1673
- * The notification's title.
1674
- */
1675
- title?: string;
1676
- /**
1677
- * The notification's body text.
1678
- */
1679
- body?: string;
1680
- /**
1681
- * Contains the URL of an image that is going to be downloaded on the device and displayed in a notification.
1682
- */
1683
- image?: string;
1684
- }
1685
-
1686
- /**
1687
- * Describes an Firebase Legacy Registration channel query.
1688
- */
1689
- export declare interface FirebaseV1RegistrationChannel {
1690
- /**
1691
- * The FCM V1 registration ID.
1692
- */
1693
- fcmV1RegistrationId: string;
1694
- /**
1695
- * The kind of the registration channel.
1696
- */
1697
- kind: "fcmv1";
1698
- }
1699
-
1700
- export declare interface FirebaseV1WebPushConfig {
1701
- /**
1702
- * A collection of WebPush protocol options.
1703
- */
1704
- headers?: Record<string, string>;
1705
- /**
1706
- * A collection of WebPush protocol options.
1707
- */
1708
- data?: Record<string, string>;
1709
- /**
1710
- * Web Notification options as a JSON object.
1711
- */
1712
- notification?: FirebaseV1WebPushNotification;
1713
- /**
1714
- * A collection of WebPush protocol options.
1715
- */
1716
- fcm_options?: FirebaseV1WebPushFcmOptions;
1717
- }
1718
-
1719
- /**
1720
- * Options for features provided by the FCM SDK for Web.
1721
- */
1722
- export declare interface FirebaseV1WebPushFcmOptions {
1723
- /**
1724
- * The link to open when the user clicks on the notification.
1725
- */
1726
- link?: string;
1727
- /**
1728
- * Label associated with the message's analytics data.
1729
- */
1730
- analytics_label?: string;
1731
- }
1732
-
1733
- /**
1734
- * Represents a Web Push notification payload.
1735
- */
1736
- export declare interface FirebaseV1WebPushNotification {
1737
- /**
1738
- * An array of actions to display in the notification.
1739
- */
1740
- actions?: {
1741
- action?: string;
1742
- title?: string;
1743
- icon?: string;
1744
- }[];
1745
- /**
1746
- * Defines a title for the notification.
1747
- */
1748
- title?: string;
1749
- /**
1750
- * The body string of the notification
1751
- */
1752
- body?: string;
1753
- /**
1754
- * A string containing the URL of an icon to be displayed in the notification.
1755
- */
1756
- icon?: string;
1757
- /**
1758
- * A string containing the URL of an image to represent the notification when there is not enough space to display the notification itself such as for example, the Android Notification Bar.
1759
- */
1760
- badge?: string;
1761
- /**
1762
- * The notification's data.
1763
- */
1764
- data?: Record<string, string>;
1765
- /**
1766
- * The direction in which to display the notification.
1767
- */
1768
- dir?: "auto" | "ltr" | "rtl";
1769
- /**
1770
- * A string containing the URL of an image to be displayed in the notification.
1771
- */
1772
- image?: string;
1773
- /**
1774
- * The notification's language.
1775
- */
1776
- lang?: string;
1777
- /**
1778
- * A boolean value specifying whether the user should be notified after a new notification replaces an old one.
1779
- */
1780
- renotify?: boolean;
1781
- /**
1782
- * Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
1783
- */
1784
- requireInteraction?: boolean;
1785
- /**
1786
- * A boolean value specifying whether the notification is silent
1787
- */
1788
- silent?: boolean;
1789
- /**
1790
- * A string representing an identifying tag for the notification.
1791
- */
1792
- tag?: string;
1793
- /**
1794
- * A number representing the time at which a notification is created or applicable
1795
- */
1796
- timestamp?: number;
1797
- /**
1798
- * A vibration pattern for the device's vibration hardware to emit with the notification.
1799
- */
1800
- vibrate?: number[];
1801
- }
1802
-
1803
- /**
1804
- * Represents Notification Hub registration description for Google Cloud Messaging.
1805
- */
1806
- export declare interface GcmRegistrationDescription extends GcmRegistrationDescriptionCommon {
1807
- /**
1808
- * The kind of the registration.
1809
- */
1810
- kind: "Gcm";
1811
- }
1812
-
1813
- /**
1814
- * Represents Notification Hub registration description for Google Cloud Messaging.
1815
- */
1816
- export declare interface GcmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
1817
- /**
1818
- * Registration id obtained from the Google Cloud Messaging service.
1819
- */
1820
- gcmRegistrationId: string;
1821
- }
1822
-
1823
- /**
1824
- * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.
1825
- */
1826
- export declare interface GcmTemplateRegistrationDescription extends GcmTemplateRegistrationDescriptionCommon {
1827
- /**
1828
- * The kind of the registration.
1829
- */
1830
- kind: "GcmTemplate";
1831
- }
1832
-
1833
- /**
1834
- * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.
1835
- */
1836
- export declare interface GcmTemplateRegistrationDescriptionCommon extends GcmRegistrationDescriptionCommon, TemplateRegistrationDescription {
1837
- }
1838
-
1839
- /**
1840
- * Represents the types of installations available in Notification Hubs.
1841
- */
1842
- export declare type Installation = AppleInstallation | AdmInstallation | BaiduInstallation | BrowserInstallation | FcmLegacyInstallation | FcmV1Installation | XiaomiInstallation | WindowsInstallation;
1843
-
1844
- /**
1845
- * Represents an installation for a device for Notification Hubs.
1846
- */
1847
- export declare interface InstallationCommon {
1848
- /**
1849
- * The ID for the installation.
1850
- */
1851
- installationId: string;
1852
- /**
1853
- * The User ID for the installation used for targeting.
1854
- */
1855
- userId?: string;
1856
- /**
1857
- * The installation expiration time.
1858
- */
1859
- readonly expirationTime?: string;
1860
- /**
1861
- * The last update date of the installation.
1862
- */
1863
- readonly lastUpdate?: string;
1864
- /**
1865
- * The tags used for targeting this installation.
1866
- */
1867
- tags?: string[];
1868
- /**
1869
- * The templates for the installation.
1870
- */
1871
- templates?: Record<string, InstallationTemplate>;
1872
- /**
1873
- * This parameter is true if the PNS expired the channel.
1874
- */
1875
- readonly pushChannelExpired?: boolean;
1876
- /**
1877
- * The push variables for the installation.
1878
- */
1879
- pushVariables?: Record<string, string>;
1880
- }
1881
-
1882
- /**
1883
- * Represents an installation template.
1884
- */
1885
- export declare interface InstallationTemplate {
1886
- /**
1887
- * The body for the installation template.
1888
- */
1889
- body: string;
1890
- /**
1891
- * Headers to include for the template send.
1892
- */
1893
- headers: Record<string, string>;
1894
- /**
1895
- * The tags to include for the template.
1896
- */
1897
- tags?: string[];
1898
- }
1899
-
1900
- /**
1901
- * Represents a JSON notification hub.
1902
- */
1903
- export declare interface JsonNotification extends NotificationCommon {
1904
- /**
1905
- * The content type for the push notification.
1906
- */
1907
- contentType: "application/json;charset=utf-8";
1908
- }
1909
-
1910
- /**
1911
- * Represents a patch operation.
1912
- */
1913
- export declare interface JsonPatch {
1914
- /**
1915
- * The patch operation.
1916
- */
1917
- op: JsonPatchOperation;
1918
- /**
1919
- * The path for the patch operation.
1920
- */
1921
- path: string;
1922
- /**
1923
- * The value to add or replace for the operation.
1924
- */
1925
- value?: string;
1926
- }
1927
-
1928
- /**
1929
- * Represents the JSON Patch types of add, remove and replace.
1930
- */
1931
- export declare type JsonPatchOperation = "add" | "remove" | "replace";
1932
-
1933
- /**
1934
- * Represents a Windows Phone Notification Services registration description.
1935
- * @deprecated Windows Phone is no longer supported.
1936
- */
1937
- export declare interface MpnsRegistrationDescription extends MpnsRegistrationDescriptionCommon {
1938
- /**
1939
- * The kind of the registration.
1940
- */
1941
- kind: "Mpns";
1942
- }
1943
-
1944
- /**
1945
- * Represents a Windows Phone Notification Services registration description.
1946
- * @deprecated Windows Phone is no longer supported.
1947
- */
1948
- export declare interface MpnsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
1949
- /**
1950
- * The channel URI.
1951
- */
1952
- channelUri: string;
1953
- }
1954
-
1955
- /**
1956
- * Represents a Windows Phone Notification Services template registration.
1957
- * @deprecated Windows Phone is no longer supported.
1958
- */
1959
- export declare interface MpnsTemplateRegistrationDescription extends MpnsRegistrationDescriptionCommon, TemplateRegistrationDescription {
1960
- /**
1961
- * The WNS headers.
1962
- */
1963
- mpnsHeaders?: Record<string, string>;
1964
- /**
1965
- * The kind of the registration.
1966
- */
1967
- kind: "MpnsTemplate";
1968
- }
1969
-
1970
- /**
1971
- * Represents a Windows Phone Notification Services template registration.
1972
- * @deprecated Windows Phone is no longer supported.
1973
- */
1974
- export declare interface MpnsTemplateRegistrationDescription extends MpnsTemplateRegistrationDescriptionCommon {
1975
- /**
1976
- * The kind of the registration.
1977
- */
1978
- kind: "MpnsTemplate";
1979
- }
1980
-
1981
- /**
1982
- * Represents a Windows Phone Notification Services template registration.
1983
- * @deprecated Windows Phone is no longer supported.
1984
- */
1985
- export declare interface MpnsTemplateRegistrationDescriptionCommon extends MpnsRegistrationDescriptionCommon, TemplateRegistrationDescription {
1986
- /**
1987
- * The WNS headers.
1988
- */
1989
- mpnsHeaders?: Record<string, string>;
1990
- }
1991
-
1992
- /**
1993
- * Represents the possible push notification messages types.
1994
- */
1995
- export declare type Notification = AppleNotification | AdmNotification | BaiduNotification | BrowserNotification | FcmLegacyNotification | FcmV1Notification | XiaomiNotification | WindowsNotification | TemplateNotification;
1996
-
1997
- /**
1998
- * Represents a notification that can be sent to a device.
1999
- */
2000
- export declare interface NotificationCommon {
2001
- /**
2002
- * The body for the push notification.
2003
- */
2004
- body: string;
2005
- /**
2006
- * The headers to include for the push notification.
2007
- */
2008
- headers?: Record<string, unknown>;
2009
- }
2010
-
2011
- /**
2012
- * The common notification parameters to accept a string body or JSON body.
2013
- */
2014
- export declare interface NotificationCommonParams {
2015
- /**
2016
- * The body for the push notification.
2017
- */
2018
- body: string | unknown;
2019
- /**
2020
- * The headers to include for the push notification.
2021
- */
2022
- headers?: Record<string, unknown>;
2023
- }
2024
-
2025
- /**
2026
- * Represents Notification details.
2027
- */
2028
- export declare interface NotificationDetails {
2029
- /**
2030
- * The unique notification identifier.
2031
- */
2032
- notificationId?: string;
2033
- /**
2034
- * The notification location.
2035
- */
2036
- location?: string;
2037
- /**
2038
- * The notification state.
2039
- */
2040
- state?: NotificationOutcomeState;
2041
- /**
2042
- * The enqueue time of the notification.
2043
- */
2044
- enqueueTime?: Date;
2045
- /**
2046
- * The notification send start time.
2047
- */
2048
- startTime?: Date;
2049
- /**
2050
- * The notification send end time.
2051
- */
2052
- endTime?: Date;
2053
- /**
2054
- * The notification body.
2055
- */
2056
- notificationBody?: string;
2057
- /**
2058
- * The notification tags.
2059
- */
2060
- tags?: string;
2061
- /**
2062
- * The notification platforms targeted.
2063
- */
2064
- targetPlatforms?: string;
2065
- /**
2066
- * The URL for the platform notification services errors.
2067
- */
2068
- pnsErrorDetailsUrl?: string;
2069
- /**
2070
- * APNs outcomes counts per state.
2071
- */
2072
- apnsOutcomeCounts?: NotificationOutcome[];
2073
- /**
2074
- * WNS outcomes counts per state.
2075
- */
2076
- wnsOutcomeCounts?: NotificationOutcome[];
2077
- /**
2078
- * FCM outcome counts per state.
2079
- */
2080
- fcmOutcomeCounts?: NotificationOutcome[];
2081
- /**
2082
- * FCM V1 outcome counts per state.
2083
- */
2084
- fcmV1OutcomeCounts?: NotificationOutcome[];
2085
- /**
2086
- * ADM outcome counts per state.
2087
- */
2088
- admOutcomeCounts?: NotificationOutcome[];
2089
- /**
2090
- * Baidu outcome counts per state.
2091
- */
2092
- baiduOutcomeCounts?: NotificationOutcome[];
2093
- /**
2094
- * Web Push outcome counts per state.
2095
- */
2096
- browserOutcomeCounts?: NotificationOutcome[];
2097
- /**
2098
- * Xiaomi outcome counts per state.
2099
- */
2100
- xiaomiOutcomeCounts?: NotificationOutcome[];
2101
- }
2102
-
2103
- /**
2104
- * Represents a Notification Hub Job.
2105
- */
2106
- export declare interface NotificationHubJob {
2107
- /**
2108
- * The unique job identifier.
2109
- */
2110
- jobId?: string;
2111
- /**
2112
- * The output file name.
2113
- */
2114
- outputFileName?: string;
2115
- /**
2116
- * The file name for the job failures.
2117
- */
2118
- failuresFileName?: string;
2119
- /**
2120
- * The progress for the job.
2121
- */
2122
- progress?: number;
2123
- /**
2124
- * The type of job.
2125
- */
2126
- type: NotificationHubJobType;
2127
- /**
2128
- * The status of the job.
2129
- */
2130
- status?: NotificationHubJobStatus;
2131
- /**
2132
- * The output container URL.
2133
- */
2134
- outputContainerUrl: string;
2135
- /**
2136
- * The import file URL.
2137
- */
2138
- importFileUrl?: string;
2139
- /**
2140
- * The input properties for the notification hub job.
2141
- */
2142
- inputProperties?: Record<string, string>;
2143
- /**
2144
- * Gets the notification hub job failure message.
2145
- */
2146
- failure?: string;
2147
- /**
2148
- * The output properties for the notification hub job.
2149
- */
2150
- outputProperties?: Record<string, string>;
2151
- /**
2152
- * Notification hub job created date.
2153
- */
2154
- createdAt?: Date;
2155
- /**
2156
- * Notification hub job last updated date.
2157
- */
2158
- updatedAt?: Date;
2159
- }
2160
-
2161
- /**
2162
- * Describes a poller for NotificationHubJob types.
2163
- */
2164
- export declare type NotificationHubJobPoller = PollerLike<OperationState<NotificationHubJob>, NotificationHubJob>;
2165
-
2166
- /**
2167
- * Describes the types of notification hub job statuses.
2168
- */
2169
- export declare type NotificationHubJobStatus =
2170
- /**
2171
- * Indicates that the NotificationHubJob was accepted.
2172
- */
2173
- "Started"
2174
- /**
2175
- * Indicates that the NotificationHubJob is currently running. Depending on the amount of data,
2176
- * a job may stay in this state for several hours.
2177
- */
2178
- | "Running"
2179
- /**
2180
- * Indicates that the NotificationHubJob was completed successfully. Any output
2181
- * will be ready where configured via the NotificationHubJob object.
2182
- */
2183
- | "Completed"
2184
- /**
2185
- * Indicates that the NotificationHubJob has failed.
2186
- */
2187
- | "Failed";
2188
-
2189
- /**
2190
- * Describes the types of notification hub jobs.
2191
- */
2192
- export declare type NotificationHubJobType =
2193
- /**
2194
- * Job type to bulk get registrations.
2195
- */
2196
- "ExportRegistrations"
2197
- /**
2198
- * Job type to bulk create registrations.
2199
- */
2200
- | "ImportCreateRegistrations"
2201
- /**
2202
- * Job type to bulk update registrations.
2203
- */
2204
- | "ImportUpdateRegistrations"
2205
- /**
2206
- * Job type to bulk delete registrations.
2207
- */
2208
- | "ImportDeleteRegistrations"
2209
- /**
2210
- * Job type to bulk upsert registrations.
2211
- */
2212
- | "ImportUpsertRegistrations";
2213
-
2214
- /**
2215
- * Describes the options that can be provided while creating the NotificationHubsClientContext.
2216
- */
2217
- export declare interface NotificationHubsClientOptions extends ClientOptions {
2218
- }
2219
-
2220
- /**
2221
- * Describes a response from the Notification Hubs service for send operations.
2222
- */
2223
- export declare interface NotificationHubsMessageResponse extends NotificationHubsResponse {
2224
- /**
2225
- * The notification ID from the operation. Note this is only available in Standard SKU and above.
2226
- */
2227
- notificationId?: string;
2228
- /**
2229
- * The number of devices that successfully received the notification.
2230
- */
2231
- successCount: number;
2232
- /**
2233
- * The number of devices that failed to receive a notification.
2234
- */
2235
- failureCount: number;
2236
- /**
2237
- * The list of notification outcome results for each device registered with the hub, to which this notification was sent.
2238
- */
2239
- results: RegistrationResult[];
2240
- /**
2241
- * The state of this notification outcome.
2242
- */
2243
- state: NotificationOutcomeState;
2244
- }
2245
-
2246
- /**
2247
- * Describes a response from the Notification Hubs which includes a tracking ID, correlation ID and location.
2248
- */
2249
- export declare interface NotificationHubsResponse {
2250
- /**
2251
- * The Tracking ID of the operation.
2252
- */
2253
- trackingId?: string;
2254
- /**
2255
- * The correlation ID of the operation.
2256
- */
2257
- correlationId?: string;
2258
- /**
2259
- * The location of the operation.
2260
- */
2261
- location?: string;
2262
- }
2263
-
2264
- /**
2265
- * The per platform count per state.
2266
- */
2267
- export declare interface NotificationOutcome {
2268
- /**
2269
- * The state of the notification.
2270
- */
2271
- state: string;
2272
- /**
2273
- * The count of notifications per state.
2274
- */
2275
- count: number;
2276
- }
2277
-
2278
- /**
2279
- * Represents the notification outcome states.
2280
- */
2281
- export declare type NotificationOutcomeState = "Enqueued" | "DetailedStateAvailable" | "Processing" | "Completed" | "Abandoned" | "Unknown" | "NoTargetFound" | "Cancelled";
2282
-
2283
- /**
2284
- * Options for polled operations including the polling interval cycle.
2285
- */
2286
- export declare interface PolledOperationOptions extends OperationOptions {
2287
- /**
2288
- * Time delay between poll requests, in milliseconds.
2289
- */
2290
- updateIntervalInMs?: number;
2291
- }
2292
-
2293
- /**
2294
- * Represents the types of push channels available for Notification Hubs.
2295
- */
2296
- export declare type PushHandle = BrowserPushChannel | string;
2297
-
2298
- /**
2299
- * Describes a Registration query.
2300
- */
2301
- export declare type RegistrationChannel = AdmRegistrationChannel | AppleRegistrationChannel | BaiduRegistrationChannel | BrowserRegistrationChannel | FirebaseLegacyRegistrationChannel | FirebaseV1RegistrationChannel | XiaomiRegistrationChannel | WindowsRegistrationChannel;
2302
-
2303
- /**
2304
- * Describes the types of registration descriptions.
2305
- */
2306
- export declare type RegistrationDescription = AdmRegistrationDescription | AdmTemplateRegistrationDescription | AppleRegistrationDescription | AppleTemplateRegistrationDescription | BaiduRegistrationDescription | BaiduTemplateRegistrationDescription | BrowserRegistrationDescription | BrowserTemplateRegistrationDescription | GcmRegistrationDescription | GcmTemplateRegistrationDescription | FcmV1RegistrationDescription | FcmV1TemplateRegistrationDescription | MpnsRegistrationDescription | MpnsTemplateRegistrationDescription | XiaomiRegistrationDescription | XiaomiTemplateRegistrationDescription | WindowsRegistrationDescription | WindowsTemplateRegistrationDescription;
2307
-
2308
- /**
2309
- * Represents a registration description.
2310
- */
2311
- export declare interface RegistrationDescriptionCommon {
2312
- /**
2313
- * The registration ID.
2314
- */
2315
- registrationId?: string;
2316
- /**
2317
- * The expiration time of the registration.
2318
- */
2319
- expirationTime?: Date;
2320
- /**
2321
- * The ETag associated with this description.
2322
- */
2323
- etag?: string;
2324
- /**
2325
- * The tags associated with the registration.
2326
- */
2327
- tags?: string[];
2328
- /**
2329
- * A dictionary of push variables associated with property bag.
2330
- */
2331
- pushVariables?: Record<string, string>;
2332
- }
2333
-
2334
- /**
2335
- * Represents query options to include $top support.
2336
- */
2337
- export declare interface RegistrationQueryLimitOptions extends OperationOptions {
2338
- /**
2339
- * The $top query member to get a number of records.
2340
- */
2341
- top?: number;
2342
- }
2343
-
2344
- /**
2345
- * Represents query options to include both $top and $filter.
2346
- */
2347
- export declare interface RegistrationQueryOptions extends RegistrationQueryLimitOptions {
2348
- /**
2349
- * The OData $filter operator query string.
2350
- */
2351
- filter?: string;
2352
- }
2353
-
2354
- /**
2355
- * Describes a registration query response with registrations and a continuation token.
2356
- */
2357
- export declare interface RegistrationQueryResponse {
2358
- /**
2359
- * The list of registrations.
2360
- */
2361
- registrations: RegistrationDescription[];
2362
- /**
2363
- * A continuation token to get more results.
2364
- */
2365
- continuationToken?: string;
2366
- }
2367
-
2368
- /**
2369
- * Represents the result of the registration.
2370
- */
2371
- export declare interface RegistrationResult {
2372
- /**
2373
- * The application platform.
2374
- */
2375
- applicationPlatform: string;
2376
- /**
2377
- * The PNS handle.
2378
- */
2379
- pnsHandle: string;
2380
- /**
2381
- * The registration ID.
2382
- */
2383
- registrationId: string;
2384
- /**
2385
- * The outcome of the registration.
2386
- */
2387
- outcome: string;
2388
- }
2389
-
2390
- /**
2391
- * Represents the types of registration descriptions.
2392
- */
2393
- export declare type RegistrationType = "Adm" | "AdmTemplate" | "Apple" | "AppleTemplate" | "Baidu" | "BaiduTemplate" | "Browser" | "BrowserTemplate" | "Gcm" | "GcmTemplate" | "FcmV1" | "FcmV1Template" | "Mpns" | "MpnsTemplate" | "Xiaomi" | "XiaomiTemplate" | "Windows" | "WindowsTemplate";
2394
-
2395
- /**
2396
- * Options for sending notifications for both tag based scheduled send.
2397
- */
2398
- export declare interface ScheduleNotificationOptions extends OperationOptions {
2399
- /**
2400
- * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.
2401
- */
2402
- tagExpression: string;
2403
- }
2404
-
2405
- /**
2406
- * Options for sending notifications for tag based send.
2407
- */
2408
- export declare interface SendNotificationOptions extends BroadcastSendNotificationOptions {
2409
- /**
2410
- * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.
2411
- */
2412
- tagExpression: string;
2413
- }
2414
-
2415
- /**
2416
- * Represents a template based push notification.
2417
- */
2418
- export declare interface TemplateNotification extends JsonNotification {
2419
- /**
2420
- * The platform for the push notification.
2421
- */
2422
- platform: "template";
2423
- }
2424
-
2425
- /**
2426
- * Represents the description of a template registration.
2427
- */
2428
- export declare interface TemplateRegistrationDescription {
2429
- /**
2430
- * The body template.
2431
- */
2432
- bodyTemplate: string;
2433
- /**
2434
- * The name of the template.
2435
- */
2436
- templateName?: string;
2437
- }
2438
-
2439
- /**
2440
- * Represents the types of Windows Badge Glyphs
2441
- */
2442
- export declare type WindowsBadgeGlyphType = "none" | "activity" | "alarm" | "alert" | "attention" | "available" | "away" | "busy" | "error" | "newMessage" | "paused" | "playing" | "unavailable";
2443
-
2444
- /**
2445
- * Represents the Windows Badge Message
2446
- */
2447
- export declare interface WindowsBadgeNativeMessage {
2448
- /**
2449
- * Either a numeric value or a string value that specifies a predefined badge glyph.
2450
- */
2451
- value: WindowsBadgeGlyphType | number;
2452
- }
2453
-
2454
- /**
2455
- * Represents the possible WNS content-types.
2456
- */
2457
- export declare type WindowsContentType = "application/xml" | "application/octet-stream";
2458
-
2459
- /**
2460
- * List of WNS specific headers.
2461
- */
2462
- export declare interface WindowsHeaders extends Record<string, unknown> {
2463
- /**
2464
- * The header specifies whether this is a tile, toast, badge, or raw notification.
2465
- */
2466
- "X-WNS-Type"?: WnsTypes;
2467
- }
2468
-
2469
- /**
2470
- * Represents a Windows Notification Services (WNS) based installation.
2471
- */
2472
- export declare interface WindowsInstallation extends DeviceTokenInstallation {
2473
- /**
2474
- * The platform for the installation.
2475
- */
2476
- platform: "wns";
2477
- }
2478
-
2479
- /**
2480
- * Represents a Windows Notification Services (WNS) push notification.
2481
- */
2482
- export declare interface WindowsNotification extends NotificationCommon {
2483
- /**
2484
- * The platform for the push notification.
2485
- */
2486
- platform: "windows";
2487
- /**
2488
- * The content type for the push notification.
2489
- */
2490
- contentType: WindowsContentType;
2491
- }
2492
-
2493
- /**
2494
- * Describes an Windows Notification Services Registration channel query.
2495
- */
2496
- export declare interface WindowsRegistrationChannel {
2497
- /**
2498
- * The WNS Channel URI.
2499
- */
2500
- channelUri: string;
2501
- /**
2502
- * The kind of the registration channel.
2503
- */
2504
- kind: "windows";
2505
- }
2506
-
2507
- /**
2508
- * Represents a Windows Notification Services (WNS) registration description.
2509
- */
2510
- export declare interface WindowsRegistrationDescription extends WindowsRegistrationDescriptionCommon {
2511
- /**
2512
- * The kind of the registration.
2513
- */
2514
- kind: "Windows";
2515
- }
2516
-
2517
- /**
2518
- * Represents a Windows Notification Services (WNS) registration description.
2519
- */
2520
- export declare interface WindowsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
2521
- /**
2522
- * The channel URI.
2523
- */
2524
- channelUri: string;
2525
- }
2526
-
2527
- /**
2528
- * Represents a Windows Notification Services (WNS) template registration.
2529
- */
2530
- export declare interface WindowsTemplateRegistrationDescription extends WindowsTemplateRegistrationDescriptionCommon {
2531
- /**
2532
- * The kind of the registration.
2533
- */
2534
- kind: "WindowsTemplate";
2535
- }
2536
-
2537
- /**
2538
- * Represents a Windows Notification Services (WNS) template registration.
2539
- */
2540
- export declare interface WindowsTemplateRegistrationDescriptionCommon extends WindowsRegistrationDescriptionCommon, TemplateRegistrationDescription {
2541
- /**
2542
- * The WNS headers.
2543
- */
2544
- wnsHeaders?: Record<string, string>;
2545
- }
2546
-
2547
- /**
2548
- * Represents a WNS notification that can be sent to a device.
2549
- */
2550
- export declare interface WnsNotificationParams {
2551
- /**
2552
- * The body for the push notification.
2553
- */
2554
- body: string;
2555
- /**
2556
- * The headers to include for the push notification.
2557
- */
2558
- headers?: WindowsHeaders;
2559
- }
2560
-
2561
- /**
2562
- * The list of WNS specific types.
2563
- */
2564
- export declare type WnsTypes = "wns/toast" | "wns/badge" | "wns/tile" | "wns/raw";
2565
-
2566
- /**
2567
- * Represents a Xiaomi based installation.
2568
- */
2569
- export declare interface XiaomiInstallation extends DeviceTokenInstallation {
2570
- /**
2571
- * The platform for the installation.
2572
- */
2573
- platform: "xiaomi";
2574
- }
2575
-
2576
- /**
2577
- * Represents a Xiaomi push notification.
2578
- */
2579
- export declare interface XiaomiNotification extends JsonNotification {
2580
- /**
2581
- * The platform for the push notification.
2582
- */
2583
- platform: "xiaomi";
2584
- }
2585
-
2586
- /**
2587
- * Describes an Xiaomi Registration channel query.
2588
- */
2589
- export declare interface XiaomiRegistrationChannel {
2590
- /**
2591
- * The Xiaomi registration ID.
2592
- */
2593
- xiaomiRegistrationId: string;
2594
- /**
2595
- * The kind of the registration channel.
2596
- */
2597
- kind: "xiaomi";
2598
- }
2599
-
2600
- /**
2601
- * Represents a Xiaomi registration description.
2602
- */
2603
- export declare interface XiaomiRegistrationDescription extends XiaomiRegistrationDescriptionCommon {
2604
- /**
2605
- * The kind of the registration.
2606
- */
2607
- kind: "Xiaomi";
2608
- }
2609
-
2610
- /**
2611
- * Represents a Xiaomi registration description.
2612
- */
2613
- export declare interface XiaomiRegistrationDescriptionCommon extends RegistrationDescriptionCommon {
2614
- /**
2615
- * The Xiaomi registration ID.
2616
- */
2617
- xiaomiRegistrationId: string;
2618
- }
2619
-
2620
- /**
2621
- * Represents a Windows Notification Services (WNS) template registration.
2622
- */
2623
- export declare interface XiaomiTemplateRegistrationDescription extends XiaomiTemplateRegistrationDescriptionCommon {
2624
- /**
2625
- * The kind of the registration.
2626
- */
2627
- kind: "XiaomiTemplate";
2628
- }
2629
-
2630
- /**
2631
- * Represents a Xiaomi template registration.
2632
- */
2633
- export declare interface XiaomiTemplateRegistrationDescriptionCommon extends XiaomiRegistrationDescriptionCommon, TemplateRegistrationDescription {
2634
- }
2635
-
2636
- export { }