@azure/notification-hubs 1.2.4-alpha.20240628.1 → 1.2.4-alpha.20240704.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/api/notification-hubs.d.ts +0 -2
  2. package/dist/browser/api/clientContext.d.ts +0 -1
  3. package/dist/browser/api/clientContext.d.ts.map +1 -1
  4. package/dist/browser/api/internal/_client.d.ts +0 -1
  5. package/dist/browser/api/internal/_client.d.ts.map +1 -1
  6. package/dist/commonjs/api/beginSubmitNotificationHubJob.js +1 -2
  7. package/dist/commonjs/api/beginSubmitNotificationHubJob.js.map +1 -1
  8. package/dist/commonjs/api/cancelScheduledNotification.js +1 -2
  9. package/dist/commonjs/api/cancelScheduledNotification.js.map +1 -1
  10. package/dist/commonjs/api/clientContext.d.ts +0 -1
  11. package/dist/commonjs/api/clientContext.d.ts.map +1 -1
  12. package/dist/commonjs/api/clientContext.js +1 -2
  13. package/dist/commonjs/api/clientContext.js.map +1 -1
  14. package/dist/commonjs/api/createOrUpdateInstallation.js +1 -2
  15. package/dist/commonjs/api/createOrUpdateInstallation.js.map +1 -1
  16. package/dist/commonjs/api/createOrUpdateRegistration.js +1 -2
  17. package/dist/commonjs/api/createOrUpdateRegistration.js.map +1 -1
  18. package/dist/commonjs/api/createRegistration.js +1 -2
  19. package/dist/commonjs/api/createRegistration.js.map +1 -1
  20. package/dist/commonjs/api/createRegistrationId.js +1 -2
  21. package/dist/commonjs/api/createRegistrationId.js.map +1 -1
  22. package/dist/commonjs/api/deleteInstallation.js +1 -2
  23. package/dist/commonjs/api/deleteInstallation.js.map +1 -1
  24. package/dist/commonjs/api/deleteRegistration.js +1 -2
  25. package/dist/commonjs/api/deleteRegistration.js.map +1 -1
  26. package/dist/commonjs/api/getFeedbackContainerUrl.js +1 -2
  27. package/dist/commonjs/api/getFeedbackContainerUrl.js.map +1 -1
  28. package/dist/commonjs/api/getInstallation.js +1 -2
  29. package/dist/commonjs/api/getInstallation.js.map +1 -1
  30. package/dist/commonjs/api/getNotificationHubJob.js +1 -2
  31. package/dist/commonjs/api/getNotificationHubJob.js.map +1 -1
  32. package/dist/commonjs/api/getNotificationOutcomeDetails.js +1 -2
  33. package/dist/commonjs/api/getNotificationOutcomeDetails.js.map +1 -1
  34. package/dist/commonjs/api/getRegistration.js +1 -2
  35. package/dist/commonjs/api/getRegistration.js.map +1 -1
  36. package/dist/commonjs/api/internal/_client.d.ts +0 -1
  37. package/dist/commonjs/api/internal/_client.d.ts.map +1 -1
  38. package/dist/commonjs/api/internal/_client.js +4 -5
  39. package/dist/commonjs/api/internal/_client.js.map +1 -1
  40. package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.js +1 -2
  41. package/dist/commonjs/api/internal/_createOrUpdateRegistrationDescription.js.map +1 -1
  42. package/dist/commonjs/api/internal/_listRegistrations.js +2 -3
  43. package/dist/commonjs/api/internal/_listRegistrations.js.map +1 -1
  44. package/dist/commonjs/api/listNotificationHubJobs.js +1 -2
  45. package/dist/commonjs/api/listNotificationHubJobs.js.map +1 -1
  46. package/dist/commonjs/api/listRegistrations.js +1 -2
  47. package/dist/commonjs/api/listRegistrations.js.map +1 -1
  48. package/dist/commonjs/api/listRegistrationsByChannel.js +1 -2
  49. package/dist/commonjs/api/listRegistrationsByChannel.js.map +1 -1
  50. package/dist/commonjs/api/listRegistrationsByTag.js +1 -2
  51. package/dist/commonjs/api/listRegistrationsByTag.js.map +1 -1
  52. package/dist/commonjs/api/scheduleNotification.js +1 -2
  53. package/dist/commonjs/api/scheduleNotification.js.map +1 -1
  54. package/dist/commonjs/api/sendNotification.js +1 -2
  55. package/dist/commonjs/api/sendNotification.js.map +1 -1
  56. package/dist/commonjs/api/submitNotificationHubJob.js +1 -2
  57. package/dist/commonjs/api/submitNotificationHubJob.js.map +1 -1
  58. package/dist/commonjs/api/updateInstallation.js +1 -2
  59. package/dist/commonjs/api/updateInstallation.js.map +1 -1
  60. package/dist/commonjs/api/updateRegistration.js +1 -2
  61. package/dist/commonjs/api/updateRegistration.js.map +1 -1
  62. package/dist/commonjs/auth/connectionStringUtils.js +2 -3
  63. package/dist/commonjs/auth/connectionStringUtils.js.map +1 -1
  64. package/dist/commonjs/auth/hmacSha256.js +1 -2
  65. package/dist/commonjs/auth/hmacSha256.js.map +1 -1
  66. package/dist/commonjs/models/installation.js +8 -9
  67. package/dist/commonjs/models/installation.js.map +1 -1
  68. package/dist/commonjs/models/notification.js +13 -14
  69. package/dist/commonjs/models/notification.js.map +1 -1
  70. package/dist/commonjs/models/notificationBodyBuilder.js +6 -7
  71. package/dist/commonjs/models/notificationBodyBuilder.js.map +1 -1
  72. package/dist/commonjs/models/registration.js +16 -17
  73. package/dist/commonjs/models/registration.js.map +1 -1
  74. package/dist/commonjs/models/tagExpressionBuilder.js +1 -2
  75. package/dist/commonjs/models/tagExpressionBuilder.js.map +1 -1
  76. package/dist/commonjs/serializers/notificationDetailsSerializer.js +1 -2
  77. package/dist/commonjs/serializers/notificationDetailsSerializer.js.map +1 -1
  78. package/dist/commonjs/serializers/notificationHubJobSerializer.js +3 -4
  79. package/dist/commonjs/serializers/notificationHubJobSerializer.js.map +1 -1
  80. package/dist/commonjs/serializers/notificationOutcomeSerializer.js +1 -2
  81. package/dist/commonjs/serializers/notificationOutcomeSerializer.js.map +1 -1
  82. package/dist/commonjs/utils/notificationUtils.js +1 -2
  83. package/dist/commonjs/utils/notificationUtils.js.map +1 -1
  84. package/dist/commonjs/utils/optionUtils.js +2 -3
  85. package/dist/commonjs/utils/optionUtils.js.map +1 -1
  86. package/dist/commonjs/utils/registrationUtils.js +1 -2
  87. package/dist/commonjs/utils/registrationUtils.js.map +1 -1
  88. package/dist/commonjs/utils/utils.js +11 -12
  89. package/dist/commonjs/utils/utils.js.map +1 -1
  90. package/dist/commonjs/utils/xmlUtils.js +5 -5
  91. package/dist/commonjs/utils/xmlUtils.js.map +1 -1
  92. package/dist/esm/api/clientContext.d.ts +0 -1
  93. package/dist/esm/api/clientContext.d.ts.map +1 -1
  94. package/dist/esm/api/internal/_client.d.ts +0 -1
  95. package/dist/esm/api/internal/_client.d.ts.map +1 -1
  96. package/dist/react-native/api/clientContext.d.ts +0 -1
  97. package/dist/react-native/api/clientContext.d.ts.map +1 -1
  98. package/dist/react-native/api/internal/_client.d.ts +0 -1
  99. package/dist/react-native/api/internal/_client.d.ts.map +1 -1
  100. package/package.json +5 -4
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
-
3
1
  import { ClientOptions } from '@azure-rest/core-client';
