@azure-rest/health-insights-radiologyinsights 1.0.0-alpha.20241125.1 → 1.0.0-alpha.20241126.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 (249) hide show
  1. package/{types/src → dist/browser}/azureHealthInsightsClient.d.ts +1 -1
  2. package/{types/src → dist/browser}/azureHealthInsightsClient.d.ts.map +1 -1
  3. package/{dist-esm/src → dist/browser}/azureHealthInsightsClient.js +1 -1
  4. package/dist/browser/azureHealthInsightsClient.js.map +1 -0
  5. package/{types/src → dist/browser}/clientDefinitions.d.ts +2 -2
  6. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  7. package/dist/browser/clientDefinitions.js.map +1 -0
  8. package/dist/browser/index.d.ts +12 -0
  9. package/dist/browser/index.d.ts.map +1 -0
  10. package/dist/browser/index.js +15 -0
  11. package/dist/browser/index.js.map +1 -0
  12. package/{types/src → dist/browser}/isUnexpected.d.ts +1 -1
  13. package/dist/browser/isUnexpected.d.ts.map +1 -0
  14. package/dist/browser/isUnexpected.js.map +1 -0
  15. package/dist/browser/package.json +3 -0
  16. package/{types/src → dist/browser}/parameters.d.ts +1 -1
  17. package/{types/src → dist/browser}/parameters.d.ts.map +1 -1
  18. package/dist/browser/parameters.js.map +1 -0
  19. package/{types/src → dist/browser}/pollingHelper.d.ts +1 -1
  20. package/{types/src → dist/browser}/pollingHelper.d.ts.map +1 -1
  21. package/dist/browser/pollingHelper.js.map +1 -0
  22. package/{types/src → dist/browser}/responses.d.ts +1 -1
  23. package/dist/browser/responses.d.ts.map +1 -0
  24. package/dist/browser/responses.js.map +1 -0
  25. package/dist/commonjs/azureHealthInsightsClient.d.ts +11 -0
  26. package/dist/commonjs/azureHealthInsightsClient.d.ts.map +1 -0
  27. package/dist/commonjs/azureHealthInsightsClient.js +33 -0
  28. package/dist/commonjs/azureHealthInsightsClient.js.map +1 -0
  29. package/dist/commonjs/clientDefinitions.d.ts +21 -0
  30. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  31. package/dist/commonjs/clientDefinitions.js +5 -0
  32. package/dist/commonjs/clientDefinitions.js.map +1 -0
  33. package/dist/commonjs/index.d.ts +12 -0
  34. package/dist/commonjs/index.d.ts.map +1 -0
  35. package/dist/commonjs/index.js +18 -0
  36. package/dist/commonjs/index.js.map +1 -0
  37. package/dist/commonjs/isUnexpected.d.ts +6 -0
  38. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  39. package/dist/commonjs/isUnexpected.js +75 -0
  40. package/dist/commonjs/isUnexpected.js.map +1 -0
  41. package/dist/commonjs/logger.d.ts +2 -0
  42. package/dist/commonjs/logger.d.ts.map +1 -0
  43. package/dist/commonjs/logger.js +8 -0
  44. package/dist/commonjs/logger.js.map +1 -0
  45. package/dist/commonjs/models.d.ts +909 -0
  46. package/dist/commonjs/models.d.ts.map +1 -0
  47. package/dist/commonjs/models.js +25 -0
  48. package/dist/commonjs/models.js.map +1 -0
  49. package/dist/commonjs/outputModels.d.ts +936 -0
  50. package/dist/commonjs/outputModels.d.ts.map +1 -0
  51. package/dist/commonjs/outputModels.js +26 -0
  52. package/dist/commonjs/outputModels.js.map +1 -0
  53. package/dist/commonjs/package.json +3 -0
  54. package/dist/commonjs/parameters.d.ts +32 -0
  55. package/dist/commonjs/parameters.d.ts.map +1 -0
  56. package/dist/commonjs/parameters.js +5 -0
  57. package/dist/commonjs/parameters.js.map +1 -0
  58. package/dist/commonjs/pollingHelper.d.ts +12 -0
  59. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  60. package/dist/commonjs/pollingHelper.js +46 -0
  61. package/dist/commonjs/pollingHelper.js.map +1 -0
  62. package/dist/commonjs/responses.d.ts +91 -0
  63. package/dist/commonjs/responses.d.ts.map +1 -0
  64. package/dist/commonjs/responses.js +5 -0
  65. package/dist/commonjs/responses.js.map +1 -0
  66. package/dist/commonjs/serializeHelper.d.ts +3 -0
  67. package/dist/commonjs/serializeHelper.d.ts.map +1 -0
  68. package/dist/commonjs/serializeHelper.js +17 -0
  69. package/dist/commonjs/serializeHelper.js.map +1 -0
  70. package/dist/esm/azureHealthInsightsClient.d.ts +11 -0
  71. package/dist/esm/azureHealthInsightsClient.d.ts.map +1 -0
  72. package/dist/esm/azureHealthInsightsClient.js +30 -0
  73. package/dist/esm/azureHealthInsightsClient.js.map +1 -0
  74. package/dist/esm/clientDefinitions.d.ts +21 -0
  75. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  76. package/dist/esm/clientDefinitions.js +4 -0
  77. package/dist/esm/clientDefinitions.js.map +1 -0
  78. package/dist/esm/index.d.ts +12 -0
  79. package/dist/esm/index.d.ts.map +1 -0
  80. package/dist/esm/index.js +15 -0
  81. package/dist/esm/index.js.map +1 -0
  82. package/dist/esm/isUnexpected.d.ts +6 -0
  83. package/dist/esm/isUnexpected.d.ts.map +1 -0
  84. package/dist/esm/isUnexpected.js +72 -0
  85. package/dist/esm/isUnexpected.js.map +1 -0
  86. package/dist/esm/logger.d.ts +2 -0
  87. package/dist/esm/logger.d.ts.map +1 -0
  88. package/dist/esm/logger.js +5 -0
  89. package/dist/esm/logger.js.map +1 -0
  90. package/dist/esm/models.d.ts +909 -0
  91. package/dist/esm/models.d.ts.map +1 -0
  92. package/dist/esm/models.js +22 -0
  93. package/dist/esm/models.js.map +1 -0
  94. package/dist/esm/outputModels.d.ts +936 -0
  95. package/dist/esm/outputModels.d.ts.map +1 -0
  96. package/dist/esm/outputModels.js +23 -0
  97. package/dist/esm/outputModels.js.map +1 -0
  98. package/dist/esm/package.json +3 -0
  99. package/dist/esm/parameters.d.ts +32 -0
  100. package/dist/esm/parameters.d.ts.map +1 -0
  101. package/dist/esm/parameters.js +4 -0
  102. package/dist/esm/parameters.js.map +1 -0
  103. package/dist/esm/pollingHelper.d.ts +12 -0
  104. package/dist/esm/pollingHelper.d.ts.map +1 -0
  105. package/dist/esm/pollingHelper.js +43 -0
  106. package/dist/esm/pollingHelper.js.map +1 -0
  107. package/dist/esm/responses.d.ts +91 -0
  108. package/dist/esm/responses.d.ts.map +1 -0
  109. package/dist/esm/responses.js +4 -0
  110. package/dist/esm/responses.js.map +1 -0
  111. package/dist/esm/serializeHelper.d.ts +3 -0
  112. package/dist/esm/serializeHelper.d.ts.map +1 -0
  113. package/dist/esm/serializeHelper.js +14 -0
  114. package/dist/esm/serializeHelper.js.map +1 -0
  115. package/dist/react-native/azureHealthInsightsClient.d.ts +11 -0
  116. package/dist/react-native/azureHealthInsightsClient.d.ts.map +1 -0
  117. package/dist/react-native/azureHealthInsightsClient.js +30 -0
  118. package/dist/react-native/azureHealthInsightsClient.js.map +1 -0
  119. package/dist/react-native/clientDefinitions.d.ts +21 -0
  120. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  121. package/dist/react-native/clientDefinitions.js +4 -0
  122. package/dist/react-native/clientDefinitions.js.map +1 -0
  123. package/dist/react-native/index.d.ts +12 -0
  124. package/dist/react-native/index.d.ts.map +1 -0
  125. package/dist/react-native/index.js +15 -0
  126. package/dist/react-native/index.js.map +1 -0
  127. package/dist/react-native/isUnexpected.d.ts +6 -0
  128. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  129. package/dist/react-native/isUnexpected.js +72 -0
  130. package/dist/react-native/isUnexpected.js.map +1 -0
  131. package/dist/react-native/logger.d.ts +2 -0
  132. package/dist/react-native/logger.d.ts.map +1 -0
  133. package/dist/react-native/logger.js +5 -0
  134. package/dist/react-native/logger.js.map +1 -0
  135. package/dist/react-native/models.d.ts +909 -0
  136. package/dist/react-native/models.d.ts.map +1 -0
  137. package/dist/react-native/models.js +22 -0
  138. package/dist/react-native/models.js.map +1 -0
  139. package/dist/react-native/outputModels.d.ts +936 -0
  140. package/dist/react-native/outputModels.d.ts.map +1 -0
  141. package/dist/react-native/outputModels.js +23 -0
  142. package/dist/react-native/outputModels.js.map +1 -0
  143. package/dist/react-native/package.json +3 -0
  144. package/dist/react-native/parameters.d.ts +32 -0
  145. package/dist/react-native/parameters.d.ts.map +1 -0
  146. package/dist/react-native/parameters.js +4 -0
  147. package/dist/react-native/parameters.js.map +1 -0
  148. package/dist/react-native/pollingHelper.d.ts +12 -0
  149. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  150. package/dist/react-native/pollingHelper.js +43 -0
  151. package/dist/react-native/pollingHelper.js.map +1 -0
  152. package/dist/react-native/responses.d.ts +91 -0
  153. package/dist/react-native/responses.d.ts.map +1 -0
  154. package/dist/react-native/responses.js +4 -0
  155. package/dist/react-native/responses.js.map +1 -0
  156. package/dist/react-native/serializeHelper.d.ts +3 -0
  157. package/dist/react-native/serializeHelper.d.ts.map +1 -0
  158. package/dist/react-native/serializeHelper.js +14 -0
  159. package/dist/react-native/serializeHelper.js.map +1 -0
  160. package/package.json +65 -45
  161. package/dist/index.js +0 -221
  162. package/dist/index.js.map +0 -1
  163. package/dist-esm/src/azureHealthInsightsClient.js.map +0 -1
  164. package/dist-esm/src/clientDefinitions.js.map +0 -1
  165. package/dist-esm/src/index.js +0 -14
  166. package/dist-esm/src/index.js.map +0 -1
  167. package/dist-esm/src/isUnexpected.js.map +0 -1
  168. package/dist-esm/src/parameters.js.map +0 -1
  169. package/dist-esm/src/pollingHelper.js.map +0 -1
  170. package/dist-esm/src/responses.js.map +0 -1
  171. package/review/health-insights-radiologyinsights.api.md +0 -1358
  172. package/types/samples-dev/sample_age_mismatch_inference_async.d.ts +0 -2
  173. package/types/samples-dev/sample_age_mismatch_inference_async.d.ts.map +0 -1
  174. package/types/samples-dev/sample_complete_order_discrepancy_inference_async.d.ts +0 -2
  175. package/types/samples-dev/sample_complete_order_discrepancy_inference_async.d.ts.map +0 -1
  176. package/types/samples-dev/sample_critical_result_inference_async.d.ts +0 -2
  177. package/types/samples-dev/sample_critical_result_inference_async.d.ts.map +0 -1
  178. package/types/samples-dev/sample_critical_result_managed_identity.d.ts +0 -2
  179. package/types/samples-dev/sample_critical_result_managed_identity.d.ts.map +0 -1
  180. package/types/samples-dev/sample_finding_inference_async.d.ts +0 -2
  181. package/types/samples-dev/sample_finding_inference_async.d.ts.map +0 -1
  182. package/types/samples-dev/sample_follow_up_communication_inference_async.d.ts +0 -2
  183. package/types/samples-dev/sample_follow_up_communication_inference_async.d.ts.map +0 -1
  184. package/types/samples-dev/sample_follow_up_recommendation_inference_async.d.ts +0 -2
  185. package/types/samples-dev/sample_follow_up_recommendation_inference_async.d.ts.map +0 -1
  186. package/types/samples-dev/sample_laterality_discrepancy_inference_async.d.ts +0 -2
  187. package/types/samples-dev/sample_laterality_discrepancy_inference_async.d.ts.map +0 -1
  188. package/types/samples-dev/sample_limited_order_discrepancy_inference_async.d.ts +0 -2
  189. package/types/samples-dev/sample_limited_order_discrepancy_inference_async.d.ts.map +0 -1
  190. package/types/samples-dev/sample_radiology_procedure_inference_async.d.ts +0 -2
  191. package/types/samples-dev/sample_radiology_procedure_inference_async.d.ts.map +0 -1
  192. package/types/samples-dev/sample_sex_mismatch_inference_async.d.ts +0 -2
  193. package/types/samples-dev/sample_sex_mismatch_inference_async.d.ts.map +0 -1
  194. package/types/src/clientDefinitions.d.ts.map +0 -1
  195. package/types/src/index.d.ts +0 -12
  196. package/types/src/index.d.ts.map +0 -1
  197. package/types/src/isUnexpected.d.ts.map +0 -1
  198. package/types/src/responses.d.ts.map +0 -1
  199. package/types/test/public/SampleAgeMismatchInferenceAsync.spec.d.ts +0 -2
  200. package/types/test/public/SampleAgeMismatchInferenceAsync.spec.d.ts.map +0 -1
  201. package/types/test/public/SampleCompleteOrderDiscrepancyInferenceAsync.spec.d.ts +0 -2
  202. package/types/test/public/SampleCompleteOrderDiscrepancyInferenceAsync.spec.d.ts.map +0 -1
  203. package/types/test/public/SampleCriticalResultInferenceAsync.spec.d.ts +0 -2
  204. package/types/test/public/SampleCriticalResultInferenceAsync.spec.d.ts.map +0 -1
  205. package/types/test/public/SampleFindingInferenceAsync.spec.d.ts +0 -2
  206. package/types/test/public/SampleFindingInferenceAsync.spec.d.ts.map +0 -1
  207. package/types/test/public/SampleFollowUpCommunicationAsync.spec.d.ts +0 -2
  208. package/types/test/public/SampleFollowUpCommunicationAsync.spec.d.ts.map +0 -1
  209. package/types/test/public/SampleFollowUpRecommendationAsync.spec.d.ts +0 -2
  210. package/types/test/public/SampleFollowUpRecommendationAsync.spec.d.ts.map +0 -1
  211. package/types/test/public/SampleLateralityDiscrepancyInferenceAsync.spec.d.ts +0 -2
  212. package/types/test/public/SampleLateralityDiscrepancyInferenceAsync.spec.d.ts.map +0 -1
  213. package/types/test/public/SampleLimitedOrderDiscrepancyInferenceAsync.spec.d.ts +0 -2
  214. package/types/test/public/SampleLimitedOrderDiscrepancyInferenceAsync.spec.d.ts.map +0 -1
  215. package/types/test/public/SampleRadiologyProcedureInferenceAsync.spec.d.ts +0 -2
  216. package/types/test/public/SampleRadiologyProcedureInferenceAsync.spec.d.ts.map +0 -1
  217. package/types/test/public/SampleSexMismatchInferenceAsync.spec.d.ts +0 -2
  218. package/types/test/public/SampleSexMismatchInferenceAsync.spec.d.ts.map +0 -1
  219. package/types/test/public/Test_RadiologyInsights_async.spec.d.ts +0 -2
  220. package/types/test/public/Test_RadiologyInsights_async.spec.d.ts.map +0 -1
  221. package/types/test/public/utils/env.browser.d.ts +0 -1
  222. package/types/test/public/utils/env.browser.d.ts.map +0 -1
  223. package/types/test/public/utils/env.d.ts +0 -2
  224. package/types/test/public/utils/env.d.ts.map +0 -1
  225. package/types/test/public/utils/recordedClient.d.ts +0 -13
  226. package/types/test/public/utils/recordedClient.d.ts.map +0 -1
  227. /package/{dist-esm/src → dist/browser}/clientDefinitions.js +0 -0
  228. /package/{dist-esm/src → dist/browser}/isUnexpected.js +0 -0
  229. /package/{types/src → dist/browser}/logger.d.ts +0 -0
  230. /package/{types/src → dist/browser}/logger.d.ts.map +0 -0
  231. /package/{dist-esm/src → dist/browser}/logger.js +0 -0
  232. /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
  233. /package/{types/src → dist/browser}/models.d.ts +0 -0
  234. /package/{types/src → dist/browser}/models.d.ts.map +0 -0
  235. /package/{dist-esm/src → dist/browser}/models.js +0 -0
  236. /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
  237. /package/{types/src → dist/browser}/outputModels.d.ts +0 -0
  238. /package/{types/src → dist/browser}/outputModels.d.ts.map +0 -0
  239. /package/{dist-esm/src → dist/browser}/outputModels.js +0 -0
  240. /package/{dist-esm/src → dist/browser}/outputModels.js.map +0 -0
  241. /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
  242. /package/{dist-esm/src → dist/browser}/pollingHelper.js +0 -0
  243. /package/{dist-esm/src → dist/browser}/responses.js +0 -0
  244. /package/{types/src → dist/browser}/serializeHelper.d.ts +0 -0
  245. /package/{types/src → dist/browser}/serializeHelper.d.ts.map +0 -0
  246. /package/{dist-esm/src → dist/browser}/serializeHelper.js +0 -0
  247. /package/{dist-esm/src → dist/browser}/serializeHelper.js.map +0 -0
  248. /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
  249. /package/{types → dist}/health-insights-radiologyinsights-rest.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import type { ClientOptions } from "@azure-rest/core-client";
