@azure/notification-hubs 1.2.4-alpha.20240826.1 → 1.2.4-alpha.20240828.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 (441) hide show
  1. package/dist/browser/api/beginSubmitNotificationHubJob.js +1 -1
  2. package/dist/browser/api/beginSubmitNotificationHubJob.js.map +1 -1
  3. package/dist/browser/api/cancelScheduledNotification.js +1 -1
  4. package/dist/browser/api/cancelScheduledNotification.js.map +1 -1
  5. package/dist/browser/api/clientContext.js +1 -1
  6. package/dist/browser/api/clientContext.js.map +1 -1
  7. package/dist/browser/api/createOrUpdateInstallation.js +1 -1
  8. package/dist/browser/api/createOrUpdateInstallation.js.map +1 -1
  9. package/dist/browser/api/createOrUpdateRegistration.js +1 -1
  10. package/dist/browser/api/createOrUpdateRegistration.js.map +1 -1
  11. package/dist/browser/api/createRegistration.js +1 -1
  12. package/dist/browser/api/createRegistration.js.map +1 -1
  13. package/dist/browser/api/createRegistrationId.js +1 -1
  14. package/dist/browser/api/createRegistrationId.js.map +1 -1
  15. package/dist/browser/api/deleteInstallation.js +1 -1
  16. package/dist/browser/api/deleteInstallation.js.map +1 -1
  17. package/dist/browser/api/deleteRegistration.js +1 -1
  18. package/dist/browser/api/deleteRegistration.js.map +1 -1
  19. package/dist/browser/api/getFeedbackContainerUrl.js +1 -1
  20. package/dist/browser/api/getFeedbackContainerUrl.js.map +1 -1
  21. package/dist/browser/api/getInstallation.js +1 -1
  22. package/dist/browser/api/getInstallation.js.map +1 -1
  23. package/dist/browser/api/getNotificationHubJob.js +1 -1
  24. package/dist/browser/api/getNotificationHubJob.js.map +1 -1
  25. package/dist/browser/api/getNotificationOutcomeDetails.js +1 -1
  26. package/dist/browser/api/getNotificationOutcomeDetails.js.map +1 -1
  27. package/dist/browser/api/getRegistration.js +1 -1
  28. package/dist/browser/api/getRegistration.js.map +1 -1
  29. package/dist/browser/api/index.js +1 -1
  30. package/dist/browser/api/index.js.map +1 -1
  31. package/dist/browser/api/internal/_client.js +1 -1
  32. package/dist/browser/api/internal/_client.js.map +1 -1
  33. package/dist/browser/api/internal/_createOrUpdateRegistrationDescription.js +1 -1
  34. package/dist/browser/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
  35. package/dist/browser/api/internal/_listRegistrations.js +1 -1
  36. package/dist/browser/api/internal/_listRegistrations.js.map +1 -1
  37. package/dist/browser/api/listNotificationHubJobs.js +1 -1
  38. package/dist/browser/api/listNotificationHubJobs.js.map +1 -1
  39. package/dist/browser/api/listRegistrations.js +1 -1
  40. package/dist/browser/api/listRegistrations.js.map +1 -1
  41. package/dist/browser/api/listRegistrationsByChannel.js +1 -1
  42. package/dist/browser/api/listRegistrationsByChannel.js.map +1 -1
  43. package/dist/browser/api/listRegistrationsByTag.js +1 -1
  44. package/dist/browser/api/listRegistrationsByTag.js.map +1 -1
  45. package/dist/browser/api/scheduleNotification.js +1 -1
  46. package/dist/browser/api/scheduleNotification.js.map +1 -1
  47. package/dist/browser/api/sendNotification.js +1 -1
  48. package/dist/browser/api/sendNotification.js.map +1 -1
  49. package/dist/browser/api/submitNotificationHubJob.js +1 -1
  50. package/dist/browser/api/submitNotificationHubJob.js.map +1 -1
  51. package/dist/browser/api/updateInstallation.js +1 -1
  52. package/dist/browser/api/updateInstallation.js.map +1 -1
  53. package/dist/browser/api/updateRegistration.js +1 -1
  54. package/dist/browser/api/updateRegistration.js.map +1 -1
  55. package/dist/browser/auth/connectionStringUtils.js +1 -1
  56. package/dist/browser/auth/connectionStringUtils.js.map +1 -1
  57. package/dist/browser/auth/hmacSha256-browser.mjs.map +1 -1
  58. package/dist/browser/auth/hmacSha256.common.js +1 -1
  59. package/dist/browser/auth/hmacSha256.common.js.map +1 -1
  60. package/dist/browser/auth/hmacSha256.js +1 -1
  61. package/dist/browser/auth/sasTokenCredential.js +1 -1
  62. package/dist/browser/auth/sasTokenCredential.js.map +1 -1
  63. package/dist/browser/index.js +1 -1
  64. package/dist/browser/index.js.map +1 -1
  65. package/dist/browser/models/index.js +1 -1
  66. package/dist/browser/models/index.js.map +1 -1
  67. package/dist/browser/models/installation.js +1 -1
  68. package/dist/browser/models/installation.js.map +1 -1
  69. package/dist/browser/models/notification.js +1 -1
  70. package/dist/browser/models/notification.js.map +1 -1
  71. package/dist/browser/models/notificationBodyBuilder.js +1 -1
  72. package/dist/browser/models/notificationBodyBuilder.js.map +1 -1
  73. package/dist/browser/models/notificationDetails.js +1 -1
  74. package/dist/browser/models/notificationDetails.js.map +1 -1
  75. package/dist/browser/models/notificationHeaderBuilder.js +1 -1
  76. package/dist/browser/models/notificationHeaderBuilder.js.map +1 -1
  77. package/dist/browser/models/notificationHubJob.js +1 -1
  78. package/dist/browser/models/notificationHubJob.js.map +1 -1
  79. package/dist/browser/models/options.js +1 -1
  80. package/dist/browser/models/options.js.map +1 -1
  81. package/dist/browser/models/registration.js +1 -1
  82. package/dist/browser/models/registration.js.map +1 -1
  83. package/dist/browser/models/response.js +1 -1
  84. package/dist/browser/models/response.js.map +1 -1
  85. package/dist/browser/models/tagExpressionBuilder.js +1 -1
  86. package/dist/browser/models/tagExpressionBuilder.js.map +1 -1
  87. package/dist/browser/notificationHubsClient.js +1 -1
  88. package/dist/browser/notificationHubsClient.js.map +1 -1
  89. package/dist/browser/serializers/notificationDetailsSerializer.js +1 -1
  90. package/dist/browser/serializers/notificationDetailsSerializer.js.map +1 -1
  91. package/dist/browser/serializers/notificationHubJobSerializer.js +1 -1
  92. package/dist/browser/serializers/notificationHubJobSerializer.js.map +1 -1
  93. package/dist/browser/serializers/notificationOutcomeSerializer.js +1 -1
  94. package/dist/browser/serializers/notificationOutcomeSerializer.js.map +1 -1
  95. package/dist/browser/serializers/registrationSerializer.js +1 -1
  96. package/dist/browser/serializers/registrationSerializer.js.map +1 -1
  97. package/dist/browser/utils/constants.js +1 -1
  98. package/dist/browser/utils/constants.js.map +1 -1
  99. package/dist/browser/utils/notificationUtils.js +1 -1
  100. package/dist/browser/utils/notificationUtils.js.map +1 -1
  101. package/dist/browser/utils/optionUtils.js +1 -1
  102. package/dist/browser/utils/optionUtils.js.map +1 -1
  103. package/dist/browser/utils/registrationUtils.js +1 -1
  104. package/dist/browser/utils/registrationUtils.js.map +1 -1
  105. package/dist/browser/utils/tracing.js +1 -1
  106. package/dist/browser/utils/tracing.js.map +1 -1
  107. package/dist/browser/utils/utils.js +1 -1
  108. package/dist/browser/utils/utils.js.map +1 -1
  109. package/dist/browser/utils/xmlUtils.js +1 -1
  110. package/dist/browser/utils/xmlUtils.js.map +1 -1
  111. package/dist/commonjs/api/beginSubmitNotificationHubJob.js +1 -1
  112. package/dist/commonjs/api/beginSubmitNotificationHubJob.js.map +1 -1
  113. package/dist/commonjs/api/cancelScheduledNotification.js +1 -1
  114. package/dist/commonjs/api/cancelScheduledNotification.js.map +1 -1
  115. package/dist/commonjs/api/clientContext.js +1 -1
  116. package/dist/commonjs/api/clientContext.js.map +1 -1
  117. package/dist/commonjs/api/createOrUpdateInstallation.js +1 -1
  118. package/dist/commonjs/api/createOrUpdateInstallation.js.map +1 -1
  119. package/dist/commonjs/api/createOrUpdateRegistration.js +1 -1
  120. package/dist/commonjs/api/createOrUpdateRegistration.js.map +1 -1
  121. package/dist/commonjs/api/createRegistration.js +1 -1
  122. package/dist/commonjs/api/createRegistration.js.map +1 -1
  123. package/dist/commonjs/api/createRegistrationId.js +1 -1
  124. package/dist/commonjs/api/createRegistrationId.js.map +1 -1
  125. package/dist/commonjs/api/deleteInstallation.js +1 -1
  126. package/dist/commonjs/api/deleteInstallation.js.map +1 -1
  127. package/dist/commonjs/api/deleteRegistration.js +1 -1
  128. package/dist/commonjs/api/deleteRegistration.js.map +1 -1
  129. package/dist/commonjs/api/getFeedbackContainerUrl.js +1 -1
  130. package/dist/commonjs/api/getFeedbackContainerUrl.js.map +1 -1
  131. package/dist/commonjs/api/getInstallation.js +1 -1
  132. package/dist/commonjs/api/getInstallation.js.map +1 -1
  133. package/dist/commonjs/api/getNotificationHubJob.js +1 -1
  134. package/dist/commonjs/api/getNotificationHubJob.js.map +1 -1
  135. package/dist/commonjs/api/getNotificationOutcomeDetails.js +1 -1
  136. package/dist/commonjs/api/getNotificationOutcomeDetails.js.map +1 -1
  137. package/dist/commonjs/api/getRegistration.js +1 -1
  138. package/dist/commonjs/api/getRegistration.js.map +1 -1
  139. package/dist/commonjs/api/index.js +1 -1
  140. package/dist/commonjs/api/index.js.map +1 -1
  141. package/dist/commonjs/api/internal/_client.js +1 -1
  142. package/dist/commonjs/api/internal/_client.js.map +1 -1
  143. package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.js +1 -1
  144. package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
  145. package/dist/commonjs/api/internal/_listRegistrations.js +1 -1
  146. package/dist/commonjs/api/internal/_listRegistrations.js.map +1 -1
  147. package/dist/commonjs/api/listNotificationHubJobs.js +1 -1
  148. package/dist/commonjs/api/listNotificationHubJobs.js.map +1 -1
  149. package/dist/commonjs/api/listRegistrations.js +1 -1
  150. package/dist/commonjs/api/listRegistrations.js.map +1 -1
  151. package/dist/commonjs/api/listRegistrationsByChannel.js +1 -1
  152. package/dist/commonjs/api/listRegistrationsByChannel.js.map +1 -1
  153. package/dist/commonjs/api/listRegistrationsByTag.js +1 -1
  154. package/dist/commonjs/api/listRegistrationsByTag.js.map +1 -1
  155. package/dist/commonjs/api/scheduleNotification.js +1 -1
  156. package/dist/commonjs/api/scheduleNotification.js.map +1 -1
  157. package/dist/commonjs/api/sendNotification.js +1 -1
  158. package/dist/commonjs/api/sendNotification.js.map +1 -1
  159. package/dist/commonjs/api/submitNotificationHubJob.js +1 -1
  160. package/dist/commonjs/api/submitNotificationHubJob.js.map +1 -1
  161. package/dist/commonjs/api/updateInstallation.js +1 -1
  162. package/dist/commonjs/api/updateInstallation.js.map +1 -1
  163. package/dist/commonjs/api/updateRegistration.js +1 -1
  164. package/dist/commonjs/api/updateRegistration.js.map +1 -1
  165. package/dist/commonjs/auth/connectionStringUtils.js +1 -1
  166. package/dist/commonjs/auth/connectionStringUtils.js.map +1 -1
  167. package/dist/commonjs/auth/hmacSha256.common.js +1 -1
  168. package/dist/commonjs/auth/hmacSha256.common.js.map +1 -1
  169. package/dist/commonjs/auth/hmacSha256.js +1 -1
  170. package/dist/commonjs/auth/hmacSha256.js.map +1 -1
  171. package/dist/commonjs/auth/sasTokenCredential.js +1 -1
  172. package/dist/commonjs/auth/sasTokenCredential.js.map +1 -1
  173. package/dist/commonjs/index.js +1 -1
  174. package/dist/commonjs/index.js.map +1 -1
  175. package/dist/commonjs/models/index.js +1 -1
  176. package/dist/commonjs/models/index.js.map +1 -1
  177. package/dist/commonjs/models/installation.js +1 -1
  178. package/dist/commonjs/models/installation.js.map +1 -1
  179. package/dist/commonjs/models/notification.js +1 -1
  180. package/dist/commonjs/models/notification.js.map +1 -1
  181. package/dist/commonjs/models/notificationBodyBuilder.js +1 -1
  182. package/dist/commonjs/models/notificationBodyBuilder.js.map +1 -1
  183. package/dist/commonjs/models/notificationDetails.js +1 -1
  184. package/dist/commonjs/models/notificationDetails.js.map +1 -1
  185. package/dist/commonjs/models/notificationHeaderBuilder.js +1 -1
  186. package/dist/commonjs/models/notificationHeaderBuilder.js.map +1 -1
  187. package/dist/commonjs/models/notificationHubJob.js +1 -1
  188. package/dist/commonjs/models/notificationHubJob.js.map +1 -1
  189. package/dist/commonjs/models/options.js +1 -1
  190. package/dist/commonjs/models/options.js.map +1 -1
  191. package/dist/commonjs/models/registration.js +1 -1
  192. package/dist/commonjs/models/registration.js.map +1 -1
  193. package/dist/commonjs/models/response.js +1 -1
  194. package/dist/commonjs/models/response.js.map +1 -1
  195. package/dist/commonjs/models/tagExpressionBuilder.js +1 -1
  196. package/dist/commonjs/models/tagExpressionBuilder.js.map +1 -1
  197. package/dist/commonjs/notificationHubsClient.js +1 -1
  198. package/dist/commonjs/notificationHubsClient.js.map +1 -1
  199. package/dist/commonjs/serializers/notificationDetailsSerializer.js +1 -1
  200. package/dist/commonjs/serializers/notificationDetailsSerializer.js.map +1 -1
  201. package/dist/commonjs/serializers/notificationHubJobSerializer.js +1 -1
  202. package/dist/commonjs/serializers/notificationHubJobSerializer.js.map +1 -1
  203. package/dist/commonjs/serializers/notificationOutcomeSerializer.js +1 -1
  204. package/dist/commonjs/serializers/notificationOutcomeSerializer.js.map +1 -1
  205. package/dist/commonjs/serializers/registrationSerializer.js +1 -1
  206. package/dist/commonjs/serializers/registrationSerializer.js.map +1 -1
  207. package/dist/commonjs/utils/constants.js +1 -1
  208. package/dist/commonjs/utils/constants.js.map +1 -1
  209. package/dist/commonjs/utils/notificationUtils.js +1 -1
  210. package/dist/commonjs/utils/notificationUtils.js.map +1 -1
  211. package/dist/commonjs/utils/optionUtils.js +1 -1
  212. package/dist/commonjs/utils/optionUtils.js.map +1 -1
  213. package/dist/commonjs/utils/registrationUtils.js +1 -1
  214. package/dist/commonjs/utils/registrationUtils.js.map +1 -1
  215. package/dist/commonjs/utils/tracing.js +1 -1
  216. package/dist/commonjs/utils/tracing.js.map +1 -1
  217. package/dist/commonjs/utils/utils.js +1 -1
  218. package/dist/commonjs/utils/utils.js.map +1 -1
  219. package/dist/commonjs/utils/xmlUtils.js +1 -1
  220. package/dist/commonjs/utils/xmlUtils.js.map +1 -1
  221. package/dist/esm/api/beginSubmitNotificationHubJob.js +1 -1
  222. package/dist/esm/api/beginSubmitNotificationHubJob.js.map +1 -1
  223. package/dist/esm/api/cancelScheduledNotification.js +1 -1
  224. package/dist/esm/api/cancelScheduledNotification.js.map +1 -1
  225. package/dist/esm/api/clientContext.js +1 -1
  226. package/dist/esm/api/clientContext.js.map +1 -1
  227. package/dist/esm/api/createOrUpdateInstallation.js +1 -1
  228. package/dist/esm/api/createOrUpdateInstallation.js.map +1 -1
  229. package/dist/esm/api/createOrUpdateRegistration.js +1 -1
  230. package/dist/esm/api/createOrUpdateRegistration.js.map +1 -1
  231. package/dist/esm/api/createRegistration.js +1 -1
  232. package/dist/esm/api/createRegistration.js.map +1 -1
  233. package/dist/esm/api/createRegistrationId.js +1 -1
  234. package/dist/esm/api/createRegistrationId.js.map +1 -1
  235. package/dist/esm/api/deleteInstallation.js +1 -1
  236. package/dist/esm/api/deleteInstallation.js.map +1 -1
  237. package/dist/esm/api/deleteRegistration.js +1 -1
  238. package/dist/esm/api/deleteRegistration.js.map +1 -1
  239. package/dist/esm/api/getFeedbackContainerUrl.js +1 -1
  240. package/dist/esm/api/getFeedbackContainerUrl.js.map +1 -1
  241. package/dist/esm/api/getInstallation.js +1 -1
  242. package/dist/esm/api/getInstallation.js.map +1 -1
  243. package/dist/esm/api/getNotificationHubJob.js +1 -1
  244. package/dist/esm/api/getNotificationHubJob.js.map +1 -1
  245. package/dist/esm/api/getNotificationOutcomeDetails.js +1 -1
  246. package/dist/esm/api/getNotificationOutcomeDetails.js.map +1 -1
  247. package/dist/esm/api/getRegistration.js +1 -1
  248. package/dist/esm/api/getRegistration.js.map +1 -1
  249. package/dist/esm/api/index.js +1 -1
  250. package/dist/esm/api/index.js.map +1 -1
  251. package/dist/esm/api/internal/_client.js +1 -1
  252. package/dist/esm/api/internal/_client.js.map +1 -1
  253. package/dist/esm/api/internal/_createOrUpdateRegistrationDescription.js +1 -1
  254. package/dist/esm/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
  255. package/dist/esm/api/internal/_listRegistrations.js +1 -1
  256. package/dist/esm/api/internal/_listRegistrations.js.map +1 -1
  257. package/dist/esm/api/listNotificationHubJobs.js +1 -1
  258. package/dist/esm/api/listNotificationHubJobs.js.map +1 -1
  259. package/dist/esm/api/listRegistrations.js +1 -1
  260. package/dist/esm/api/listRegistrations.js.map +1 -1
  261. package/dist/esm/api/listRegistrationsByChannel.js +1 -1
  262. package/dist/esm/api/listRegistrationsByChannel.js.map +1 -1
  263. package/dist/esm/api/listRegistrationsByTag.js +1 -1
  264. package/dist/esm/api/listRegistrationsByTag.js.map +1 -1
  265. package/dist/esm/api/scheduleNotification.js +1 -1
  266. package/dist/esm/api/scheduleNotification.js.map +1 -1
  267. package/dist/esm/api/sendNotification.js +1 -1
  268. package/dist/esm/api/sendNotification.js.map +1 -1
  269. package/dist/esm/api/submitNotificationHubJob.js +1 -1
  270. package/dist/esm/api/submitNotificationHubJob.js.map +1 -1
  271. package/dist/esm/api/updateInstallation.js +1 -1
  272. package/dist/esm/api/updateInstallation.js.map +1 -1
  273. package/dist/esm/api/updateRegistration.js +1 -1
  274. package/dist/esm/api/updateRegistration.js.map +1 -1
  275. package/dist/esm/auth/connectionStringUtils.js +1 -1
  276. package/dist/esm/auth/connectionStringUtils.js.map +1 -1
  277. package/dist/esm/auth/hmacSha256.common.js +1 -1
  278. package/dist/esm/auth/hmacSha256.common.js.map +1 -1
  279. package/dist/esm/auth/hmacSha256.js +1 -1
  280. package/dist/esm/auth/hmacSha256.js.map +1 -1
  281. package/dist/esm/auth/sasTokenCredential.js +1 -1
  282. package/dist/esm/auth/sasTokenCredential.js.map +1 -1
  283. package/dist/esm/index.js +1 -1
  284. package/dist/esm/index.js.map +1 -1
  285. package/dist/esm/models/index.js +1 -1
  286. package/dist/esm/models/index.js.map +1 -1
  287. package/dist/esm/models/installation.js +1 -1
  288. package/dist/esm/models/installation.js.map +1 -1
  289. package/dist/esm/models/notification.js +1 -1
  290. package/dist/esm/models/notification.js.map +1 -1
  291. package/dist/esm/models/notificationBodyBuilder.js +1 -1
  292. package/dist/esm/models/notificationBodyBuilder.js.map +1 -1
  293. package/dist/esm/models/notificationDetails.js +1 -1
  294. package/dist/esm/models/notificationDetails.js.map +1 -1
  295. package/dist/esm/models/notificationHeaderBuilder.js +1 -1
  296. package/dist/esm/models/notificationHeaderBuilder.js.map +1 -1
  297. package/dist/esm/models/notificationHubJob.js +1 -1
  298. package/dist/esm/models/notificationHubJob.js.map +1 -1
  299. package/dist/esm/models/options.js +1 -1
  300. package/dist/esm/models/options.js.map +1 -1
  301. package/dist/esm/models/registration.js +1 -1
  302. package/dist/esm/models/registration.js.map +1 -1
  303. package/dist/esm/models/response.js +1 -1
  304. package/dist/esm/models/response.js.map +1 -1
  305. package/dist/esm/models/tagExpressionBuilder.js +1 -1
  306. package/dist/esm/models/tagExpressionBuilder.js.map +1 -1
  307. package/dist/esm/notificationHubsClient.js +1 -1
  308. package/dist/esm/notificationHubsClient.js.map +1 -1
  309. package/dist/esm/serializers/notificationDetailsSerializer.js +1 -1
  310. package/dist/esm/serializers/notificationDetailsSerializer.js.map +1 -1
  311. package/dist/esm/serializers/notificationHubJobSerializer.js +1 -1
  312. package/dist/esm/serializers/notificationHubJobSerializer.js.map +1 -1
  313. package/dist/esm/serializers/notificationOutcomeSerializer.js +1 -1
  314. package/dist/esm/serializers/notificationOutcomeSerializer.js.map +1 -1
  315. package/dist/esm/serializers/registrationSerializer.js +1 -1
  316. package/dist/esm/serializers/registrationSerializer.js.map +1 -1
  317. package/dist/esm/utils/constants.js +1 -1
  318. package/dist/esm/utils/constants.js.map +1 -1
  319. package/dist/esm/utils/notificationUtils.js +1 -1
  320. package/dist/esm/utils/notificationUtils.js.map +1 -1
  321. package/dist/esm/utils/optionUtils.js +1 -1
  322. package/dist/esm/utils/optionUtils.js.map +1 -1
  323. package/dist/esm/utils/registrationUtils.js +1 -1
  324. package/dist/esm/utils/registrationUtils.js.map +1 -1
  325. package/dist/esm/utils/tracing.js +1 -1
  326. package/dist/esm/utils/tracing.js.map +1 -1
  327. package/dist/esm/utils/utils.js +1 -1
  328. package/dist/esm/utils/utils.js.map +1 -1
  329. package/dist/esm/utils/xmlUtils.js +1 -1
  330. package/dist/esm/utils/xmlUtils.js.map +1 -1
  331. package/dist/react-native/api/beginSubmitNotificationHubJob.js +1 -1
  332. package/dist/react-native/api/beginSubmitNotificationHubJob.js.map +1 -1
  333. package/dist/react-native/api/cancelScheduledNotification.js +1 -1
  334. package/dist/react-native/api/cancelScheduledNotification.js.map +1 -1
  335. package/dist/react-native/api/clientContext.js +1 -1
  336. package/dist/react-native/api/clientContext.js.map +1 -1
  337. package/dist/react-native/api/createOrUpdateInstallation.js +1 -1
  338. package/dist/react-native/api/createOrUpdateInstallation.js.map +1 -1
  339. package/dist/react-native/api/createOrUpdateRegistration.js +1 -1
  340. package/dist/react-native/api/createOrUpdateRegistration.js.map +1 -1
  341. package/dist/react-native/api/createRegistration.js +1 -1
  342. package/dist/react-native/api/createRegistration.js.map +1 -1
  343. package/dist/react-native/api/createRegistrationId.js +1 -1
  344. package/dist/react-native/api/createRegistrationId.js.map +1 -1
  345. package/dist/react-native/api/deleteInstallation.js +1 -1
  346. package/dist/react-native/api/deleteInstallation.js.map +1 -1
  347. package/dist/react-native/api/deleteRegistration.js +1 -1
  348. package/dist/react-native/api/deleteRegistration.js.map +1 -1
  349. package/dist/react-native/api/getFeedbackContainerUrl.js +1 -1
  350. package/dist/react-native/api/getFeedbackContainerUrl.js.map +1 -1
  351. package/dist/react-native/api/getInstallation.js +1 -1
  352. package/dist/react-native/api/getInstallation.js.map +1 -1
  353. package/dist/react-native/api/getNotificationHubJob.js +1 -1
  354. package/dist/react-native/api/getNotificationHubJob.js.map +1 -1
  355. package/dist/react-native/api/getNotificationOutcomeDetails.js +1 -1
  356. package/dist/react-native/api/getNotificationOutcomeDetails.js.map +1 -1
  357. package/dist/react-native/api/getRegistration.js +1 -1
  358. package/dist/react-native/api/getRegistration.js.map +1 -1
  359. package/dist/react-native/api/index.js +1 -1
  360. package/dist/react-native/api/index.js.map +1 -1
  361. package/dist/react-native/api/internal/_client.js +1 -1
  362. package/dist/react-native/api/internal/_client.js.map +1 -1
  363. package/dist/react-native/api/internal/_createOrUpdateRegistrationDescription.js +1 -1
  364. package/dist/react-native/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
  365. package/dist/react-native/api/internal/_listRegistrations.js +1 -1
  366. package/dist/react-native/api/internal/_listRegistrations.js.map +1 -1
  367. package/dist/react-native/api/listNotificationHubJobs.js +1 -1
  368. package/dist/react-native/api/listNotificationHubJobs.js.map +1 -1
  369. package/dist/react-native/api/listRegistrations.js +1 -1
  370. package/dist/react-native/api/listRegistrations.js.map +1 -1
  371. package/dist/react-native/api/listRegistrationsByChannel.js +1 -1
  372. package/dist/react-native/api/listRegistrationsByChannel.js.map +1 -1
  373. package/dist/react-native/api/listRegistrationsByTag.js +1 -1
  374. package/dist/react-native/api/listRegistrationsByTag.js.map +1 -1
  375. package/dist/react-native/api/scheduleNotification.js +1 -1
  376. package/dist/react-native/api/scheduleNotification.js.map +1 -1
  377. package/dist/react-native/api/sendNotification.js +1 -1
  378. package/dist/react-native/api/sendNotification.js.map +1 -1
  379. package/dist/react-native/api/submitNotificationHubJob.js +1 -1
  380. package/dist/react-native/api/submitNotificationHubJob.js.map +1 -1
  381. package/dist/react-native/api/updateInstallation.js +1 -1
  382. package/dist/react-native/api/updateInstallation.js.map +1 -1
  383. package/dist/react-native/api/updateRegistration.js +1 -1
  384. package/dist/react-native/api/updateRegistration.js.map +1 -1
  385. package/dist/react-native/auth/connectionStringUtils.js +1 -1
  386. package/dist/react-native/auth/connectionStringUtils.js.map +1 -1
  387. package/dist/react-native/auth/hmacSha256-react-native.mjs.map +1 -1
  388. package/dist/react-native/auth/hmacSha256.common.js +1 -1
  389. package/dist/react-native/auth/hmacSha256.common.js.map +1 -1
  390. package/dist/react-native/auth/hmacSha256.js +1 -1
  391. package/dist/react-native/auth/sasTokenCredential.js +1 -1
  392. package/dist/react-native/auth/sasTokenCredential.js.map +1 -1
  393. package/dist/react-native/index.js +1 -1
  394. package/dist/react-native/index.js.map +1 -1
  395. package/dist/react-native/models/index.js +1 -1
  396. package/dist/react-native/models/index.js.map +1 -1
  397. package/dist/react-native/models/installation.js +1 -1
  398. package/dist/react-native/models/installation.js.map +1 -1
  399. package/dist/react-native/models/notification.js +1 -1
  400. package/dist/react-native/models/notification.js.map +1 -1
  401. package/dist/react-native/models/notificationBodyBuilder.js +1 -1
  402. package/dist/react-native/models/notificationBodyBuilder.js.map +1 -1
  403. package/dist/react-native/models/notificationDetails.js +1 -1
  404. package/dist/react-native/models/notificationDetails.js.map +1 -1
  405. package/dist/react-native/models/notificationHeaderBuilder.js +1 -1
  406. package/dist/react-native/models/notificationHeaderBuilder.js.map +1 -1
  407. package/dist/react-native/models/notificationHubJob.js +1 -1
  408. package/dist/react-native/models/notificationHubJob.js.map +1 -1
  409. package/dist/react-native/models/options.js +1 -1
  410. package/dist/react-native/models/options.js.map +1 -1
  411. package/dist/react-native/models/registration.js +1 -1
  412. package/dist/react-native/models/registration.js.map +1 -1
  413. package/dist/react-native/models/response.js +1 -1
  414. package/dist/react-native/models/response.js.map +1 -1
  415. package/dist/react-native/models/tagExpressionBuilder.js +1 -1
  416. package/dist/react-native/models/tagExpressionBuilder.js.map +1 -1
  417. package/dist/react-native/notificationHubsClient.js +1 -1
  418. package/dist/react-native/notificationHubsClient.js.map +1 -1
  419. package/dist/react-native/serializers/notificationDetailsSerializer.js +1 -1
  420. package/dist/react-native/serializers/notificationDetailsSerializer.js.map +1 -1
  421. package/dist/react-native/serializers/notificationHubJobSerializer.js +1 -1
  422. package/dist/react-native/serializers/notificationHubJobSerializer.js.map +1 -1
  423. package/dist/react-native/serializers/notificationOutcomeSerializer.js +1 -1
  424. package/dist/react-native/serializers/notificationOutcomeSerializer.js.map +1 -1
  425. package/dist/react-native/serializers/registrationSerializer.js +1 -1
  426. package/dist/react-native/serializers/registrationSerializer.js.map +1 -1
  427. package/dist/react-native/utils/constants.js +1 -1
  428. package/dist/react-native/utils/constants.js.map +1 -1
  429. package/dist/react-native/utils/notificationUtils.js +1 -1
  430. package/dist/react-native/utils/notificationUtils.js.map +1 -1
  431. package/dist/react-native/utils/optionUtils.js +1 -1
  432. package/dist/react-native/utils/optionUtils.js.map +1 -1
  433. package/dist/react-native/utils/registrationUtils.js +1 -1
  434. package/dist/react-native/utils/registrationUtils.js.map +1 -1
  435. package/dist/react-native/utils/tracing.js +1 -1
  436. package/dist/react-native/utils/tracing.js.map +1 -1
  437. package/dist/react-native/utils/utils.js +1 -1
  438. package/dist/react-native/utils/utils.js.map +1 -1
  439. package/dist/react-native/utils/xmlUtils.js +1 -1
  440. package/dist/react-native/utils/xmlUtils.js.map +1 -1
  441. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"notificationBodyBuilder.js","sourceRoot":"","sources":["../../../src/models/notificationBodyBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAmM/C;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAiC;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAyND;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAClD,aAA0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAubD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,aAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAoJD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAA+B;IACvE,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAyFD;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAiC;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AA8BD;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAChD,aAAwC;IAExC,MAAM,KAAK,GAAG;QACZ,CAAC,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE;KAClC,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\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 \"launch-image\"?: 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 \"title-loc-key\"?: 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 \"title-loc-args\"?: 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 \"subtitle-loc-key\"?: 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 \"subtitle-loc-args\"?: 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 \"loc-key\"?: 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 \"loc-args\"?: 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 Apple specific push notification information.\n */\n aps?: AppleApsNativeMessage;\n}\n\n/**\n * Represents a native APNs APS message.\n */\nexport interface AppleApsNativeMessage 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 \"thread-id\"?: 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 \"content-available\"?: 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 \"mutable-content\"?: number;\n\n /**\n * The identifier of the window brought forward.\n */\n \"target-content-id\"?: string;\n\n /**\n * The importance and delivery timing of a notification.\n */\n \"interruption-level\"?: \"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 \"relevance-score\"?: number;\n\n /**\n * The criteria the system evaluates to determine if it displays the notification in the current Focus.\n */\n \"filter-criteria\"?: string;\n\n /**\n * The UNIX timestamp that represents the date at which a Live Activity becomes stale, or out of date.\n */\n \"stale-date\"?: number;\n\n /**\n * The updated or final content for a Live Activity.\n */\n \"content-state\"?: Record<string, any>;\n\n /**\n * The UNIX timestamp that marks the time when you send the remote notification that updates or ends a Live Activity.\n */\n timestamp?: number;\n\n /**\n * The string that describes whether you update or end an ongoing Live Activity with the remote push notification. To update the Live Activity, use update. To end the Live Activity, use end.\n */\n events?: string;\n\n /**\n * The UNIX timestamp that represents the date at which the system ends a Live Activity and removes it from the Dynamic Island and the Lock Screen.\n */\n \"dismissal-date\"?: number;\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 createAppleNotificationBody(nativeMessage: AppleNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 registration_ids?: 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 collapse_key?: 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 content_available?: 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 mutable_content?: number;\n\n /**\n * Specifies how long (in seconds) the message should be kept in FCM storage if the device is offline\n */\n time_to_live?: number;\n\n /**\n * The package name of the application where the registration tokens must match in order to receive the message.\n */\n restricted_package_name?: string;\n\n /**\n * When set to true, allows developers to test a request without actually sending a message.\n */\n dry_run?: 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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: 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 android_channel_id?: 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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: 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 click_action?: string;\n}\n\n/**\n * Creates a FcmLegacyNotification from a native Firebase payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The JSON body to send to Notification Hubs.\n */\nexport function createFirebaseLegacyNotificationBody(\n nativeMessage: FirebaseLegacyNativeMessage,\n): string {\n return JSON.stringify(nativeMessage);\n}\n\n/**\n * Represents the Firebase V1 native message envelope.\n */\nexport interface FirebaseV1NativeMessageEnvelope {\n /**\n * The Firebase V1 native message.\n */\n message: FirebaseV1NativeMessage;\n}\n\n/**\n * Represents the targets, options, and payload for HTTP JSON messages for the Firebase V1 interface.\n */\nexport interface FirebaseV1NativeMessage {\n /**\n * Custom key-value pairs of the message's payload.\n */\n data?: Record<string, string>;\n\n /**\n * The predefined, user-visible key-value pairs of the notification payload.\n */\n notification?: FirebaseV1NativeNotification;\n\n /**\n * Android specific options for messages sent through FCM connection server.\n */\n android?: FirebaseV1AndroidConfig;\n\n /**\n * Webpush protocol options.\n */\n webpush?: FirebaseV1WebPushConfig;\n\n /**\n * APNs specific options.\n */\n apns?: FirebaseV1ApnsConfig;\n\n /**\n * FCM options.\n */\n fcm_options?: FirebaseV1FcmOptions;\n\n /**\n * Registration token to send a message to.\n */\n token?: string;\n\n /**\n * Topic name to send a message to, e.g. \"weather\".\n */\n topic?: string;\n\n /**\n * Condition to send a message to, e.g. \"'foo' in topics && 'bar' in topics\".\n */\n condition?: string;\n}\n\n/**\n * Represents a native FCM V1 notification message payload.\n */\nexport interface FirebaseV1NativeNotification {\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 * Contains the URL of an image that is going to be downloaded on the device and displayed in a notification.\n */\n image?: string;\n}\n\n/**\n * Android specific options for messages sent through FCM connection server.\n */\nexport interface FirebaseV1AndroidConfig {\n /**\n * An identifier of a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed.\n */\n collapse_key?: string;\n\n /**\n * Message priority. Can take \"normal\" and \"high\" values.\n */\n priority?: \"normal\" | \"high\";\n\n /**\n * How long (in seconds) the message should be kept in FCM storage if the device is offline.\n */\n ttl?: string;\n\n /**\n * Package name of the application where the registration token must match in order to receive the message.\n */\n restricted_package_name?: string;\n\n /**\n * Custom key-value pairs of the message's payload.\n */\n data?: Record<string, string>;\n\n /**\n * Notification to send to android devices.\n */\n notification?: FirebaseV1AndroidNotification;\n\n /**\n * Options for features provided by the FCM SDK for Android.\n */\n fcm_options?: FirebaseV1AndroidFcmOptions;\n\n /**\n * If set to true, messages will be allowed to be delivered to the app while the device is in direct boot mode.\n */\n direct_boot_ok?: boolean;\n}\n\n/**\n * Notification to send to android devices.\n */\nexport interface FirebaseV1AndroidNotification {\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.\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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: string[];\n\n /**\n * The notification's channel id (new in Android O).\n */\n channel_id?: 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.\n */\n event_time?: string;\n\n /**\n * Set whether or not this notification is relevant only to the current device.\n */\n local_only?: boolean;\n\n /**\n * Set the relative priority for this notification.\n */\n notification_priority?: number;\n\n /**\n * If set to true, use the Android framework's default sound for the notification.\n */\n default_sound?: boolean;\n\n /**\n * If set to true, use the Android framework's default vibrate pattern for the notification.\n */\n default_vibrate_timings?: boolean;\n\n /**\n * If set to true, use the Android framework's default light settings for the notification.\n */\n default_light_settings?: boolean;\n\n /**\n * Set the vibration pattern to use.\n */\n vibrate_timings?: string[];\n\n /**\n * Set the Notification.visibility of the notification.\n */\n visibility?: number;\n\n /**\n * Sets the number of items this notification represents.\n */\n notification_count?: number;\n\n /**\n * Settings to control the notification's LED blinking rate and color if LED is available on the device.\n */\n light_settings?: {\n color: {\n red: number;\n green: number;\n blue: number;\n alpha: number;\n };\n light_on_duration: string;\n light_off_duration: string;\n };\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 * Options for features provided by the FCM SDK for Android.\n */\nexport interface FirebaseV1AndroidFcmOptions {\n /**\n * The label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\nexport interface FirebaseV1WebPushConfig {\n /**\n * A collection of WebPush protocol options.\n */\n headers?: Record<string, string>;\n\n /**\n * A collection of WebPush protocol options.\n */\n data?: Record<string, string>;\n\n /**\n * Web Notification options as a JSON object.\n */\n notification?: FirebaseV1WebPushNotification;\n\n /**\n * A collection of WebPush protocol options.\n */\n fcm_options?: FirebaseV1WebPushFcmOptions;\n}\n\n/**\n * Represents a Web Push notification payload.\n */\nexport interface FirebaseV1WebPushNotification {\n /**\n * An array of actions to display in the notification.\n */\n actions?: {\n action?: string;\n title?: string;\n icon?: string;\n }[];\n\n /**\n * Defines a title for the notification.\n */\n title?: string;\n\n /**\n * The body string of the notification\n */\n body?: string;\n\n /**\n * A string containing the URL of an icon to be displayed in the notification.\n */\n icon?: string;\n\n /**\n * A string containing the URL of an image to represent the notification when there is not enough space to display the notification itself such as for example, the Android Notification Bar.\n */\n badge?: string;\n\n /**\n * The notification's data.\n */\n data?: Record<string, string>;\n\n /**\n * The direction in which to display the notification.\n */\n dir?: \"auto\" | \"ltr\" | \"rtl\";\n\n /**\n * A string containing the URL of an image to be displayed in the notification.\n */\n image?: string;\n\n /**\n * The notification's language.\n */\n lang?: string;\n\n /**\n * A boolean value specifying whether the user should be notified after a new notification replaces an old one.\n */\n renotify?: boolean;\n\n /**\n * Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.\n */\n requireInteraction?: boolean;\n\n /**\n * A boolean value specifying whether the notification is silent\n */\n silent?: boolean;\n\n /**\n * A string representing an identifying tag for the notification.\n */\n tag?: string;\n\n /**\n * A number representing the time at which a notification is created or applicable\n */\n timestamp?: number;\n\n /**\n * A vibration pattern for the device's vibration hardware to emit with the notification.\n */\n vibrate?: number[];\n}\n\n/**\n * Options for features provided by the FCM SDK for Web.\n */\nexport interface FirebaseV1WebPushFcmOptions {\n /**\n * The link to open when the user clicks on the notification.\n */\n link?: string;\n\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\n/**\n * Apple Push Notification Service specific options.\n */\nexport interface FirebaseV1ApnsConfig {\n /**\n * A collection of APNs headers.\n */\n headers?: Record<string, string>;\n\n /**\n * A collection of APNs headers.\n */\n payload?: AppleNativeMessage;\n\n /**\n * A collection of APNs headers.\n */\n fcm_options?: FirebaseV1ApnsFcmOptions;\n}\n\n/**\n * Options for features provided by the FCM SDK for iOS.\n */\nexport interface FirebaseV1ApnsFcmOptions {\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n\n /**\n * Contains the URL of an image that is going to be displayed in a notification.\n */\n image?: string;\n}\n\nexport interface FirebaseV1FcmOptions {\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\n/**\n * Creates a FcmV1Notification from a native Firebase payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The JSON body to send to Notification Hubs.\n */\nexport function createFirebaseV1NotificationBody(\n nativeMessage: FirebaseV1NativeMessageEnvelope,\n): string {\n return JSON.stringify(nativeMessage);\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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: string[];\n\n /**\n * The notification's channel id.\n */\n channel_id?: 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 event_time?: string;\n\n /**\n * Set whether or not this notification is relevant only to the current device.\n */\n local_only?: boolean;\n\n /**\n * Set the relative priority for this notification.\n */\n notification_priority?: number;\n\n /**\n * If set to true, use the Android framework's default sound for the notification.\n */\n default_sound?: boolean;\n\n /**\n * Set the Notification.visibility of the notification.\n */\n visibility?: number;\n\n /**\n * Sets the number of items this notification represents.\n */\n notification_count?: 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\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 createAdmNotificationBody(nativeMessage: AdmNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 notification_builder_id?: number;\n\n /**\n * Baidu Notification Android basic style.\n */\n notification_basic_style?: number;\n\n /**\n * Baidu Android open type.\n */\n open_type?: number;\n\n /**\n * Baidu Android net support option.\n */\n net_support?: number;\n\n /**\n * Baidu Android user confirm.\n */\n user_confirm?: number;\n\n /**\n * Baidu Android URL.\n */\n url?: string;\n\n /**\n * Baidu Android package content.\n */\n pkg_content?: string;\n\n /**\n * Baidu Android package version.\n */\n pkg_version?: string;\n\n /**\n * Baidu Android custom content dictionary.\n */\n custom_content?: 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 * @returns The JSON body to send to Notification Hubs.\n */\nexport function createBaiduNotificationBody(nativeMessage: BaiduNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 The WNS XML created with the badge information.\n */\nexport function createWindowsBadgeNotificationBody(\n nativeMessage: WindowsBadgeNativeMessage,\n): string {\n const badge = {\n $: { value: nativeMessage.value },\n };\n\n return stringifyXML(badge, { rootName: \"badge\" });\n}\n"]}
