@azure/notification-hubs 2.0.1-alpha.20241029.1 → 2.0.1-alpha.20241030.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.
- package/dist/api/notification-hubs.d.ts +8 -8
- package/dist/browser/api/beginSubmitNotificationHubJob.d.ts +3 -3
- package/dist/browser/api/beginSubmitNotificationHubJob.d.ts.map +1 -1
- package/dist/browser/api/beginSubmitNotificationHubJob.js.map +1 -1
- package/dist/browser/api/cancelScheduledNotification.d.ts +3 -3
- package/dist/browser/api/cancelScheduledNotification.d.ts.map +1 -1
- package/dist/browser/api/cancelScheduledNotification.js.map +1 -1
- package/dist/browser/api/clientContext.d.ts +2 -2
- package/dist/browser/api/clientContext.d.ts.map +1 -1
- package/dist/browser/api/clientContext.js +1 -1
- package/dist/browser/api/clientContext.js.map +1 -1
- package/dist/browser/api/createOrUpdateInstallation.d.ts +4 -4
- package/dist/browser/api/createOrUpdateInstallation.d.ts.map +1 -1
- package/dist/browser/api/createOrUpdateInstallation.js.map +1 -1
- package/dist/browser/api/createOrUpdateRegistration.d.ts +3 -3
- package/dist/browser/api/createOrUpdateRegistration.d.ts.map +1 -1
- package/dist/browser/api/createOrUpdateRegistration.js.map +1 -1
- package/dist/browser/api/createRegistration.d.ts +3 -3
- package/dist/browser/api/createRegistration.d.ts.map +1 -1
- package/dist/browser/api/createRegistration.js.map +1 -1
- package/dist/browser/api/createRegistrationId.d.ts +2 -2
- package/dist/browser/api/createRegistrationId.d.ts.map +1 -1
- package/dist/browser/api/createRegistrationId.js.map +1 -1
- package/dist/browser/api/deleteInstallation.d.ts +3 -3
- package/dist/browser/api/deleteInstallation.d.ts.map +1 -1
- package/dist/browser/api/deleteInstallation.js.map +1 -1
- package/dist/browser/api/deleteRegistration.d.ts +3 -3
- package/dist/browser/api/deleteRegistration.d.ts.map +1 -1
- package/dist/browser/api/deleteRegistration.js.map +1 -1
- package/dist/browser/api/getFeedbackContainerUrl.d.ts +2 -2
- package/dist/browser/api/getFeedbackContainerUrl.d.ts.map +1 -1
- package/dist/browser/api/getFeedbackContainerUrl.js.map +1 -1
- package/dist/browser/api/getInstallation.d.ts +3 -3
- package/dist/browser/api/getInstallation.d.ts.map +1 -1
- package/dist/browser/api/getInstallation.js.map +1 -1
- package/dist/browser/api/getNotificationHubJob.d.ts +3 -3
- package/dist/browser/api/getNotificationHubJob.d.ts.map +1 -1
- package/dist/browser/api/getNotificationHubJob.js.map +1 -1
- package/dist/browser/api/getNotificationOutcomeDetails.d.ts +3 -3
- package/dist/browser/api/getNotificationOutcomeDetails.d.ts.map +1 -1
- package/dist/browser/api/getNotificationOutcomeDetails.js.map +1 -1
- package/dist/browser/api/getRegistration.d.ts +3 -3
- package/dist/browser/api/getRegistration.d.ts.map +1 -1
- package/dist/browser/api/getRegistration.js.map +1 -1
- package/dist/browser/api/internal/_client.d.ts +4 -4
- package/dist/browser/api/internal/_client.d.ts.map +1 -1
- package/dist/browser/api/internal/_client.js +1 -1
- package/dist/browser/api/internal/_client.js.map +1 -1
- package/dist/browser/api/internal/_createOrUpdateRegistrationDescription.d.ts +3 -3
- package/dist/browser/api/internal/_createOrUpdateRegistrationDescription.d.ts.map +1 -1
- package/dist/browser/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
- package/dist/browser/api/internal/_listRegistrations.d.ts +3 -3
- package/dist/browser/api/internal/_listRegistrations.d.ts.map +1 -1
- package/dist/browser/api/internal/_listRegistrations.js.map +1 -1
- package/dist/browser/api/internal/_scheduleNotification.d.ts +4 -4
- package/dist/browser/api/internal/_scheduleNotification.d.ts.map +1 -1
- package/dist/browser/api/internal/_scheduleNotification.js.map +1 -1
- package/dist/browser/api/internal/_sendNotification.d.ts +4 -4
- package/dist/browser/api/internal/_sendNotification.d.ts.map +1 -1
- package/dist/browser/api/internal/_sendNotification.js.map +1 -1
- package/dist/browser/api/listNotificationHubJobs.d.ts +3 -3
- package/dist/browser/api/listNotificationHubJobs.d.ts.map +1 -1
- package/dist/browser/api/listNotificationHubJobs.js.map +1 -1
- package/dist/browser/api/listRegistrations.d.ts +4 -4
- package/dist/browser/api/listRegistrations.d.ts.map +1 -1
- package/dist/browser/api/listRegistrations.js.map +1 -1
- package/dist/browser/api/listRegistrationsByChannel.d.ts +4 -4
- package/dist/browser/api/listRegistrationsByChannel.d.ts.map +1 -1
- package/dist/browser/api/listRegistrationsByChannel.js.map +1 -1
- package/dist/browser/api/listRegistrationsByTag.d.ts +4 -4
- package/dist/browser/api/listRegistrationsByTag.d.ts.map +1 -1
- package/dist/browser/api/listRegistrationsByTag.js.map +1 -1
- package/dist/browser/api/scheduleBroadcastNotification.d.ts +4 -4
- package/dist/browser/api/scheduleBroadcastNotification.d.ts.map +1 -1
- package/dist/browser/api/scheduleBroadcastNotification.js.map +1 -1
- package/dist/browser/api/scheduleNotification.d.ts +4 -4
- package/dist/browser/api/scheduleNotification.d.ts.map +1 -1
- package/dist/browser/api/scheduleNotification.js.map +1 -1
- package/dist/browser/api/sendBroadcastNotification.d.ts +4 -4
- package/dist/browser/api/sendBroadcastNotification.d.ts.map +1 -1
- package/dist/browser/api/sendBroadcastNotification.js.map +1 -1
- package/dist/browser/api/sendNotification.d.ts +4 -4
- package/dist/browser/api/sendNotification.d.ts.map +1 -1
- package/dist/browser/api/sendNotification.js.map +1 -1
- package/dist/browser/api/submitNotificationHubJob.d.ts +3 -3
- package/dist/browser/api/submitNotificationHubJob.d.ts.map +1 -1
- package/dist/browser/api/submitNotificationHubJob.js.map +1 -1
- package/dist/browser/api/updateInstallation.d.ts +4 -4
- package/dist/browser/api/updateInstallation.d.ts.map +1 -1
- package/dist/browser/api/updateInstallation.js.map +1 -1
- package/dist/browser/api/updateRegistration.d.ts +3 -3
- package/dist/browser/api/updateRegistration.d.ts.map +1 -1
- package/dist/browser/api/updateRegistration.js.map +1 -1
- package/dist/browser/auth/sasTokenCredential.d.ts +1 -1
- package/dist/browser/auth/sasTokenCredential.d.ts.map +1 -1
- package/dist/browser/auth/sasTokenCredential.js.map +1 -1
- package/dist/browser/models/notification.d.ts +2 -2
- package/dist/browser/models/notification.d.ts.map +1 -1
- package/dist/browser/models/notification.js.map +1 -1
- package/dist/browser/models/notificationHubJob.d.ts +1 -1
- package/dist/browser/models/notificationHubJob.d.ts.map +1 -1
- package/dist/browser/models/notificationHubJob.js.map +1 -1
- package/dist/browser/models/options.d.ts +2 -2
- package/dist/browser/models/options.d.ts.map +1 -1
- package/dist/browser/models/options.js.map +1 -1
- package/dist/browser/models/response.d.ts +1 -1
- package/dist/browser/models/response.d.ts.map +1 -1
- package/dist/browser/models/response.js.map +1 -1
- package/dist/browser/notificationHubsClient.d.ts +8 -8
- package/dist/browser/notificationHubsClient.d.ts.map +1 -1
- package/dist/browser/notificationHubsClient.js.map +1 -1
- package/dist/browser/serializers/notificationDetailsSerializer.d.ts +1 -1
- package/dist/browser/serializers/notificationDetailsSerializer.d.ts.map +1 -1
- package/dist/browser/serializers/notificationDetailsSerializer.js.map +1 -1
- package/dist/browser/serializers/notificationHubJobSerializer.d.ts +1 -1
- package/dist/browser/serializers/notificationHubJobSerializer.d.ts.map +1 -1
- package/dist/browser/serializers/notificationHubJobSerializer.js.map +1 -1
- package/dist/browser/serializers/notificationOutcomeSerializer.d.ts +1 -1
- package/dist/browser/serializers/notificationOutcomeSerializer.d.ts.map +1 -1
- package/dist/browser/serializers/notificationOutcomeSerializer.js.map +1 -1
- package/dist/browser/serializers/registrationSerializer.d.ts +1 -1
- package/dist/browser/serializers/registrationSerializer.d.ts.map +1 -1
- package/dist/browser/serializers/registrationSerializer.js.map +1 -1
- package/dist/browser/utils/notificationUtils.d.ts +1 -1
- package/dist/browser/utils/notificationUtils.d.ts.map +1 -1
- package/dist/browser/utils/notificationUtils.js.map +1 -1
- package/dist/browser/utils/optionUtils.d.ts +1 -1
- package/dist/browser/utils/optionUtils.d.ts.map +1 -1
- package/dist/browser/utils/optionUtils.js.map +1 -1
- package/dist/browser/utils/registrationUtils.d.ts +1 -1
- package/dist/browser/utils/registrationUtils.d.ts.map +1 -1
- package/dist/browser/utils/registrationUtils.js.map +1 -1
- package/dist/commonjs/api/beginSubmitNotificationHubJob.d.ts +3 -3
- package/dist/commonjs/api/beginSubmitNotificationHubJob.d.ts.map +1 -1
- package/dist/commonjs/api/beginSubmitNotificationHubJob.js.map +1 -1
- package/dist/commonjs/api/cancelScheduledNotification.d.ts +3 -3
- package/dist/commonjs/api/cancelScheduledNotification.d.ts.map +1 -1
- package/dist/commonjs/api/cancelScheduledNotification.js.map +1 -1
- package/dist/commonjs/api/clientContext.d.ts +2 -2
- package/dist/commonjs/api/clientContext.d.ts.map +1 -1
- package/dist/commonjs/api/clientContext.js.map +1 -1
- package/dist/commonjs/api/createOrUpdateInstallation.d.ts +4 -4
- package/dist/commonjs/api/createOrUpdateInstallation.d.ts.map +1 -1
- package/dist/commonjs/api/createOrUpdateInstallation.js.map +1 -1
- package/dist/commonjs/api/createOrUpdateRegistration.d.ts +3 -3
- package/dist/commonjs/api/createOrUpdateRegistration.d.ts.map +1 -1
- package/dist/commonjs/api/createOrUpdateRegistration.js.map +1 -1
- package/dist/commonjs/api/createRegistration.d.ts +3 -3
- package/dist/commonjs/api/createRegistration.d.ts.map +1 -1
- package/dist/commonjs/api/createRegistration.js.map +1 -1
- package/dist/commonjs/api/createRegistrationId.d.ts +2 -2
- package/dist/commonjs/api/createRegistrationId.d.ts.map +1 -1
- package/dist/commonjs/api/createRegistrationId.js.map +1 -1
- package/dist/commonjs/api/deleteInstallation.d.ts +3 -3
- package/dist/commonjs/api/deleteInstallation.d.ts.map +1 -1
- package/dist/commonjs/api/deleteInstallation.js.map +1 -1
- package/dist/commonjs/api/deleteRegistration.d.ts +3 -3
- package/dist/commonjs/api/deleteRegistration.d.ts.map +1 -1
- package/dist/commonjs/api/deleteRegistration.js.map +1 -1
- package/dist/commonjs/api/getFeedbackContainerUrl.d.ts +2 -2
- package/dist/commonjs/api/getFeedbackContainerUrl.d.ts.map +1 -1
- package/dist/commonjs/api/getFeedbackContainerUrl.js.map +1 -1
- package/dist/commonjs/api/getInstallation.d.ts +3 -3
- package/dist/commonjs/api/getInstallation.d.ts.map +1 -1
- package/dist/commonjs/api/getInstallation.js.map +1 -1
- package/dist/commonjs/api/getNotificationHubJob.d.ts +3 -3
- package/dist/commonjs/api/getNotificationHubJob.d.ts.map +1 -1
- package/dist/commonjs/api/getNotificationHubJob.js.map +1 -1
- package/dist/commonjs/api/getNotificationOutcomeDetails.d.ts +3 -3
- package/dist/commonjs/api/getNotificationOutcomeDetails.d.ts.map +1 -1
- package/dist/commonjs/api/getNotificationOutcomeDetails.js.map +1 -1
- package/dist/commonjs/api/getRegistration.d.ts +3 -3
- package/dist/commonjs/api/getRegistration.d.ts.map +1 -1
- package/dist/commonjs/api/getRegistration.js.map +1 -1
- package/dist/commonjs/api/internal/_client.d.ts +4 -4
- package/dist/commonjs/api/internal/_client.d.ts.map +1 -1
- package/dist/commonjs/api/internal/_client.js.map +1 -1
- package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.d.ts +3 -3
- package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.d.ts.map +1 -1
- package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
- package/dist/commonjs/api/internal/_listRegistrations.d.ts +3 -3
- package/dist/commonjs/api/internal/_listRegistrations.d.ts.map +1 -1
- package/dist/commonjs/api/internal/_listRegistrations.js.map +1 -1
- package/dist/commonjs/api/internal/_scheduleNotification.d.ts +4 -4
- package/dist/commonjs/api/internal/_scheduleNotification.d.ts.map +1 -1
- package/dist/commonjs/api/internal/_scheduleNotification.js.map +1 -1
- package/dist/commonjs/api/internal/_sendNotification.d.ts +4 -4
- package/dist/commonjs/api/internal/_sendNotification.d.ts.map +1 -1
- package/dist/commonjs/api/internal/_sendNotification.js.map +1 -1
- package/dist/commonjs/api/listNotificationHubJobs.d.ts +3 -3
- package/dist/commonjs/api/listNotificationHubJobs.d.ts.map +1 -1
- package/dist/commonjs/api/listNotificationHubJobs.js.map +1 -1
- package/dist/commonjs/api/listRegistrations.d.ts +4 -4
- package/dist/commonjs/api/listRegistrations.d.ts.map +1 -1
- package/dist/commonjs/api/listRegistrations.js.map +1 -1
- package/dist/commonjs/api/listRegistrationsByChannel.d.ts +4 -4
- package/dist/commonjs/api/listRegistrationsByChannel.d.ts.map +1 -1
- package/dist/commonjs/api/listRegistrationsByChannel.js.map +1 -1
- package/dist/commonjs/api/listRegistrationsByTag.d.ts +4 -4
- package/dist/commonjs/api/listRegistrationsByTag.d.ts.map +1 -1
- package/dist/commonjs/api/listRegistrationsByTag.js.map +1 -1
- package/dist/commonjs/api/scheduleBroadcastNotification.d.ts +4 -4
- package/dist/commonjs/api/scheduleBroadcastNotification.d.ts.map +1 -1
- package/dist/commonjs/api/scheduleBroadcastNotification.js.map +1 -1
- package/dist/commonjs/api/scheduleNotification.d.ts +4 -4
- package/dist/commonjs/api/scheduleNotification.d.ts.map +1 -1
- package/dist/commonjs/api/scheduleNotification.js.map +1 -1
- package/dist/commonjs/api/sendBroadcastNotification.d.ts +4 -4
- package/dist/commonjs/api/sendBroadcastNotification.d.ts.map +1 -1
- package/dist/commonjs/api/sendBroadcastNotification.js.map +1 -1
- package/dist/commonjs/api/sendNotification.d.ts +4 -4
- package/dist/commonjs/api/sendNotification.d.ts.map +1 -1
- package/dist/commonjs/api/sendNotification.js.map +1 -1
- package/dist/commonjs/api/submitNotificationHubJob.d.ts +3 -3
- package/dist/commonjs/api/submitNotificationHubJob.d.ts.map +1 -1
- package/dist/commonjs/api/submitNotificationHubJob.js.map +1 -1
- package/dist/commonjs/api/updateInstallation.d.ts +4 -4
- package/dist/commonjs/api/updateInstallation.d.ts.map +1 -1
- package/dist/commonjs/api/updateInstallation.js.map +1 -1
- package/dist/commonjs/api/updateRegistration.d.ts +3 -3
- package/dist/commonjs/api/updateRegistration.d.ts.map +1 -1
- package/dist/commonjs/api/updateRegistration.js.map +1 -1
- package/dist/commonjs/auth/sasTokenCredential.d.ts +1 -1
- package/dist/commonjs/auth/sasTokenCredential.d.ts.map +1 -1
- package/dist/commonjs/auth/sasTokenCredential.js.map +1 -1
- package/dist/commonjs/models/notification.d.ts +2 -2
- package/dist/commonjs/models/notification.d.ts.map +1 -1
- package/dist/commonjs/models/notification.js.map +1 -1
- package/dist/commonjs/models/notificationHubJob.d.ts +1 -1
- package/dist/commonjs/models/notificationHubJob.d.ts.map +1 -1
- package/dist/commonjs/models/notificationHubJob.js.map +1 -1
- package/dist/commonjs/models/options.d.ts +2 -2
- package/dist/commonjs/models/options.d.ts.map +1 -1
- package/dist/commonjs/models/options.js.map +1 -1
- package/dist/commonjs/models/response.d.ts +1 -1
- package/dist/commonjs/models/response.d.ts.map +1 -1
- package/dist/commonjs/models/response.js.map +1 -1
- package/dist/commonjs/notificationHubsClient.d.ts +8 -8
- package/dist/commonjs/notificationHubsClient.d.ts.map +1 -1
- package/dist/commonjs/notificationHubsClient.js.map +1 -1
- package/dist/commonjs/serializers/notificationDetailsSerializer.d.ts +1 -1
- package/dist/commonjs/serializers/notificationDetailsSerializer.d.ts.map +1 -1
- package/dist/commonjs/serializers/notificationDetailsSerializer.js.map +1 -1
- package/dist/commonjs/serializers/notificationHubJobSerializer.d.ts +1 -1
- package/dist/commonjs/serializers/notificationHubJobSerializer.d.ts.map +1 -1
- package/dist/commonjs/serializers/notificationHubJobSerializer.js.map +1 -1
- package/dist/commonjs/serializers/notificationOutcomeSerializer.d.ts +1 -1
- package/dist/commonjs/serializers/notificationOutcomeSerializer.d.ts.map +1 -1
- package/dist/commonjs/serializers/notificationOutcomeSerializer.js.map +1 -1
- package/dist/commonjs/serializers/registrationSerializer.d.ts +1 -1
- package/dist/commonjs/serializers/registrationSerializer.d.ts.map +1 -1
- package/dist/commonjs/serializers/registrationSerializer.js.map +1 -1
- package/dist/commonjs/utils/notificationUtils.d.ts +1 -1
- package/dist/commonjs/utils/notificationUtils.d.ts.map +1 -1
- package/dist/commonjs/utils/notificationUtils.js.map +1 -1
- package/dist/commonjs/utils/optionUtils.d.ts +1 -1
- package/dist/commonjs/utils/optionUtils.d.ts.map +1 -1
- package/dist/commonjs/utils/optionUtils.js.map +1 -1
- package/dist/commonjs/utils/registrationUtils.d.ts +1 -1
- package/dist/commonjs/utils/registrationUtils.d.ts.map +1 -1
- package/dist/commonjs/utils/registrationUtils.js.map +1 -1
- package/dist/esm/api/beginSubmitNotificationHubJob.d.ts +3 -3
- package/dist/esm/api/beginSubmitNotificationHubJob.d.ts.map +1 -1
- package/dist/esm/api/beginSubmitNotificationHubJob.js.map +1 -1
- package/dist/esm/api/cancelScheduledNotification.d.ts +3 -3
- package/dist/esm/api/cancelScheduledNotification.d.ts.map +1 -1
- package/dist/esm/api/cancelScheduledNotification.js.map +1 -1
- package/dist/esm/api/clientContext.d.ts +2 -2
- package/dist/esm/api/clientContext.d.ts.map +1 -1
- package/dist/esm/api/clientContext.js +1 -1
- package/dist/esm/api/clientContext.js.map +1 -1
- package/dist/esm/api/createOrUpdateInstallation.d.ts +4 -4
- package/dist/esm/api/createOrUpdateInstallation.d.ts.map +1 -1
- package/dist/esm/api/createOrUpdateInstallation.js.map +1 -1
- package/dist/esm/api/createOrUpdateRegistration.d.ts +3 -3
- package/dist/esm/api/createOrUpdateRegistration.d.ts.map +1 -1
- package/dist/esm/api/createOrUpdateRegistration.js.map +1 -1
- package/dist/esm/api/createRegistration.d.ts +3 -3
- package/dist/esm/api/createRegistration.d.ts.map +1 -1
- package/dist/esm/api/createRegistration.js.map +1 -1
- package/dist/esm/api/createRegistrationId.d.ts +2 -2
- package/dist/esm/api/createRegistrationId.d.ts.map +1 -1
- package/dist/esm/api/createRegistrationId.js.map +1 -1
- package/dist/esm/api/deleteInstallation.d.ts +3 -3
- package/dist/esm/api/deleteInstallation.d.ts.map +1 -1
- package/dist/esm/api/deleteInstallation.js.map +1 -1
- package/dist/esm/api/deleteRegistration.d.ts +3 -3
- package/dist/esm/api/deleteRegistration.d.ts.map +1 -1
- package/dist/esm/api/deleteRegistration.js.map +1 -1
- package/dist/esm/api/getFeedbackContainerUrl.d.ts +2 -2
- package/dist/esm/api/getFeedbackContainerUrl.d.ts.map +1 -1
- package/dist/esm/api/getFeedbackContainerUrl.js.map +1 -1
- package/dist/esm/api/getInstallation.d.ts +3 -3
- package/dist/esm/api/getInstallation.d.ts.map +1 -1
- package/dist/esm/api/getInstallation.js.map +1 -1
- package/dist/esm/api/getNotificationHubJob.d.ts +3 -3
- package/dist/esm/api/getNotificationHubJob.d.ts.map +1 -1
- package/dist/esm/api/getNotificationHubJob.js.map +1 -1
- package/dist/esm/api/getNotificationOutcomeDetails.d.ts +3 -3
- package/dist/esm/api/getNotificationOutcomeDetails.d.ts.map +1 -1
- package/dist/esm/api/getNotificationOutcomeDetails.js.map +1 -1
- package/dist/esm/api/getRegistration.d.ts +3 -3
- package/dist/esm/api/getRegistration.d.ts.map +1 -1
- package/dist/esm/api/getRegistration.js.map +1 -1
- package/dist/esm/api/internal/_client.d.ts +4 -4
- package/dist/esm/api/internal/_client.d.ts.map +1 -1
- package/dist/esm/api/internal/_client.js +1 -1
- package/dist/esm/api/internal/_client.js.map +1 -1
- package/dist/esm/api/internal/_createOrUpdateRegistrationDescription.d.ts +3 -3
- package/dist/esm/api/internal/_createOrUpdateRegistrationDescription.d.ts.map +1 -1
- package/dist/esm/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
- package/dist/esm/api/internal/_listRegistrations.d.ts +3 -3
- package/dist/esm/api/internal/_listRegistrations.d.ts.map +1 -1
- package/dist/esm/api/internal/_listRegistrations.js.map +1 -1
- package/dist/esm/api/internal/_scheduleNotification.d.ts +4 -4
- package/dist/esm/api/internal/_scheduleNotification.d.ts.map +1 -1
- package/dist/esm/api/internal/_scheduleNotification.js.map +1 -1
- package/dist/esm/api/internal/_sendNotification.d.ts +4 -4
- package/dist/esm/api/internal/_sendNotification.d.ts.map +1 -1
- package/dist/esm/api/internal/_sendNotification.js.map +1 -1
- package/dist/esm/api/listNotificationHubJobs.d.ts +3 -3
- package/dist/esm/api/listNotificationHubJobs.d.ts.map +1 -1
- package/dist/esm/api/listNotificationHubJobs.js.map +1 -1
- package/dist/esm/api/listRegistrations.d.ts +4 -4
- package/dist/esm/api/listRegistrations.d.ts.map +1 -1
- package/dist/esm/api/listRegistrations.js.map +1 -1
- package/dist/esm/api/listRegistrationsByChannel.d.ts +4 -4
- package/dist/esm/api/listRegistrationsByChannel.d.ts.map +1 -1
- package/dist/esm/api/listRegistrationsByChannel.js.map +1 -1
- package/dist/esm/api/listRegistrationsByTag.d.ts +4 -4
- package/dist/esm/api/listRegistrationsByTag.d.ts.map +1 -1
- package/dist/esm/api/listRegistrationsByTag.js.map +1 -1
- package/dist/esm/api/scheduleBroadcastNotification.d.ts +4 -4
- package/dist/esm/api/scheduleBroadcastNotification.d.ts.map +1 -1
- package/dist/esm/api/scheduleBroadcastNotification.js.map +1 -1
- package/dist/esm/api/scheduleNotification.d.ts +4 -4
- package/dist/esm/api/scheduleNotification.d.ts.map +1 -1
- package/dist/esm/api/scheduleNotification.js.map +1 -1
- package/dist/esm/api/sendBroadcastNotification.d.ts +4 -4
- package/dist/esm/api/sendBroadcastNotification.d.ts.map +1 -1
- package/dist/esm/api/sendBroadcastNotification.js.map +1 -1
- package/dist/esm/api/sendNotification.d.ts +4 -4
- package/dist/esm/api/sendNotification.d.ts.map +1 -1
- package/dist/esm/api/sendNotification.js.map +1 -1
- package/dist/esm/api/submitNotificationHubJob.d.ts +3 -3
- package/dist/esm/api/submitNotificationHubJob.d.ts.map +1 -1
- package/dist/esm/api/submitNotificationHubJob.js.map +1 -1
- package/dist/esm/api/updateInstallation.d.ts +4 -4
- package/dist/esm/api/updateInstallation.d.ts.map +1 -1
- package/dist/esm/api/updateInstallation.js.map +1 -1
- package/dist/esm/api/updateRegistration.d.ts +3 -3
- package/dist/esm/api/updateRegistration.d.ts.map +1 -1
- package/dist/esm/api/updateRegistration.js.map +1 -1
- package/dist/esm/auth/sasTokenCredential.d.ts +1 -1
- package/dist/esm/auth/sasTokenCredential.d.ts.map +1 -1
- package/dist/esm/auth/sasTokenCredential.js.map +1 -1
- package/dist/esm/models/notification.d.ts +2 -2
- package/dist/esm/models/notification.d.ts.map +1 -1
- package/dist/esm/models/notification.js.map +1 -1
- package/dist/esm/models/notificationHubJob.d.ts +1 -1
- package/dist/esm/models/notificationHubJob.d.ts.map +1 -1
- package/dist/esm/models/notificationHubJob.js.map +1 -1
- package/dist/esm/models/options.d.ts +2 -2
- package/dist/esm/models/options.d.ts.map +1 -1
- package/dist/esm/models/options.js.map +1 -1
- package/dist/esm/models/response.d.ts +1 -1
- package/dist/esm/models/response.d.ts.map +1 -1
- package/dist/esm/models/response.js.map +1 -1
- package/dist/esm/notificationHubsClient.d.ts +8 -8
- package/dist/esm/notificationHubsClient.d.ts.map +1 -1
- package/dist/esm/notificationHubsClient.js.map +1 -1
- package/dist/esm/serializers/notificationDetailsSerializer.d.ts +1 -1
- package/dist/esm/serializers/notificationDetailsSerializer.d.ts.map +1 -1
- package/dist/esm/serializers/notificationDetailsSerializer.js.map +1 -1
- package/dist/esm/serializers/notificationHubJobSerializer.d.ts +1 -1
- package/dist/esm/serializers/notificationHubJobSerializer.d.ts.map +1 -1
- package/dist/esm/serializers/notificationHubJobSerializer.js.map +1 -1
- package/dist/esm/serializers/notificationOutcomeSerializer.d.ts +1 -1
- package/dist/esm/serializers/notificationOutcomeSerializer.d.ts.map +1 -1
- package/dist/esm/serializers/notificationOutcomeSerializer.js.map +1 -1
- package/dist/esm/serializers/registrationSerializer.d.ts +1 -1
- package/dist/esm/serializers/registrationSerializer.d.ts.map +1 -1
- package/dist/esm/serializers/registrationSerializer.js.map +1 -1
- package/dist/esm/utils/notificationUtils.d.ts +1 -1
- package/dist/esm/utils/notificationUtils.d.ts.map +1 -1
- package/dist/esm/utils/notificationUtils.js.map +1 -1
- package/dist/esm/utils/optionUtils.d.ts +1 -1
- package/dist/esm/utils/optionUtils.d.ts.map +1 -1
- package/dist/esm/utils/optionUtils.js.map +1 -1
- package/dist/esm/utils/registrationUtils.d.ts +1 -1
- package/dist/esm/utils/registrationUtils.d.ts.map +1 -1
- package/dist/esm/utils/registrationUtils.js.map +1 -1
- package/dist/models/notification-hubs.d.ts +4 -4
- package/dist/notification-hubs.d.ts +5 -5
- package/dist/react-native/api/beginSubmitNotificationHubJob.d.ts +3 -3
- package/dist/react-native/api/beginSubmitNotificationHubJob.d.ts.map +1 -1
- package/dist/react-native/api/beginSubmitNotificationHubJob.js.map +1 -1
- package/dist/react-native/api/cancelScheduledNotification.d.ts +3 -3
- package/dist/react-native/api/cancelScheduledNotification.d.ts.map +1 -1
- package/dist/react-native/api/cancelScheduledNotification.js.map +1 -1
- package/dist/react-native/api/clientContext.d.ts +2 -2
- package/dist/react-native/api/clientContext.d.ts.map +1 -1
- package/dist/react-native/api/clientContext.js +1 -1
- package/dist/react-native/api/clientContext.js.map +1 -1
- package/dist/react-native/api/createOrUpdateInstallation.d.ts +4 -4
- package/dist/react-native/api/createOrUpdateInstallation.d.ts.map +1 -1
- package/dist/react-native/api/createOrUpdateInstallation.js.map +1 -1
- package/dist/react-native/api/createOrUpdateRegistration.d.ts +3 -3
- package/dist/react-native/api/createOrUpdateRegistration.d.ts.map +1 -1
- package/dist/react-native/api/createOrUpdateRegistration.js.map +1 -1
- package/dist/react-native/api/createRegistration.d.ts +3 -3
- package/dist/react-native/api/createRegistration.d.ts.map +1 -1
- package/dist/react-native/api/createRegistration.js.map +1 -1
- package/dist/react-native/api/createRegistrationId.d.ts +2 -2
- package/dist/react-native/api/createRegistrationId.d.ts.map +1 -1
- package/dist/react-native/api/createRegistrationId.js.map +1 -1
- package/dist/react-native/api/deleteInstallation.d.ts +3 -3
- package/dist/react-native/api/deleteInstallation.d.ts.map +1 -1
- package/dist/react-native/api/deleteInstallation.js.map +1 -1
- package/dist/react-native/api/deleteRegistration.d.ts +3 -3
- package/dist/react-native/api/deleteRegistration.d.ts.map +1 -1
- package/dist/react-native/api/deleteRegistration.js.map +1 -1
- package/dist/react-native/api/getFeedbackContainerUrl.d.ts +2 -2
- package/dist/react-native/api/getFeedbackContainerUrl.d.ts.map +1 -1
- package/dist/react-native/api/getFeedbackContainerUrl.js.map +1 -1
- package/dist/react-native/api/getInstallation.d.ts +3 -3
- package/dist/react-native/api/getInstallation.d.ts.map +1 -1
- package/dist/react-native/api/getInstallation.js.map +1 -1
- package/dist/react-native/api/getNotificationHubJob.d.ts +3 -3
- package/dist/react-native/api/getNotificationHubJob.d.ts.map +1 -1
- package/dist/react-native/api/getNotificationHubJob.js.map +1 -1
- package/dist/react-native/api/getNotificationOutcomeDetails.d.ts +3 -3
- package/dist/react-native/api/getNotificationOutcomeDetails.d.ts.map +1 -1
- package/dist/react-native/api/getNotificationOutcomeDetails.js.map +1 -1
- package/dist/react-native/api/getRegistration.d.ts +3 -3
- package/dist/react-native/api/getRegistration.d.ts.map +1 -1
- package/dist/react-native/api/getRegistration.js.map +1 -1
- package/dist/react-native/api/internal/_client.d.ts +4 -4
- package/dist/react-native/api/internal/_client.d.ts.map +1 -1
- package/dist/react-native/api/internal/_client.js +1 -1
- package/dist/react-native/api/internal/_client.js.map +1 -1
- package/dist/react-native/api/internal/_createOrUpdateRegistrationDescription.d.ts +3 -3
- package/dist/react-native/api/internal/_createOrUpdateRegistrationDescription.d.ts.map +1 -1
- package/dist/react-native/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
- package/dist/react-native/api/internal/_listRegistrations.d.ts +3 -3
- package/dist/react-native/api/internal/_listRegistrations.d.ts.map +1 -1
- package/dist/react-native/api/internal/_listRegistrations.js.map +1 -1
- package/dist/react-native/api/internal/_scheduleNotification.d.ts +4 -4
- package/dist/react-native/api/internal/_scheduleNotification.d.ts.map +1 -1
- package/dist/react-native/api/internal/_scheduleNotification.js.map +1 -1
- package/dist/react-native/api/internal/_sendNotification.d.ts +4 -4
- package/dist/react-native/api/internal/_sendNotification.d.ts.map +1 -1
- package/dist/react-native/api/internal/_sendNotification.js.map +1 -1
- package/dist/react-native/api/listNotificationHubJobs.d.ts +3 -3
- package/dist/react-native/api/listNotificationHubJobs.d.ts.map +1 -1
- package/dist/react-native/api/listNotificationHubJobs.js.map +1 -1
- package/dist/react-native/api/listRegistrations.d.ts +4 -4
- package/dist/react-native/api/listRegistrations.d.ts.map +1 -1
- package/dist/react-native/api/listRegistrations.js.map +1 -1
- package/dist/react-native/api/listRegistrationsByChannel.d.ts +4 -4
- package/dist/react-native/api/listRegistrationsByChannel.d.ts.map +1 -1
- package/dist/react-native/api/listRegistrationsByChannel.js.map +1 -1
- package/dist/react-native/api/listRegistrationsByTag.d.ts +4 -4
- package/dist/react-native/api/listRegistrationsByTag.d.ts.map +1 -1
- package/dist/react-native/api/listRegistrationsByTag.js.map +1 -1
- package/dist/react-native/api/scheduleBroadcastNotification.d.ts +4 -4
- package/dist/react-native/api/scheduleBroadcastNotification.d.ts.map +1 -1
- package/dist/react-native/api/scheduleBroadcastNotification.js.map +1 -1
- package/dist/react-native/api/scheduleNotification.d.ts +4 -4
- package/dist/react-native/api/scheduleNotification.d.ts.map +1 -1
- package/dist/react-native/api/scheduleNotification.js.map +1 -1
- package/dist/react-native/api/sendBroadcastNotification.d.ts +4 -4
- package/dist/react-native/api/sendBroadcastNotification.d.ts.map +1 -1
- package/dist/react-native/api/sendBroadcastNotification.js.map +1 -1
- package/dist/react-native/api/sendNotification.d.ts +4 -4
- package/dist/react-native/api/sendNotification.d.ts.map +1 -1
- package/dist/react-native/api/sendNotification.js.map +1 -1
- package/dist/react-native/api/submitNotificationHubJob.d.ts +3 -3
- package/dist/react-native/api/submitNotificationHubJob.d.ts.map +1 -1
- package/dist/react-native/api/submitNotificationHubJob.js.map +1 -1
- package/dist/react-native/api/updateInstallation.d.ts +4 -4
- package/dist/react-native/api/updateInstallation.d.ts.map +1 -1
- package/dist/react-native/api/updateInstallation.js.map +1 -1
- package/dist/react-native/api/updateRegistration.d.ts +3 -3
- package/dist/react-native/api/updateRegistration.d.ts.map +1 -1
- package/dist/react-native/api/updateRegistration.js.map +1 -1
- package/dist/react-native/auth/sasTokenCredential.d.ts +1 -1
- package/dist/react-native/auth/sasTokenCredential.d.ts.map +1 -1
- package/dist/react-native/auth/sasTokenCredential.js.map +1 -1
- package/dist/react-native/models/notification.d.ts +2 -2
- package/dist/react-native/models/notification.d.ts.map +1 -1
- package/dist/react-native/models/notification.js.map +1 -1
- package/dist/react-native/models/notificationHubJob.d.ts +1 -1
- package/dist/react-native/models/notificationHubJob.d.ts.map +1 -1
- package/dist/react-native/models/notificationHubJob.js.map +1 -1
- package/dist/react-native/models/options.d.ts +2 -2
- package/dist/react-native/models/options.d.ts.map +1 -1
- package/dist/react-native/models/options.js.map +1 -1
- package/dist/react-native/models/response.d.ts +1 -1
- package/dist/react-native/models/response.d.ts.map +1 -1
- package/dist/react-native/models/response.js.map +1 -1
- package/dist/react-native/notificationHubsClient.d.ts +8 -8
- package/dist/react-native/notificationHubsClient.d.ts.map +1 -1
- package/dist/react-native/notificationHubsClient.js.map +1 -1
- package/dist/react-native/serializers/notificationDetailsSerializer.d.ts +1 -1
- package/dist/react-native/serializers/notificationDetailsSerializer.d.ts.map +1 -1
- package/dist/react-native/serializers/notificationDetailsSerializer.js.map +1 -1
- package/dist/react-native/serializers/notificationHubJobSerializer.d.ts +1 -1
- package/dist/react-native/serializers/notificationHubJobSerializer.d.ts.map +1 -1
- package/dist/react-native/serializers/notificationHubJobSerializer.js.map +1 -1
- package/dist/react-native/serializers/notificationOutcomeSerializer.d.ts +1 -1
- package/dist/react-native/serializers/notificationOutcomeSerializer.d.ts.map +1 -1
- package/dist/react-native/serializers/notificationOutcomeSerializer.js.map +1 -1
- package/dist/react-native/serializers/registrationSerializer.d.ts +1 -1
- package/dist/react-native/serializers/registrationSerializer.d.ts.map +1 -1
- package/dist/react-native/serializers/registrationSerializer.js.map +1 -1
- package/dist/react-native/utils/notificationUtils.d.ts +1 -1
- package/dist/react-native/utils/notificationUtils.d.ts.map +1 -1
- package/dist/react-native/utils/notificationUtils.js.map +1 -1
- package/dist/react-native/utils/optionUtils.d.ts +1 -1
- package/dist/react-native/utils/optionUtils.d.ts.map +1 -1
- package/dist/react-native/utils/optionUtils.js.map +1 -1
- package/dist/react-native/utils/registrationUtils.d.ts +1 -1
- package/dist/react-native/utils/registrationUtils.d.ts.map +1 -1
- package/dist/react-native/utils/registrationUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRegistrations.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"listRegistrations.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAI1E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,6BAA6B,EACtC,OAAO,GAAE,6BAAkC,GAC1C,0BAA0B,CAAC,uBAAuB,CAAC,CAwBrD"}
|
|
@@ -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 type { NotificationHubsClientContext } from \"./index.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { RegistrationDescription } from \"../models/registration.js\";\nimport type { 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,7 +1,7 @@
|
|
|
1
|
-
import { RegistrationDescription, RegistrationChannel } from "../models/registration.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
4
|
-
import { RegistrationQueryLimitOptions } from "../models/options.js";
|
|
1
|
+
import type { RegistrationDescription, RegistrationChannel } from "../models/registration.js";
|
|
2
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
4
|
+
import type { RegistrationQueryLimitOptions } from "../models/options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Gets all registrations for the notification hub with the given device information and options.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRegistrationsByChannel.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrationsByChannel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"listRegistrationsByChannel.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrationsByChannel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE9F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAI1E;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,6BAA6B,EACtC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,6BAAkC,GAC1C,0BAA0B,CAAC,uBAAuB,CAAC,CA4BrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRegistrationsByChannel.js","sourceRoot":"","sources":["../../../src/api/listRegistrationsByChannel.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAIpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,OAA4B,EAC5B,UAAyC,EAAE;IAE3C,MAAM,UAAU,mCACX,OAAO,KACV,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACpC,CAAC;IACF,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CACtD,yDAAyD,EACzD,UAAU,CACX,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 { RegistrationDescription, RegistrationChannel } from \"../models/registration.js\";\nimport { listRegistrationPagingPage, listRegistrationsAll } from \"./internal/_listRegistrations.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { getFilterByChannel } from \"../utils/registrationUtils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param context - The Notification Hubs client.\n * @param channel - The Registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\nexport function listRegistrationsByChannel(\n context: NotificationHubsClientContext,\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const newOptions = {\n ...options,\n filter: getFilterByChannel(channel),\n };\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext.listRegistrationsByDevice\",\n newOptions,\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":"listRegistrationsByChannel.js","sourceRoot":"","sources":["../../../src/api/listRegistrationsByChannel.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAIpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC,EACtC,OAA4B,EAC5B,UAAyC,EAAE;IAE3C,MAAM,UAAU,mCACX,OAAO,KACV,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACpC,CAAC;IACF,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CACtD,yDAAyD,EACzD,UAAU,CACX,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 type { RegistrationDescription, RegistrationChannel } from \"../models/registration.js\";\nimport { listRegistrationPagingPage, listRegistrationsAll } from \"./internal/_listRegistrations.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { getFilterByChannel } from \"../utils/registrationUtils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\n/**\n * Gets all registrations for the notification hub with the given device information and options.\n * @param context - The Notification Hubs client.\n * @param channel - The Registration channel information to query per PNS type.\n * @param options - The options for querying the registrations such as $top.\n * @returns A paged async iterable containing all of the registrations for the notification hub.\n */\nexport function listRegistrationsByChannel(\n context: NotificationHubsClientContext,\n channel: RegistrationChannel,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const newOptions = {\n ...options,\n filter: getFilterByChannel(channel),\n };\n const { span, updatedOptions } = tracingClient.startSpan(\n \"NotificationHubsClientContext.listRegistrationsByDevice\",\n newOptions,\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,7 +1,7 @@
|
|
|
1
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
2
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
3
|
-
import { RegistrationDescription } from "../models/registration.js";
|
|
4
|
-
import { RegistrationQueryLimitOptions } from "../models/options.js";
|
|
1
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
2
|
+
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
3
|
+
import type { RegistrationDescription } from "../models/registration.js";
|
|
4
|
+
import type { RegistrationQueryLimitOptions } from "../models/options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Lists all registrations with the matching tag.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRegistrationsByTag.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrationsByTag.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"listRegistrationsByTag.d.ts","sourceRoot":"","sources":["../../../src/api/listRegistrationsByTag.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAO1E;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,EACtC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,6BAAkC,GAC1C,0BAA0B,CAAC,uBAAuB,CAAC,CAwBrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRegistrationsByTag.js","sourceRoot":"","sources":["../../../src/api/listRegistrationsByTag.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,E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E,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 \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport { RegistrationQueryResponse } from \"../models/response.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"listRegistrationsByTag\";\n\n/**\n * Lists all registrations with the matching tag.\n * @param context - The Notification Hubs client.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\nexport function listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n );\n try {\n const iter = listRegistrationsByTagAll(context, tag, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationsByTagPagingPage(context, tag, options);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n\nasync function* listRegistrationsByTagAll(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationsByTagPagingPage(context, tag, options)) {\n yield* page;\n }\n}\n\nasync function* listRegistrationsByTagPagingPage(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrationsByTag(context, tag, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrationsByTag(context, tag, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n continuationToken?: string,\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/tags/${tag}/registrations`;\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = await context.createHeaders(OPERATION_NAME);\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":"listRegistrationsByTag.js","sourceRoot":"","sources":["../../../src/api/listRegistrationsByTag.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qB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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 \"./internal/_client.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { RegistrationDescription } from \"../models/registration.js\";\nimport type { RegistrationQueryLimitOptions } from \"../models/options.js\";\nimport type { RegistrationQueryResponse } from \"../models/response.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"listRegistrationsByTag\";\n\n/**\n * Lists all registrations with the matching tag.\n * @param context - The Notification Hubs client.\n * @param tag - The tag to query for matching registrations.\n * @param options - The query options such as $top.\n * @returns A paged async iterable containing the matching registrations for the notification hub.\n */\nexport function listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions = {},\n): PagedAsyncIterableIterator<RegistrationDescription> {\n const { span, updatedOptions } = tracingClient.startSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n );\n try {\n const iter = listRegistrationsByTagAll(context, tag, updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return listRegistrationsByTagPagingPage(context, tag, options);\n },\n };\n } catch (e: any) {\n span.setStatus({ status: \"error\", error: e });\n throw e;\n } finally {\n span.end();\n }\n}\n\nasync function* listRegistrationsByTagAll(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n): AsyncIterableIterator<RegistrationDescription> {\n for await (const page of listRegistrationsByTagPagingPage(context, tag, options)) {\n yield* page;\n }\n}\n\nasync function* listRegistrationsByTagPagingPage(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n): AsyncIterableIterator<RegistrationDescription[]> {\n let result = await _listRegistrationsByTag(context, tag, options);\n yield result.registrations || [];\n let continuationToken = result.continuationToken;\n while (continuationToken) {\n result = await _listRegistrationsByTag(context, tag, options, continuationToken);\n continuationToken = result.continuationToken;\n yield result.registrations || [];\n }\n}\n\nasync function _listRegistrationsByTag(\n context: NotificationHubsClientContext,\n tag: string,\n options: RegistrationQueryLimitOptions,\n continuationToken?: string,\n): Promise<RegistrationQueryResponse> {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/tags/${tag}/registrations`;\n if (options.top !== undefined) {\n endpoint.searchParams.set(\"$top\", `${options.top}`);\n }\n\n if (continuationToken !== undefined) {\n endpoint.searchParams.set(\"continuationtoken\", continuationToken);\n }\n\n const headers = await context.createHeaders(OPERATION_NAME);\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,7 +1,7 @@
|
|
|
1
|
-
import { Notification } from "../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
1
|
+
import type { Notification } from "../models/notification.js";
|
|
2
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import type { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
5
5
|
/**
|
|
6
6
|
* Schedules a push notification to all registered devices.
|
|
7
7
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/api/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduleBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/api/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,+BAA+B,CAAC,CAQ1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleBroadcastNotification.js","sourceRoot":"","sources":["../../../src/api/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAsC,EACtC,aAAmB,EACnB,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,4BAA4B,CACjC,OAAO,EACP,aAAa,EACb,YAAY,EACZ,OAAO,EACP,+BAA+B,CAChC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { scheduleNotificationInternal } from \"./internal/_scheduleNotification.js\";\n\n/**\n * Schedules a push notification to all registered devices.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleBroadcastNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationInternal(\n context,\n scheduledTime,\n notification,\n options,\n \"scheduleBroadcastNotification\",\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"scheduleBroadcastNotification.js","sourceRoot":"","sources":["../../../src/api/scheduleBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAsC,EACtC,aAAmB,EACnB,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,4BAA4B,CACjC,OAAO,EACP,aAAa,EACb,YAAY,EACZ,OAAO,EACP,+BAA+B,CAChC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Notification } from \"../models/notification.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport { scheduleNotificationInternal } from \"./internal/_scheduleNotification.js\";\n\n/**\n * Schedules a push notification to all registered devices.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Operation options.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleBroadcastNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: OperationOptions = {},\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationInternal(\n context,\n scheduledTime,\n notification,\n options,\n \"scheduleBroadcastNotification\",\n );\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Notification } from "../models/notification.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { ScheduleNotificationOptions } from "../models/options.js";
|
|
1
|
+
import type { Notification } from "../models/notification.js";
|
|
2
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import type { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
4
|
+
import type { ScheduleNotificationOptions } from "../models/options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Schedules a push notification to devices that match the given tags or tag expression at the specified time.
|
|
7
7
|
* NOTE: This is only available in Standard SKU Azure Notification Hubs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleNotification.d.ts","sourceRoot":"","sources":["../../../src/api/scheduleNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduleNotification.d.ts","sourceRoot":"","sources":["../../../src/api/scheduleNotification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAGxE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,+BAA+B,CAAC,CAS1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleNotification.js","sourceRoot":"","sources":["../../../src/api/scheduleNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAsC,EACtC,aAAmB,EACnB,YAA0B,EAC1B,OAAoC;IAEpC,OAAO,4BAA4B,CACjC,OAAO,EACP,aAAa,EACb,YAAY,EACZ,OAAO,EACP,sBAAsB,EACtB,OAAO,CAAC,aAAa,CACtB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { ScheduleNotificationOptions } from \"../models/options.js\";\nimport { scheduleNotificationInternal } from \"./internal/_scheduleNotification.js\";\n\n/**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationInternal(\n context,\n scheduledTime,\n notification,\n options,\n \"scheduleNotification\",\n options.tagExpression,\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"scheduleNotification.js","sourceRoot":"","sources":["../../../src/api/scheduleNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAsC,EACtC,aAAmB,EACnB,YAA0B,EAC1B,OAAoC;IAEpC,OAAO,4BAA4B,CACjC,OAAO,EACP,aAAa,EACb,YAAY,EACZ,OAAO,EACP,sBAAsB,EACtB,OAAO,CAAC,aAAa,CACtB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Notification } from \"../models/notification.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport type { ScheduleNotificationOptions } from \"../models/options.js\";\nimport { scheduleNotificationInternal } from \"./internal/_scheduleNotification.js\";\n\n/**\n * Schedules a push notification to devices that match the given tags or tag expression at the specified time.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param scheduledTime - The Date to send the push notification.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options which include tags used to target the device for push notifications in either an array or tag expression.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function scheduleNotification(\n context: NotificationHubsClientContext,\n scheduledTime: Date,\n notification: Notification,\n options: ScheduleNotificationOptions,\n): Promise<NotificationHubsMessageResponse> {\n return scheduleNotificationInternal(\n context,\n scheduledTime,\n notification,\n options,\n \"scheduleNotification\",\n options.tagExpression,\n );\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BroadcastSendNotificationOptions } from "../models/options.js";
|
|
2
|
-
import { Notification } from "../models/notification.js";
|
|
3
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
4
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
1
|
+
import type { BroadcastSendNotificationOptions } from "../models/options.js";
|
|
2
|
+
import type { Notification } from "../models/notification.js";
|
|
3
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
4
|
+
import type { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
5
5
|
/**
|
|
6
6
|
* Sends push notifications to all devices with a broadcast send.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/api/sendBroadcastNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"sendBroadcastNotification.d.ts","sourceRoot":"","sources":["../../../src/api/sendBroadcastNotification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAGxF;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gCAAqC,GAC7C,OAAO,CAAC,+BAA+B,CAAC,CAE1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendBroadcastNotification.js","sourceRoot":"","sources":["../../../src/api/sendBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAsC,EACtC,YAA0B,EAC1B,UAA4C,EAAE;IAE9C,OAAO,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BroadcastSendNotificationOptions } from \"../models/options.js\";\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { sendNotificationInternal } from \"./internal/_sendNotification.js\";\n\n/**\n * Sends push notifications to all devices with a broadcast send.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendBroadcastNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationInternal(context, notification, options);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sendBroadcastNotification.js","sourceRoot":"","sources":["../../../src/api/sendBroadcastNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAsC,EACtC,YAA0B,EAC1B,UAA4C,EAAE;IAE9C,OAAO,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BroadcastSendNotificationOptions } from \"../models/options.js\";\nimport type { Notification } from \"../models/notification.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { sendNotificationInternal } from \"./internal/_sendNotification.js\";\n\n/**\n * Sends push notifications to all devices with a broadcast send.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendBroadcastNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: BroadcastSendNotificationOptions = {},\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationInternal(context, notification, options);\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DirectSendNotificationOptions, SendNotificationOptions } from "../models/options.js";
|
|
2
|
-
import { Notification } from "../models/notification.js";
|
|
3
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
4
|
-
import { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
1
|
+
import type { DirectSendNotificationOptions, SendNotificationOptions } from "../models/options.js";
|
|
2
|
+
import type { Notification } from "../models/notification.js";
|
|
3
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
4
|
+
import type { NotificationHubsMessageResponse } from "../models/notificationDetails.js";
|
|
5
5
|
/**
|
|
6
6
|
* Sends push notifications to devices that match the given tags or tag expression.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/api/sendNotification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/api/sendNotification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAGxF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,6BAA6B,GAAG,uBAAuB,GAC/D,OAAO,CAAC,+BAA+B,CAAC,CAE1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../src/api/sendNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAsC,EACtC,YAA0B,EAC1B,OAAgE;IAEhE,OAAO,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DirectSendNotificationOptions, SendNotificationOptions } from \"../models/options.js\";\nimport { Notification } from \"../models/notification.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { sendNotificationInternal } from \"./internal/_sendNotification.js\";\n\n/**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationInternal(context, notification, options);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../src/api/sendNotification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAsC,EACtC,YAA0B,EAC1B,OAAgE;IAEhE,OAAO,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DirectSendNotificationOptions, SendNotificationOptions } from \"../models/options.js\";\nimport type { Notification } from \"../models/notification.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { NotificationHubsMessageResponse } from \"../models/notificationDetails.js\";\nimport { sendNotificationInternal } from \"./internal/_sendNotification.js\";\n\n/**\n * Sends push notifications to devices that match the given tags or tag expression.\n * @param context - The Notification Hubs client.\n * @param notification - The notification to send to the matching devices.\n * @param options - Options for the notification including tags, device handles and whether to enable test send.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function sendNotification(\n context: NotificationHubsClientContext,\n notification: Notification,\n options: DirectSendNotificationOptions | SendNotificationOptions,\n): Promise<NotificationHubsMessageResponse> {\n return sendNotificationInternal(context, notification, options);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NotificationHubJob } from "../models/notificationHubJob.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
1
|
+
import type { NotificationHubJob } from "../models/notificationHubJob.js";
|
|
2
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
4
4
|
/**
|
|
5
5
|
* Submits a Notification Hub Job.
|
|
6
6
|
* Note: this is available to Standard SKU namespace and above.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submitNotificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/api/submitNotificationHubJob.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"submitNotificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/api/submitNotificationHubJob.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,6BAA6B,EACtC,GAAG,EAAE,kBAAkB,EACvB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,CAAC,CAkB7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/submitNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,gDAAgD,CAAC;AAIxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAsC,EACtC,GAAuB,EACvB,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,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,GAAG,gCAAgC,CAAC,GAAG,CAAC,CAAC;QACrD,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 {\n parseNotificationHubJobEntry,\n serializeNotificationHubJobEntry,\n} from \"../serializers/notificationHubJobSerializer.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"submitNotificationHubJob\";\n\n/**\n * Submits a Notification Hub Job.\n * Note: this is available to Standard SKU namespace and above.\n * @param context - The Notification Hubs client.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\nexport function submitNotificationHubJob(\n context: NotificationHubsClientContext,\n job: NotificationHubJob,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${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, \"POST\", headers, updatedOptions);\n request.body = serializeNotificationHubJobEntry(job);\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"submitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/submitNotificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,gDAAgD,CAAC;AAIxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAsC,EACtC,GAAuB,EACvB,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,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,GAAG,gCAAgC,CAAC,GAAG,CAAC,CAAC;QACrD,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 {\n parseNotificationHubJobEntry,\n serializeNotificationHubJobEntry,\n} from \"../serializers/notificationHubJobSerializer.js\";\nimport type { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"submitNotificationHubJob\";\n\n/**\n * Submits a Notification Hub Job.\n * Note: this is available to Standard SKU namespace and above.\n * @param context - The Notification Hubs client.\n * @param job - The notification hub job to submit.\n * @param options - The operation options.\n * @returns The notification hub job details including job ID and status.\n */\nexport function submitNotificationHubJob(\n context: NotificationHubsClientContext,\n job: NotificationHubJob,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${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, \"POST\", headers, updatedOptions);\n request.body = serializeNotificationHubJobEntry(job);\n const response = await sendRequest(context, request, 201);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { JsonPatch } from "../models/installation.js";
|
|
2
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
3
|
-
import { NotificationHubsResponse } from "../models/notificationDetails.js";
|
|
4
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
1
|
+
import type { JsonPatch } from "../models/installation.js";
|
|
2
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
3
|
+
import type { NotificationHubsResponse } from "../models/notificationDetails.js";
|
|
4
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
5
5
|
/**
|
|
6
6
|
* Updates an installation using the JSON-Patch standard in RFC6902.
|
|
7
7
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateInstallation.d.ts","sourceRoot":"","sources":["../../../src/api/updateInstallation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"updateInstallation.d.ts","sourceRoot":"","sources":["../../../src/api/updateInstallation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,6BAA6B,EACtC,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,SAAS,EAAE,EAChC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAkBnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateInstallation.js","sourceRoot":"","sources":["../../../src/api/updateInstallation.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,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,mBAAgC,EAChC,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,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACnD,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 { JsonPatch } 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 = \"updateInstallation\";\n\n/**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to update.\n * @param installationPatches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function updateInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n installationPatches: JsonPatch[],\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${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, \"PATCH\", headers, updatedOptions);\n request.body = JSON.stringify(installationPatches);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"updateInstallation.js","sourceRoot":"","sources":["../../../src/api/updateInstallation.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,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,mBAAgC,EAChC,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,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACnD,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 type { JsonPatch } from \"../models/installation.js\";\nimport type { NotificationHubsClientContext } from \"./index.js\";\nimport type { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"updateInstallation\";\n\n/**\n * Updates an installation using the JSON-Patch standard in RFC6902.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to update.\n * @param installationPatches - An array of patches following the JSON-Patch standard.\n * @param options - Configuration options for the patch installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function updateInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n installationPatches: JsonPatch[],\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${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, \"PATCH\", headers, updatedOptions);\n request.body = JSON.stringify(installationPatches);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NotificationHubsClientContext } from "./index.js";
|
|
2
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
-
import { RegistrationDescription } from "../models/registration.js";
|
|
1
|
+
import type { NotificationHubsClientContext } from "./index.js";
|
|
2
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
+
import type { RegistrationDescription } from "../models/registration.js";
|
|
4
4
|
/**
|
|
5
5
|
* Updates an existing registration.
|
|
6
6
|
* @param context - The Notification Hubs client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRegistration.d.ts","sourceRoot":"","sources":["../../../src/api/updateRegistration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"updateRegistration.d.ts","sourceRoot":"","sources":["../../../src/api/updateRegistration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAOzE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,6BAA6B,EACtC,YAAY,EAAE,uBAAuB,EACrC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,uBAAuB,CAAC,CAWlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRegistration.js","sourceRoot":"","sources":["../../../src/api/updateRegistration.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;;;;;;GAMG;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,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,SAAS,CAAC,0CAA0C,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACvF,CAAC;QACD,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 = \"updateRegistration\";\n\n/**\n * Updates an existing registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\nexport function updateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (!registration.etag) {\n throw new RestError(\"ETag is required for registration update\", { statusCode: 400 });\n }\n return createOrUpdateRegistrationDescription(context, registration, \"update\", updatedOptions);\n },\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"updateRegistration.js","sourceRoot":"","sources":["../../../src/api/updateRegistration.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;;;;;;GAMG;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,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,SAAS,CAAC,0CAA0C,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACvF,CAAC;QACD,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 type { NotificationHubsClientContext } from \"./index.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { 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 = \"updateRegistration\";\n\n/**\n * Updates an existing registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to update.\n * @param options - The operation options.\n * @returns The updated registration description.\n */\nexport function updateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (!registration.etag) {\n throw new RestError(\"ETag is required for registration update\", { statusCode: 400 });\n }\n return createOrUpdateRegistrationDescription(context, registration, \"update\", updatedOptions);\n },\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasTokenCredential.d.ts","sourceRoot":"","sources":["../../../src/auth/sasTokenCredential.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sasTokenCredential.d.ts","sourceRoot":"","sources":["../../../src/auth/sasTokenCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGrE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD;;OAEG;IACH,OAAO,CAAC,WAAW,CAAqB;IAExC;;;OAGG;gBACS,UAAU,EAAE,kBAAkB;IAI1C;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CASvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasTokenCredential.js","sourceRoot":"","sources":["../../../src/auth/sasTokenCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiB7C;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAM7B;;;OAGG;IACH,YAAY,UAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAyB;QACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5D,OAAO,WAAW,CAChB,IAAI,CAAC,WAAW,CAAC,mBAAmB,EACpC,IAAI,CAAC,WAAW,CAAC,eAAe,EAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,EACpC,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;GAOG;AACH,KAAK,UAAU,WAAW,CACxB,OAAe,EACf,GAAW,EACX,MAAc,EACd,QAAgB;IAEhB,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACtD,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAEhD,OAAO;QACL,KAAK,EAAE,4BAA4B,QAAQ,QAAQ,GAAG,OAAO,MAAM,QAAQ,OAAO,EAAE;QACpF,kBAAkB,EAAE,MAAM;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccessToken, TokenCredential } from \"@azure/core-auth\";\nimport { signString } from \"./hmacSha256.js\";\n\n/**\n * Represents a named key credential.\n */\nexport interface NamedKeyCredential {\n /**\n * The Shared Access Signature key name.\n */\n sharedAccessKeyName: string;\n\n /**\n * The Shared Access Signature key value.\n */\n sharedAccessKey: string;\n}\n\n/**\n * A TokenProvider that generates a Sas token:\n * `SharedAccessSignature sr=<resource>&sig=<signature>&se=<expiry>&skn=<keyname>`\n *\n * @internal\n */\nexport class SasTokenCredential implements TokenCredential {\n /**\n * The SASCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * Initializes a new instance of SasTokenProvider\n * @param credential - The source `NamedKeyCredential` or `SASCredential`.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n }\n\n /**\n * Gets the sas token for the specified audience\n * @param scopes - The scope for which the token is desired.\n */\n async getToken(scopes: string | string[]): Promise<AccessToken | null> {\n const audience = Array.isArray(scopes) ? scopes[0] : scopes;\n return createToken(\n this._credential.sharedAccessKeyName,\n this._credential.sharedAccessKey,\n Math.floor(Date.now() / 1000) + 3600,\n audience,\n );\n }\n}\n\n/**\n * Creates the sas token based on the provided information.\n * @param keyName - The shared access key name.\n * @param key - The shared access key.\n * @param expiry - The time period in unix time after which the token will expire.\n * @param audience - The audience for which the token is desired.\n * @internal\n */\nasync function createToken(\n keyName: string,\n key: string,\n expiry: number,\n audience: string,\n): Promise<AccessToken> {\n audience = encodeURIComponent(audience.toLowerCase());\n keyName = encodeURIComponent(keyName);\n const stringToSign = audience + \"\\n\" + expiry;\n const sig = await signString(key, stringToSign);\n\n return {\n token: `SharedAccessSignature sr=${audience}&sig=${sig}&se=${expiry}&skn=${keyName}`,\n expiresOnTimestamp: expiry,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sasTokenCredential.js","sourceRoot":"","sources":["../../../src/auth/sasTokenCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiB7C;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAM7B;;;OAGG;IACH,YAAY,UAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAyB;QACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5D,OAAO,WAAW,CAChB,IAAI,CAAC,WAAW,CAAC,mBAAmB,EACpC,IAAI,CAAC,WAAW,CAAC,eAAe,EAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,EACpC,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;GAOG;AACH,KAAK,UAAU,WAAW,CACxB,OAAe,EACf,GAAW,EACX,MAAc,EACd,QAAgB;IAEhB,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACtD,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAEhD,OAAO;QACL,KAAK,EAAE,4BAA4B,QAAQ,QAAQ,GAAG,OAAO,MAAM,QAAQ,OAAO,EAAE;QACpF,kBAAkB,EAAE,MAAM;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, TokenCredential } from \"@azure/core-auth\";\nimport { signString } from \"./hmacSha256.js\";\n\n/**\n * Represents a named key credential.\n */\nexport interface NamedKeyCredential {\n /**\n * The Shared Access Signature key name.\n */\n sharedAccessKeyName: string;\n\n /**\n * The Shared Access Signature key value.\n */\n sharedAccessKey: string;\n}\n\n/**\n * A TokenProvider that generates a Sas token:\n * `SharedAccessSignature sr=<resource>&sig=<signature>&se=<expiry>&skn=<keyname>`\n *\n * @internal\n */\nexport class SasTokenCredential implements TokenCredential {\n /**\n * The SASCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * Initializes a new instance of SasTokenProvider\n * @param credential - The source `NamedKeyCredential` or `SASCredential`.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n }\n\n /**\n * Gets the sas token for the specified audience\n * @param scopes - The scope for which the token is desired.\n */\n async getToken(scopes: string | string[]): Promise<AccessToken | null> {\n const audience = Array.isArray(scopes) ? scopes[0] : scopes;\n return createToken(\n this._credential.sharedAccessKeyName,\n this._credential.sharedAccessKey,\n Math.floor(Date.now() / 1000) + 3600,\n audience,\n );\n }\n}\n\n/**\n * Creates the sas token based on the provided information.\n * @param keyName - The shared access key name.\n * @param key - The shared access key.\n * @param expiry - The time period in unix time after which the token will expire.\n * @param audience - The audience for which the token is desired.\n * @internal\n */\nasync function createToken(\n keyName: string,\n key: string,\n expiry: number,\n audience: string,\n): Promise<AccessToken> {\n audience = encodeURIComponent(audience.toLowerCase());\n keyName = encodeURIComponent(keyName);\n const stringToSign = audience + \"\\n\" + expiry;\n const sig = await signString(key, stringToSign);\n\n return {\n token: `SharedAccessSignature sr=${audience}&sig=${sig}&se=${expiry}&skn=${keyName}`,\n expiresOnTimestamp: expiry,\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdmNativeMessage, AppleNativeMessage, FirebaseLegacyNativeMessage, FirebaseV1NativeMessage } from "./notificationBodyBuilder.js";
|
|
2
|
-
import { AppleHeaders, WindowsHeaders } from "./notificationHeaderBuilder.js";
|
|
1
|
+
import type { AdmNativeMessage, AppleNativeMessage, FirebaseLegacyNativeMessage, FirebaseV1NativeMessage } from "./notificationBodyBuilder.js";
|
|
2
|
+
import type { AppleHeaders, WindowsHeaders } from "./notificationHeaderBuilder.js";
|
|
3
3
|
/**
|
|
4
4
|
* Represents a notification that can be sent to a device.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/models/notification.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/models/notification.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAMnF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CA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;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,wBAAwB,GACrC,oBAAoB,CAStB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,0BAA0B,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,qBAAqB,GAClC,mBAAmB,CAkBrB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,qBAAqB,GAClC,mBAAmB,CAgBrB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,qBAAqB,GAClC,mBAAmB,CAgBrB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,qBAAqB,GAClC,mBAAmB,CAgBrB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,qBAAqB,GAClC,mBAAmB,CAgBrB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,GACnB,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../src/models/notification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AASnD,SAAS,QAAQ,CA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,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,YAAmC;IAEnC,MAAM,MAAM,mCACP,YAAY,KACf,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAC3C,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;IAC9D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as Constants from \"../utils/constants.js\";\nimport {\n AdmNativeMessage,\n AppleNativeMessage,\n FirebaseLegacyNativeMessage,\n FirebaseV1NativeMessage,\n} from \"./notificationBodyBuilder.js\";\nimport { AppleHeaders, WindowsHeaders } from \"./notificationHeaderBuilder.js\";\n\nfunction isString(value: unknown): value is string {\n return typeof value === \"string\" || value instanceof String;\n}\n\n/**\n * Represents a notification that can be sent to a device.\n */\nexport interface NotificationCommon {\n /**\n * The body for the push notification.\n */\n body: string;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, unknown>;\n}\n\n/**\n * The common notification parameters to accept a string body or JSON body.\n */\nexport interface NotificationCommonParams {\n /**\n * The body for the push notification.\n */\n body: string | unknown;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, unknown>;\n}\n\n/**\n * Represents a JSON notification hub.\n */\nexport interface JsonNotification extends NotificationCommon {\n /**\n * The content type for the push notification.\n */\n contentType: \"application/json;charset=utf-8\";\n}\n\n/**\n * Represents an Apple APNs push notification.\n */\nexport interface AppleNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"apple\";\n}\n\n/**\n * Represents an Apple notification that can be sent to a device.\n */\nexport interface AppleNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | AppleNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: AppleHeaders;\n}\n\n/**\n * Creates a notification to send to an Apple device.\n * @param notification - A partial message used to create a message for Apple.\n * @returns A newly created Apple.\n */\nexport function createAppleNotification(notification: AppleNotificationParams): AppleNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"apple\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents an Amazon Device Messaging (ADM) push notification.\n */\nexport interface AdmNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"adm\";\n}\n\n/**\n * Represents an ADM notification that can be sent to a device.\n */\nexport interface AdmNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | AdmNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to an Amazon Device Messaging device.\n * @param notification - A partial message used to create a message for Amazon Device Messaging.\n * @returns A newly created Amazon Device Messaging.\n */\nexport function createAdmNotification(notification: AdmNotificationParams): AdmNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"adm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Baidu push notification.\n */\nexport interface BaiduNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"baidu\";\n}\n\n/**\n * Creates a notification to send to a Baidu registered device.\n * @param notification - A partial message used to create a message for Baidu.\n * @returns A newly created Baidu.\n */\nexport function createBaiduNotification(notification: NotificationCommonParams): BaiduNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"baidu\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Browser push notification.\n */\nexport interface BrowserNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"browser\";\n}\n\n/**\n * Creates a notification to send to a browser.\n * @param notification - A partial message used to create a message for a browser.\n * @returns A newly created Web Push browser.\n */\nexport function createBrowserNotification(\n notification: NotificationCommonParams,\n): BrowserNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"browser\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Firebase legacy HTTP push notification.\n */\nexport interface FcmLegacyNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"gcm\";\n}\n\n/**\n * Represents an Firebase Legacy notification that can be sent to a device.\n */\nexport interface FcmLegacyNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | FirebaseLegacyNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase notification.\n */\nexport function createFcmLegacyNotification(\n notification: FcmLegacyNotificationParams,\n): FcmLegacyNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"gcm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents an Firebase V1 API notification that can be sent to a device.\n */\nexport interface FcmV1Notification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"fcmv1\";\n}\n\n/**\n * Represents an Firebase V1 notification that can be sent to a device.\n */\nexport interface FcmV1NotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | FirebaseV1NativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase notification.\n */\nexport function createFcmV1Notification(notification: FcmV1NotificationParams): FcmV1Notification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"fcmv1\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Xiaomi push notification.\n */\nexport interface XiaomiNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"xiaomi\";\n}\n\n/**\n * Creates a notification to send to Xiaomi.\n * @param notification - A partial message used to create a message for Xiaomi.\n * @returns A newly created Xiaomi notification.\n */\nexport function createXiaomiNotification(\n notification: NotificationCommonParams,\n): XiaomiNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"xiaomi\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a template based push notification.\n */\nexport interface TemplateNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"template\";\n}\n\n/**\n * Creates a template notification.\n * @param notification - A partial message used to be used for a template notification.\n * @returns A newly created Firebase.\n */\nexport function createTemplateNotification(\n notification: NotificationCommonParams,\n): TemplateNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"template\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents the possible WNS content-types.\n */\nexport type WindowsContentType = \"application/xml\" | \"application/octet-stream\";\n\n/**\n * Represents a Windows Notification Services (WNS) push notification.\n */\nexport interface WindowsNotification extends NotificationCommon {\n /**\n * The platform for the push notification.\n */\n platform: \"windows\";\n\n /**\n * The content type for the push notification.\n */\n contentType: WindowsContentType;\n}\n\n/**\n * Represents a WNS notification that can be sent to a device.\n */\nexport interface WnsNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: WindowsHeaders;\n}\n\n/**\n * Creates a notification to send to WNS.\n * @param notification - The WNS notification to send.\n * @returns A newly created WNS message.\n */\nexport function createWindowsNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n if (notification?.headers && notification.headers[\"X-WNS-Type\"]) {\n const wnsType = notification.headers[\"X-WNS-Type\"];\n switch (wnsType) {\n case Constants.WNS_TOAST:\n return createWindowsToastNotification(notification);\n case Constants.WNS_TITLE:\n return createWindowsTileNotification(notification);\n case Constants.WNS_BADGE:\n return createWindowsBadgeNotification(notification);\n case Constants.WNS_RAW:\n return createWindowsRawNotification(notification);\n default:\n throw new Error(`Invalid WNS type: ${wnsType}`);\n }\n } else {\n throw new Error(`Missing WNS type in headers`);\n }\n}\n\n/**\n * Creates a badge message to send to WNS.\n * @param notification - A partial message used to create a badge message for WNS.\n * @returns A newly created WNS badge.\n */\nexport function createWindowsBadgeNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_BADGE;\n }\n\n return result;\n}\n\n/**\n * Creates a tile message to send to WNS.\n * @param notification - A partial message used to create a tile message for WNS.\n * @returns A newly created WNS tile.\n */\nexport function createWindowsTileNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TITLE;\n }\n\n return result;\n}\n\n/**\n * Creates a toast message to send to WNS.\n * @param notification - A partial message used to create a toast message for WNS.\n * @returns A newly created WNS toast.\n */\nexport function createWindowsToastNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TOAST;\n }\n\n return result;\n}\n\n/**\n * Creates a notification to send to WNS in wns/raw format..\n * @param notification - A partial message used to create a message for WNS in XML format.\n * @returns A newly created WNS message using XML.\n */\nexport function createWindowsRawNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.STREAM_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_RAW;\n }\n\n return result;\n}\n\n/**\n * Represents the possible push notification messages types.\n */\nexport type Notification =\n | AppleNotification\n | AdmNotification\n | BaiduNotification\n | BrowserNotification\n | FcmLegacyNotification\n | FcmV1Notification\n | XiaomiNotification\n | WindowsNotification\n | TemplateNotification;\n"]}
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../src/models/notification.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AASnD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC;AAC9D,CAAC;AAmED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAAqC;IAC3E,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAEjG,uCACK,YAAY,KACf,IAAI,EACJ,QAAQ,EAAE,OAAO,EACjB,WAAW,EAAE,SAAS,CAAC,iBAAiB,IACxC;AACJ,CAAC;AA2BD;;;;GA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AO,CAAC;IAC9D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as Constants from \"../utils/constants.js\";\nimport type {\n AdmNativeMessage,\n AppleNativeMessage,\n FirebaseLegacyNativeMessage,\n FirebaseV1NativeMessage,\n} from \"./notificationBodyBuilder.js\";\nimport type { AppleHeaders, WindowsHeaders } from \"./notificationHeaderBuilder.js\";\n\nfunction isString(value: unknown): value is string {\n return typeof value === \"string\" || value instanceof String;\n}\n\n/**\n * Represents a notification that can be sent to a device.\n */\nexport interface NotificationCommon {\n /**\n * The body for the push notification.\n */\n body: string;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, unknown>;\n}\n\n/**\n * The common notification parameters to accept a string body or JSON body.\n */\nexport interface NotificationCommonParams {\n /**\n * The body for the push notification.\n */\n body: string | unknown;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, unknown>;\n}\n\n/**\n * Represents a JSON notification hub.\n */\nexport interface JsonNotification extends NotificationCommon {\n /**\n * The content type for the push notification.\n */\n contentType: \"application/json;charset=utf-8\";\n}\n\n/**\n * Represents an Apple APNs push notification.\n */\nexport interface AppleNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"apple\";\n}\n\n/**\n * Represents an Apple notification that can be sent to a device.\n */\nexport interface AppleNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | AppleNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: AppleHeaders;\n}\n\n/**\n * Creates a notification to send to an Apple device.\n * @param notification - A partial message used to create a message for Apple.\n * @returns A newly created Apple.\n */\nexport function createAppleNotification(notification: AppleNotificationParams): AppleNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"apple\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents an Amazon Device Messaging (ADM) push notification.\n */\nexport interface AdmNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"adm\";\n}\n\n/**\n * Represents an ADM notification that can be sent to a device.\n */\nexport interface AdmNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | AdmNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to an Amazon Device Messaging device.\n * @param notification - A partial message used to create a message for Amazon Device Messaging.\n * @returns A newly created Amazon Device Messaging.\n */\nexport function createAdmNotification(notification: AdmNotificationParams): AdmNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"adm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Baidu push notification.\n */\nexport interface BaiduNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"baidu\";\n}\n\n/**\n * Creates a notification to send to a Baidu registered device.\n * @param notification - A partial message used to create a message for Baidu.\n * @returns A newly created Baidu.\n */\nexport function createBaiduNotification(notification: NotificationCommonParams): BaiduNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"baidu\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Browser push notification.\n */\nexport interface BrowserNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"browser\";\n}\n\n/**\n * Creates a notification to send to a browser.\n * @param notification - A partial message used to create a message for a browser.\n * @returns A newly created Web Push browser.\n */\nexport function createBrowserNotification(\n notification: NotificationCommonParams,\n): BrowserNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"browser\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Firebase legacy HTTP push notification.\n */\nexport interface FcmLegacyNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"gcm\";\n}\n\n/**\n * Represents an Firebase Legacy notification that can be sent to a device.\n */\nexport interface FcmLegacyNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | FirebaseLegacyNativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase notification.\n */\nexport function createFcmLegacyNotification(\n notification: FcmLegacyNotificationParams,\n): FcmLegacyNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"gcm\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents an Firebase V1 API notification that can be sent to a device.\n */\nexport interface FcmV1Notification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"fcmv1\";\n}\n\n/**\n * Represents an Firebase V1 notification that can be sent to a device.\n */\nexport interface FcmV1NotificationParams {\n /**\n * The body for the push notification.\n */\n body: string | FirebaseV1NativeMessage;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: Record<string, string>;\n}\n\n/**\n * Creates a notification to send to Firebase.\n * @param notification - A partial message used to create a message for Firebase.\n * @returns A newly created Firebase notification.\n */\nexport function createFcmV1Notification(notification: FcmV1NotificationParams): FcmV1Notification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"fcmv1\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a Xiaomi push notification.\n */\nexport interface XiaomiNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"xiaomi\";\n}\n\n/**\n * Creates a notification to send to Xiaomi.\n * @param notification - A partial message used to create a message for Xiaomi.\n * @returns A newly created Xiaomi notification.\n */\nexport function createXiaomiNotification(\n notification: NotificationCommonParams,\n): XiaomiNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"xiaomi\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents a template based push notification.\n */\nexport interface TemplateNotification extends JsonNotification {\n /**\n * The platform for the push notification.\n */\n platform: \"template\";\n}\n\n/**\n * Creates a template notification.\n * @param notification - A partial message used to be used for a template notification.\n * @returns A newly created Firebase.\n */\nexport function createTemplateNotification(\n notification: NotificationCommonParams,\n): TemplateNotification {\n const body = isString(notification.body) ? notification.body : JSON.stringify(notification.body);\n\n return {\n ...notification,\n body,\n platform: \"template\",\n contentType: Constants.JSON_CONTENT_TYPE,\n };\n}\n\n/**\n * Represents the possible WNS content-types.\n */\nexport type WindowsContentType = \"application/xml\" | \"application/octet-stream\";\n\n/**\n * Represents a Windows Notification Services (WNS) push notification.\n */\nexport interface WindowsNotification extends NotificationCommon {\n /**\n * The platform for the push notification.\n */\n platform: \"windows\";\n\n /**\n * The content type for the push notification.\n */\n contentType: WindowsContentType;\n}\n\n/**\n * Represents a WNS notification that can be sent to a device.\n */\nexport interface WnsNotificationParams {\n /**\n * The body for the push notification.\n */\n body: string;\n\n /**\n * The headers to include for the push notification.\n */\n headers?: WindowsHeaders;\n}\n\n/**\n * Creates a notification to send to WNS.\n * @param notification - The WNS notification to send.\n * @returns A newly created WNS message.\n */\nexport function createWindowsNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n if (notification?.headers && notification.headers[\"X-WNS-Type\"]) {\n const wnsType = notification.headers[\"X-WNS-Type\"];\n switch (wnsType) {\n case Constants.WNS_TOAST:\n return createWindowsToastNotification(notification);\n case Constants.WNS_TITLE:\n return createWindowsTileNotification(notification);\n case Constants.WNS_BADGE:\n return createWindowsBadgeNotification(notification);\n case Constants.WNS_RAW:\n return createWindowsRawNotification(notification);\n default:\n throw new Error(`Invalid WNS type: ${wnsType}`);\n }\n } else {\n throw new Error(`Missing WNS type in headers`);\n }\n}\n\n/**\n * Creates a badge message to send to WNS.\n * @param notification - A partial message used to create a badge message for WNS.\n * @returns A newly created WNS badge.\n */\nexport function createWindowsBadgeNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_BADGE;\n }\n\n return result;\n}\n\n/**\n * Creates a tile message to send to WNS.\n * @param notification - A partial message used to create a tile message for WNS.\n * @returns A newly created WNS tile.\n */\nexport function createWindowsTileNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TITLE;\n }\n\n return result;\n}\n\n/**\n * Creates a toast message to send to WNS.\n * @param notification - A partial message used to create a toast message for WNS.\n * @returns A newly created WNS toast.\n */\nexport function createWindowsToastNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.XML_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_TOAST;\n }\n\n return result;\n}\n\n/**\n * Creates a notification to send to WNS in wns/raw format..\n * @param notification - A partial message used to create a message for WNS in XML format.\n * @returns A newly created WNS message using XML.\n */\nexport function createWindowsRawNotification(\n notification: WnsNotificationParams,\n): WindowsNotification {\n const result: WindowsNotification = {\n ...notification,\n platform: \"windows\",\n contentType: Constants.STREAM_CONTENT_TYPE,\n };\n\n if (!result.headers) {\n result.headers = {};\n }\n\n if (!result.headers[Constants.WNS_TYPE_NAME]) {\n result.headers[Constants.WNS_TYPE_NAME] = Constants.WNS_RAW;\n }\n\n return result;\n}\n\n/**\n * Represents the possible push notification messages types.\n */\nexport type Notification =\n | AppleNotification\n | AdmNotification\n | BaiduNotification\n | BrowserNotification\n | FcmLegacyNotification\n | FcmV1Notification\n | XiaomiNotification\n | WindowsNotification\n | TemplateNotification;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"notificationHubJob.d.ts","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,sBAAsB;AAChC;;GAEG;AACD,qBAAqB;AAEvB;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B;AAE7B;;GAEG;GACD,2BAA2B,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,wBAAwB;AAClC;;GAEG;AACD,SAAS;AAEX;;;GAGG;GACD,SAAS;AAEX;;;GAGG;GACD,WAAW;AAEb;;GAEG;GACD,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAElC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,cAAc,CAAC,kBAAkB,CAAC,EAClC,kBAAkB,CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationHubJob.js","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationState, PollerLike } from \"@azure/core-lro\";\n\n/**\n * Describes the types of notification hub jobs.\n */\nexport type NotificationHubJobType =\n /**\n * Job type to bulk get registrations.\n */\n | \"ExportRegistrations\"\n\n /**\n * Job type to bulk create registrations.\n */\n | \"ImportCreateRegistrations\"\n\n /**\n * Job type to bulk update registrations.\n */\n | \"ImportUpdateRegistrations\"\n\n /**\n * Job type to bulk delete registrations.\n */\n | \"ImportDeleteRegistrations\"\n\n /**\n * Job type to bulk upsert registrations.\n */\n | \"ImportUpsertRegistrations\";\n\n/**\n * Describes the types of notification hub job statuses.\n */\nexport type NotificationHubJobStatus =\n /**\n * Indicates that the NotificationHubJob was accepted.\n */\n | \"Started\"\n\n /**\n * Indicates that the NotificationHubJob is currently running. Depending on the amount of data,\n * a job may stay in this state for several hours.\n */\n | \"Running\"\n\n /**\n * Indicates that the NotificationHubJob was completed successfully. Any output\n * will be ready where configured via the NotificationHubJob object.\n */\n | \"Completed\"\n\n /**\n * Indicates that the NotificationHubJob has failed.\n */\n | \"Failed\";\n\n/**\n * Represents a Notification Hub Job.\n */\nexport interface NotificationHubJob {\n /**\n * The unique job identifier.\n */\n jobId?: string;\n\n /**\n * The output file name.\n */\n outputFileName?: string;\n\n /**\n * The file name for the job failures.\n */\n failuresFileName?: string;\n\n /**\n * The progress for the job.\n */\n progress?: number;\n\n /**\n * The type of job.\n */\n type: NotificationHubJobType;\n\n /**\n * The status of the job.\n */\n status?: NotificationHubJobStatus;\n\n /**\n * The output container URL.\n */\n outputContainerUrl: string;\n\n /**\n * The import file URL.\n */\n importFileUrl?: string;\n\n /**\n * The input properties for the notification hub job.\n */\n inputProperties?: Record<string, string>;\n\n /**\n * Gets the notification hub job failure message.\n */\n failure?: string;\n\n /**\n * The output properties for the notification hub job.\n */\n outputProperties?: Record<string, string>;\n\n /**\n * Notification hub job created date.\n */\n createdAt?: Date;\n\n /**\n * Notification hub job last updated date.\n */\n updatedAt?: Date;\n}\n\n/**\n * Describes a poller for NotificationHubJob types.\n */\nexport type NotificationHubJobPoller = PollerLike<\n OperationState<NotificationHubJob>,\n NotificationHubJob\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"notificationHubJob.js","sourceRoot":"","sources":["../../../src/models/notificationHubJob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationState, PollerLike } from \"@azure/core-lro\";\n\n/**\n * Describes the types of notification hub jobs.\n */\nexport type NotificationHubJobType =\n /**\n * Job type to bulk get registrations.\n */\n | \"ExportRegistrations\"\n\n /**\n * Job type to bulk create registrations.\n */\n | \"ImportCreateRegistrations\"\n\n /**\n * Job type to bulk update registrations.\n */\n | \"ImportUpdateRegistrations\"\n\n /**\n * Job type to bulk delete registrations.\n */\n | \"ImportDeleteRegistrations\"\n\n /**\n * Job type to bulk upsert registrations.\n */\n | \"ImportUpsertRegistrations\";\n\n/**\n * Describes the types of notification hub job statuses.\n */\nexport type NotificationHubJobStatus =\n /**\n * Indicates that the NotificationHubJob was accepted.\n */\n | \"Started\"\n\n /**\n * Indicates that the NotificationHubJob is currently running. Depending on the amount of data,\n * a job may stay in this state for several hours.\n */\n | \"Running\"\n\n /**\n * Indicates that the NotificationHubJob was completed successfully. Any output\n * will be ready where configured via the NotificationHubJob object.\n */\n | \"Completed\"\n\n /**\n * Indicates that the NotificationHubJob has failed.\n */\n | \"Failed\";\n\n/**\n * Represents a Notification Hub Job.\n */\nexport interface NotificationHubJob {\n /**\n * The unique job identifier.\n */\n jobId?: string;\n\n /**\n * The output file name.\n */\n outputFileName?: string;\n\n /**\n * The file name for the job failures.\n */\n failuresFileName?: string;\n\n /**\n * The progress for the job.\n */\n progress?: number;\n\n /**\n * The type of job.\n */\n type: NotificationHubJobType;\n\n /**\n * The status of the job.\n */\n status?: NotificationHubJobStatus;\n\n /**\n * The output container URL.\n */\n outputContainerUrl: string;\n\n /**\n * The import file URL.\n */\n importFileUrl?: string;\n\n /**\n * The input properties for the notification hub job.\n */\n inputProperties?: Record<string, string>;\n\n /**\n * Gets the notification hub job failure message.\n */\n failure?: string;\n\n /**\n * The output properties for the notification hub job.\n */\n outputProperties?: Record<string, string>;\n\n /**\n * Notification hub job created date.\n */\n createdAt?: Date;\n\n /**\n * Notification hub job last updated date.\n */\n updatedAt?: Date;\n}\n\n/**\n * Describes a poller for NotificationHubJob types.\n */\nexport type NotificationHubJobPoller = PollerLike<\n OperationState<NotificationHubJob>,\n NotificationHubJob\n>;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClientOptions, OperationOptions } from "@azure-rest/core-client";
|
|
2
|
-
import { BrowserPushChannel } from "./installation.js";
|
|
1
|
+
import type { ClientOptions, OperationOptions } from "@azure-rest/core-client";
|
|
2
|
+
import type { BrowserPushChannel } from "./installation.js";
|
|
3
3
|
/**
|
|
4
4
|
* Describes the options that can be provided while creating the NotificationHubsClientContext.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,aAAa;CAAG;AAEvE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;IACxE;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gCAAgC;IAC/E;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,kBAAkB,GAAG,MAAM,EAAE,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC7E;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|