2
2
  import type { TokenCredential } from "@azure/core-auth";
3
- import type { AzureHealthInsightsClient } from "./clientDefinitions";
3
+ import type { AzureHealthInsightsClient } from "./clientDefinitions.js";
4
4
  /**
5
5
  * Initialize a new instance of `AzureHealthInsightsClient`
6
6
  * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
@@ -1 +1 @@
1
- {"version":3,"file":"azureHealthInsightsClient.d.ts","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGrE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,yBAAyB,CAyB3B"}
1
+ {"version":3,"file":"azureHealthInsightsClient.d.ts","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGxE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,yBAAyB,CAyB3B"}
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { getClient } from "@azure-rest/core-client";
4
- import { logger } from "./logger";
4
+ import { logger } from "./logger.js";
5
5
  /**
6
6
  * Initialize a new instance of `AzureHealthInsightsClient`
7
7
  * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureHealthInsightsClient.js","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,kBAAkB,CAAC;IAC9F,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;YACvF,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;IAEzF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { AzureHealthInsightsClient } from \"./clientDefinitions.js\";\nimport { logger } from \"./logger.js\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2024-04-01\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as AzureHealthInsightsClient;\n\n return client;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { Client, StreamableMethod } from "@azure-rest/core-client";
2
- import type { CreateJobParameters, GetJobParameters } from "./parameters";
3
- import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, GetJob200Response, GetJobDefaultResponse } from "./responses";
2
+ import type { CreateJobParameters, GetJobParameters } from "./parameters.js";
3
+ import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, GetJob200Response, GetJobDefaultResponse } from "./responses.js";
4
4
  /** Gets the Radiology Insights job. */
