@azure/notification-hubs 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +749 -0
  3. package/dist/index.js +2235 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist-esm/src/client/cancelScheduledNotification.js +23 -0
  6. package/dist-esm/src/client/cancelScheduledNotification.js.map +1 -0
  7. package/dist-esm/src/client/createOrUpdateInstallation.js +24 -0
  8. package/dist-esm/src/client/createOrUpdateInstallation.js.map +1 -0
  9. package/dist-esm/src/client/createOrUpdateRegistration.js +17 -0
  10. package/dist-esm/src/client/createOrUpdateRegistration.js.map +1 -0
  11. package/dist-esm/src/client/createRegistration.js +24 -0
  12. package/dist-esm/src/client/createRegistration.js.map +1 -0
  13. package/dist-esm/src/client/createRegistrationId.js +26 -0
  14. package/dist-esm/src/client/createRegistrationId.js.map +1 -0
  15. package/dist-esm/src/client/deleteInstallation.js +22 -0
  16. package/dist-esm/src/client/deleteInstallation.js.map +1 -0
  17. package/dist-esm/src/client/deleteRegistration.js +25 -0
  18. package/dist-esm/src/client/deleteRegistration.js.map +1 -0
  19. package/dist-esm/src/client/getFeedbackContainerUrl.js +23 -0
  20. package/dist-esm/src/client/getFeedbackContainerUrl.js.map +1 -0
  21. package/dist-esm/src/client/getInstallation.js +23 -0
  22. package/dist-esm/src/client/getInstallation.js.map +1 -0
  23. package/dist-esm/src/client/getNotificationHubJob.js +24 -0
  24. package/dist-esm/src/client/getNotificationHubJob.js.map +1 -0
  25. package/dist-esm/src/client/getNotificationOutcomeDetails.js +24 -0
  26. package/dist-esm/src/client/getNotificationOutcomeDetails.js.map +1 -0
  27. package/dist-esm/src/client/getRegistration.js +24 -0
  28. package/dist-esm/src/client/getRegistration.js.map +1 -0
  29. package/dist-esm/src/client/index.js +44 -0
  30. package/dist-esm/src/client/index.js.map +1 -0
  31. package/dist-esm/src/client/internal/_client.js +75 -0
  32. package/dist-esm/src/client/internal/_client.js.map +1 -0
  33. package/dist-esm/src/client/internal/_createOrUpdateRegistrationDescription.js +31 -0
  34. package/dist-esm/src/client/internal/_createOrUpdateRegistrationDescription.js.map +1 -0
  35. package/dist-esm/src/client/internal/_scheduleNotificationPayload.js +37 -0
  36. package/dist-esm/src/client/internal/_scheduleNotificationPayload.js.map +1 -0
  37. package/dist-esm/src/client/internal/_sendNotificationPayload.js +51 -0
  38. package/dist-esm/src/client/internal/_sendNotificationPayload.js.map +1 -0
  39. package/dist-esm/src/client/listNotificationHubJobs.js +23 -0
  40. package/dist-esm/src/client/listNotificationHubJobs.js.map +1 -0
  41. package/dist-esm/src/client/listRegistrations.js +89 -0
  42. package/dist-esm/src/client/listRegistrations.js.map +1 -0
  43. package/dist-esm/src/client/listRegistrationsByTag.js +87 -0
  44. package/dist-esm/src/client/listRegistrationsByTag.js.map +1 -0
  45. package/dist-esm/src/client/scheduleBroadcastNotification.js +17 -0
  46. package/dist-esm/src/client/scheduleBroadcastNotification.js.map +1 -0
  47. package/dist-esm/src/client/scheduleNotification.js +18 -0
  48. package/dist-esm/src/client/scheduleNotification.js.map +1 -0
  49. package/dist-esm/src/client/sendBroadcastNotification.js +15 -0
  50. package/dist-esm/src/client/sendBroadcastNotification.js.map +1 -0
  51. package/dist-esm/src/client/sendDirectNotification.js +16 -0
  52. package/dist-esm/src/client/sendDirectNotification.js.map +1 -0
  53. package/dist-esm/src/client/sendNotification.js +16 -0
  54. package/dist-esm/src/client/sendNotification.js.map +1 -0
  55. package/dist-esm/src/client/submitNotificationHubJob.js +26 -0
  56. package/dist-esm/src/client/submitNotificationHubJob.js.map +1 -0
  57. package/dist-esm/src/client/updateInstallation.js +25 -0
  58. package/dist-esm/src/client/updateInstallation.js.map +1 -0
  59. package/dist-esm/src/client/updateRegistration.js +21 -0
  60. package/dist-esm/src/client/updateRegistration.js.map +1 -0
  61. package/dist-esm/src/index.js +12 -0
  62. package/dist-esm/src/index.js.map +1 -0
  63. package/dist-esm/src/models/installation.js +51 -0
  64. package/dist-esm/src/models/installation.js.map +1 -0
  65. package/dist-esm/src/models/notification.js +104 -0
  66. package/dist-esm/src/models/notification.js.map +1 -0
  67. package/dist-esm/src/models/notificationBuilder.js +169 -0
  68. package/dist-esm/src/models/notificationBuilder.js.map +1 -0
  69. package/dist-esm/src/models/notificationDetails.js +4 -0
  70. package/dist-esm/src/models/notificationDetails.js.map +1 -0
  71. package/dist-esm/src/models/notificationHubJob.js +4 -0
  72. package/dist-esm/src/models/notificationHubJob.js.map +1 -0
  73. package/dist-esm/src/models/options.js +4 -0
  74. package/dist-esm/src/models/options.js.map +1 -0
  75. package/dist-esm/src/models/registration.js +135 -0
  76. package/dist-esm/src/models/registration.js.map +1 -0
  77. package/dist-esm/src/models/response.js +4 -0
  78. package/dist-esm/src/models/response.js.map +1 -0
  79. package/dist-esm/src/notificationHubsClient.js +251 -0
  80. package/dist-esm/src/notificationHubsClient.js.map +1 -0
  81. package/dist-esm/src/serializers/notificationDetailsSerializer.js +58 -0
  82. package/dist-esm/src/serializers/notificationDetailsSerializer.js.map +1 -0
  83. package/dist-esm/src/serializers/notificationHubJobSerializer.js +74 -0
  84. package/dist-esm/src/serializers/notificationHubJobSerializer.js.map +1 -0
  85. package/dist-esm/src/serializers/registrationSerializer.js +375 -0
  86. package/dist-esm/src/serializers/registrationSerializer.js.map +1 -0
  87. package/dist-esm/src/utils/connectionStringUtils.js +37 -0
  88. package/dist-esm/src/utils/connectionStringUtils.js.map +1 -0
  89. package/dist-esm/src/utils/constants.js +11 -0
  90. package/dist-esm/src/utils/constants.js.map +1 -0
  91. package/dist-esm/src/utils/retryPolicy.js +144 -0
  92. package/dist-esm/src/utils/retryPolicy.js.map +1 -0
  93. package/dist-esm/src/utils/tracing.js +13 -0
  94. package/dist-esm/src/utils/tracing.js.map +1 -0
  95. package/dist-esm/src/utils/utils.js +130 -0
  96. package/dist-esm/src/utils/utils.js.map +1 -0
  97. package/dist-esm/src/utils/xmlUtils.js +101 -0
  98. package/dist-esm/src/utils/xmlUtils.js.map +1 -0
  99. package/package.json +144 -0
  100. package/types/3.1/notification-hubs.d.ts +1728 -0
  101. package/types/latest/notification-hubs.d.ts +1840 -0
  102. package/types/latest/tsdoc-metadata.json +11 -0
  103. package/types/src/client/cancelScheduledNotification.d.ts +13 -0
  104. package/types/src/client/cancelScheduledNotification.d.ts.map +1 -0
  105. package/types/src/client/createOrUpdateInstallation.d.ts +13 -0
  106. package/types/src/client/createOrUpdateInstallation.d.ts.map +1 -0
  107. package/types/src/client/createOrUpdateRegistration.d.ts +12 -0
  108. package/types/src/client/createOrUpdateRegistration.d.ts.map +1 -0
  109. package/types/src/client/createRegistration.d.ts +13 -0
  110. package/types/src/client/createRegistration.d.ts.map +1 -0
  111. package/types/src/client/createRegistrationId.d.ts +10 -0
  112. package/types/src/client/createRegistrationId.d.ts.map +1 -0
  113. package/types/src/client/deleteInstallation.d.ts +12 -0
  114. package/types/src/client/deleteInstallation.d.ts.map +1 -0
  115. package/types/src/client/deleteRegistration.d.ts +12 -0
  116. package/types/src/client/deleteRegistration.d.ts.map +1 -0
  117. package/types/src/client/getFeedbackContainerUrl.d.ts +11 -0
  118. package/types/src/client/getFeedbackContainerUrl.d.ts.map +1 -0
  119. package/types/src/client/getInstallation.d.ts +12 -0
  120. package/types/src/client/getInstallation.d.ts.map +1 -0
  121. package/types/src/client/getNotificationHubJob.d.ts +12 -0
  122. package/types/src/client/getNotificationHubJob.d.ts.map +1 -0
  123. package/types/src/client/getNotificationOutcomeDetails.d.ts +13 -0
  124. package/types/src/client/getNotificationOutcomeDetails.d.ts.map +1 -0
  125. package/types/src/client/getRegistration.d.ts +12 -0
  126. package/types/src/client/getRegistration.d.ts.map +1 -0
  127. package/types/src/client/index.d.ts +41 -0
  128. package/types/src/client/index.d.ts.map +1 -0
  129. package/types/src/client/internal/_client.d.ts +26 -0
  130. package/types/src/client/internal/_client.d.ts.map +1 -0
  131. package/types/src/client/internal/_createOrUpdateRegistrationDescription.d.ts +8 -0
  132. package/types/src/client/internal/_createOrUpdateRegistrationDescription.d.ts.map +1 -0
  133. package/types/src/client/internal/_scheduleNotificationPayload.d.ts +9 -0
  134. package/types/src/client/internal/_scheduleNotificationPayload.d.ts.map +1 -0
  135. package/types/src/client/internal/_sendNotificationPayload.d.ts +10 -0
  136. package/types/src/client/internal/_sendNotificationPayload.d.ts.map +1 -0
  137. package/types/src/client/listNotificationHubJobs.d.ts +11 -0
  138. package/types/src/client/listNotificationHubJobs.d.ts.map +1 -0
  139. package/types/src/client/listRegistrations.d.ts +12 -0
  140. package/types/src/client/listRegistrations.d.ts.map +1 -0
  141. package/types/src/client/listRegistrationsByTag.d.ts +13 -0
  142. package/types/src/client/listRegistrationsByTag.d.ts.map +1 -0
  143. package/types/src/client/scheduleBroadcastNotification.d.ts +16 -0
  144. package/types/src/client/scheduleBroadcastNotification.d.ts.map +1 -0
  145. package/types/src/client/scheduleNotification.d.ts +17 -0
  146. package/types/src/client/scheduleNotification.d.ts.map +1 -0
  147. package/types/src/client/sendBroadcastNotification.d.ts +14 -0
  148. package/types/src/client/sendBroadcastNotification.d.ts.map +1 -0
  149. package/types/src/client/sendDirectNotification.d.ts +16 -0
  150. package/types/src/client/sendDirectNotification.d.ts.map +1 -0
  151. package/types/src/client/sendNotification.d.ts +15 -0
  152. package/types/src/client/sendNotification.d.ts.map +1 -0
  153. package/types/src/client/submitNotificationHubJob.d.ts +13 -0
  154. package/types/src/client/submitNotificationHubJob.d.ts.map +1 -0
  155. package/types/src/client/updateInstallation.d.ts +14 -0
  156. package/types/src/client/updateInstallation.d.ts.map +1 -0
  157. package/types/src/client/updateRegistration.d.ts +12 -0
  158. package/types/src/client/updateRegistration.d.ts.map +1 -0
  159. package/types/src/index.d.ts +10 -0
  160. package/types/src/index.d.ts.map +1 -0
  161. package/types/src/models/installation.d.ts +200 -0
  162. package/types/src/models/installation.d.ts.map +1 -0
  163. package/types/src/models/notification.d.ts +166 -0
  164. package/types/src/models/notification.d.ts.map +1 -0
  165. package/types/src/models/notificationBuilder.d.ts +546 -0
  166. package/types/src/models/notificationBuilder.d.ts.map +1 -0
  167. package/types/src/models/notificationDetails.d.ts +87 -0
  168. package/types/src/models/notificationDetails.d.ts.map +1 -0
  169. package/types/src/models/notificationHubJob.d.ts +104 -0
  170. package/types/src/models/notificationHubJob.d.ts.map +1 -0
  171. package/types/src/models/options.d.ts +43 -0
  172. package/types/src/models/options.d.ts.map +1 -0
  173. package/types/src/models/registration.d.ts +368 -0
  174. package/types/src/models/registration.d.ts.map +1 -0
  175. package/types/src/models/response.d.ts +41 -0
  176. package/types/src/models/response.d.ts.map +1 -0
  177. package/types/src/notificationHubsClient.d.ts +190 -0
  178. package/types/src/notificationHubsClient.d.ts.map +1 -0
  179. package/types/src/serializers/notificationDetailsSerializer.d.ts +7 -0
  180. package/types/src/serializers/notificationDetailsSerializer.d.ts.map +1 -0
  181. package/types/src/serializers/notificationHubJobSerializer.d.ts +21 -0
  182. package/types/src/serializers/notificationHubJobSerializer.d.ts.map +1 -0
  183. package/types/src/serializers/registrationSerializer.d.ts +193 -0
  184. package/types/src/serializers/registrationSerializer.d.ts.map +1 -0
  185. package/types/src/utils/connectionStringUtils.d.ts +37 -0
  186. package/types/src/utils/connectionStringUtils.d.ts.map +1 -0
  187. package/types/src/utils/constants.d.ts +9 -0
  188. package/types/src/utils/constants.d.ts.map +1 -0
  189. package/types/src/utils/retryPolicy.d.ts +72 -0
  190. package/types/src/utils/retryPolicy.d.ts.map +1 -0
  191. package/types/src/utils/tracing.d.ts +6 -0
  192. package/types/src/utils/tracing.d.ts.map +1 -0
  193. package/types/src/utils/utils.d.ts +65 -0
  194. package/types/src/utils/utils.d.ts.map +1 -0
  195. package/types/src/utils/xmlUtils.d.ts +46 -0
  196. package/types/src/utils/xmlUtils.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/utils/connectionStringUtils.ts","../src/client/index.ts","../src/utils/utils.ts","../src/utils/xmlUtils.ts","../src/client/internal/_client.ts","../src/utils/tracing.ts","../src/client/cancelScheduledNotification.ts","../src/client/createOrUpdateInstallation.ts","../src/serializers/registrationSerializer.ts","../src/client/internal/_createOrUpdateRegistrationDescription.ts","../src/client/createOrUpdateRegistration.ts","../src/client/createRegistrationId.ts","../src/client/createRegistration.ts","../src/client/deleteInstallation.ts","../src/client/getFeedbackContainerUrl.ts","../src/client/getInstallation.ts","../src/serializers/notificationHubJobSerializer.ts","../src/client/getNotificationHubJob.ts","../src/serializers/notificationDetailsSerializer.ts","../src/client/getNotificationOutcomeDetails.ts","../src/client/getRegistration.ts","../src/client/listNotificationHubJobs.ts","../src/client/listRegistrationsByTag.ts","../src/client/listRegistrations.ts","../src/client/internal/_scheduleNotificationPayload.ts","../src/client/scheduleBroadcastNotification.ts","../src/client/scheduleNotification.ts","../src/client/internal/_sendNotificationPayload.ts","../src/client/sendBroadcastNotification.ts","../src/client/sendDirectNotification.ts","../src/client/sendNotification.ts","../src/client/submitNotificationHubJob.ts","../src/client/updateInstallation.ts","../src/client/updateRegistration.ts","../src/notificationHubsClient.ts","../src/models/installation.ts","../src/utils/constants.ts","../src/models/notification.ts","../src/models/notificationBuilder.ts","../src/models/registration.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SasTokenProvider, createSasTokenProvider, parseConnectionString } from \"@azure/core-amqp\";\n\n/**\n * The set of properties that comprise a Notification Hubs connection string.\n */\nexport interface NotificationHubsConnectionStringProperties {\n /**\n * The value for \"Endpoint\" in the connection string.\n */\n endpoint: string;\n /**\n * The value for \"SharedAccessKey\" in the connection string. This along with the \"SharedAccessKeyName\"\n * in the connection string is used to generate a SharedAccessSignature which can be used authorize\n * the connection to the service.\n */\n sharedAccessKey: string;\n /**\n * The value for \"SharedAccessKeyName\" in the connection string. This along with the \"SharedAccessKey\"\n * in the connection string is used to generate a SharedAccessSignature which can be used authorize\n * the connection to the service.\n */\n sharedAccessKeyName: string;\n}\n\n/**\n * Creates a SasTokenProvider from a shared access key and shared access key name.\n * @param sharedAccessKey - The shared access key value.\n * @param sharedAccessKeyName - The shared access key name.\n * @returns A SasTokenProvider with the given shared access token information.\n */\nexport function createTokenProviderFromConnection(\n sharedAccessKey: string,\n sharedAccessKeyName: string\n): SasTokenProvider {\n return createSasTokenProvider({ sharedAccessKey, sharedAccessKeyName });\n}\n\n/**\n * Parses given connection string into the different properties applicable to Azure Service Bus.\n * The properties are useful to then construct a ServiceBusClient.\n * @param connectionString - The connection string associated with the Shared Access Policy created\n * for the Service Bus namespace, queue or topic.\n */\nexport function parseNotificationHubsConnectionString(\n connectionString: string\n): NotificationHubsConnectionStringProperties {\n const parsedResult = parseConnectionString<{\n Endpoint: string;\n SharedAccessKey?: string;\n SharedAccessKeyName?: string;\n }>(connectionString);\n if (!parsedResult.Endpoint) {\n throw new Error(\"Connection string should have an Endpoint key.\");\n }\n\n if (parsedResult.SharedAccessKey && !parsedResult.SharedAccessKeyName) {\n throw new Error(\"Connection string with SharedAccessKey should have SharedAccessKeyName.\");\n } else if (!parsedResult.SharedAccessKey && parsedResult.SharedAccessKeyName) {\n throw new Error(\n \"Connection string with SharedAccessKeyName should have SharedAccessKey as well.\"\n );\n }\n\n const output: NotificationHubsConnectionStringProperties = {\n endpoint: parsedResult.Endpoint,\n sharedAccessKey: parsedResult.SharedAccessKey!,\n sharedAccessKeyName: parsedResult.SharedAccessKeyName!,\n };\n\n return output;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\nimport {\n createTokenProviderFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../utils/connectionStringUtils.js\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { NotificationHubsClientOptions } from \"../models/options.js\";\nimport { SasTokenProvider } from \"@azure/core-amqp\";\nimport { ServiceClient } from \"@azure/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * The SAS Token Provider for connecting to Notification Hubs.\n */\n readonly sasTokenProvider: SasTokenProvider;\n\n /**\n * The base URL for the Notification Hub namespace.\n */\n readonly baseUrl: string;\n\n /**\n * The Notification Hub name.\n */\n readonly hubName: string;\n\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(): HttpHeaders;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {}\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient extends ServiceClient implements NotificationHubsClientContext {\n sasTokenProvider: SasTokenProvider;\n baseUrl: string;\n hubName: string;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {}\n ) {\n super({\n deserializationOptions: {\n parseXML,\n },\n serializationOptions: {\n stringifyXML,\n },\n ...options,\n } as InternalClientPipelineOptions);\n\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n this.baseUrl = parsedConnection.endpoint;\n this.sasTokenProvider = createTokenProviderFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName\n );\n }\n\n createHeaders(): HttpHeaders {\n const authorization = this.sasTokenProvider.getToken(this.baseUrl);\n const headers = createHttpHeaders();\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n\n return headers;\n }\n\n requestUrl(): URL {\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n const url = new URL(this.baseUrl.replace(\"sb://\", \"https://\"));\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n * @internal\n */\nexport function isDefined<T>(thing: T | undefined | null): thing is T {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n\n/**\n * Helper TypeGuard that checks if something is a string or not.\n * @param thing - Anything\n * @internal\n */\nexport function isString(thing: unknown): thing is string {\n return typeof thing === \"string\" || thing instanceof String;\n}\n\n/**\n * @internal\n * Helper utility to retrieve `string` value from given string,\n * or throws error if undefined.\n */\nexport function getString(value: unknown, nameOfProperty: string): string {\n const result = getStringOrUndefined(value);\n if (result === undefined) {\n throw new Error(\n `\"${nameOfProperty}\" received from service expected to be a string value and not undefined.`\n );\n }\n return result;\n}\n\n/**\n * @internal\n * Helper utility to retrieve `string` value from given input,\n * or undefined if not passed in.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getStringOrUndefined(value: any): string | undefined {\n if (!isDefined(value)) {\n return undefined;\n }\n return value.toString();\n}\n\n/**\n * @internal\n * Helper utility to retrieve `integer` value from given string,\n * or throws error if undefined.\n */\nexport function getInteger(value: unknown, nameOfProperty: string): number {\n const result = getIntegerOrUndefined(value);\n if (result === undefined) {\n throw new Error(\n `\"${nameOfProperty}\" received from service expected to be a number value and not undefined.`\n );\n }\n return result;\n}\n\n/**\n * @internal\n * Helper utility to retrieve `integer` value from given string,\n * or undefined if not passed in.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getIntegerOrUndefined(value: any): number | undefined {\n if (!isDefined(value)) {\n return undefined;\n }\n const result = parseInt(value.toString());\n return isNaN(result) ? undefined : result;\n}\n\n/**\n * @internal\n * Helper utility to retrieve `float` value from given string,\n * or throws error if undefined.\n */\nexport function getFloat(value: unknown, nameOfProperty: string): number {\n const result = getFloatOrUndefined(value);\n if (result === undefined) {\n throw new Error(\n `\"${nameOfProperty}\" received from service expected to be a number value and not undefined.`\n );\n }\n return result;\n}\n\n/**\n * @internal\n * Helper utility to retrieve `float` value from given string,\n * or undefined if not passed in.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getFloatOrUndefined(value: any): number | undefined {\n if (!isDefined(value)) {\n return undefined;\n }\n const result = parseFloat(value.toString());\n return Number.isNaN(result) ? undefined : result;\n}\n\n/**\n * @internal\n * Helper utility to convert ISO-8601 time into Date type.\n */\nexport function getDate(value: string, nameOfProperty: string): Date {\n const result = getDateOrUndefined(value);\n if (result === undefined) {\n throw new Error(\n `\"${nameOfProperty}\" received from service expected to be a Date value and not undefined.`\n );\n }\n return result;\n}\n\n/**\n * @internal\n * Helper utility to convert ISO-8601 time into Date type,\n * or undefined if not passed in.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getDateOrUndefined(value: any): Date | undefined {\n const stringValue = getStringOrUndefined(value);\n if (stringValue === undefined) {\n return undefined;\n }\n const result = new Date(stringValue.toString());\n return Number.isNaN(+result) ? undefined : result;\n}\n\n/**\n * @internal\n * Helper utility to parse tags from a comma separated string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getTagsOrUndefined(value?: any): string[] | undefined {\n const result = getStringOrUndefined(value);\n if (result === undefined) {\n return undefined;\n }\n return result.split(\",\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isDefined } from \"./utils.js\";\nimport { parseXML } from \"@azure/core-xml\";\n\n/**\n * Marker for atom metadata.\n *\n * @internal\n */\nexport const XML_METADATA_MARKER = \"$\";\n\n/**\n * Marker for atom value.\n *\n * @internal\n */\nexport const XML_VALUE_MARKER = \"_\";\n\n/**\n * @internal\n * Helps in differentiating JSON like objects from other kinds of objects.\n */\nconst EMPTY_JSON_OBJECT_CONSTRUCTOR = {}.constructor;\n\n/**\n * @internal\n * Returns `true` if given input is a JSON like object.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function isJSONLikeObject(value: any): boolean {\n // `value.constructor === {}.constructor` differentiates among the \"object\"s,\n // would filter the JSON objects and won't match any array or other kinds of objects\n\n // -------------------------------------------------------------------------------\n // Few examples | typeof obj ===\"object\" | obj.constructor==={}.constructor\n // -------------------------------------------------------------------------------\n // {abc:1} | true | true\n // [\"a\",\"b\"] | true | false\n // [{\"a\":1},{\"b\":2}] | true | false\n // new Date() | true | false\n // 123 | false | false\n // -------------------------------------------------------------------------------\n return typeof value === \"object\" && value.constructor === EMPTY_JSON_OBJECT_CONSTRUCTOR;\n}\n\n/**\n * @internal\n * The key-value pairs having undefined/null as the values would lead to the empty tags in the serialized XML request.\n * Empty tags in the request body is problematic because of the following reasons.\n * - ATOM based management operations throw a \"Bad Request\" error if empty tags are included in the XML request body at top level.\n * - At the inner levels, Service assigns the empty strings as values to the empty tags instead of throwing an error.\n *\n * This method recursively removes the key-value pairs with undefined/null as the values from the request object that is to be serialized.\n *\n */\nexport function sanitizeSerializableObject(resource: { [key: string]: any }): void {\n Object.keys(resource).forEach(function (property) {\n if (!isDefined(resource[property])) {\n delete resource[property];\n } else if (isJSONLikeObject(resource[property])) {\n sanitizeSerializableObject(resource[property]);\n }\n });\n}\n\n/**\n * @internal\n * Serializes input information to construct the Atom XML request\n * @param resourceName - Name of the resource to be serialized like `QueueDescription`\n * @param resource - The entity details\n * @returns An object to be serialized into a string.\n */\nexport function serializeToAtomXmlRequest(\n resourceName: string,\n resource: unknown\n): Record<string, unknown> {\n const content: any = {};\n\n content[resourceName] = Object.assign({}, resource);\n sanitizeSerializableObject(content[resourceName]);\n\n content[resourceName][XML_METADATA_MARKER] = {\n xmlns: \"http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\",\n \"xmlns:i\": \"http://www.w3.org/2001/XMLSchema-instance\",\n };\n\n content[XML_METADATA_MARKER] = { type: \"application/xml\" };\n const requestDetails: Record<string, unknown> = {\n updated: new Date().toISOString(),\n content: content,\n };\n requestDetails[XML_METADATA_MARKER] = {\n xmlns: \"http://www.w3.org/2005/Atom\",\n };\n return requestDetails;\n}\n\n/**\n * @internal\n * Parses the XML message from a Notification Hubs response\n * @param bodyText - The HTTP response body.\n * @returns The notification details if any from the XML.\n */\nexport async function parseXMLError(bodyText: string): Promise<string | undefined> {\n let result: string | undefined;\n const xmlError = await parseXML(bodyText, { includeRoot: true });\n const detail = xmlError[\"Detail\"];\n if (isDefined(detail)) {\n return detail;\n }\n\n return result;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n HttpHeaders,\n HttpMethods,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createPipelineRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"../../models/response.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { isDefined } from \"../../utils/utils.js\";\nimport { parseXMLError } from \"../../utils/xmlUtils.js\";\n\n/**\n * @internal\n */\nexport function createRequest(\n endpoint: URL,\n method: HttpMethods,\n headers: HttpHeaders,\n options: OperationOptions\n): PipelineRequest {\n return createPipelineRequest({\n ...options.tracingOptions,\n ...options.requestOptions,\n url: endpoint.toString(),\n abortSignal: options.abortSignal,\n method,\n headers,\n });\n}\n\n/**\n * @internal\n */\nexport function parseNotificationResponse(response: PipelineResponse): NotificationHubsResponse {\n const correlationId = response.headers.get(\"x-ms-correlation-request-id\");\n const trackingId = response.headers.get(\"TrackingId\");\n const location = response.headers.get(\"Location\");\n\n return {\n correlationId,\n trackingId,\n location,\n };\n}\n\n/**\n * @internal\n */\nexport function parseNotificationSendResponse(\n response: PipelineResponse\n): NotificationHubsMessageResponse {\n const result = parseNotificationResponse(response);\n let notificationId: string | undefined;\n if (result.location) {\n const locationUrl = new URL(result.location);\n notificationId = locationUrl.pathname.split(\"/\")[3];\n }\n\n return {\n ...result,\n notificationId,\n };\n}\n\n/**\n * Sends a request through the client context.\n * @param context - The client context to use.\n * @param request - The HTTP request to send.\n * @param successStatusCode - A status code or list of status codes to check for success.\n * @returns The HTTP Response.\n */\nexport async function sendRequest(\n context: NotificationHubsClientContext,\n request: PipelineRequest,\n successStatusCode: number | number[]\n): Promise<PipelineResponse> {\n const statuses: number[] = Array.isArray(successStatusCode)\n ? successStatusCode\n : [successStatusCode];\n\n const response = await context.sendRequest(request);\n\n if (!statuses.some((statusCode) => statusCode === response.status)) {\n const responseBody = response.bodyAsText;\n let details: string | undefined;\n if (isDefined(responseBody)) {\n try {\n details = await parseXMLError(responseBody);\n } catch (err) {\n // eslint-disable no-empty\n }\n }\n\n let errorMessage: string | undefined;\n if (isDefined(details)) {\n errorMessage = `operations failed with: ${details}`;\n } else {\n errorMessage = `operation failed with status ${response.status}`;\n }\n\n throw new RestError(errorMessage, {\n statusCode: response.status,\n response,\n });\n }\n\n return response;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\n/**\n * A tracing client to handle spans.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.NotificationHubs\",\n packageName: \"@azure/notification-hubs\",\n packageVersion: \"1.0.0\",\n});\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Cancels the scheduled notification with the given notification ID.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\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 */\nexport function cancelScheduledNotification(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {}\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-cancelScheduledNotification\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/schedulednotifications/${notificationId}`;\n\n const headers = context.createHeaders();\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationSendResponse(response);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Creates or overwrites an installation to a Notification Hub.\n * @param context - The Notification Hubs client.\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 */\nexport function createOrUpdateInstallation(\n context: NotificationHubsClientContext,\n installation: Installation,\n options: OperationOptions = {}\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-createOrUpdateInstallation\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installation.installationId}`;\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PUT\", headers, updatedOptions);\n request.body = JSON.stringify(installation);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n }\n );\n}\n","// 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 FcmRegistrationDescription,\n FcmTemplateRegistrationDescription,\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 Firebase Cloud Messaging (GCM) registration description from the incoming parsed XML.\n */\n createFcmRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => FcmRegistrationDescription;\n /**\n * @internal\n * Creates a Firebase Cloud Messaging (GCM) template registration description from the incoming parsed XML.\n */\n createFcmTemplateRegistrationDescription: (\n rawRegistrationDescription: Record<string, any>\n ) => FcmTemplateRegistrationDescription;\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 = [];\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 an FCM registration description from incoming XML property bag.\n */\n createFcmRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): FcmRegistrationDescription {\n return {\n fcmRegistrationId: getString(\n rawRegistrationDescription[\"FcmRegistrationId\"],\n \"fcmRegistrationId\"\n ),\n ...createRegistrationDescription(rawRegistrationDescription),\n type: \"Fcm\",\n };\n },\n\n /**\n * @internal\n * Creates an FCM template registration description from incoming XML property bag.\n */\n createFcmTemplateRegistrationDescription(\n rawRegistrationDescription: Record<string, any>\n ): FcmTemplateRegistrationDescription {\n return {\n ...this.createFcmRegistrationDescription(rawRegistrationDescription),\n ...createTemplateRegistrationDescription(rawRegistrationDescription),\n type: \"FcmTemplate\",\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 Firebase registration description into an XML object for serialization.\n */\n serializeFcmRegistrationDescription(\n description: Omit<FcmRegistrationDescription, \"type\">\n ): Record<string, any>;\n /**\n * @internal\n * Serializes a Firebase template registration description into an XML object for serialization.\n */\n serializeFcmTemplateRegistrationDescription(\n description: Omit<FcmRegistrationDescription, \"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 * Serializes an existing FCM registration description to an object for serialization.\n */\n serializeFcmRegistrationDescription(\n description: Omit<FcmRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...serializeRegistrationDescription(description),\n FcmRegistrationId: description.fcmRegistrationId,\n };\n },\n\n /**\n * @internal\n * Serializes an existing FCM template registration description to an object for serialization.\n */\n serializeFcmTemplateRegistrationDescription(\n description: Omit<FcmTemplateRegistrationDescription, \"type\">\n ): Record<string, any> {\n return {\n ...this.serializeFcmRegistrationDescription(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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./_client.js\";\nimport {\n registrationDescriptionParser,\n registrationDescriptionSerializer,\n} from \"../../serializers/registrationSerializer.js\";\nimport { HttpMethods } from \"@azure/core-rest-pipeline\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { RegistrationDescription } from \"../../models/registration.js\";\nimport { isDefined } from \"../../utils/utils.js\";\n\n/**\n * @internal\n */\nexport async function createOrUpdateRegistrationDescription(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n operationName: \"create\" | \"createOrUpdate\" | \"update\",\n options: OperationOptions\n): Promise<RegistrationDescription> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n let httpMethod: HttpMethods = \"POST\";\n\n if (operationName === \"createOrUpdate\" || operationName === \"update\") {\n endpoint.pathname += `/${registration.registrationId}`;\n httpMethod = \"PUT\";\n }\n\n const etag = registration.etag;\n\n // Clear out readonly properties\n registration.registrationId = undefined;\n registration.etag = undefined;\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n if (operationName === \"update\") {\n headers.set(\"If-Match\", isDefined(etag) ? `\"${etag}\"` : \"*\");\n }\n\n const request = createRequest(endpoint, httpMethod, headers, options);\n request.body = registrationDescriptionSerializer.serializeRegistrationDescription(registration);\n const response = await sendRequest(context, request, [200, 201]);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Creates or updates a registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\nexport function createOrUpdateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {}\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-createOrUpdateRegistration\",\n options,\n async (updatedOptions) => {\n return createOrUpdateRegistrationDescription(\n context,\n registration,\n \"createOrUpdate\",\n updatedOptions\n );\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Creates a new registration ID.\n * @param context - The Notification Hubs client.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\nexport function createRegistrationId(\n context: NotificationHubsClientContext,\n options: OperationOptions = {}\n): Promise<string> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-createRegistrationId\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrationIDs\";\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n const response = await sendRequest(context, request, 201);\n\n // In the form: https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/<registrationId>\n const locationHeader = response.headers.get(\"Location\");\n const locationUrl = new URL(locationHeader!);\n const registrationId = locationUrl.pathname.split(\"/\")[3];\n\n return registrationId;\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\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 context - The Notification Hubs client.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\nexport function createRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {}\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-createRegistration\",\n options,\n async (updatedOptions) => {\n if (registration.registrationId) {\n throw new RestError(\"registrationId must not be set during a create operation\", {\n statusCode: 400,\n });\n }\n\n return createOrUpdateRegistrationDescription(context, registration, \"create\", updatedOptions);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Deletes an installation from a Notification Hub.\n * @param context - The Notification Hubs client.\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 */\nexport function deleteInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {}\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-deleteInstallation\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n const headers = context.createHeaders();\n\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 204);\n\n return parseNotificationResponse(response);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\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 context - The Notification Hubs client.\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 */\nexport function getFeedbackContainerUrl(\n context: NotificationHubsClientContext,\n options: OperationOptions = {}\n): Promise<string> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getFeedbackContainerUrl\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/feedbackcontainer\";\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return response.bodyAsText!;\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param context - The Notification Hubs client.\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 */\nexport function getInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {}\n): Promise<Installation> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getInstallation\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return JSON.parse(response.bodyAsText!) as Installation;\n }\n );\n}\n","// 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 = [];\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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { parseNotificationHubJobEntry } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets a Notification Hub Job by the ID.\n * @param context - The Notification Hubs client.\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 */\nexport function getNotificationHubJob(\n context: NotificationHubsClientContext,\n jobId: string,\n options: OperationOptions = {}\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getNotificationHubJob\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/jobs/${jobId}`;\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n NotificationDetails,\n NotificationOutcomeCollectionItem,\n NotificationOutcomeState,\n} from \"../models/notificationDetails.js\";\nimport { getDateOrUndefined, getInteger, getStringOrUndefined, isDefined } from \"../utils/utils.js\";\nimport { parseXML } from \"@azure/core-xml\";\n\n/**\n * @internal\n * Parses a NotificationDetails from incoming XML.\n */\nexport async function parseNotificationDetails(bodyText: string): Promise<NotificationDetails> {\n const xml = await parseXML(bodyText, {\n includeRoot: true,\n stopNodes: [\"NotificationDetails.NotificationBody\"],\n });\n const notificationDetails = xml[\"NotificationDetails\"];\n\n let apnsOutcomeCounts: NotificationOutcomeCollectionItem[] | undefined;\n if (isDefined(notificationDetails[\"ApnsOutcomeCounts\"])) {\n apnsOutcomeCounts = parseOutcomeCounts(notificationDetails[\"ApnsOutcomeCounts\"][\"Outcome\"]);\n }\n\n let admOutcomeCounts: NotificationOutcomeCollectionItem[] | undefined;\n if (isDefined(notificationDetails[\"AdmOutcomeCounts\"])) {\n admOutcomeCounts = parseOutcomeCounts(notificationDetails[\"AdmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let baiduOutcomeCounts: NotificationOutcomeCollectionItem[] | undefined;\n if (isDefined(notificationDetails[\"BaiduOutcomeCounts\"])) {\n baiduOutcomeCounts = parseOutcomeCounts(notificationDetails[\"BaiduOutcomeCounts\"][\"Outcome\"]);\n }\n\n let fcmOutcomeCounts: NotificationOutcomeCollectionItem[] | undefined;\n if (isDefined(notificationDetails[\"GcmOutcomeCounts\"])) {\n fcmOutcomeCounts = parseOutcomeCounts(notificationDetails[\"GcmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let wnsOutcomeCounts: NotificationOutcomeCollectionItem[] | undefined;\n if (isDefined(notificationDetails[\"WnsOutcomeCounts\"])) {\n wnsOutcomeCounts = parseOutcomeCounts(notificationDetails[\"WnsOutcomeCounts\"][\"Outcome\"]);\n }\n\n return {\n notificationId: getStringOrUndefined(notificationDetails[\"NotificationId\"]),\n location: getStringOrUndefined(notificationDetails[\"Location\"]),\n state: getStringOrUndefined(notificationDetails[\"State\"]) as NotificationOutcomeState,\n enqueueTime: getDateOrUndefined(notificationDetails[\"EnqueueTime\"]),\n startTime: getDateOrUndefined(notificationDetails[\"StartTime\"]),\n endTime: getDateOrUndefined(notificationDetails[\"EndTime\"]),\n pnsErrorDetailsUrl: getStringOrUndefined(notificationDetails[\"PnsErrorDetailsUri\"]),\n targetPlatforms: getStringOrUndefined(notificationDetails[\"TargetPlatforms\"]),\n apnsOutcomeCounts,\n admOutcomeCounts,\n baiduOutcomeCounts,\n fcmOutcomeCounts,\n wnsOutcomeCounts,\n };\n}\n\nfunction parseOutcomeCounts(counts: Record<string, any>[]): NotificationOutcomeCollectionItem[] {\n const results: NotificationOutcomeCollectionItem[] = [];\n for (const item of counts) {\n results.push({ state: item[\"Name\"], count: getInteger(item[\"Count\"], \"Count\") });\n }\n\n return results;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationDetails } from \"../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { parseNotificationDetails } from \"../serializers/notificationDetailsSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\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 context - The Notification Hubs client.\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 */\nexport function getNotificationOutcomeDetails(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {}\n): Promise<NotificationDetails> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getNotificationOutcomeDetails\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/messages/${notificationId}`;\n\n const headers = context.createHeaders();\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationDetails(response.bodyAsText!);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets a registration by the given registration ID.\n * @param context - The Notification Hubs client.\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 */\nexport function getRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: OperationOptions = {}\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getRegistration\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { parseNotificationHubJobFeed } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param context - The Notification Hubs client.xs\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\nexport function listNotificationHubJobs(\n context: NotificationHubsClientContext,\n options: OperationOptions = {}\n): Promise<NotificationHubJob[]> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-getNotificationHubJobs\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/jobs\";\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobFeed(response.bodyAsText!);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { RegistrationQueryResponse } from \"../models/response.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Lists all registrations with the matching tag.\n * @param context - The Notification Hubs client.\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 */\nexport function listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions = {}\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext-listRegistrationsByTag\",\n options\n );\n try {\n const iter = listRegistrationsByTagAll(context, tag, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationsByTagPagingPage(context, tag, options);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n\nasync function* listRegistrationsByTagAll(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationsByTagPagingPage(context, tag, options)) {\n yield* page;\n }\n}\n\nasync function* listRegistrationsByTagPagingPage(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrationsByTag(context, tag, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrationsByTag(context, tag, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n continuationToken?: string\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/tags/${tag}/registrations`;\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = context.createHeaders();\n\n const request = createRequest(endpoint, \"GET\", headers, options);\n const response = await sendRequest(context, request, 200);\n\n const registrations = await registrationDescriptionParser.parseRegistrationFeed(\n response.bodyAsText!\n );\n const nextToken = response.headers.get(\"x-ms-continuationtoken\");\n return {\n registrations,\n continuationToken: nextToken,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RegistrationQueryOptions } from \"../models/options.js\";\nimport { RegistrationQueryResponse } from \"../models/response.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets all registrations for the notification hub with the given query options.\n * @param context - The Notification Hubs client.\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 */\nexport function listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions = {}\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext-listRegistrations\",\n options\n );\n try {\n const iter = listRegistrationsAll(context, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationPagingPage(context, options);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n\nasync function* listRegistrationsAll(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationPagingPage(context, options)) {\n yield* page;\n }\n}\n\nasync function* listRegistrationPagingPage(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrations(context, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrations(context, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n continuationToken?: string\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (options.filter !== undefined) {\n endpoint.searchParams.set(\"$filter\", options.filter);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = context.createHeaders();\n\n const request = createRequest(endpoint, \"GET\", headers, options);\n const response = await sendRequest(context, request, 200);\n\n const registrations = await registrationDescriptionParser.parseRegistrationFeed(\n response.bodyAsText!\n );\n const nextToken = response.headers.get(\"x-ms-continuationtoken\");\n return {\n registrations,\n continuationToken: nextToken,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./_client.js\";\nimport { Notification } from \"../../models/notification.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { NotificationHubsMessageResponse } from \"../../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../../utils/tracing.js\";\n\n/**\n * @internal\n */\n\nexport function scheduleNotificationPayload(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n tags: string[] | string | undefined,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-$scheduleNotification\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/schedulednotifications/\";\n\n const headers = context.createHeaders();\n if (notification.headers) {\n for (const headerName of Object.keys(notification.headers)) {\n headers.set(headerName, notification.headers[headerName]);\n }\n }\n\n headers.set(\"ServiceBusNotification-ScheduleTime\", scheduledTime.toISOString());\n headers.set(\"Content-Type\", notification.contentType);\n headers.set(\"ServiceBusNotification-Format\", notification.platform);\n\n if (tags) {\n let tagExpression = null;\n if (Array.isArray(tags)) {\n tagExpression = tags.join(\"||\");\n } else {\n tagExpression = tags;\n }\n headers.set(\"ServiceBusNotification-Tags\", tagExpression);\n }\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n request.body = notification.body;\n\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationSendResponse(response);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { scheduleNotificationPayload } from \"./internal/_scheduleNotificationPayload.js\";\n\n/**\n * Schedules a push notification to all devices registered on the Notification Hub.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleBroadcastNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationPayload(context, scheduledTime, undefined, notification, options);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { scheduleNotificationPayload } from \"./internal/_scheduleNotificationPayload.js\";\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 context - The Notification Hubs client.\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 */\nexport function scheduleNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n tags: string[] | string,\n notification: Notification,\n options: OperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationPayload(context, scheduledTime, tags, notification, options);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BrowserPushChannel, PushHandle } from \"../../models/installation.js\";\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./_client.js\";\nimport { Notification } from \"../../models/notification.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { NotificationHubsMessageResponse } from \"../../models/response.js\";\nimport { SendOperationOptions } from \"../../models/options.js\";\nimport { tracingClient } from \"../../utils/tracing.js\";\n\n/**\n * @internal\n */\nexport function sendNotificationPayload(\n context: NotificationHubsClientContext,\n notification: Notification,\n method: string,\n pushHandle?: PushHandle,\n tags?: string | string[],\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext-${method}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/messages/\";\n\n if (options.enableTestSend) {\n endpoint.searchParams.append(\"debug\", \"true\");\n }\n\n const headers = context.createHeaders();\n if (notification.headers) {\n for (const headerName of Object.keys(notification.headers)) {\n headers.set(headerName, notification.headers[headerName]);\n }\n }\n\n if (pushHandle) {\n endpoint.searchParams.append(\"direct\", \"true\");\n\n if (notification.platform === \"browser\") {\n const browserHandle = pushHandle as BrowserPushChannel;\n headers.set(\"ServiceBusNotification-DeviceHandle\", browserHandle.endpoint);\n headers.set(\"Auth\", browserHandle.auth);\n headers.set(\"P256DH\", browserHandle.p256dh);\n } else {\n headers.set(\"ServiceBusNotification-DeviceHandle\", pushHandle as string);\n }\n }\n\n headers.set(\"Content-Type\", notification.contentType);\n headers.set(\"ServiceBusNotification-Format\", notification.platform);\n\n if (tags) {\n let tagExpression = null;\n if (Array.isArray(tags)) {\n tagExpression = tags.join(\"||\");\n } else {\n tagExpression = tags;\n }\n headers.set(\"ServiceBusNotification-Tags\", tagExpression);\n }\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n request.body = notification.body;\n\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationSendResponse(response);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/response.js\";\nimport { SendOperationOptions } from \"../models/options.js\";\nimport { sendNotificationPayload } from \"./internal/_sendNotificationPayload.js\";\n\n/**\n * Sends push notifications to all devices on the Notification Hub.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to all devices.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendBroadcastNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationPayload(\n context,\n notification,\n \"sendNotification\",\n undefined,\n undefined,\n options\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/response.js\";\nimport { PushHandle } from \"../models/installation.js\";\nimport { SendOperationOptions } from \"../models/options.js\";\nimport { sendNotificationPayload } from \"./internal/_sendNotificationPayload.js\";\n\n/**\n * Sends a direct push notification to a device with the given push handle.\n * @param context - The Notification Hubs client.\n * @param pushHandle - The push handle which is the unique identifier for the device.\n * @param notification - The notification to send to the device.\n * @param options - Configuration options for the direct send operation which can contain custom headers\n * which may include APNs specific such as apns-topic or for WNS, X-WNS-TYPE.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendDirectNotification(\n context: NotificationHubsClientContext,\n pushHandle: PushHandle,\n notification: Notification,\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationPayload(\n context,\n notification,\n \"sendDirectNotification\",\n pushHandle,\n undefined,\n options\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/response.js\";\nimport { SendOperationOptions } from \"../models/options.js\";\nimport { sendNotificationPayload } from \"./internal/_sendNotificationPayload.js\";\n\n/**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param context - The Notification Hubs client.\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 */\nexport function sendNotification(\n context: NotificationHubsClientContext,\n tags: string[] | string,\n notification: Notification,\n options: SendOperationOptions = {}\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationPayload(\n context,\n notification,\n \"sendNotification\",\n undefined,\n tags,\n options\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport {\n parseNotificationHubJobEntry,\n serializeNotificationHubJobEntry,\n} from \"../serializers/notificationHubJobSerializer.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Submits a Notification Hub Job.\n * Note: this is available to Standard SKU namespace and above.\n * @param context - The Notification Hubs client.\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 */\nexport function submitNotificationHubJob(\n context: NotificationHubsClientContext,\n job: NotificationHubJob,\n options: OperationOptions = {}\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-submitNotificationHubJob\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/jobs\";\n\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n request.body = serializeNotificationHubJobEntry(job);\n\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { JsonPatch } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/response.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to update.\n * @param installationPatches - 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 */\nexport function updateInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n installationPatches: JsonPatch[],\n options: OperationOptions = {}\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-updateInstallation\",\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n const headers = context.createHeaders();\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PATCH\", headers, updatedOptions);\n request.body = JSON.stringify(installationPatches);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Updates an existing registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\nexport function updateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {}\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n \"NotificationHubsClientContext-updateRegistration\",\n options,\n async (updatedOptions) => {\n if (!registration.etag) {\n throw new RestError(\"ETag is required for registration update\", { statusCode: 400 });\n }\n return createOrUpdateRegistrationDescription(context, registration, \"update\", updatedOptions);\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Installation, JsonPatch, PushHandle } from \"./models/installation.js\";\nimport { NotificationHubsClientContext, createClientContext } from \"./client/index.js\";\nimport {\n NotificationHubsClientOptions,\n RegistrationQueryLimitOptions,\n RegistrationQueryOptions,\n SendOperationOptions,\n} from \"./models/options.js\";\nimport { NotificationHubsMessageResponse, NotificationHubsResponse } from \"./models/response.js\";\nimport { Notification } from \"./models/notification.js\";\nimport { NotificationDetails } from \"./models/notificationDetails.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 - 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 sendDirectNotification(\n pushHandle: PushHandle,\n notification: Notification,\n options: SendOperationOptions = {}\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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents an installation for a device for Notification Hubs.\n */\nexport interface InstallationCommon {\n /**\n * The ID for the installation.\n */\n installationId: string;\n\n /**\n * The User ID for the installation used for targeting.\n */\n userId?: string;\n\n /**\n * The installation expiration time.\n */\n readonly expirationTime?: string;\n\n /**\n * The last update date of the installation.\n */\n readonly lastUpdate?: string;\n\n /**\n * The platform for the installation.\n */\n platform: \"apns\" | \"adm\" | \"baidu\" | \"browser\" | \"gcm\" | \"wns\";\n\n /**\n * The tags used for targeting this installation.\n */\n tags?: string[];\n\n /**\n * The templates for the installation.\n */\n templates?: Record<string, InstallationTemplate>;\n}\n\n/**\n * Represents an installation with a string based device token.\n */\nexport interface DeviceTokenInstallation extends InstallationCommon {\n /**\n * The push channel for a device.\n */\n pushChannel: string;\n}\n\n/**\n * Represents an Apple APNs based installation.\n */\nexport interface AppleInstallation extends DeviceTokenInstallation {\n /**\n * The platform for the installation.\n */\n platform: \"apns\";\n}\n\n/**\n * Creates an Apple based installation.\n * @param installation - A partial installation used to create the Apple installation.\n * @returns The newly created Apple installation.\n */\nexport function createAppleInstallation(\n installation: Omit<AppleInstallation, \"platform\">\n): AppleInstallation {\n return {\n ...installation,\n platform: \"apns\",\n };\n}\n\n/**\n * Represents an Amazon Device Messaging (ADM) based installation.\n */\nexport interface AdmInstallation extends DeviceTokenInstallation {\n /**\n * The platform for the installation.\n */\n platform: \"adm\";\n}\n\n/**\n * Creates an Amazon Device Messaging (ADM) based installation.\n * @param installation - A partial installation used to create the ADM installation.\n * @returns The newly created ADM installation.\n */\nexport function createAdmInstallation(\n installation: Omit<AdmInstallation, \"platform\">\n): AdmInstallation {\n return {\n ...installation,\n platform: \"adm\",\n };\n}\n\n/**\n * Represents a Baidu based installation.\n */\nexport interface BaiduInstallation extends DeviceTokenInstallation {\n /**\n * The platform for the installation.\n */\n platform: \"baidu\";\n}\n\n/**\n * Creates a Baidu based installation.\n * @param installation - A partial installation used to create the Baidu installation.\n * @returns The newly created Baidu installation.\n */\nexport function createBaiduInstallation(\n installation: Omit<BaiduInstallation, \"platform\">\n): BaiduInstallation {\n return {\n ...installation,\n platform: \"baidu\",\n };\n}\n\n/**\n * Represents a Firebase Legacy HTTP installation.\n */\nexport interface FirebaseLegacyInstallation extends DeviceTokenInstallation {\n /**\n * The platform for the installation.\n */\n platform: \"gcm\";\n}\n\n/**\n * Creates a Firebase legacy HTTP based installation.\n * @param installation - A partial installation used to create the Firebase Legacy HTTP installation.\n * @returns The newly created Baidu installation.\n */\nexport function createFirebaseLegacyInstallation(\n installation: Omit<FirebaseLegacyInstallation, \"platform\">\n): FirebaseLegacyInstallation {\n return {\n ...installation,\n platform: \"gcm\",\n };\n}\n\n/**\n * Represents a Windows Notification Services (WNS) based installation.\n */\nexport interface WindowsInstallation extends DeviceTokenInstallation {\n /**\n * The platform for the installation.\n */\n platform: \"wns\";\n}\n\n/**\n * Creates a Windows Notification Services (WNS) based installation.\n * @param installation - A partial installation used to create the WNS installation.\n * @returns The newly created WNS installation.\n */\nexport function createWindowsInstallation(\n installation: Omit<WindowsInstallation, \"platform\">\n): WindowsInstallation {\n return {\n ...installation,\n platform: \"wns\",\n };\n}\n\n/**\n * Represents the push channel for a Browser Push installation.\n */\nexport interface BrowserPushChannel {\n /**\n * The P256DH for the browser push installation.\n */\n p256dh: string;\n\n /**\n * The auth secret for the browser push installation.\n */\n auth: string;\n\n /**\n * The endpoint URL for the browser push installation.\n */\n endpoint: string;\n}\n\n/**\n * Represents a Browser/Web Push based installation.\n */\nexport interface BrowserInstallation extends InstallationCommon {\n /**\n * The push channel for the Web Push API.\n */\n pushChannel: BrowserPushChannel;\n\n /**\n * The platform for the installation.\n */\n platform: \"browser\";\n}\n\n/**\n * Creates a Web Push based installation.\n * @param installation - A partial installation used to create the Web Push installation.\n * @returns The newly created Web Push installation.\n */\nexport function createBrowserInstallation(\n installation: Omit<BrowserInstallation, \"platform\">\n): BrowserInstallation {\n return {\n ...installation,\n platform: \"browser\",\n };\n}\n\n/**\n * Represents the types of installations available in Notification Hubs.\n */\nexport type Installation =\n | AppleInstallation\n | AdmInstallation\n | BaiduInstallation\n | BrowserInstallation\n | FirebaseLegacyInstallation\n | WindowsInstallation;\n\n/**\n * Represents an installation template.\n */\nexport interface InstallationTemplate {\n /**\n * The body for the installation template.\n */\n body: string;\n\n /**\n * Headers to include for the template send.\n */\n headers: Record<string, string>;\n\n /**\n * The tags to include for the template.\n */\n tags?: string[];\n}\n\n/**\n * Represents the JSON Patch types of add, remove and replace.\n */\nexport type JsonPatchOperation = \"add\" | \"remove\" | \"replace\";\n\n/**\n * Represents a patch operation.\n */\nexport interface JsonPatch {\n /**\n * The patch operation.\n */\n op: JsonPatchOperation;\n\n /**\n * The path for the patch operation.\n */\n path: string;\n\n /**\n * The value to add or replace for the operation.\n */\n value?: string;\n}\n\n/**\n * Represents the types of push channels available for Notification Hubs.\n */\nexport type PushHandle = BrowserPushChannel | string;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as Constants from \"../utils/constants.js\";\n\n/**\n * Represents a notification hub.\n */\nexport interface NotificationCommon {\n /**\n * The body for the push notification.\n */\n body: string;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n\n /**\n * The platform for the push notification.\n */\n platform: string;\n\n /**\n * The content type for the push notification.\n */\n contentType: string;\n}\n\n/**\n * Represents a JSON notification hub.\n */\nexport interface JsonNotification extends NotificationCommon {\n /**\n * The content type for the push notification.\n */\n contentType: \"application/json;charset=utf-8\";\n}\n\n/**\n * Represents an Apple APNs push notification.\n */\nexport interface AppleNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"apple\";\n}\n\n/**\n * Creates a notification to send to an Apple device.\n * @param notification - A partial message used to create a message for Apple.\n * @returns A newly created Apple.\n */\nexport function createAppleNotification(\n notification: Omit<AppleNotification, \"platform\" | \"contentType\">\n): AppleNotification {\n return {\n ...notification,\n platform: \"apple\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents an Amazon Device Messaging (ADM) push notification.\n */\nexport interface AdmNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"adm\";\n}\n\n/**\n * Creates a notification to send to an Amazon Device Messaging device.\n * @param notification - A partial message used to create a message for Amazon Device Messaging.\n * @returns A newly created Amazon Device Messaging.\n */\nexport function createAdmNotification(\n notification: Omit<AdmNotification, \"platform\" | \"contentType\">\n): AdmNotification {\n return {\n ...notification,\n platform: \"adm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Baidu push notification.\n */\nexport interface BaiduNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"baidu\";\n}\n\n/**\n * Creates a notification to send to a Baidu registered device.\n * @param notification - A partial message used to create a message for Baidu.\n * @returns A newly created Baidu.\n */\nexport function createBaiduNotification(\n notification: Omit<BaiduNotification, \"platform\" | \"contentType\">\n): BaiduNotification {\n return {\n ...notification,\n platform: \"baidu\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Browser push notification.\n */\nexport interface BrowserNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"browser\";\n}\n\n/**\n * Creates a notification to send to a browser.\n * @param notification - A partial message used to create a message for a browser.\n * @returns A newly created Web Push browser.\n */\nexport function createBrowserNotification(\n notification: Omit<BrowserNotification, \"platform\" | \"contentType\">\n): BrowserNotification {\n return {\n ...notification,\n platform: \"browser\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Firebase legacy HTTP push notification.\n */\nexport interface FirebaseLegacyNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"gcm\";\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase.\n */\nexport function createFirebaseLegacyNotification(\n notification: Omit<FirebaseLegacyNotification, \"platform\" | \"contentType\">\n): FirebaseLegacyNotification {\n return {\n ...notification,\n platform: \"gcm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a template based push notification.\n */\nexport interface TemplateNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"template\";\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase.\n */\nexport function createTemplateNotification(\n notification: Omit<TemplateNotification, \"platform\" | \"contentType\">\n): TemplateNotification {\n return {\n ...notification,\n platform: \"template\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents the possible WNS content-types.\n */\nexport type WindowsContentType = \"application/xml\" | \"application/octet-stream\";\n\n/**\n * Represents a Windows Notification Services (WNS) push notification.\n */\nexport interface WindowsNotification extends NotificationCommon {\n /**\n * The platform for the push notification.\n */\n platform: \"wns\";\n\n /**\n * The content type for the push notification.\n */\n contentType: WindowsContentType;\n}\n\n/**\n * Creates a badge message to send to WNS.\n * @param notification - A partial message used to create a badge message for WNS.\n * @returns A newly created WNS badge.\n */\nexport function createWindowsBadgeNotification(\n notification: Omit<WindowsNotification, \"platform\" | \"contentType\">\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"wns\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_BADGE;\n\n return result;\n}\n\n/**\n * Creates a tile message to send to WNS.\n * @param notification - A partial message used to create a tile message for WNS.\n * @returns A newly created WNS tile.\n */\nexport function createWindowsTileNotification(\n notification: Omit<WindowsNotification, \"platform\" | \"contentType\">\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"wns\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TITLE;\n\n return result;\n}\n\n/**\n * Creates a toast message to send to WNS.\n * @param notification - A partial message used to create a toast message for WNS.\n * @returns A newly created WNS toast.\n */\nexport function createWindowsToastNotification(\n notification: Omit<WindowsNotification, \"platform\" | \"contentType\">\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"wns\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TOAST;\n\n return result;\n}\n\n/**\n * Creates a notification to send to WNS in wns/raw format..\n * @param notification - A partial message used to create a message for WNS in XML format.\n * @returns A newly created WNS message using XML.\n */\nexport function createWindowsRawNotification(\n notification: Omit<WindowsNotification, \"platform\" | \"contentType\">\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"wns\",\n contentType: Constants.STREAM_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_RAW;\n\n return result;\n}\n\n/**\n * Represents the possible push notification messages types.\n */\nexport type Notification =\n | AppleNotification\n | AdmNotification\n | BaiduNotification\n | BrowserNotification\n | FirebaseLegacyNotification\n | WindowsNotification\n | TemplateNotification;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AdmNotification,\n AppleNotification,\n BaiduNotification,\n FirebaseLegacyNotification,\n WindowsNotification,\n createAdmNotification,\n createAppleNotification,\n createBaiduNotification,\n createFirebaseLegacyNotification,\n createWindowsBadgeNotification,\n} from \"./notification.js\";\nimport { isDefined, isString } from \"../utils/utils.js\";\nimport { stringifyXML } from \"@azure/core-xml\";\n\n/**\n * Represents what is in the APNs alert body.\n */\nexport interface AppleAlert {\n /**\n * The title of the notification. Apple Watch displays this string in the short look notification\n * interface. Specify a string that’s quickly understood by the user.\n */\n title?: string;\n\n /**\n * Additional information that explains the purpose of the notification.\n */\n subtitle?: string;\n\n /**\n * The content of the alert message.\n */\n body?: string;\n\n /**\n * The name of the launch image file to display. If the user chooses to launch your app,\n * the contents of the specified image or storyboard file are displayed instead of your app’s normal launch image.\n */\n launchImage?: string;\n\n /**\n * The key for a localized title string. Specify this key instead of the title key to retrieve\n * the title from your app’s Localizable.strings files. The value must contain the name of a key in your strings file.\n */\n titleLocKey?: string;\n\n /**\n * An array of strings containing replacement values for variables in your title string.\n * Each %\\@ character in the string specified by the title-loc-key is replaced by a value\n * from this array. The first item in the array replaces the first instance\n * of the %\\@ character in the string, the second item replaces the second instance, and so on.\n */\n titleLocArgs?: string[];\n\n /**\n * The key for a localized subtitle string. Use this key, instead of the subtitle key, to\n * retrieve the subtitle from your app’s Localizable.strings file.\n * The value must contain the name of a key in your strings file.\n */\n subtitleLocKey?: string;\n\n /**\n * An array of strings containing replacement values for variables in your title string.\n * Each %\\@ character in the string specified by subtitle-loc-key is replaced by a value\n * from this array. The first item in the array replaces the first instance of the\n * %\\@ character in the string, the second item replaces the second instance, and so on.\n */\n subtitleLocArgs?: string[];\n\n /**\n * The key for a localized message string. Use this key, instead of the body key, to\n * retrieve the message text from your app’s Localizable.strings file. The value must contain\n * the name of a key in your strings file.\n */\n locKey?: string;\n\n /**\n * An array of strings containing replacement values for variables in your message text.\n * Each %\\@ character in the string specified by loc-key is replaced by a value from\n * this array. The first item in the array replaces the first instance of the %\\@ character\n * in the string, the second item replaces the second instance, and so on.\n */\n locArgs?: string[];\n}\n\n/**\n * Represents an APNs critical sound\n */\nexport interface AppleCriticalSound {\n /**\n * The critical alert flag. Set to 1 to enable the critical alert.\n */\n critical: number;\n\n /**\n * The name of a sound file in your app’s main bundle or in the Library/Sounds folder\n * of your app’s container directory. Specify the string “default” to play the system sound.\n */\n name: string;\n\n /**\n * The volume for the critical alert’s sound. Set this to a value between 0 (silent) and 1 (full volume).\n */\n volume: number;\n}\n\n/**\n * Represents a native APNs message.\n */\nexport interface AppleNativeMessage extends Record<string, any> {\n /**\n * The information for displaying an alert.\n */\n alert?: string | AppleAlert;\n\n /**\n * The number to display in a badge on your app’s icon.\n */\n badge?: number;\n\n /**\n * The name of a sound file in your app’s main bundle or in the Library/Sounds\n * folder of your app’s container directory. Specify the string “default” to\n * play the system sound. Use this key for regular notifications.\n * For critical alerts, use the sound dictionary instead.\n */\n sound?: string | AppleCriticalSound;\n\n /**\n * An app-specific identifier for grouping related notifications.\n */\n threadId?: string;\n\n /**\n * The notification’s type.\n */\n category?: string;\n\n /**\n * The background notification flag. To perform a silent background update,\n * specify the value 1 and don’t include the alert, badge, or sound keys in your payload.\n */\n contentAvailable?: number;\n\n /**\n * The notification service app extension flag. If the value is 1, the system passes\n * the notification to your notification service app extension before delivery.\n */\n mutableContent?: number;\n\n /**\n * The identifier of the window brought forward.\n */\n targetContentId?: string;\n\n /**\n * The importance and delivery timing of a notification.\n */\n interruptionLevel?: \"passive\" | \"active\" | \"time-sensitive\" | \"critical\";\n\n /**\n * The relevance score, a number between 0 and 1, that the system uses to sort the\n * notifications from your app. The highest score gets featured in the notification summary.\n */\n relevanceScore?: number;\n\n /**\n * The criteria the system evaluates to determine if it displays the notification in the current Focus.\n */\n filterCriteria?: string;\n}\n\nfunction createAppleNativeAlert(\n nativeAlert?: string | AppleAlert\n): Record<string, any> | string | undefined {\n if (!isDefined(nativeAlert)) {\n return undefined;\n }\n\n if (isString(nativeAlert)) {\n return nativeAlert;\n }\n\n const alert: Record<string, any> = {\n title: nativeAlert.title,\n subtitle: nativeAlert.subtitle,\n body: nativeAlert.body,\n \"launch-image\": nativeAlert.launchImage,\n \"title-loc-key\": nativeAlert.titleLocKey,\n \"title-loc-args\": nativeAlert.titleLocArgs,\n \"subtitle-loc-key\": nativeAlert.subtitleLocKey,\n \"subtitle-loc-args\": nativeAlert.subtitleLocArgs,\n \"loc-key\": nativeAlert.locKey,\n \"loc-args\": nativeAlert.locArgs,\n };\n\n return alert;\n}\n\n/**\n * Creates an APNs native message to send to Notification Hubs.\n * @param nativeMessage - The Apple native message properties to set.\n * @param additionalProperties - Additional properties for Apple messages.\n * @returns An AppleNotification to send to Notification Hubs.\n */\nexport function buildAppleNativeMessage(\n nativeMessage: AppleNativeMessage,\n additionalProperties?: Record<string, any>\n): AppleNotification {\n const headers: Record<string, string> = {};\n\n const message: Record<string, any> = {\n aps: {\n alert: createAppleNativeAlert(nativeMessage.alert),\n sound: nativeMessage.sound,\n badge: nativeMessage.badge,\n \"thread-id\": nativeMessage.threadId,\n category: nativeMessage.category,\n \"content-available\": nativeMessage.contentAvailable,\n \"mutable-content\": nativeMessage.mutableContent,\n \"target-content-id\": nativeMessage.targetContentId,\n \"interruption-level\": nativeMessage.interruptionLevel,\n \"relevance-score\": nativeMessage.relevanceScore,\n \"filter-criteria\": nativeMessage.filterCriteria,\n },\n ...additionalProperties,\n };\n\n const apnsPriority = nativeMessage?.contentAvailable === 1 ? \"5\" : \"10\";\n headers[\"apns-priority\"] = apnsPriority;\n\n return createAppleNotification({\n body: JSON.stringify(message),\n headers: headers,\n });\n}\n\n/**\n * Represents the targets, options, and payload for HTTP JSON messages for the Firebase Legacy HTTP interface.\n */\nexport interface FirebaseLegacyNativeMessage {\n /**\n * The recipient of a message.\n */\n to?: string;\n\n /**\n * The recipient of a multicast message, a message sent to more than one registration token.\n */\n registrationIds?: string[];\n\n /**\n * A logical expression of conditions that determine the message target.\n */\n condition?: string;\n\n /**\n * Used to identify a group of messages.\n */\n collapseKey?: string;\n\n /**\n * The priority of the message.\n */\n priority?: \"normal\" | \"high\";\n\n /**\n * The background notification flag. To perform a silent background update,\n * specify the value 1 and don’t include the alert, badge, or sound keys in your payload.\n */\n contentAvailable?: boolean;\n\n /**\n * The notification service app extension flag. If the value is 1, the system passes\n * the notification to your notification service app extension before delivery.\n */\n mutableContent?: number;\n\n /**\n * Specifies how long (in seconds) the message should be kept in FCM storage if the device is offline\n */\n timeToLive?: number;\n\n /**\n * The package name of the application where the registration tokens must match in order to receive the message.\n */\n restrictedPackageName?: string;\n\n /**\n * When set to true, allows developers to test a request without actually sending a message.\n */\n dryRun?: boolean;\n\n /**\n * Custom key-value pairs of the message's payload.\n */\n data?: Record<string, any>;\n\n /**\n * The predefined, user-visible key-value pairs of the notification payload.\n */\n notification?:\n | FirebaseLegacyAppleNativePayload\n | FirebaseLegacyAndroidNativePayload\n | FirebaseLegacyWebNativePayload;\n}\n\n/**\n * Represents an APNs native payload for the Firebase Legacy HTTP interface.\n */\nexport interface FirebaseLegacyAppleNativePayload {\n /**\n * The notification's title.\n */\n title?: string;\n\n /**\n * The notification's body text.\n */\n body?: string;\n\n /**\n * The sound to play when the device receives the notification.\n */\n sound?: string;\n\n /**\n * The value of the badge on the home screen app icon.\n */\n badge?: string;\n\n /**\n * The action associated with a user click on the notification which corresponds to the APNs category.\n */\n clickAction?: string;\n\n /**\n * The notification's subtitle.\n */\n subtitle?: string;\n\n /**\n * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.\n */\n bodyLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.\n */\n bodyLocArgs?: string[];\n\n /**\n * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.\n */\n titleLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.\n */\n titleLocArgs?: string[];\n}\n\n/**\n * Represents an Android native payload for the Firebase Legacy HTTP interface.\n */\nexport interface FirebaseLegacyAndroidNativePayload {\n /**\n * The notification's title.\n */\n title?: string;\n\n /**\n * The notification's body text.\n */\n body?: string;\n\n /**\n * The notification's channel ID.\n */\n androidChannelId?: string;\n\n /**\n * The notification's icon.\n */\n icon?: string;\n\n /**\n * The sound to play when the device receives the notification.\n */\n sound?: string;\n\n /**\n * Identifier used to replace existing notifications in the notification drawer.\n */\n tag?: string;\n\n /**\n * The notification's icon color, expressed in #rrggbb format.\n */\n color?: string;\n\n /**\n * The action associated with a user click on the notification.\n */\n clickAction?: string;\n\n /**\n * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.\n */\n bodyLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.\n */\n bodyLocArgs?: string[];\n\n /**\n * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.\n */\n titleLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.\n */\n titleLocArgs?: string[];\n}\n\n/**\n * Represents an Web Push native payload for the Firebase Legacy HTTP interface.\n */\nexport interface FirebaseLegacyWebNativePayload {\n /**\n * The notification's title.\n */\n title?: string;\n\n /**\n * The notification's body text.\n */\n body?: string;\n\n /**\n * The URL to use for the notification's icon.\n */\n icon?: string;\n\n /**\n * The action associated with a user click on the notification.\n */\n clickAction?: string;\n}\n\nfunction buildFirebaseLegacyNativePayload(\n nativeNotification?:\n | FirebaseLegacyAppleNativePayload\n | FirebaseLegacyAndroidNativePayload\n | FirebaseLegacyWebNativePayload\n): Record<string, any> | undefined {\n if (!isDefined(nativeNotification)) {\n return undefined;\n }\n\n const androidMessage = nativeNotification as FirebaseLegacyAndroidNativePayload;\n const appleMessage = nativeNotification as FirebaseLegacyAppleNativePayload;\n\n const notification: Record<string, any> = {\n title: nativeNotification.title,\n body: nativeNotification.body,\n click_action: nativeNotification.clickAction,\n\n // Apple/Android fields\n sound: appleMessage.sound,\n badge: appleMessage.badge,\n subtitle: appleMessage.subtitle,\n body_loc_key: appleMessage.bodyLocKey,\n body_loc_args: appleMessage.bodyLocArgs,\n title_loc_key: appleMessage.bodyLocKey,\n title_loc_args: appleMessage.bodyLocArgs,\n\n // Android/Web fields\n android_channel_id: androidMessage.androidChannelId,\n icon: androidMessage.icon,\n tag: androidMessage.tag,\n color: androidMessage.color,\n };\n\n return notification;\n}\n\n/**\n * Creates a FirebaseLegacyNotification from a native Firebase payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The FirebaseLegacyNotification to send to Notification Hubs.\n */\nexport function buildFirebaseLegacyNativeMessage(\n nativeMessage: FirebaseLegacyNativeMessage\n): FirebaseLegacyNotification {\n const jsonMessage: Record<string, any> = {\n to: nativeMessage.to,\n registration_ids: nativeMessage.registrationIds,\n condition: nativeMessage.condition,\n collapse_key: nativeMessage.collapseKey,\n priority: nativeMessage.priority,\n content_available: nativeMessage.contentAvailable,\n mutable_content: nativeMessage.mutableContent,\n time_to_live: nativeMessage.timeToLive,\n restricted_package_name: nativeMessage.restrictedPackageName,\n dry_run: nativeMessage.dryRun,\n data: nativeMessage.data,\n notification: buildFirebaseLegacyNativePayload(nativeMessage.notification),\n };\n\n return createFirebaseLegacyNotification({\n body: JSON.stringify(jsonMessage),\n });\n}\n\n/**\n * Describes ADM notification messages.\n */\nexport interface AdmNativeNotification {\n /**\n * The notification's title.\n */\n title?: string;\n\n /**\n * The notification's body text.\n */\n body?: string;\n\n /**\n * The notification's icon.\n */\n icon?: string;\n\n /**\n * The notification's icon color, expressed in #rrggbb format.\n */\n color?: string;\n\n /**\n * The sound to play when the device receives the notification. Supports \"default\" or the filename of a sound resource bundled in the app.\n */\n sound?: string;\n\n /**\n * Identifier used to replace existing notifications in the notification drawer.\n */\n tag?: string;\n\n /**\n * The action associated with a user click on the notification.\n */\n clickAction?: string;\n\n /**\n * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.\n */\n bodyLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.\n */\n bodyLocArgs?: string[];\n\n /**\n * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.\n */\n titleLocKey?: string;\n\n /**\n * Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.\n */\n titleLocArgs?: string[];\n\n /**\n * The notification's channel id.\n */\n channelId?: string;\n\n /**\n * Sets the \"ticker\" text, which is sent to accessibility services.\n */\n ticker?: string;\n\n /**\n * When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel.\n */\n sticky?: boolean;\n\n /**\n * Set the time that the event in the notification occurred. Must be a timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".\n */\n eventTime?: string;\n\n /**\n * Set whether or not this notification is relevant only to the current device.\n */\n localOnly?: boolean;\n\n /**\n * Set the relative priority for this notification.\n */\n notificationPriority?: number; // TODO: Enum?\n\n /**\n * If set to true, use the Android framework's default sound for the notification.\n */\n defaultSound?: boolean;\n\n /**\n * Set the Notification.visibility of the notification.\n */\n visibility?: number; // TODO: Enum?\n\n /**\n * Sets the number of items this notification represents.\n */\n notificationCount?: number;\n\n /**\n * Contains the URL of an image that is going to be displayed in a notification.\n */\n image?: string;\n}\n\n/**\n * Represents a native ADM notification message payload.\n */\nexport interface AdmNativeMessage {\n /**\n * The notification payload to send with the message.\n */\n notification?: AdmNativeNotification;\n\n /**\n * The payload data to send with the message.\n */\n data?: Record<string, string>;\n\n /**\n * The priority of the msssage.\n */\n priority?: \"normal\" | \"high\";\n\n /**\n * This is an arbitrary string used to indicate that multiple messages are logically the same\n * and that ADM is allowed to drop previously enqueued messages in favor of this new one.\n */\n consolidationKey?: string;\n\n /**\n * The number of seconds that ADM should retain the message if the device is offline.\n */\n expiresAfter?: number;\n\n /**\n * This is a base-64-encoded MD5 checksum of the data parameter.\n */\n md5?: string;\n}\n\nfunction buildAdmNativeNotification(\n nativeNotification?: AdmNativeNotification\n): Record<string, any> | undefined {\n if (!isDefined(nativeNotification)) {\n return undefined;\n }\n\n return {\n title: nativeNotification.title,\n body: nativeNotification.body,\n icon: nativeNotification.icon,\n color: nativeNotification.color,\n sound: nativeNotification.sound,\n tag: nativeNotification.tag,\n click_action: nativeNotification.clickAction,\n body_loc_key: nativeNotification.bodyLocKey,\n body_loc_args: nativeNotification.bodyLocArgs,\n title_loc_key: nativeNotification.titleLocKey,\n title_loc_args: nativeNotification.titleLocArgs,\n channel_id: nativeNotification.channelId,\n ticker: nativeNotification.ticker,\n sticky: nativeNotification.sticky,\n event_time: nativeNotification.eventTime,\n local_only: nativeNotification.localOnly,\n notification_priority: nativeNotification.notificationPriority,\n default_sound: nativeNotification.defaultSound,\n visibility: nativeNotification.visibility,\n notification_count: nativeNotification.notificationCount,\n image: nativeNotification.image,\n };\n}\n\n/**\n * Creates a AdmNotification from a native ADM payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The AdmNotification to send to Notification Hubs.\n */\nexport function buildAdmNativeMessage(nativeMessage: AdmNativeMessage): AdmNotification {\n const jsonObj: Record<string, any> = {\n notification: buildAdmNativeNotification(nativeMessage.notification),\n data: nativeMessage.data || {},\n ...nativeMessage,\n };\n\n return createAdmNotification({\n body: JSON.stringify(jsonObj),\n });\n}\n\n/**\n * Represents the Baidu Apple native payload.\n */\nexport interface BaiduAppleNativePayload {\n /**\n * The alert string.\n */\n alert?: string;\n\n /**\n * The APNs sound to play.\n */\n sound?: string;\n\n /**\n * The APNs badge count.\n */\n badge?: number;\n}\n\n/**\n * Baidu Native Format:\n * https://stackoverflow.com/questions/42591815/customize-baidu-push-json-payload\n * http://www.tuicool.com/articles/ZnmANn\n */\nexport interface BaiduNativeMessage extends Record<string, any> {\n /**\n * Notification title for Android.\n */\n title?: string;\n\n /**\n * Baidu Notification description for Android.\n */\n description?: string;\n\n /**\n * Baidu Notification builder ID.\n */\n notificationBuilderId?: number;\n\n /**\n * Baidu Notification Android basic style.\n */\n notificationBasicStyle?: number;\n\n /**\n * Baidu Android open type.\n */\n openType?: number;\n\n /**\n * Baidu Android net support option.\n */\n netSupport?: number;\n\n /**\n * Baidu Android user confirm.\n */\n userConfirm?: number;\n\n /**\n * Baidu Android URL.\n */\n url?: string;\n\n /**\n * Baidu Android package content.\n */\n pkgContent?: string;\n\n /**\n * Baidu Android package version.\n */\n pkgVersion?: string;\n\n /**\n * Baidu Android custom content dictionary.\n */\n customContent?: Record<string, any>;\n\n /**\n * Baidu APNs support.\n */\n aps?: BaiduAppleNativePayload;\n}\n\n/**\n * Creates a BaiduNotification from a native Baidu payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @param additionalProperties - Additional properties for Apple Baidu messages.\n * @returns The BaiduNotification to send to Notification Hubs.\n */\nexport function buildBaiduNativeMessage(\n nativeMessage: BaiduNativeMessage,\n additionalProperties?: Record<string, any>\n): BaiduNotification {\n const jsonObj: Record<string, any> = {\n title: nativeMessage.title,\n description: nativeMessage.description,\n notification_builder_id: nativeMessage.notificationBuilderId,\n notification_basic_style: nativeMessage.notificationBasicStyle,\n open_type: nativeMessage.openType,\n net_support: nativeMessage.netSupport,\n user_confirm: nativeMessage.userConfirm,\n url: nativeMessage.url,\n pkg_content: nativeMessage.pkgContent,\n pkg_version: nativeMessage.pkgVersion,\n custom_content: nativeMessage.customContent,\n aps: nativeMessage.aps,\n ...additionalProperties,\n };\n\n return createBaiduNotification({\n body: JSON.stringify(jsonObj),\n });\n}\n\n/**\n * Represents the types of Windows Badge Glyphs\n */\nexport type WindowsBadgeGlyphType =\n | \"none\"\n | \"activity\"\n | \"alarm\"\n | \"alert\"\n | \"attention\"\n | \"available\"\n | \"away\"\n | \"busy\"\n | \"error\"\n | \"newMessage\"\n | \"paused\"\n | \"playing\"\n | \"unavailable\";\n\n/**\n * Represents the Windows Badge Message\n */\nexport interface WindowsBadgeNativeMessage {\n /**\n * Either a numeric value or a string value that specifies a predefined badge glyph.\n */\n value: WindowsBadgeGlyphType | number;\n}\n\n/**\n * Builds a WindowsNotification from a Windows Badge.\n * @param nativeMessage - The Windows Badge Message to build.\n * @returns A WindowsNotification created with the badge information.\n */\nexport function buildWindowsBadgeNativeMessage(\n nativeMessage: WindowsBadgeNativeMessage\n): WindowsNotification {\n const badge = {\n $: { value: nativeMessage.value },\n };\n\n return createWindowsBadgeNotification({\n body: stringifyXML(badge, { rootName: \"badge\" }),\n });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents the types of registration descriptions.\n */\nexport type RegistrationType =\n | \"Adm\"\n | \"AdmTemplate\"\n | \"Apple\"\n | \"AppleTemplate\"\n | \"Baidu\"\n | \"BaiduTemplate\"\n | \"Browser\"\n | \"BrowserTemplate\"\n | \"Gcm\"\n | \"GcmTemplate\"\n | \"Fcm\"\n | \"FcmTemplate\"\n | \"Mpns\"\n | \"MpnsTemplate\"\n | \"Windows\"\n | \"WindowsTemplate\";\n\n/**\n * Represents a registration description.\n */\nexport interface RegistrationDescriptionCommon {\n /**\n * The registration ID.\n */\n registrationId?: string;\n\n /**\n * The expiration time of the registration.\n */\n expirationTime?: Date;\n\n /**\n * The ETag associated with this description.\n */\n etag?: string;\n\n /**\n * The tags associated with the registration.\n */\n tags?: string[];\n\n /**\n * A dictionary of push variables associated with property bag.\n */\n pushVariables?: Record<string, string>;\n\n /**\n * The type of the registration.\n */\n type: RegistrationType;\n}\n\n/**\n * Represents the description of a template registration.\n */\nexport interface TemplateRegistrationDescription {\n /**\n * The body template.\n */\n bodyTemplate: string;\n\n /**\n * The name of the template.\n */\n templateName?: string;\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) registration.\n */\nexport interface AdmRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The Amazon Device Messaging registration identifier.\n */\n admRegistrationId: string;\n\n /**\n * The type of the registration.\n */\n type: \"Adm\";\n}\n\n/**\n * Creates an ADM registration description.\n * @param description - A partial ADM registration description.\n * @returns A created ADM registration description.\n */\nexport function createAdmRegistrationDescription(\n description: Omit<AdmRegistrationDescription, \"type\">\n): AdmRegistrationDescription {\n return {\n ...description,\n type: \"Adm\",\n };\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) template registration.\n */\nexport interface AdmTemplateRegistrationDescription\n extends Omit<AdmRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The type of the registration.\n */\n type: \"AdmTemplate\";\n}\n\n/**\n * Creates an ADM template registration description.\n * @param description - A partial ADM template registration description.\n * @returns A created ADM template registration description.\n */\nexport function createAdmTemplateRegistrationDescription(\n description: Omit<AdmTemplateRegistrationDescription, \"type\">\n): AdmTemplateRegistrationDescription {\n return {\n ...description,\n type: \"AdmTemplate\",\n };\n}\n\n/**\n * Represents the description of apple registration.\n */\nexport interface AppleRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The APNs device token.\n */\n deviceToken: string;\n\n /**\n * The type of the registration.\n */\n type: \"Apple\";\n}\n\n/**\n * Creates an Apple registration description.\n * @param description - A partial Apple registration description.\n * @returns A created Apple registration description.\n */\nexport function createAppleRegistrationDescription(\n description: Omit<AppleRegistrationDescription, \"type\">\n): AppleRegistrationDescription {\n return {\n ...description,\n type: \"Apple\",\n };\n}\n\n/**\n * The priority of the Apple push notification.\n */\nexport type ApplePriority = \"10\" | \"5\";\n\n/**\n * Represents the description of the Apple template registration.\n */\nexport interface AppleTemplateRegistrationDescription\n extends Omit<AppleRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The expiry date.\n */\n expiry?: Date;\n\n /**\n * The notification priority.\n */\n priority?: ApplePriority;\n\n /**\n * The APNS headers.\n */\n apnsHeaders?: Record<string, string>;\n\n /**\n * The type of the registration.\n */\n type: \"AppleTemplate\";\n}\n\n/**\n * Creates an Apple template registration description.\n * @param description - A partial Apple template registration description.\n * @returns A created Apple template registration description.\n */\nexport function createAppleTemplateRegistrationDescription(\n description: Omit<AppleTemplateRegistrationDescription, \"type\">\n): AppleTemplateRegistrationDescription {\n return {\n ...description,\n type: \"AppleTemplate\",\n };\n}\n\n/**\n * Represents a Baidu registration description.\n */\nexport interface BaiduRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The Baidu user identifier.\n */\n baiduUserId: string;\n\n /**\n * The Baidu channel identifier.\n */\n baiduChannelId: string;\n\n /**\n * The type of the registration.\n */\n type: \"Baidu\";\n}\n\n/**\n * Creates a Baidu registration description.\n * @param description - A partial Baidu registration description.\n * @returns A created Baidu registration description.\n */\nexport function createBaiduRegistrationDescription(\n description: Omit<BaiduRegistrationDescription, \"type\">\n): BaiduRegistrationDescription {\n return {\n ...description,\n type: \"Baidu\",\n };\n}\n\n/**\n * Represents a Baidu template registration description.\n */\nexport interface BaiduTemplateRegistrationDescription\n extends Omit<BaiduRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The type of the registration.\n */\n type: \"BaiduTemplate\";\n}\n\n/**\n * Creates a Baidu template registration description.\n * @param description - A partial Baidu template registration description.\n * @returns A created Baidu template registration description.\n */\nexport function createBaiduTemplateRegistrationDescription(\n description: Omit<BaiduTemplateRegistrationDescription, \"type\">\n): BaiduTemplateRegistrationDescription {\n return {\n ...description,\n type: \"BaiduTemplate\",\n };\n}\n\n/**\n * Represents a Browser Push registration description.\n */\nexport interface BrowserRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The Browser push endpoint.\n */\n endpoint: string;\n\n /**\n * The Browser push P256DH.\n */\n p256dh: string;\n\n /**\n * The Browser push auth secret.\n */\n auth: string;\n\n /**\n * The type of the registration.\n */\n type: \"Browser\";\n}\n\n/**\n * Creates a Web Push registration description.\n * @param description - A partial Web Push registration description.\n * @returns A created Web Push registration description.\n */\nexport function createBrowserRegistrationDescription(\n description: Omit<BrowserRegistrationDescription, \"type\">\n): BrowserRegistrationDescription {\n return {\n ...description,\n type: \"Browser\",\n };\n}\n\n/**\n * Represents a Browser Push remplate registration description.\n */\nexport interface BrowserTemplateRegistrationDescription\n extends Omit<BrowserRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The type of the registration.\n */\n type: \"BrowserTemplate\";\n}\n\n/**\n * Creates a Web Push registration description.\n * @param description - A partial Web Push template registration description.\n * @returns A created Web Push template registration description.\n */\nexport function createBrowserTemplateRegistrationDescription(\n description: Omit<BrowserTemplateRegistrationDescription, \"type\">\n): BrowserTemplateRegistrationDescription {\n return {\n ...description,\n type: \"BrowserTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n * @deprecated Use FcmRegistrationDescription instead.\n */\nexport interface GcmRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Google Cloud Messaging service.\n */\n gcmRegistrationId: string;\n\n /**\n * The type of the registration.\n */\n type: \"Gcm\";\n}\n\n/**\n * @deprecated Use createFcmRegistrationDescription instead.\n * Creates a GCM registration description.\n * @param description - A partial GCM registration description.\n * @returns A created GCM registration description.\n */\nexport function createGcmRegistrationDescription(\n description: Omit<GcmRegistrationDescription, \"type\">\n): GcmRegistrationDescription {\n return {\n ...description,\n type: \"Gcm\",\n };\n}\n\n/**\n * @deprecated Use createFcmTemplateRegistrationDescription instead.\n * Represents Notification Hub template registration description for Google Cloud Messaging.\n * @deprecated Use FcmTemplateRegistrationDescription instead\n */\nexport interface GcmTemplateRegistrationDescription\n extends Omit<GcmRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The type of the registration.\n */\n type: \"GcmTemplate\";\n}\n\n/**\n * @deprecated Use createFcmTemplateRegistrationDescription instead.\n * Creates a GCM template registration description.\n * @param description - A partial GCM template registration description.\n * @returns A created GCM template registration description.\n */\nexport function createGcmTemplateRegistrationDescription(\n description: Omit<GcmTemplateRegistrationDescription, \"type\">\n): GcmTemplateRegistrationDescription {\n return {\n ...description,\n type: \"GcmTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Firebase Legacy HTTP API.\n */\nexport interface FcmRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Google Cloud Messaging service.\n */\n fcmRegistrationId: string;\n\n /**\n * The type of the registration.\n */\n type: \"Fcm\";\n}\n\n/**\n * Creates an FCM registration description.\n * @param description - A partial FCM registration description.\n * @returns A created FCM registration description.\n */\nexport function createFcmRegistrationDescription(\n description: Omit<FcmRegistrationDescription, \"type\">\n): FcmRegistrationDescription {\n return {\n ...description,\n type: \"Fcm\",\n };\n}\n\n/**\n * Represents Notification Hub template registration description for Firebase Legacy HTTP API.\n */\nexport interface FcmTemplateRegistrationDescription\n extends Omit<FcmRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The type of the registration.\n */\n type: \"FcmTemplate\";\n}\n\n/**\n * Creates an FCM template registration description.\n * @param description - A partial FCM template registration description.\n * @returns A created FCM template registration description.\n */\nexport function createFcmTemplateRegistrationDescription(\n description: Omit<FcmTemplateRegistrationDescription, \"type\">\n): FcmTemplateRegistrationDescription {\n return {\n ...description,\n type: \"FcmTemplate\",\n };\n}\n\n/**\n * Represents a Windows Phone Notification Services registration description.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\n\n /**\n * The type of the registration.\n */\n type: \"Mpns\";\n}\n\n/**\n * @deprecated Windows Phone is no longer supported.\n * Creates an MPNS registration description.\n * @param description - A partial MPNS registration description.\n * @returns A created MPNS registration description.\n */\nexport function createMpnsRegistrationDescription(\n description: Omit<MpnsRegistrationDescription, \"type\">\n): MpnsRegistrationDescription {\n return {\n ...description,\n type: \"Mpns\",\n };\n}\n\n/**\n * Represents a Windows Phone Notification Services template registration.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsTemplateRegistrationDescription\n extends Omit<MpnsRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n mpnsHeaders?: Record<string, string>;\n\n /**\n * The type of the registration.\n */\n type: \"MpnsTemplate\";\n}\n\n/**\n * @deprecated Windows Phone is no longer supported.\n * Creates an MPNS template registration description.\n * @param description - A partial MPNS template registration description.\n * @returns A created MPNS template registration description.\n */\nexport function createMpnsTemplateRegistrationDescription(\n description: Omit<MpnsTemplateRegistrationDescription, \"type\">\n): MpnsTemplateRegistrationDescription {\n return {\n ...description,\n type: \"MpnsTemplate\",\n };\n}\n\n/**\n * Represents a Windows Notification Services (WNS) registration description.\n */\nexport interface WindowsRegistrationDescription extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\n\n /**\n * The type of the registration.\n */\n type: \"Windows\";\n}\n\n/**\n * Creates a Windows registration description.\n * @param description - A partial Windows registration description.\n * @returns A created Windows registration description.\n */\nexport function createWindowsRegistrationDescription(\n description: Omit<WindowsRegistrationDescription, \"type\">\n): WindowsRegistrationDescription {\n return {\n ...description,\n type: \"Windows\",\n };\n}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface WindowsTemplateRegistrationDescription\n extends Omit<WindowsRegistrationDescription, \"type\">,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n wnsHeaders?: Record<string, string>;\n\n /**\n * The type of the registration.\n */\n type: \"WindowsTemplate\";\n}\n\n/**\n * Creates a Windows template registration description.\n * @param description - A partial Windows template registration description.\n * @returns A created Windows template registration description.\n */\nexport function createWindowsTemplateRegistrationDescription(\n description: Omit<WindowsTemplateRegistrationDescription, \"type\">\n): WindowsTemplateRegistrationDescription {\n return {\n ...description,\n type: \"WindowsTemplate\",\n };\n}\n\n/**\n * Describes the types of registration descriptions.\n */\nexport type RegistrationDescription =\n | AdmRegistrationDescription\n | AdmTemplateRegistrationDescription\n | AppleRegistrationDescription\n | AppleTemplateRegistrationDescription\n | BaiduRegistrationDescription\n | BaiduTemplateRegistrationDescription\n | BrowserRegistrationDescription\n | BrowserTemplateRegistrationDescription\n | GcmRegistrationDescription\n | GcmTemplateRegistrationDescription\n | FcmRegistrationDescription\n | FcmTemplateRegistrationDescription\n | MpnsRegistrationDescription\n | MpnsTemplateRegistrationDescription\n | WindowsRegistrationDescription\n | WindowsTemplateRegistrationDescription;\n"],"names":["createSasTokenProvider","parseConnectionString","NotificationHubsServiceClient","ServiceClient","parseXML","stringifyXML","createHttpHeaders","createPipelineRequest","RestError","createTracingClient","__asyncValues","__await","__asyncDelegator","createOrUpdateInstallationMethod","deleteInstallationMethod","getInstallationMethod","updateInstallationMethod","createRegistrationIdMethod","createRegistrationMethod","createOrUpdateRegistrationMethod","updateRegistrationMethod","getRegistrationMethod","listRegistrationsMethod","listRegistrationsByTagMethod","sendDirectNotificationMethod","sendNotificationMethod","sendBroadcastNotificationMethod","scheduleNotificationMethod","scheduleBroadcastNotificationMethod","cancelScheduledNotificationMethod","getFeedbackContainerUrlMethod","getNotificationOutcomeDetailsMethod","getNotificationHubJobMethod","submitNotificationHubJobMethod","listNotificationHubJobsMethod","Constants.JSON_CONTENT_TYPE","Constants.XML_CONTENT_TYPE","Constants.WNS_TYPE_NAME","Constants.WNS_BADGE","Constants.WNS_TITLE","Constants.WNS_TOAST","Constants.STREAM_CONTENT_TYPE","Constants.WNS_RAW"],"mappings":";;;;;;;;;;;AAAA;AA2BA;;;;;AAKG;AACa,SAAA,iCAAiC,CAC/C,eAAuB,EACvB,mBAA2B,EAAA;IAE3B,OAAOA,+BAAsB,CAAC,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAC1E,CAA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