4
2
  import { HttpHeaders } from '@azure/core-rest-pipeline';
5
3
  import { OperationOptions } from '@azure-rest/core-client';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { HttpHeaders, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline";
3
2
  import { NotificationHubsClientOptions } from "../models/options.js";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.d.ts","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAIA,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAIjB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhG;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,6BAA6B,CAE/B"}
1
+ {"version":3,"file":"clientContext.d.ts","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAIjB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhG;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,6BAA6B,CAE/B"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { HttpHeaders, HttpMethods, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline";
3
2
  import { NotificationHubsMessageResponse, NotificationHubsResponse } from "../../models/notificationDetails.js";
4
3
  import { NotificationHubsClientContext } from "../index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"_client.d.ts","sourceRoot":"","sources":["../../../../src/api/internal/_client.ts"],"names":[],"mappings":";AAGA,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAGjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC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6BAA6B,EACtC,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,GACnC,OAAO,CAAC,gBAAgB,CAAC,CA4B3B"}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.beginSubmitNotificationHubJob = void 0;
5
+ exports.beginSubmitNotificationHubJob = beginSubmitNotificationHubJob;
6
6
  const core_util_1 = require("@azure/core-util");
7
7
  const getNotificationHubJob_js_1 = require("./getNotificationHubJob.js");
8
8
  const submitNotificationHubJob_js_1 = require("./submitNotificationHubJob.js");
@@ -115,5 +115,4 @@ async function beginSubmitNotificationHubJob(context, notificationHubJob, polled
115
115
  };
116
116
  return poller;
117
117
  }
118
- exports.beginSubmitNotificationHubJob = beginSubmitNotificationHubJob;
119
118
  //# sourceMappingURL=beginSubmitNotificationHubJob.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"beginSubmitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/beginSubmitNotificationHubJob.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAOlC,gDAAyC;AACzC,yEAAmE;AACnE,+EAAyE;AAEzE;;;;;;GAMG;AACI,KAAK,UAAU,6BAA6B,CACjD,OAAsC,EACtC,kBAAsC,EACtC,yBAAiD,EAAE;;IAEnD,IAAI,YAAY,GAAG,MAAM,IAAA,sDAAwB,EAC/C,OAAO,EACP,kBAAkB,EAClB,sBAAsB,CACvB,CAAC;IAIF,MAAM,KAAK,GAAuC;QAChD,MAAM,EAAE,YAAY;KACrB,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAmB,CAAC;IACrD,MAAM,wBAAwB,GAAG,KAAK,IAAmB,EAAE,CACzD,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IA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AAK,CAAC,KAAK,CAAC;oBACpB,KAAK,YAAY,CAAC;oBAClB,KAAK,SAAS;wBACZ,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,aAAa,GAAG,SAAS,CAAC;YAC5B,CAAC,CAAC,EAAC,CAAC;QACN,CAAC;QAED,UAAU,CAAC,QAA6D;YACtE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;YACnB,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAEnC,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM;YACJ,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;QAED,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;YACxB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAC;QAChB,CAAC;QAED,SAAS;YACP,OAAO,aAAa,KAAK,SAAS,CAAC;QACrC,CAAC;QAED,iBAAiB;YACf,OAAO,KAAK,CAAC;QACf,CAAC;QAED,SAAS;YACP,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AA/HD,sEA+HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CancelOnProgress, OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PolledOperationOptions } from \"../models/options.js\";\nimport { delay } from \"@azure/core-util\";\nimport { getNotificationHubJob } from \"./getNotificationHubJob.js\";\nimport { submitNotificationHubJob } from \"./submitNotificationHubJob.js\";\n\n/**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param context - The Notification Hubs client.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\nexport async function beginSubmitNotificationHubJob(\n context: NotificationHubsClientContext,\n notificationHubJob: NotificationHubJob,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<NotificationHubJobPoller> {\n let submittedJob = await submitNotificationHubJob(\n context,\n notificationHubJob,\n polledOperationOptions,\n );\n\n type Handler = (state: OperationState<NotificationHubJob>) => void;\n\n const state: OperationState<NotificationHubJob> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<NotificationHubJob> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob> = {\n async poll(options?: { abortSignal?: AbortSignalLike }): Promise<void> {\n submittedJob = await getNotificationHubJob(context, submittedJob.jobId!, options);\n if (submittedJob.status === \"Running\" || submittedJob.status === \"Started\") {\n state.status = \"running\";\n }\n\n if (submittedJob.status === \"Completed\") {\n state.status = \"succeeded\";\n state.result = submittedJob;\n }\n\n if (submittedJob.status === \"Failed\") {\n state.status = \"failed\";\n state.error = new Error(submittedJob.failure);\n }\n\n await processProgressCallbacks();\n\n if (state.status === \"canceled\") {\n throw new Error(\"Operation was canceled\");\n }\n if (state.status === \"failed\") {\n throw state.error;\n }\n },\n\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<NotificationHubJob> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult() as NotificationHubJob;\n case \"canceled\":\n throw new Error(\"Operation was canceled\");\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(callback: (state: OperationState<NotificationHubJob>) => void): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<NotificationHubJob> {\n return state;\n },\n\n getResult(): NotificationHubJob | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n };\n\n return poller;\n}\n"]}
1
+ {"version":3,"file":"beginSubmitNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/beginSubmitNotificationHubJob.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,sEA+HC;AA1ID,gDAAyC;AACzC,yEAAmE;AACnE,+EAAyE;AAEzE;;;;;;GAMG;AACI,KAAK,UAAU,6BAA6B,CACjD,OAAsC,EACtC,kBAAsC,EACtC,yB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C;QACtB,CAAC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CancelOnProgress, OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { NotificationHubJob, NotificationHubJobPoller } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { PolledOperationOptions } from \"../models/options.js\";\nimport { delay } from \"@azure/core-util\";\nimport { getNotificationHubJob } from \"./getNotificationHubJob.js\";\nimport { submitNotificationHubJob } from \"./submitNotificationHubJob.js\";\n\n/**\n * Submits a Notification Hub job and creates a poller to poll for results.\n * @param context - The Notification Hubs client.\n * @param notificationHubJob - The Notification Hub import/export job to start.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\nexport async function beginSubmitNotificationHubJob(\n context: NotificationHubsClientContext,\n notificationHubJob: NotificationHubJob,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<NotificationHubJobPoller> {\n let submittedJob = await submitNotificationHubJob(\n context,\n notificationHubJob,\n polledOperationOptions,\n );\n\n type Handler = (state: OperationState<NotificationHubJob>) => void;\n\n const state: OperationState<NotificationHubJob> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<NotificationHubJob> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<OperationState<NotificationHubJob>, NotificationHubJob> = {\n async poll(options?: { abortSignal?: AbortSignalLike }): Promise<void> {\n submittedJob = await getNotificationHubJob(context, submittedJob.jobId!, options);\n if (submittedJob.status === \"Running\" || submittedJob.status === \"Started\") {\n state.status = \"running\";\n }\n\n if (submittedJob.status === \"Completed\") {\n state.status = \"succeeded\";\n state.result = submittedJob;\n }\n\n if (submittedJob.status === \"Failed\") {\n state.status = \"failed\";\n state.error = new Error(submittedJob.failure);\n }\n\n await processProgressCallbacks();\n\n if (state.status === \"canceled\") {\n throw new Error(\"Operation was canceled\");\n }\n if (state.status === \"failed\") {\n throw state.error;\n }\n },\n\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<NotificationHubJob> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult() as NotificationHubJob;\n case \"canceled\":\n throw new Error(\"Operation was canceled\");\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(callback: (state: OperationState<NotificationHubJob>) => void): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<NotificationHubJob> {\n return state;\n },\n\n getResult(): NotificationHubJob | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n };\n\n return poller;\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.cancelScheduledNotification = void 0;
5
+ exports.cancelScheduledNotification = cancelScheduledNotification;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "cancelScheduledNotification";
@@ -24,5 +24,4 @@ function cancelScheduledNotification(context, notificationId, options = {}) {
24
24
  return (0, _client_js_1.parseNotificationSendResponse)(response);
25
25
  });
26
26
  }
27
- exports.cancelScheduledNotification = cancelScheduledNotification;
28
27
  //# sourceMappingURL=cancelScheduledNotification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cancelScheduledNotification.js","sourceRoot":"","sources":["../../../src/api/cancelScheduledNotification.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAkG;AAIlG,oDAAoD;AAEpD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,2BAA2B,cAAc,EAAE,CAAC;QAEjE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAE3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,0CAA6B,EAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CACF,CAAC;AACJ,CAAC;AApBD,kEAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"cancelScheduledNotification\";\n\n/**\n * Cancels the scheduled notification with the given notification ID.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\nexport function cancelScheduledNotification(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/schedulednotifications/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationSendResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"cancelScheduledNotification.js","sourceRoot":"","sources":["../../../src/api/cancelScheduledNotification.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,kEAoBC;AApCD,sDAAkG;AAIlG,oDAAoD;AAEpD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,2BAA2B,cAAc,EAAE,CAAC;QAEjE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAE3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,0CAA6B,EAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationSendResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"cancelScheduledNotification\";\n\n/**\n * Cancels the scheduled notification with the given notification ID.\n * NOTE: This is only available in Standard SKU Azure Notification Hubs.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID from the scheduled notification.\n * @param options - The operation options.\n * @returns A notification hub response with correlation ID and tracking ID.\n */\nexport function cancelScheduledNotification(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/schedulednotifications/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationSendResponse(response);\n },\n );\n}\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { HttpHeaders, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline";
3
2
  import { NotificationHubsClientOptions } from "../models/options.js";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.d.ts","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAIA,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAIjB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhG;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,6BAA6B,CAE/B"}
1
+ {"version":3,"file":"clientContext.d.ts","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAIjB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEjE;;OAEG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhG;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,6BAA6B,CAE/B"}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createClientContext = void 0;
5
+ exports.createClientContext = createClientContext;
6
6
  const tslib_1 = require("tslib");
7
7
  const constants = tslib_1.__importStar(require("../utils/constants.js"));
8
8
  const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
@@ -18,7 +18,6 @@ const API_VERSION = "2020-06";
18
18
  function createClientContext(connectionString, hubName, options = {}) {
19
19
  return new NotificationHubsServiceClient(connectionString, hubName, options);
20
20
  }
21
- exports.createClientContext = createClientContext;
22
21
  class NotificationHubsServiceClient {
23
22
  constructor(connectionString, hubName, options = {}) {
24
23
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,yEAAmD;AACnD,kEAQmC;AACnC,+EAG0C;AAG1C,yDAA4D;AAE5D,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OA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E,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,OAAO,GAAG,IAAA,sCAAiB,EAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CACT,sBAAsB,EACtB,8CAA8C,aAAa,EAAE,CAC9D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as constants from \"../utils/constants.js\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createDefaultHttpClient,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport { NotificationHubsClientOptions } from \"../models/options.js\";\nimport { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport { Client, getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
1
+ {"version":3,"file":"clientContext.js","sourceRoot":"","sources":["../../../src/api/clientContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgDlC,kDAMC;;AApDD,yEAAmD;AACnD,kEAQmC;AACnC,+EAG0C;AAG1C,yDAA4D;AAE5D,MAAM,WAAW,GAAG,SAAS,CAAC;AAsB9B;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;IAE3C,OAAO,IAAI,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,6BAA6B;IAOjC,YACE,gBAAwB,EACxB,OAAe,EACf,UAAyC,EAAE;;QAE3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,gBAAgB,GAAG,IAAA,gEAAqC,EAAC,gBAAgB,CAAC,CAAC;QACjF,mFAAmF;QACnF,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACtE,IAAI,CAAC,kBAAkB,GAAG,IAAA,8DAAmC,EAC3D,gBAAgB,CAAC,eAAe,EAChC,gBAAgB,CAAC,mBAAmB,CACrC,CAAC;QAEF,MAAM,cAAc,GAAG,6BAA6B,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5E,MAAM,eAAe,GAAG,CAAA,MAAA,OAAO,CAAC,gBAAgB,0CAAE,eAAe;YAC/D,CAAC,CAAC,GAAG,OAAO,CAAC,gB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AC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as constants from \"../utils/constants.js\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RestError,\n createDefaultHttpClient,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\nimport {\n createTokenCredentialFromConnection,\n parseNotificationHubsConnectionString,\n} from \"../auth/connectionStringUtils.js\";\nimport { NotificationHubsClientOptions } from \"../models/options.js\";\nimport { SasTokenCredential } from \"../auth/sasTokenCredential.js\";\nimport { Client, getClient } from \"@azure-rest/core-client\";\n\nconst API_VERSION = \"2020-06\";\n\n/**\n * Represents the Notification Hubs SDK client context.\n */\nexport interface NotificationHubsClientContext {\n /**\n * @internal\n */\n sendRequest(request: PipelineRequest): Promise<PipelineResponse>;\n\n /**\n * @internal\n */\n createHeaders(operationName: string, rawHeaders?: Record<string, string>): Promise<HttpHeaders>;\n\n /**\n * @internal\n */\n requestUrl(): URL;\n}\n\n/**\n * Creates a NotificationHubClient from the Access Policy connection string and hub name.\n * @param connectionString - The Access Policy connection string for the notification hub.\n * @param hubName - The notification hub name.\n * @returns A NotificationHubsClientContext initialized from the connection string and hub name.\n */\nexport function createClientContext(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n): NotificationHubsClientContext {\n return new NotificationHubsServiceClient(connectionString, hubName, options);\n}\n\nclass NotificationHubsServiceClient implements NotificationHubsClientContext {\n sasTokenCredential: SasTokenCredential;\n baseUrl: string;\n hubName: string;\n client: Client;\n httpClient: HttpClient;\n\n constructor(\n connectionString: string,\n hubName: string,\n options: NotificationHubsClientOptions = {},\n ) {\n this.hubName = hubName;\n\n const parsedConnection = parseNotificationHubsConnectionString(connectionString);\n // Node doesn't allow change in protocol but browsers do, so doing a string replace\n this.baseUrl = parsedConnection.endpoint.replace(\"sb://\", \"https://\");\n this.sasTokenCredential = createTokenCredentialFromConnection(\n parsedConnection.sharedAccessKey,\n parsedConnection.sharedAccessKeyName,\n );\n\n const packageDetails = `azsdk-js-notificationhubs/${constants.SDK_VERSION}`;\n const userAgentPrefix = options.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n this.httpClient = options?.httpClient ?? createDefaultHttpClient();\n this.client = getClient(this.baseUrl, {\n userAgentOptions: {\n userAgentPrefix,\n },\n ...options,\n });\n }\n\n async createHeaders(\n operationName: string,\n rawHeaders?: Record<string, string>,\n ): Promise<HttpHeaders> {\n const authorization = await this.sasTokenCredential.getToken(this.baseUrl);\n if (!authorization) {\n throw new RestError(\"Failed to get the authorization header\", { statusCode: 401 });\n }\n\n const headers = createHttpHeaders(rawHeaders);\n headers.set(\"Authorization\", authorization.token);\n headers.set(\"x-ms-version\", API_VERSION);\n headers.set(\n \"x-ms-azsdk-telemetry\",\n `class=NotificationHubsServiceClient;method=${operationName}`,\n );\n\n return headers;\n }\n\n sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n return this.client.pipeline.sendRequest(this.httpClient, request);\n }\n\n requestUrl(): URL {\n const url = new URL(this.baseUrl);\n url.pathname = this.hubName;\n url.searchParams.set(\"api-version\", API_VERSION);\n\n return url;\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createOrUpdateInstallation = void 0;
5
+ exports.createOrUpdateInstallation = createOrUpdateInstallation;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "createOrUpdateInstallation";
@@ -25,5 +25,4 @@ function createOrUpdateInstallation(context, installation, options = {}) {
25
25
  return (0, _client_js_1.parseNotificationResponse)(response);
26
26
  });
27
27
  }
28
- exports.createOrUpdateInstallation = createOrUpdateInstallation;
29
28
  //# sourceMappingURL=createOrUpdateInstallation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOrUpdateInstallation.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAA8F;AAK9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACxC,OAAsC,EACtC,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,YAAY,CAAC,cAAc,EAAE,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC;AAvBD,gEAuBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateInstallation\";\n\n/**\n * Creates or overwrites an installation to a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function createOrUpdateInstallation(\n context: NotificationHubsClientContext,\n installation: Installation,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installation.installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PUT\", headers, updatedOptions);\n request.body = JSON.stringify(installation);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createOrUpdateInstallation.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,gEAuBC;AAvCD,sDAA8F;AAK9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACxC,OAAsC,EACtC,YAA0B,EAC1B,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,YAAY,CAAC,cAAc,EAAE,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAEhD,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateInstallation\";\n\n/**\n * Creates or overwrites an installation to a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installation - The installation to create or overwrite.\n * @param options - Configuration options for the create or update installation operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function createOrUpdateInstallation(\n context: NotificationHubsClientContext,\n installation: Installation,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installation.installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"PUT\", headers, updatedOptions);\n request.body = JSON.stringify(installation);\n\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createOrUpdateRegistration = void 0;
5
+ exports.createOrUpdateRegistration = createOrUpdateRegistration;
6
6
  const _createOrUpdateRegistrationDescription_js_1 = require("./internal/_createOrUpdateRegistrationDescription.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "createOrUpdateRegistration";
@@ -18,5 +18,4 @@ function createOrUpdateRegistration(context, registration, options = {}) {
18
18
  return (0, _createOrUpdateRegistrationDescription_js_1.createOrUpdateRegistrationDescription)(context, registration, "createOrUpdate", updatedOptions);
19
19
  });
20
20
  }
21
- exports.createOrUpdateRegistration = createOrUpdateRegistration;
22
21
  //# sourceMappingURL=createOrUpdateRegistration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOrUpdateRegistration.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAKlC,oHAA6G;AAC7G,oDAAoD;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACxC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,OAAO,IAAA,iFAAqC,EAC1C,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,CACf,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAjBD,gEAiBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateRegistration\";\n\n/**\n * Creates or updates a registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\nexport function createOrUpdateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n return createOrUpdateRegistrationDescription(\n context,\n registration,\n \"createOrUpdate\",\n updatedOptions,\n );\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createOrUpdateRegistration.js","sourceRoot":"","sources":["../../../src/api/createOrUpdateRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiBlC,gEAiBC;AA7BD,oHAA6G;AAC7G,oDAAoD;AAEpD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACxC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,OAAO,IAAA,iFAAqC,EAC1C,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,cAAc,CACf,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createOrUpdateRegistration\";\n\n/**\n * Creates or updates a registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create or update.\n * @param options - The operation options.\n * @returns The created or updated registration description.\n */\nexport function createOrUpdateRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n return createOrUpdateRegistrationDescription(\n context,\n registration,\n \"createOrUpdate\",\n updatedOptions,\n );\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createRegistration = void 0;
5
+ exports.createRegistration = createRegistration;
6
6
  const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
7
7
  const _createOrUpdateRegistrationDescription_js_1 = require("./internal/_createOrUpdateRegistrationDescription.js");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -25,5 +25,4 @@ function createRegistration(context, registration, options = {}) {
25
25
  return (0, _createOrUpdateRegistrationDescription_js_1.createOrUpdateRegistrationDescription)(context, registration, "create", updatedOptions);
26
26
  });
27
27
  }
