@azure/notification-hubs 1.0.0-beta.4 → 1.0.0-beta.5

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.
@@ -7,6 +7,7 @@ import { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from "
7
7
  import { createRegistrationId as createRegistrationIdMethod } from "./client/createRegistrationId.js";
8
8
  import { createRegistration as createRegistrationMethod } from "./client/createRegistration.js";
9
9
  import { deleteInstallation as deleteInstallationMethod } from "./client/deleteInstallation.js";
10
+ import { deleteRegistration } from "./client/deleteRegistration.js";
10
11
  import { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from "./client/getFeedbackContainerUrl.js";
11
12
  import { getInstallation as getInstallationMethod } from "./client/getInstallation.js";
12
13
  import { getNotificationHubJob as getNotificationHubJobMethod } from "./client/getNotificationHubJob.js";
@@ -110,6 +111,16 @@ export class NotificationHubsServiceClient {
110
111
  updateRegistration(registration, options = {}) {
111
112
  return updateRegistrationMethod(this._client, registration, options);
112
113
  }
114
+ /**
115
+ * Deletes a registration with the given registration ID.
116
+ * @param context - The Notification Hubs client.
117
+ * @param registrationId - The registration ID of the registration to delete.
118
+ * @param options - The options for delete operations including the ETag
119
+ * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
120
+ */
121
+ deleteRegistration(registrationId, options = {}) {
122
+ return deleteRegistration(this._client, registrationId, options);
123
+ }
113
124
  /**
114
125
  * Gets a registration by the given registration ID.
115
126
  * @param registrationId - The ID of the registration to get.
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAiC,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAYvF,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAC3H,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,M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ED;;;;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 { Installation, JsonPatch, PushHandle } from \"./models/installation.js\";\nimport {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport { NotificationHubsClientContext, createClientContext } from \"./client/index.js\";\nimport {\n NotificationHubsClientOptions,\n RegistrationQueryLimitOptions,\n RegistrationQueryOptions,\n SendOperationOptions,\n} from \"./models/options.js\";\nimport { Notification } from \"./models/notification.js\";\nimport { NotificationHubJob } from \"./models/notificationHubJob.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"./models/registration.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./client/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./client/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./client/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./client/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./client/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./client/deleteInstallation.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./client/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./client/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./client/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./client/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./client/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./client/listNotificationHubJobs.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./client/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./client/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./client/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./client/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./client/sendBroadcastNotification.js\";\nimport { sendDirectNotification as sendDirectNotificationMethod } from \"./client/sendDirectNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./client/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./client/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./client/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./client/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 NotificationHubsServiceClient {\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 * 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 and $filter.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryOptions = {}\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, 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 a direct push notification to a device with the given push handle.\n * @param pushHandle - The push handle which is the unique identifier for the device.\n * @param notification - The notification to send to the device.\n * @param options - The options for sending a direct notification.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendDirectNotification(\n pushHandle: PushHandle,\n notification: Notification,\n options: OperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendDirectNotificationMethod(this._client, pushHandle, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param tags - The tags used to target the device for push notifications in either an array or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n tags: string[] | string,\n notification: Notification,\n options: SendOperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, tags, notification, options);\n }\n\n /**\n * Sends push notifications to all devices on the Notification Hub.\n * @param notification - The notification to send to all devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: SendOperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, 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 tags - The tags used to target the device for push notifications in either an array or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n tags: string[] | string,\n notification: Notification,\n options: OperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, tags, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices registered on the Notification Hub.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\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 * 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. 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":[],"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AA4B,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,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 { Installation, JsonPatch, PushHandle } from \"./models/installation.js\";\nimport {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport { NotificationHubsClientContext, createClientContext } from \"./client/index.js\";\nimport {\n EntityOperationOptions,\n NotificationHubsClientOptions,\n RegistrationQueryLimitOptions,\n RegistrationQueryOptions,\n SendOperationOptions,\n} from \"./models/options.js\";\nimport { Notification } from \"./models/notification.js\";\nimport { NotificationHubJob } from \"./models/notificationHubJob.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"./models/registration.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./client/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./client/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./client/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./client/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./client/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./client/deleteInstallation.js\";\nimport { deleteRegistration } from \"./client/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./client/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./client/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./client/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./client/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./client/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./client/listNotificationHubJobs.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./client/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./client/listRegistrations.js\";\nimport { scheduleBroadcastNotification as scheduleBroadcastNotificationMethod } from \"./client/scheduleBroadcastNotification.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./client/scheduleNotification.js\";\nimport { sendBroadcastNotification as sendBroadcastNotificationMethod } from \"./client/sendBroadcastNotification.js\";\nimport { sendDirectNotification as sendDirectNotificationMethod } from \"./client/sendDirectNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./client/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./client/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./client/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./client/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 NotificationHubsServiceClient {\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 and $filter.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryOptions = {}\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, 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 a direct push notification to a device with the given push handle.\n * @param pushHandle - The push handle which is the unique identifier for the device.\n * @param notification - The notification to send to the device.\n * @param options - The options for sending a direct notification.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendDirectNotification(\n pushHandle: PushHandle,\n notification: Notification,\n options: OperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendDirectNotificationMethod(this._client, pushHandle, notification, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param tags - The tags used to target the device for push notifications in either an array or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n tags: string[] | string,\n notification: Notification,\n options: SendOperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(this._client, tags, notification, options);\n }\n\n /**\n * Sends push notifications to all devices on the Notification Hub.\n * @param notification - The notification to send to all devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendBroadcastNotification(\n notification: Notification,\n options: SendOperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return sendBroadcastNotificationMethod(this._client, 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 tags - The tags used to target the device for push notifications in either an array or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n tags: string[] | string,\n notification: Notification,\n options: OperationOptions = {}\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, tags, notification, options);\n }\n\n /**\n * Schedules a push notification to all devices registered on the Notification Hub.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\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 * 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. 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"]}
@@ -39,7 +39,8 @@ export async function parseNotificationHubJobFeed(bodyText) {
39
39
  if (!isDefined(xml.feed.entry)) {
40
40
  return results;
41
41
  }
42
- for (const item of xml.feed.entry) {
42
+ const entries = Array.isArray(xml.feed.entry) ? xml.feed.entry : [xml.feed.entry];
43
+ for (const item of entries) {
43
44
  results.push(createNotificationHubJob(item.content.NotificationHubJob));
44
45
  }
45
46
  return results;
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubJobSerializer.js","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB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kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACnD,SAAS,EAAE,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACnD,eAAe;QACf,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n NotificationHubJob,\n NotificationHubJobStatus,\n NotificationHubJobType,\n} from \"../models/notificationHubJob.js\";\nimport {\n getDateOrUndefined,\n getFloatOrUndefined,\n getString,\n getStringOrUndefined,\n isDefined,\n} from \"../utils/utils.js\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport { serializeToAtomXmlRequest } from \"../utils/xmlUtils.js\";\n\n/**\n * @internal\n * Serializes a NotificationHubJob into an Atom XML entry.\n * @param entry - The NotificationHubJob to turn into an Atom XML entry.\n * @returns An Atom XML entry containing the notification hub job.\n */\nexport function serializeNotificationHubJobEntry(entry: NotificationHubJob): string {\n const job: Record<string, any> = {\n Type: entry.type,\n OutputContainerUri: { __cdata: entry.outputContainerUrl },\n ImportFileUri: isDefined(entry.importFileUrl) ? { __cdata: entry.importFileUrl } : undefined,\n };\n\n const requestObject = serializeToAtomXmlRequest(\"NotificationHubJob\", job);\n\n return stringifyXML(requestObject, { rootName: \"entry\", cdataPropName: \"__cdata\" });\n}\n\n/**\n * Parses an Atom XML of an notification hub job entry.\n * @param bodyText - The incoming Atom XML entry to parse into a notification hub job.\n * @returns A parsed NotificationHubJob.\n */\nexport async function parseNotificationHubJobEntry(bodyText: string): Promise<NotificationHubJob> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const content = xml.entry.content.NotificationHubJob;\n return createNotificationHubJob(content);\n}\n\n/**\n * Parses an Atom XML feed of notification hub jobs.\n * @param bodyText - The incoming Atom XML feed to parse into notification hub jobs.\n * @returns A list of notification hub jobs.\n */\nexport async function parseNotificationHubJobFeed(bodyText: string): Promise<NotificationHubJob[]> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const results: NotificationHubJob[] = [];\n\n if (!isDefined(xml.feed.entry)) {\n return results;\n }\n\n for (const item of xml.feed.entry) {\n results.push(createNotificationHubJob(item.content.NotificationHubJob));\n }\n\n return results;\n}\n\nfunction createInputOutputProperties(content: Record<string, any>): Record<string, string> {\n const props: Record<string, string> = {};\n for (const item of content[\"d3p1:KeyValueOfstringstring\"]) {\n props[item[\"d3p1:Key\"]] = item[\"d3p1:Value\"];\n }\n\n return props;\n}\n\nfunction createNotificationHubJob(content: Record<string, any>): NotificationHubJob {\n let outputProperties: Record<string, string> | undefined;\n if (isDefined(content[\"OutputProperties\"])) {\n outputProperties = createInputOutputProperties(content[\"OutputProperties\"]);\n }\n\n let inputProperties: Record<string, string> | undefined;\n if (isDefined(content[\"InputProperties\"])) {\n inputProperties = createInputOutputProperties(content[\"InputProperties\"]);\n }\n\n return {\n jobId: getStringOrUndefined(content[\"JobId\"]),\n type: getString(content[\"Type\"], \"type\") as NotificationHubJobType,\n status: getStringOrUndefined(content[\"Status\"]) as NotificationHubJobStatus,\n progress: getFloatOrUndefined(content[\"Progress\"]),\n outputContainerUrl: getString(content[\"OutputContainerUri\"], \"outputContainerUrl\"),\n importFileUrl: getStringOrUndefined(content[\"ImportFileUri\"]),\n failure: getStringOrUndefined(content[\"Failure\"]),\n createdAt: getDateOrUndefined(content[\"CreatedAt\"]),\n updatedAt: getDateOrUndefined(content[\"UpdatedAt\"]),\n inputProperties,\n outputProperties,\n };\n}\n"]}
1
+ {"version":3,"file":"notificationHubJobSerializer.js","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,yBAAyB,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AC,OAAO,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;QAClF,aAAa,EAAE,oBAAoB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAC7D,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACjD,SAAS,EAAE,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACnD,SAAS,EAAE,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACnD,eAAe;QACf,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n NotificationHubJob,\n NotificationHubJobStatus,\n NotificationHubJobType,\n} from \"../models/notificationHubJob.js\";\nimport {\n getDateOrUndefined,\n getFloatOrUndefined,\n getString,\n getStringOrUndefined,\n isDefined,\n} from \"../utils/utils.js\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport { serializeToAtomXmlRequest } from \"../utils/xmlUtils.js\";\n\n/**\n * @internal\n * Serializes a NotificationHubJob into an Atom XML entry.\n * @param entry - The NotificationHubJob to turn into an Atom XML entry.\n * @returns An Atom XML entry containing the notification hub job.\n */\nexport function serializeNotificationHubJobEntry(entry: NotificationHubJob): string {\n const job: Record<string, any> = {\n Type: entry.type,\n OutputContainerUri: { __cdata: entry.outputContainerUrl },\n ImportFileUri: isDefined(entry.importFileUrl) ? { __cdata: entry.importFileUrl } : undefined,\n };\n\n const requestObject = serializeToAtomXmlRequest(\"NotificationHubJob\", job);\n\n return stringifyXML(requestObject, { rootName: \"entry\", cdataPropName: \"__cdata\" });\n}\n\n/**\n * Parses an Atom XML of an notification hub job entry.\n * @param bodyText - The incoming Atom XML entry to parse into a notification hub job.\n * @returns A parsed NotificationHubJob.\n */\nexport async function parseNotificationHubJobEntry(bodyText: string): Promise<NotificationHubJob> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const content = xml.entry.content.NotificationHubJob;\n return createNotificationHubJob(content);\n}\n\n/**\n * Parses an Atom XML feed of notification hub jobs.\n * @param bodyText - The incoming Atom XML feed to parse into notification hub jobs.\n * @returns A list of notification hub jobs.\n */\nexport async function parseNotificationHubJobFeed(bodyText: string): Promise<NotificationHubJob[]> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const results: NotificationHubJob[] = [];\n\n if (!isDefined(xml.feed.entry)) {\n return results;\n }\n\n const entries = Array.isArray(xml.feed.entry) ? xml.feed.entry : [xml.feed.entry];\n\n for (const item of entries) {\n results.push(createNotificationHubJob(item.content.NotificationHubJob));\n }\n\n return results;\n}\n\nfunction createInputOutputProperties(content: Record<string, any>): Record<string, string> {\n const props: Record<string, string> = {};\n for (const item of content[\"d3p1:KeyValueOfstringstring\"]) {\n props[item[\"d3p1:Key\"]] = item[\"d3p1:Value\"];\n }\n\n return props;\n}\n\nfunction createNotificationHubJob(content: Record<string, any>): NotificationHubJob {\n let outputProperties: Record<string, string> | undefined;\n if (isDefined(content[\"OutputProperties\"])) {\n outputProperties = createInputOutputProperties(content[\"OutputProperties\"]);\n }\n\n let inputProperties: Record<string, string> | undefined;\n if (isDefined(content[\"InputProperties\"])) {\n inputProperties = createInputOutputProperties(content[\"InputProperties\"]);\n }\n\n return {\n jobId: getStringOrUndefined(content[\"JobId\"]),\n type: getString(content[\"Type\"], \"type\") as NotificationHubJobType,\n status: getStringOrUndefined(content[\"Status\"]) as NotificationHubJobStatus,\n progress: getFloatOrUndefined(content[\"Progress\"]),\n outputContainerUrl: getString(content[\"OutputContainerUri\"], \"outputContainerUrl\"),\n importFileUrl: getStringOrUndefined(content[\"ImportFileUri\"]),\n failure: getStringOrUndefined(content[\"Failure\"]),\n createdAt: getDateOrUndefined(content[\"CreatedAt\"]),\n updatedAt: getDateOrUndefined(content[\"UpdatedAt\"]),\n inputProperties,\n outputProperties,\n };\n}\n"]}
@@ -30,7 +30,8 @@ export const registrationDescriptionParser = {
30
30
  if (!isDefined(xml.feed.entry)) {
31
31
  return results;
32
32
  }
33
- for (const entry of xml.feed.entry) {
33
+ const entries = Array.isArray(xml.feed.entry) ? xml.feed.entry : [xml.feed.entry];
34
+ for (const entry of entries) {
34
35
  delete entry.content["$"];
35
36
  const keyName = Object.keys(entry.content)[0];
36
37
  const methodName = `create${keyName}`;
@@ -1 +1 @@
1
- {"version":3,"file":"registrationSerializer.js","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsBlC,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAoHjE,MAAM,CAAC,MAAM,6BAA6B,GAAkC;IAC1E;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,QAAgB;QAC3C,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,CAAC;QAEtC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAiD,CAAQ,CAAC;QAC9E,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,SAAS,CAAC,GAAG,OAAO,uCAAuC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;SAC7F;QAED,OAAO,MAAM,CAAC,I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,aAAa;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,wCAAwC,CAC/C,WAA4C;IAE5C,OAAO;QACL,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,YAAY,EAAE;QACnD,YAAY,EAAE,oBAAoB,CAAC,WAAW,CAAC,YAAY,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AdmRegistrationDescription,\n AdmTemplateRegistrationDescription,\n ApplePriority,\n AppleRegistrationDescription,\n AppleTemplateRegistrationDescription,\n BaiduRegistrationDescription,\n BaiduTemplateRegistrationDescription,\n BrowserRegistrationDescription,\n BrowserTemplateRegistrationDescription,\n GcmRegistrationDescription,\n GcmTemplateRegistrationDescription,\n MpnsRegistrationDescription,\n MpnsTemplateRegistrationDescription,\n RegistrationDescription,\n RegistrationDescriptionCommon,\n TemplateRegistrationDescription,\n WindowsRegistrationDescription,\n WindowsTemplateRegistrationDescription,\n} from \"../models/registration.js\";\nimport {\n getDateOrUndefined,\n getString,\n getStringOrUndefined,\n getTagsOrUndefined,\n isDefined,\n} from \"../utils/utils.js\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { serializeToAtomXmlRequest } from \"../utils/xmlUtils.js\";\n\n/**\n * Represents a registration description parser from the incoming XML.\n */\nexport interface RegistrationDescriptionParser {\n /**\n * @internal\n * Creates a registration type from the incoming entry.\n */\n parseRegistrationEntry: (bodyText: string) => Promise<RegistrationDescription>;\n /**\n * @internal\n * Creates a list of registrations from an incoming ATOM XML Feed.\n */\n parseRegistrationFeed: (bodyText: string) => Promise<RegistrationDescription[]>;\n /**\n * @internal\n * Creates an Amazon Device Messaging (ADM) registration description from the incoming parsed XML.\n */\n createAdmRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AdmRegistrationDescription;\n /**\n * @internal\n * Creates an Amazon Device Messaging (ADM) template registration description from the incoming parsed XML.\n */\n createAdmTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AdmTemplateRegistrationDescription;\n /**\n * @internal\n * Creates an Apple Platform Notification Services (APNs) registration description from the incoming parsed XML.\n */\n createAppleRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AppleRegistrationDescription;\n /**\n * @internal\n * Creates an Apple Platform Notification Services (APNs) template registration description from the incoming parsed XML.\n */\n createAppleTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AppleTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Baidu registration description from the incoming parsed XML.\n */\n createBaiduRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BaiduRegistrationDescription;\n /**\n * @internal\n * Creates a Baidu template registration description from the incoming parsed XML.\n */\n createBaiduTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BaiduTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Web Push registration description from the incoming parsed XML.\n */\n createBrowserRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BrowserRegistrationDescription;\n /**\n * @internal\n * Creates a Web Push template registration description from the incoming parsed XML.\n */\n createBrowserTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BrowserTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Google Cloud Messaging (GCM) registration description from the incoming parsed XML.\n */\n createGcmRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => GcmRegistrationDescription;\n /**\n * @internal\n * Creates a Google Cloud Messaging (GCM) template registration description from the incoming parsed XML.\n */\n createGcmTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => GcmTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Microsoft Phone Notification Services (MPNS) registration description from the incoming parsed XML.\n */\n createMpnsRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => MpnsRegistrationDescription;\n /**\n * @internal\n * Creates a Microsoft Phone Notification Services (MPNS) template registration description from the incoming parsed XML.\n */\n createMpnsTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => MpnsTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Windows Notification Services (WNS) registration description from the incoming parsed XML.\n */\n createWindowsRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => WindowsRegistrationDescription;\n /**\n * @internal\n * Creates a Windows Notification Services (WNS) template registration description from the incoming parsed XML.\n */\n createWindowsTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => WindowsTemplateRegistrationDescription;\n}\n\nexport const registrationDescriptionParser: RegistrationDescriptionParser = {\n /**\n * @internal\n * Creates a registration type from the incoming entry.\n */\n async parseRegistrationEntry(bodyText: string): Promise<RegistrationDescription> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const keyName = Object.keys(xml.entry.content)[0];\n const content = xml.entry.content[keyName];\n const methodName = `create${keyName}`;\n\n const method = this[methodName as keyof RegistrationDescriptionParser] as any;\n if (!methodName) {\n throw new RestError(`${keyName} is not a supported registration type`, { statusCode: 500 });\n }\n\n return method.call(this, content) as RegistrationDescription;\n },\n\n /**\n * @internal\n * Creates a list of registrations from an incoming ATOM XML Feed.\n */\n async parseRegistrationFeed(bodyText: string): Promise<RegistrationDescription[]> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const results: RegistrationDescription[] = [];\n if (!isDefined(xml.feed.entry)) {\n return results;\n }\n\n for (const entry of xml.feed.entry) {\n delete entry.content[\"$\"];\n\n const keyName = Object.keys(entry.content)[0];\n const methodName = `create${keyName}`;\n const content = entry.content[keyName];\n const method = this[methodName as keyof RegistrationDescriptionParser] as any;\n if (!methodName) {\n throw new RestError(`${keyName} is not a supported registration type`, { statusCode: 500 });\n }\n\n results.push(method.call(this, content) as RegistrationDescription);\n }\n\n return results;\n },\n\n /**\n * @internal\n * Creates an ADM registration description from incoming XML property bag.\n */\n createAdmRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AdmRegistrationDescription {\n return {\n admRegistrationId: getString(\n rawRegistrationDescription[\"AdmRegistrationId\"],\n \"admRegistrationId\"\n ),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Adm\",\n };\n },\n\n /**\n * @internal\n * Creates an ADM template registration description from incoming XML property bag.\n */\n createAdmTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AdmTemplateRegistrationDescription {\n return {\n ...this.createAdmRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"AdmTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates an Apple registration description from incoming XML property bag.\n */\n createAppleRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AppleRegistrationDescription {\n return {\n deviceToken: getString(rawRegistrationDescription[\"DeviceToken\"], \"deviceToken\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Apple\",\n };\n },\n\n /**\n * @internal\n * Creates an Apple template registration description from incoming XML property bag.\n */\n createAppleTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AppleTemplateRegistrationDescription {\n return {\n priority: getStringOrUndefined(rawRegistrationDescription[\"Priority\"]) as ApplePriority,\n apnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"ApnsHeaders\"]?.[\"ApnsHeader\"]),\n ...this.createAppleRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"AppleTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Baidu registration description from incoming XML property bag.\n */\n createBaiduRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BaiduRegistrationDescription {\n return {\n baiduChannelId: getString(rawRegistrationDescription[\"BaiduChannelId\"], \"baiduChannelId\"),\n baiduUserId: getString(rawRegistrationDescription[\"BaiduUserId\"], \"baiduUserId\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Baidu\",\n };\n },\n\n /**\n * @internal\n * Creates a Baidu template registration description from incoming XML property bag.\n */\n createBaiduTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BaiduTemplateRegistrationDescription {\n return {\n ...this.createBaiduRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"BaiduTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Browser registration description from incoming XML property bag.\n */\n createBrowserRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BrowserRegistrationDescription {\n return {\n endpoint: getString(rawRegistrationDescription[\"Endpoint\"], \"endpoint\"),\n p256dh: getString(rawRegistrationDescription[\"P256DH\"], \"p256dh\"),\n auth: getString(rawRegistrationDescription[\"Auth\"], \"auth\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Browser\",\n };\n },\n\n /**\n * @internal\n * Creates a Browser template registration description from incoming XML property bag.\n */\n createBrowserTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BrowserTemplateRegistrationDescription {\n return {\n ...this.createBrowserRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"BrowserTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates an GCM registration description from incoming XML property bag.\n */\n createGcmRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): GcmRegistrationDescription {\n return {\n gcmRegistrationId: getString(\n rawRegistrationDescription[\"GcmRegistrationId\"],\n \"gcmRegistrationId\"\n ),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Gcm\",\n };\n },\n\n /**\n * @internal\n * Creates an FCM template registration description from incoming XML property bag.\n */\n createGcmTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): GcmTemplateRegistrationDescription {\n return {\n ...this.createGcmRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"GcmTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows Phone registration description from incoming XML property bag.\n */\n createMpnsRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): MpnsRegistrationDescription {\n return {\n channelUri: getString(rawRegistrationDescription[\"ChannelUri\"], \"channelUri\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Mpns\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows Phone template registration description from incoming XML property bag.\n */\n createMpnsTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): MpnsTemplateRegistrationDescription {\n return {\n mpnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"MpnsHeaders\"]?.[\"MpnsHeader\"]),\n ...this.createWindowsRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"MpnsTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows registration description from incoming XML property bag.\n */\n createWindowsRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): WindowsRegistrationDescription {\n return {\n channelUri: getString(rawRegistrationDescription[\"ChannelUri\"], \"channelUri\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Windows\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows template registration description from incoming XML property bag.\n */\n createWindowsTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): WindowsTemplateRegistrationDescription {\n return {\n wnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"WnsHeaders\"]?.[\"WnsHeader\"]),\n ...this.createWindowsRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"WindowsTemplate\",\n };\n },\n};\n\nfunction getHeadersOrUndefined(\n value?: { Header: string; Value: string }[]\n): Record<string, string> | undefined {\n if (!isDefined(value)) {\n return undefined;\n }\n\n const headerObj: Record<string, string> = {};\n for (const { Header, Value } of value) {\n headerObj[Header] = Value;\n }\n\n return headerObj;\n}\n\nfunction createRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n): Omit<RegistrationDescriptionCommon, \"type\"> {\n let pushVariables: Record<string, string> | undefined;\n const unparsed = getStringOrUndefined(rawRegistrationDescription[\"PushVariables\"]);\n if (unparsed) {\n pushVariables = JSON.parse(unparsed) as Record<string, string>;\n }\n\n return {\n registrationId: getStringOrUndefined(rawRegistrationDescription[\"RegistrationId\"]),\n expirationTime: getDateOrUndefined(rawRegistrationDescription[\"ExpirationTime\"]),\n etag: getStringOrUndefined(rawRegistrationDescription[\"ETag\"]),\n tags: getTagsOrUndefined(rawRegistrationDescription[\"Tags\"]),\n pushVariables: pushVariables,\n };\n}\n\nfunction createTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n): TemplateRegistrationDescription {\n return {\n bodyTemplate: getString(rawRegistrationDescription[\"BodyTemplate\"], \"bodyTemplate\"),\n templateName: getStringOrUndefined(rawRegistrationDescription[\"TemplateName\"]),\n ...createRegistrationDescription(rawRegistrationDescription),\n };\n}\n\n/**\n * @internal\n * Represents a serializer for all registration descriptions.\n */\nexport interface RegistrationDescriptionSerializer {\n /**\n * @internal\n * Serializes a registration description into an ATOM XML string.\n */\n serializeRegistrationDescription(description: RegistrationDescription): string;\n /**\n * @internal\n * Serializes an Amazon Device Messaging (ADM) registration description into an XML object for serialization.\n */\n serializeAdmRegistrationDescription(\n description: Omit<AdmRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Amazon Device Messaging (ADM) template registration description into an XML object for serialization.\n */\n serializeAdmTemplateRegistrationDescription(\n description: Omit<AdmTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Apple registration description into an XML object for serialization.\n */\n serializeAppleRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Apple template registration description into an XML object for serialization.\n */\n serializeAppleTemplateRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Baidu registration description into an XML object for serialization.\n */\n serializeBaiduRegistrationDescription(\n description: Omit<BaiduRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Baidu template registration description into an XML object for serialization.\n */\n serializeBaiduTemplateRegistrationDescription(\n description: Omit<BaiduTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Web Push registration description into an XML object for serialization.\n */\n serializeBrowserRegistrationDescription(\n description: Omit<BrowserRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Web Push template registration description into an XML object for serialization.\n */\n serializeBrowserTemplateRegistrationDescription(\n description: Omit<BrowserTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Google Cloud Messaging (GCM) registration description into an XML object for serialization.\n */\n serializeGcmRegistrationDescription(\n description: Omit<GcmRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Google Cloud Messaging (GCM) template registration description into an XML object for serialization.\n */\n serializeGcmTemplateRegistrationDescription(\n description: Omit<GcmTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Phone registration description into an XML object for serialization.\n */\n serializeMpnsRegistrationDescription(\n description: Omit<MpnsRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Phone template registration description into an XML object for serialization.\n */\n serializeMpnsTemplateRegistrationDescription(\n description: Omit<MpnsTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Notification Services (WNS) registration description into an XML object for serialization.\n */\n serializeWindowsRegistrationDescription(\n description: Omit<WindowsRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Notification Services (WNS) template registration description into an XML object for serialization.\n */\n serializeWindowsTemplateRegistrationDescription(\n description: Omit<WindowsTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n}\n\n/**\n * Represents a RegistrationDescription serializer.\n */\nexport const registrationDescriptionSerializer: RegistrationDescriptionSerializer = {\n serializeRegistrationDescription(description: RegistrationDescription): string {\n const rootName = `${description.type}RegistrationDescription`;\n const methodName = `serialize${rootName}`;\n\n const method = this[methodName as keyof RegistrationDescriptionSerializer].bind(this) as (\n description: RegistrationDescription\n ) => Record<string, any>;\n if (!isDefined(method)) {\n throw new RestError(`Undefined platform ${description.type}`, { statusCode: 400 });\n }\n\n const registration = method(description) as Record<string, any>;\n const requestObject = serializeToAtomXmlRequest(rootName, registration);\n\n return stringifyXML(requestObject, { rootName: \"entry\" });\n },\n\n /**\n * @internal\n * Serializes an existing ADM registration description to an object for serialization.\n */\n serializeAdmRegistrationDescription(\n description: Omit<AdmRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n AdmRegistrationId: getString(description.admRegistrationId, \"admRegistrationId\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing ADM template registration description to an object for serialization.\n */\n serializeAdmTemplateRegistrationDescription(\n description: Omit<AdmTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeAdmRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Apple registration description to an object for serialization.\n */\n serializeAppleRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n DeviceToken: getString(description.deviceToken, \"deviceToken\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Apple template registration description to an object for serialization.\n */\n serializeAppleTemplateRegistrationDescription(\n description: AppleTemplateRegistrationDescription\n ): Record<string, any> {\n let apnsHeaders: Record<string, any> | undefined;\n if (description.apnsHeaders) {\n apnsHeaders = {\n ApnsHeader: [],\n };\n\n for (const header of Object.keys(description.apnsHeaders)) {\n apnsHeaders[\"ApnsHeader\"].push({\n Header: header,\n Value: description.apnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeAppleRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n Expiry: getStringOrUndefined(description.expiry),\n ApnsHeaders: apnsHeaders,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Baidu registration description to an object for serialization.\n */\n serializeBaiduRegistrationDescription(\n description: Omit<BaiduRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n BaiduChannelId: getString(description.baiduChannelId, \"baiduChannelId\"),\n BaiduUserId: getString(description.baiduUserId, \"baiduUserId\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Baidu template registration description to an object for serialization.\n */\n serializeBaiduTemplateRegistrationDescription(\n description: Omit<BaiduTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeBaiduRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Browser registration description to an object for serialization.\n */\n serializeBrowserRegistrationDescription(\n description: Omit<BrowserRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n Endpoint: description.endpoint,\n Auth: description.auth,\n P256DH: description.p256dh,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Browser template registration description to an object for serialization.\n */\n serializeBrowserTemplateRegistrationDescription(\n description: Omit<BrowserTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeBrowserRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * @deprecated Should use FCM registrations instead of GCM.\n * Serializes an existing GCM registration description to an object for serialization.\n */\n serializeGcmRegistrationDescription(\n description: Omit<GcmRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n GcmRegistrationId: getString(description.gcmRegistrationId, \"gcmRegistrationId\"),\n };\n },\n\n /**\n * @internal\n * @deprecated Should use FCM template registrations instead of GCM.\n * Serializes an existing GCM template registration description to an object for serialization.\n */\n serializeGcmTemplateRegistrationDescription(\n description: Omit<GcmTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeGcmRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * @deprecated Windows Phone is no longer supported.\n * Serializes an existing MPNS registration description to an object for serialization.\n */\n serializeMpnsRegistrationDescription(\n description: Omit<MpnsRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n ChannelUri: description.channelUri,\n };\n },\n\n /**\n * @internal\n * @deprecated Windows Phone is no longer supported.\n * Serializes an existing MPNS template registration description to an object for serialization.\n */\n serializeMpnsTemplateRegistrationDescription(\n description: Omit<MpnsTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n let mpnsHeaders: Record<string, any> | undefined;\n if (description.mpnsHeaders) {\n mpnsHeaders = {\n MpnsHeader: [],\n };\n\n for (const header of Object.keys(description.mpnsHeaders)) {\n mpnsHeaders[\"MpnsHeader\"].push({\n Header: header,\n Value: description.mpnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeMpnsRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n MpnsHeaders: mpnsHeaders,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Windows registration description to an object for serialization.\n */\n serializeWindowsRegistrationDescription(\n description: Omit<WindowsRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n ChannelUri: description.channelUri,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Windows template registration description to an object for serialization.\n */\n serializeWindowsTemplateRegistrationDescription(\n description: Omit<WindowsTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n let wnsHeaders: Record<string, any> | undefined;\n if (description.wnsHeaders) {\n wnsHeaders = {\n WnsHeader: [],\n };\n\n for (const header of Object.keys(description.wnsHeaders)) {\n wnsHeaders[\"WnsHeader\"].push({\n Header: header,\n Value: description.wnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeWindowsRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n WnsHeaders: wnsHeaders,\n };\n },\n};\n\nfunction serializeRegistrationDescription(\n description: Omit<RegistrationDescriptionCommon, \"type\">\n): Record<string, any> {\n let tags: string | undefined;\n if (description.tags) {\n tags = description.tags.join(\",\");\n }\n\n let pushVariables: string | undefined;\n if (description.pushVariables) {\n pushVariables = JSON.stringify(description.pushVariables);\n }\n\n return {\n RegistrationId: getStringOrUndefined(description.registrationId),\n Tags: tags,\n PushVariables: pushVariables,\n };\n}\n\nfunction serializeTemplateRegistrationDescription(\n description: TemplateRegistrationDescription\n): Record<string, any> {\n return {\n BodyTemplate: { __cdata: description.bodyTemplate },\n TemplateName: getStringOrUndefined(description.templateName),\n };\n}\n"]}
1
+ {"version":3,"file":"registrationSerializer.js","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsBlC,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAoHjE,MAAM,CAAC,MAAM,6BAA6B,GAAkC;IAC1E;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,QAAgB;QAC3C,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3C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AAC;CACF,CAAC;AAEF,SAAS,gCAAgC,CACvC,WAAwD;IAExD,IAAI,IAAwB,CAAC;IAC7B,IAAI,WAAW,CAAC,IAAI,EAAE;QACpB,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnC;IAED,IAAI,aAAiC,CAAC;IACtC,IAAI,WAAW,CAAC,aAAa,EAAE;QAC7B,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;KAC3D;IAED,OAAO;QACL,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC,cAAc,CAAC;QAChE,IAAI,EAAE,IAAI;QACV,aAAa,EAAE,aAAa;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,wCAAwC,CAC/C,WAA4C;IAE5C,OAAO;QACL,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,YAAY,EAAE;QACnD,YAAY,EAAE,oBAAoB,CAAC,WAAW,CAAC,YAAY,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AdmRegistrationDescription,\n AdmTemplateRegistrationDescription,\n ApplePriority,\n AppleRegistrationDescription,\n AppleTemplateRegistrationDescription,\n BaiduRegistrationDescription,\n BaiduTemplateRegistrationDescription,\n BrowserRegistrationDescription,\n BrowserTemplateRegistrationDescription,\n GcmRegistrationDescription,\n GcmTemplateRegistrationDescription,\n MpnsRegistrationDescription,\n MpnsTemplateRegistrationDescription,\n RegistrationDescription,\n RegistrationDescriptionCommon,\n TemplateRegistrationDescription,\n WindowsRegistrationDescription,\n WindowsTemplateRegistrationDescription,\n} from \"../models/registration.js\";\nimport {\n getDateOrUndefined,\n getString,\n getStringOrUndefined,\n getTagsOrUndefined,\n isDefined,\n} from \"../utils/utils.js\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { serializeToAtomXmlRequest } from \"../utils/xmlUtils.js\";\n\n/**\n * Represents a registration description parser from the incoming XML.\n */\nexport interface RegistrationDescriptionParser {\n /**\n * @internal\n * Creates a registration type from the incoming entry.\n */\n parseRegistrationEntry: (bodyText: string) => Promise<RegistrationDescription>;\n /**\n * @internal\n * Creates a list of registrations from an incoming ATOM XML Feed.\n */\n parseRegistrationFeed: (bodyText: string) => Promise<RegistrationDescription[]>;\n /**\n * @internal\n * Creates an Amazon Device Messaging (ADM) registration description from the incoming parsed XML.\n */\n createAdmRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AdmRegistrationDescription;\n /**\n * @internal\n * Creates an Amazon Device Messaging (ADM) template registration description from the incoming parsed XML.\n */\n createAdmTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AdmTemplateRegistrationDescription;\n /**\n * @internal\n * Creates an Apple Platform Notification Services (APNs) registration description from the incoming parsed XML.\n */\n createAppleRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AppleRegistrationDescription;\n /**\n * @internal\n * Creates an Apple Platform Notification Services (APNs) template registration description from the incoming parsed XML.\n */\n createAppleTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => AppleTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Baidu registration description from the incoming parsed XML.\n */\n createBaiduRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BaiduRegistrationDescription;\n /**\n * @internal\n * Creates a Baidu template registration description from the incoming parsed XML.\n */\n createBaiduTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BaiduTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Web Push registration description from the incoming parsed XML.\n */\n createBrowserRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BrowserRegistrationDescription;\n /**\n * @internal\n * Creates a Web Push template registration description from the incoming parsed XML.\n */\n createBrowserTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => BrowserTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Google Cloud Messaging (GCM) registration description from the incoming parsed XML.\n */\n createGcmRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => GcmRegistrationDescription;\n /**\n * @internal\n * Creates a Google Cloud Messaging (GCM) template registration description from the incoming parsed XML.\n */\n createGcmTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => GcmTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Microsoft Phone Notification Services (MPNS) registration description from the incoming parsed XML.\n */\n createMpnsRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => MpnsRegistrationDescription;\n /**\n * @internal\n * Creates a Microsoft Phone Notification Services (MPNS) template registration description from the incoming parsed XML.\n */\n createMpnsTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => MpnsTemplateRegistrationDescription;\n /**\n * @internal\n * Creates a Windows Notification Services (WNS) registration description from the incoming parsed XML.\n */\n createWindowsRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => WindowsRegistrationDescription;\n /**\n * @internal\n * Creates a Windows Notification Services (WNS) template registration description from the incoming parsed XML.\n */\n createWindowsTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => WindowsTemplateRegistrationDescription;\n}\n\nexport const registrationDescriptionParser: RegistrationDescriptionParser = {\n /**\n * @internal\n * Creates a registration type from the incoming entry.\n */\n async parseRegistrationEntry(bodyText: string): Promise<RegistrationDescription> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const keyName = Object.keys(xml.entry.content)[0];\n const content = xml.entry.content[keyName];\n const methodName = `create${keyName}`;\n\n const method = this[methodName as keyof RegistrationDescriptionParser] as any;\n if (!methodName) {\n throw new RestError(`${keyName} is not a supported registration type`, { statusCode: 500 });\n }\n\n return method.call(this, content) as RegistrationDescription;\n },\n\n /**\n * @internal\n * Creates a list of registrations from an incoming ATOM XML Feed.\n */\n async parseRegistrationFeed(bodyText: string): Promise<RegistrationDescription[]> {\n const xml = await parseXML(bodyText, { includeRoot: true });\n const results: RegistrationDescription[] = [];\n if (!isDefined(xml.feed.entry)) {\n return results;\n }\n\n const entries = Array.isArray(xml.feed.entry) ? xml.feed.entry : [xml.feed.entry];\n\n for (const entry of entries) {\n delete entry.content[\"$\"];\n\n const keyName = Object.keys(entry.content)[0];\n const methodName = `create${keyName}`;\n const content = entry.content[keyName];\n const method = this[methodName as keyof RegistrationDescriptionParser] as any;\n if (!methodName) {\n throw new RestError(`${keyName} is not a supported registration type`, { statusCode: 500 });\n }\n\n results.push(method.call(this, content) as RegistrationDescription);\n }\n\n return results;\n },\n\n /**\n * @internal\n * Creates an ADM registration description from incoming XML property bag.\n */\n createAdmRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AdmRegistrationDescription {\n return {\n admRegistrationId: getString(\n rawRegistrationDescription[\"AdmRegistrationId\"],\n \"admRegistrationId\"\n ),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Adm\",\n };\n },\n\n /**\n * @internal\n * Creates an ADM template registration description from incoming XML property bag.\n */\n createAdmTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AdmTemplateRegistrationDescription {\n return {\n ...this.createAdmRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"AdmTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates an Apple registration description from incoming XML property bag.\n */\n createAppleRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AppleRegistrationDescription {\n return {\n deviceToken: getString(rawRegistrationDescription[\"DeviceToken\"], \"deviceToken\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Apple\",\n };\n },\n\n /**\n * @internal\n * Creates an Apple template registration description from incoming XML property bag.\n */\n createAppleTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): AppleTemplateRegistrationDescription {\n return {\n priority: getStringOrUndefined(rawRegistrationDescription[\"Priority\"]) as ApplePriority,\n apnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"ApnsHeaders\"]?.[\"ApnsHeader\"]),\n ...this.createAppleRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"AppleTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Baidu registration description from incoming XML property bag.\n */\n createBaiduRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BaiduRegistrationDescription {\n return {\n baiduChannelId: getString(rawRegistrationDescription[\"BaiduChannelId\"], \"baiduChannelId\"),\n baiduUserId: getString(rawRegistrationDescription[\"BaiduUserId\"], \"baiduUserId\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Baidu\",\n };\n },\n\n /**\n * @internal\n * Creates a Baidu template registration description from incoming XML property bag.\n */\n createBaiduTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BaiduTemplateRegistrationDescription {\n return {\n ...this.createBaiduRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"BaiduTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Browser registration description from incoming XML property bag.\n */\n createBrowserRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BrowserRegistrationDescription {\n return {\n endpoint: getString(rawRegistrationDescription[\"Endpoint\"], \"endpoint\"),\n p256dh: getString(rawRegistrationDescription[\"P256DH\"], \"p256dh\"),\n auth: getString(rawRegistrationDescription[\"Auth\"], \"auth\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Browser\",\n };\n },\n\n /**\n * @internal\n * Creates a Browser template registration description from incoming XML property bag.\n */\n createBrowserTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): BrowserTemplateRegistrationDescription {\n return {\n ...this.createBrowserRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"BrowserTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates an GCM registration description from incoming XML property bag.\n */\n createGcmRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): GcmRegistrationDescription {\n return {\n gcmRegistrationId: getString(\n rawRegistrationDescription[\"GcmRegistrationId\"],\n \"gcmRegistrationId\"\n ),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Gcm\",\n };\n },\n\n /**\n * @internal\n * Creates an FCM template registration description from incoming XML property bag.\n */\n createGcmTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): GcmTemplateRegistrationDescription {\n return {\n ...this.createGcmRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"GcmTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows Phone registration description from incoming XML property bag.\n */\n createMpnsRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): MpnsRegistrationDescription {\n return {\n channelUri: getString(rawRegistrationDescription[\"ChannelUri\"], \"channelUri\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Mpns\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows Phone template registration description from incoming XML property bag.\n */\n createMpnsTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): MpnsTemplateRegistrationDescription {\n return {\n mpnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"MpnsHeaders\"]?.[\"MpnsHeader\"]),\n ...this.createWindowsRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"MpnsTemplate\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows registration description from incoming XML property bag.\n */\n createWindowsRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): WindowsRegistrationDescription {\n return {\n channelUri: getString(rawRegistrationDescription[\"ChannelUri\"], \"channelUri\"),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Windows\",\n };\n },\n\n /**\n * @internal\n * Creates a Windows template registration description from incoming XML property bag.\n */\n createWindowsTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): WindowsTemplateRegistrationDescription {\n return {\n wnsHeaders: getHeadersOrUndefined(rawRegistrationDescription[\"WnsHeaders\"]?.[\"WnsHeader\"]),\n ...this.createWindowsRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"WindowsTemplate\",\n };\n },\n};\n\nfunction getHeadersOrUndefined(\n value?: { Header: string; Value: string }[]\n): Record<string, string> | undefined {\n if (!isDefined(value)) {\n return undefined;\n }\n\n const headerObj: Record<string, string> = {};\n for (const { Header, Value } of value) {\n headerObj[Header] = Value;\n }\n\n return headerObj;\n}\n\nfunction createRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n): Omit<RegistrationDescriptionCommon, \"type\"> {\n let pushVariables: Record<string, string> | undefined;\n const unparsed = getStringOrUndefined(rawRegistrationDescription[\"PushVariables\"]);\n if (unparsed) {\n pushVariables = JSON.parse(unparsed) as Record<string, string>;\n }\n\n return {\n registrationId: getStringOrUndefined(rawRegistrationDescription[\"RegistrationId\"]),\n expirationTime: getDateOrUndefined(rawRegistrationDescription[\"ExpirationTime\"]),\n etag: getStringOrUndefined(rawRegistrationDescription[\"ETag\"]),\n tags: getTagsOrUndefined(rawRegistrationDescription[\"Tags\"]),\n pushVariables: pushVariables,\n };\n}\n\nfunction createTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n): TemplateRegistrationDescription {\n return {\n bodyTemplate: getString(rawRegistrationDescription[\"BodyTemplate\"], \"bodyTemplate\"),\n templateName: getStringOrUndefined(rawRegistrationDescription[\"TemplateName\"]),\n ...createRegistrationDescription(rawRegistrationDescription),\n };\n}\n\n/**\n * @internal\n * Represents a serializer for all registration descriptions.\n */\nexport interface RegistrationDescriptionSerializer {\n /**\n * @internal\n * Serializes a registration description into an ATOM XML string.\n */\n serializeRegistrationDescription(description: RegistrationDescription): string;\n /**\n * @internal\n * Serializes an Amazon Device Messaging (ADM) registration description into an XML object for serialization.\n */\n serializeAdmRegistrationDescription(\n description: Omit<AdmRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Amazon Device Messaging (ADM) template registration description into an XML object for serialization.\n */\n serializeAdmTemplateRegistrationDescription(\n description: Omit<AdmTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Apple registration description into an XML object for serialization.\n */\n serializeAppleRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes an Apple template registration description into an XML object for serialization.\n */\n serializeAppleTemplateRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Baidu registration description into an XML object for serialization.\n */\n serializeBaiduRegistrationDescription(\n description: Omit<BaiduRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Baidu template registration description into an XML object for serialization.\n */\n serializeBaiduTemplateRegistrationDescription(\n description: Omit<BaiduTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Web Push registration description into an XML object for serialization.\n */\n serializeBrowserRegistrationDescription(\n description: Omit<BrowserRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Web Push template registration description into an XML object for serialization.\n */\n serializeBrowserTemplateRegistrationDescription(\n description: Omit<BrowserTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Google Cloud Messaging (GCM) registration description into an XML object for serialization.\n */\n serializeGcmRegistrationDescription(\n description: Omit<GcmRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Google Cloud Messaging (GCM) template registration description into an XML object for serialization.\n */\n serializeGcmTemplateRegistrationDescription(\n description: Omit<GcmTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Phone registration description into an XML object for serialization.\n */\n serializeMpnsRegistrationDescription(\n description: Omit<MpnsRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Phone template registration description into an XML object for serialization.\n */\n serializeMpnsTemplateRegistrationDescription(\n description: Omit<MpnsTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Notification Services (WNS) registration description into an XML object for serialization.\n */\n serializeWindowsRegistrationDescription(\n description: Omit<WindowsRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Windows Notification Services (WNS) template registration description into an XML object for serialization.\n */\n serializeWindowsTemplateRegistrationDescription(\n description: Omit<WindowsTemplateRegistrationDescription, \"type\">\n ): Record<string, any>;\n}\n\n/**\n * Represents a RegistrationDescription serializer.\n */\nexport const registrationDescriptionSerializer: RegistrationDescriptionSerializer = {\n serializeRegistrationDescription(description: RegistrationDescription): string {\n const rootName = `${description.type}RegistrationDescription`;\n const methodName = `serialize${rootName}`;\n\n const method = this[methodName as keyof RegistrationDescriptionSerializer].bind(this) as (\n description: RegistrationDescription\n ) => Record<string, any>;\n if (!isDefined(method)) {\n throw new RestError(`Undefined platform ${description.type}`, { statusCode: 400 });\n }\n\n const registration = method(description) as Record<string, any>;\n const requestObject = serializeToAtomXmlRequest(rootName, registration);\n\n return stringifyXML(requestObject, { rootName: \"entry\" });\n },\n\n /**\n * @internal\n * Serializes an existing ADM registration description to an object for serialization.\n */\n serializeAdmRegistrationDescription(\n description: Omit<AdmRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n AdmRegistrationId: getString(description.admRegistrationId, \"admRegistrationId\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing ADM template registration description to an object for serialization.\n */\n serializeAdmTemplateRegistrationDescription(\n description: Omit<AdmTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeAdmRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Apple registration description to an object for serialization.\n */\n serializeAppleRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n DeviceToken: getString(description.deviceToken, \"deviceToken\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Apple template registration description to an object for serialization.\n */\n serializeAppleTemplateRegistrationDescription(\n description: AppleTemplateRegistrationDescription\n ): Record<string, any> {\n let apnsHeaders: Record<string, any> | undefined;\n if (description.apnsHeaders) {\n apnsHeaders = {\n ApnsHeader: [],\n };\n\n for (const header of Object.keys(description.apnsHeaders)) {\n apnsHeaders[\"ApnsHeader\"].push({\n Header: header,\n Value: description.apnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeAppleRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n Expiry: getStringOrUndefined(description.expiry),\n ApnsHeaders: apnsHeaders,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Baidu registration description to an object for serialization.\n */\n serializeBaiduRegistrationDescription(\n description: Omit<BaiduRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n BaiduChannelId: getString(description.baiduChannelId, \"baiduChannelId\"),\n BaiduUserId: getString(description.baiduUserId, \"baiduUserId\"),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Baidu template registration description to an object for serialization.\n */\n serializeBaiduTemplateRegistrationDescription(\n description: Omit<BaiduTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeBaiduRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * Serializes an existing Browser registration description to an object for serialization.\n */\n serializeBrowserRegistrationDescription(\n description: Omit<BrowserRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n Endpoint: description.endpoint,\n Auth: description.auth,\n P256DH: description.p256dh,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Browser template registration description to an object for serialization.\n */\n serializeBrowserTemplateRegistrationDescription(\n description: Omit<BrowserTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeBrowserRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * @deprecated Should use FCM registrations instead of GCM.\n * Serializes an existing GCM registration description to an object for serialization.\n */\n serializeGcmRegistrationDescription(\n description: Omit<GcmRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n GcmRegistrationId: getString(description.gcmRegistrationId, \"gcmRegistrationId\"),\n };\n },\n\n /**\n * @internal\n * @deprecated Should use FCM template registrations instead of GCM.\n * Serializes an existing GCM template registration description to an object for serialization.\n */\n serializeGcmTemplateRegistrationDescription(\n description: Omit<GcmTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeGcmRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n };\n },\n\n /**\n * @internal\n * @deprecated Windows Phone is no longer supported.\n * Serializes an existing MPNS registration description to an object for serialization.\n */\n serializeMpnsRegistrationDescription(\n description: Omit<MpnsRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n ChannelUri: description.channelUri,\n };\n },\n\n /**\n * @internal\n * @deprecated Windows Phone is no longer supported.\n * Serializes an existing MPNS template registration description to an object for serialization.\n */\n serializeMpnsTemplateRegistrationDescription(\n description: Omit<MpnsTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n let mpnsHeaders: Record<string, any> | undefined;\n if (description.mpnsHeaders) {\n mpnsHeaders = {\n MpnsHeader: [],\n };\n\n for (const header of Object.keys(description.mpnsHeaders)) {\n mpnsHeaders[\"MpnsHeader\"].push({\n Header: header,\n Value: description.mpnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeMpnsRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n MpnsHeaders: mpnsHeaders,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Windows registration description to an object for serialization.\n */\n serializeWindowsRegistrationDescription(\n description: Omit<WindowsRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n ChannelUri: description.channelUri,\n };\n },\n\n /**\n * @internal\n * Serializes an existing Windows template registration description to an object for serialization.\n */\n serializeWindowsTemplateRegistrationDescription(\n description: Omit<WindowsTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n let wnsHeaders: Record<string, any> | undefined;\n if (description.wnsHeaders) {\n wnsHeaders = {\n WnsHeader: [],\n };\n\n for (const header of Object.keys(description.wnsHeaders)) {\n wnsHeaders[\"WnsHeader\"].push({\n Header: header,\n Value: description.wnsHeaders[header],\n });\n }\n }\n\n return {\n ...this.serializeWindowsRegistrationDescription(description),\n ...serializeTemplateRegistrationDescription(description),\n WnsHeaders: wnsHeaders,\n };\n },\n};\n\nfunction serializeRegistrationDescription(\n description: Omit<RegistrationDescriptionCommon, \"type\">\n): Record<string, any> {\n let tags: string | undefined;\n if (description.tags) {\n tags = description.tags.join(\",\");\n }\n\n let pushVariables: string | undefined;\n if (description.pushVariables) {\n pushVariables = JSON.stringify(description.pushVariables);\n }\n\n return {\n RegistrationId: getStringOrUndefined(description.registrationId),\n Tags: tags,\n PushVariables: pushVariables,\n };\n}\n\nfunction serializeTemplateRegistrationDescription(\n description: TemplateRegistrationDescription\n): Record<string, any> {\n return {\n BodyTemplate: { __cdata: description.bodyTemplate },\n TemplateName: getStringOrUndefined(description.templateName),\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- export const SDK_VERSION = "1.0.0-beta.4";
3
+ export const SDK_VERSION = "1.0.0-beta.5";
4
4
  export const JSON_CONTENT_TYPE = "application/json;charset=utf-8";
5
5
  export const XML_CONTENT_TYPE = "application/xml";
6
6
  export const STREAM_CONTENT_TYPE = "application/octet-stream";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAG,gCAAgC,CAAC;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AACpC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.4\";\n\nexport const JSON_CONTENT_TYPE = \"application/json;charset=utf-8\";\nexport const XML_CONTENT_TYPE = \"application/xml\";\nexport const STREAM_CONTENT_TYPE = \"application/octet-stream\";\n\nexport const WNS_TYPE_NAME = \"X-WNS-Type\";\nexport const WNS_RAW = \"wns/raw\";\nexport const WNS_BADGE = \"wns/badge\";\nexport const WNS_TITLE = \"wns/tile\";\nexport const WNS_TOAST = \"wns/toast\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAG,gCAAgC,CAAC;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AACpC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.5\";\n\nexport const JSON_CONTENT_TYPE = \"application/json;charset=utf-8\";\nexport const XML_CONTENT_TYPE = \"application/xml\";\nexport const STREAM_CONTENT_TYPE = \"application/octet-stream\";\n\nexport const WNS_TYPE_NAME = \"X-WNS-Type\";\nexport const WNS_RAW = \"wns/raw\";\nexport const WNS_BADGE = \"wns/badge\";\nexport const WNS_TITLE = \"wns/tile\";\nexport const WNS_TOAST = \"wns/toast\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/notification-hubs",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.5",
4
4
  "description": "Azure Notification Hubs SDK for JavaScript",
5
5
  "sdk-type": "client",
6
6
  "main": "dist/index.js",
@@ -1393,6 +1393,14 @@ export declare class NotificationHubsServiceClient {
1393
1393
  * @returns The updated registration description.
1394
1394
  */
1395
1395
  updateRegistration(registration: RegistrationDescription, options?: OperationOptions): Promise<RegistrationDescription>;
1396
+ /**
1397
+ * Deletes a registration with the given registration ID.
1398
+ * @param context - The Notification Hubs client.
1399
+ * @param registrationId - The registration ID of the registration to delete.
1400
+ * @param options - The options for delete operations including the ETag
1401
+ * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
1402
+ */
1403
+ deleteRegistration(registrationId: string, options?: EntityOperationOptions): Promise<NotificationHubsResponse>;
1396
1404
  /**
1397
1405
  * Gets a registration by the given registration ID.
1398
1406
  * @param registrationId - The ID of the registration to get.
@@ -1479,6 +1479,14 @@ export declare class NotificationHubsServiceClient {
1479
1479
  * @returns The updated registration description.
1480
1480
  */
1481
1481
  updateRegistration(registration: RegistrationDescription, options?: OperationOptions): Promise<RegistrationDescription>;
1482
+ /**
1483
+ * Deletes a registration with the given registration ID.
1484
+ * @param context - The Notification Hubs client.
1485
+ * @param registrationId - The registration ID of the registration to delete.
1486
+ * @param options - The options for delete operations including the ETag
1487
+ * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
1488
+ */
1489
+ deleteRegistration(registrationId: string, options?: EntityOperationOptions): Promise<NotificationHubsResponse>;
1482
1490
  /**
1483
1491
  * Gets a registration by the given registration ID.
1484
1492
  * @param registrationId - The ID of the registration to get.
@@ -1,6 +1,6 @@
1
1
  import { Installation, JsonPatch, PushHandle } from "./models/installation.js";
2
2
  import { NotificationDetails, NotificationHubsMessageResponse, NotificationHubsResponse } from "./models/notificationDetails.js";
3
- import { NotificationHubsClientOptions, RegistrationQueryLimitOptions, RegistrationQueryOptions, SendOperationOptions } from "./models/options.js";
3
+ import { EntityOperationOptions, NotificationHubsClientOptions, RegistrationQueryLimitOptions, RegistrationQueryOptions, SendOperationOptions } from "./models/options.js";
4
4
  import { Notification } from "./models/notification.js";
5
5
  import { NotificationHubJob } from "./models/notificationHubJob.js";
6
6
  import { OperationOptions } from "@azure/core-client";
@@ -76,6 +76,14 @@ export declare class NotificationHubsServiceClient {
76
76
  * @returns The updated registration description.
77
77
  */
78
78
  updateRegistration(registration: RegistrationDescription, options?: OperationOptions): Promise<RegistrationDescription>;
79
+ /**
80
+ * Deletes a registration with the given registration ID.
81
+ * @param context - The Notification Hubs client.
82
+ * @param registrationId - The registration ID of the registration to delete.
83
+ * @param options - The options for delete operations including the ETag
84
+ * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.
85
+ */
86
+ deleteRegistration(registrationId: string, options?: EntityOperationOptions): Promise<NotificationHubsResponse>;
79
87
  /**
80
88
  * Gets a registration by the given registration ID.
81
89
  * @param registrationId - The ID of the registration to get.
@@ -1 +1 @@
1
- {"version":3,"file":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;IACH,6BAA6B,CAC3B,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,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,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubJobSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAGnB,MAAM,iCAAiC,CAAC;AAWzC;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAUlF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAIhG;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAajG"}
1
+ {"version":3,"file":"notificationHubJobSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/notificationHubJobSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAGnB,MAAM,iCAAiC,CAAC;AAWzC;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAUlF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAIhG;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAejG"}
@@ -1 +1 @@
1
- {"version":3,"file":"registrationSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAElC,4BAA4B,EAC5B,oCAAoC,EACpC,4BAA4B,EAC5B,oCAAoC,EACpC,8BAA8B,EAC9B,sCAAsC,EACtC,0BAA0B,EAC1B,kCAAkC,EAClC,2BAA2B,EAC3B,mCAAmC,EACnC,uBAAuB,EAGvB,8BAA8B,EAC9B,sCAAsC,EACvC,MAAM,2BAA2B,CAAC;AAYnC;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,sBAAsB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC/E;;;OAGG;IACH,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAChF;;;OAGG;IACH,gCAAgC,EAAE,CAChC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5C,0BAA0B,CAAC;IAChC;;;OAGG;IACH,wCAAwC,EAAE,CACxC,0BAA0B,EAAE,MAAM,C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,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,+CAA+C,CAC7C,WAAW,EAAE,IAAI,CAAC,sCAAsC,EAAE,MAAM,CAAC,GAChE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,mCAAmC,CACjC,WAAW,EAAE,IAAI,CAAC,0BAA0B,EAAE,MAAM,CAAC,GACpD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,2CAA2C,CACzC,WAAW,EAAE,IAAI,CAAC,kCAAkC,EAAE,MAAM,CAAC,GAC5D,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,oCAAoC,CAClC,WAAW,EAAE,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,GACrD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,4CAA4C,CAC1C,WAAW,EAAE,IAAI,CAAC,mCAAmC,EAAE,MAAM,CAAC,GAC7D,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,uCAAuC,CACrC,WAAW,EAAE,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,GACxD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB;;;OAGG;IACH,+CAA+C,CAC7C,WAAW,EAAE,IAAI,CAAC,sCAAsC,EAAE,MAAM,CAAC,GAChE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,iCA4P/C,CAAC"}
1
+ {"version":3,"file":"registrationSerializer.d.ts","sourceRoot":"","sources":["../../../src/serializers/registrationSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAElC,4BAA4B,EAC5B,oCAAoC,EACpC,4BAA4B,EAC5B,oCAAoC,EACpC,8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