1
+ {"version":3,"file":"notificationBodyBuilder.js","sourceRoot":"","sources":["../../../src/models/notificationBodyBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAmM/C;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAiC;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAyND;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAClD,aAA0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAubD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,aAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAoJD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAA+B;IACvE,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAyFD;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,aAAiC;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AA8BD;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAChD,aAAwC;IAExC,MAAM,KAAK,GAAG;QACZ,CAAC,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE;KAClC,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\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 \"launch-image\"?: 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 \"title-loc-key\"?: 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 \"title-loc-args\"?: 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 \"subtitle-loc-key\"?: 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 \"subtitle-loc-args\"?: 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 \"loc-key\"?: 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 \"loc-args\"?: 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 Apple specific push notification information.\n */\n aps?: AppleApsNativeMessage;\n}\n\n/**\n * Represents a native APNs APS message.\n */\nexport interface AppleApsNativeMessage 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 \"thread-id\"?: 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 \"content-available\"?: 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 \"mutable-content\"?: number;\n\n /**\n * The identifier of the window brought forward.\n */\n \"target-content-id\"?: string;\n\n /**\n * The importance and delivery timing of a notification.\n */\n \"interruption-level\"?: \"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 \"relevance-score\"?: number;\n\n /**\n * The criteria the system evaluates to determine if it displays the notification in the current Focus.\n */\n \"filter-criteria\"?: string;\n\n /**\n * The UNIX timestamp that represents the date at which a Live Activity becomes stale, or out of date.\n */\n \"stale-date\"?: number;\n\n /**\n * The updated or final content for a Live Activity.\n */\n \"content-state\"?: Record<string, any>;\n\n /**\n * The UNIX timestamp that marks the time when you send the remote notification that updates or ends a Live Activity.\n */\n timestamp?: number;\n\n /**\n * The string that describes whether you update or end an ongoing Live Activity with the remote push notification. To update the Live Activity, use update. To end the Live Activity, use end.\n */\n events?: string;\n\n /**\n * The UNIX timestamp that represents the date at which the system ends a Live Activity and removes it from the Dynamic Island and the Lock Screen.\n */\n \"dismissal-date\"?: number;\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 createAppleNotificationBody(nativeMessage: AppleNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 registration_ids?: 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 collapse_key?: 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 content_available?: 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 mutable_content?: number;\n\n /**\n * Specifies how long (in seconds) the message should be kept in FCM storage if the device is offline\n */\n time_to_live?: number;\n\n /**\n * The package name of the application where the registration tokens must match in order to receive the message.\n */\n restricted_package_name?: string;\n\n /**\n * When set to true, allows developers to test a request without actually sending a message.\n */\n dry_run?: 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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: 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 android_channel_id?: 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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: 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 click_action?: string;\n}\n\n/**\n * Creates a FcmLegacyNotification from a native Firebase payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The JSON body to send to Notification Hubs.\n */\nexport function createFirebaseLegacyNotificationBody(\n nativeMessage: FirebaseLegacyNativeMessage,\n): string {\n return JSON.stringify(nativeMessage);\n}\n\n/**\n * Represents the Firebase V1 native message envelope.\n */\nexport interface FirebaseV1NativeMessageEnvelope {\n /**\n * The Firebase V1 native message.\n */\n message: FirebaseV1NativeMessage;\n}\n\n/**\n * Represents the targets, options, and payload for HTTP JSON messages for the Firebase V1 interface.\n */\nexport interface FirebaseV1NativeMessage {\n /**\n * Custom key-value pairs of the message's payload.\n */\n data?: Record<string, string>;\n\n /**\n * The predefined, user-visible key-value pairs of the notification payload.\n */\n notification?: FirebaseV1NativeNotification;\n\n /**\n * Android specific options for messages sent through FCM connection server.\n */\n android?: FirebaseV1AndroidConfig;\n\n /**\n * Webpush protocol options.\n */\n webpush?: FirebaseV1WebPushConfig;\n\n /**\n * APNs specific options.\n */\n apns?: FirebaseV1ApnsConfig;\n\n /**\n * FCM options.\n */\n fcm_options?: FirebaseV1FcmOptions;\n\n /**\n * Registration token to send a message to.\n */\n token?: string;\n\n /**\n * Topic name to send a message to, e.g. \"weather\".\n */\n topic?: string;\n\n /**\n * Condition to send a message to, e.g. \"'foo' in topics && 'bar' in topics\".\n */\n condition?: string;\n}\n\n/**\n * Represents a native FCM V1 notification message payload.\n */\nexport interface FirebaseV1NativeNotification {\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 * Contains the URL of an image that is going to be downloaded on the device and displayed in a notification.\n */\n image?: string;\n}\n\n/**\n * Android specific options for messages sent through FCM connection server.\n */\nexport interface FirebaseV1AndroidConfig {\n /**\n * An identifier of a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed.\n */\n collapse_key?: string;\n\n /**\n * Message priority. Can take \"normal\" and \"high\" values.\n */\n priority?: \"normal\" | \"high\";\n\n /**\n * How long (in seconds) the message should be kept in FCM storage if the device is offline.\n */\n ttl?: string;\n\n /**\n * Package name of the application where the registration token must match in order to receive the message.\n */\n restricted_package_name?: string;\n\n /**\n * Custom key-value pairs of the message's payload.\n */\n data?: Record<string, string>;\n\n /**\n * Notification to send to android devices.\n */\n notification?: FirebaseV1AndroidNotification;\n\n /**\n * Options for features provided by the FCM SDK for Android.\n */\n fcm_options?: FirebaseV1AndroidFcmOptions;\n\n /**\n * If set to true, messages will be allowed to be delivered to the app while the device is in direct boot mode.\n */\n direct_boot_ok?: boolean;\n}\n\n/**\n * Notification to send to android devices.\n */\nexport interface FirebaseV1AndroidNotification {\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.\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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: string[];\n\n /**\n * The notification's channel id (new in Android O).\n */\n channel_id?: 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.\n */\n event_time?: string;\n\n /**\n * Set whether or not this notification is relevant only to the current device.\n */\n local_only?: boolean;\n\n /**\n * Set the relative priority for this notification.\n */\n notification_priority?: number;\n\n /**\n * If set to true, use the Android framework's default sound for the notification.\n */\n default_sound?: boolean;\n\n /**\n * If set to true, use the Android framework's default vibrate pattern for the notification.\n */\n default_vibrate_timings?: boolean;\n\n /**\n * If set to true, use the Android framework's default light settings for the notification.\n */\n default_light_settings?: boolean;\n\n /**\n * Set the vibration pattern to use.\n */\n vibrate_timings?: string[];\n\n /**\n * Set the Notification.visibility of the notification.\n */\n visibility?: number;\n\n /**\n * Sets the number of items this notification represents.\n */\n notification_count?: number;\n\n /**\n * Settings to control the notification's LED blinking rate and color if LED is available on the device.\n */\n light_settings?: {\n color: {\n red: number;\n green: number;\n blue: number;\n alpha: number;\n };\n light_on_duration: string;\n light_off_duration: string;\n };\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 * Options for features provided by the FCM SDK for Android.\n */\nexport interface FirebaseV1AndroidFcmOptions {\n /**\n * The label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\nexport interface FirebaseV1WebPushConfig {\n /**\n * A collection of WebPush protocol options.\n */\n headers?: Record<string, string>;\n\n /**\n * A collection of WebPush protocol options.\n */\n data?: Record<string, string>;\n\n /**\n * Web Notification options as a JSON object.\n */\n notification?: FirebaseV1WebPushNotification;\n\n /**\n * A collection of WebPush protocol options.\n */\n fcm_options?: FirebaseV1WebPushFcmOptions;\n}\n\n/**\n * Represents a Web Push notification payload.\n */\nexport interface FirebaseV1WebPushNotification {\n /**\n * An array of actions to display in the notification.\n */\n actions?: {\n action?: string;\n title?: string;\n icon?: string;\n }[];\n\n /**\n * Defines a title for the notification.\n */\n title?: string;\n\n /**\n * The body string of the notification\n */\n body?: string;\n\n /**\n * A string containing the URL of an icon to be displayed in the notification.\n */\n icon?: string;\n\n /**\n * A string containing the URL of an image to represent the notification when there is not enough space to display the notification itself such as for example, the Android Notification Bar.\n */\n badge?: string;\n\n /**\n * The notification's data.\n */\n data?: Record<string, string>;\n\n /**\n * The direction in which to display the notification.\n */\n dir?: \"auto\" | \"ltr\" | \"rtl\";\n\n /**\n * A string containing the URL of an image to be displayed in the notification.\n */\n image?: string;\n\n /**\n * The notification's language.\n */\n lang?: string;\n\n /**\n * A boolean value specifying whether the user should be notified after a new notification replaces an old one.\n */\n renotify?: boolean;\n\n /**\n * Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.\n */\n requireInteraction?: boolean;\n\n /**\n * A boolean value specifying whether the notification is silent\n */\n silent?: boolean;\n\n /**\n * A string representing an identifying tag for the notification.\n */\n tag?: string;\n\n /**\n * A number representing the time at which a notification is created or applicable\n */\n timestamp?: number;\n\n /**\n * A vibration pattern for the device's vibration hardware to emit with the notification.\n */\n vibrate?: number[];\n}\n\n/**\n * Options for features provided by the FCM SDK for Web.\n */\nexport interface FirebaseV1WebPushFcmOptions {\n /**\n * The link to open when the user clicks on the notification.\n */\n link?: string;\n\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\n/**\n * Apple Push Notification Service specific options.\n */\nexport interface FirebaseV1ApnsConfig {\n /**\n * A collection of APNs headers.\n */\n headers?: Record<string, string>;\n\n /**\n * A collection of APNs headers.\n */\n payload?: AppleNativeMessage;\n\n /**\n * A collection of APNs headers.\n */\n fcm_options?: FirebaseV1ApnsFcmOptions;\n}\n\n/**\n * Options for features provided by the FCM SDK for iOS.\n */\nexport interface FirebaseV1ApnsFcmOptions {\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n\n /**\n * Contains the URL of an image that is going to be displayed in a notification.\n */\n image?: string;\n}\n\nexport interface FirebaseV1FcmOptions {\n /**\n * Label associated with the message's analytics data.\n */\n analytics_label?: string;\n}\n\n/**\n * Creates a FcmV1Notification from a native Firebase payload.\n * @param nativeMessage - The native message payload to send to Notification Hubs.\n * @returns The JSON body to send to Notification Hubs.\n */\nexport function createFirebaseV1NotificationBody(\n nativeMessage: FirebaseV1NativeMessageEnvelope,\n): string {\n return JSON.stringify(nativeMessage);\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 click_action?: 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 body_loc_key?: 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 body_loc_args?: 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 title_loc_key?: 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 title_loc_args?: string[];\n\n /**\n * The notification's channel id.\n */\n channel_id?: 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 event_time?: string;\n\n /**\n * Set whether or not this notification is relevant only to the current device.\n */\n local_only?: boolean;\n\n /**\n * Set the relative priority for this notification.\n */\n notification_priority?: number;\n\n /**\n * If set to true, use the Android framework's default sound for the notification.\n */\n default_sound?: boolean;\n\n /**\n * Set the Notification.visibility of the notification.\n */\n visibility?: number;\n\n /**\n * Sets the number of items this notification represents.\n */\n notification_count?: 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\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 createAdmNotificationBody(nativeMessage: AdmNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 notification_builder_id?: number;\n\n /**\n * Baidu Notification Android basic style.\n */\n notification_basic_style?: number;\n\n /**\n * Baidu Android open type.\n */\n open_type?: number;\n\n /**\n * Baidu Android net support option.\n */\n net_support?: number;\n\n /**\n * Baidu Android user confirm.\n */\n user_confirm?: number;\n\n /**\n * Baidu Android URL.\n */\n url?: string;\n\n /**\n * Baidu Android package content.\n */\n pkg_content?: string;\n\n /**\n * Baidu Android package version.\n */\n pkg_version?: string;\n\n /**\n * Baidu Android custom content dictionary.\n */\n custom_content?: 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 * @returns The JSON body to send to Notification Hubs.\n */\nexport function createBaiduNotificationBody(nativeMessage: BaiduNativeMessage): string {\n return JSON.stringify(nativeMessage);\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 The WNS XML created with the badge information.\n */\nexport function createWindowsBadgeNotificationBody(\n nativeMessage: WindowsBadgeNativeMessage,\n): string {\n const badge = {\n $: { value: nativeMessage.value },\n };\n\n return stringifyXML(badge, { rootName: \"badge\" });\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=notificationDetails.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationDetails.js","sourceRoot":"","sources":["../../../src/models/notificationDetails.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents the notification outcome states.\n */\nexport type NotificationOutcomeState =\n | \"Enqueued\"\n | \"DetailedStateAvailable\"\n | \"Processing\"\n | \"Completed\"\n | \"Abandoned\"\n | \"Unknown\"\n | \"NoTargetFound\"\n | \"Cancelled\";\n\n/**\n * The per platform count per state.\n */\nexport interface NotificationOutcome {\n /**\n * The state of the notification.\n */\n state: string;\n\n /**\n * The count of notifications per state.\n */\n count: number;\n}\n\n/**\n * Represents Notification details.\n */\nexport interface NotificationDetails {\n /**\n * The unique notification identifier.\n */\n notificationId?: string;\n\n /**\n * The notification location.\n */\n location?: string;\n\n /**\n * The notification state.\n */\n state?: NotificationOutcomeState;\n\n /**\n * The enqueue time of the notification.\n */\n enqueueTime?: Date;\n\n /**\n * The notification send start time.\n */\n startTime?: Date;\n\n /**\n * The notification send end time.\n */\n endTime?: Date;\n\n /**\n * The notification body.\n */\n notificationBody?: string;\n\n /**\n * The notification tags.\n */\n tags?: string;\n\n /**\n * The notification platforms targeted.\n */\n targetPlatforms?: string;\n\n /**\n * The URL for the platform notification services errors.\n */\n pnsErrorDetailsUrl?: string;\n\n /**\n * APNs outcomes counts per state.\n */\n apnsOutcomeCounts?: NotificationOutcome[];\n\n /**\n * WNS outcomes counts per state.\n */\n wnsOutcomeCounts?: NotificationOutcome[];\n\n /**\n * FCM outcome counts per state.\n */\n fcmOutcomeCounts?: NotificationOutcome[];\n\n /**\n * FCM V1 outcome counts per state.\n */\n fcmV1OutcomeCounts?: NotificationOutcome[];\n\n /**\n * ADM outcome counts per state.\n */\n admOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Baidu outcome counts per state.\n */\n baiduOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Web Push outcome counts per state.\n */\n browserOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Xiaomi outcome counts per state.\n */\n xiaomiOutcomeCounts?: NotificationOutcome[];\n}\n\n/**\n * Describes a response from the Notification Hubs which includes a tracking ID, correlation ID and location.\n */\nexport interface NotificationHubsResponse {\n /**\n * The Tracking ID of the operation.\n */\n trackingId?: string;\n\n /**\n * The correlation ID of the operation.\n */\n correlationId?: string;\n\n /**\n * The location of the operation.\n */\n location?: string;\n}\n\n/**\n * Represents the result of the registration.\n */\nexport interface RegistrationResult {\n /**\n * The application platform.\n */\n applicationPlatform: string;\n\n /**\n * The PNS handle.\n */\n pnsHandle: string;\n\n /**\n * The registration ID.\n */\n registrationId: string;\n\n /**\n * The outcome of the registration.\n */\n outcome: string;\n}\n\n/**\n * Describes a response from the Notification Hubs service for send operations.\n */\nexport interface NotificationHubsMessageResponse extends NotificationHubsResponse {\n /**\n * The notification ID from the operation. Note this is only available in Standard SKU and above.\n */\n notificationId?: string;\n\n /**\n * The number of devices that successfully received the notification.\n */\n successCount: number;\n\n /**\n * The number of devices that failed to receive a notification.\n */\n failureCount: number;\n\n /**\n * The list of notification outcome results for each device registered with the hub, to which this notification was sent.\n */\n results: RegistrationResult[];\n\n /**\n * The state of this notification outcome.\n */\n state: NotificationOutcomeState;\n}\n"]}
1
+ {"version":3,"file":"notificationDetails.js","sourceRoot":"","sources":["../../../src/models/notificationDetails.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Represents the notification outcome states.\n */\nexport type NotificationOutcomeState =\n | \"Enqueued\"\n | \"DetailedStateAvailable\"\n | \"Processing\"\n | \"Completed\"\n | \"Abandoned\"\n | \"Unknown\"\n | \"NoTargetFound\"\n | \"Cancelled\";\n\n/**\n * The per platform count per state.\n */\nexport interface NotificationOutcome {\n /**\n * The state of the notification.\n */\n state: string;\n\n /**\n * The count of notifications per state.\n */\n count: number;\n}\n\n/**\n * Represents Notification details.\n */\nexport interface NotificationDetails {\n /**\n * The unique notification identifier.\n */\n notificationId?: string;\n\n /**\n * The notification location.\n */\n location?: string;\n\n /**\n * The notification state.\n */\n state?: NotificationOutcomeState;\n\n /**\n * The enqueue time of the notification.\n */\n enqueueTime?: Date;\n\n /**\n * The notification send start time.\n */\n startTime?: Date;\n\n /**\n * The notification send end time.\n */\n endTime?: Date;\n\n /**\n * The notification body.\n */\n notificationBody?: string;\n\n /**\n * The notification tags.\n */\n tags?: string;\n\n /**\n * The notification platforms targeted.\n */\n targetPlatforms?: string;\n\n /**\n * The URL for the platform notification services errors.\n */\n pnsErrorDetailsUrl?: string;\n\n /**\n * APNs outcomes counts per state.\n */\n apnsOutcomeCounts?: NotificationOutcome[];\n\n /**\n * WNS outcomes counts per state.\n */\n wnsOutcomeCounts?: NotificationOutcome[];\n\n /**\n * FCM outcome counts per state.\n */\n fcmOutcomeCounts?: NotificationOutcome[];\n\n /**\n * FCM V1 outcome counts per state.\n */\n fcmV1OutcomeCounts?: NotificationOutcome[];\n\n /**\n * ADM outcome counts per state.\n */\n admOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Baidu outcome counts per state.\n */\n baiduOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Web Push outcome counts per state.\n */\n browserOutcomeCounts?: NotificationOutcome[];\n\n /**\n * Xiaomi outcome counts per state.\n */\n xiaomiOutcomeCounts?: NotificationOutcome[];\n}\n\n/**\n * Describes a response from the Notification Hubs which includes a tracking ID, correlation ID and location.\n */\nexport interface NotificationHubsResponse {\n /**\n * The Tracking ID of the operation.\n */\n trackingId?: string;\n\n /**\n * The correlation ID of the operation.\n */\n correlationId?: string;\n\n /**\n * The location of the operation.\n */\n location?: string;\n}\n\n/**\n * Represents the result of the registration.\n */\nexport interface RegistrationResult {\n /**\n * The application platform.\n */\n applicationPlatform: string;\n\n /**\n * The PNS handle.\n */\n pnsHandle: string;\n\n /**\n * The registration ID.\n */\n registrationId: string;\n\n /**\n * The outcome of the registration.\n */\n outcome: string;\n}\n\n/**\n * Describes a response from the Notification Hubs service for send operations.\n */\nexport interface NotificationHubsMessageResponse extends NotificationHubsResponse {\n /**\n * The notification ID from the operation. Note this is only available in Standard SKU and above.\n */\n notificationId?: string;\n\n /**\n * The number of devices that successfully received the notification.\n */\n successCount: number;\n\n /**\n * The number of devices that failed to receive a notification.\n */\n failureCount: number;\n\n /**\n * The list of notification outcome results for each device registered with the hub, to which this notification was sent.\n */\n results: RegistrationResult[];\n\n /**\n * The state of this notification outcome.\n */\n state: NotificationOutcomeState;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=notificationHeaderBuilder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHeaderBuilder.js","sourceRoot":"","sources":["../../../src/models/notificationHeaderBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Describes the types of APNs pushes.\n */\nexport type ApnsPushTypes =\n | \"alert\"\n | \"background\"\n | \"voip\"\n | \"complication\"\n | \"fileprovider\"\n | \"mdm\"\n | \"location\"\n | \"liveactivity\"\n | \"pushtotalk\";\n\n/**\n * The list of APNs specific headers.\n */\nexport interface AppleHeaders extends Record<string, unknown> {\n /**\n * The value of this header must accurately reflect the contents of your notification’s payload.\n */\n \"apns-push-type\"?: ApnsPushTypes;\n /**\n * A canonical UUID that’s the unique ID for the notification.\n */\n \"apns-id\"?: string;\n /**\n * The date at which the notification is no longer valid. This value is a UNIX epoch expressed in seconds (UTC).\n */\n \"apns-expiration\"?: string;\n /**\n * The priority of the notification. If you omit this header, APNs sets the notification priority to 10.\n */\n \"apns-priority\"?: \"5\" | \"10\";\n /**\n * The topic for the notification. In general, the topic is your app’s bundle ID/app ID.\n */\n \"apns-topic\"?: string;\n /**\n * An identifier you use to merge multiple notifications into a single notification for the user.\n */\n \"apns-collapse-id\"?: string;\n}\n\n/**\n * The list of WNS specific types.\n */\nexport type WnsTypes = \"wns/toast\" | \"wns/badge\" | \"wns/tile\" | \"wns/raw\";\n\n/**\n * List of WNS specific headers.\n */\nexport interface WindowsHeaders extends Record<string, unknown> {\n /**\n * The header specifies whether this is a tile, toast, badge, or raw notification.\n */\n \"X-WNS-Type\"?: WnsTypes;\n}\n"]}
1
+ {"version":3,"file":"notificationHeaderBuilder.js","sourceRoot":"","sources":["../../../src/models/notificationHeaderBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Describes the types of APNs pushes.\n */\nexport type ApnsPushTypes =\n | \"alert\"\n | \"background\"\n | \"voip\"\n | \"complication\"\n | \"fileprovider\"\n | \"mdm\"\n | \"location\"\n | \"liveactivity\"\n | \"pushtotalk\";\n\n/**\n * The list of APNs specific headers.\n */\nexport interface AppleHeaders extends Record<string, unknown> {\n /**\n * The value of this header must accurately reflect the contents of your notification’s payload.\n */\n \"apns-push-type\"?: ApnsPushTypes;\n /**\n * A canonical UUID that’s the unique ID for the notification.\n */\n \"apns-id\"?: string;\n /**\n * The date at which the notification is no longer valid. This value is a UNIX epoch expressed in seconds (UTC).\n */\n \"apns-expiration\"?: string;\n /**\n * The priority of the notification. If you omit this header, APNs sets the notification priority to 10.\n */\n \"apns-priority\"?: \"5\" | \"10\";\n /**\n * The topic for the notification. In general, the topic is your app’s bundle ID/app ID.\n */\n \"apns-topic\"?: string;\n /**\n * An identifier you use to merge multiple notifications into a single notification for the user.\n */\n \"apns-collapse-id\"?: string;\n}\n\n/**\n * The list of WNS specific types.\n */\nexport type WnsTypes = \"wns/toast\" | \"wns/badge\" | \"wns/tile\" | \"wns/raw\";\n\n/**\n * List of WNS specific headers.\n */\nexport interface WindowsHeaders extends Record<string, unknown> {\n /**\n * The header specifies whether this is a tile, toast, badge, or raw notification.\n */\n \"X-WNS-Type\"?: WnsTypes;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=notificationHubJob.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubJob.js","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationState, SimplePollerLike } from \"@azure/core-lro\";\n\n/**\n * Describes the types of notification hub jobs.\n */\nexport type NotificationHubJobType =\n /**\n * Job type to bulk get registrations.\n */\n | \"ExportRegistrations\"\n\n /**\n * Job type to bulk create registrations.\n */\n | \"ImportCreateRegistrations\"\n\n /**\n * Job type to bulk update registrations.\n */\n | \"ImportUpdateRegistrations\"\n\n /**\n * Job type to bulk delete registrations.\n */\n | \"ImportDeleteRegistrations\"\n\n /**\n * Job type to bulk upsert registrations.\n */\n | \"ImportUpsertRegistrations\";\n\n/**\n * Describes the types of notification hub job statuses.\n */\nexport type NotificationHubJobStatus =\n /**\n * Indicates that the NotificationHubJob was accepted.\n */\n | \"Started\"\n\n /**\n * Indicates that the NotificationHubJob is currently running. Depending on the amount of data,\n * a job may stay in this state for several hours.\n */\n | \"Running\"\n\n /**\n * Indicates that the NotificationHubJob was completed successfully. Any output\n * will be ready where configured via the NotificationHubJob object.\n */\n | \"Completed\"\n\n /**\n * Indicates that the NotificationHubJob has failed.\n */\n | \"Failed\";\n\n/**\n * Represents a Notification Hub Job.\n */\nexport interface NotificationHubJob {\n /**\n * The unique job identifier.\n */\n jobId?: string;\n\n /**\n * The output file name.\n */\n outputFileName?: string;\n\n /**\n * The file name for the job failures.\n */\n failuresFileName?: string;\n\n /**\n * The progress for the job.\n */\n progress?: number;\n\n /**\n * The type of job.\n */\n type: NotificationHubJobType;\n\n /**\n * The status of the job.\n */\n status?: NotificationHubJobStatus;\n\n /**\n * The output container URL.\n */\n outputContainerUrl: string;\n\n /**\n * The import file URL.\n */\n importFileUrl?: string;\n\n /**\n * The input properties for the notification hub job.\n */\n inputProperties?: Record<string, string>;\n\n /**\n * Gets the notification hub job failure message.\n */\n failure?: string;\n\n /**\n * The output properties for the notification hub job.\n */\n outputProperties?: Record<string, string>;\n\n /**\n * Notification hub job created date.\n */\n createdAt?: Date;\n\n /**\n * Notification hub job last updated date.\n */\n updatedAt?: Date;\n}\n\n/**\n * Describes a poller for NotificationHubJob types.\n */\nexport type NotificationHubJobPoller = SimplePollerLike<\n OperationState<NotificationHubJob>,\n NotificationHubJob\n>;\n"]}
1
+ {"version":3,"file":"notificationHubJob.js","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationState, SimplePollerLike } from \"@azure/core-lro\";\n\n/**\n * Describes the types of notification hub jobs.\n */\nexport type NotificationHubJobType =\n /**\n * Job type to bulk get registrations.\n */\n | \"ExportRegistrations\"\n\n /**\n * Job type to bulk create registrations.\n */\n | \"ImportCreateRegistrations\"\n\n /**\n * Job type to bulk update registrations.\n */\n | \"ImportUpdateRegistrations\"\n\n /**\n * Job type to bulk delete registrations.\n */\n | \"ImportDeleteRegistrations\"\n\n /**\n * Job type to bulk upsert registrations.\n */\n | \"ImportUpsertRegistrations\";\n\n/**\n * Describes the types of notification hub job statuses.\n */\nexport type NotificationHubJobStatus =\n /**\n * Indicates that the NotificationHubJob was accepted.\n */\n | \"Started\"\n\n /**\n * Indicates that the NotificationHubJob is currently running. Depending on the amount of data,\n * a job may stay in this state for several hours.\n */\n | \"Running\"\n\n /**\n * Indicates that the NotificationHubJob was completed successfully. Any output\n * will be ready where configured via the NotificationHubJob object.\n */\n | \"Completed\"\n\n /**\n * Indicates that the NotificationHubJob has failed.\n */\n | \"Failed\";\n\n/**\n * Represents a Notification Hub Job.\n */\nexport interface NotificationHubJob {\n /**\n * The unique job identifier.\n */\n jobId?: string;\n\n /**\n * The output file name.\n */\n outputFileName?: string;\n\n /**\n * The file name for the job failures.\n */\n failuresFileName?: string;\n\n /**\n * The progress for the job.\n */\n progress?: number;\n\n /**\n * The type of job.\n */\n type: NotificationHubJobType;\n\n /**\n * The status of the job.\n */\n status?: NotificationHubJobStatus;\n\n /**\n * The output container URL.\n */\n outputContainerUrl: string;\n\n /**\n * The import file URL.\n */\n importFileUrl?: string;\n\n /**\n * The input properties for the notification hub job.\n */\n inputProperties?: Record<string, string>;\n\n /**\n * Gets the notification hub job failure message.\n */\n failure?: string;\n\n /**\n * The output properties for the notification hub job.\n */\n outputProperties?: Record<string, string>;\n\n /**\n * Notification hub job created date.\n */\n createdAt?: Date;\n\n /**\n * Notification hub job last updated date.\n */\n updatedAt?: Date;\n}\n\n/**\n * Describes a poller for NotificationHubJob types.\n */\nexport type NotificationHubJobPoller = SimplePollerLike<\n OperationState<NotificationHubJob>,\n NotificationHubJob\n>;\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport { BrowserPushChannel } from \"./installation.js\";\n\n/**\n * Describes the options that can be provided while creating the NotificationHubsClientContext.\n */\nexport interface NotificationHubsClientOptions extends ClientOptions {}\n\n/**\n * Options for polled operations including the polling interval cycle.\n */\nexport interface PolledOperationOptions extends OperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Options for sending notifications for both tag based send and broadcast scheduled send.\n */\nexport interface ScheduleNotificationOptions extends OperationOptions {\n /**\n * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.\n * If not set, this results in a broadcast notification to be scheduled.\n */\n tagExpression?: string;\n}\n\n/**\n * Options for sending notifications for both tag based send and broadcast send.\n */\nexport interface SendNotificationOptions extends OperationOptions {\n /**\n * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.\n * If not set, this results in a broadcast notification to be sent.\n */\n tagExpression?: string;\n /**\n * Set to true to enable test send.\n */\n enableTestSend?: boolean;\n}\n\n/**\n * Options for sending notifications to individual devices.\n */\nexport interface DirectSendNotificationOptions extends OperationOptions {\n /**\n * The device handle to send the notification. If an array is provided, this uses batch direct send which is only available in Standard SKU and above.\n */\n deviceHandle: string | BrowserPushChannel | string[];\n}\n\n/**\n * Represents entity update operation options that can be set.\n */\nexport interface EntityOperationOptions extends OperationOptions {\n /**\n * ETag as returned by creation, update, and retrieval, or ‘*’ (overwrite).\n */\n etag?: string;\n}\n\n/**\n * Represents query options to include $top support.\n */\nexport interface RegistrationQueryLimitOptions extends OperationOptions {\n /**\n * The $top query member to get a number of records.\n */\n top?: number;\n}\n\n/**\n * Represents query options to include both $top and $filter.\n */\nexport interface RegistrationQueryOptions extends RegistrationQueryLimitOptions {\n /**\n * The OData $filter operator query string.\n */\n filter?: string;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport { BrowserPushChannel } from \"./installation.js\";\n\n/**\n * Describes the options that can be provided while creating the NotificationHubsClientContext.\n */\nexport interface NotificationHubsClientOptions extends ClientOptions {}\n\n/**\n * Options for polled operations including the polling interval cycle.\n */\nexport interface PolledOperationOptions extends OperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Options for sending notifications for both tag based send and broadcast scheduled send.\n */\nexport interface ScheduleNotificationOptions extends OperationOptions {\n /**\n * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.\n * If not set, this results in a broadcast notification to be scheduled.\n */\n tagExpression?: string;\n}\n\n/**\n * Options for sending notifications for both tag based send and broadcast send.\n */\nexport interface SendNotificationOptions extends OperationOptions {\n /**\n * A tag expression used to target devices. Use the `createTagExpression` function to create a tag expression from an array of tags.\n * If not set, this results in a broadcast notification to be sent.\n */\n tagExpression?: string;\n /**\n * Set to true to enable test send.\n */\n enableTestSend?: boolean;\n}\n\n/**\n * Options for sending notifications to individual devices.\n */\nexport interface DirectSendNotificationOptions extends OperationOptions {\n /**\n * The device handle to send the notification. If an array is provided, this uses batch direct send which is only available in Standard SKU and above.\n */\n deviceHandle: string | BrowserPushChannel | string[];\n}\n\n/**\n * Represents entity update operation options that can be set.\n */\nexport interface EntityOperationOptions extends OperationOptions {\n /**\n * ETag as returned by creation, update, and retrieval, or ‘*’ (overwrite).\n */\n etag?: string;\n}\n\n/**\n * Represents query options to include $top support.\n */\nexport interface RegistrationQueryLimitOptions extends OperationOptions {\n /**\n * The $top query member to get a number of records.\n */\n top?: number;\n}\n\n/**\n * Represents query options to include both $top and $filter.\n */\nexport interface RegistrationQueryOptions extends RegistrationQueryLimitOptions {\n /**\n * The OData $filter operator query string.\n */\n filter?: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  /**
4
4
  * Creates an ADM registration description.
5
5
  * @param description - A partial ADM registration description.
@@ -1 +1 @@
1
- {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../src/models/registration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA0FlC;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,WAA6C;IAE7C,uCACK,WAAW,KACd,IAAI,EAAE,KAAK,IACX;AACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,UAAU,wCAAwC,CACtD,WAAqD;IAErD,uCACK,WAAW,KACd,IAAI,EAAE,aAAa,IACnB;AACJ,CAAC;AAsBD;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAChD,WAA+C;IAE/C,uCACK,WAAW,KACd,IAAI,EAAE,OAAO,IACb;AACJ,CAAC;AAmCD;;;;GAIG;AACH,MAAM,UAAU,0CAA0C,CACxD,WAAuD;IAEvD,uCACK,WA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U,mCAAmC,CACjD,WAAgD;IAEhD,uCACK,WAAW,KACd,IAAI,EAAE,QAAQ,IACd;AACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,UAAU,2CAA2C,CACzD,WAAwD;IAExD,uCACK,WAAW,KACd,IAAI,EAAE,gBAAgB,IACtB;AACJ,CAAC","sourcesContent":["// 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 | \"FcmV1\"\n | \"FcmV1Template\"\n | \"Mpns\"\n | \"MpnsTemplate\"\n | \"Xiaomi\"\n | \"XiaomiTemplate\"\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/**\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 * Represents the description of the Amazon Device Messaging (ADM) registration.\n */\n}\nexport interface AdmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The Amazon Device Messaging registration identifier.\n */\n admRegistrationId: string;\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) registration.\n */\nexport interface AdmRegistrationDescription extends AdmRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AdmRegistrationDescriptionCommon,\n): AdmRegistrationDescription {\n return {\n ...description,\n kind: \"Adm\",\n };\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) template registration.\n */\nexport interface AdmTemplateRegistrationDescriptionCommon\n extends AdmRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) template registration.\n */\nexport interface AdmTemplateRegistrationDescription\n extends AdmTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AdmTemplateRegistrationDescriptionCommon,\n): AdmTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"AdmTemplate\",\n };\n}\n\n/**\n * Represents the description of apple registration.\n */\nexport interface AppleRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The APNs device token.\n */\n deviceToken: string;\n}\n\n/**\n * Represents the description of apple registration.\n */\nexport interface AppleRegistrationDescription extends AppleRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AppleRegistrationDescriptionCommon,\n): AppleRegistrationDescription {\n return {\n ...description,\n kind: \"Apple\",\n };\n}\n\n/**\n * Represents the description of the Apple template registration.\n */\nexport interface AppleTemplateRegistrationDescriptionCommon\n extends AppleRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The expiry date.\n */\n expiry?: Date;\n\n /**\n * The notification priority.\n */\n priority?: \"10\" | \"5\";\n\n /**\n * The APNS headers.\n */\n apnsHeaders?: Record<string, string>;\n}\n\n/**\n * Represents the description of the Apple template registration.\n */\nexport interface AppleTemplateRegistrationDescription\n extends AppleTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AppleTemplateRegistrationDescriptionCommon,\n): AppleTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"AppleTemplate\",\n };\n}\n\nexport interface BaiduRegistrationDescriptionCommon 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/**\n * Represents a Baidu registration description.\n */\nexport interface BaiduRegistrationDescription extends BaiduRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BaiduRegistrationDescriptionCommon,\n): BaiduRegistrationDescription {\n return {\n ...description,\n kind: \"Baidu\",\n };\n}\n\n/**\n * Represents a Baidu template registration description.\n */\nexport interface BaiduTemplateRegistrationDescriptionCommon\n extends BaiduRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Baidu template registration description.\n */\nexport interface BaiduTemplateRegistrationDescription\n extends BaiduTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BaiduTemplateRegistrationDescriptionCommon,\n): BaiduTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"BaiduTemplate\",\n };\n}\n\n/**\n * Represents a Browser Push registration description.\n */\nexport interface BrowserRegistrationDescriptionCommon 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/**\n * Represents a Browser Push registration description.\n */\nexport interface BrowserRegistrationDescription extends BrowserRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BrowserRegistrationDescriptionCommon,\n): BrowserRegistrationDescription {\n return {\n ...description,\n kind: \"Browser\",\n };\n}\n\n/**\n * Represents a Browser Push remplate registration description.\n */\nexport interface BrowserTemplateRegistrationDescriptionCommon\n extends BrowserRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Browser Push remplate registration description.\n */\nexport interface BrowserTemplateRegistrationDescription\n extends BrowserTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BrowserTemplateRegistrationDescriptionCommon,\n): BrowserTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"BrowserTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface GcmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Google Cloud Messaging service.\n */\n gcmRegistrationId: string;\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface GcmRegistrationDescription extends GcmRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Gcm\";\n}\n\n/**\n * Creates a Firebase Legacy registration description.\n * @param description - A partial GCM registration description.\n * @returns A created GCM registration description.\n */\nexport function createFcmLegacyRegistrationDescription(\n description: GcmRegistrationDescriptionCommon,\n): GcmRegistrationDescription {\n return {\n ...description,\n kind: \"Gcm\",\n };\n}\n\n/**\n * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.\n */\nexport interface GcmTemplateRegistrationDescriptionCommon\n extends GcmRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.\n */\nexport interface GcmTemplateRegistrationDescription\n extends GcmTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"GcmTemplate\";\n}\n\n/**\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 createFcmLegacyTemplateRegistrationDescription(\n description: GcmTemplateRegistrationDescriptionCommon,\n): GcmTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"GcmTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface FcmV1RegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Firebase Cloud Messaging service.\n */\n fcmV1RegistrationId: string;\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface FcmV1RegistrationDescription extends FcmV1RegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"FcmV1\";\n}\n\n/**\n * Creates a Firebase V1 registration description.\n * @param description - A partial FCM V1 registration description.\n * @returns A created FCM V1 registration description.\n */\nexport function createFcmV1RegistrationDescription(\n description: FcmV1RegistrationDescriptionCommon,\n): FcmV1RegistrationDescription {\n return {\n ...description,\n kind: \"FcmV1\",\n };\n}\n\n/**\n * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.\n */\nexport interface FcmV1TemplateRegistrationDescriptionCommon\n extends FcmV1RegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.\n */\nexport interface FcmV1TemplateRegistrationDescription\n extends FcmV1TemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"FcmV1Template\";\n}\n\n/**\n * Creates a FCM V1 template registration description.\n * @param description - A partial FCM V1 template registration description.\n * @returns A created FCM V1 template registration description.\n */\nexport function createFcmV1TemplateRegistrationDescription(\n description: FcmV1TemplateRegistrationDescriptionCommon,\n): FcmV1TemplateRegistrationDescription {\n return {\n ...description,\n kind: \"FcmV1Template\",\n };\n}\n\n/**\n * Represents a Windows Phone Notification Services registration description.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\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 MpnsRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Mpns\";\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 MpnsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n mpnsHeaders?: Record<string, string>;\n\n /**\n * The kind of the registration.\n */\n kind: \"MpnsTemplate\";\n}\n\n/**\n * Represents a Windows Phone Notification Services template registration.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsTemplateRegistrationDescriptionCommon\n extends MpnsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n mpnsHeaders?: Record<string, string>;\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 MpnsTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"MpnsTemplate\";\n}\n\n/**\n * Represents a Windows Notification Services (WNS) registration description.\n */\nexport interface WindowsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\n}\n\n/**\n * Represents a Windows Notification Services (WNS) registration description.\n */\nexport interface WindowsRegistrationDescription extends WindowsRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: WindowsRegistrationDescriptionCommon,\n): WindowsRegistrationDescription {\n return {\n ...description,\n kind: \"Windows\",\n };\n}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface WindowsTemplateRegistrationDescriptionCommon\n extends WindowsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n wnsHeaders?: Record<string, string>;\n}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface WindowsTemplateRegistrationDescription\n extends WindowsTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: WindowsTemplateRegistrationDescriptionCommon,\n): WindowsTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"WindowsTemplate\",\n };\n}\n\n/**\n * Represents a Xiaomi registration description.\n */\nexport interface XiaomiRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The Xiaomi registration ID.\n */\n xiaomiRegistrationId: string;\n}\n\n/**\n * Represents a Xiaomi registration description.\n */\nexport interface XiaomiRegistrationDescription extends XiaomiRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Xiaomi\";\n}\n\n/**\n * Creates a Xiaomi registration description.\n * @param description - A partial Xiaomi registration description.\n * @returns A created Xiaomi registration description.\n */\nexport function createXiaomiRegistrationDescription(\n description: XiaomiRegistrationDescriptionCommon,\n): XiaomiRegistrationDescription {\n return {\n ...description,\n kind: \"Xiaomi\",\n };\n}\n\n/**\n * Represents a Xiaomi template registration.\n */\nexport interface XiaomiTemplateRegistrationDescriptionCommon\n extends XiaomiRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface XiaomiTemplateRegistrationDescription\n extends XiaomiTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"XiaomiTemplate\";\n}\n\n/**\n * Creates a Xiaomi template registration description.\n * @param description - A partial Xiaomi template registration description.\n * @returns A created Xiaomi template registration description.\n */\nexport function createXiaomiTemplateRegistrationDescription(\n description: XiaomiTemplateRegistrationDescriptionCommon,\n): XiaomiTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"XiaomiTemplate\",\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 | FcmV1RegistrationDescription\n | FcmV1TemplateRegistrationDescription\n | MpnsRegistrationDescription\n | MpnsTemplateRegistrationDescription\n | XiaomiRegistrationDescription\n | XiaomiTemplateRegistrationDescription\n | WindowsRegistrationDescription\n | WindowsTemplateRegistrationDescription;\n\n/**\n * Describes an ADM Registration channel query.\n */\nexport interface AdmRegistrationChannel {\n /**\n * The ADM Registration ID.\n */\n admRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"adm\";\n}\n\n/**\n * Describes an Apple Registration channel query.\n */\nexport interface AppleRegistrationChannel {\n /**\n * The APNs device token.\n */\n deviceToken: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"apple\";\n}\n\n/**\n * Describes an Baidu Registration channel query.\n */\nexport interface BaiduRegistrationChannel {\n /**\n * The Baidu Channel ID.\n */\n baiduChannelId: string;\n /**\n * The Baidu User ID.\n */\n baiduUserId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"baidu\";\n}\n\n/**\n * Describes an Browser Registration channel query.\n */\nexport interface BrowserRegistrationChannel {\n /**\n * The Web Push endpoint URL.\n */\n endpoint: string;\n /**\n * The Web Push subscription P256DH.\n */\n p256dh: string;\n /**\n * The Web Push subscription auth secret.\n */\n auth: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"browser\";\n}\n\n/**\n * Describes an Firebase Legacy Registration channel query.\n */\nexport interface FirebaseLegacyRegistrationChannel {\n /**\n * The FCM Legacy registration ID.\n */\n gcmRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"gcm\";\n}\n\n/**\n * Describes an Firebase Legacy Registration channel query.\n */\nexport interface FirebaseV1RegistrationChannel {\n /**\n * The FCM V1 registration ID.\n */\n fcmV1RegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"fcmv1\";\n}\n\n/**\n * Describes an Windows Notification Services Registration channel query.\n */\nexport interface WindowsRegistrationChannel {\n /**\n * The WNS Channel URI.\n */\n channelUri: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"windows\";\n}\n\n/**\n * Describes an Xiaomi Registration channel query.\n */\nexport interface XiaomiRegistrationChannel {\n /**\n * The Xiaomi registration ID.\n */\n xiaomiRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"xiaomi\";\n}\n\n/**\n * Describes a Registration query.\n */\nexport type RegistrationChannel =\n | AdmRegistrationChannel\n | AppleRegistrationChannel\n | BaiduRegistrationChannel\n | BrowserRegistrationChannel\n | FirebaseLegacyRegistrationChannel\n | FirebaseV1RegistrationChannel\n | XiaomiRegistrationChannel\n | WindowsRegistrationChannel;\n"]}
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../src/models/registration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA0FlC;;;;GAIG;AACH,MA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ACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,UAAU,0CAA0C,CACxD,WAAuD;IAEvD,uCACK,WAAW,KACd,IAAI,EAAE,eAAe,IACrB;AACJ,CAAC;AAuFD;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAClD,WAAiD;IAEjD,uCACK,WAAW,KACd,IAAI,EAAE,SAAS,IACf;AACJ,CAAC;AAyBD;;;;GAIG;AACH,MAAM,UAAU,4CAA4C,CAC1D,WAAyD;IAEzD,uCACK,WAAW,KACd,IAAI,EAAE,iBAAiB,IACvB;AACJ,CAAC;AAsBD;;;;GAIG;AACH,MAAM,UAAU,mCAAmC,CACjD,WAAgD;IAEhD,uCACK,WAAW,KACd,IAAI,EAAE,QAAQ,IACd;AACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,UAAU,2CAA2C,CACzD,WAAwD;IAExD,uCACK,WAAW,KACd,IAAI,EAAE,gBAAgB,IACtB;AACJ,CAAC","sourcesContent":["// 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 | \"FcmV1\"\n | \"FcmV1Template\"\n | \"Mpns\"\n | \"MpnsTemplate\"\n | \"Xiaomi\"\n | \"XiaomiTemplate\"\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/**\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 * Represents the description of the Amazon Device Messaging (ADM) registration.\n */\n}\nexport interface AdmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The Amazon Device Messaging registration identifier.\n */\n admRegistrationId: string;\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) registration.\n */\nexport interface AdmRegistrationDescription extends AdmRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AdmRegistrationDescriptionCommon,\n): AdmRegistrationDescription {\n return {\n ...description,\n kind: \"Adm\",\n };\n}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) template registration.\n */\nexport interface AdmTemplateRegistrationDescriptionCommon\n extends AdmRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents the description of the Amazon Device Messaging (ADM) template registration.\n */\nexport interface AdmTemplateRegistrationDescription\n extends AdmTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AdmTemplateRegistrationDescriptionCommon,\n): AdmTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"AdmTemplate\",\n };\n}\n\n/**\n * Represents the description of apple registration.\n */\nexport interface AppleRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The APNs device token.\n */\n deviceToken: string;\n}\n\n/**\n * Represents the description of apple registration.\n */\nexport interface AppleRegistrationDescription extends AppleRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AppleRegistrationDescriptionCommon,\n): AppleRegistrationDescription {\n return {\n ...description,\n kind: \"Apple\",\n };\n}\n\n/**\n * Represents the description of the Apple template registration.\n */\nexport interface AppleTemplateRegistrationDescriptionCommon\n extends AppleRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The expiry date.\n */\n expiry?: Date;\n\n /**\n * The notification priority.\n */\n priority?: \"10\" | \"5\";\n\n /**\n * The APNS headers.\n */\n apnsHeaders?: Record<string, string>;\n}\n\n/**\n * Represents the description of the Apple template registration.\n */\nexport interface AppleTemplateRegistrationDescription\n extends AppleTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: AppleTemplateRegistrationDescriptionCommon,\n): AppleTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"AppleTemplate\",\n };\n}\n\nexport interface BaiduRegistrationDescriptionCommon 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/**\n * Represents a Baidu registration description.\n */\nexport interface BaiduRegistrationDescription extends BaiduRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BaiduRegistrationDescriptionCommon,\n): BaiduRegistrationDescription {\n return {\n ...description,\n kind: \"Baidu\",\n };\n}\n\n/**\n * Represents a Baidu template registration description.\n */\nexport interface BaiduTemplateRegistrationDescriptionCommon\n extends BaiduRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Baidu template registration description.\n */\nexport interface BaiduTemplateRegistrationDescription\n extends BaiduTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BaiduTemplateRegistrationDescriptionCommon,\n): BaiduTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"BaiduTemplate\",\n };\n}\n\n/**\n * Represents a Browser Push registration description.\n */\nexport interface BrowserRegistrationDescriptionCommon 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/**\n * Represents a Browser Push registration description.\n */\nexport interface BrowserRegistrationDescription extends BrowserRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BrowserRegistrationDescriptionCommon,\n): BrowserRegistrationDescription {\n return {\n ...description,\n kind: \"Browser\",\n };\n}\n\n/**\n * Represents a Browser Push remplate registration description.\n */\nexport interface BrowserTemplateRegistrationDescriptionCommon\n extends BrowserRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Browser Push remplate registration description.\n */\nexport interface BrowserTemplateRegistrationDescription\n extends BrowserTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: BrowserTemplateRegistrationDescriptionCommon,\n): BrowserTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"BrowserTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface GcmRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Google Cloud Messaging service.\n */\n gcmRegistrationId: string;\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface GcmRegistrationDescription extends GcmRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Gcm\";\n}\n\n/**\n * Creates a Firebase Legacy registration description.\n * @param description - A partial GCM registration description.\n * @returns A created GCM registration description.\n */\nexport function createFcmLegacyRegistrationDescription(\n description: GcmRegistrationDescriptionCommon,\n): GcmRegistrationDescription {\n return {\n ...description,\n kind: \"Gcm\",\n };\n}\n\n/**\n * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.\n */\nexport interface GcmTemplateRegistrationDescriptionCommon\n extends GcmRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents Notification Hub template registration description for Firebase Legacy Cloud Messaging.\n */\nexport interface GcmTemplateRegistrationDescription\n extends GcmTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"GcmTemplate\";\n}\n\n/**\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 createFcmLegacyTemplateRegistrationDescription(\n description: GcmTemplateRegistrationDescriptionCommon,\n): GcmTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"GcmTemplate\",\n };\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface FcmV1RegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * Registration id obtained from the Firebase Cloud Messaging service.\n */\n fcmV1RegistrationId: string;\n}\n\n/**\n * Represents Notification Hub registration description for Google Cloud Messaging.\n */\nexport interface FcmV1RegistrationDescription extends FcmV1RegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"FcmV1\";\n}\n\n/**\n * Creates a Firebase V1 registration description.\n * @param description - A partial FCM V1 registration description.\n * @returns A created FCM V1 registration description.\n */\nexport function createFcmV1RegistrationDescription(\n description: FcmV1RegistrationDescriptionCommon,\n): FcmV1RegistrationDescription {\n return {\n ...description,\n kind: \"FcmV1\",\n };\n}\n\n/**\n * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.\n */\nexport interface FcmV1TemplateRegistrationDescriptionCommon\n extends FcmV1RegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents Notification Hub template registration description for Firebase V1 Cloud Messaging.\n */\nexport interface FcmV1TemplateRegistrationDescription\n extends FcmV1TemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"FcmV1Template\";\n}\n\n/**\n * Creates a FCM V1 template registration description.\n * @param description - A partial FCM V1 template registration description.\n * @returns A created FCM V1 template registration description.\n */\nexport function createFcmV1TemplateRegistrationDescription(\n description: FcmV1TemplateRegistrationDescriptionCommon,\n): FcmV1TemplateRegistrationDescription {\n return {\n ...description,\n kind: \"FcmV1Template\",\n };\n}\n\n/**\n * Represents a Windows Phone Notification Services registration description.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\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 MpnsRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Mpns\";\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 MpnsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n mpnsHeaders?: Record<string, string>;\n\n /**\n * The kind of the registration.\n */\n kind: \"MpnsTemplate\";\n}\n\n/**\n * Represents a Windows Phone Notification Services template registration.\n * @deprecated Windows Phone is no longer supported.\n */\nexport interface MpnsTemplateRegistrationDescriptionCommon\n extends MpnsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n mpnsHeaders?: Record<string, string>;\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 MpnsTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"MpnsTemplate\";\n}\n\n/**\n * Represents a Windows Notification Services (WNS) registration description.\n */\nexport interface WindowsRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The channel URI.\n */\n channelUri: string;\n}\n\n/**\n * Represents a Windows Notification Services (WNS) registration description.\n */\nexport interface WindowsRegistrationDescription extends WindowsRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: WindowsRegistrationDescriptionCommon,\n): WindowsRegistrationDescription {\n return {\n ...description,\n kind: \"Windows\",\n };\n}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface WindowsTemplateRegistrationDescriptionCommon\n extends WindowsRegistrationDescriptionCommon,\n TemplateRegistrationDescription {\n /**\n * The WNS headers.\n */\n wnsHeaders?: Record<string, string>;\n}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface WindowsTemplateRegistrationDescription\n extends WindowsTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"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: WindowsTemplateRegistrationDescriptionCommon,\n): WindowsTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"WindowsTemplate\",\n };\n}\n\n/**\n * Represents a Xiaomi registration description.\n */\nexport interface XiaomiRegistrationDescriptionCommon extends RegistrationDescriptionCommon {\n /**\n * The Xiaomi registration ID.\n */\n xiaomiRegistrationId: string;\n}\n\n/**\n * Represents a Xiaomi registration description.\n */\nexport interface XiaomiRegistrationDescription extends XiaomiRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"Xiaomi\";\n}\n\n/**\n * Creates a Xiaomi registration description.\n * @param description - A partial Xiaomi registration description.\n * @returns A created Xiaomi registration description.\n */\nexport function createXiaomiRegistrationDescription(\n description: XiaomiRegistrationDescriptionCommon,\n): XiaomiRegistrationDescription {\n return {\n ...description,\n kind: \"Xiaomi\",\n };\n}\n\n/**\n * Represents a Xiaomi template registration.\n */\nexport interface XiaomiTemplateRegistrationDescriptionCommon\n extends XiaomiRegistrationDescriptionCommon,\n TemplateRegistrationDescription {}\n\n/**\n * Represents a Windows Notification Services (WNS) template registration.\n */\nexport interface XiaomiTemplateRegistrationDescription\n extends XiaomiTemplateRegistrationDescriptionCommon {\n /**\n * The kind of the registration.\n */\n kind: \"XiaomiTemplate\";\n}\n\n/**\n * Creates a Xiaomi template registration description.\n * @param description - A partial Xiaomi template registration description.\n * @returns A created Xiaomi template registration description.\n */\nexport function createXiaomiTemplateRegistrationDescription(\n description: XiaomiTemplateRegistrationDescriptionCommon,\n): XiaomiTemplateRegistrationDescription {\n return {\n ...description,\n kind: \"XiaomiTemplate\",\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 | FcmV1RegistrationDescription\n | FcmV1TemplateRegistrationDescription\n | MpnsRegistrationDescription\n | MpnsTemplateRegistrationDescription\n | XiaomiRegistrationDescription\n | XiaomiTemplateRegistrationDescription\n | WindowsRegistrationDescription\n | WindowsTemplateRegistrationDescription;\n\n/**\n * Describes an ADM Registration channel query.\n */\nexport interface AdmRegistrationChannel {\n /**\n * The ADM Registration ID.\n */\n admRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"adm\";\n}\n\n/**\n * Describes an Apple Registration channel query.\n */\nexport interface AppleRegistrationChannel {\n /**\n * The APNs device token.\n */\n deviceToken: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"apple\";\n}\n\n/**\n * Describes an Baidu Registration channel query.\n */\nexport interface BaiduRegistrationChannel {\n /**\n * The Baidu Channel ID.\n */\n baiduChannelId: string;\n /**\n * The Baidu User ID.\n */\n baiduUserId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"baidu\";\n}\n\n/**\n * Describes an Browser Registration channel query.\n */\nexport interface BrowserRegistrationChannel {\n /**\n * The Web Push endpoint URL.\n */\n endpoint: string;\n /**\n * The Web Push subscription P256DH.\n */\n p256dh: string;\n /**\n * The Web Push subscription auth secret.\n */\n auth: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"browser\";\n}\n\n/**\n * Describes an Firebase Legacy Registration channel query.\n */\nexport interface FirebaseLegacyRegistrationChannel {\n /**\n * The FCM Legacy registration ID.\n */\n gcmRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"gcm\";\n}\n\n/**\n * Describes an Firebase Legacy Registration channel query.\n */\nexport interface FirebaseV1RegistrationChannel {\n /**\n * The FCM V1 registration ID.\n */\n fcmV1RegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"fcmv1\";\n}\n\n/**\n * Describes an Windows Notification Services Registration channel query.\n */\nexport interface WindowsRegistrationChannel {\n /**\n * The WNS Channel URI.\n */\n channelUri: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"windows\";\n}\n\n/**\n * Describes an Xiaomi Registration channel query.\n */\nexport interface XiaomiRegistrationChannel {\n /**\n * The Xiaomi registration ID.\n */\n xiaomiRegistrationId: string;\n /**\n * The kind of the registration channel.\n */\n kind: \"xiaomi\";\n}\n\n/**\n * Describes a Registration query.\n */\nexport type RegistrationChannel =\n | AdmRegistrationChannel\n | AppleRegistrationChannel\n | BaiduRegistrationChannel\n | BrowserRegistrationChannel\n | FirebaseLegacyRegistrationChannel\n | FirebaseV1RegistrationChannel\n | XiaomiRegistrationChannel\n | WindowsRegistrationChannel;\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/models/response.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RegistrationDescription } from \"./registration.js\";\n\n/**\n * Describes a registration query response with registrations and a continuation token.\n */\nexport interface RegistrationQueryResponse {\n /**\n * The list of registrations.\n */\n registrations: RegistrationDescription[];\n /**\n * A continuation token to get more results.\n */\n continuationToken?: string;\n}\n"]}
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/models/response.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RegistrationDescription } from \"./registration.js\";\n\n/**\n * Describes a registration query response with registrations and a continuation token.\n */\nexport interface RegistrationQueryResponse {\n /**\n * The list of registrations.\n */\n registrations: RegistrationDescription[];\n /**\n * A continuation token to get more results.\n */\n continuationToken?: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  /**
4
4
  * Creates a tag expression from a list of tags as a || expression.
5
5
  * @param tags - The tags to create the || expression
@@ -1 +1 @@
1
- {"version":3,"file":"tagExpressionBuilder.js","sourceRoot":"","sources":["../../../src/models/tagExpressionBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Creates a tag expression from a list of tags as a || expression.\n * @param tags - The tags to create the || expression\n * @returns The tag expression made from the array of strings into an || expression.\n */\nexport function createTagExpression(tags: string[]): string {\n return tags.join(\"||\");\n}\n"]}
1
+ {"version":3,"file":"tagExpressionBuilder.js","sourceRoot":"","sources":["../../../src/models/tagExpressionBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Creates a tag expression from a list of tags as a || expression.\n * @param tags - The tags to create the || expression\n * @returns The tag expression made from the array of strings into an || expression.\n */\nexport function createTagExpression(tags: string[]): string {\n return tags.join(\"||\");\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createClientContext } from "./api/clientContext.js";
4
4
  import { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from "./api/beginSubmitNotificationHubJob.js";
5
5
  import { cancelScheduledNotification as cancelScheduledNotificationMethod } from "./api/cancelScheduledNotification.js";
@@ -1 +1 @@
1
- {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC,OAAO,EAAiC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,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,UAA4B,EAAE;QACpD,OAAO,6BAA6B,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport { Installation, JsonPatch } from \"./models/installation.js\";\nimport {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport { NotificationHubsClientContext, createClientContext } from \"./api/clientContext.js\";\nimport { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport { Notification } from \"./models/notification.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions = { enableTestSend: false },\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(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 notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
1
+ {"version":3,"file":"notificationHubsClient.js","sourceRoot":"","sources":["../../src/notificationHubsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC,OAAO,EAAiC,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK5F,OAAO,EAAE,6BAA6B,IAAI,mCAAmC,EAAE,MAAM,wCAAwC,CAAC;AAC9H,OAAO,EAAE,2BAA2B,IAAI,iCAAiC,EAAE,MAAM,sCAAsC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AAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DirectSendNotificationOptions,\n EntityOperationOptions,\n NotificationHubsClientOptions,\n PolledOperationOptions,\n RegistrationQueryLimitOptions,\n ScheduleNotificationOptions,\n SendNotificationOptions,\n} from \"./models/options.js\";\nimport { Installation, JsonPatch } from \"./models/installation.js\";\nimport {\n NotificationDetails,\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"./models/notificationDetails.js\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"./models/notificationHubJob.js\";\nimport { NotificationHubsClientContext, createClientContext } from \"./api/clientContext.js\";\nimport { RegistrationDescription, RegistrationChannel } from \"./models/registration.js\";\nimport { Notification } from \"./models/notification.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { beginSubmitNotificationHubJob as beginSubmitNotificationHubJobMethod } from \"./api/beginSubmitNotificationHubJob.js\";\nimport { cancelScheduledNotification as cancelScheduledNotificationMethod } from \"./api/cancelScheduledNotification.js\";\nimport { createOrUpdateInstallation as createOrUpdateInstallationMethod } from \"./api/createOrUpdateInstallation.js\";\nimport { createOrUpdateRegistration as createOrUpdateRegistrationMethod } from \"./api/createOrUpdateRegistration.js\";\nimport { createRegistrationId as createRegistrationIdMethod } from \"./api/createRegistrationId.js\";\nimport { createRegistration as createRegistrationMethod } from \"./api/createRegistration.js\";\nimport { deleteInstallation as deleteInstallationMethod } from \"./api/deleteInstallation.js\";\nimport { deleteRegistration } from \"./api/deleteRegistration.js\";\nimport { getFeedbackContainerUrl as getFeedbackContainerUrlMethod } from \"./api/getFeedbackContainerUrl.js\";\nimport { getInstallation as getInstallationMethod } from \"./api/getInstallation.js\";\nimport { getNotificationHubJob as getNotificationHubJobMethod } from \"./api/getNotificationHubJob.js\";\nimport { getNotificationOutcomeDetails as getNotificationOutcomeDetailsMethod } from \"./api/getNotificationOutcomeDetails.js\";\nimport { getRegistration as getRegistrationMethod } from \"./api/getRegistration.js\";\nimport { listNotificationHubJobs as listNotificationHubJobsMethod } from \"./api/listNotificationHubJobs.js\";\nimport { listRegistrationsByChannel as listRegistrationsByChannelMethod } from \"./api/listRegistrationsByChannel.js\";\nimport { listRegistrationsByTag as listRegistrationsByTagMethod } from \"./api/listRegistrationsByTag.js\";\nimport { listRegistrations as listRegistrationsMethod } from \"./api/listRegistrations.js\";\nimport { scheduleNotification as scheduleNotificationMethod } from \"./api/scheduleNotification.js\";\nimport { sendNotification as sendNotificationMethod } from \"./api/sendNotification.js\";\nimport { submitNotificationHubJob as submitNotificationHubJobMethod } from \"./api/submitNotificationHubJob.js\";\nimport { updateInstallation as updateInstallationMethod } from \"./api/updateInstallation.js\";\nimport { updateRegistration as updateRegistrationMethod } from \"./api/updateRegistration.js\";\n\n/**\n * This represents a client for Azure Notification Hubs to manage installations and send\n * messages to devices.\n */\nexport class NotificationHubsClient {\n private _client: NotificationHubsClientContext;\n\n /**\n * Creates a new instance of the NotificationClient with a connection string, hub name and options.\n * @param connectionString - The Notification Hub Access Policy connection string.\n * @param hubName - The name of the Azure Notification Hub.\n * @param options - Options for configuring the Azure Notification Hubs client.\n */\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this._client = createClientContext(connectionString, hubName, options);\n }\n\n /**\n * Creates or overwrites an installation to a Notification Hub.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n createOrUpdateInstallation(\n installation: Installation,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return createOrUpdateInstallationMethod(this._client, installation, options);\n }\n\n /**\n * Deletes an installation from a Notification Hub.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteInstallation(\n installationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\n getInstallation(installationId: string, options: OperationOptions = {}): Promise<Installation> {\n return getInstallationMethod(this._client, installationId, options);\n }\n\n /**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param installationId - The ID of the installation to update.\n * @param patches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n updateInstallation(\n installationId: string,\n patches: JsonPatch[],\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return updateInstallationMethod(this._client, installationId, patches, options);\n }\n\n /**\n * Creates a new registration ID.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\n createRegistrationId(options: OperationOptions = {}): Promise<string> {\n return createRegistrationIdMethod(this._client, options);\n }\n\n /**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\n createRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Creates or updates a registration.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\n createOrUpdateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return createOrUpdateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Updates an existing registration.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\n updateRegistration(\n registration: RegistrationDescription,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return updateRegistrationMethod(this._client, registration, options);\n }\n\n /**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n deleteRegistration(\n registrationId: string,\n options: EntityOperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return deleteRegistration(this._client, registrationId, options);\n }\n\n /**\n * Gets a registration by the given registration ID.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\n getRegistration(\n registrationId: string,\n options: OperationOptions = {},\n ): Promise<RegistrationDescription> {\n return getRegistrationMethod(this._client, registrationId, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given query options.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrations(\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsMethod(this._client, options);\n }\n\n /**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param channel - The registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\n listRegistrationsByChannel(\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByChannelMethod(this._client, channel, options);\n }\n\n /**\n * Lists all registrations with the matching tag.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\n listRegistrationsByTag(\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n ): PagedAsyncIterableIterator<RegistrationDescription> {\n return listRegistrationsByTagMethod(this._client, tag, options);\n }\n\n /**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n sendNotification(\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions = { enableTestSend: false },\n ): Promise<NotificationHubsMessageResponse> {\n return sendNotificationMethod(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 notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\n scheduleNotification(\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions = {},\n ): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationMethod(this._client, scheduledTime, notification, options);\n }\n\n /**\n * Cancels the scheduled notification with the given notification ID.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\n cancelScheduledNotification(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubsResponse> {\n return cancelScheduledNotificationMethod(this._client, notificationId, options);\n }\n\n /**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\n getFeedbackContainerUrl(options: OperationOptions = {}): Promise<string> {\n return getFeedbackContainerUrlMethod(this._client, options);\n }\n\n /**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\n getNotificationOutcomeDetails(\n notificationId: string,\n options: OperationOptions = {},\n ): Promise<NotificationDetails> {\n return getNotificationOutcomeDetailsMethod(this._client, notificationId, options);\n }\n\n /**\n * Gets a Notification Hub Job by the ID.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\n getNotificationHubJob(\n jobId: string,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return getNotificationHubJobMethod(this._client, jobId, options);\n }\n\n /**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\n beginSubmitNotificationHubJob(\n notificationHubJob: NotificationHubJob,\n options: PolledOperationOptions = {},\n ): Promise<NotificationHubJobPoller> {\n return beginSubmitNotificationHubJobMethod(this._client, notificationHubJob, options);\n }\n\n /**\n * Submits a Notification Hub Job. Note this is available to Standard SKU namespace and above.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\n submitNotificationHubJob(\n job: NotificationHubJob,\n options: OperationOptions = {},\n ): Promise<NotificationHubJob> {\n return submitNotificationHubJobMethod(this._client, job, options);\n }\n\n /**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\n listNotificationHubJobs(options: OperationOptions = {}): Promise<NotificationHubJob[]> {\n return listNotificationHubJobsMethod(this._client, options);\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { getDateOrUndefined, getInteger, getStringOrUndefined, isDefined } from "../utils/utils.js";
4
4
  import { parseXML } from "@azure/core-xml";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"notificationDetailsSerializer.js","sourceRoot":"","sources":["../../../src/serializers/notificationDetailsSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CA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CAAC,CAAC;QAC/E,iBAAiB;QACjB,gBAAgB;QAChB,kBAAkB;QAClB,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CACzB,MAAmD;IAEnD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,OAAO,GAA0B,EAAE,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n NotificationDetails,\n NotificationOutcome,\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 });\n const notificationDetails = xml[\"NotificationDetails\"];\n\n let apnsOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"ApnsOutcomeCounts\"])) {\n apnsOutcomeCounts = parseOutcomeCounts(notificationDetails[\"ApnsOutcomeCounts\"][\"Outcome\"]);\n }\n\n let admOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"AdmOutcomeCounts\"])) {\n admOutcomeCounts = parseOutcomeCounts(notificationDetails[\"AdmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let baiduOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"BaiduOutcomeCounts\"])) {\n baiduOutcomeCounts = parseOutcomeCounts(notificationDetails[\"BaiduOutcomeCounts\"][\"Outcome\"]);\n }\n\n let browserOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"BrowserOutcomeCounts\"])) {\n browserOutcomeCounts = parseOutcomeCounts(\n notificationDetails[\"BrowserOutcomeCounts\"][\"Outcome\"],\n );\n }\n\n let fcmOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"GcmOutcomeCounts\"])) {\n fcmOutcomeCounts = parseOutcomeCounts(notificationDetails[\"GcmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let fcmV1OutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"FcmV1OutcomeCounts\"])) {\n fcmV1OutcomeCounts = parseOutcomeCounts(notificationDetails[\"FcmV1OutcomeCounts\"][\"Outcome\"]);\n }\n\n let xiaomiOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"XiaomiOutcomeCounts\"])) {\n xiaomiOutcomeCounts = parseOutcomeCounts(notificationDetails[\"XiaomiOutcomeCounts\"][\"Outcome\"]);\n }\n\n let wnsOutcomeCounts: NotificationOutcome[] | 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 notificationBody: getStringOrUndefined(notificationDetails[\"NotificationBody\"]),\n apnsOutcomeCounts,\n admOutcomeCounts,\n baiduOutcomeCounts,\n browserOutcomeCounts,\n fcmOutcomeCounts,\n fcmV1OutcomeCounts,\n xiaomiOutcomeCounts,\n wnsOutcomeCounts,\n };\n}\n\nfunction parseOutcomeCounts(\n counts: Record<string, any>[] | Record<string, any>,\n): NotificationOutcome[] {\n const items = Array.isArray(counts) ? counts : [counts];\n const results: NotificationOutcome[] = [];\n for (const item of items) {\n results.push({ state: item[\"Name\"], count: getInteger(item[\"Count\"], \"Count\") });\n }\n\n return results;\n}\n"]}
1
+ {"version":3,"file":"notificationDetailsSerializer.js","sourceRoot":"","sources":["../../../src/serializers/notificationDetailsSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,QAAgB;IAC7D,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE;QACnC,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IACH,MAAM,mBAAmB,GAAG,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAEvD,IAAI,iBAAoD,CAAC;IACzD,IAAI,SAAS,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC;QACxD,iBAAiB,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,gBAAmD,CAAC;IAC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AAM,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n NotificationDetails,\n NotificationOutcome,\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 });\n const notificationDetails = xml[\"NotificationDetails\"];\n\n let apnsOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"ApnsOutcomeCounts\"])) {\n apnsOutcomeCounts = parseOutcomeCounts(notificationDetails[\"ApnsOutcomeCounts\"][\"Outcome\"]);\n }\n\n let admOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"AdmOutcomeCounts\"])) {\n admOutcomeCounts = parseOutcomeCounts(notificationDetails[\"AdmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let baiduOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"BaiduOutcomeCounts\"])) {\n baiduOutcomeCounts = parseOutcomeCounts(notificationDetails[\"BaiduOutcomeCounts\"][\"Outcome\"]);\n }\n\n let browserOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"BrowserOutcomeCounts\"])) {\n browserOutcomeCounts = parseOutcomeCounts(\n notificationDetails[\"BrowserOutcomeCounts\"][\"Outcome\"],\n );\n }\n\n let fcmOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"GcmOutcomeCounts\"])) {\n fcmOutcomeCounts = parseOutcomeCounts(notificationDetails[\"GcmOutcomeCounts\"][\"Outcome\"]);\n }\n\n let fcmV1OutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"FcmV1OutcomeCounts\"])) {\n fcmV1OutcomeCounts = parseOutcomeCounts(notificationDetails[\"FcmV1OutcomeCounts\"][\"Outcome\"]);\n }\n\n let xiaomiOutcomeCounts: NotificationOutcome[] | undefined;\n if (isDefined(notificationDetails[\"XiaomiOutcomeCounts\"])) {\n xiaomiOutcomeCounts = parseOutcomeCounts(notificationDetails[\"XiaomiOutcomeCounts\"][\"Outcome\"]);\n }\n\n let wnsOutcomeCounts: NotificationOutcome[] | 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 notificationBody: getStringOrUndefined(notificationDetails[\"NotificationBody\"]),\n apnsOutcomeCounts,\n admOutcomeCounts,\n baiduOutcomeCounts,\n browserOutcomeCounts,\n fcmOutcomeCounts,\n fcmV1OutcomeCounts,\n xiaomiOutcomeCounts,\n wnsOutcomeCounts,\n };\n}\n\nfunction parseOutcomeCounts(\n counts: Record<string, any>[] | Record<string, any>,\n): NotificationOutcome[] {\n const items = Array.isArray(counts) ? counts : [counts];\n const results: NotificationOutcome[] = [];\n for (const item of items) {\n results.push({ state: item[\"Name\"], count: getInteger(item[\"Count\"], \"Count\") });\n }\n\n return results;\n}\n"]}