28
- exports.createRegistration = createRegistration;
29
28
  //# sourceMappingURL=createRegistration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRegistration.js","sourceRoot":"","sources":["../../../src/api/createRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAKlC,kEAAsD;AACtD,oHAA6G;AAC7G,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,MAAM,IAAI,8BAAS,CAAC,0DAA0D,EAAE;gBAC9E,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,iFAAqC,EAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAChG,CAAC,CACF,CAAC;AACJ,CAAC;AAlBD,gDAkBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistration\";\n\n/**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\nexport function createRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (registration.registrationId) {\n throw new RestError(\"registrationId must not be set during a create operation\", {\n statusCode: 400,\n });\n }\n\n return createOrUpdateRegistrationDescription(context, registration, \"create\", updatedOptions);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createRegistration.js","sourceRoot":"","sources":["../../../src/api/createRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmBlC,gDAkBC;AAhCD,kEAAsD;AACtD,oHAA6G;AAC7G,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,YAAqC,EACrC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,MAAM,IAAI,8BAAS,CAAC,0DAA0D,EAAE;gBAC9E,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,iFAAqC,EAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAChG,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { createOrUpdateRegistrationDescription } from \"./internal/_createOrUpdateRegistrationDescription.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistration\";\n\n/**\n * Creates a new registration. This method generates a registration ID,\n * which you can subsequently use to retrieve, update, and delete this registration.\n * @param context - The Notification Hubs client.\n * @param registration - The registration to create.\n * @param options - Options for creating a new registration.\n * @returns The newly created registration description.\n */\nexport function createRegistration(\n context: NotificationHubsClientContext,\n registration: RegistrationDescription,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n if (registration.registrationId) {\n throw new RestError(\"registrationId must not be set during a create operation\", {\n statusCode: 400,\n });\n }\n\n return createOrUpdateRegistrationDescription(context, registration, \"create\", updatedOptions);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createRegistrationId = void 0;