5
5
  export interface GetJob {
6
6
  /** Gets the status and details of the Radiology Insights job. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,uCAAuC;AACvC,MAAM,WAAW,MAAM;IACrB,iEAAiE;IACjE,GAAG,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,CAAC;IAC7F,oEAAoE;IACpE,GAAG,CACD,OAAO,EAAE,mBAAmB,EAC5B,cAAc,CAAC,EAAE,gBAAgB,GAChC,gBAAgB,CAAC,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC,CAAC;CAC7F;AAED,kCAAkC;AAClC,MAAM,WAAW,MAAM;IACrB,mGAAmG;IACnG,CAAC,IAAI,EAAE,+BAA+B,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7D;AAED,iFAAiF;AACjF,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAC/C,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\nimport type { CreateJobParameters, GetJobParameters } from \"./parameters.js\";\nimport type {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses.js\";\n\n/** Gets the Radiology Insights job. */\nexport interface GetJob {\n /** Gets the status and details of the Radiology Insights job. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n /** Creates a Radiology Insights job with the given request body. */\n put(\n options: CreateJobParameters,\n requestOptions?: GetJobParameters,\n ): StreamableMethod<CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse>;\n}\n\n/** The routes for the resource */\nexport interface Routes {\n /** Resource for '/radiology-insights/jobs/\\{id\\}' has methods for the following verbs: get, put */\n (path: \"/radiology-insights/jobs/{id}\", id: string): GetJob;\n}\n\n/** Create a HealthInsightsclient which is a Client an defined by the resource */\nexport type AzureHealthInsightsClient = Client & {\n /** The path specified by the routes for the resource */\n path: Routes;\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import AzureHealthInsightsClient from "./azureHealthInsightsClient.js";
2
+ export * from "./azureHealthInsightsClient.js";
3
+ export * from "./clientDefinitions.js";
4
+ export * from "./isUnexpected.js";
5
+ export * from "./models.js";
6
+ export * from "./outputModels.js";
7
+ export * from "./parameters.js";
8
+ export * from "./pollingHelper.js";
9
+ export * from "./responses.js";
10
+ export * from "./serializeHelper.js";
11
+ export default AzureHealthInsightsClient;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AAEvE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AAGrC,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import AzureHealthInsightsClient from "./azureHealthInsightsClient.js";
4
+ export * from "./azureHealthInsightsClient.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./parameters.js";
10
+ export * from "./pollingHelper.js";
11
+ export * from "./responses.js";
12
+ export * from "./serializeHelper.js";
13
+ // eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
14
+ export default AzureHealthInsightsClient;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AAEvE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AAErC,kEAAkE;AAClE,eAAe,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient.js\";\n\nexport * from \"./azureHealthInsightsClient.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./parameters.js\";\nexport * from \"./pollingHelper.js\";\nexport * from \"./responses.js\";\nexport * from \"./serializeHelper.js\";\n\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default AzureHealthInsightsClient;\n"]}
@@ -1,4 +1,4 @@
1
- import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse, GetJob200Response, GetJobDefaultResponse } from "./responses";
1
+ import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse, GetJob200Response, GetJobDefaultResponse } from "./responses.js";
2
2
  /** Unexpected responses for get job calls */
