@azure/notification-hubs 1.0.0-beta.4 → 1.0.0-beta.6
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/README.md +28 -44
- package/dist/index.cjs +421 -307
- package/dist/index.cjs.map +1 -1
- package/dist-esm/src/client/beginSubmitNotificationHubJob.js +131 -0
- package/dist-esm/src/client/beginSubmitNotificationHubJob.js.map +1 -0
- package/dist-esm/src/client/cancelScheduledNotification.js +1 -1
- package/dist-esm/src/client/cancelScheduledNotification.js.map +1 -1
- package/dist-esm/src/client/createOrUpdateInstallation.js +1 -1
- package/dist-esm/src/client/createOrUpdateInstallation.js.map +1 -1
- package/dist-esm/src/client/createOrUpdateRegistration.js +1 -1
- package/dist-esm/src/client/createOrUpdateRegistration.js.map +1 -1
- package/dist-esm/src/client/createRegistration.js +1 -1
- package/dist-esm/src/client/createRegistration.js.map +1 -1
- package/dist-esm/src/client/createRegistrationId.js +1 -1
- package/dist-esm/src/client/createRegistrationId.js.map +1 -1
- package/dist-esm/src/client/deleteInstallation.js +1 -1
- package/dist-esm/src/client/deleteInstallation.js.map +1 -1
- package/dist-esm/src/client/deleteRegistration.js +1 -1
- package/dist-esm/src/client/deleteRegistration.js.map +1 -1
- package/dist-esm/src/client/getFeedbackContainerUrl.js +1 -1
- package/dist-esm/src/client/getFeedbackContainerUrl.js.map +1 -1
- package/dist-esm/src/client/getInstallation.js +1 -1
- package/dist-esm/src/client/getInstallation.js.map +1 -1
- package/dist-esm/src/client/getNotificationHubJob.js +1 -1
- package/dist-esm/src/client/getNotificationHubJob.js.map +1 -1
- package/dist-esm/src/client/getNotificationOutcomeDetails.js +1 -1
- package/dist-esm/src/client/getNotificationOutcomeDetails.js.map +1 -1
- package/dist-esm/src/client/getRegistration.js +1 -1
- package/dist-esm/src/client/getRegistration.js.map +1 -1
- package/dist-esm/src/client/index.js +2 -2
- package/dist-esm/src/client/index.js.map +1 -1
- package/dist-esm/src/client/listNotificationHubJobs.js +1 -1
- package/dist-esm/src/client/listNotificationHubJobs.js.map +1 -1
- package/dist-esm/src/client/listRegistrations.js +1 -1
- package/dist-esm/src/client/listRegistrations.js.map +1 -1
- package/dist-esm/src/client/listRegistrationsByTag.js +1 -1
- package/dist-esm/src/client/listRegistrationsByTag.js.map +1 -1
- package/dist-esm/src/client/scheduleNotification.js +20 -6
- package/dist-esm/src/client/scheduleNotification.js.map +1 -1
- package/dist-esm/src/client/sendNotification.js +53 -6
- package/dist-esm/src/client/sendNotification.js.map +1 -1
- package/dist-esm/src/client/submitNotificationHubJob.js +1 -1
- package/dist-esm/src/client/submitNotificationHubJob.js.map +1 -1
- package/dist-esm/src/client/updateInstallation.js +1 -1
- package/dist-esm/src/client/updateInstallation.js.map +1 -1
- package/dist-esm/src/client/updateRegistration.js +1 -1
- package/dist-esm/src/client/updateRegistration.js.map +1 -1
- package/dist-esm/src/models/notificationHubJob.js.map +1 -1
- package/dist-esm/src/models/options.js.map +1 -1
- package/dist-esm/src/notificationHubsClient.js +27 -45
- package/dist-esm/src/notificationHubsClient.js.map +1 -1
- package/dist-esm/src/serializers/notificationDetailsSerializer.js +2 -1
- package/dist-esm/src/serializers/notificationDetailsSerializer.js.map +1 -1
- package/dist-esm/src/serializers/notificationHubJobSerializer.js +5 -2
- package/dist-esm/src/serializers/notificationHubJobSerializer.js.map +1 -1
- package/dist-esm/src/serializers/registrationSerializer.js +2 -1
- package/dist-esm/src/serializers/registrationSerializer.js.map +1 -1
- package/dist-esm/src/utils/constants.js +1 -1
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/dist-esm/src/utils/notificationUtils.js +25 -0
- package/dist-esm/src/utils/notificationUtils.js.map +1 -0
- package/dist-esm/src/utils/optionUtils.js +20 -0
- package/dist-esm/src/utils/optionUtils.js.map +1 -0
- package/package.json +6 -5
- package/types/3.1/notification-hubs.d.ts +60 -36
- package/types/latest/notification-hubs.d.ts +64 -36
- package/types/latest/tsdoc-metadata.json +1 -1
- package/types/src/client/beginSubmitNotificationHubJob.d.ts +12 -0
- package/types/src/client/beginSubmitNotificationHubJob.d.ts.map +1 -0
- package/types/src/client/index.d.ts +1 -1
- package/types/src/client/index.d.ts.map +1 -1
- package/types/src/client/scheduleNotification.d.ts +3 -5
- package/types/src/client/scheduleNotification.d.ts.map +1 -1
- package/types/src/client/sendNotification.d.ts +3 -5
- package/types/src/client/sendNotification.d.ts.map +1 -1
- package/types/src/models/notificationHubJob.d.ts +5 -0
- package/types/src/models/notificationHubJob.d.ts.map +1 -1
- package/types/src/models/options.d.ts +36 -2
- package/types/src/models/options.d.ts.map +1 -1
- package/types/src/notificationHubsClient.d.ts +22 -37
- package/types/src/notificationHubsClient.d.ts.map +1 -1
- package/types/src/serializers/notificationHubJobSerializer.d.ts.map +1 -1
- package/types/src/serializers/registrationSerializer.d.ts.map +1 -1
- package/types/src/utils/notificationUtils.d.ts +10 -0
- package/types/src/utils/notificationUtils.d.ts.map +1 -0
- package/types/src/utils/optionUtils.d.ts +14 -0
- package/types/src/utils/optionUtils.d.ts.map +1 -0
- package/dist-esm/src/client/internal/_scheduleNotificationPayload.js +0 -38
- package/dist-esm/src/client/internal/_scheduleNotificationPayload.js.map +0 -1
- package/dist-esm/src/client/internal/_sendNotificationPayload.js +0 -51
- package/dist-esm/src/client/internal/_sendNotificationPayload.js.map +0 -1
- package/dist-esm/src/client/scheduleBroadcastNotification.js +0 -17
- package/dist-esm/src/client/scheduleBroadcastNotification.js.map +0 -1
- package/dist-esm/src/client/sendBroadcastNotification.js +0 -15
- package/dist-esm/src/client/sendBroadcastNotification.js.map +0 -1
- package/dist-esm/src/client/sendDirectNotification.js +0 -15
- package/dist-esm/src/client/sendDirectNotification.js.map +0 -1
- package/types/src/client/internal/_scheduleNotificationPayload.d.ts +0 -9
- package/types/src/client/internal/_scheduleNotificationPayload.d.ts.map +0 -1
- package/types/src/client/internal/_sendNotificationPayload.d.ts +0 -10
- package/types/src/client/internal/_sendNotificationPayload.d.ts.map +0 -1
- package/types/src/client/scheduleBroadcastNotification.d.ts +0 -16
- package/types/src/client/scheduleBroadcastNotification.d.ts.map +0 -1
- package/types/src/client/sendBroadcastNotification.d.ts +0 -14
- package/types/src/client/sendBroadcastNotification.d.ts.map +0 -1
- package/types/src/client/sendDirectNotification.d.ts +0 -15
- package/types/src/client/sendDirectNotification.d.ts.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CommonClientOptions } from '@azure/core-client';
|
|
2
2
|
import { OperationOptions } from '@azure/core-client';
|
|
3
|
+
import { OperationState } from '@azure/core-lro';
|
|
3
4
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
5
|
+
import { SimplePollerLike } from '@azure/core-lro';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Represents an Amazon Device Messaging (ADM) based installation.
|
|
@@ -804,6 +806,16 @@ export declare interface DeviceTokenInstallation extends InstallationCommon {
|
|
|
804
806
|
pushChannel: string;
|
|
805
807
|
}
|
|
806
808
|
|
|
809
|
+
/**
|
|
810
|
+
* Options for sending notifications to individual devices.
|
|
811
|
+
*/
|
|
812
|
+
export declare interface DirectSendNotificationOptions extends OperationOptions {
|
|
813
|
+
/**
|
|
814
|
+
* 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.
|
|
815
|
+
*/
|
|
816
|
+
deviceHandle: string | BrowserPushChannel | string[];
|
|
817
|
+
}
|
|
818
|
+
|
|
807
819
|
/**
|
|
808
820
|
* Represents entity update operation options that can be set.
|
|
809
821
|
*/
|
|
@@ -1311,6 +1323,11 @@ export declare interface NotificationHubJob {
|
|
|
1311
1323
|
updatedAt?: Date;
|
|
1312
1324
|
}
|
|
1313
1325
|
|
|
1326
|
+
/**
|
|
1327
|
+
* Describes a poller for NotificationHubJob types.
|
|
1328
|
+
*/
|
|
1329
|
+
export declare type NotificationHubJobPoller = SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob>;
|
|
1330
|
+
|
|
1314
1331
|
/**
|
|
1315
1332
|
* Describes the types of notification hub job statuses.
|
|
1316
1333
|
*/
|
|
@@ -1479,6 +1496,14 @@ export declare class NotificationHubsServiceClient {
|
|
|
1479
1496
|
* @returns The updated registration description.
|
|
1480
1497
|
*/
|
|
1481
1498
|
updateRegistration(registration: RegistrationDescription, options?: OperationOptions): Promise<RegistrationDescription>;
|
|
1499
|
+
/**
|
|
1500
|
+
* Deletes a registration with the given registration ID.
|
|
1501
|
+
* @param context - The Notification Hubs client.
|
|
1502
|
+
* @param registrationId - The registration ID of the registration to delete.
|
|
1503
|
+
* @param options - The options for delete operations including the ETag
|
|
1504
|
+
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1505
|
+
*/
|
|
1506
|
+
deleteRegistration(registrationId: string, options?: EntityOperationOptions): Promise<NotificationHubsResponse>;
|
|
1482
1507
|
/**
|
|
1483
1508
|
* Gets a registration by the given registration ID.
|
|
1484
1509
|
* @param registrationId - The ID of the registration to get.
|
|
@@ -1499,52 +1524,22 @@ export declare class NotificationHubsServiceClient {
|
|
|
1499
1524
|
* @returns A paged async iterable containing the matching registrations for the notification hub.
|
|
1500
1525
|
*/
|
|
1501
1526
|
listRegistrationsByTag(tag: string, options?: RegistrationQueryLimitOptions): PagedAsyncIterableIterator<RegistrationDescription>;
|
|
1502
|
-
/**
|
|
1503
|
-
* Sends a direct push notification to a device with the given push handle.
|
|
1504
|
-
* @param pushHandle - The push handle which is the unique identifier for the device.
|
|
1505
|
-
* @param notification - The notification to send to the device.
|
|
1506
|
-
* @param options - The options for sending a direct notification.
|
|
1507
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1508
|
-
*/
|
|
1509
|
-
sendDirectNotification(pushHandle: PushHandle, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
1510
1527
|
/**
|
|
1511
1528
|
* Sends push notifications to devices that match the given tags or tag expression.
|
|
1512
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
1513
1529
|
* @param notification - The notification to send to the matching devices.
|
|
1514
|
-
* @param options -
|
|
1515
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
1516
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1517
|
-
*/
|
|
1518
|
-
sendNotification(tags: string[] | string, notification: Notification, options?: SendOperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
1519
|
-
/**
|
|
1520
|
-
* Sends push notifications to all devices on the Notification Hub.
|
|
1521
|
-
* @param notification - The notification to send to all devices.
|
|
1522
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
1523
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
1530
|
+
* @param options - Options for the notification including tags, device handles and whether to enable test send.
|
|
1524
1531
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1525
1532
|
*/
|
|
1526
|
-
|
|
1533
|
+
sendNotification(notification: Notification, options?: DirectSendNotificationOptions | SendNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
1527
1534
|
/**
|
|
1528
1535
|
* Schedules a push notification to devices that match the given tags or tag expression at the specified time.
|
|
1529
1536
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
1530
1537
|
* @param scheduledTime - The Date to send the push notification.
|
|
1531
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
1532
1538
|
* @param notification - The notification to send to the matching devices.
|
|
1533
|
-
* @param options -
|
|
1534
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
1539
|
+
* @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.
|
|
1535
1540
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1536
1541
|
*/
|
|
1537
|
-
scheduleNotification(scheduledTime: Date,
|
|
1538
|
-
/**
|
|
1539
|
-
* Schedules a push notification to all devices registered on the Notification Hub.
|
|
1540
|
-
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
1541
|
-
* @param scheduledTime - The Date to send the push notification.
|
|
1542
|
-
* @param notification - The notification to send to the matching devices.
|
|
1543
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
1544
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
1545
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
1546
|
-
*/
|
|
1547
|
-
scheduleBroadcastNotification(scheduledTime: Date, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
1542
|
+
scheduleNotification(scheduledTime: Date, notification: Notification, options?: ScheduleNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
1548
1543
|
/**
|
|
1549
1544
|
* Cancels the scheduled notification with the given notification ID.
|
|
1550
1545
|
* @param notificationId - The notification ID from the scheduled notification.
|
|
@@ -1574,6 +1569,13 @@ export declare class NotificationHubsServiceClient {
|
|
|
1574
1569
|
* @returns The Notification Hub Job with the matching ID.
|
|
1575
1570
|
*/
|
|
1576
1571
|
getNotificationHubJob(jobId: string, options?: OperationOptions): Promise<NotificationHubJob>;
|
|
1572
|
+
/**
|
|
1573
|
+
* Submits a Notification Hub job and creates a poller to poll for results.
|
|
1574
|
+
* @param notificationHubJob - The Notification Hub import/export job to start.
|
|
1575
|
+
* @param options - The operation options.
|
|
1576
|
+
* @returns A poller which can be called to poll until completion of the job.
|
|
1577
|
+
*/
|
|
1578
|
+
beginSubmitNotificationHubJob(notificationHubJob: NotificationHubJob, options?: PolledOperationOptions): Promise<NotificationHubJobPoller>;
|
|
1577
1579
|
/**
|
|
1578
1580
|
* Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.
|
|
1579
1581
|
* @param job - The notification hub job to submit.
|
|
@@ -1608,6 +1610,16 @@ export declare interface NotificationOutcomeCollectionItem {
|
|
|
1608
1610
|
*/
|
|
1609
1611
|
export declare type NotificationOutcomeState = "Enqueued" | "DetailedStateAvailable" | "Processing" | "Completed" | "Abandoned" | "Unknown" | "NoTargetFound" | "Cancelled";
|
|
1610
1612
|
|
|
1613
|
+
/**
|
|
1614
|
+
* Options for polled operations including the polling interval cycle.
|
|
1615
|
+
*/
|
|
1616
|
+
export declare interface PolledOperationOptions extends OperationOptions {
|
|
1617
|
+
/**
|
|
1618
|
+
* Time delay between poll requests, in milliseconds.
|
|
1619
|
+
*/
|
|
1620
|
+
updateIntervalInMs?: number;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1611
1623
|
/**
|
|
1612
1624
|
* Represents the types of push channels available for Notification Hubs.
|
|
1613
1625
|
*/
|
|
@@ -1710,9 +1722,25 @@ export declare interface RegistrationResult {
|
|
|
1710
1722
|
export declare type RegistrationType = "Adm" | "AdmTemplate" | "Apple" | "AppleTemplate" | "Baidu" | "BaiduTemplate" | "Browser" | "BrowserTemplate" | "Gcm" | "GcmTemplate" | "Mpns" | "MpnsTemplate" | "Windows" | "WindowsTemplate";
|
|
1711
1723
|
|
|
1712
1724
|
/**
|
|
1713
|
-
*
|
|
1725
|
+
* Options for sending notifications for both tag based send and broadcast scheduled send.
|
|
1726
|
+
*/
|
|
1727
|
+
export declare interface ScheduleNotificationOptions extends OperationOptions {
|
|
1728
|
+
/**
|
|
1729
|
+
* The tags used to target the device for push notifications in either an array as "an || condition" or tag expression.
|
|
1730
|
+
* If not set, this results in a broadcast notification to be scheduled.
|
|
1731
|
+
*/
|
|
1732
|
+
tags?: string | string[];
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Options for sending notifications for both tag based send and broadcast send.
|
|
1714
1737
|
*/
|
|
1715
|
-
export declare interface
|
|
1738
|
+
export declare interface SendNotificationOptions extends OperationOptions {
|
|
1739
|
+
/**
|
|
1740
|
+
* The tags used to target the device for push notifications in either an array as "an || condition" or tag expression.
|
|
1741
|
+
* If not set, this results in a broadcast notification to be sent.
|
|
1742
|
+
*/
|
|
1743
|
+
tags?: string | string[];
|
|
1716
1744
|
/**
|
|
1717
1745
|
* Set to true to enable test send.
|
|
1718
1746
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NotificationHubJob, NotificationHubJobPoller } from "../models/notificationHubJob.js";
|
|
2
|
+
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import { PolledOperationOptions } from "../models/options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Submits a Notification Hub job and creates a poller to poll for results.
|
|
6
|
+
* @param context - The Notification Hubs client.
|
|
7
|
+
* @param notificationHubJob - The Notification Hub import/export job to start.
|
|
8
|
+
* @param options - The operation options.
|
|
9
|
+
* @returns A poller which can be called to poll until completion of the job.
|
|
10
|
+
*/
|
|
11
|
+
export declare function beginSubmitNotificationHubJob(context: NotificationHubsClientContext, notificationHubJob: NotificationHubJob, polledOperationOptions?: PolledOperationOptions): Promise<NotificationHubJobPoller>;
|
|
12
|
+
//# sourceMappingURL=beginSubmitNotificationHubJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beginSubmitNotificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/client/beginSubmitNotificationHubJob.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAI9D;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,6BAA6B,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,sBAAsB,GAAE,sBAA2B,GAClD,OAAO,CAAC,wBAAwB,CAAC,CAsHnC"}
|
|
@@ -24,7 +24,7 @@ export interface NotificationHubsClientContext {
|
|
|
24
24
|
/**
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
|
-
createHeaders(operationName: string): Promise<HttpHeaders>;
|
|
27
|
+
createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;
|
|
28
28
|
/**
|
|
29
29
|
* @internal
|
|
30
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,eAAe,EACf,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAK/D;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,eAAe,EACf,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAK/D;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhG;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,6BAA6B,CAE/B"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { Notification } from "../models/notification.js";
|
|
2
2
|
import { NotificationHubsClientContext } from "./index.js";
|
|
3
3
|
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ScheduleNotificationOptions } from "../models/options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Schedules a push notification to devices that match the given tags or tag expression at the specified time.
|
|
7
7
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
8
8
|
* @param context - The Notification Hubs client.
|
|
9
9
|
* @param scheduledTime - The Date to send the push notification.
|
|
10
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
11
10
|
* @param notification - The notification to send to the matching devices.
|
|
12
|
-
* @param options -
|
|
13
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
11
|
+
* @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.
|
|
14
12
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
15
13
|
*/
|
|
16
|
-
export declare function scheduleNotification(context: NotificationHubsClientContext, scheduledTime: Date,
|
|
14
|
+
export declare function scheduleNotification(context: NotificationHubsClientContext, scheduledTime: Date, notification: Notification, options?: ScheduleNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
17
15
|
//# sourceMappingURL=scheduleNotification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleNotification.d.ts","sourceRoot":"","sources":["../../../src/client/scheduleNotification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scheduleNotification.d.ts","sourceRoot":"","sources":["../../../src/client/scheduleNotification.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAInE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,+BAA+B,CAAC,CAyB1C"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { DirectSendNotificationOptions, SendNotificationOptions } from "../models/options.js";
|
|
1
2
|
import { Notification } from "../models/notification.js";
|
|
2
3
|
import { NotificationHubsClientContext } from "./index.js";
|
|
3
4
|
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { SendOperationOptions } from "../models/options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Sends push notifications to devices that match the given tags or tag expression.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
8
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
9
8
|
* @param notification - The notification to send to the matching devices.
|
|
10
|
-
* @param options -
|
|
11
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
9
|
+
* @param options - Options for the notification including tags, device handles and whether to enable test send.
|
|
12
10
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
13
11
|
*/
|
|
14
|
-
export declare function sendNotification(context: NotificationHubsClientContext,
|
|
12
|
+
export declare function sendNotification(context: NotificationHubsClientContext, notification: Notification, options?: DirectSendNotificationOptions | SendNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
15
13
|
//# sourceMappingURL=sendNotification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/client/sendNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/client/sendNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAQ9F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAInF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,6BAA6B,GAAG,uBAAmD,GAC3F,OAAO,CAAC,+BAA+B,CAAC,CA0D1C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OperationState, SimplePollerLike } from "@azure/core-lro";
|
|
1
2
|
/**
|
|
2
3
|
* Describes the types of notification hub jobs.
|
|
3
4
|
*/
|
|
@@ -101,4 +102,8 @@ export interface NotificationHubJob {
|
|
|
101
102
|
*/
|
|
102
103
|
updatedAt?: Date;
|
|
103
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Describes a poller for NotificationHubJob types.
|
|
107
|
+
*/
|
|
108
|
+
export declare type NotificationHubJobPoller = SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob>;
|
|
104
109
|
//# sourceMappingURL=notificationHubJob.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,sBAAsB;AAChC;;GAEG;AACD,qBAAqB;AAEvB;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B,CAAC;AAEhC;;GAEG;AACH,oBAAY,wBAAwB;AAClC;;GAEG;AACD,SAAS;AAEX;;;GAGG;GACD,SAAS;AAEX;;;GAGG;GACD,WAAW;AAEb;;GAEG;GACD,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAElC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"notificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"m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AC"}
|
|
@@ -1,18 +1,52 @@
|
|
|
1
1
|
import { CommonClientOptions, OperationOptions } from "@azure/core-client";
|
|
2
|
+
import { BrowserPushChannel } from "./installation.js";
|
|
2
3
|
/**
|
|
3
4
|
* Describes the options that can be provided while creating the NotificationHubsClientContext.
|
|
4
5
|
*/
|
|
5
6
|
export interface NotificationHubsClientOptions extends CommonClientOptions {
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Options for polled operations including the polling interval cycle.
|
|
9
10
|
*/
|
|
10
|
-
export interface
|
|
11
|
+
export interface PolledOperationOptions extends OperationOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Time delay between poll requests, in milliseconds.
|
|
14
|
+
*/
|
|
15
|
+
updateIntervalInMs?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Options for sending notifications for both tag based send and broadcast scheduled send.
|
|
19
|
+
*/
|
|
20
|
+
export interface ScheduleNotificationOptions extends OperationOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The tags used to target the device for push notifications in either an array as "an || condition" or tag expression.
|
|
23
|
+
* If not set, this results in a broadcast notification to be scheduled.
|
|
24
|
+
*/
|
|
25
|
+
tags?: string | string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options for sending notifications for both tag based send and broadcast send.
|
|
29
|
+
*/
|
|
30
|
+
export interface SendNotificationOptions extends OperationOptions {
|
|
31
|
+
/**
|
|
32
|
+
* The tags used to target the device for push notifications in either an array as "an || condition" or tag expression.
|
|
33
|
+
* If not set, this results in a broadcast notification to be sent.
|
|
34
|
+
*/
|
|
35
|
+
tags?: string | string[];
|
|
11
36
|
/**
|
|
12
37
|
* Set to true to enable test send.
|
|
13
38
|
*/
|
|
14
39
|
enableTestSend?: boolean;
|
|
15
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Options for sending notifications to individual devices.
|
|
43
|
+
*/
|
|
44
|
+
export interface DirectSendNotificationOptions extends OperationOptions {
|
|
45
|
+
/**
|
|
46
|
+
* 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.
|
|
47
|
+
*/
|
|
48
|
+
deviceHandle: string | BrowserPushChannel | string[];
|
|
49
|
+
}
|
|
16
50
|
/**
|
|
17
51
|
* Represents entity update operation options that can be set.
|
|
18
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;CAAG;AAE7E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,kBAAkB,GAAG,MAAM,EAAE,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC7E;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DirectSendNotificationOptions, EntityOperationOptions, NotificationHubsClientOptions, PolledOperationOptions, RegistrationQueryLimitOptions, RegistrationQueryOptions, ScheduleNotificationOptions, SendNotificationOptions } from "./models/options.js";
|
|
2
|
+
import { Installation, JsonPatch } from "./models/installation.js";
|
|
2
3
|
import { NotificationDetails, NotificationHubsMessageResponse, NotificationHubsResponse } from "./models/notificationDetails.js";
|
|
3
|
-
import {
|
|
4
|
+
import { NotificationHubJob, NotificationHubJobPoller } from "./models/notificationHubJob.js";
|
|
4
5
|
import { Notification } from "./models/notification.js";
|
|
5
|
-
import { NotificationHubJob } from "./models/notificationHubJob.js";
|
|
6
6
|
import { OperationOptions } from "@azure/core-client";
|
|
7
7
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
8
8
|
import { RegistrationDescription } from "./models/registration.js";
|
|
@@ -76,6 +76,14 @@ export declare class NotificationHubsServiceClient {
|
|
|
76
76
|
* @returns The updated registration description.
|
|
77
77
|
*/
|
|
78
78
|
updateRegistration(registration: RegistrationDescription, options?: OperationOptions): Promise<RegistrationDescription>;
|
|
79
|
+
/**
|
|
80
|
+
* Deletes a registration with the given registration ID.
|
|
81
|
+
* @param context - The Notification Hubs client.
|
|
82
|
+
* @param registrationId - The registration ID of the registration to delete.
|
|
83
|
+
* @param options - The options for delete operations including the ETag
|
|
84
|
+
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
85
|
+
*/
|
|
86
|
+
deleteRegistration(registrationId: string, options?: EntityOperationOptions): Promise<NotificationHubsResponse>;
|
|
79
87
|
/**
|
|
80
88
|
* Gets a registration by the given registration ID.
|
|
81
89
|
* @param registrationId - The ID of the registration to get.
|
|
@@ -96,52 +104,22 @@ export declare class NotificationHubsServiceClient {
|
|
|
96
104
|
* @returns A paged async iterable containing the matching registrations for the notification hub.
|
|
97
105
|
*/
|
|
98
106
|
listRegistrationsByTag(tag: string, options?: RegistrationQueryLimitOptions): PagedAsyncIterableIterator<RegistrationDescription>;
|
|
99
|
-
/**
|
|
100
|
-
* Sends a direct push notification to a device with the given push handle.
|
|
101
|
-
* @param pushHandle - The push handle which is the unique identifier for the device.
|
|
102
|
-
* @param notification - The notification to send to the device.
|
|
103
|
-
* @param options - The options for sending a direct notification.
|
|
104
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
105
|
-
*/
|
|
106
|
-
sendDirectNotification(pushHandle: PushHandle, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
107
107
|
/**
|
|
108
108
|
* Sends push notifications to devices that match the given tags or tag expression.
|
|
109
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
110
109
|
* @param notification - The notification to send to the matching devices.
|
|
111
|
-
* @param options -
|
|
112
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
113
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
114
|
-
*/
|
|
115
|
-
sendNotification(tags: string[] | string, notification: Notification, options?: SendOperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
116
|
-
/**
|
|
117
|
-
* Sends push notifications to all devices on the Notification Hub.
|
|
118
|
-
* @param notification - The notification to send to all devices.
|
|
119
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
120
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
110
|
+
* @param options - Options for the notification including tags, device handles and whether to enable test send.
|
|
121
111
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
122
112
|
*/
|
|
123
|
-
|
|
113
|
+
sendNotification(notification: Notification, options?: DirectSendNotificationOptions | SendNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
124
114
|
/**
|
|
125
115
|
* Schedules a push notification to devices that match the given tags or tag expression at the specified time.
|
|
126
116
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
127
117
|
* @param scheduledTime - The Date to send the push notification.
|
|
128
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
129
118
|
* @param notification - The notification to send to the matching devices.
|
|
130
|
-
* @param options -
|
|
131
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
119
|
+
* @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.
|
|
132
120
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
133
121
|
*/
|
|
134
|
-
scheduleNotification(scheduledTime: Date,
|
|
135
|
-
/**
|
|
136
|
-
* Schedules a push notification to all devices registered on the Notification Hub.
|
|
137
|
-
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
138
|
-
* @param scheduledTime - The Date to send the push notification.
|
|
139
|
-
* @param notification - The notification to send to the matching devices.
|
|
140
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
141
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
142
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
143
|
-
*/
|
|
144
|
-
scheduleBroadcastNotification(scheduledTime: Date, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
122
|
+
scheduleNotification(scheduledTime: Date, notification: Notification, options?: ScheduleNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
145
123
|
/**
|
|
146
124
|
* Cancels the scheduled notification with the given notification ID.
|
|
147
125
|
* @param notificationId - The notification ID from the scheduled notification.
|
|
@@ -171,6 +149,13 @@ export declare class NotificationHubsServiceClient {
|
|
|
171
149
|
* @returns The Notification Hub Job with the matching ID.
|
|
172
150
|
*/
|
|
173
151
|
getNotificationHubJob(jobId: string, options?: OperationOptions): Promise<NotificationHubJob>;
|
|
152
|
+
/**
|
|
153
|
+
* Submits a Notification Hub job and creates a poller to poll for results.
|
|
154
|
+
* @param notificationHubJob - The Notification Hub import/export job to start.
|
|
155
|
+
* @param options - The operation options.
|
|
156
|
+
* @returns A poller which can be called to poll until completion of the job.
|
|
157
|
+
*/
|
|
158
|
+
beginSubmitNotificationHubJob(notificationHubJob: NotificationHubJob, options?: PolledOperationOptions): Promise<NotificationHubJobPoller>;
|
|
174
159
|
/**
|
|
175
160
|
* Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.
|
|
176
161
|
* @param job - The notification hub job to submit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationHubsClient.d.ts","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"notificationHubsClient.d.ts","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,E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BAAwB,CACtB,GAAG,EAAE,kBAAkB,EACvB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;;;OAIG;IACH,uBAAuB,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;CAGvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationHubJobSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAGnB,MAAM,iCAAiC,CAAC;AAWzC;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAUlF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAIhG;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"notificationHubJobSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAGnB,MAAM,iCAAiC,CAAC;AAWzC;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAUlF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAIhG;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAejG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registrationSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"A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AE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,8BAA8B,CAAC;IACpC;;;OAGG;IACH,4CAA4C,EAAE,CAC5C,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,sCAAsC,CAAC;IAC5C;;;OAGG;IACH,gCAAgC,EAAE,CAChC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,0BAA0B,CAAC;IAChC;;;OAGG;IACH,wCAAwC,EAAE,CACxC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,kCAAkC,CAAC;IACxC;;;OAGG;IACH,iCAAiC,EAAE,CACjC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,2BAA2B,CAAC;IACjC;;;OAGG;IACH,yCAAyC,EAAE,CACzC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,mCAAmC,CAAC;IACzC;;;OAGG;IACH,oCAAoC,EAAE,CACpC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,8BAA8B,CAAC;IACpC;;;OAGG;IACH,4CAA4C,EAAE,CAC5C,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,sCAAsC,CAAC;CAC7C;AAED,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"registrationSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAElC,4BAA4B,EAC5B,oCAAoC,EACpC,4BAA4B,EAC5B,oCAAoC,EACpC,8BAA8B,EAC9B,sCAAsC,EACtC,0BAA0B,EAC1B,kCAAkC,EAClC,2BAA2B,EAC3B,mCAAmC,EACnC,uBAAuB,EAGvB,8BAA8B,EAC9B,sCAAsC,EACvC,MAAM,2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AAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,+CAA+C,CAC7C,WAAW,EAAE,IAAI,CAAC,sCAAsC,EAAE,MAAM,CAAC,GAChE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,iCA4P/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Notification } from "../models/notification.js";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function createMultipartDirectNotification(boundaryName: string, notification: Notification, deviceHandles: string[]): string;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeTags(tags: string | string[]): string;
|
|
10
|
+
//# sourceMappingURL=notificationUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/notificationUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,MAAM,EAAE,GACtB,MAAM,CAcR;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAE7D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DirectSendNotificationOptions, SendNotificationOptions } from "../models/options.js";
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether the options are of type SendNotificationOptions.
|
|
4
|
+
* @param options - The options to test if SendNotificationOptions.
|
|
5
|
+
* @returns true if SendNotificationOptions otherwise false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isSendNotificationOptions(options: unknown): options is SendNotificationOptions;
|
|
8
|
+
/**
|
|
9
|
+
* Determines whether the options are of type DirectSendNotificationOptions.
|
|
10
|
+
* @param options - The options to test if DirectSendNotificationOptions.
|
|
11
|
+
* @returns true if DirectSendNotificationOptions otherwise false.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isDirectSendNotificationOptions(options: unknown): options is DirectSendNotificationOptions;
|
|
14
|
+
//# sourceMappingURL=optionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/optionUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAG9F;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,uBAAuB,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,6BAA6B,CAE1C"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { createRequest, parseNotificationSendResponse, sendRequest } from "./_client.js";
|
|
4
|
-
import { tracingClient } from "../../utils/tracing.js";
|
|
5
|
-
const OPERATION_NAME = "scheduleNotificationPayload";
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export function scheduleNotificationPayload(context, scheduledTime, tags, notification, options = {}) {
|
|
10
|
-
return tracingClient.withSpan(`NotificationHubsClientContext-${OPERATION_NAME}`, options, async (updatedOptions) => {
|
|
11
|
-
const endpoint = context.requestUrl();
|
|
12
|
-
endpoint.pathname += "/schedulednotifications/";
|
|
13
|
-
const headers = await context.createHeaders(OPERATION_NAME);
|
|
14
|
-
if (notification.headers) {
|
|
15
|
-
for (const headerName of Object.keys(notification.headers)) {
|
|
16
|
-
headers.set(headerName, notification.headers[headerName]);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
headers.set("ServiceBusNotification-ScheduleTime", scheduledTime.toISOString());
|
|
20
|
-
headers.set("Content-Type", notification.contentType);
|
|
21
|
-
headers.set("ServiceBusNotification-Format", notification.platform);
|
|
22
|
-
if (tags) {
|
|
23
|
-
let tagExpression = null;
|
|
24
|
-
if (Array.isArray(tags)) {
|
|
25
|
-
tagExpression = tags.join("||");
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
tagExpression = tags;
|
|
29
|
-
}
|
|
30
|
-
headers.set("ServiceBusNotification-Tags", tagExpression);
|
|
31
|
-
}
|
|
32
|
-
const request = createRequest(endpoint, "POST", headers, updatedOptions);
|
|
33
|
-
request.body = notification.body;
|
|
34
|
-
const response = await sendRequest(context, request, 201);
|
|
35
|
-
return parseNotificationSendResponse(response);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=_scheduleNotificationPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_scheduleNotificationPayload.js","sourceRoot":"","sources":["../../../../src/client/internal/_scheduleNotificationPayload.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKzF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAsC,EACtC,aAAmB,EACnB,IAAmC,EACnC,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,0BAA0B,CAAC;QAEhD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;gBAC1D,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;aAC3D;SACF;QAED,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC;QAChF,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEpE,IAAI,IAAI,EAAE;YACR,IAAI,aAAa,GAAG,IAAI,CAAC;YACzB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACvB,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjC;iBAAM;gBACL,aAAa,GAAG,IAAI,CAAC;aACtB;YACD,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,aAAa,CAAC,CAAC;SAC3D;QAED,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;QAEjC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,6BAA6B,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./_client.js\";\nimport { Notification } from \"../../models/notification.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { NotificationHubsMessageResponse } from \"../../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../../utils/tracing.js\";\n\nconst OPERATION_NAME = \"scheduleNotificationPayload\";\n\n/**\n * @internal\n */\nexport function scheduleNotificationPayload(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n tags: string[] | string | undefined,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext-${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/schedulednotifications/\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n if (notification.headers) {\n for (const headerName of Object.keys(notification.headers)) {\n headers.set(headerName, notification.headers[headerName]);\n }\n }\n\n headers.set(\"ServiceBusNotification-ScheduleTime\", scheduledTime.toISOString());\n headers.set(\"Content-Type\", notification.contentType);\n headers.set(\"ServiceBusNotification-Format\", notification.platform);\n\n if (tags) {\n let tagExpression = null;\n if (Array.isArray(tags)) {\n tagExpression = tags.join(\"||\");\n } else {\n tagExpression = tags;\n }\n headers.set(\"ServiceBusNotification-Tags\", tagExpression);\n }\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n request.body = notification.body;\n\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationSendResponse(response);\n }\n );\n}\n"]}
|