5
+ exports.createRegistrationId = createRegistrationId;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -35,5 +35,4 @@ function createRegistrationId(context, options = {}) {
35
35
  return registrationId;
36
36
  });
37
37
  }
38
- exports.createRegistrationId = createRegistrationId;
39
38
  //# sourceMappingURL=createRegistrationId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRegistrationId.js","sourceRoot":"","sources":["../../../src/api/createRegistrationId.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAGnE,kEAAsD;AACtD,oDAAoD;AAEpD,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,CAAC;QAExC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,2GAA2G;QAC3G,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,8BAAS,CAAC,mBAAmB,cAAc,oBAAoB,EAAE;gBACzE,UAAU,EAAE,GAAG;gBACf,OAAO;gBACP,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,cAAe,CAAC,CAAC;QAC7C,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE1D,OAAO,cAAc,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC;AAhCD,oDAgCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistrationId\";\n\n/**\n * Creates a new registration ID.\n * @param context - The Notification Hubs client.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\nexport function createRegistrationId(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrationIDs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n const response = await sendRequest(context, request, 201);\n\n // In the form: https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/<registrationId>\n const locationHeader = response.headers.get(\"Location\");\n if (!locationHeader || !locationHeader.startsWith(\"https://\")) {\n throw new RestError(`Location header ${locationHeader} is an invalid URL`, {\n statusCode: 500,\n request,\n response,\n });\n }\n const locationUrl = new URL(locationHeader!);\n const registrationId = locationUrl.pathname.split(\"/\")[3];\n\n return registrationId;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"createRegistrationId.js","sourceRoot":"","sources":["../../../src/api/createRegistrationId.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,oDAgCC;AA9CD,sDAAmE;AAGnE,kEAAsD;AACtD,oDAAoD;AAEpD,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,CAAC;QAExC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,2GAA2G;QAC3G,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,8BAAS,CAAC,mBAAmB,cAAc,oBAAoB,EAAE;gBACzE,UAAU,EAAE,GAAG;gBACf,OAAO;gBACP,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,cAAe,CAAC,CAAC;QAC7C,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE1D,OAAO,cAAc,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"createRegistrationId\";\n\n/**\n * Creates a new registration ID.\n * @param context - The Notification Hubs client.\n * @param options - The options for creating a new registration ID.\n * @returns The newly created registration ID.\n */\nexport function createRegistrationId(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/registrationIDs\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"POST\", headers, updatedOptions);\n const response = await sendRequest(context, request, 201);\n\n // In the form: https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/<registrationId>\n const locationHeader = response.headers.get(\"Location\");\n if (!locationHeader || !locationHeader.startsWith(\"https://\")) {\n throw new RestError(`Location header ${locationHeader} is an invalid URL`, {\n statusCode: 500,\n request,\n response,\n });\n }\n const locationUrl = new URL(locationHeader!);\n const registrationId = locationUrl.pathname.split(\"/\")[3];\n\n return registrationId;\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.deleteInstallation = void 0;