3
3
  export declare function isUnexpected(response: GetJob200Response | GetJobDefaultResponse): response is GetJobDefaultResponse;
4
4
  /** Unexpected responses for create job calls */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAOxB,6CAA6C;AAC7C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,iBAAiB,GAAG,qBAAqB,GAClD,QAAQ,IAAI,qBAAqB,CAAC;AAErC,gDAAgD;AAChD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,wBAAwB,GAC3B,QAAQ,IAAI,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,MAAM,WAAW,GAA6B;IAC5C,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,mCAAmC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACpD,CAAC;AAgBF,sDAAsD;AACtD,MAAM,UAAU,YAAY,CAC1B,QAM4B;IAE5B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,W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,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"PUT /radiology-insights/jobs/{id}\": [\"200\", \"201\"],\n};\n\n/** Unexpected responses for get job calls */\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\n\n/** Unexpected responses for create job calls */\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\n\n/** Unexpected responses for get & create job calls */\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,5 +1,5 @@
1
1
  import type { RequestParameters } from "@azure-rest/core-client";
2
- import type { RadiologyInsightsJob } from "./models";
2
+ import type { RadiologyInsightsJob } from "./models.js";
3
3
  /** Get the job query parameter properties */
4
4
  export interface GetJobQueryParamProperties {
5
5
  /** Expand the indicated resources into the response. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,6CAA6C;AAC7C,MAAM,WAAW,0BAA0B;IACzC,kQAAkQ;IAClQ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,mCAAmC;AACnC,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,eAAe,CAAC,EAAE,0BAA0B,CAAC;CAC9C;AAED,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEpE,sCAAsC;AACtC,M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
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { RadiologyInsightsJob } from \"./models.js\";\n\n/** Get the job query parameter properties */\nexport interface GetJobQueryParamProperties {\n /** Expand the indicated resources into the response. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */\n expand?: string;\n}\n\n/** Get the job query parameters */\nexport interface GetJobQueryParam {\n /** The query parameters. */\n queryParameters?: GetJobQueryParamProperties;\n}\n\n/** Get the job parameters, combining the query and request parameters */\nexport type GetJobParameters = GetJobQueryParam & RequestParameters;\n\n/** The create job body parameters. */\nexport interface CreateJobBodyParam {\n /** The body of the resource instance. */\n body: RadiologyInsightsJob;\n}\n\n/** The create job query parameter properties. */\nexport interface CreateJobQueryParamProperties {\n /** Expand the indicated resources into the response. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */\n expand?: string;\n}\n\n/** The create job query parameter. */\nexport interface CreateJobQueryParam {\n /** The query parameters. */\n queryParameters?: CreateJobQueryParamProperties;\n}\n\n/** Create the job parameters, combining the create query parameters, the create job body paramters and the request parameters */\nexport type CreateJobParameters = CreateJobQueryParam & CreateJobBodyParam & RequestParameters;\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { Client } from "@azure-rest/core-client";
2
2
  import type { CreateHttpPollerOptions, OperationState, SimplePollerLike } from "@azure/core-lro";
3
- import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse } from "./responses";
3
+ import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse } from "./responses.js";
4
4
  /**
5
5
  * Helper function that builds a Poller object to help polling a long running operation.
6
6
  * @param client - Client to use for sending the request to get additional pages.
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EAGvB,cAAc,EACd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AACrB;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,EAEnE,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,EACvF,OAAO,CAAC,EAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,GAClE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EAGvB,cAAc,EACd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,EAEnE,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,EACvF,OAAO,CAAC,EAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CA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C;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport type {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses.js\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse,\n>(\n client: Client,\n initialResponse: CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { HttpResponse } from "@azure-rest/core-client";
2
2
  import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
3
- import type { HealthInsightsErrorResponseOutput, RadiologyInsightsJobOutput } from "./outputModels";
3
+ import type { HealthInsightsErrorResponseOutput, RadiologyInsightsJobOutput } from "./outputModels.js";
4
4
  /** Get the headers of the succeeded request */
