@azure/notification-hubs 2.0.1-alpha.20250106.1 → 2.0.1-alpha.20250108.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.
@@ -15,7 +15,9 @@ export function createClientContext(connectionString, hubName, options = {}) {
15
15
  return new NotificationHubsServiceClient(connectionString, hubName, options);
16
16
  }
17
17
  class NotificationHubsServiceClient {
18
- constructor(connectionString, hubName, options = {}) {
18
+ constructor(connectionString, hubName,
19
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
20
+ options = {}) {
19
21
  var _a, _b;
20
22
  this.hubName = hubName;
21
23
  const parsedConnection = parseNotificationHubsConnectionString(connectionString);
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;;QAE3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,gBAAgB,GAAG,qCAAqC,CAAC,gBAAgB,CAAC,CAAC;QACjF,mFAAmF;QACnF,IAAI,CAAC,OAAO,GAAG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AAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
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(c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.d.ts","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACzB,MAA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2BAA2B,GACnC,OAAO,CAAC,+BAA+B,CAAC;IAI3C;;;;;OAKG;IACH,2BAA2B,CACzB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,uBAAuB,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIxE;;;;;;OAMG;IACH,6BAA6B,CAC3B,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IAI/B;;;;;OAKG;IACH,qBAAqB,CACnB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAkB,EAAE,kBAAkB,EAEtC,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,wBAAwB,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"}
@@ -119,7 +119,9 @@ export class NotificationHubsClient {
119
119
  * @param options - The options for delete operations including the ETag
120
120
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
121
121
  */
122
- deleteRegistration(registrationId, options = {}) {
122
+ deleteRegistration(registrationId,
123
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
124
+ options = {}) {
123
125
  return deleteRegistration(this._client, registrationId, options);
124
126
  }
125
127
  /**
@@ -136,7 +138,9 @@ export class NotificationHubsClient {
136
138
  * @param options - The options for querying the registrations such as $top.
137
139
  * @returns A paged async iterable containing all of the registrations for the notification hub.
138
140
  */
139
- listRegistrations(options = {}) {
141
+ listRegistrations(
142
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
143
+ options = {}) {
140
144
  return listRegistrationsMethod(this._client, options);
141
145
  }
142
146
  /**
@@ -145,7 +149,9 @@ export class NotificationHubsClient {
145
149
  * @param options - The options for querying the registrations such as $top.
146
150
  * @returns A paged async iterable containing all of the registrations for the notification hub.
147
151
  */
148
- listRegistrationsByChannel(channel, options = {}) {
152
+ listRegistrationsByChannel(channel,
153
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
154
+ options = {}) {
149
155
  return listRegistrationsByChannelMethod(this._client, channel, options);
150
156
  }
151
157
  /**
@@ -154,7 +160,9 @@ export class NotificationHubsClient {
154
160
  * @param options - The query options such as $top.
155
161
  * @returns A paged async iterable containing the matching registrations for the notification hub.
156
162
  */
157
- listRegistrationsByTag(tag, options = {}) {
163
+ listRegistrationsByTag(tag,
164
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
165
+ options = {}) {
158
166
  return listRegistrationsByTagMethod(this._client, tag, options);
159
167
  }
160
168
  /**
@@ -163,7 +171,9 @@ export class NotificationHubsClient {
163
171
  * @param options - Options for the notification including whether to enable test send.
164
172
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
165
173
  */
166
- sendBroadcastNotification(notification, options = {}) {
174
+ sendBroadcastNotification(notification,
175
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
176
+ options = {}) {
167
177
  return sendBroadcastNotificationMethod(this._client, notification, options);
168
178
  }
169
179
  /**
@@ -240,7 +250,9 @@ export class NotificationHubsClient {
240
250
  * @param options - The operation options.
241
251
  * @returns A poller which can be called to poll until completion of the job.
242
252
  */
243
- beginSubmitNotificationHubJob(notificationHubJob, options = {}) {
253
+ beginSubmitNotificationHubJob(notificationHubJob,
254
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
255
+ options = {}) {
244
256
  return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);
245
257
  }
246
258
  /**
@@ -1 +1 @@
1
- {"version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;;OAMG;IACH,6BAA6B,CAC3B,cAAsB,EACtB,UAA4B,EAAE;QAE9B,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,qBAAqB,CACnB,KAAa,EACb,UAA4B,EAAE;QAE9B,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAsC,EACtC,UAAkC,EAAE;QAEpC,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
1
+ {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoBlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2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ACH,qBAAqB,CACnB,KAAa,EACb,UAA4B,EAAE;QAE9B,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAsC;IACtC,8DAA8D;IAC9D,UAAkC,EAAE;QAEpC,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
@@ -19,7 +19,9 @@ function createClientContext(connectionString, hubName, options = {}) {
19
19
  return new NotificationHubsServiceClient(connectionString, hubName, options);
20
20
  }
21
21
  class NotificationHubsServiceClient {
22
- constructor(connectionString, hubName, options = {}) {
22
+ constructor(connectionString, hubName,
23
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
24
+ options = {}) {
23
25
  var _a, _b;
24
26
  this.hubName = hubName;
25
27
  const parsedConnection = (0, connectionStringUtils_js_1.parseNotificationHubsConnectionString)(connectionString);
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA+ClC,kDAMC;;AAnDD,yEAAmD;AAOnD,kEAAkG;AAClG,+EAG0C;AAI1C,yDAAoD;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;;QAE3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,gBAAgB,GAAG,IAAA,gEAAqC,EAAC,gBAAgB,CAAC,CAAC;QACjF,mFAAmF;QACnF,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACtE,IAAI,CAAC,kBAAkB,GAAG,IAAA,8DAAmC,EAC3D,gBAAgB,CAAC,eAAe,EAChC,gBAAgB,CAAC,mBAAmB,CACrC,CAAC;QAEF,MAAM,cAAc,GAAG,6BAA6B,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5E,MAAM,eAAe,GAAG,CAAA,MAAA,OAAO,CAAC,gBAAgB,0CAAE,eAAe;YAC/D,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAExB,IAAI,CAAC,UAA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yright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
+ {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA+ClC,kDAMC;;AAnDD,yEAAmD;AAOnD,kEAAkG;AAClG,+EAG0C;AAI1C,yDAAoD;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,E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AC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.d.ts","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAGnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AA0BrE;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAgC;IAE/C;;;;;OAKG;gBAED,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC;IAK7C;;;;;OAKG;IACH,0BAA0B,CACxB,YAAY,EAAE,YAAY,EAC1B,OA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C,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,wBAAwB,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"}
@@ -122,7 +122,9 @@ class NotificationHubsClient {
122
122
  * @param options - The options for delete operations including the ETag
123
123
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
124
124
  */
125
- deleteRegistration(registrationId, options = {}) {
125
+ deleteRegistration(registrationId,
126
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
127
+ options = {}) {
126
128
  return (0, deleteRegistration_js_1.deleteRegistration)(this._client, registrationId, options);
127
129
  }
128
130
  /**
@@ -139,7 +141,9 @@ class NotificationHubsClient {
139
141
  * @param options - The options for querying the registrations such as $top.
140
142
  * @returns A paged async iterable containing all of the registrations for the notification hub.
141
143
  */
142
- listRegistrations(options = {}) {
144
+ listRegistrations(
145
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
146
+ options = {}) {
143
147
  return (0, listRegistrations_js_1.listRegistrations)(this._client, options);
144
148
  }
145
149
  /**
@@ -148,7 +152,9 @@ class NotificationHubsClient {
148
152
  * @param options - The options for querying the registrations such as $top.
149
153
  * @returns A paged async iterable containing all of the registrations for the notification hub.
150
154
  */
151
- listRegistrationsByChannel(channel, options = {}) {
155
+ listRegistrationsByChannel(channel,
156
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
157
+ options = {}) {
152
158
  return (0, listRegistrationsByChannel_js_1.listRegistrationsByChannel)(this._client, channel, options);
153
159
  }
154
160
  /**
@@ -157,7 +163,9 @@ class NotificationHubsClient {
157
163
  * @param options - The query options such as $top.
158
164
  * @returns A paged async iterable containing the matching registrations for the notification hub.
159
165
  */
160
- listRegistrationsByTag(tag, options = {}) {
166
+ listRegistrationsByTag(tag,
167
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
168
+ options = {}) {
161
169
  return (0, listRegistrationsByTag_js_1.listRegistrationsByTag)(this._client, tag, options);
162
170
  }
163
171
  /**
@@ -166,7 +174,9 @@ class NotificationHubsClient {
166
174
  * @param options - Options for the notification including whether to enable test send.
167
175
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
168
176
  */
169
- sendBroadcastNotification(notification, options = {}) {
177
+ sendBroadcastNotification(notification,
178
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
179
+ options = {}) {
170
180
  return (0, sendBroadcastNotification_js_1.sendBroadcastNotification)(this._client, notification, options);
171
181
  }
172
182
  /**
@@ -243,7 +253,9 @@ class NotificationHubsClient {
243
253
  * @param options - The operation options.
244
254
  * @returns A poller which can be called to poll until completion of the job.
245
255
  */
246
- beginSubmitNotificationHubJob(notificationHubJob, options = {}) {
256
+ beginSubmitNotificationHubJob(notificationHubJob,
257
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
258
+ options = {}) {
247
259
  return (0, beginSubmitNotificationHubJob_js_1.beginSubmitNotificationHubJob)(this._client, notificationHubJob, options);
248
260
  }
249
261
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAoBlC,6DAA6D;AAK7D,6FAA8H;AAC9H,yFAAwH;AACxH,uFAAqH;AACrH,uFAAqH;AACrH,2EAAmG;AACnG,uEAA6F;AAC7F,uEAA6F;AAC7F,uEAAiE;AACjE,iFAA4G;AAC5G,iEAAoF;AACpF,6EAAsG;AACtG,6FAA8H;AAC9H,iEAAoF;AACpF,iFAA4G;AAC5G,uFAAqH;AACrH,+EAAyG;AACzG,qEAA0F;AAC1F,6FAA8H;AAC9H,2EAAmG;AACnG,qFAAkH;AAClH,mEAAuF;AACvF,mFAA+G;AAC/G,uEAA6F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C,EAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,IAAA,sDAA8B,EAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,IAAA,oDAA6B,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAnUD,wDAmUC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
1
+ {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAoBlC,6DAA6D;AAK7D,6FAA8H;AAC9H,yFAAwH;AACxH,uFAAqH;AACrH,uFAAqH;AACrH,2EAAmG;AACnG,uEAA6F;AAC7F,uEAA6F;AAC7F,uEAAiE;AACjE,iFAA4G;AAC5G,iEAAoF;AACpF,6EAAsG;AACtG,6FAA8H;AAC9H,iEAAoF;AACpF,iFAA4G;AAC5G,uFAAqH;AACrH,+EAAyG;AACzG,qEAA0F;AAC1F,6FAA8H;AAC9H,2EAAmG;AACnG,qFAAkH;AAClH,mEAAuF;AACvF,mFAA+G;AAC/G,uEAA6F;AAC7F,uEAA6F;AAE7F;;;GAGG;AACH,MAAa,sBAAsB;IAGjC;;;;;OAKG;IACH,YACE,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;QAE3C,IAAI,CAAC,OA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,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,IAAA,sDAA8B,EAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,IAAA,oDAA6B,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAzUD,wDAyUC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
@@ -15,7 +15,9 @@ export function createClientContext(connectionString, hubName, options = {}) {
15
15
  return new NotificationHubsServiceClient(connectionString, hubName, options);
16
16
  }
17
17
  class NotificationHubsServiceClient {
18
- constructor(connectionString, hubName, options = {}) {
18
+ constructor(connectionString, hubName,
19
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
20
+ options = {}) {
19
21
  var _a, _b;
20
22
  this.hubName = hubName;
21
23
  const parsedConnection = parseNotificationHubsConnectionString(connectionString);
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,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SAAS,CAAC,IAAI,CAAC,OAAO,kBAClC,gBAAgB,EAAE;gBAChB,eAAe;aAChB,IACE,OAAO,EACV,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,aAAqB,EACrB,UAAmC;QAEnC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,SAAS,CAAC,wCAAwC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
+ {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAA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AC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.d.ts","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAGnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AA0BrE;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAgC;IAE/C;;;;;OAKG;gBAED,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC;IAK7C;;;;;OAKG;IACH,0BAA0B,CACxB,YAAY,EAAE,YAAY,EAC1B,OA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C,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,wBAAwB,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"}
@@ -119,7 +119,9 @@ export class NotificationHubsClient {
119
119
  * @param options - The options for delete operations including the ETag
120
120
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
121
121
  */
122
- deleteRegistration(registrationId, options = {}) {
122
+ deleteRegistration(registrationId,
123
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
124
+ options = {}) {
123
125
  return deleteRegistration(this._client, registrationId, options);
124
126
  }
125
127
  /**
@@ -136,7 +138,9 @@ export class NotificationHubsClient {
136
138
  * @param options - The options for querying the registrations such as $top.
137
139
  * @returns A paged async iterable containing all of the registrations for the notification hub.
138
140
  */
139
- listRegistrations(options = {}) {
141
+ listRegistrations(
142
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
143
+ options = {}) {
140
144
  return listRegistrationsMethod(this._client, options);
141
145
  }
142
146
  /**
@@ -145,7 +149,9 @@ export class NotificationHubsClient {
145
149
  * @param options - The options for querying the registrations such as $top.
146
150
  * @returns A paged async iterable containing all of the registrations for the notification hub.
147
151
  */
148
- listRegistrationsByChannel(channel, options = {}) {
152
+ listRegistrationsByChannel(channel,
153
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
154
+ options = {}) {
149
155
  return listRegistrationsByChannelMethod(this._client, channel, options);
150
156
  }
151
157
  /**
@@ -154,7 +160,9 @@ export class NotificationHubsClient {
154
160
  * @param options - The query options such as $top.
155
161
  * @returns A paged async iterable containing the matching registrations for the notification hub.
156
162
  */
157
- listRegistrationsByTag(tag, options = {}) {
163
+ listRegistrationsByTag(tag,
164
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
165
+ options = {}) {
158
166
  return listRegistrationsByTagMethod(this._client, tag, options);
159
167
  }
160
168
  /**
@@ -163,7 +171,9 @@ export class NotificationHubsClient {
163
171
  * @param options - Options for the notification including whether to enable test send.
164
172
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
165
173
  */
166
- sendBroadcastNotification(notification, options = {}) {
174
+ sendBroadcastNotification(notification,
175
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
176
+ options = {}) {
167
177
  return sendBroadcastNotificationMethod(this._client, notification, options);
168
178
  }
169
179
  /**
@@ -240,7 +250,9 @@ export class NotificationHubsClient {
240
250
  * @param options - The operation options.
241
251
  * @returns A poller which can be called to poll until completion of the job.
242
252
  */
243
- beginSubmitNotificationHubJob(notificationHubJob, options = {}) {
253
+ beginSubmitNotificationHubJob(notificationHubJob,
254
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
255
+ options = {}) {
244
256
  return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);
245
257
  }
246
258
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoBlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,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EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
1
+ {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoBlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,uBAAuB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,C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,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
@@ -15,7 +15,9 @@ export function createClientContext(connectionString, hubName, options = {}) {
15
15
  return new NotificationHubsServiceClient(connectionString, hubName, options);
16
16
  }
17
17
  class NotificationHubsServiceClient {
18
- constructor(connectionString, hubName, options = {}) {
18
+ constructor(connectionString, hubName,
19
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
20
+ options = {}) {
19
21
  var _a, _b;
20
22
  this.hubName = hubName;
21
23
  const parsedConnection = parseNotificationHubsConnectionString(connectionString);
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBA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AAC,wCAAwC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
+ {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAOnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,EACxB,OAAe;IACf,8DAA8D;IAC9D,UAAyC,EAAE;;QAE3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,gBAAgB,GAAG,qCAAqC,CAAC,gBAAgB,CAAC,CAAC;QACjF,mFAAmF;QACnF,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACtE,IAAI,CAAC,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QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport type {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { RestError, createDefaultHttpClient, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport type { NotificationHubsClientOptions } from \"../models/options.js\";\nimport type { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport type { Client } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.d.ts","sourceRoot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B,CACd,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,6BAA6B,GAAG,uBAAuB,GAC/D,OAAO,CAAC,+BAA+B,CAAC;IAI3C;;;;;;;OAOG;IACH,6BAA6B,CAC3B,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,+BAA+B,CAAC;IAI3C;;;;;;;OAOG;IACH,oBAAoB,CAClB,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,+BAA+B,CAAC;IAI3C;;;;;OAKG;IACH,2BAA2B,CACzB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,uBAAuB,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIxE;;;;;;OAMG;IACH,6BAA6B,CAC3B,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IAI/B;;;;;OAKG;IACH,qBAAqB,CACnB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAkB,EAAE,kBAAkB,EAEtC,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;;OAKG;IACH,wBAAwB,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"}
@@ -119,7 +119,9 @@ export class NotificationHubsClient {
119
119
  * @param options - The options for delete operations including the ETag
120
120
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
121
121
  */
122
- deleteRegistration(registrationId, options = {}) {
122
+ deleteRegistration(registrationId,
123
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
124
+ options = {}) {
123
125
  return deleteRegistration(this._client, registrationId, options);
124
126
  }
125
127
  /**
@@ -136,7 +138,9 @@ export class NotificationHubsClient {
136
138
  * @param options - The options for querying the registrations such as $top.
137
139
  * @returns A paged async iterable containing all of the registrations for the notification hub.
138
140
  */
139
- listRegistrations(options = {}) {
141
+ listRegistrations(
142
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
143
+ options = {}) {
140
144
  return listRegistrationsMethod(this._client, options);
141
145
  }
142
146
  /**
@@ -145,7 +149,9 @@ export class NotificationHubsClient {
145
149
  * @param options - The options for querying the registrations such as $top.
146
150
  * @returns A paged async iterable containing all of the registrations for the notification hub.
147
151
  */
148
- listRegistrationsByChannel(channel, options = {}) {
152
+ listRegistrationsByChannel(channel,
153
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
154
+ options = {}) {
149
155
  return listRegistrationsByChannelMethod(this._client, channel, options);
150
156
  }
151
157
  /**
@@ -154,7 +160,9 @@ export class NotificationHubsClient {
154
160
  * @param options - The query options such as $top.
155
161
  * @returns A paged async iterable containing the matching registrations for the notification hub.
156
162
  */
157
- listRegistrationsByTag(tag, options = {}) {
163
+ listRegistrationsByTag(tag,
164
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
165
+ options = {}) {
158
166
  return listRegistrationsByTagMethod(this._client, tag, options);
159
167
  }
160
168
  /**
@@ -163,7 +171,9 @@ export class NotificationHubsClient {
163
171
  * @param options - Options for the notification including whether to enable test send.
164
172
  * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
165
173
  */
166
- sendBroadcastNotification(notification, options = {}) {
174
+ sendBroadcastNotification(notification,
175
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
176
+ options = {}) {
167
177
  return sendBroadcastNotificationMethod(this._client, notification, options);
168
178
  }
169
179
  /**
@@ -240,7 +250,9 @@ export class NotificationHubsClient {
240
250
  * @param options - The operation options.
241
251
  * @returns A poller which can be called to poll until completion of the job.
242
252
  */
243
- beginSubmitNotificationHubJob(notificationHubJob, options = {}) {
253
+ beginSubmitNotificationHubJob(notificationHubJob,
254
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
255
+ options = {}) {
244
256
  return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);
245
257
  }
246
258
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoBlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,uBAAuB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;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AAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,2BAA2B,CACzB,cAAsB,EACtB,UAA4B,EAAE;QAE9B,OAAO,iCAAiC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACH,6BAA6B,CAC3B,cAAsB,EACtB,UAA4B,EAAE;QAE9B,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,qBAAqB,CACnB,KAAa,EACb,UAA4B,EAAE;QAE9B,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAsC,EACtC,UAAkC,EAAE;QAEpC,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
1
+ {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoBlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,uBAAuB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AACtG,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,uBAAuB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,E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cAAc,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACH,6BAA6B,CAC3B,cAAsB,EACtB,UAA4B,EAAE;QAE9B,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,qBAAqB,CACnB,KAAa,EACb,UAA4B,EAAE;QAE9B,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,6BAA6B,CAC3B,kBAAsC;IACtC,8DAA8D;IAC9D,UAAkC,EAAE;QAEpC,OAAO,mCAAmC,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CACtB,GAAuB,EACvB,UAA4B,EAAE;QAE9B,OAAO,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n BroadcastSendNotificationOptions,\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport type { Installation, JsonPatch } from \"./models/installation.js\";\nimport type {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport type { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./api/clientContext.js\";\nimport { createClientContext } from \"./api/clientContext.js\";\nimport type { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport type { Notification } from \"./models/notification.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./api/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./api/sendBroadcastNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices all devices.\n * @param notification - The notification to send to all devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: BroadcastSendNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - The operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleBroadcastNotification(\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleBroadcastNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/notification-hubs",
3
- "version": "2.0.1-alpha.20250106.1",
3
+ "version": "2.0.1-alpha.20250108.1",
4
4
  "description": "Azure Notification Hubs SDK for JavaScript",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",