5
+ exports.deleteInstallation = deleteInstallation;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "deleteInstallation";
@@ -23,5 +23,4 @@ function deleteInstallation(context, installationId, options = {}) {
23
23
  return (0, _client_js_1.parseNotificationResponse)(response);
24
24
  });
25
25
  }
26
- exports.deleteInstallation = deleteInstallation;
27
26
  //# sourceMappingURL=deleteInstallation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteInstallation.js","sourceRoot":"","sources":["../../../src/api/deleteInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAA8F;AAI9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC;AAnBD,gDAmBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteInstallation\";\n\n/**\n * Deletes an installation from a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 204);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"deleteInstallation.js","sourceRoot":"","sources":["../../../src/api/deleteInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiBlC,gDAmBC;AAlCD,sDAA8F;AAI9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteInstallation\";\n\n/**\n * Deletes an installation from a Notification Hub.\n * @param context - The Notification Hubs client.\n * @param installationId - The installation ID of the installation to delete.\n * @param options - Configuration options for the installation delete operation.\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 204);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.deleteRegistration = void 0;
5
+ exports.deleteRegistration = deleteRegistration;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const utils_js_1 = require("../utils/utils.js");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -26,5 +26,4 @@ function deleteRegistration(context, registrationId, options = {}) {
26
26
  return (0, _client_js_1.parseNotificationResponse)(response);
27
27
  });