5
5
  export interface GetJob200Headers {
6
6
  /** The Retry-After header can indicate how long the client should wait before polling the operation status. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,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ED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,iFAAiF;AACjF,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,6CAA6C;IAC7C,MAAM,EAAE,KAAK,CAAC;IACd,0CAA0C;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,8CAA8C;IAC9C,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAAC;CAC/C;AACD,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sFAAsF;IACtF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,2CAA2C;AAC3C,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,iCAAiC,CAAC;IACxC,0CAA0C;IAC1C,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC;CACnD;AAED,8DAA8D;AAC9D,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,uCAAuC;IACvC,MAAM,EAAE,KAAK,CAAC;IACd,qCAAqC;IACrC,IAAI,EAAE,0BAA0B,CAAC;CAClC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type {\n HealthInsightsErrorResponseOutput,\n RadiologyInsightsJobOutput,\n} from \"./outputModels.js\";\n\n/** Get the headers of the succeeded request */\nexport interface GetJob200Headers {\n /** The Retry-After header can indicate how long the client should wait before polling the operation status. */\n \"retry-after\"?: number;\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n \"x-ms-request-id\"?: string;\n}\n\n/** The request has succeeded. Get job response */\nexport interface GetJob200Response extends HttpResponse {\n /** The status of the request */\n status: \"200\";\n /** The body of the request */\n body: RadiologyInsightsJobOutput;\n /** The header of the request */\n headers: RawHttpHeaders & GetJob200Headers;\n}\n/** Get the default headers of the request */\nexport interface GetJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n \"x-ms-request-id\"?: string;\n}\n/** Get the default Response */\nexport interface GetJobDefaultResponse extends HttpResponse {\n /** The status of the default response */\n status: string;\n /** The body of the default response */\n body: HealthInsightsErrorResponseOutput;\n /** The headers of the default response */\n headers: RawHttpHeaders & GetJobDefaultHeaders;\n}\n/** Creation of the Headers of the request */\nexport interface CreateJob200Headers {\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n \"x-ms-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded. Create job response */\nexport interface CreateJob200Response extends HttpResponse {\n /** The status of the request */\n status: \"200\";\n /** The body of the request */\n body: RadiologyInsightsJobOutput;\n /** The headers of the request */\n headers: RawHttpHeaders & CreateJob200Headers;\n}\n\n/** Creation of the new resource headers after request has succeeded */\nexport interface CreateJob201Headers {\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n \"x-ms-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface CreateJob201Response extends HttpResponse {\n /** The status of the new resource created */\n status: \"201\";\n /** The body of the new resource created*/\n body: RadiologyInsightsJobOutput;\n /** The headers of the new resource created */\n headers: RawHttpHeaders & CreateJob201Headers;\n}\n/** The default header request creation */\nexport interface CreateJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n \"x-ms-request-id\"?: string;\n}\n\n/** The default header response creation */\nexport interface CreateJobDefaultResponse extends HttpResponse {\n /** The status of the default response */\n status: string;\n /** The body of the default response */\n body: HealthInsightsErrorResponseOutput;\n /** The headers of the default response */\n headers: RawHttpHeaders & CreateJobDefaultHeaders;\n}\n\n/** The final response for long-running createJob operation */\nexport interface CreateJobLogicalResponse extends HttpResponse {\n /** The status of the final response */\n status: \"200\";\n /** The body of the final response */\n body: RadiologyInsightsJobOutput;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { TokenCredential } from "@azure/core-auth";
3
+ import type { AzureHealthInsightsClient } from "./clientDefinitions.js";
4
+ /**
5
+ * Initialize a new instance of `AzureHealthInsightsClient`
6
+ * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
7
+ * @param credentials - uniquely identify client credential
8
+ * @param options - the parameter for all optional parameters
9
+ */
10
+ export default function createClient(endpointParam: string, credentials: TokenCredential, options?: ClientOptions): AzureHealthInsightsClient;
11
+ //# sourceMappingURL=azureHealthInsightsClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureHealthInsightsClient.d.ts","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGxE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,yBAAyB,CAyB3B"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = createClient;
6
+ const core_client_1 = require("@azure-rest/core-client");
7
+ const logger_js_1 = require("./logger.js");
8
+ /**
9
+ * Initialize a new instance of `AzureHealthInsightsClient`
10
+ * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
11
+ * @param credentials - uniquely identify client credential
12
+ * @param options - the parameter for all optional parameters
13
+ */
14
+ function createClient(endpointParam, credentials, options = {}) {
15
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16
+ const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpointParam}/health-insights`;
17
+ options.apiVersion = (_c = options.apiVersion) !== null && _c !== void 0 ? _c : "2024-04-01";
18
+ const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;
19
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
20
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
21
+ : `${userAgentInfo}`;
22
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
23
+ userAgentPrefix,
24
+ }, loggingOptions: {
25
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger_js_1.logger.info,
26
+ }, credentials: {
27
+ scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://cognitiveservices.azure.com/.default"],
28
+ apiKeyHeaderName: (_j = (_h = options.credentials) === null || _h === void 0 ? void 0 : _h.apiKeyHeaderName) !== null && _j !== void 0 ? _j : "Ocp-Apim-Subscription-Key",
29
+ } });
30
+ const client = (0, core_client_1.getClient)(endpointUrl, credentials, options);
31
+ return client;
32
+ }
33
+ //# sourceMappingURL=azureHealthInsightsClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureHealthInsightsClient.js","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAclC,+BA6BC;AAxCD,yDAAoD;AAGpD,2CAAqC;AAErC;;;;;GAKG;AACH,SAAwB,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,kBAAkB,CAAC;IAC9F,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;YACvF,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;IAEzF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { AzureHealthInsightsClient } from \"./clientDefinitions.js\";\nimport { logger } from \"./logger.js\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2024-04-01\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as AzureHealthInsightsClient;\n\n return client;\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import type { Client, StreamableMethod } from "@azure-rest/core-client";
2
+ import type { CreateJobParameters, GetJobParameters } from "./parameters.js";
3
+ import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, GetJob200Response, GetJobDefaultResponse } from "./responses.js";
4
+ /** Gets the Radiology Insights job. */
5
+ export interface GetJob {
6
+ /** Gets the status and details of the Radiology Insights job. */
7
+ get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;
8
+ /** Creates a Radiology Insights job with the given request body. */
9
+ put(options: CreateJobParameters, requestOptions?: GetJobParameters): StreamableMethod<CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse>;
10
+ }
11
+ /** The routes for the resource */
12
+ export interface Routes {
13
+ /** Resource for '/radiology-insights/jobs/\{id\}' has methods for the following verbs: get, put */
14
+ (path: "/radiology-insights/jobs/{id}", id: string): GetJob;
15
+ }
16
+ /** Create a HealthInsightsclient which is a Client an defined by the resource */
17
+ export type AzureHealthInsightsClient = Client & {
18
+ /** The path specified by the routes for the resource */
19
+ path: Routes;
20
+ };
21
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,uCAAuC;AACvC,MAAM,WAAW,MAAM;IACrB,iEAAiE;IACjE,GAAG,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,CAAC;IAC7F,oEAAoE;IACpE,GAAG,CACD,OAAO,EAAE,mBAAmB,EAC5B,cAAc,CAAC,EAAE,gBAAgB,GAChC,gBAAgB,CAAC,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC,CAAC;CAC7F;AAED,kCAAkC;AAClC,MAAM,WAAW,MAAM;IACrB,mGAAmG;IACnG,CAAC,IAAI,EAAE,+BAA+B,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7D;AAED,iFAAiF;AACjF,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAC/C,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\nimport type { CreateJobParameters, GetJobParameters } from \"./parameters.js\";\nimport type {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses.js\";\n\n/** Gets the Radiology Insights job. */\nexport interface GetJob {\n /** Gets the status and details of the Radiology Insights job. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n /** Creates a Radiology Insights job with the given request body. */\n put(\n options: CreateJobParameters,\n requestOptions?: GetJobParameters,\n ): StreamableMethod<CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse>;\n}\n\n/** The routes for the resource */\nexport interface Routes {\n /** Resource for '/radiology-insights/jobs/\\{id\\}' has methods for the following verbs: get, put */\n (path: \"/radiology-insights/jobs/{id}\", id: string): GetJob;\n}\n\n/** Create a HealthInsightsclient which is a Client an defined by the resource */\nexport type AzureHealthInsightsClient = Client & {\n /** The path specified by the routes for the resource */\n path: Routes;\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import AzureHealthInsightsClient from "./azureHealthInsightsClient.js";
2
+ export * from "./azureHealthInsightsClient.js";
3
+ export * from "./clientDefinitions.js";
4
+ export * from "./isUnexpected.js";
5
+ export * from "./models.js";
6
+ export * from "./outputModels.js";
7
+ export * from "./parameters.js";
8
+ export * from "./pollingHelper.js";
9
+ export * from "./responses.js";
10
+ export * from "./serializeHelper.js";
11
+ export default AzureHealthInsightsClient;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AAEvE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AAGrC,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const tslib_1 = require("tslib");
6
+ const azureHealthInsightsClient_js_1 = tslib_1.__importDefault(require("./azureHealthInsightsClient.js"));
7
+ tslib_1.__exportStar(require("./azureHealthInsightsClient.js"), exports);
8
+ tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
9
+ tslib_1.__exportStar(require("./isUnexpected.js"), exports);
10
+ tslib_1.__exportStar(require("./models.js"), exports);
11
+ tslib_1.__exportStar(require("./outputModels.js"), exports);
12
+ tslib_1.__exportStar(require("./parameters.js"), exports);
13
+ tslib_1.__exportStar(require("./pollingHelper.js"), exports);
14
+ tslib_1.__exportStar(require("./responses.js"), exports);
15
+ tslib_1.__exportStar(require("./serializeHelper.js"), exports);
16
+ // eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
17
+ exports.default = azureHealthInsightsClient_js_1.default;
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0GAAuE;AAEvE,yEAA+C;AAC/C,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAClC,0DAAgC;AAChC,6DAAmC;AACnC,yDAA+B;AAC/B,+DAAqC;AAErC,kEAAkE;AAClE,kBAAe,sCAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient.js\";\n\nexport * from \"./azureHealthInsightsClient.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./parameters.js\";\nexport * from \"./pollingHelper.js\";\nexport * from \"./responses.js\";\nexport * from \"./serializeHelper.js\";\n\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default AzureHealthInsightsClient;\n"]}
@@ -0,0 +1,6 @@
1
+ import type { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse, GetJob200Response, GetJobDefaultResponse } from "./responses.js";
2
+ /** Unexpected responses for get job calls */
3
+ export declare function isUnexpected(response: GetJob200Response | GetJobDefaultResponse): response is GetJobDefaultResponse;
4
+ /** Unexpected responses for create job calls */
5
+ export declare function isUnexpected(response: CreateJob200Response | CreateJob201Response | CreateJobLogicalResponse | CreateJobDefaultResponse): response is CreateJobDefaultResponse;
6
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAOxB,6CAA6C;AAC7C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,iBAAiB,GAAG,qBAAqB,GAClD,QAAQ,IAAI,qBAAqB,CAAC;AAErC,gDAAgD;AAChD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,wBAAwB,GAC3B,QAAQ,IAAI,wBAAwB,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.isUnexpected = isUnexpected;
6
+ const responseMap = {
7
+ "GET /radiology-insights/jobs/{id}": ["200"],
8
+ "PUT /radiology-insights/jobs/{id}": ["200", "201"],
9
+ };
10
+ /** Unexpected responses for get & create job calls */
11
+ function isUnexpected(response) {
12
+ const lroOriginal = response.headers["x-ms-original-url"];
13
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
14
+ const method = response.request.method;
15
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
16
+ if (!pathDetails) {
17
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
18
+ }
19
+ return !pathDetails.includes(response.status);
20
+ }
21
+ function getParametrizedPathSuccess(method, path) {
22
+ var _a, _b, _c, _d;
23
+ const pathParts = path.split("/");
24
+ // Traverse list to match the longest candidate
25
+ // matchedLen: the length of candidate path
26
+ // matchedValue: the matched status code array
27
+ let matchedLen = -1, matchedValue = [];
28
+ // Iterate the responseMap to find a match
29
+ for (const [key, value] of Object.entries(responseMap)) {
30
+ // Extracting the path from the map key which is in format
31
+ // GET /path/foo
32
+ if (!key.startsWith(method)) {
33
+ continue;
34
+ }
35
+ const candidatePath = getPathFromMapKey(key);
36
+ // Get each part of the url path
37
+ const candidateParts = candidatePath.split("/");
38
+ // track if we have found a match to return the values found.
39
+ let found = true;
40
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
41
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
42
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
43
+ // If the current part of the candidate is a "template" part
44
+ // Try to use the suffix of pattern to match the path
45
+ // {guid} ==> $
46
+ // {guid}:export ==> :export$
47
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
48
+ if (!isMatched) {
49
+ found = false;
50
+ break;
51
+ }
52
+ continue;
53
+ }
54
+ // If the candidate part is not a template and
55
+ // the parts don't match mark the candidate as not found
56
+ // to move on with the next candidate path.
57
+ if (candidateParts[i] !== pathParts[j]) {
58
+ found = false;
59
+ break;
60
+ }
61
+ }
62
+ // We finished evaluating the current candidate parts
63
+ // Update the matched value if and only if we found the longer pattern
64
+ if (found && candidatePath.length > matchedLen) {
65
+ matchedLen = candidatePath.length;
66
+ matchedValue = value;
67
+ }
68
+ }
69
+ return matchedValue;
70
+ }
71
+ function getPathFromMapKey(mapKey) {
72
+ const pathStart = mapKey.indexOf("/");
73
+ return mapKey.slice(pathStart);
74
+ }
75
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA+BlC,oCAiBC;AArCD,MAAM,WAAW,GAA6B;IAC5C,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,mCAAmC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACpD,CAAC;AAgBF,sDAAsD;AACtD,SAAgB,YAAY,CAC1B,QAM4B;IAE5B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG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ED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"PUT /radiology-insights/jobs/{id}\": [\"200\", \"201\"],\n};\n\n/** Unexpected responses for get job calls */\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\n\n/** Unexpected responses for create job calls */\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\n\n/** Unexpected responses for get & create job calls */\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA0D,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ exports.logger = (0, logger_1.createClientLogger)("health-insights-radiologyinsights");
8
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,mCAAmC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-insights-radiologyinsights\");\n"]}