@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,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { delay } from "@azure/core-util";
4
4
  import { getNotificationHubJob } from "./getNotificationHubJob.js";
5
5
  import { submitNotificationHubJob } from "./submitNotificationHubJob.js";
@@ -1 +1 @@
1
- {"version":3,"file":"beginSubmitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/beginSubmitNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAsC,EACtC,kBAAsC,EACtC,yBAAiD,EAAE;;IAEnD,IAAI,YAAY,GAAG,MAAM,wBAAwB,CAC/C,OAAO,EACP,kBAAkB,EAClB,sBAAsB,CACvB,CAAC;IAIF,MAAM,KAAK,GAAuC;QAChD,MAAM,EAAE,YAAY;KACrB,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAmB,CAAC;IACrD,MAAM,wBAAwB,GAAG,KAAK,IAAmB,EAAE,CACzD,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,IAAI,aAAsD,CAAC;IAC3D,IAAI,SAAmC,CAAC;IACxC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,uBAAuB,GAAG,MAAA,sBAAsB,CAAC,kBAAkB,mCAAI,IAAI,CAAC;IAElF,MAAM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GAAG,SAAS,CAAC;YAC5B,CAAC,CAAC,EAAC,CAAC;QACN,CAAC;QAED,UAAU,CAAC,QAA6D;YACtE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;YACnB,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAEnC,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM;YACJ,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;QAED,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;YACxB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAC;QAChB,CAAC;QAED,SAAS;YACP,OAAO,aAAa,KAAK,SAAS,CAAC;QACrC,CAAC;QAED,iBAAiB;YACf,OAAO,KAAK,CAAC;QACf,CAAC;QAED,SAAS;YACP,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CancelOnProgress, OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PolledOperationOptions } from \"../models/options.js\";\nimport { delay } from \"@azure/core-util\";\nimport { getNotificationHubJob } from \"./getNotificationHubJob.js\";\nimport { submitNotificationHubJob } from \"./submitNotificationHubJob.js\";\n\n/**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param context - The Notification Hubs client.\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 */\nexport async function beginSubmitNotificationHubJob(\n context: NotificationHubsClientContext,\n notificationHubJob: NotificationHubJob,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<NotificationHubJobPoller> {\n let submittedJob = await submitNotificationHubJob(\n context,\n notificationHubJob,\n polledOperationOptions,\n );\n\n type Handler = (state: OperationState<NotificationHubJob>) => void;\n\n const state: OperationState<NotificationHubJob> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<NotificationHubJob> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob> = {\n async poll(options?: { abortSignal?: AbortSignalLike }): Promise<void> {\n submittedJob = await getNotificationHubJob(context, submittedJob.jobId!, options);\n if (submittedJob.status === \"Running\" || submittedJob.status === \"Started\") {\n state.status = \"running\";\n }\n\n if (submittedJob.status === \"Completed\") {\n state.status = \"succeeded\";\n state.result = submittedJob;\n }\n\n if (submittedJob.status === \"Failed\") {\n state.status = \"failed\";\n state.error = new Error(submittedJob.failure);\n }\n\n await processProgressCallbacks();\n\n if (state.status === \"canceled\") {\n throw new Error(\"Operation was canceled\");\n }\n if (state.status === \"failed\") {\n throw state.error;\n }\n },\n\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<NotificationHubJob> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult() as NotificationHubJob;\n case \"canceled\":\n throw new Error(\"Operation was canceled\");\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(callback: (state: OperationState<NotificationHubJob>) => void): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<NotificationHubJob> {\n return state;\n },\n\n getResult(): NotificationHubJob | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n };\n\n return poller;\n}\n"]}
1
+ {"version":3,"file":"beginSubmitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/beginSubmitNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAsC,EACtC,kBAAsC,EACtC,yBAAiD,EAAE;;IAEnD,IAAI,YAAY,GAAG,MAAM,wBAAwB,CAC/C,OAAO,EACP,kBAAkB,EAClB,sBAAsB,CACvB,CAAC;I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MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CancelOnProgress, OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PolledOperationOptions } from \"../models/options.js\";\nimport { delay } from \"@azure/core-util\";\nimport { getNotificationHubJob } from \"./getNotificationHubJob.js\";\nimport { submitNotificationHubJob } from \"./submitNotificationHubJob.js\";\n\n/**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param context - The Notification Hubs client.\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 */\nexport async function beginSubmitNotificationHubJob(\n context: NotificationHubsClientContext,\n notificationHubJob: NotificationHubJob,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<NotificationHubJobPoller> {\n let submittedJob = await submitNotificationHubJob(\n context,\n notificationHubJob,\n polledOperationOptions,\n );\n\n type Handler = (state: OperationState<NotificationHubJob>) => void;\n\n const state: OperationState<NotificationHubJob> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<NotificationHubJob> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob> = {\n async poll(options?: { abortSignal?: AbortSignalLike }): Promise<void> {\n submittedJob = await getNotificationHubJob(context, submittedJob.jobId!, options);\n if (submittedJob.status === \"Running\" || submittedJob.status === \"Started\") {\n state.status = \"running\";\n }\n\n if (submittedJob.status === \"Completed\") {\n state.status = \"succeeded\";\n state.result = submittedJob;\n }\n\n if (submittedJob.status === \"Failed\") {\n state.status = \"failed\";\n state.error = new Error(submittedJob.failure);\n }\n\n await processProgressCallbacks();\n\n if (state.status === \"canceled\") {\n throw new Error(\"Operation was canceled\");\n }\n if (state.status === \"failed\") {\n throw state.error;\n }\n },\n\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<NotificationHubJob> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult() as NotificationHubJob;\n case \"canceled\":\n throw new Error(\"Operation was canceled\");\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(callback: (state: OperationState<NotificationHubJob>) => void): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<NotificationHubJob> {\n return state;\n },\n\n getResult(): NotificationHubJob | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n };\n\n return poller;\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 { createRequest, parseNotificationSendResponse, sendRequest } from "./internal/_client.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "cancelScheduledNotification";
@@ -1 +1 @@
1
- {"version":3,"file":"cancelScheduledNotification.js","sourceRoot":"","sources":["../../../src/api/cancelScheduledNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIlG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,2BAA2B,cAAc,EAAE,CAAC;QAEjE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAE3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,6BAA6B,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"cancelScheduledNotification\";\n\n/**\n * Cancels the scheduled notification with the given notification ID.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\nexport function cancelScheduledNotification(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/schedulednotifications/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationSendResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"cancelScheduledNotification.js","sourceRoot":"","sources":["../../../src/api/cancelScheduledNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIlG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,2BAA2B,cAAc,EAAE,CAAC;QAEjE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAE3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,6BAA6B,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"cancelScheduledNotification\";\n\n/**\n * Cancels the scheduled notification with the given notification ID.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\nexport function cancelScheduledNotification(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/schedulednotifications/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationSendResponse(response);\n },\n );\n}\n"]}
@@ -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 * as constants from "../utils/constants.js";
4
4
  import { RestError, createDefaultHttpClient, createHttpHeaders, } from "@azure/core-rest-pipeline";
5
5
  import { createTokenCredentialFromConnection, parseNotificationHubsConnectionString, } from "../auth/connectionStringUtils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAKL,SAAS,EACT,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAU,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;;QAE3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,gBAAgB,GAAG,qCAAqC,CAAC,gBAAgB,CAAC,CAAC;QACjF,mFAAmF;QACnF,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACtE,IAAI,CAAC,kBAAkB,GAAG,mCAAmC,CAC3D,gBAAgB,CAAC,eAAe,EAChC,gBAAgB,CAAC,mBAAmB,CACrC,CAAC;QAEF,MAAM,cAAc,GAAG,6BAA6B,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5E,MAAM,eAAe,GAAG,CAAA,MAA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AG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as constants from \"../utils/constants.js\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createDefaultHttpClient,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport { NotificationHubsClientOptions } from \"../models/options.js\";\nimport { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport { Client, getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
+ {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAKL,SAAS,EACT,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAU,SAAS,EAAE,MAAM,y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AAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,SAAS,CAAC,wCAAwC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as constants from \"../utils/constants.js\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createDefaultHttpClient,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport { NotificationHubsClientOptions } from \"../models/options.js\";\nimport { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport { Client, getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createRequest, parseNotificationResponse, sendRequest } from "./internal/_client.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "createOrUpdateInstallation";
@@ -1 +1 @@
1
- {"version":3,"file":"createOrUpdateInstallation.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAK9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,YAAY,CAAC,cAAc,EAAE,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateInstallation\";\n\n/**\n * Creates or overwrites an installation to a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function createOrUpdateInstallation(\n context: NotificationHubsClientContext,\n installation: Installation,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installation.installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PUT\", headers, updatedOptions);\n request.body = JSON.stringify(installation);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createOrUpdateInstallation.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAK9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,YAAY,CAAC,cAAc,EAAE,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateInstallation\";\n\n/**\n * Creates or overwrites an installation to a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function createOrUpdateInstallation(\n context: NotificationHubsClientContext,\n installation: Installation,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installation.installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PUT\", headers, updatedOptions);\n request.body = JSON.stringify(installation);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
@@ -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 { createOrUpdateRegistrationDescription } from "./internal/_createOrUpdateRegistrationDescription.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "createOrUpdateRegistration";
@@ -1 +1 @@
1
- {"version":3,"file":"createOrUpdateRegistration.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,OAAO,qCAAqC,CAC1C,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,CACf,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateRegistration\";\n\n/**\n * Creates or updates a registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\nexport function createOrUpdateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n return createOrUpdateRegistrationDescription(\n context,\n registration,\n \"createOrUpdate\",\n updatedOptions,\n );\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createOrUpdateRegistration.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,OAAO,qCAAqC,CAC1C,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,CACf,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateRegistration\";\n\n/**\n * Creates or updates a registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\nexport function createOrUpdateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n return createOrUpdateRegistrationDescription(\n context,\n registration,\n \"createOrUpdate\",\n updatedOptions,\n );\n },\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 { RestError } from "@azure/core-rest-pipeline";
4
4
  import { createOrUpdateRegistrationDescription } from "./internal/_createOrUpdateRegistrationDescription.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"createRegistration.js","sourceRoot":"","sources":["../../../src/api/createRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,MAAM,IAAI,SAAS,CAAC,0DAA0D,EAAE;gBAC9E,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,qCAAqC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAChG,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistration\";\n\n/**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\nexport function createRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (registration.registrationId) {\n throw new RestError(\"registrationId must not be set during a create operation\", {\n statusCode: 400,\n });\n }\n\n return createOrUpdateRegistrationDescription(context, registration, \"create\", updatedOptions);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createRegistration.js","sourceRoot":"","sources":["../../../src/api/createRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,MAAM,IAAI,SAAS,CAAC,0DAA0D,EAAE;gBAC9E,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,qCAAqC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAChG,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistration\";\n\n/**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\nexport function createRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (registration.registrationId) {\n throw new RestError(\"registrationId must not be set during a create operation\", {\n statusCode: 400,\n });\n }\n\n return createOrUpdateRegistrationDescription(context, registration, \"create\", updatedOptions);\n },\n );\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { RestError } from "@azure/core-rest-pipeline";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"createRegistrationId.js","sourceRoot":"","sources":["../../../src/api/createRegistrationId.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,CAAC;QAExC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,2GAA2G;QAC3G,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,SAAS,CAAC,mBAAmB,cAAc,oBAAoB,EAAE;gBACzE,UAAU,EAAE,GAAG;gBACf,OAAO;gBACP,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,cAAe,CAAC,CAAC;QAC7C,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE1D,OAAO,cAAc,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistrationId\";\n\n/**\n * Creates a new registration ID.\n * @param context - The Notification Hubs client.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\nexport function createRegistrationId(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrationIDs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n const response = await sendRequest(context, request, 201);\n\n // In the form: https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/<registrationId>\n const locationHeader = response.headers.get(\"Location\");\n if (!locationHeader || !locationHeader.startsWith(\"https://\")) {\n throw new RestError(`Location header ${locationHeader} is an invalid URL`, {\n statusCode: 500,\n request,\n response,\n });\n }\n const locationUrl = new URL(locationHeader!);\n const registrationId = locationUrl.pathname.split(\"/\")[3];\n\n return registrationId;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createRegistrationId.js","sourceRoot":"","sources":["../../../src/api/createRegistrationId.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,CAAC;QAExC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,2GAA2G;QAC3G,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,SAAS,CAAC,mBAAmB,cAAc,oBAAoB,EAAE;gBACzE,UAAU,EAAE,GAAG;gBACf,OAAO;gBACP,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,cAAe,CAAC,CAAC;QAC7C,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE1D,OAAO,cAAc,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistrationId\";\n\n/**\n * Creates a new registration ID.\n * @param context - The Notification Hubs client.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\nexport function createRegistrationId(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrationIDs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n const response = await sendRequest(context, request, 201);\n\n // In the form: https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/<registrationId>\n const locationHeader = response.headers.get(\"Location\");\n if (!locationHeader || !locationHeader.startsWith(\"https://\")) {\n throw new RestError(`Location header ${locationHeader} is an invalid URL`, {\n statusCode: 500,\n request,\n response,\n });\n }\n const locationUrl = new URL(locationHeader!);\n const registrationId = locationUrl.pathname.split(\"/\")[3];\n\n return registrationId;\n },\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 { createRequest, parseNotificationResponse, sendRequest } from "./internal/_client.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "deleteInstallation";
@@ -1 +1 @@
1
- {"version":3,"file":"deleteInstallation.js","sourceRoot":"","sources":["../../../src/api/deleteInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteInstallation\";\n\n/**\n * Deletes an installation from a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 204);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"deleteInstallation.js","sourceRoot":"","sources":["../../../src/api/deleteInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteInstallation\";\n\n/**\n * Deletes an installation from a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 204);\n\n return parseNotificationResponse(response);\n },\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 { createRequest, parseNotificationResponse, sendRequest } from "./internal/_client.js";
4
4
  import { isDefined } from "../utils/utils.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRegistration.js","sourceRoot":"","sources":["../../../src/api/deleteRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI9F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAAkC,EAAE;IAEpC,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { EntityOperationOptions } from \"../models/options.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { isDefined } from \"../utils/utils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteRegistration\";\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 */\nexport function deleteRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: EntityOperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n headers.set(\"If-Match\", isDefined(options.etag) ? `\"${options.etag}\"` : \"*\");\n\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"deleteRegistration.js","sourceRoot":"","sources":["../../../src/api/deleteRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI9F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAAkC,EAAE;IAEpC,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { EntityOperationOptions } from \"../models/options.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { isDefined } from \"../utils/utils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteRegistration\";\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 */\nexport function deleteRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: EntityOperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n headers.set(\"If-Match\", isDefined(options.etag) ? `\"${options.etag}\"` : \"*\");\n\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "getFeedbackContainerUrl";
@@ -1 +1 @@
1
- {"version":3,"file":"getFeedbackContainerUrl.js","sourceRoot":"","sources":["../../../src/api/getFeedbackContainerUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,oBAAoB,CAAC;QAE1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC,UAAW,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getFeedbackContainerUrl\";\n\n/**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param context - The Notification Hubs client.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\nexport function getFeedbackContainerUrl(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/feedbackcontainer\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return response.bodyAsText!;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getFeedbackContainerUrl.js","sourceRoot":"","sources":["../../../src/api/getFeedbackContainerUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,oBAAoB,CAAC;QAE1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC,UAAW,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getFeedbackContainerUrl\";\n\n/**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param context - The Notification Hubs client.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\nexport function getFeedbackContainerUrl(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/feedbackcontainer\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return response.bodyAsText!;\n },\n );\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { tracingClient } from "../utils/tracing.js";
5
5
  const OPERATION_NAME = "getInstallation";
@@ -1 +1 @@
1
- {"version":3,"file":"getInstallation.js","sourceRoot":"","sources":["../../../src/api/getInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAW,CAAiB,CAAC;IAC1D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getInstallation\";\n\n/**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\nexport function getInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<Installation> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return JSON.parse(response.bodyAsText!) as Installation;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getInstallation.js","sourceRoot":"","sources":["../../../src/api/getInstallation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAW,CAAiB,CAAC;IAC1D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getInstallation\";\n\n/**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\nexport function getInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<Installation> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return JSON.parse(response.bodyAsText!) as Installation;\n },\n );\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { parseNotificationHubJobEntry } from "../serializers/notificationHubJobSerializer.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"getNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/getNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAsC,EACtC,KAAa,EACb,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,SAAS,KAAK,EAAE,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,4BAA4B,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobEntry } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationHubJob\";\n\n/**\n * Gets a Notification Hub Job by the ID.\n * @param context - The Notification Hubs client.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\nexport function getNotificationHubJob(\n context: NotificationHubsClientContext,\n jobId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/jobs/${jobId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/getNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAsC,EACtC,KAAa,EACb,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,SAAS,KAAK,EAAE,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,4BAA4B,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobEntry } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationHubJob\";\n\n/**\n * Gets a Notification Hub Job by the ID.\n * @param context - The Notification Hubs client.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\nexport function getNotificationHubJob(\n context: NotificationHubsClientContext,\n jobId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/jobs/${jobId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { parseNotificationDetails } from "../serializers/notificationDetailsSerializer.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"getNotificationOutcomeDetails.js","sourceRoot":"","sources":["../../../src/api/getNotificationOutcomeDetails.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,aAAa,cAAc,EAAE,CAAC;QAEnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,wBAAwB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationDetails } from \"../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationDetails } from \"../serializers/notificationDetailsSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationOutcomeDetails\";\n\n/**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\nexport function getNotificationOutcomeDetails(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationDetails> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/messages/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationDetails(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getNotificationOutcomeDetails.js","sourceRoot":"","sources":["../../../src/api/getNotificationOutcomeDetails.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,aAAa,cAAc,EAAE,CAAC;QAEnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,wBAAwB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationDetails } from \"../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationDetails } from \"../serializers/notificationDetailsSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationOutcomeDetails\";\n\n/**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\nexport function getNotificationOutcomeDetails(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationDetails> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/messages/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationDetails(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { registrationDescriptionParser } from "../serializers/registrationSerializer.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"getRegistration.js","sourceRoot":"","sources":["../../../src/api/getRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,6BAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACpF,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getRegistration\";\n\n/**\n * Gets a registration by the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\nexport function getRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getRegistration.js","sourceRoot":"","sources":["../../../src/api/getRegistration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,6BAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACpF,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getRegistration\";\n\n/**\n * Gets a registration by the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\nexport function getRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export * from "./clientContext.js";
4
4
  export * from "./beginSubmitNotificationHubJob.js";
5
5
  export * from "./cancelScheduledNotification.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport * from \"./clientContext.js\";\nexport * from \"./beginSubmitNotificationHubJob.js\";\nexport * from \"./cancelScheduledNotification.js\";\nexport * from \"./createOrUpdateInstallation.js\";\nexport * from \"./createOrUpdateRegistration.js\";\nexport * from \"./createRegistration.js\";\nexport * from \"./createRegistrationId.js\";\nexport * from \"./deleteInstallation.js\";\nexport * from \"./deleteRegistration.js\";\nexport * from \"./getFeedbackContainerUrl.js\";\nexport * from \"./getInstallation.js\";\nexport * from \"./getNotificationHubJob.js\";\nexport * from \"./getNotificationOutcomeDetails.js\";\nexport * from \"./getRegistration.js\";\nexport * from \"./listNotificationHubJobs.js\";\nexport * from \"./listRegistrations.js\";\nexport * from \"./listRegistrationsByChannel.js\";\nexport * from \"./listRegistrationsByTag.js\";\nexport * from \"./scheduleNotification.js\";\nexport * from \"./sendNotification.js\";\nexport * from \"./submitNotificationHubJob.js\";\nexport * from \"./updateInstallation.js\";\nexport * from \"./updateRegistration.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./clientContext.js\";\nexport * from \"./beginSubmitNotificationHubJob.js\";\nexport * from \"./cancelScheduledNotification.js\";\nexport * from \"./createOrUpdateInstallation.js\";\nexport * from \"./createOrUpdateRegistration.js\";\nexport * from \"./createRegistration.js\";\nexport * from \"./createRegistrationId.js\";\nexport * from \"./deleteInstallation.js\";\nexport * from \"./deleteRegistration.js\";\nexport * from \"./getFeedbackContainerUrl.js\";\nexport * from \"./getInstallation.js\";\nexport * from \"./getNotificationHubJob.js\";\nexport * from \"./getNotificationOutcomeDetails.js\";\nexport * from \"./getRegistration.js\";\nexport * from \"./listNotificationHubJobs.js\";\nexport * from \"./listRegistrations.js\";\nexport * from \"./listRegistrationsByChannel.js\";\nexport * from \"./listRegistrationsByTag.js\";\nexport * from \"./scheduleNotification.js\";\nexport * from \"./sendNotification.js\";\nexport * from \"./submitNotificationHubJob.js\";\nexport * from \"./updateInstallation.js\";\nexport * from \"./updateRegistration.js\";\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 { RestError, createPipelineRequest, } from "@azure/core-rest-pipeline";
4
4
  import { isDefined } from "../../utils/utils.js";
5
5
  import { parseNotificationOutcome } from "../../serializers/notificationOutcomeSerializer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"_client.js","sourceRoot":"","sources":["../../../../src/api/internal/_client.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAKL,SAAS,EACT,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,UAAU,aAAa,CAC3B,QAAa,EACb,MAAmB,EACnB,OAAoB,EACpB,OAAyB;IAEzB,OAAO,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ACN,YAAY,GAAG,gCAAgC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACnE,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,YAAY,EAAE;YAChC,UAAU,EAAE,QAAQ,CAAC,MAAM;YAC3B,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n HttpHeaders,\n HttpMethods,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createPipelineRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"../../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { isDefined } from \"../../utils/utils.js\";\nimport { parseNotificationOutcome } from \"../../serializers/notificationOutcomeSerializer.js\";\nimport { parseXMLError } from \"../../utils/xmlUtils.js\";\n\nexport function createRequest(\n endpoint: URL,\n method: HttpMethods,\n headers: HttpHeaders,\n options: OperationOptions,\n): PipelineRequest {\n return createPipelineRequest({\n ...options.tracingOptions,\n ...options.requestOptions,\n url: endpoint.toString(),\n abortSignal: options.abortSignal,\n method,\n headers,\n });\n}\n\n/**\n * Parses the HTTP response and creates a NotificationHubsResponse with header information from the operation.\n * @param response - The HTTP response used to populate the result.\n * @returns A NotificationHubsResponse with header information from the operation.\n */\nexport function parseNotificationResponse(response: PipelineResponse): NotificationHubsResponse {\n const correlationId = response.headers.get(\"x-ms-correlation-request-id\");\n const trackingId = response.headers.get(\"TrackingId\");\n const location = response.headers.get(\"Location\");\n\n return {\n correlationId,\n trackingId,\n location,\n };\n}\n\n/**\n * Parses the HTTP response and creates a NotificationHubsMessageResponse with results from the notification.\n * @param response - The HTTP response used to populate the result.\n * @returns A NotificationHubsMessageResponse with results from the notification.\n */\nexport async function parseNotificationSendResponse(\n response: PipelineResponse,\n): Promise<NotificationHubsMessageResponse> {\n const result = parseNotificationResponse(response);\n let notificationId: string | undefined;\n if (result.location) {\n const locationUrl = new URL(result.location);\n notificationId = locationUrl.pathname.split(\"/\")[3];\n }\n\n const requestUrl = new URL(response.request.url);\n const isTestSend = requestUrl.searchParams.has(\"test\");\n const isDirectSend = requestUrl.searchParams.has(\"direct\");\n\n // Only broadcast/tag based sends are supported for test send\n const responseBody = response.bodyAsText;\n if (isTestSend && !isDirectSend && isDefined(responseBody)) {\n const outcome = await parseNotificationOutcome(responseBody);\n return {\n ...result,\n ...outcome,\n notificationId,\n };\n } else {\n return createDefaultResponse(result, notificationId);\n }\n}\n\nfunction createDefaultResponse(\n response: NotificationHubsResponse,\n notificationId?: string,\n): NotificationHubsMessageResponse {\n return {\n ...response,\n notificationId,\n successCount: 0,\n failureCount: 0,\n results: [],\n state: \"Enqueued\",\n };\n}\n\n/**\n * Sends a request through the client context.\n * @param context - The client context to use.\n * @param request - The HTTP request to send.\n * @param successStatusCode - A status code or list of status codes to check for success.\n * @returns The HTTP Response.\n */\nexport async function sendRequest(\n context: NotificationHubsClientContext,\n request: PipelineRequest,\n successStatusCode: number | number[],\n): Promise<PipelineResponse> {\n const statuses: number[] = Array.isArray(successStatusCode)\n ? successStatusCode\n : [successStatusCode];\n\n const response = await context.sendRequest(request);\n\n if (!statuses.some((statusCode) => statusCode === response.status)) {\n const responseBody = response.bodyAsText;\n let details: string | undefined;\n if (isDefined(responseBody)) {\n details = await parseXMLError(responseBody);\n }\n\n let errorMessage: string | undefined;\n if (isDefined(details)) {\n errorMessage = `operations failed with: ${details}`;\n } else {\n errorMessage = `operation failed with status ${response.status}`;\n }\n\n throw new RestError(errorMessage, {\n statusCode: response.status,\n response,\n });\n }\n\n return response;\n}\n"]}
1
+ {"version":3,"file":"_client.js","sourceRoot":"","sources":["../../../../src/api/internal/_client.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAKL,SAAS,EACT,qBAAqB,GACtB,MAAM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C;QAChC,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;YAC5B,OAAO,GAAG,MAAM,aAAa,CAAC,YAAY,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,YAAgC,CAAC;QACrC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YACvB,YAAY,GAAG,2BAA2B,OAAO,EAAE,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,YAAY,GAAG,gCAAgC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACnE,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,YAAY,EAAE;YAChC,UAAU,EAAE,QAAQ,CAAC,MAAM;YAC3B,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n HttpHeaders,\n HttpMethods,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createPipelineRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n NotificationHubsMessageResponse,\n NotificationHubsResponse,\n} from \"../../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { isDefined } from \"../../utils/utils.js\";\nimport { parseNotificationOutcome } from \"../../serializers/notificationOutcomeSerializer.js\";\nimport { parseXMLError } from \"../../utils/xmlUtils.js\";\n\nexport function createRequest(\n endpoint: URL,\n method: HttpMethods,\n headers: HttpHeaders,\n options: OperationOptions,\n): PipelineRequest {\n return createPipelineRequest({\n ...options.tracingOptions,\n ...options.requestOptions,\n url: endpoint.toString(),\n abortSignal: options.abortSignal,\n method,\n headers,\n });\n}\n\n/**\n * Parses the HTTP response and creates a NotificationHubsResponse with header information from the operation.\n * @param response - The HTTP response used to populate the result.\n * @returns A NotificationHubsResponse with header information from the operation.\n */\nexport function parseNotificationResponse(response: PipelineResponse): NotificationHubsResponse {\n const correlationId = response.headers.get(\"x-ms-correlation-request-id\");\n const trackingId = response.headers.get(\"TrackingId\");\n const location = response.headers.get(\"Location\");\n\n return {\n correlationId,\n trackingId,\n location,\n };\n}\n\n/**\n * Parses the HTTP response and creates a NotificationHubsMessageResponse with results from the notification.\n * @param response - The HTTP response used to populate the result.\n * @returns A NotificationHubsMessageResponse with results from the notification.\n */\nexport async function parseNotificationSendResponse(\n response: PipelineResponse,\n): Promise<NotificationHubsMessageResponse> {\n const result = parseNotificationResponse(response);\n let notificationId: string | undefined;\n if (result.location) {\n const locationUrl = new URL(result.location);\n notificationId = locationUrl.pathname.split(\"/\")[3];\n }\n\n const requestUrl = new URL(response.request.url);\n const isTestSend = requestUrl.searchParams.has(\"test\");\n const isDirectSend = requestUrl.searchParams.has(\"direct\");\n\n // Only broadcast/tag based sends are supported for test send\n const responseBody = response.bodyAsText;\n if (isTestSend && !isDirectSend && isDefined(responseBody)) {\n const outcome = await parseNotificationOutcome(responseBody);\n return {\n ...result,\n ...outcome,\n notificationId,\n };\n } else {\n return createDefaultResponse(result, notificationId);\n }\n}\n\nfunction createDefaultResponse(\n response: NotificationHubsResponse,\n notificationId?: string,\n): NotificationHubsMessageResponse {\n return {\n ...response,\n notificationId,\n successCount: 0,\n failureCount: 0,\n results: [],\n state: \"Enqueued\",\n };\n}\n\n/**\n * Sends a request through the client context.\n * @param context - The client context to use.\n * @param request - The HTTP request to send.\n * @param successStatusCode - A status code or list of status codes to check for success.\n * @returns The HTTP Response.\n */\nexport async function sendRequest(\n context: NotificationHubsClientContext,\n request: PipelineRequest,\n successStatusCode: number | number[],\n): Promise<PipelineResponse> {\n const statuses: number[] = Array.isArray(successStatusCode)\n ? successStatusCode\n : [successStatusCode];\n\n const response = await context.sendRequest(request);\n\n if (!statuses.some((statusCode) => statusCode === response.status)) {\n const responseBody = response.bodyAsText;\n let details: string | undefined;\n if (isDefined(responseBody)) {\n details = await parseXMLError(responseBody);\n }\n\n let errorMessage: string | undefined;\n if (isDefined(details)) {\n errorMessage = `operations failed with: ${details}`;\n } else {\n errorMessage = `operation failed with status ${response.status}`;\n }\n\n throw new RestError(errorMessage, {\n statusCode: response.status,\n response,\n });\n }\n\n return response;\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./_client.js";
4
4
  import { registrationDescriptionParser, registrationDescriptionSerializer, } from "../../serializers/registrationSerializer.js";
5
5
  import { isDefined } from "../../utils/utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"_createOrUpdateRegistrationDescription.js","sourceRoot":"","sources":["../../../../src/api/internal/_createOrUpdateRegistrationDescription.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,OAAsC,EACtC,YAAqC,EACrC,aAAqD,EACrD,OAAyB;IAEzB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,IAAI,gBAAgB,CAAC;IACtC,IAAI,UAAU,GAAgB,MAAM,CAAC;IAErC,IAAI,aAAa,KAAK,gBAAgB,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;QACrE,QAAQ,CAAC,QAAQ,IAAI,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;QACvD,UAAU,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;IAE/B,gCAAgC;IAChC,YAAY,CAAC,cAAc,GAAG,SAAS,CAAC;IACxC,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;IAE9B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,cAAc,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;IAE7E,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,GAAG,iCAAiC,CAAC,gCAAgC,CAAC,YAAY,CAAC,CAAC;IAChG,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAEjE,OAAO,6BAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;AACpF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./_client.js\";\nimport {\n registrationDescriptionParser,\n registrationDescriptionSerializer,\n} from \"../../serializers/registrationSerializer.js\";\nimport { HttpMethods } from \"@azure/core-rest-pipeline\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../../models/registration.js\";\nimport { isDefined } from \"../../utils/utils.js\";\n\n/**\n * @internal\n */\nexport async function createOrUpdateRegistrationDescription(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n operationName: \"create\" | \"createOrUpdate\" | \"update\",\n options: OperationOptions,\n): Promise<RegistrationDescription> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n let httpMethod: HttpMethods = \"POST\";\n\n if (operationName === \"createOrUpdate\" || operationName === \"update\") {\n endpoint.pathname += `/${registration.registrationId}`;\n httpMethod = \"PUT\";\n }\n\n const etag = registration.etag;\n\n // Clear out readonly properties\n registration.registrationId = undefined;\n registration.etag = undefined;\n\n const headers = await context.createHeaders(`${operationName}Registration`);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n if (operationName === \"update\") {\n headers.set(\"If-Match\", isDefined(etag) ? `\"${etag}\"` : \"*\");\n }\n\n const request = createRequest(endpoint, httpMethod, headers, options);\n request.body = registrationDescriptionSerializer.serializeRegistrationDescription(registration);\n const response = await sendRequest(context, request, [200, 201]);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n}\n"]}
1
+ {"version":3,"file":"_createOrUpdateRegistrationDescription.js","sourceRoot":"","sources":["../../../../src/api/internal/_createOrUpdateRegistrationDescription.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,OAAsC,EACtC,YAAqC,EACrC,aAAqD,EACrD,OAAyB;IAEzB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,IAAI,gBAAgB,CAAC;IACtC,IAAI,UAAU,GAAgB,MAAM,CAAC;IAErC,IAAI,aAAa,KAAK,gBAAgB,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;QACrE,QAAQ,CAAC,QAAQ,IAAI,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;QACvD,UAAU,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;IAE/B,gCAAgC;IAChC,YAAY,CAAC,cAAc,GAAG,SAAS,CAAC;IACxC,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;IAE9B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,cAAc,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;IAE7E,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,GAAG,iCAAiC,CAAC,gCAAgC,CAAC,YAAY,CAAC,CAAC;IAChG,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAEjE,OAAO,6BAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;AACpF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./_client.js\";\nimport {\n registrationDescriptionParser,\n registrationDescriptionSerializer,\n} from \"../../serializers/registrationSerializer.js\";\nimport { HttpMethods } from \"@azure/core-rest-pipeline\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../../models/registration.js\";\nimport { isDefined } from \"../../utils/utils.js\";\n\n/**\n * @internal\n */\nexport async function createOrUpdateRegistrationDescription(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n operationName: \"create\" | \"createOrUpdate\" | \"update\",\n options: OperationOptions,\n): Promise<RegistrationDescription> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n let httpMethod: HttpMethods = \"POST\";\n\n if (operationName === \"createOrUpdate\" || operationName === \"update\") {\n endpoint.pathname += `/${registration.registrationId}`;\n httpMethod = \"PUT\";\n }\n\n const etag = registration.etag;\n\n // Clear out readonly properties\n registration.registrationId = undefined;\n registration.etag = undefined;\n\n const headers = await context.createHeaders(`${operationName}Registration`);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n if (operationName === \"update\") {\n headers.set(\"If-Match\", isDefined(etag) ? `\"${etag}\"` : \"*\");\n }\n\n const request = createRequest(endpoint, httpMethod, headers, options);\n request.body = registrationDescriptionSerializer.serializeRegistrationDescription(registration);\n const response = await sendRequest(context, request, [200, 201]);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n}\n"]}
@@ -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 { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
4
4
  import { createRequest, sendRequest } from "./_client.js";
5
5
  import { registrationDescriptionParser } from "../../serializers/registrationSerializer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"_listRegistrations.js","sourceRoot":"","sources":["../../../../src/api/internal/_listRegistrations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,MAAM,UAAiB,oBAAoB,CACzC,OAAsC,EACtC,OAAiC;;;;YAEjC,KAAyB,eAAA,KAAA,cAAA,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA,IAAA,+DAAE,CAAC;gBAA/C,cAA4C;gBAA5C,WAA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E,iBAAiB,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAE1D,MAAM,aAAa,GAAG,MAAM,6BAA6B,CAAC,qBAAqB,CAC7E,QAAQ,CAAC,UAAW,CACrB,CAAC;IACF,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACjE,OAAO;QACL,aAAa;QACb,iBAAiB,EAAE,SAAS;KAC7B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./_client.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { RegistrationDescription } from \"../../models/registration.js\";\nimport { RegistrationQueryOptions } from \"../../models/options.js\";\nimport { RegistrationQueryResponse } from \"../../models/response.js\";\nimport { registrationDescriptionParser } from \"../../serializers/registrationSerializer.js\";\n\nexport async function* listRegistrationsAll(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationPagingPage(context, options)) {\n yield* page;\n }\n}\n\nexport async function* listRegistrationPagingPage(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrations(context, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrations(context, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n continuationToken?: string,\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (options.filter !== undefined) {\n endpoint.searchParams.set(\"$filter\", options.filter);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = await context.createHeaders(\"listRegistrations\");\n const request = createRequest(endpoint, \"GET\", headers, options);\n const response = await sendRequest(context, request, 200);\n\n const registrations = await registrationDescriptionParser.parseRegistrationFeed(\n response.bodyAsText!,\n );\n const nextToken = response.headers.get(\"x-ms-continuationtoken\");\n return {\n registrations,\n continuationToken: nextToken,\n };\n}\n"]}
1
+ {"version":3,"file":"_listRegistrations.js","sourceRoot":"","sources":["../../../../src/api/internal/_listRegistrations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,MAAM,UAAiB,oBAAoB,CACzC,OAAsC,EACtC,OAAiC;;;;YAEjC,KAAyB,eAAA,KAAA,cAAA,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA,IAAA,+DAAE,CAAC;gBAA/C,cAA4C;gBAA5C,WAA4C;gBAA1D,MAAM,IAAI,KAAA,CAAA;gBACnB,cAAA,KAAK,CAAC,CAAC,iBAAA,cAAA,IAAI,CAAA,CAAA,CAAA,CAAC;YACd,CAAC;;;;;;;;;IACH,CAAC;CAAA;AAED,MAAM,UAAiB,0BAA0B,CAC/C,OAAsC,EACtC,OAAiC;;QAEjC,IAAI,MAAM,GAAG,cAAM,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA,CAAC;QACxD,oBAAM,MAAM,CAAC,aAAa,IAAI,EAAE,CAAA,CAAC;QACjC,IAAI,iBAAiB,G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AW,CACrB,CAAC;IACF,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACjE,OAAO;QACL,aAAa;QACb,iBAAiB,EAAE,SAAS;KAC7B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./_client.js\";\nimport { NotificationHubsClientContext } from \"../index.js\";\nimport { RegistrationDescription } from \"../../models/registration.js\";\nimport { RegistrationQueryOptions } from \"../../models/options.js\";\nimport { RegistrationQueryResponse } from \"../../models/response.js\";\nimport { registrationDescriptionParser } from \"../../serializers/registrationSerializer.js\";\n\nexport async function* listRegistrationsAll(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationPagingPage(context, options)) {\n yield* page;\n }\n}\n\nexport async function* listRegistrationPagingPage(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrations(context, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrations(context, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryOptions,\n continuationToken?: string,\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrations\";\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (options.filter !== undefined) {\n endpoint.searchParams.set(\"$filter\", options.filter);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = await context.createHeaders(\"listRegistrations\");\n const request = createRequest(endpoint, \"GET\", headers, options);\n const response = await sendRequest(context, request, 200);\n\n const registrations = await registrationDescriptionParser.parseRegistrationFeed(\n response.bodyAsText!,\n );\n const nextToken = response.headers.get(\"x-ms-continuationtoken\");\n return {\n registrations,\n continuationToken: nextToken,\n };\n}\n"]}
@@ -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 { createRequest, sendRequest } from "./internal/_client.js";
4
4
  import { parseNotificationHubJobFeed } from "../serializers/notificationHubJobSerializer.js";
5
5
  import { tracingClient } from "../utils/tracing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"listNotificationHubJobs.js","sourceRoot":"","sources":["../../../src/api/listNotificationHubJobs.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC;QAE7B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,2BAA2B,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC3D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobFeed } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"listNotificationHubJobs\";\n\n/**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param context - The Notification Hubs client.xs\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\nexport function listNotificationHubJobs(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<NotificationHubJob[]> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/jobs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobFeed(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"listNotificationHubJobs.js","sourceRoot":"","sources":["../../../src/api/listNotificationHubJobs.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC;QAE7B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,2BAA2B,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC3D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobFeed } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"listNotificationHubJobs\";\n\n/**\n * Gets all Notification Hub Jobs for this Notification Hub.\n * @param context - The Notification Hubs client.xs\n * @param options - The operation options.\n * @returns An array of all Notification Hub Jobs for this Notification Hub.\n */\nexport function listNotificationHubJobs(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<NotificationHubJob[]> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/jobs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobFeed(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -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 { tracingClient } from "../utils/tracing.js";
4
4
  import { listRegistrationPagingPage, listRegistrationsAll } from "./internal/_listRegistrations.js";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"listRegistrations.js","sourceRoot":"","sources":["../../../src/api/listRegistrations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAAsC,EACtC,UAAyC,EAAE;IAE3C,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CACtD,iDAAiD,EACjD,OAAO,CACR,CAAC;IACF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO,0BAA0B,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAC7D,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,CAAC,CAAC;IACV,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,GAAG,EAAE,CAAC;IACb,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\nimport { listRegistrationPagingPage, listRegistrationsAll } from \"./internal/_listRegistrations.js\";\n\n/**\n * Gets all registrations for the notification hub with the given query options.\n * @param context - The Notification Hubs client.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\nexport function listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext.listRegistrations\",\n options,\n );\n try {\n const iter = listRegistrationsAll(context, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationPagingPage(context, updatedOptions);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n"]}
1
+ {"version":3,"file":"listRegistrations.js","sourceRoot":"","sources":["../../../src/api/listRegistrations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAAsC,EACtC,UAAyC,EAAE;IAE3C,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CACtD,iDAAiD,EACjD,OAAO,CACR,CAAC;IACF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO,0BAA0B,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAC7D,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,CAAC,CAAC;IACV,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,GAAG,EAAE,CAAC;IACb,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\nimport { listRegistrationPagingPage, listRegistrationsAll } from \"./internal/_listRegistrations.js\";\n\n/**\n * Gets all registrations for the notification hub with the given query options.\n * @param context - The Notification Hubs client.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\nexport function listRegistrations(\n context: NotificationHubsClientContext,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext.listRegistrations\",\n options,\n );\n try {\n const iter = listRegistrationsAll(context, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationPagingPage(context, updatedOptions);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n"]}