28
28
  }
29
- exports.deleteRegistration = deleteRegistration;
30
29
  //# sourceMappingURL=deleteRegistration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRegistration.js","sourceRoot":"","sources":["../../../src/api/deleteRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAA8F;AAI9F,gDAA8C;AAC9C,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAAkC,EAAE;IAEpC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAA,oBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC;AAtBD,gDAsBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { EntityOperationOptions } from \"../models/options.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { isDefined } from \"../utils/utils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteRegistration\";\n\n/**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: EntityOperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n headers.set(\"If-Match\", isDefined(options.etag) ? `\"${options.etag}\"` : \"*\");\n\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"deleteRegistration.js","sourceRoot":"","sources":["../../../src/api/deleteRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,gDAsBC;AAtCD,sDAA8F;AAI9F,gDAA8C;AAC9C,oDAAoD;AAEpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,cAAsB,EACtB,UAAkC,EAAE;IAEpC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAA,oBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,sCAAyB,EAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, parseNotificationResponse, sendRequest } from \"./internal/_client.js\";\nimport { EntityOperationOptions } from \"../models/options.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { NotificationHubsResponse } from \"../models/notificationDetails.js\";\nimport { isDefined } from \"../utils/utils.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"deleteRegistration\";\n\n/**\n * Deletes a registration with the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The registration ID of the registration to delete.\n * @param options - The options for delete operations including the ETag\n * @returns A NotificationHubResponse with the tracking ID, correlation ID and location.\n */\nexport function deleteRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: EntityOperationOptions = {},\n): Promise<NotificationHubsResponse> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n headers.set(\"If-Match\", isDefined(options.etag) ? `\"${options.etag}\"` : \"*\");\n\n const request = createRequest(endpoint, \"DELETE\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationResponse(response);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getFeedbackContainerUrl = void 0;
