@azure/notification-hubs 1.0.0-alpha.20221003.1 → 1.0.0-alpha.20221014.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.
- package/README.md +27 -43
- package/dist/index.cjs +390 -310
- 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 +16 -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 +3 -1
- package/dist-esm/src/serializers/notificationHubJobSerializer.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 +7 -6
- package/types/3.1/notification-hubs.d.ts +52 -36
- package/types/latest/notification-hubs.d.ts +56 -36
- 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 +14 -37
- package/types/src/notificationHubsClient.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,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";
|
|
@@ -104,52 +104,22 @@ export declare class NotificationHubsServiceClient {
|
|
|
104
104
|
* @returns A paged async iterable containing the matching registrations for the notification hub.
|
|
105
105
|
*/
|
|
106
106
|
listRegistrationsByTag(tag: string, options?: RegistrationQueryLimitOptions): PagedAsyncIterableIterator<RegistrationDescription>;
|
|
107
|
-
/**
|
|
108
|
-
* Sends a direct push notification to a device with the given push handle.
|
|
109
|
-
* @param pushHandle - The push handle which is the unique identifier for the device.
|
|
110
|
-
* @param notification - The notification to send to the device.
|
|
111
|
-
* @param options - The options for sending a direct notification.
|
|
112
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
113
|
-
*/
|
|
114
|
-
sendDirectNotification(pushHandle: PushHandle, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
115
107
|
/**
|
|
116
108
|
* Sends push notifications to devices that match the given tags or tag expression.
|
|
117
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
118
109
|
* @param notification - The notification to send to the matching devices.
|
|
119
|
-
* @param options -
|
|
120
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
121
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
122
|
-
*/
|
|
123
|
-
sendNotification(tags: string[] | string, notification: Notification, options?: SendOperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
124
|
-
/**
|
|
125
|
-
* Sends push notifications to all devices on the Notification Hub.
|
|
126
|
-
* @param notification - The notification to send to all devices.
|
|
127
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
128
|
-
* 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.
|
|
129
111
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
130
112
|
*/
|
|
131
|
-
|
|
113
|
+
sendNotification(notification: Notification, options?: DirectSendNotificationOptions | SendNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
132
114
|
/**
|
|
133
115
|
* Schedules a push notification to devices that match the given tags or tag expression at the specified time.
|
|
134
116
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
135
117
|
* @param scheduledTime - The Date to send the push notification.
|
|
136
|
-
* @param tags - The tags used to target the device for push notifications in either an array or tag expression.
|
|
137
118
|
* @param notification - The notification to send to the matching devices.
|
|
138
|
-
* @param options -
|
|
139
|
-
* 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.
|
|
140
120
|
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
141
121
|
*/
|
|
142
|
-
scheduleNotification(scheduledTime: Date,
|
|
143
|
-
/**
|
|
144
|
-
* Schedules a push notification to all devices registered on the Notification Hub.
|
|
145
|
-
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
146
|
-
* @param scheduledTime - The Date to send the push notification.
|
|
147
|
-
* @param notification - The notification to send to the matching devices.
|
|
148
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
149
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
150
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
151
|
-
*/
|
|
152
|
-
scheduleBroadcastNotification(scheduledTime: Date, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
122
|
+
scheduleNotification(scheduledTime: Date, notification: Notification, options?: ScheduleNotificationOptions): Promise<NotificationHubsMessageResponse>;
|
|
153
123
|
/**
|
|
154
124
|
* Cancels the scheduled notification with the given notification ID.
|
|
155
125
|
* @param notificationId - The notification ID from the scheduled notification.
|
|
@@ -179,6 +149,13 @@ export declare class NotificationHubsServiceClient {
|
|
|
179
149
|
* @returns The Notification Hub Job with the matching ID.
|
|
180
150
|
*/
|
|
181
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>;
|
|
182
159
|
/**
|
|
183
160
|
* Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.
|
|
184
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":"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"}
|
|
@@ -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"]}
|
|
@@ -1,51 +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
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export function sendNotificationPayload(context, notification, method, pushHandle, tags, options = {}) {
|
|
9
|
-
return tracingClient.withSpan(`NotificationHubsClientContext-${method}`, options, async (updatedOptions) => {
|
|
10
|
-
const endpoint = context.requestUrl();
|
|
11
|
-
endpoint.pathname += "/messages/";
|
|
12
|
-
if (options.enableTestSend) {
|
|
13
|
-
endpoint.searchParams.append("test", "true");
|
|
14
|
-
}
|
|
15
|
-
const headers = await context.createHeaders(method);
|
|
16
|
-
if (notification.headers) {
|
|
17
|
-
for (const headerName of Object.keys(notification.headers)) {
|
|
18
|
-
headers.set(headerName, notification.headers[headerName]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (pushHandle) {
|
|
22
|
-
endpoint.searchParams.append("direct", "true");
|
|
23
|
-
if (notification.platform === "browser") {
|
|
24
|
-
const browserHandle = pushHandle;
|
|
25
|
-
headers.set("ServiceBusNotification-DeviceHandle", browserHandle.endpoint);
|
|
26
|
-
headers.set("Auth", browserHandle.auth);
|
|
27
|
-
headers.set("P256DH", browserHandle.p256dh);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
headers.set("ServiceBusNotification-DeviceHandle", pushHandle);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
headers.set("Content-Type", notification.contentType);
|
|
34
|
-
headers.set("ServiceBusNotification-Format", notification.platform);
|
|
35
|
-
if (tags) {
|
|
36
|
-
let tagExpression = null;
|
|
37
|
-
if (Array.isArray(tags)) {
|
|
38
|
-
tagExpression = tags.join("||");
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
tagExpression = tags;
|
|
42
|
-
}
|
|
43
|
-
headers.set("ServiceBusNotification-Tags", tagExpression);
|
|
44
|
-
}
|
|
45
|
-
const request = createRequest(endpoint, "POST", headers, updatedOptions);
|
|
46
|
-
request.body = notification.body;
|
|
47
|
-
const response = await sendRequest(context, request, 201);
|
|
48
|
-
return parseNotificationSendResponse(response);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=_sendNotificationPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_sendNotificationPayload.js","sourceRoot":"","sources":["../../../../src/client/internal/_sendNotificationPayload.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKzF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAsC,EACtC,YAA0B,EAC1B,MAAc,EACd,UAAuB,EACvB,IAAwB,EACxB,UAAgC,EAAE;IAElC,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,MAAM,EAAE,EACzC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,YAAY,CAAC;QAElC,IAAI,OAAO,CAAC,cAAc,EAAE;YAC1B,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SAC9C;QAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACpD,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,IAAI,UAAU,EAAE;YACd,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAE/C,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE;gBACvC,MAAM,aAAa,GAAG,UAAgC,CAAC;gBACvD,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;gBAC3E,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;gBACxC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;aAC7C;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,UAAoB,CAAC,CAAC;aAC1E;SACF;QAED,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 { BrowserPushChannel, PushHandle } from \"../../models/installation.js\";\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 { SendOperationOptions } from \"../../models/options.js\";\nimport { tracingClient } from \"../../utils/tracing.js\";\n\n/**\n * @internal\n */\nexport function sendNotificationPayload(\n context: NotificationHubsClientContext,\n notification: Notification,\n method: string,\n pushHandle?: PushHandle,\n tags?: string | string[],\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext-${method}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/messages/\";\n\n if (options.enableTestSend) {\n endpoint.searchParams.append(\"test\", \"true\");\n }\n\n const headers = await context.createHeaders(method);\n if (notification.headers) {\n for (const headerName of Object.keys(notification.headers)) {\n headers.set(headerName, notification.headers[headerName]);\n }\n }\n\n if (pushHandle) {\n endpoint.searchParams.append(\"direct\", \"true\");\n\n if (notification.platform === \"browser\") {\n const browserHandle = pushHandle as BrowserPushChannel;\n headers.set(\"ServiceBusNotification-DeviceHandle\", browserHandle.endpoint);\n headers.set(\"Auth\", browserHandle.auth);\n headers.set(\"P256DH\", browserHandle.p256dh);\n } else {\n headers.set(\"ServiceBusNotification-DeviceHandle\", pushHandle as string);\n }\n }\n\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"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { scheduleNotificationPayload } from "./internal/_scheduleNotificationPayload.js";
|
|
4
|
-
/**
|
|
5
|
-
* Schedules a push notification to all devices registered on the Notification Hub.
|
|
6
|
-
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
7
|
-
* @param context - The Notification Hubs client.
|
|
8
|
-
* @param scheduledTime - The Date to send the push notification.
|
|
9
|
-
* @param notification - The notification to send to the matching devices.
|
|
10
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
11
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
12
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
13
|
-
*/
|
|
14
|
-
export function scheduleBroadcastNotification(context, scheduledTime, notification, options = {}) {
|
|
15
|
-
return scheduleNotificationPayload(context, scheduledTime, undefined, notification, options);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=scheduleBroadcastNotification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleBroadcastNotification.js","sourceRoot":"","sources":["../../../src/client/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAsC,EACtC,aAAmB,EACnB,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAC/F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { scheduleNotificationPayload } from \"./internal/_scheduleNotificationPayload.js\";\n\n/**\n * Schedules a push notification to all devices registered on the Notification Hub.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleBroadcastNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationPayload(context, scheduledTime, undefined, notification, options);\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { sendNotificationPayload } from "./internal/_sendNotificationPayload.js";
|
|
4
|
-
/**
|
|
5
|
-
* Sends push notifications to all devices on the Notification Hub.
|
|
6
|
-
* @param context - The Notification Hubs client.
|
|
7
|
-
* @param notification - The notification to send to all devices.
|
|
8
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
9
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
10
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
11
|
-
*/
|
|
12
|
-
export function sendBroadcastNotification(context, notification, options = {}) {
|
|
13
|
-
return sendNotificationPayload(context, notification, "sendNotification", undefined, undefined, options);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=sendBroadcastNotification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sendBroadcastNotification.js","sourceRoot":"","sources":["../../../src/client/sendBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAsC,EACtC,YAA0B,EAC1B,UAAgC,EAAE;IAElC,OAAO,uBAAuB,CAC5B,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { SendOperationOptions } from \"../models/options.js\";\nimport { sendNotificationPayload } from \"./internal/_sendNotificationPayload.js\";\n\n/**\n * Sends push notifications to all devices on the Notification Hub.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to all devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendBroadcastNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationPayload(\n context,\n notification,\n \"sendNotification\",\n undefined,\n undefined,\n options\n );\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { sendNotificationPayload } from "./internal/_sendNotificationPayload.js";
|
|
4
|
-
/**
|
|
5
|
-
* Sends a direct push notification to a device with the given push handle.
|
|
6
|
-
* @param context - The Notification Hubs client.
|
|
7
|
-
* @param pushHandle - The push handle which is the unique identifier for the device.
|
|
8
|
-
* @param notification - The notification to send to the device.
|
|
9
|
-
* @param options - The options for sending a direct notification.
|
|
10
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
11
|
-
*/
|
|
12
|
-
export function sendDirectNotification(context, pushHandle, notification, options = {}) {
|
|
13
|
-
return sendNotificationPayload(context, notification, "sendDirectNotification", pushHandle, undefined, options);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=sendDirectNotification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sendDirectNotification.js","sourceRoot":"","sources":["../../../src/client/sendDirectNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAsC,EACtC,UAAsB,EACtB,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,uBAAuB,CAC5B,OAAO,EACP,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,SAAS,EACT,OAAO,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { PushHandle } from \"../models/installation.js\";\nimport { sendNotificationPayload } from \"./internal/_sendNotificationPayload.js\";\n\n/**\n * Sends a direct push notification to a device with the given push handle.\n * @param context - The Notification Hubs client.\n * @param pushHandle - The push handle which is the unique identifier for the device.\n * @param notification - The notification to send to the device.\n * @param options - The options for sending a direct notification.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendDirectNotification(\n context: NotificationHubsClientContext,\n pushHandle: PushHandle,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationPayload(\n context,\n notification,\n \"sendDirectNotification\",\n pushHandle,\n undefined,\n options\n );\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Notification } from "../../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "../index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../../models/notificationDetails.js";
|
|
4
|
-
import { OperationOptions } from "@azure/core-client";
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare function scheduleNotificationPayload(context: NotificationHubsClientContext, scheduledTime: Date, tags: string[] | string | undefined, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
9
|
-
//# sourceMappingURL=_scheduleNotificationPayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_scheduleNotificationPayload.d.ts","sourceRoot":"","sources":["../../../../src/client/internal/_scheduleNotificationPayload.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,IAAI,EACnB,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,EACnC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,+BAA+B,CAAC,CAqC1C"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PushHandle } from "../../models/installation.js";
|
|
2
|
-
import { Notification } from "../../models/notification.js";
|
|
3
|
-
import { NotificationHubsClientContext } from "../index.js";
|
|
4
|
-
import { NotificationHubsMessageResponse } from "../../models/notificationDetails.js";
|
|
5
|
-
import { SendOperationOptions } from "../../models/options.js";
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare function sendNotificationPayload(context: NotificationHubsClientContext, notification: Notification, method: string, pushHandle?: PushHandle, tags?: string | string[], options?: SendOperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
10
|
-
//# sourceMappingURL=_sendNotificationPayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_sendNotificationPayload.d.ts","sourceRoot":"","sources":["../../../../src/client/internal/_sendNotificationPayload.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,UAAU,EACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,+BAA+B,CAAC,CAqD1C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Notification } from "../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { OperationOptions } from "@azure/core-client";
|
|
5
|
-
/**
|
|
6
|
-
* Schedules a push notification to all devices registered on the Notification Hub.
|
|
7
|
-
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
8
|
-
* @param context - The Notification Hubs client.
|
|
9
|
-
* @param scheduledTime - The Date to send the push notification.
|
|
10
|
-
* @param notification - The notification to send to the matching devices.
|
|
11
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
12
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
13
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
14
|
-
*/
|
|
15
|
-
export declare function scheduleBroadcastNotification(context: NotificationHubsClientContext, scheduledTime: Date, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
16
|
-
//# sourceMappingURL=scheduleBroadcastNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/client/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAGA,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,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,+BAA+B,CAAC,CAE1C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Notification } from "../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { SendOperationOptions } from "../models/options.js";
|
|
5
|
-
/**
|
|
6
|
-
* Sends push notifications to all devices on the Notification Hub.
|
|
7
|
-
* @param context - The Notification Hubs client.
|
|
8
|
-
* @param notification - The notification to send to all devices.
|
|
9
|
-
* @param options - Configuration options for the direct send operation which can contain custom headers
|
|
10
|
-
* which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.
|
|
11
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
12
|
-
*/
|
|
13
|
-
export declare function sendBroadcastNotification(context: NotificationHubsClientContext, notification: Notification, options?: SendOperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
14
|
-
//# sourceMappingURL=sendBroadcastNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sendBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/client/sendBroadcastNotification.ts"],"names":[],"mappings":"AAGA,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,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,+BAA+B,CAAC,CAS1C"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Notification } from "../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { OperationOptions } from "@azure/core-client";
|
|
5
|
-
import { PushHandle } from "../models/installation.js";
|
|
6
|
-
/**
|
|
7
|
-
* Sends a direct push notification to a device with the given push handle.
|
|
8
|
-
* @param context - The Notification Hubs client.
|
|
9
|
-
* @param pushHandle - The push handle which is the unique identifier for the device.
|
|
10
|
-
* @param notification - The notification to send to the device.
|
|
11
|
-
* @param options - The options for sending a direct notification.
|
|
12
|
-
* @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
|
|
13
|
-
*/
|
|
14
|
-
export declare function sendDirectNotification(context: NotificationHubsClientContext, pushHandle: PushHandle, notification: Notification, options?: OperationOptions): Promise<NotificationHubsMessageResponse>;
|
|
15
|
-
//# sourceMappingURL=sendDirectNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sendDirectNotification.d.ts","sourceRoot":"","sources":["../../../src/client/sendDirectNotification.ts"],"names":[],"mappings":"AAGA,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,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,EACtC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,+BAA+B,CAAC,CAS1C"}
|