5
+ exports.getFeedbackContainerUrl = getFeedbackContainerUrl;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "getFeedbackContainerUrl";
@@ -24,5 +24,4 @@ function getFeedbackContainerUrl(context, options = {}) {
24
24
  return response.bodyAsText;
25
25
  });
26
26
  }
27
- exports.getFeedbackContainerUrl = getFeedbackContainerUrl;
28
27
  //# sourceMappingURL=getFeedbackContainerUrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFeedbackContainerUrl.js","sourceRoot":"","sources":["../../../src/api/getFeedbackContainerUrl.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAGnE,oDAAoD;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,oBAAoB,CAAC;QAE1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC,UAAW,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC;AApBD,0DAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getFeedbackContainerUrl\";\n\n/**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param context - The Notification Hubs client.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\nexport function getFeedbackContainerUrl(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/feedbackcontainer\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return response.bodyAsText!;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getFeedbackContainerUrl.js","sourceRoot":"","sources":["../../../src/api/getFeedbackContainerUrl.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,0DAoBC;AAlCD,sDAAmE;AAGnE,oDAAoD;AAEpD,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,OAAsC,EACtC,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,oBAAoB,CAAC;QAE1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,QAAQ,CAAC,UAAW,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getFeedbackContainerUrl\";\n\n/**\n * Retrieves an Azure Storage container URL. The container has feedback data for the notification hub.\n * The caller can then use the Azure Storage Services SDK to retrieve the contents of the container.\n * @param context - The Notification Hubs client.\n * @param options - The options for getting the push notification feedback container URL.\n * @returns The URL of the Azure Storage Container containing the feedback data.\n */\nexport function getFeedbackContainerUrl(\n context: NotificationHubsClientContext,\n options: OperationOptions = {},\n): Promise<string> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += \"/feedbackcontainer\";\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return response.bodyAsText!;\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getInstallation = void 0;
5
+ exports.getInstallation = getInstallation;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const tracing_js_1 = require("../utils/tracing.js");
8
8
  const OPERATION_NAME = "getInstallation";
@@ -24,5 +24,4 @@ function getInstallation(context, installationId, options = {}) {
24
24
  return JSON.parse(response.bodyAsText);
25
25
  });
26
26
  }
27
- exports.getInstallation = getInstallation;
28
27
  //# sourceMappingURL=getInstallation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getInstallation.js","sourceRoot":"","sources":["../../../src/api/getInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAInE,oDAAoD;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,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,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAW,CAAiB,CAAC;IAC1D,CAAC,CACF,CAAC;AACJ,CAAC;AArBD,0CAqBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getInstallation\";\n\n/**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\nexport function getInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<Installation> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return JSON.parse(response.bodyAsText!) as Installation;\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getInstallation.js","sourceRoot":"","sources":["../../../src/api/getInstallation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiBlC,0CAqBC;AApCD,sDAAmE;AAInE,oDAAoD;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,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,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAW,CAAiB,CAAC;IAC1D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { Installation } from \"../models/installation.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getInstallation\";\n\n/**\n * Gets an Azure Notification Hub installation by the installation ID.\n * @param context - The Notification Hubs client.\n * @param installationId - The ID of the installation to get.\n * @param options - Configuration options for the get installation operation.\n * @returns The installation that matches the installation ID.\n */\nexport function getInstallation(\n context: NotificationHubsClientContext,\n installationId: string,\n options: OperationOptions = {},\n): Promise<Installation> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/installations/${installationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/json\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return JSON.parse(response.bodyAsText!) as Installation;\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getNotificationHubJob = void 0;
5
+ exports.getNotificationHubJob = getNotificationHubJob;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const notificationHubJobSerializer_js_1 = require("../serializers/notificationHubJobSerializer.js");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -25,5 +25,4 @@ function getNotificationHubJob(context, jobId, options = {}) {
25
25
  return (0, notificationHubJobSerializer_js_1.parseNotificationHubJobEntry)(response.bodyAsText);
26
26
  });
27
27
  }
28
- exports.getNotificationHubJob = getNotificationHubJob;
29
28
  //# sourceMappingURL=getNotificationHubJob.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/getNotificationHubJob.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAInE,oGAA8F;AAC9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;GAMG;AACH,SAAgB,qBAAqB,CACnC,OAAsC,EACtC,KAAa,EACb,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,SAAS,KAAK,EAAE,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,8DAA4B,EAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC;AArBD,sDAqBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobEntry } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationHubJob\";\n\n/**\n * Gets a Notification Hub Job by the ID.\n * @param context - The Notification Hubs client.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\nexport function getNotificationHubJob(\n context: NotificationHubsClientContext,\n jobId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/jobs/${jobId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getNotificationHubJob.js","sourceRoot":"","sources":["../../../src/api/getNotificationHubJob.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,sDAqBC;AArCD,sDAAmE;AAInE,oGAA8F;AAC9F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;GAMG;AACH,SAAgB,qBAAqB,CACnC,OAAsC,EACtC,KAAa,EACb,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,SAAS,KAAK,EAAE,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,+CAA+C,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,8DAA4B,EAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubJob } from \"../models/notificationHubJob.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationHubJobEntry } from \"../serializers/notificationHubJobSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationHubJob\";\n\n/**\n * Gets a Notification Hub Job by the ID.\n * @param context - The Notification Hubs client.\n * @param jobId - The Notification Hub Job ID.\n * @param options - The operation options.\n * @returns The Notification Hub Job with the matching ID.\n */\nexport function getNotificationHubJob(\n context: NotificationHubsClientContext,\n jobId: string,\n options: OperationOptions = {},\n): Promise<NotificationHubJob> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/jobs/${jobId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/atom+xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationHubJobEntry(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getNotificationOutcomeDetails = void 0;
5
+ exports.getNotificationOutcomeDetails = getNotificationOutcomeDetails;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const notificationDetailsSerializer_js_1 = require("../serializers/notificationDetailsSerializer.js");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -25,5 +25,4 @@ function getNotificationOutcomeDetails(context, notificationId, options = {}) {
25
25
  return (0, notificationDetailsSerializer_js_1.parseNotificationDetails)(response.bodyAsText);
26
26
  });
27
27
  }
28
- exports.getNotificationOutcomeDetails = getNotificationOutcomeDetails;
29
28
  //# sourceMappingURL=getNotificationOutcomeDetails.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNotificationOutcomeDetails.js","sourceRoot":"","sources":["../../../src/api/getNotificationOutcomeDetails.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAInE,sGAA2F;AAC3F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;GAOG;AACH,SAAgB,6BAA6B,CAC3C,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,aAAa,cAAc,EAAE,CAAC;QAEnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,2DAAwB,EAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC;AAnBD,sEAmBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationDetails } from \"../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationDetails } from \"../serializers/notificationDetailsSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationOutcomeDetails\";\n\n/**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\nexport function getNotificationOutcomeDetails(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationDetails> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/messages/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationDetails(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getNotificationOutcomeDetails.js","sourceRoot":"","sources":["../../../src/api/getNotificationOutcomeDetails.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmBlC,sEAmBC;AApCD,sDAAmE;AAInE,sGAA2F;AAC3F,oDAAoD;AAEpD,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;GAOG;AACH,SAAgB,6BAA6B,CAC3C,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,aAAa,cAAc,EAAE,CAAC;QAEnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,IAAA,2DAAwB,EAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationDetails } from \"../models/notificationDetails.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { parseNotificationDetails } from \"../serializers/notificationDetailsSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getNotificationOutcomeDetails\";\n\n/**\n * Retrieves the results of a send operation. This can retrieve intermediate results if the send is being processed\n * or final results if the Send* has completed. This API can only be called for Standard SKU and above.\n * @param context - The Notification Hubs client.\n * @param notificationId - The notification ID returned from the send operation.\n * @param options - The operation options.\n * @returns The results of the send operation.\n */\nexport function getNotificationOutcomeDetails(\n context: NotificationHubsClientContext,\n notificationId: string,\n options: OperationOptions = {},\n): Promise<NotificationDetails> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/messages/${notificationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return parseNotificationDetails(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getRegistration = void 0;
5
+ exports.getRegistration = getRegistration;
6
6
  const _client_js_1 = require("./internal/_client.js");
7
7
  const registrationSerializer_js_1 = require("../serializers/registrationSerializer.js");
8
8
  const tracing_js_1 = require("../utils/tracing.js");
@@ -25,5 +25,4 @@ function getRegistration(context, registrationId, options = {}) {
25
25
  return registrationSerializer_js_1.registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText);
26
26
  });
27
27
  }
28
- exports.getRegistration = getRegistration;
29
28
  //# sourceMappingURL=getRegistration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRegistration.js","sourceRoot":"","sources":["../../../src/api/getRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sDAAmE;AAInE,wFAAyF;AACzF,oDAAoD;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yDAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACpF,CAAC,CACF,CAAC;AACJ,CAAC;AArBD,0CAqBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getRegistration\";\n\n/**\n * Gets a registration by the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\nexport function getRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"getRegistration.js","sourceRoot":"","sources":["../../../src/api/getRegistration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,0CAqBC;AArCD,sDAAmE;AAInE,wFAAyF;AACzF,oDAAoD;AAEpD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,OAAsC,EACtC,cAAsB,EACtB,UAA4B,EAAE;IAE9B,OAAO,0BAAa,CAAC,QAAQ,CAC3B,iCAAiC,cAAc,EAAE,EACjD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,IAAI,kBAAkB,cAAc,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,0CAA0C,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1D,OAAO,yDAA6B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC;IACpF,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createRequest, sendRequest } from \"./internal/_client.js\";\nimport { NotificationHubsClientContext } from \"./index.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { RegistrationDescription } from \"../models/registration.js\";\nimport { registrationDescriptionParser } from \"../serializers/registrationSerializer.js\";\nimport { tracingClient } from \"../utils/tracing.js\";\n\nconst OPERATION_NAME = \"getRegistration\";\n\n/**\n * Gets a registration by the given registration ID.\n * @param context - The Notification Hubs client.\n * @param registrationId - The ID of the registration to get.\n * @param options - The options for getting a registration by ID.\n * @returns A RegistrationDescription that has the given registration ID.\n */\nexport function getRegistration(\n context: NotificationHubsClientContext,\n registrationId: string,\n options: OperationOptions = {},\n): Promise<RegistrationDescription> {\n return tracingClient.withSpan(\n `NotificationHubsClientContext.${OPERATION_NAME}`,\n options,\n async (updatedOptions) => {\n const endpoint = context.requestUrl();\n endpoint.pathname += `/registrations/${registrationId}`;\n\n const headers = await context.createHeaders(OPERATION_NAME);\n headers.set(\"Content-Type\", \"application/xml;type=entry;charset=utf-8\");\n\n const request = createRequest(endpoint, \"GET\", headers, updatedOptions);\n const response = await sendRequest(context, request, 200);\n\n return registrationDescriptionParser.parseRegistrationEntry(response.bodyAsText!);\n },\n );\n}\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { HttpHeaders, HttpMethods, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline";
3
2
  import { NotificationHubsMessageResponse, NotificationHubsResponse } from "../../models/notificationDetails.js";
4
3
  import { NotificationHubsClientContext } from "../index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"_client.d.ts","sourceRoot":"","sources":["../../../../src/api/internal/_client.ts"],"names":[],"mappings":";AAGA,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAGjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,gBAAgB,GACxB,eAAe,CASjB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,wBAAwB,CAU9F;AAED;;;;GAIG;AACH,wBAAsB,6BAA6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