@typespec/ts-http-runtime 0.3.5-alpha.20260311.2 → 0.3.6

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 (586) hide show
  1. package/dist/browser/client/clientHelpers.js +1 -1
  2. package/dist/browser/client/clientHelpers.js.map +1 -1
  3. package/dist/browser/client/common.d.ts +3 -2
  4. package/dist/browser/client/common.js.map +1 -1
  5. package/dist/browser/client/getClient.js +1 -1
  6. package/dist/browser/client/getClient.js.map +1 -1
  7. package/dist/browser/client/multipart.js +1 -1
  8. package/dist/browser/client/multipart.js.map +1 -1
  9. package/dist/browser/client/restError.js +5 -4
  10. package/dist/browser/client/restError.js.map +1 -1
  11. package/dist/browser/client/sendRequest.js +25 -14
  12. package/dist/browser/client/sendRequest.js.map +1 -1
  13. package/dist/browser/client/urlHelpers.js +9 -3
  14. package/dist/browser/client/urlHelpers.js.map +1 -1
  15. package/dist/browser/constants.js +1 -1
  16. package/dist/browser/constants.js.map +1 -1
  17. package/dist/browser/createPipelineFromOptions.d.ts +1 -1
  18. package/dist/browser/createPipelineFromOptions.js +2 -21
  19. package/dist/browser/createPipelineFromOptions.js.map +1 -1
  20. package/dist/browser/{defaultHttpClient.d.ts → defaultHttpClient-browser.d.mts} +1 -1
  21. package/dist/browser/{defaultHttpClient.js → defaultHttpClient-browser.mjs} +1 -1
  22. package/dist/browser/defaultHttpClient-browser.mjs.map +1 -0
  23. package/dist/browser/encoding.d.ts +13 -0
  24. package/dist/browser/encoding.js +19 -0
  25. package/dist/browser/encoding.js.map +1 -0
  26. package/dist/{esm/util/checkEnvironment.d.ts → browser/env-browser.d.mts} +21 -1
  27. package/dist/{esm/util/checkEnvironment.js → browser/env-browser.mjs} +26 -12
  28. package/dist/browser/env-browser.mjs.map +1 -0
  29. package/dist/browser/fetchHttpClient.d.ts +5 -0
  30. package/dist/browser/fetchHttpClient.js.map +1 -1
  31. package/dist/browser/formData-web.d.mts +9 -0
  32. package/dist/browser/formData-web.mjs +12 -0
  33. package/dist/browser/formData-web.mjs.map +1 -0
  34. package/dist/browser/httpHeaders.js +11 -1
  35. package/dist/browser/httpHeaders.js.map +1 -1
  36. package/dist/browser/index.d.ts +3 -14
  37. package/dist/browser/index.js +2 -2
  38. package/dist/browser/index.js.map +1 -1
  39. package/dist/browser/interfaces.d.ts +15 -14
  40. package/dist/browser/interfaces.js.map +1 -1
  41. package/dist/browser/logger/debug.js +3 -2
  42. package/dist/browser/logger/debug.js.map +1 -1
  43. package/dist/{react-native/logger/log.d.ts → browser/logger/log-web.d.mts} +1 -1
  44. package/dist/browser/logger/{log.js → log-web.mjs} +1 -1
  45. package/dist/browser/logger/log-web.mjs.map +1 -0
  46. package/dist/browser/logger/logger.js +2 -2
  47. package/dist/browser/logger/logger.js.map +1 -1
  48. package/dist/browser/pipelineRequest.js +1 -1
  49. package/dist/browser/pipelineRequest.js.map +1 -1
  50. package/dist/browser/policies/auth/basicAuthenticationPolicy.js +1 -1
  51. package/dist/browser/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  52. package/dist/browser/policies/auth/checkInsecureConnection.js +3 -2
  53. package/dist/browser/policies/auth/checkInsecureConnection.js.map +1 -1
  54. package/dist/browser/policies/{decompressResponsePolicy.d.ts → decompressResponsePolicy-web.d.mts} +1 -1
  55. package/dist/browser/policies/{decompressResponsePolicy.js → decompressResponsePolicy-web.mjs} +1 -1
  56. package/dist/browser/policies/decompressResponsePolicy-web.mjs.map +1 -0
  57. package/dist/browser/policies/formDataPolicy.js +5 -12
  58. package/dist/browser/policies/formDataPolicy.js.map +1 -1
  59. package/dist/browser/policies/internal.d.ts +2 -2
  60. package/dist/browser/policies/internal.js +2 -2
  61. package/dist/browser/policies/internal.js.map +1 -1
  62. package/dist/browser/policies/multipartPolicy.js +7 -3
  63. package/dist/browser/policies/multipartPolicy.js.map +1 -1
  64. package/dist/browser/policies/platformPolicies-web.d.mts +10 -0
  65. package/dist/browser/policies/platformPolicies-web.mjs +12 -0
  66. package/dist/browser/policies/platformPolicies-web.mjs.map +1 -0
  67. package/dist/browser/policies/platformPolicies.d.ts +25 -0
  68. package/dist/browser/policies/platformPolicies.js +30 -0
  69. package/dist/browser/policies/platformPolicies.js.map +1 -0
  70. package/dist/browser/policies/proxyPolicy-web.d.mts +2 -0
  71. package/dist/{react-native/policies/proxyPolicy.js → browser/policies/proxyPolicy-web.mjs} +1 -1
  72. package/dist/browser/policies/proxyPolicy-web.mjs.map +1 -0
  73. package/dist/browser/policies/retryPolicy.js +4 -3
  74. package/dist/browser/policies/retryPolicy.js.map +1 -1
  75. package/dist/browser/restError.js +1 -1
  76. package/dist/browser/restError.js.map +1 -1
  77. package/dist/browser/types-browser.d.mts +19 -0
  78. package/dist/browser/{util/concat.js → types-browser.mjs} +2 -2
  79. package/dist/browser/types-browser.mjs.map +1 -0
  80. package/dist/browser/util/bytesEncoding-web.d.mts +2 -0
  81. package/dist/{react-native/util/bytesEncoding.js → browser/util/bytesEncoding-web.mjs} +1 -1
  82. package/dist/browser/util/bytesEncoding-web.mjs.map +1 -0
  83. package/dist/browser/util/bytesEncoding.common.d.ts +4 -4
  84. package/dist/browser/util/bytesEncoding.common.js +3 -4
  85. package/dist/browser/util/bytesEncoding.common.js.map +1 -1
  86. package/dist/browser/util/concat-browser.d.mts +16 -0
  87. package/dist/{esm/util/concat.common.js → browser/util/concat-browser.mjs} +4 -11
  88. package/dist/browser/util/concat-browser.mjs.map +1 -0
  89. package/dist/browser/util/inspect-web.d.mts +2 -0
  90. package/dist/{react-native/util/inspect.js → browser/util/inspect-web.mjs} +1 -1
  91. package/dist/browser/util/inspect-web.mjs.map +1 -0
  92. package/dist/browser/util/internal.d.ts +4 -4
  93. package/dist/browser/util/internal.js +4 -4
  94. package/dist/browser/util/internal.js.map +1 -1
  95. package/dist/browser/util/sanitizer.js +3 -3
  96. package/dist/browser/util/sanitizer.js.map +1 -1
  97. package/dist/browser/util/sha256-web.d.mts +2 -0
  98. package/dist/{react-native/util/sha256.js → browser/util/sha256-web.mjs} +1 -1
  99. package/dist/browser/util/sha256-web.mjs.map +1 -0
  100. package/dist/browser/util/sha256.common.js +1 -1
  101. package/dist/browser/util/sha256.common.js.map +1 -1
  102. package/dist/browser/util/typeGuards-browser.d.mts +14 -0
  103. package/dist/browser/util/typeGuards-browser.mjs +26 -0
  104. package/dist/browser/util/typeGuards-browser.mjs.map +1 -0
  105. package/dist/browser/util/typeGuards.d.ts +5 -4
  106. package/dist/browser/util/typeGuards.js +3 -9
  107. package/dist/browser/util/typeGuards.js.map +1 -1
  108. package/dist/browser/util/userAgent.d.ts +2 -0
  109. package/dist/browser/util/userAgent.js +2 -1
  110. package/dist/browser/util/userAgent.js.map +1 -1
  111. package/dist/browser/util/userAgentPlatform-browser.d.mts +37 -0
  112. package/dist/browser/util/{userAgentPlatform.js → userAgentPlatform-browser.mjs} +10 -11
  113. package/dist/browser/util/userAgentPlatform-browser.mjs.map +1 -0
  114. package/dist/browser/util/{uuidUtils.d.ts → uuidUtils-browser.d.mts} +1 -1
  115. package/dist/browser/util/{uuidUtils.js → uuidUtils-browser.mjs} +1 -1
  116. package/dist/browser/util/uuidUtils-browser.mjs.map +1 -0
  117. package/dist/browser/util/uuidUtils.common.js +1 -1
  118. package/dist/browser/util/uuidUtils.common.js.map +1 -1
  119. package/dist/commonjs/abort-controller/AbortError.js +1 -0
  120. package/dist/commonjs/abort-controller/AbortError.js.map +1 -1
  121. package/dist/commonjs/auth/credentials.js +1 -0
  122. package/dist/commonjs/auth/credentials.js.map +1 -1
  123. package/dist/commonjs/auth/oauth2Flows.js +1 -0
  124. package/dist/commonjs/auth/oauth2Flows.js.map +1 -1
  125. package/dist/commonjs/auth/schemes.js +1 -0
  126. package/dist/commonjs/auth/schemes.js.map +1 -1
  127. package/dist/commonjs/client/apiVersionPolicy.js +1 -0
  128. package/dist/commonjs/client/apiVersionPolicy.js.map +1 -1
  129. package/dist/commonjs/client/clientHelpers.js +3 -2
  130. package/dist/commonjs/client/clientHelpers.js.map +3 -3
  131. package/dist/commonjs/client/common.d.ts +3 -2
  132. package/dist/commonjs/client/common.js +1 -0
  133. package/dist/commonjs/client/common.js.map +2 -2
  134. package/dist/commonjs/client/getClient.js +4 -3
  135. package/dist/commonjs/client/getClient.js.map +3 -3
  136. package/dist/commonjs/client/multipart.js +1 -0
  137. package/dist/commonjs/client/multipart.js.map +3 -3
  138. package/dist/commonjs/client/operationOptionHelpers.js +1 -0
  139. package/dist/commonjs/client/operationOptionHelpers.js.map +1 -1
  140. package/dist/commonjs/client/restError.js +6 -4
  141. package/dist/commonjs/client/restError.js.map +3 -3
  142. package/dist/commonjs/client/sendRequest.js +39 -10
  143. package/dist/commonjs/client/sendRequest.js.map +3 -3
  144. package/dist/commonjs/client/urlHelpers.js +7 -3
  145. package/dist/commonjs/client/urlHelpers.js.map +3 -3
  146. package/dist/commonjs/constants.js +2 -1
  147. package/dist/commonjs/constants.js.map +2 -2
  148. package/dist/commonjs/createPipelineFromOptions.d.ts +1 -1
  149. package/dist/commonjs/createPipelineFromOptions.js +3 -19
  150. package/dist/commonjs/createPipelineFromOptions.js.map +3 -3
  151. package/dist/commonjs/defaultHttpClient.js +1 -0
  152. package/dist/commonjs/defaultHttpClient.js.map +1 -1
  153. package/dist/{browser/util/checkEnvironment.d.ts → commonjs/env.d.ts} +21 -1
  154. package/dist/commonjs/env.js +67 -0
  155. package/dist/commonjs/env.js.map +7 -0
  156. package/dist/commonjs/formData.d.ts +10 -0
  157. package/dist/commonjs/{logger/log.common.js → formData.js} +18 -18
  158. package/dist/commonjs/formData.js.map +7 -0
  159. package/dist/commonjs/httpHeaders.js +5 -1
  160. package/dist/commonjs/httpHeaders.js.map +3 -3
  161. package/dist/commonjs/index.d.ts +1 -12
  162. package/dist/commonjs/index.js +3 -2
  163. package/dist/commonjs/index.js.map +3 -3
  164. package/dist/commonjs/interfaces.d.ts +15 -14
  165. package/dist/commonjs/interfaces.js +1 -0
  166. package/dist/commonjs/interfaces.js.map +2 -2
  167. package/dist/commonjs/log.js +1 -0
  168. package/dist/commonjs/log.js.map +1 -1
  169. package/dist/commonjs/logger/debug.js +3 -1
  170. package/dist/commonjs/logger/debug.js.map +3 -3
  171. package/dist/commonjs/logger/internal.js +1 -0
  172. package/dist/commonjs/logger/internal.js.map +1 -1
  173. package/dist/commonjs/logger/log.js +1 -0
  174. package/dist/commonjs/logger/log.js.map +1 -1
  175. package/dist/commonjs/logger/logger.js +3 -1
  176. package/dist/commonjs/logger/logger.js.map +3 -3
  177. package/dist/commonjs/nodeHttpClient.js +4 -1
  178. package/dist/commonjs/nodeHttpClient.js.map +3 -3
  179. package/dist/commonjs/pipeline.js +1 -0
  180. package/dist/commonjs/pipeline.js.map +1 -1
  181. package/dist/commonjs/pipelineRequest.js +3 -2
  182. package/dist/commonjs/pipelineRequest.js.map +3 -3
  183. package/dist/commonjs/policies/agentPolicy.js +1 -0
  184. package/dist/commonjs/policies/agentPolicy.js.map +1 -1
  185. package/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +1 -0
  186. package/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js.map +1 -1
  187. package/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +1 -0
  188. package/dist/commonjs/policies/auth/basicAuthenticationPolicy.js.map +2 -2
  189. package/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +1 -0
  190. package/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js.map +1 -1
  191. package/dist/commonjs/policies/auth/checkInsecureConnection.js +4 -2
  192. package/dist/commonjs/policies/auth/checkInsecureConnection.js.map +3 -3
  193. package/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +1 -0
  194. package/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js.map +1 -1
  195. package/dist/commonjs/policies/decompressResponsePolicy.js +1 -0
  196. package/dist/commonjs/policies/decompressResponsePolicy.js.map +1 -1
  197. package/dist/commonjs/policies/defaultRetryPolicy.js +1 -0
  198. package/dist/commonjs/policies/defaultRetryPolicy.js.map +1 -1
  199. package/dist/commonjs/policies/exponentialRetryPolicy.js +1 -0
  200. package/dist/commonjs/policies/exponentialRetryPolicy.js.map +1 -1
  201. package/dist/commonjs/policies/formDataPolicy.js +5 -11
  202. package/dist/commonjs/policies/formDataPolicy.js.map +3 -3
  203. package/dist/commonjs/policies/internal.d.ts +1 -1
  204. package/dist/commonjs/policies/internal.js +8 -7
  205. package/dist/commonjs/policies/internal.js.map +3 -3
  206. package/dist/commonjs/policies/logPolicy.js +1 -0
  207. package/dist/commonjs/policies/logPolicy.js.map +1 -1
  208. package/dist/commonjs/policies/multipartPolicy.js +3 -2
  209. package/dist/commonjs/policies/multipartPolicy.js.map +3 -3
  210. package/dist/commonjs/policies/platformPolicies.d.ts +25 -0
  211. package/dist/commonjs/policies/platformPolicies.js +43 -0
  212. package/dist/commonjs/policies/platformPolicies.js.map +7 -0
  213. package/dist/commonjs/policies/proxyPolicy.js +3 -3
  214. package/dist/commonjs/policies/proxyPolicy.js.map +3 -3
  215. package/dist/commonjs/policies/redirectPolicy.js +1 -0
  216. package/dist/commonjs/policies/redirectPolicy.js.map +1 -1
  217. package/dist/commonjs/policies/retryPolicy.js +5 -3
  218. package/dist/commonjs/policies/retryPolicy.js.map +3 -3
  219. package/dist/commonjs/policies/systemErrorRetryPolicy.js +1 -0
  220. package/dist/commonjs/policies/systemErrorRetryPolicy.js.map +1 -1
  221. package/dist/commonjs/policies/throttlingRetryPolicy.js +1 -0
  222. package/dist/commonjs/policies/throttlingRetryPolicy.js.map +1 -1
  223. package/dist/commonjs/policies/tlsPolicy.js +1 -0
  224. package/dist/commonjs/policies/tlsPolicy.js.map +1 -1
  225. package/dist/commonjs/policies/userAgentPolicy.js +1 -0
  226. package/dist/commonjs/policies/userAgentPolicy.js.map +1 -1
  227. package/dist/commonjs/restError.js +1 -0
  228. package/dist/commonjs/restError.js.map +2 -2
  229. package/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +1 -0
  230. package/dist/commonjs/retryStrategies/exponentialRetryStrategy.js.map +1 -1
  231. package/dist/commonjs/retryStrategies/retryStrategy.js +1 -0
  232. package/dist/commonjs/retryStrategies/retryStrategy.js.map +1 -1
  233. package/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +1 -0
  234. package/dist/commonjs/retryStrategies/throttlingRetryStrategy.js.map +1 -1
  235. package/dist/commonjs/tsdoc-metadata.json +1 -1
  236. package/dist/commonjs/types.d.ts +19 -0
  237. package/dist/commonjs/types.js +16 -0
  238. package/dist/commonjs/types.js.map +7 -0
  239. package/dist/commonjs/util/bytesEncoding.js +1 -0
  240. package/dist/commonjs/util/bytesEncoding.js.map +1 -1
  241. package/dist/commonjs/util/concat.d.ts +1 -1
  242. package/dist/commonjs/util/concat.js +1 -0
  243. package/dist/commonjs/util/concat.js.map +3 -3
  244. package/dist/commonjs/util/delay.js +1 -0
  245. package/dist/commonjs/util/delay.js.map +1 -1
  246. package/dist/commonjs/util/error.js +1 -0
  247. package/dist/commonjs/util/error.js.map +1 -1
  248. package/dist/commonjs/util/helpers.js +1 -0
  249. package/dist/commonjs/util/helpers.js.map +1 -1
  250. package/dist/commonjs/util/inspect.js +1 -0
  251. package/dist/commonjs/util/inspect.js.map +1 -1
  252. package/dist/commonjs/util/internal.d.ts +1 -1
  253. package/dist/commonjs/util/internal.js +11 -10
  254. package/dist/commonjs/util/internal.js.map +3 -3
  255. package/dist/commonjs/util/object.js +1 -0
  256. package/dist/commonjs/util/object.js.map +1 -1
  257. package/dist/commonjs/util/random.js +1 -0
  258. package/dist/commonjs/util/random.js.map +1 -1
  259. package/dist/commonjs/util/sanitizer.js +4 -3
  260. package/dist/commonjs/util/sanitizer.js.map +3 -3
  261. package/dist/commonjs/util/sha256.js +1 -0
  262. package/dist/commonjs/util/sha256.js.map +1 -1
  263. package/dist/commonjs/util/typeGuards-node.d.ts +13 -0
  264. package/dist/commonjs/util/{inspect.common.js → typeGuards-node.js} +15 -6
  265. package/dist/commonjs/util/typeGuards-node.js.map +7 -0
  266. package/dist/commonjs/util/typeGuards.d.ts +5 -4
  267. package/dist/commonjs/util/typeGuards.js +6 -12
  268. package/dist/commonjs/util/typeGuards.js.map +3 -3
  269. package/dist/commonjs/util/userAgent.d.ts +2 -0
  270. package/dist/commonjs/util/userAgent.js +8 -5
  271. package/dist/commonjs/util/userAgent.js.map +3 -3
  272. package/dist/commonjs/util/userAgentPlatform.d.ts +8 -0
  273. package/dist/commonjs/util/userAgentPlatform.js +7 -7
  274. package/dist/commonjs/util/userAgentPlatform.js.map +3 -3
  275. package/dist/commonjs/util/uuidUtils.js +1 -0
  276. package/dist/commonjs/util/uuidUtils.js.map +1 -1
  277. package/dist/esm/client/clientHelpers.js.map +1 -1
  278. package/dist/esm/client/common.d.ts +3 -2
  279. package/dist/esm/client/common.js.map +1 -1
  280. package/dist/esm/client/getClient.js +1 -1
  281. package/dist/esm/client/getClient.js.map +1 -1
  282. package/dist/esm/client/multipart.js.map +1 -1
  283. package/dist/esm/client/restError.js +5 -4
  284. package/dist/esm/client/restError.js.map +1 -1
  285. package/dist/esm/client/sendRequest.js +25 -14
  286. package/dist/esm/client/sendRequest.js.map +1 -1
  287. package/dist/esm/client/urlHelpers.js +9 -3
  288. package/dist/esm/client/urlHelpers.js.map +1 -1
  289. package/dist/esm/constants.js +1 -1
  290. package/dist/esm/constants.js.map +1 -1
  291. package/dist/esm/createPipelineFromOptions.d.ts +1 -1
  292. package/dist/esm/createPipelineFromOptions.js +2 -21
  293. package/dist/esm/createPipelineFromOptions.js.map +1 -1
  294. package/dist/{react-native/util/checkEnvironment.d.ts → esm/env.d.ts} +21 -1
  295. package/dist/esm/env.js +48 -0
  296. package/dist/esm/env.js.map +1 -0
  297. package/dist/esm/formData.d.ts +10 -0
  298. package/dist/esm/formData.js +26 -0
  299. package/dist/esm/formData.js.map +1 -0
  300. package/dist/esm/httpHeaders.js +11 -1
  301. package/dist/esm/httpHeaders.js.map +1 -1
  302. package/dist/esm/index.d.ts +1 -12
  303. package/dist/esm/index.js.map +1 -1
  304. package/dist/esm/interfaces.d.ts +15 -14
  305. package/dist/esm/interfaces.js.map +1 -1
  306. package/dist/esm/logger/debug.js +2 -1
  307. package/dist/esm/logger/debug.js.map +1 -1
  308. package/dist/esm/logger/logger.js +2 -2
  309. package/dist/esm/logger/logger.js.map +1 -1
  310. package/dist/esm/nodeHttpClient.js +3 -1
  311. package/dist/esm/nodeHttpClient.js.map +1 -1
  312. package/dist/esm/pipelineRequest.js.map +1 -1
  313. package/dist/esm/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  314. package/dist/esm/policies/auth/checkInsecureConnection.js +3 -2
  315. package/dist/esm/policies/auth/checkInsecureConnection.js.map +1 -1
  316. package/dist/esm/policies/formDataPolicy.js +4 -11
  317. package/dist/esm/policies/formDataPolicy.js.map +1 -1
  318. package/dist/esm/policies/internal.d.ts +1 -1
  319. package/dist/esm/policies/internal.js +1 -1
  320. package/dist/esm/policies/internal.js.map +1 -1
  321. package/dist/esm/policies/multipartPolicy.js +4 -0
  322. package/dist/esm/policies/multipartPolicy.js.map +1 -1
  323. package/dist/esm/policies/platformPolicies.d.ts +25 -0
  324. package/dist/esm/policies/platformPolicies.js +30 -0
  325. package/dist/esm/policies/platformPolicies.js.map +1 -0
  326. package/dist/esm/policies/proxyPolicy.js +2 -3
  327. package/dist/esm/policies/proxyPolicy.js.map +1 -1
  328. package/dist/esm/policies/retryPolicy.js +4 -3
  329. package/dist/esm/policies/retryPolicy.js.map +1 -1
  330. package/dist/esm/restError.js.map +1 -1
  331. package/dist/esm/types.d.ts +19 -0
  332. package/dist/esm/types.js +4 -0
  333. package/dist/esm/types.js.map +1 -0
  334. package/dist/esm/util/concat.d.ts +1 -1
  335. package/dist/esm/util/concat.js.map +1 -1
  336. package/dist/esm/util/internal.d.ts +1 -1
  337. package/dist/esm/util/internal.js +1 -1
  338. package/dist/esm/util/internal.js.map +1 -1
  339. package/dist/esm/util/sanitizer.js +3 -3
  340. package/dist/esm/util/sanitizer.js.map +1 -1
  341. package/dist/esm/util/typeGuards-node.d.ts +13 -0
  342. package/dist/esm/util/typeGuards-node.js +20 -0
  343. package/dist/esm/util/typeGuards-node.js.map +1 -0
  344. package/dist/esm/util/typeGuards.d.ts +5 -4
  345. package/dist/esm/util/typeGuards.js +3 -9
  346. package/dist/esm/util/typeGuards.js.map +1 -1
  347. package/dist/esm/util/userAgent.d.ts +2 -0
  348. package/dist/esm/util/userAgent.js +1 -0
  349. package/dist/esm/util/userAgent.js.map +1 -1
  350. package/dist/esm/util/userAgentPlatform.d.ts +8 -0
  351. package/dist/esm/util/userAgentPlatform.js +6 -7
  352. package/dist/esm/util/userAgentPlatform.js.map +1 -1
  353. package/dist/react-native/client/clientHelpers.js +1 -1
  354. package/dist/react-native/client/clientHelpers.js.map +1 -1
  355. package/dist/react-native/client/common.d.ts +3 -2
  356. package/dist/react-native/client/common.js.map +1 -1
  357. package/dist/react-native/client/getClient.js +1 -1
  358. package/dist/react-native/client/getClient.js.map +1 -1
  359. package/dist/react-native/client/multipart.js +1 -1
  360. package/dist/react-native/client/multipart.js.map +1 -1
  361. package/dist/react-native/client/restError.js +5 -4
  362. package/dist/react-native/client/restError.js.map +1 -1
  363. package/dist/react-native/client/sendRequest.js +25 -14
  364. package/dist/react-native/client/sendRequest.js.map +1 -1
  365. package/dist/react-native/client/urlHelpers.js +9 -3
  366. package/dist/react-native/client/urlHelpers.js.map +1 -1
  367. package/dist/react-native/constants.js +1 -1
  368. package/dist/react-native/constants.js.map +1 -1
  369. package/dist/react-native/createPipelineFromOptions.d.ts +1 -1
  370. package/dist/react-native/createPipelineFromOptions.js +2 -21
  371. package/dist/react-native/createPipelineFromOptions.js.map +1 -1
  372. package/dist/react-native/{defaultHttpClient.d.ts → defaultHttpClient-react-native.d.mts} +1 -1
  373. package/dist/react-native/{defaultHttpClient.js → defaultHttpClient-react-native.mjs} +1 -1
  374. package/dist/react-native/defaultHttpClient-react-native.mjs.map +1 -0
  375. package/dist/react-native/encoding-react-native.d.mts +21 -0
  376. package/dist/react-native/encoding-react-native.mjs +25 -0
  377. package/dist/react-native/encoding-react-native.mjs.map +1 -0
  378. package/dist/{commonjs/util/checkEnvironment.d.ts → react-native/env-react-native.d.mts} +21 -1
  379. package/dist/react-native/env-react-native.mjs +50 -0
  380. package/dist/react-native/env-react-native.mjs.map +1 -0
  381. package/dist/react-native/formData-web.d.mts +9 -0
  382. package/dist/react-native/formData-web.mjs +12 -0
  383. package/dist/react-native/formData-web.mjs.map +1 -0
  384. package/dist/react-native/httpHeaders.js +11 -1
  385. package/dist/react-native/httpHeaders.js.map +1 -1
  386. package/dist/react-native/index.d.ts +3 -14
  387. package/dist/react-native/index.js +2 -2
  388. package/dist/react-native/index.js.map +1 -1
  389. package/dist/react-native/interfaces.d.ts +15 -14
  390. package/dist/react-native/interfaces.js.map +1 -1
  391. package/dist/react-native/logger/debug.js +3 -2
  392. package/dist/react-native/logger/debug.js.map +1 -1
  393. package/dist/{browser/logger/log.d.ts → react-native/logger/log-web.d.mts} +1 -1
  394. package/dist/react-native/logger/{log.js → log-web.mjs} +1 -1
  395. package/dist/react-native/logger/log-web.mjs.map +1 -0
  396. package/dist/react-native/logger/logger.js +2 -2
  397. package/dist/react-native/logger/logger.js.map +1 -1
  398. package/dist/react-native/pipelineRequest.js +1 -1
  399. package/dist/react-native/pipelineRequest.js.map +1 -1
  400. package/dist/react-native/policies/auth/basicAuthenticationPolicy.js +1 -1
  401. package/dist/react-native/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  402. package/dist/react-native/policies/auth/checkInsecureConnection.js +3 -2
  403. package/dist/react-native/policies/auth/checkInsecureConnection.js.map +1 -1
  404. package/dist/react-native/policies/decompressResponsePolicy-web.d.mts +8 -0
  405. package/dist/react-native/policies/decompressResponsePolicy-web.mjs +11 -0
  406. package/dist/react-native/policies/decompressResponsePolicy-web.mjs.map +1 -0
  407. package/dist/react-native/policies/formDataPolicy.js +5 -12
  408. package/dist/react-native/policies/formDataPolicy.js.map +1 -1
  409. package/dist/react-native/policies/internal.d.ts +2 -2
  410. package/dist/react-native/policies/internal.js +2 -2
  411. package/dist/react-native/policies/internal.js.map +1 -1
  412. package/dist/react-native/policies/multipartPolicy.js +7 -3
  413. package/dist/react-native/policies/multipartPolicy.js.map +1 -1
  414. package/dist/react-native/policies/platformPolicies-web.d.mts +10 -0
  415. package/dist/react-native/policies/platformPolicies-web.mjs +12 -0
  416. package/dist/react-native/policies/platformPolicies-web.mjs.map +1 -0
  417. package/dist/react-native/policies/platformPolicies.d.ts +25 -0
  418. package/dist/react-native/policies/platformPolicies.js +30 -0
  419. package/dist/react-native/policies/platformPolicies.js.map +1 -0
  420. package/dist/react-native/policies/proxyPolicy-web.d.mts +2 -0
  421. package/dist/{browser/policies/proxyPolicy.js → react-native/policies/proxyPolicy-web.mjs} +1 -1
  422. package/dist/react-native/policies/proxyPolicy-web.mjs.map +1 -0
  423. package/dist/react-native/policies/retryPolicy.js +4 -3
  424. package/dist/react-native/policies/retryPolicy.js.map +1 -1
  425. package/dist/react-native/restError.js +1 -1
  426. package/dist/react-native/restError.js.map +1 -1
  427. package/dist/react-native/types-react-native.d.mts +19 -0
  428. package/dist/react-native/types-react-native.mjs +4 -0
  429. package/dist/react-native/types-react-native.mjs.map +1 -0
  430. package/dist/react-native/util/bytesEncoding-web.d.mts +2 -0
  431. package/dist/{browser/util/bytesEncoding.js → react-native/util/bytesEncoding-web.mjs} +1 -1
  432. package/dist/react-native/util/bytesEncoding-web.mjs.map +1 -0
  433. package/dist/react-native/util/bytesEncoding.common.d.ts +4 -4
  434. package/dist/react-native/util/bytesEncoding.common.js +3 -4
  435. package/dist/react-native/util/bytesEncoding.common.js.map +1 -1
  436. package/dist/react-native/util/concat-react-native.d.mts +42 -0
  437. package/dist/react-native/util/concat-react-native.mjs +51 -0
  438. package/dist/react-native/util/concat-react-native.mjs.map +1 -0
  439. package/dist/react-native/util/inspect-web.d.mts +2 -0
  440. package/dist/{browser/util/inspect.js → react-native/util/inspect-web.mjs} +1 -1
  441. package/dist/react-native/util/inspect-web.mjs.map +1 -0
  442. package/dist/react-native/util/internal.d.ts +4 -4
  443. package/dist/react-native/util/internal.js +4 -4
  444. package/dist/react-native/util/internal.js.map +1 -1
  445. package/dist/react-native/util/sanitizer.js +3 -3
  446. package/dist/react-native/util/sanitizer.js.map +1 -1
  447. package/dist/react-native/util/sha256-web.d.mts +2 -0
  448. package/dist/{browser/util/sha256.js → react-native/util/sha256-web.mjs} +1 -1
  449. package/dist/react-native/util/sha256-web.mjs.map +1 -0
  450. package/dist/react-native/util/sha256.common.js +1 -1
  451. package/dist/react-native/util/sha256.common.js.map +1 -1
  452. package/dist/react-native/util/typeGuards-react-native.d.mts +16 -0
  453. package/dist/react-native/util/typeGuards-react-native.mjs +34 -0
  454. package/dist/react-native/util/typeGuards-react-native.mjs.map +1 -0
  455. package/dist/react-native/util/typeGuards.d.ts +5 -4
  456. package/dist/react-native/util/typeGuards.js +3 -9
  457. package/dist/react-native/util/typeGuards.js.map +1 -1
  458. package/dist/react-native/util/userAgent.d.ts +2 -0
  459. package/dist/react-native/util/userAgent.js +2 -1
  460. package/dist/react-native/util/userAgent.js.map +1 -1
  461. package/dist/react-native/util/{userAgentPlatform.d.ts → userAgentPlatform-react-native.d.mts} +1 -1
  462. package/dist/react-native/util/{userAgentPlatform.js → userAgentPlatform-react-native.mjs} +1 -1
  463. package/dist/react-native/util/userAgentPlatform-react-native.mjs.map +1 -0
  464. package/dist/react-native/util/uuidUtils-react-native.d.mts +2 -0
  465. package/dist/react-native/util/{uuidUtils.js → uuidUtils-react-native.mjs} +1 -1
  466. package/dist/react-native/util/uuidUtils-react-native.mjs.map +1 -0
  467. package/dist/react-native/util/uuidUtils.common.js +1 -1
  468. package/dist/react-native/util/uuidUtils.common.js.map +1 -1
  469. package/package.json +102 -14
  470. package/dist/browser/defaultHttpClient.js.map +0 -1
  471. package/dist/browser/logger/log.js.map +0 -1
  472. package/dist/browser/nodeHttpClient.d.ts +0 -9
  473. package/dist/browser/nodeHttpClient.js +0 -347
  474. package/dist/browser/nodeHttpClient.js.map +0 -1
  475. package/dist/browser/policies/decompressResponsePolicy.js.map +0 -1
  476. package/dist/browser/policies/proxyPolicy.d.ts +0 -2
  477. package/dist/browser/policies/proxyPolicy.js.map +0 -1
  478. package/dist/browser/util/bytesEncoding.d.ts +0 -2
  479. package/dist/browser/util/bytesEncoding.js.map +0 -1
  480. package/dist/browser/util/checkEnvironment.js +0 -41
  481. package/dist/browser/util/checkEnvironment.js.map +0 -1
  482. package/dist/browser/util/concat.common.d.ts +0 -17
  483. package/dist/browser/util/concat.common.js +0 -58
  484. package/dist/browser/util/concat.common.js.map +0 -1
  485. package/dist/browser/util/concat.d.ts +0 -2
  486. package/dist/browser/util/concat.js.map +0 -1
  487. package/dist/browser/util/inspect.d.ts +0 -2
  488. package/dist/browser/util/inspect.js.map +0 -1
  489. package/dist/browser/util/sha256.d.ts +0 -2
  490. package/dist/browser/util/sha256.js.map +0 -1
  491. package/dist/browser/util/userAgentPlatform.d.ts +0 -9
  492. package/dist/browser/util/userAgentPlatform.js.map +0 -1
  493. package/dist/browser/util/uuidUtils.js.map +0 -1
  494. package/dist/browser/xhrHttpClient.d.ts +0 -7
  495. package/dist/browser/xhrHttpClient.js +0 -174
  496. package/dist/browser/xhrHttpClient.js.map +0 -1
  497. package/dist/commonjs/fetchHttpClient.d.ts +0 -7
  498. package/dist/commonjs/fetchHttpClient.js +0 -237
  499. package/dist/commonjs/fetchHttpClient.js.map +0 -7
  500. package/dist/commonjs/logger/log.common.d.ts +0 -2
  501. package/dist/commonjs/logger/log.common.js.map +0 -7
  502. package/dist/commonjs/policies/proxyPolicy.common.d.ts +0 -19
  503. package/dist/commonjs/policies/proxyPolicy.common.js +0 -43
  504. package/dist/commonjs/policies/proxyPolicy.common.js.map +0 -7
  505. package/dist/commonjs/util/arrayBuffer.d.ts +0 -7
  506. package/dist/commonjs/util/arrayBuffer.js +0 -36
  507. package/dist/commonjs/util/arrayBuffer.js.map +0 -7
  508. package/dist/commonjs/util/bytesEncoding.common.d.ts +0 -61
  509. package/dist/commonjs/util/bytesEncoding.common.js +0 -105
  510. package/dist/commonjs/util/bytesEncoding.common.js.map +0 -7
  511. package/dist/commonjs/util/checkEnvironment.js +0 -45
  512. package/dist/commonjs/util/checkEnvironment.js.map +0 -7
  513. package/dist/commonjs/util/concat.common.d.ts +0 -17
  514. package/dist/commonjs/util/concat.common.js +0 -60
  515. package/dist/commonjs/util/concat.common.js.map +0 -7
  516. package/dist/commonjs/util/inspect.common.d.ts +0 -2
  517. package/dist/commonjs/util/inspect.common.js.map +0 -7
  518. package/dist/commonjs/util/sha256.common.d.ts +0 -14
  519. package/dist/commonjs/util/sha256.common.js +0 -69
  520. package/dist/commonjs/util/sha256.common.js.map +0 -7
  521. package/dist/commonjs/util/uuidUtils.common.d.ts +0 -13
  522. package/dist/commonjs/util/uuidUtils.common.js +0 -48
  523. package/dist/commonjs/util/uuidUtils.common.js.map +0 -7
  524. package/dist/commonjs/xhrHttpClient.d.ts +0 -7
  525. package/dist/commonjs/xhrHttpClient.js +0 -185
  526. package/dist/commonjs/xhrHttpClient.js.map +0 -7
  527. package/dist/esm/fetchHttpClient.d.ts +0 -7
  528. package/dist/esm/fetchHttpClient.js +0 -279
  529. package/dist/esm/fetchHttpClient.js.map +0 -1
  530. package/dist/esm/logger/log.common.d.ts +0 -2
  531. package/dist/esm/logger/log.common.js +0 -23
  532. package/dist/esm/logger/log.common.js.map +0 -1
  533. package/dist/esm/policies/proxyPolicy.common.d.ts +0 -19
  534. package/dist/esm/policies/proxyPolicy.common.js +0 -24
  535. package/dist/esm/policies/proxyPolicy.common.js.map +0 -1
  536. package/dist/esm/util/arrayBuffer.d.ts +0 -7
  537. package/dist/esm/util/arrayBuffer.js +0 -20
  538. package/dist/esm/util/arrayBuffer.js.map +0 -1
  539. package/dist/esm/util/bytesEncoding.common.d.ts +0 -61
  540. package/dist/esm/util/bytesEncoding.common.js +0 -110
  541. package/dist/esm/util/bytesEncoding.common.js.map +0 -1
  542. package/dist/esm/util/checkEnvironment.js.map +0 -1
  543. package/dist/esm/util/concat.common.d.ts +0 -17
  544. package/dist/esm/util/concat.common.js.map +0 -1
  545. package/dist/esm/util/inspect.common.d.ts +0 -2
  546. package/dist/esm/util/inspect.common.js +0 -4
  547. package/dist/esm/util/inspect.common.js.map +0 -1
  548. package/dist/esm/util/sha256.common.d.ts +0 -14
  549. package/dist/esm/util/sha256.common.js +0 -49
  550. package/dist/esm/util/sha256.common.js.map +0 -1
  551. package/dist/esm/util/uuidUtils.common.d.ts +0 -13
  552. package/dist/esm/util/uuidUtils.common.js +0 -40
  553. package/dist/esm/util/uuidUtils.common.js.map +0 -1
  554. package/dist/esm/xhrHttpClient.d.ts +0 -7
  555. package/dist/esm/xhrHttpClient.js +0 -174
  556. package/dist/esm/xhrHttpClient.js.map +0 -1
  557. package/dist/react-native/defaultHttpClient.js.map +0 -1
  558. package/dist/react-native/fetchHttpClient.d.ts +0 -7
  559. package/dist/react-native/fetchHttpClient.js +0 -279
  560. package/dist/react-native/fetchHttpClient.js.map +0 -1
  561. package/dist/react-native/logger/log.js.map +0 -1
  562. package/dist/react-native/nodeHttpClient.d.ts +0 -9
  563. package/dist/react-native/nodeHttpClient.js +0 -347
  564. package/dist/react-native/nodeHttpClient.js.map +0 -1
  565. package/dist/react-native/policies/decompressResponsePolicy.d.ts +0 -11
  566. package/dist/react-native/policies/decompressResponsePolicy.js +0 -23
  567. package/dist/react-native/policies/decompressResponsePolicy.js.map +0 -1
  568. package/dist/react-native/policies/proxyPolicy.d.ts +0 -2
  569. package/dist/react-native/policies/proxyPolicy.js.map +0 -1
  570. package/dist/react-native/util/bytesEncoding.d.ts +0 -2
  571. package/dist/react-native/util/bytesEncoding.js.map +0 -1
  572. package/dist/react-native/util/checkEnvironment.js +0 -41
  573. package/dist/react-native/util/checkEnvironment.js.map +0 -1
  574. package/dist/react-native/util/concat.common.d.ts +0 -17
  575. package/dist/react-native/util/concat.common.js +0 -58
  576. package/dist/react-native/util/concat.common.js.map +0 -1
  577. package/dist/react-native/util/concat.d.ts +0 -2
  578. package/dist/react-native/util/concat.js +0 -4
  579. package/dist/react-native/util/concat.js.map +0 -1
  580. package/dist/react-native/util/inspect.d.ts +0 -2
  581. package/dist/react-native/util/inspect.js.map +0 -1
  582. package/dist/react-native/util/sha256.d.ts +0 -2
  583. package/dist/react-native/util/sha256.js.map +0 -1
  584. package/dist/react-native/util/userAgentPlatform.js.map +0 -1
  585. package/dist/react-native/util/uuidUtils.d.ts +0 -2
  586. package/dist/react-native/util/uuidUtils.js.map +0 -1
@@ -22,35 +22,18 @@ __export(createPipelineFromOptions_exports, {
22
22
  module.exports = __toCommonJS(createPipelineFromOptions_exports);
23
23
  var import_logPolicy = require("./policies/logPolicy.js");
24
24
  var import_pipeline = require("./pipeline.js");
25
- var import_redirectPolicy = require("./policies/redirectPolicy.js");
26
25
  var import_userAgentPolicy = require("./policies/userAgentPolicy.js");
27
- var import_decompressResponsePolicy = require("./policies/decompressResponsePolicy.js");
28
26
  var import_defaultRetryPolicy = require("./policies/defaultRetryPolicy.js");
29
27
  var import_formDataPolicy = require("./policies/formDataPolicy.js");
30
- var import_checkEnvironment = require("./util/checkEnvironment.js");
31
- var import_proxyPolicy = require("./policies/proxyPolicy.js");
32
- var import_agentPolicy = require("./policies/agentPolicy.js");
33
- var import_tlsPolicy = require("./policies/tlsPolicy.js");
28
+ var import_policies = require("./policies/platformPolicies.js");
34
29
  var import_multipartPolicy = require("./policies/multipartPolicy.js");
35
30
  function createPipelineFromOptions(options) {
36
31
  const pipeline = (0, import_pipeline.createEmptyPipeline)();
37
- if (import_checkEnvironment.isNodeLike) {
38
- if (options.agent) {
39
- pipeline.addPolicy((0, import_agentPolicy.agentPolicy)(options.agent));
40
- }
41
- if (options.tlsOptions) {
42
- pipeline.addPolicy((0, import_tlsPolicy.tlsPolicy)(options.tlsOptions));
43
- }
44
- pipeline.addPolicy((0, import_proxyPolicy.proxyPolicy)(options.proxyOptions));
45
- pipeline.addPolicy((0, import_decompressResponsePolicy.decompressResponsePolicy)());
46
- }
32
+ (0, import_policies.addPlatformPolicies)(pipeline, options);
47
33
  pipeline.addPolicy((0, import_formDataPolicy.formDataPolicy)(), { beforePolicies: [import_multipartPolicy.multipartPolicyName] });
48
34
  pipeline.addPolicy((0, import_userAgentPolicy.userAgentPolicy)(options.userAgentOptions));
49
35
  pipeline.addPolicy((0, import_multipartPolicy.multipartPolicy)(), { afterPhase: "Deserialize" });
50
36
  pipeline.addPolicy((0, import_defaultRetryPolicy.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" });
51
- if (import_checkEnvironment.isNodeLike) {
52
- pipeline.addPolicy((0, import_redirectPolicy.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" });
53
- }
54
37
  pipeline.addPolicy((0, import_logPolicy.logPolicy)(options.loggingOptions), { afterPhase: "Sign" });
55
38
  return pipeline;
56
39
  }
@@ -58,3 +41,4 @@ function createPipelineFromOptions(options) {
58
41
  0 && (module.exports = {
59
42
  createPipelineFromOptions
60
43
  });
44
+ //# sourceMappingURL=createPipelineFromOptions.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/core/ts-http-runtime/src/createPipelineFromOptions.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { type LogPolicyOptions, logPolicy } from \"./policies/logPolicy.js\";\nimport { type Pipeline, createEmptyPipeline } from \"./pipeline.js\";\nimport type { Agent, PipelineRetryOptions, ProxySettings, TlsSettings } from \"./interfaces.js\";\nimport { type RedirectPolicyOptions, redirectPolicy } from \"./policies/redirectPolicy.js\";\nimport { type UserAgentPolicyOptions, userAgentPolicy } from \"./policies/userAgentPolicy.js\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy.js\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy.js\";\nimport { formDataPolicy } from \"./policies/formDataPolicy.js\";\nimport { isNodeLike } from \"./util/checkEnvironment.js\";\nimport { proxyPolicy } from \"./policies/proxyPolicy.js\";\nimport { agentPolicy } from \"./policies/agentPolicy.js\";\nimport { tlsPolicy } from \"./policies/tlsPolicy.js\";\nimport { multipartPolicy, multipartPolicyName } from \"./policies/multipartPolicy.js\";\n\n/**\n * Defines options that are used to configure the HTTP pipeline for\n * an SDK client.\n */\nexport interface PipelineOptions {\n /**\n * Options that control how to retry failed requests.\n */\n retryOptions?: PipelineRetryOptions;\n\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxySettings;\n\n /** Options for configuring Agent instance for outgoing requests */\n agent?: Agent;\n\n /** Options for configuring TLS authentication */\n tlsOptions?: TlsSettings;\n\n /**\n * Options for how redirect responses are handled.\n */\n redirectOptions?: RedirectPolicyOptions;\n\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentPolicyOptions;\n\n /**\n * Options for setting common telemetry and tracing info to outgoing requests.\n */\n telemetryOptions?: TelemetryOptions;\n}\n\n/**\n * Defines options that are used to configure common telemetry and tracing info\n */\nexport interface TelemetryOptions {\n /**\n * The name of the header to pass the request ID to.\n */\n clientRequestIdHeaderName?: string;\n}\n\n/**\n * Defines options that are used to configure internal options of\n * the HTTP pipeline for an SDK client.\n */\nexport interface InternalPipelineOptions extends PipelineOptions {\n /**\n * Options to configure request/response logging.\n */\n loggingOptions?: LogPolicyOptions;\n}\n\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline {\n const pipeline = createEmptyPipeline();\n\n if (isNodeLike) {\n if (options.agent) {\n pipeline.addPolicy(agentPolicy(options.agent));\n }\n if (options.tlsOptions) {\n pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n }\n pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n pipeline.addPolicy(decompressResponsePolicy());\n }\n\n pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] });\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n // The multipart policy is added after policies with no phase, so that\n // policies can be added between it and formDataPolicy to modify\n // properties (e.g., making the boundary constant in recorded tests).\n pipeline.addPolicy(multipartPolicy(), { afterPhase: \"Deserialize\" });\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n if (isNodeLike) {\n // Both XHR and Fetch expect to handle redirects automatically,\n // so only include this policy when we're in Node.\n pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n }\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n\n return pipeline;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAiD;AACjD,sBAAmD;AAEnD,4BAA2D;AAC3D,6BAA6D;AAC7D,sCAAyC;AACzC,gCAAmC;AACnC,4BAA+B;AAC/B,8BAA2B;AAC3B,yBAA4B;AAC5B,yBAA4B;AAC5B,uBAA0B;AAC1B,6BAAqD;AAgE9C,SAAS,0BAA0B,SAA4C;AACpF,QAAM,eAAW,qCAAoB;AAErC,MAAI,oCAAY;AACd,QAAI,QAAQ,OAAO;AACjB,eAAS,cAAU,gCAAY,QAAQ,KAAK,CAAC;AAAA,IAC/C;AACA,QAAI,QAAQ,YAAY;AACtB,eAAS,cAAU,4BAAU,QAAQ,UAAU,CAAC;AAAA,IAClD;AACA,aAAS,cAAU,gCAAY,QAAQ,YAAY,CAAC;AACpD,aAAS,cAAU,0DAAyB,CAAC;AAAA,EAC/C;AAEA,WAAS,cAAU,sCAAe,GAAG,EAAE,gBAAgB,CAAC,0CAAmB,EAAE,CAAC;AAC9E,WAAS,cAAU,wCAAgB,QAAQ,gBAAgB,CAAC;AAI5D,WAAS,cAAU,wCAAgB,GAAG,EAAE,YAAY,cAAc,CAAC;AACnE,WAAS,cAAU,8CAAmB,QAAQ,YAAY,GAAG,EAAE,OAAO,QAAQ,CAAC;AAC/E,MAAI,oCAAY;AAGd,aAAS,cAAU,sCAAe,QAAQ,eAAe,GAAG,EAAE,YAAY,QAAQ,CAAC;AAAA,EACrF;AACA,WAAS,cAAU,4BAAU,QAAQ,cAAc,GAAG,EAAE,YAAY,OAAO,CAAC;AAE5E,SAAO;AACT;",
3
+ "sources": ["../../src/createPipelineFromOptions.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { type LogPolicyOptions, logPolicy } from \"./policies/logPolicy.js\";\nimport { type Pipeline, createEmptyPipeline } from \"./pipeline.js\";\nimport type { Agent, PipelineRetryOptions, ProxySettings, TlsSettings } from \"./interfaces.js\";\nimport type { RedirectPolicyOptions } from \"./policies/redirectPolicy.js\";\nimport { type UserAgentPolicyOptions, userAgentPolicy } from \"./policies/userAgentPolicy.js\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy.js\";\nimport { formDataPolicy } from \"./policies/formDataPolicy.js\";\nimport { addPlatformPolicies } from \"#platform/policies\";\nimport { multipartPolicy, multipartPolicyName } from \"./policies/multipartPolicy.js\";\n\n/**\n * Defines options that are used to configure the HTTP pipeline for\n * an SDK client.\n */\nexport interface PipelineOptions {\n /**\n * Options that control how to retry failed requests.\n */\n retryOptions?: PipelineRetryOptions;\n\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxySettings;\n\n /** Options for configuring Agent instance for outgoing requests */\n agent?: Agent;\n\n /** Options for configuring TLS authentication */\n tlsOptions?: TlsSettings;\n\n /**\n * Options for how redirect responses are handled.\n */\n redirectOptions?: RedirectPolicyOptions;\n\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentPolicyOptions;\n\n /**\n * Options for setting common telemetry and tracing info to outgoing requests.\n */\n telemetryOptions?: TelemetryOptions;\n}\n\n/**\n * Defines options that are used to configure common telemetry and tracing info\n */\nexport interface TelemetryOptions {\n /**\n * The name of the header to pass the request ID to.\n */\n clientRequestIdHeaderName?: string;\n}\n\n/**\n * Defines options that are used to configure internal options of\n * the HTTP pipeline for an SDK client.\n */\nexport interface InternalPipelineOptions extends PipelineOptions {\n /**\n * Options to configure request/response logging.\n */\n loggingOptions?: LogPolicyOptions;\n}\n\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline {\n const pipeline = createEmptyPipeline();\n\n addPlatformPolicies(pipeline, options);\n\n pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] });\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n // The multipart policy is added after policies with no phase, so that\n // policies can be added between it and formDataPolicy to modify\n // properties (e.g., making the boundary constant in recorded tests).\n pipeline.addPolicy(multipartPolicy(), { afterPhase: \"Deserialize\" });\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n\n return pipeline;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAiD;AACjD,sBAAmD;AAGnD,6BAA6D;AAC7D,gCAAmC;AACnC,4BAA+B;AAC/B,sBAAoC;AACpC,6BAAqD;AAgE9C,SAAS,0BAA0B,SAA4C;AACpF,QAAM,eAAW,qCAAoB;AAErC,2CAAoB,UAAU,OAAO;AAErC,WAAS,cAAU,sCAAe,GAAG,EAAE,gBAAgB,CAAC,0CAAmB,EAAE,CAAC;AAC9E,WAAS,cAAU,wCAAgB,QAAQ,gBAAgB,CAAC;AAI5D,WAAS,cAAU,wCAAgB,GAAG,EAAE,YAAY,cAAc,CAAC;AACnE,WAAS,cAAU,8CAAmB,QAAQ,YAAY,GAAG,EAAE,OAAO,QAAQ,CAAC;AAC/E,WAAS,cAAU,4BAAU,QAAQ,cAAc,GAAG,EAAE,YAAY,OAAO,CAAC;AAE5E,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -28,3 +28,4 @@ function createDefaultHttpClient() {
28
28
  0 && (module.exports = {
29
29
  createDefaultHttpClient
30
30
  });
31
+ //# sourceMappingURL=defaultHttpClient.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/core/ts-http-runtime/src/defaultHttpClient.ts"],
3
+ "sources": ["../../src/defaultHttpClient.ts"],
4
4
  "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient } from \"./interfaces.js\";\nimport { createNodeHttpClient } from \"./nodeHttpClient.js\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createNodeHttpClient();\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,4BAAqC;AAK9B,SAAS,0BAAsC;AACpD,aAAO,4CAAqB;AAC9B;",
6
6
  "names": []
@@ -1,3 +1,23 @@
1
+ declare global {
2
+ namespace NodeJS {
3
+ interface ProcessVersions {
4
+ bun?: string;
5
+ deno?: string;
6
+ }
7
+ }
8
+ }
9
+ /**
10
+ * Returns the value of the specified environment variable.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare function getEnvironmentVariable(name: string): string | undefined;
15
+ /**
16
+ * Emits a Node.js process warning.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function emitNodeWarning(warning: string): void;
1
21
  /**
2
22
  * A constant that indicates whether the environment the code is running is a Web Browser.
3
23
  */
@@ -26,4 +46,4 @@ export declare const isNodeRuntime: boolean;
26
46
  * A constant that indicates whether the environment the code is running is in React-Native.
27
47
  */
28
48
  export declare const isReactNative: boolean;
29
- //# sourceMappingURL=checkEnvironment.d.ts.map
49
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1,67 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var env_exports = {};
29
+ __export(env_exports, {
30
+ emitNodeWarning: () => emitNodeWarning,
31
+ getEnvironmentVariable: () => getEnvironmentVariable,
32
+ isBrowser: () => isBrowser,
33
+ isBun: () => isBun,
34
+ isDeno: () => isDeno,
35
+ isNodeLike: () => isNodeLike,
36
+ isNodeRuntime: () => isNodeRuntime,
37
+ isReactNative: () => isReactNative,
38
+ isWebWorker: () => isWebWorker
39
+ });
40
+ module.exports = __toCommonJS(env_exports);
41
+ var import_node_process = __toESM(require("node:process"));
42
+ function getEnvironmentVariable(name) {
43
+ return import_node_process.default.env[name];
44
+ }
45
+ function emitNodeWarning(warning) {
46
+ import_node_process.default.emitWarning(warning);
47
+ }
48
+ const isBrowser = false;
49
+ const isWebWorker = false;
50
+ const isDeno = typeof import_node_process.default.versions.deno === "string" && import_node_process.default.versions.deno.length > 0;
51
+ const isBun = typeof import_node_process.default.versions.bun === "string" && import_node_process.default.versions.bun.length > 0;
52
+ const isNodeLike = true;
53
+ const isNodeRuntime = !isBun && !isDeno;
54
+ const isReactNative = false;
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ emitNodeWarning,
58
+ getEnvironmentVariable,
59
+ isBrowser,
60
+ isBun,
61
+ isDeno,
62
+ isNodeLike,
63
+ isNodeRuntime,
64
+ isReactNative,
65
+ isWebWorker
66
+ });
67
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/env.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport process from \"node:process\";\n\ndeclare global {\n // Bun and Deno set process.versions with their runtime identifier\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace NodeJS {\n interface ProcessVersions {\n bun?: string;\n deno?: string;\n }\n }\n}\n\n/**\n * Returns the value of the specified environment variable.\n *\n * @internal\n */\nexport function getEnvironmentVariable(name: string): string | undefined {\n return process.env[name];\n}\n\n/**\n * Emits a Node.js process warning.\n *\n * @internal\n */\nexport function emitNodeWarning(warning: string): void {\n process.emitWarning(warning);\n}\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\nexport const isBrowser: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno = typeof process.versions.deno === \"string\" && process.versions.deno.length > 0;\n\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof process.versions.bun === \"string\" && process.versions.bun.length > 0;\n\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n */\nexport const isNodeLike: boolean = true;\n\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime = !isBun && !isDeno;\n\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\nexport const isReactNative: boolean = false;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAoB;AAkBb,SAAS,uBAAuB,MAAkC;AACvE,SAAO,oBAAAA,QAAQ,IAAI,IAAI;AACzB;AAOO,SAAS,gBAAgB,SAAuB;AACrD,sBAAAA,QAAQ,YAAY,OAAO;AAC7B;AAKO,MAAM,YAAqB;AAK3B,MAAM,cAAuB;AAK7B,MAAM,SAAS,OAAO,oBAAAA,QAAQ,SAAS,SAAS,YAAY,oBAAAA,QAAQ,SAAS,KAAK,SAAS;AAK3F,MAAM,QAAQ,OAAO,oBAAAA,QAAQ,SAAS,QAAQ,YAAY,oBAAAA,QAAQ,SAAS,IAAI,SAAS;AAKxF,MAAM,aAAsB;AAK5B,MAAM,gBAAgB,CAAC,SAAS,CAAC;AAKjC,MAAM,gBAAyB;",
6
+ "names": ["process"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import type { FormDataMap } from "./interfaces.js";
2
+ /**
3
+ * If the request body is a native FormData, convert it to our FormDataMap
4
+ * representation and clear the body. Node.js's HTTP stack doesn't handle
5
+ * FormData natively, so the pipeline must serialize it later.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare function convertBodyToFormDataMap(body: unknown): FormDataMap | undefined;
10
+ //# sourceMappingURL=formData.d.ts.map
@@ -15,28 +15,28 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var log_common_exports = {};
19
- __export(log_common_exports, {
20
- log: () => log
18
+ var formData_exports = {};
19
+ __export(formData_exports, {
20
+ convertBodyToFormDataMap: () => convertBodyToFormDataMap
21
21
  });
22
- module.exports = __toCommonJS(log_common_exports);
23
- function log(...args) {
24
- if (args.length > 0) {
25
- const firstArg = String(args[0]);
26
- if (firstArg.includes(":error")) {
27
- console.error(...args);
28
- } else if (firstArg.includes(":warning")) {
29
- console.warn(...args);
30
- } else if (firstArg.includes(":info")) {
31
- console.info(...args);
32
- } else if (firstArg.includes(":verbose")) {
33
- console.debug(...args);
34
- } else {
35
- console.debug(...args);
22
+ module.exports = __toCommonJS(formData_exports);
23
+ function convertBodyToFormDataMap(body) {
24
+ if (typeof FormData !== "undefined" && body instanceof FormData) {
25
+ const formDataMap = {};
26
+ for (const [key, value] of body.entries()) {
27
+ const existing = formDataMap[key];
28
+ if (Array.isArray(existing)) {
29
+ existing.push(value);
30
+ } else {
31
+ formDataMap[key] = existing !== void 0 ? [existing, value] : [value];
32
+ }
36
33
  }
34
+ return formDataMap;
37
35
  }
36
+ return void 0;
38
37
  }
39
38
  // Annotate the CommonJS export names for ESM import in node:
40
39
  0 && (module.exports = {
41
- log
40
+ convertBodyToFormDataMap
42
41
  });
42
+ //# sourceMappingURL=formData.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/formData.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FormDataMap } from \"./interfaces.js\";\n\n/**\n * If the request body is a native FormData, convert it to our FormDataMap\n * representation and clear the body. Node.js's HTTP stack doesn't handle\n * FormData natively, so the pipeline must serialize it later.\n *\n * @internal\n */\nexport function convertBodyToFormDataMap(body: unknown): FormDataMap | undefined {\n if (typeof FormData !== \"undefined\" && body instanceof FormData) {\n const formDataMap: FormDataMap = {};\n for (const [key, value] of body.entries()) {\n const existing = formDataMap[key];\n if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n formDataMap[key] = existing !== undefined ? [existing, value] : [value];\n }\n }\n return formDataMap;\n }\n return undefined;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,yBAAyB,MAAwC;AAC/E,MAAI,OAAO,aAAa,eAAe,gBAAgB,UAAU;AAC/D,UAAM,cAA2B,CAAC;AAClC,eAAW,CAAC,KAAK,KAAK,KAAK,KAAK,QAAQ,GAAG;AACzC,YAAM,WAAW,YAAY,GAAG;AAChC,UAAI,MAAM,QAAQ,QAAQ,GAAG;AAC3B,iBAAS,KAAK,KAAK;AAAA,MACrB,OAAO;AACL,oBAAY,GAAG,IAAI,aAAa,SAAY,CAAC,UAAU,KAAK,IAAI,CAAC,KAAK;AAAA,MACxE;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -23,6 +23,9 @@ module.exports = __toCommonJS(httpHeaders_exports);
23
23
  function normalizeName(name) {
24
24
  return name.toLowerCase();
25
25
  }
26
+ function normalizeValue(value) {
27
+ return String(value).trim().replace(/[\r\n]/g, "");
28
+ }
26
29
  function* headerIterator(map) {
27
30
  for (const entry of map.values()) {
28
31
  yield [entry.name, entry.value];
@@ -45,7 +48,7 @@ class HttpHeadersImpl {
45
48
  * @param value - The value of the header to set.
46
49
  */
47
50
  set(name, value) {
48
- this._headersMap.set(normalizeName(name), { name, value: String(value).trim() });
51
+ this._headersMap.set(normalizeName(name), { name, value: normalizeValue(value) });
49
52
  }
50
53
  /**
51
54
  * Get the header value for the provided header name, or undefined if no header exists in this
@@ -105,3 +108,4 @@ function createHttpHeaders(rawHeaders) {
105
108
  0 && (module.exports = {
106
109
  createHttpHeaders
107
110
  });
111
+ //# sourceMappingURL=httpHeaders.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/core/ts-http-runtime/src/httpHeaders.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpHeaders, RawHttpHeaders, RawHttpHeadersInput } from \"./interfaces.js\";\n\ninterface HeaderEntry {\n name: string;\n value: string;\n}\n\nfunction normalizeName(name: string): string {\n return name.toLowerCase();\n}\n\nfunction* headerIterator(map: Map<string, HeaderEntry>): IterableIterator<[string, string]> {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\n\nclass HttpHeadersImpl implements HttpHeaders {\n private readonly _headersMap: Map<string, HeaderEntry>;\n\n constructor(rawHeaders?: RawHttpHeaders | RawHttpHeadersInput) {\n this._headersMap = new Map<string, HeaderEntry>();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n public set(name: string, value: string | number | boolean): void {\n this._headersMap.set(normalizeName(name), { name, value: String(value).trim() });\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n public get(name: string): string | undefined {\n return this._headersMap.get(normalizeName(name))?.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n public has(name: string): boolean {\n return this._headersMap.has(normalizeName(name));\n }\n\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n public delete(name: string): void {\n this._headersMap.delete(normalizeName(name));\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJSON(options: { preserveCase?: boolean } = {}): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n } else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n\n return result;\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator](): Iterator<[string, string]> {\n return headerIterator(this._headersMap);\n }\n}\n\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders {\n return new HttpHeadersImpl(rawHeaders);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,SAAS,cAAc,MAAsB;AAC3C,SAAO,KAAK,YAAY;AAC1B;AAEA,UAAU,eAAe,KAAmE;AAC1F,aAAW,SAAS,IAAI,OAAO,GAAG;AAChC,UAAM,CAAC,MAAM,MAAM,MAAM,KAAK;AAAA,EAChC;AACF;AAEA,MAAM,gBAAuC;AAAA,EAC1B;AAAA,EAEjB,YAAY,YAAmD;AAC7D,SAAK,cAAc,oBAAI,IAAyB;AAChD,QAAI,YAAY;AACd,iBAAW,cAAc,OAAO,KAAK,UAAU,GAAG;AAChD,aAAK,IAAI,YAAY,WAAW,UAAU,CAAC;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,IAAI,MAAc,OAAwC;AAC/D,SAAK,YAAY,IAAI,cAAc,IAAI,GAAG,EAAE,MAAM,OAAO,OAAO,KAAK,EAAE,KAAK,EAAE,CAAC;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,IAAI,MAAkC;AAC3C,WAAO,KAAK,YAAY,IAAI,cAAc,IAAI,CAAC,GAAG;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,IAAI,MAAuB;AAChC,WAAO,KAAK,YAAY,IAAI,cAAc,IAAI,CAAC;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,OAAO,MAAoB;AAChC,SAAK,YAAY,OAAO,cAAc,IAAI,CAAC;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA,EAKO,OAAO,UAAsC,CAAC,GAAmB;AACtE,UAAM,SAAyB,CAAC;AAChC,QAAI,QAAQ,cAAc;AACxB,iBAAW,SAAS,KAAK,YAAY,OAAO,GAAG;AAC7C,eAAO,MAAM,IAAI,IAAI,MAAM;AAAA,MAC7B;AAAA,IACF,OAAO;AACL,iBAAW,CAAC,gBAAgB,KAAK,KAAK,KAAK,aAAa;AACtD,eAAO,cAAc,IAAI,MAAM;AAAA,MACjC;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKO,WAAmB;AACxB,WAAO,KAAK,UAAU,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,CAAC;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA,EAKA,CAAC,OAAO,QAAQ,IAAgC;AAC9C,WAAO,eAAe,KAAK,WAAW;AAAA,EACxC;AACF;AAMO,SAAS,kBAAkB,YAA+C;AAC/E,SAAO,IAAI,gBAAgB,UAAU;AACvC;",
3
+ "sources": ["../../src/httpHeaders.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpHeaders, RawHttpHeaders, RawHttpHeadersInput } from \"./interfaces.js\";\n\ninterface HeaderEntry {\n name: string;\n value: string;\n}\n\nfunction normalizeName(name: string): string {\n return name.toLowerCase();\n}\n\n/**\n * Removes CR and LF characters from a header value to prevent obs-fold\n * (line folding) sequences, as forbidden by RFC 7230 \u00A73.2.4.\n * @param value - The header value to sanitize.\n */\nfunction normalizeValue(value: string | number | boolean): string {\n return String(value)\n .trim()\n .replace(/[\\r\\n]/g, \"\");\n}\n\nfunction* headerIterator(map: Map<string, HeaderEntry>): IterableIterator<[string, string]> {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\n\nclass HttpHeadersImpl implements HttpHeaders {\n private readonly _headersMap: Map<string, HeaderEntry>;\n\n constructor(rawHeaders?: RawHttpHeaders | RawHttpHeadersInput) {\n this._headersMap = new Map<string, HeaderEntry>();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n public set(name: string, value: string | number | boolean): void {\n this._headersMap.set(normalizeName(name), { name, value: normalizeValue(value) });\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n public get(name: string): string | undefined {\n return this._headersMap.get(normalizeName(name))?.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n public has(name: string): boolean {\n return this._headersMap.has(normalizeName(name));\n }\n\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n public delete(name: string): void {\n this._headersMap.delete(normalizeName(name));\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJSON(options: { preserveCase?: boolean } = {}): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n } else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n\n return result;\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator](): Iterator<[string, string]> {\n return headerIterator(this._headersMap);\n }\n}\n\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders {\n return new HttpHeadersImpl(rawHeaders);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,SAAS,cAAc,MAAsB;AAC3C,SAAO,KAAK,YAAY;AAC1B;AAOA,SAAS,eAAe,OAA0C;AAChE,SAAO,OAAO,KAAK,EAChB,KAAK,EACL,QAAQ,WAAW,EAAE;AAC1B;AAEA,UAAU,eAAe,KAAmE;AAC1F,aAAW,SAAS,IAAI,OAAO,GAAG;AAChC,UAAM,CAAC,MAAM,MAAM,MAAM,KAAK;AAAA,EAChC;AACF;AAEA,MAAM,gBAAuC;AAAA,EAC1B;AAAA,EAEjB,YAAY,YAAmD;AAC7D,SAAK,cAAc,oBAAI,IAAyB;AAChD,QAAI,YAAY;AACd,iBAAW,cAAc,OAAO,KAAK,UAAU,GAAG;AAChD,aAAK,IAAI,YAAY,WAAW,UAAU,CAAC;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,IAAI,MAAc,OAAwC;AAC/D,SAAK,YAAY,IAAI,cAAc,IAAI,GAAG,EAAE,MAAM,OAAO,eAAe,KAAK,EAAE,CAAC;AAAA,EAClF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,IAAI,MAAkC;AAC3C,WAAO,KAAK,YAAY,IAAI,cAAc,IAAI,CAAC,GAAG;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,IAAI,MAAuB;AAChC,WAAO,KAAK,YAAY,IAAI,cAAc,IAAI,CAAC;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,OAAO,MAAoB;AAChC,SAAK,YAAY,OAAO,cAAc,IAAI,CAAC;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA,EAKO,OAAO,UAAsC,CAAC,GAAmB;AACtE,UAAM,SAAyB,CAAC;AAChC,QAAI,QAAQ,cAAc;AACxB,iBAAW,SAAS,KAAK,YAAY,OAAO,GAAG;AAC7C,eAAO,MAAM,IAAI,IAAI,MAAM;AAAA,MAC7B;AAAA,IACF,OAAO;AACL,iBAAW,CAAC,gBAAgB,KAAK,KAAK,KAAK,aAAa;AACtD,eAAO,cAAc,IAAI,MAAM;AAAA,MACjC;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKO,WAAmB;AACxB,WAAO,KAAK,UAAU,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,CAAC;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA,EAKA,CAAC,OAAO,QAAQ,IAAgC;AAC9C,WAAO,eAAe,KAAK,WAAW;AAAA,EACxC;AACF;AAMO,SAAS,kBAAkB,YAA+C;AAC/E,SAAO,IAAI,gBAAgB,UAAU;AACvC;",
6
6
  "names": []
7
7
  }
@@ -1,16 +1,5 @@
1
- declare global {
2
- interface FormData {
3
- }
4
- interface Blob {
5
- }
6
- interface File {
7
- }
8
- interface ReadableStream<R = any> {
9
- }
10
- interface TransformStream<I = any, O = any> {
11
- }
12
- }
13
1
  export { AbortError } from "./abort-controller/AbortError.js";
2
+ export type { NodeReadableStream, NodeBuffer, WebReadableStream } from "./types.js";
14
3
  export { createClientLogger, getLogLevel, setLogLevel, TypeSpecRuntimeLogger, type Debugger, type TypeSpecRuntimeClientLogger, type TypeSpecRuntimeLogLevel, } from "./logger/logger.js";
15
4
  export type { BodyPart, FormDataValue, RawHttpHeaders, KeyObject, PxfObject, HttpClient, PipelineRequest, PipelineResponse, SendRequest, TlsSettings, Agent, RequestBodyType, FormDataMap, HttpHeaders, HttpMethods, MultipartRequestBody, TransferProgressEvent, ProxySettings, RawHttpHeadersInput, PipelineRetryOptions, } from "./interfaces.js";
16
5
  export { createHttpHeaders } from "./httpHeaders.js";
@@ -21,7 +21,7 @@ __export(src_exports, {
21
21
  RestError: () => import_restError.RestError,
22
22
  TypeSpecRuntimeLogger: () => import_logger.TypeSpecRuntimeLogger,
23
23
  createClientLogger: () => import_logger.createClientLogger,
24
- createDefaultHttpClient: () => import_defaultHttpClient.createDefaultHttpClient,
24
+ createDefaultHttpClient: () => import_httpClient.createDefaultHttpClient,
25
25
  createEmptyPipeline: () => import_pipeline.createEmptyPipeline,
26
26
  createHttpHeaders: () => import_httpHeaders.createHttpHeaders,
27
27
  createPipelineRequest: () => import_pipelineRequest.createPipelineRequest,
@@ -42,7 +42,7 @@ var import_pipelineRequest = require("./pipelineRequest.js");
42
42
  var import_pipeline = require("./pipeline.js");
43
43
  var import_restError = require("./restError.js");
44
44
  var import_bytesEncoding = require("./util/bytesEncoding.js");
45
- var import_defaultHttpClient = require("./defaultHttpClient.js");
45
+ var import_httpClient = require("./defaultHttpClient.js");
46
46
  var import_getClient = require("./client/getClient.js");
47
47
  var import_operationOptionHelpers = require("./client/operationOptionHelpers.js");
48
48
  var import_restError2 = require("./client/restError.js");
@@ -65,3 +65,4 @@ var import_restError2 = require("./client/restError.js");
65
65
  stringToUint8Array,
66
66
  uint8ArrayToString
67
67
  });
68
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/core/ts-http-runtime/src/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\ndeclare global {\n interface FormData {}\n interface Blob {}\n interface File {}\n interface ReadableStream<R = any> {}\n interface TransformStream<I = any, O = any> {}\n}\n\nexport { AbortError } from \"./abort-controller/AbortError.js\";\nexport {\n createClientLogger,\n getLogLevel,\n setLogLevel,\n TypeSpecRuntimeLogger,\n type Debugger,\n type TypeSpecRuntimeClientLogger,\n type TypeSpecRuntimeLogLevel,\n} from \"./logger/logger.js\";\n\nexport type {\n BodyPart,\n FormDataValue,\n RawHttpHeaders,\n KeyObject,\n PxfObject,\n HttpClient,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n TlsSettings,\n Agent,\n RequestBodyType,\n FormDataMap,\n HttpHeaders,\n HttpMethods,\n MultipartRequestBody,\n TransferProgressEvent,\n ProxySettings,\n RawHttpHeadersInput,\n PipelineRetryOptions,\n} from \"./interfaces.js\";\nexport { createHttpHeaders } from \"./httpHeaders.js\";\nexport type * from \"./auth/schemes.js\";\nexport type * from \"./auth/oauth2Flows.js\";\nexport {\n type BasicCredential,\n type BearerTokenCredential,\n type OAuth2TokenCredential,\n type GetOAuth2TokenOptions,\n type GetBearerTokenOptions,\n type ApiKeyCredential,\n type ClientCredential,\n} from \"./auth/credentials.js\";\nexport { createPipelineRequest, type PipelineRequestOptions } from \"./pipelineRequest.js\";\nexport {\n type Pipeline,\n type PipelinePolicy,\n type AddPolicyOptions,\n type PipelinePhase,\n createEmptyPipeline,\n} from \"./pipeline.js\";\nexport { RestError, isRestError, type RestErrorOptions } from \"./restError.js\";\nexport { stringToUint8Array, uint8ArrayToString, type EncodingType } from \"./util/bytesEncoding.js\";\nexport { createDefaultHttpClient } from \"./defaultHttpClient.js\";\nexport { getClient } from \"./client/getClient.js\";\nexport { operationOptionsToRequestParameters } from \"./client/operationOptionHelpers.js\";\nexport { createRestError } from \"./client/restError.js\";\nexport type {\n Client,\n ClientOptions,\n OperationOptions,\n AdditionalPolicyConfig,\n PathUnchecked,\n PathUncheckedResponse,\n HttpResponse,\n RawResponseCallback,\n OperationRequestOptions,\n PathParameters,\n ResourceMethods,\n PathParameterWithOptions,\n StreamableMethod,\n RequestParameters,\n HttpNodeStreamResponse,\n HttpBrowserStreamResponse,\n FullOperationResponse,\n} from \"./client/common.js\";\nexport type { PipelineOptions, TelemetryOptions } from \"./createPipelineFromOptions.js\";\nexport type { LogPolicyOptions } from \"./policies/logPolicy.js\";\nexport type { RedirectPolicyOptions } from \"./policies/redirectPolicy.js\";\nexport type { UserAgentPolicyOptions } from \"./policies/userAgentPolicy.js\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,wBAA2B;AAC3B,oBAQO;AAwBP,yBAAkC;AAYlC,6BAAmE;AACnE,sBAMO;AACP,uBAA8D;AAC9D,2BAA0E;AAC1E,+BAAwC;AACxC,uBAA0B;AAC1B,oCAAoD;AACpD,IAAAA,oBAAgC;",
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { AbortError } from \"./abort-controller/AbortError.js\";\nexport type { NodeReadableStream, NodeBuffer, WebReadableStream } from \"#platform/types\";\nexport {\n createClientLogger,\n getLogLevel,\n setLogLevel,\n TypeSpecRuntimeLogger,\n type Debugger,\n type TypeSpecRuntimeClientLogger,\n type TypeSpecRuntimeLogLevel,\n} from \"./logger/logger.js\";\n\nexport type {\n BodyPart,\n FormDataValue,\n RawHttpHeaders,\n KeyObject,\n PxfObject,\n HttpClient,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n TlsSettings,\n Agent,\n RequestBodyType,\n FormDataMap,\n HttpHeaders,\n HttpMethods,\n MultipartRequestBody,\n TransferProgressEvent,\n ProxySettings,\n RawHttpHeadersInput,\n PipelineRetryOptions,\n} from \"./interfaces.js\";\nexport { createHttpHeaders } from \"./httpHeaders.js\";\nexport type * from \"./auth/schemes.js\";\nexport type * from \"./auth/oauth2Flows.js\";\nexport {\n type BasicCredential,\n type BearerTokenCredential,\n type OAuth2TokenCredential,\n type GetOAuth2TokenOptions,\n type GetBearerTokenOptions,\n type ApiKeyCredential,\n type ClientCredential,\n} from \"./auth/credentials.js\";\nexport { createPipelineRequest, type PipelineRequestOptions } from \"./pipelineRequest.js\";\nexport {\n type Pipeline,\n type PipelinePolicy,\n type AddPolicyOptions,\n type PipelinePhase,\n createEmptyPipeline,\n} from \"./pipeline.js\";\nexport { RestError, isRestError, type RestErrorOptions } from \"./restError.js\";\nexport { stringToUint8Array, uint8ArrayToString, type EncodingType } from \"#platform/bytesEncoding\";\nexport { createDefaultHttpClient } from \"#platform/httpClient\";\nexport { getClient } from \"./client/getClient.js\";\nexport { operationOptionsToRequestParameters } from \"./client/operationOptionHelpers.js\";\nexport { createRestError } from \"./client/restError.js\";\nexport type {\n Client,\n ClientOptions,\n OperationOptions,\n AdditionalPolicyConfig,\n PathUnchecked,\n PathUncheckedResponse,\n HttpResponse,\n RawResponseCallback,\n OperationRequestOptions,\n PathParameters,\n ResourceMethods,\n PathParameterWithOptions,\n StreamableMethod,\n RequestParameters,\n HttpNodeStreamResponse,\n HttpBrowserStreamResponse,\n FullOperationResponse,\n} from \"./client/common.js\";\nexport type { PipelineOptions, TelemetryOptions } from \"./createPipelineFromOptions.js\";\nexport type { LogPolicyOptions } from \"./policies/logPolicy.js\";\nexport type { RedirectPolicyOptions } from \"./policies/redirectPolicy.js\";\nexport type { UserAgentPolicyOptions } from \"./policies/userAgentPolicy.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA2B;AAE3B,oBAQO;AAwBP,yBAAkC;AAYlC,6BAAmE;AACnE,sBAMO;AACP,uBAA8D;AAC9D,2BAA0E;AAC1E,wBAAwC;AACxC,uBAA0B;AAC1B,oCAAoD;AACpD,IAAAA,oBAAgC;",
6
6
  "names": ["import_restError"]
7
7
  }
@@ -1,4 +1,5 @@
1
1
  import type { AuthScheme } from "./auth/schemes.js";
2
+ import type { NodeBuffer, NodeReadableStream, WebReadableStream } from "./types.js";
2
3
  /**
3
4
  * A HttpHeaders collection represented as a simple JSON object.
4
5
  */
@@ -54,7 +55,7 @@ export interface BodyPart {
54
55
  /**
55
56
  * The body of this part of the multipart request.
56
57
  */
57
- body: ((() => ReadableStream<Uint8Array>) | (() => NodeJS.ReadableStream)) | ReadableStream<Uint8Array> | NodeJS.ReadableStream | Uint8Array | Blob;
58
+ body: ((() => WebReadableStream<Uint8Array>) | (() => NodeReadableStream)) | WebReadableStream<Uint8Array> | NodeReadableStream | Uint8Array | Blob;
58
59
  }
59
60
  /**
60
61
  * A request body consisting of multiple parts.
@@ -77,7 +78,7 @@ export interface MultipartRequestBody {
77
78
  * NodeJS.ReadableStream and () =\> NodeJS.ReadableStream is Node only.
78
79
  * Blob, ReadableStream<Uint8Array>, and () =\> ReadableStream<Uint8Array> are browser only.
79
80
  */
80
- export type RequestBodyType = NodeJS.ReadableStream | (() => NodeJS.ReadableStream) | ReadableStream<Uint8Array> | (() => ReadableStream<Uint8Array>) | Blob | ArrayBuffer | ArrayBufferView | FormData | string | null;
81
+ export type RequestBodyType = NodeReadableStream | (() => NodeReadableStream) | WebReadableStream<Uint8Array> | (() => WebReadableStream<Uint8Array>) | Blob | ArrayBuffer | ArrayBufferView | FormData | string | null;
81
82
  /**
82
83
  * An interface compatible with NodeJS's `http.Agent`.
83
84
  * We want to avoid publicly re-exporting the actual interface,
@@ -245,14 +246,14 @@ export interface PipelineResponse {
245
246
  * The response body as a browser ReadableStream.
246
247
  * Always undefined in node.js.
247
248
  */
248
- browserStreamBody?: ReadableStream<Uint8Array>;
249
+ browserStreamBody?: WebReadableStream<Uint8Array>;
249
250
  /**
250
251
  * NODEJS ONLY
251
252
  *
252
253
  * The response body as a node.js Readable stream.
253
254
  * Always undefined in the browser.
254
255
  */
255
- readableStreamBody?: NodeJS.ReadableStream;
256
+ readableStreamBody?: NodeReadableStream;
256
257
  }
257
258
  /**
258
259
  * A simple interface for making a pipeline request and receiving a response.
@@ -343,7 +344,7 @@ export interface CertificateCredential {
343
344
  * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
344
345
  * replaced when CAs are explicitly specified using this option.
345
346
  */
346
- ca?: string | Buffer | Array<string | Buffer> | undefined;
347
+ ca?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;
347
348
  /**
348
349
  * Cert chains in PEM format. One cert chain should be provided per
349
350
  * private key. Each cert chain should consist of the PEM formatted
@@ -355,7 +356,7 @@ export interface CertificateCredential {
355
356
  * intermediate certificates are not provided, the peer will not be
356
357
  * able to validate the certificate, and the handshake will fail.
357
358
  */
358
- cert?: string | Buffer | Array<string | Buffer> | undefined;
359
+ cert?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;
359
360
  /**
360
361
  * Private keys in PEM format. PEM allows the option of private keys
361
362
  * being encrypted. Encrypted keys will be decrypted with
@@ -365,7 +366,7 @@ export interface CertificateCredential {
365
366
  * The object form can only occur in an array.object.passphrase is optional.
366
367
  * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.
367
368
  */
368
- key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
369
+ key?: string | NodeBuffer | Array<NodeBuffer | KeyObject> | undefined;
369
370
  /**
370
371
  * Shared passphrase used for a single private key and/or a PFX.
371
372
  */
@@ -379,7 +380,7 @@ export interface CertificateCredential {
379
380
  * The object form can only occur in an array.object.passphrase is optional.
380
381
  * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.
381
382
  */
382
- pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
383
+ pfx?: string | NodeBuffer | Array<string | NodeBuffer | PxfObject> | undefined;
383
384
  }
384
385
  /**
385
386
  * Represents a certificate for TLS authentication.
@@ -390,7 +391,7 @@ export interface TlsSettings {
390
391
  * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
391
392
  * replaced when CAs are explicitly specified using this option.
392
393
  */
393
- ca?: string | Buffer | Array<string | Buffer> | undefined;
394
+ ca?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;
394
395
  /**
395
396
  * Cert chains in PEM format. One cert chain should be provided per
396
397
  * private key. Each cert chain should consist of the PEM formatted
@@ -402,7 +403,7 @@ export interface TlsSettings {
402
403
  * intermediate certificates are not provided, the peer will not be
403
404
  * able to validate the certificate, and the handshake will fail.
404
405
  */
405
- cert?: string | Buffer | Array<string | Buffer> | undefined;
406
+ cert?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;
406
407
  /**
407
408
  * Private keys in PEM format. PEM allows the option of private keys
408
409
  * being encrypted. Encrypted keys will be decrypted with
@@ -412,7 +413,7 @@ export interface TlsSettings {
412
413
  * The object form can only occur in an array.object.passphrase is optional.
413
414
  * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.
414
415
  */
415
- key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
416
+ key?: string | NodeBuffer | Array<NodeBuffer | KeyObject> | undefined;
416
417
  /**
417
418
  * Shared passphrase used for a single private key and/or a PFX.
418
419
  */
@@ -426,7 +427,7 @@ export interface TlsSettings {
426
427
  * The object form can only occur in an array.object.passphrase is optional.
427
428
  * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.
428
429
  */
429
- pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
430
+ pfx?: string | NodeBuffer | Array<string | NodeBuffer | PxfObject> | undefined;
430
431
  }
431
432
  /**
432
433
  * An interface compatible with NodeJS's `tls.KeyObject`.
@@ -437,7 +438,7 @@ export interface KeyObject {
437
438
  /**
438
439
  * Private keys in PEM format.
439
440
  */
440
- pem: string | Buffer;
441
+ pem: string | NodeBuffer;
441
442
  /**
442
443
  * Optional passphrase.
443
444
  */
@@ -452,7 +453,7 @@ export interface PxfObject {
452
453
  /**
453
454
  * PFX or PKCS12 encoded private key and certificate chain.
454
455
  */
455
- buf: string | Buffer;
456
+ buf: string | NodeBuffer;
456
457
  /**
457
458
  * Optional passphrase.
458
459
  */
@@ -13,3 +13,4 @@ var __copyProps = (to, from, except, desc) => {
13
13
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
14
  var interfaces_exports = {};
15
15
  module.exports = __toCommonJS(interfaces_exports);
16
+ //# sourceMappingURL=interfaces.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/core/ts-http-runtime/src/interfaces.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthScheme } from \"./auth/schemes.js\";\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A HttpHeaders collection for input, represented as a simple JSON object.\n */\nexport type RawHttpHeadersInput = Record<string, string | number | boolean>;\n\n/**\n * Represents a set of HTTP headers on a request/response.\n * Header names are treated as case insensitive.\n */\nexport interface HttpHeaders extends Iterable<[string, string]> {\n /**\n * Returns the value of a specific header or undefined if not set.\n * @param name - The name of the header to retrieve.\n */\n get(name: string): string | undefined;\n /**\n * Returns true if the specified header exists.\n * @param name - The name of the header to check.\n */\n has(name: string): boolean;\n /**\n * Sets a specific header with a given value.\n * @param name - The name of the header to set.\n * @param value - The value to use for the header.\n */\n set(name: string, value: string | number | boolean): void;\n /**\n * Removes a specific header from the collection.\n * @param name - The name of the header to delete.\n */\n delete(name: string): void;\n /**\n * Accesses a raw JS object that acts as a simple map\n * of header names to values.\n */\n toJSON(options?: { preserveCase?: boolean }): RawHttpHeaders;\n}\n\n/**\n * A part of the request body in a multipart request.\n */\nexport interface BodyPart {\n /**\n * The headers for this part of the multipart request.\n */\n headers: HttpHeaders;\n\n /**\n * The body of this part of the multipart request.\n */\n body:\n | ((() => ReadableStream<Uint8Array>) | (() => NodeJS.ReadableStream))\n | ReadableStream<Uint8Array>\n | NodeJS.ReadableStream\n | Uint8Array\n | Blob;\n}\n\n/**\n * A request body consisting of multiple parts.\n */\nexport interface MultipartRequestBody {\n /**\n * The parts of the request body.\n */\n parts: BodyPart[];\n\n /**\n * The boundary separating each part of the request body.\n * If not specified, a random boundary will be generated.\n *\n * When specified, '--' will be prepended to the boundary in the request to ensure the boundary follows the specification.\n */\n boundary?: string;\n}\n\n/**\n * Types of bodies supported on the request.\n * NodeJS.ReadableStream and () =\\> NodeJS.ReadableStream is Node only.\n * Blob, ReadableStream<Uint8Array>, and () =\\> ReadableStream<Uint8Array> are browser only.\n */\nexport type RequestBodyType =\n | NodeJS.ReadableStream\n | (() => NodeJS.ReadableStream)\n | ReadableStream<Uint8Array>\n | (() => ReadableStream<Uint8Array>)\n | Blob\n | ArrayBuffer\n | ArrayBufferView\n | FormData\n | string\n | null;\n\n/**\n * An interface compatible with NodeJS's `http.Agent`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface Agent {\n /**\n * Destroy any sockets that are currently in use by the agent.\n */\n destroy(): void;\n /**\n * For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.\n */\n maxFreeSockets: number;\n /**\n * Determines how many concurrent sockets the agent can have open per origin.\n */\n maxSockets: number;\n /**\n * An object which contains queues of requests that have not yet been assigned to sockets.\n */\n requests: unknown;\n /**\n * An object which contains arrays of sockets currently in use by the agent.\n */\n sockets: unknown;\n}\n\n/**\n * Metadata about a request being made by the pipeline.\n */\nexport interface PipelineRequest {\n /**\n * List of authentication schemes used for this specific request.\n * These schemes define how the request will be authenticated.\n *\n * If values are provided, these schemes override the client level authentication schemes.\n * If an empty array is provided, it explicitly specifies no authentication for the request.\n * If not provided at the request level, the client level authentication schemes will be used.\n */\n authSchemes?: AuthScheme[];\n\n /**\n * The URL to make the request to.\n */\n url: string;\n\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeaders;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n * Defaults to 0, which disables the timeout.\n */\n timeout: number;\n\n /**\n * Indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.\n * Defaults to false.\n */\n withCredentials: boolean;\n\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId: string;\n\n /**\n * The HTTP body content (if any)\n */\n body?: RequestBodyType;\n\n /**\n * Body for a multipart request.\n */\n multipartBody?: MultipartRequestBody;\n\n /**\n * To simulate a browser form post\n */\n formData?: FormDataMap;\n\n /**\n * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream.\n * When streamResponseStatusCodes contains the value Number.POSITIVE_INFINITY any status would be treated as a stream.\n */\n streamResponseStatusCodes?: Set<number>;\n\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n\n /**\n * If the connection should not be reused.\n */\n disableKeepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignal;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n\n /**\n * NODEJS ONLY\n *\n * A Node-only option to provide a custom `http.Agent`/`https.Agent`.\n * Does nothing when running in the browser.\n */\n agent?: Agent;\n\n /**\n * BROWSER ONLY\n *\n * A browser only option to enable browser Streams. If this option is set and a response is a stream\n * the response will have a property `browserStream` instead of `blobBody` which will be undefined.\n *\n * Default value is false\n */\n enableBrowserStreams?: boolean;\n\n /** Settings for configuring TLS authentication */\n tlsSettings?: TlsSettings;\n\n /**\n * Additional options to set on the request. This provides a way to override\n * existing ones or provide request properties that are not declared.\n *\n * For possible valid properties, see\n * - NodeJS https.request options: https://nodejs.org/api/http.html#httprequestoptions-callback\n * - Browser RequestInit: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit\n *\n * WARNING: Options specified here will override any properties of same names when request is sent by {@link HttpClient}.\n */\n requestOverrides?: Record<string, unknown>;\n}\n\n/**\n * Metadata about a response received by the pipeline.\n */\nexport interface PipelineResponse {\n /**\n * The request that generated this response.\n */\n request: PipelineRequest;\n /**\n * The HTTP status code of the response.\n */\n status: number;\n /**\n * The HTTP response headers.\n */\n headers: HttpHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText?: string | null;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise<Blob>;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser ReadableStream.\n * Always undefined in node.js.\n */\n browserStreamBody?: ReadableStream<Uint8Array>;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n}\n\n/**\n * A simple interface for making a pipeline request and receiving a response.\n */\nexport type SendRequest = (request: PipelineRequest) => Promise<PipelineResponse>;\n\n/**\n * The required interface for a client that makes HTTP requests\n * on behalf of a pipeline.\n */\nexport interface HttpClient {\n /**\n * The method that makes the request and returns a response.\n */\n sendRequest: SendRequest;\n}\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number;\n};\n\n// UNBRANDED DIFFERENCE: HttpMethods are defined at the top level in unbranded instead of core-util since we don't\n// need to worry about creating a cyclic dependency\n/**\n * Supported HTTP methods to use when making requests.\n */\nexport type HttpMethods =\n | \"GET\"\n | \"PUT\"\n | \"POST\"\n | \"DELETE\"\n | \"PATCH\"\n | \"HEAD\"\n | \"OPTIONS\"\n | \"TRACE\";\n\n/**\n * Options to configure a proxy for outgoing requests (Node.js only).\n */\nexport interface ProxySettings {\n /**\n * The proxy's host address.\n * Must include the protocol (e.g., http:// or https://).\n */\n host: string;\n\n /**\n * The proxy host's port.\n */\n port: number;\n\n /**\n * The user name to authenticate with the proxy, if required.\n */\n username?: string;\n\n /**\n * The password to authenticate with the proxy, if required.\n */\n password?: string;\n}\n\n/**\n * Each form data entry can be a string, Blob, or a File. If you wish to pass a file with a name but do not have\n * access to the File class, you can use the createFile helper to create one.\n */\nexport type FormDataValue = string | Blob | File;\n\n/**\n * A simple object that provides form data, as if from a browser form.\n */\nexport type FormDataMap = { [key: string]: FormDataValue | FormDataValue[] };\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface PipelineRetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second). The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Represents a certificate credential for authentication.\n */\nexport interface CertificateCredential {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | Buffer | Array<string | Buffer> | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | Buffer | Array<string | Buffer> | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | Buffer | Array<Buffer | KeyObject> | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;\n}\n\n/**\n * Represents a certificate for TLS authentication.\n */\nexport interface TlsSettings {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | Buffer | Array<string | Buffer> | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | Buffer | Array<string | Buffer> | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | Buffer | Array<Buffer | KeyObject> | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.KeyObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface KeyObject {\n /**\n * Private keys in PEM format.\n */\n pem: string | Buffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.PxfObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface PxfObject {\n /**\n * PFX or PKCS12 encoded private key and certificate chain.\n */\n buf: string | Buffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n"],
3
+ "sources": ["../../src/interfaces.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthScheme } from \"./auth/schemes.js\";\nimport type { NodeBuffer, NodeReadableStream, WebReadableStream } from \"#platform/types\";\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A HttpHeaders collection for input, represented as a simple JSON object.\n */\nexport type RawHttpHeadersInput = Record<string, string | number | boolean>;\n\n/**\n * Represents a set of HTTP headers on a request/response.\n * Header names are treated as case insensitive.\n */\nexport interface HttpHeaders extends Iterable<[string, string]> {\n /**\n * Returns the value of a specific header or undefined if not set.\n * @param name - The name of the header to retrieve.\n */\n get(name: string): string | undefined;\n /**\n * Returns true if the specified header exists.\n * @param name - The name of the header to check.\n */\n has(name: string): boolean;\n /**\n * Sets a specific header with a given value.\n * @param name - The name of the header to set.\n * @param value - The value to use for the header.\n */\n set(name: string, value: string | number | boolean): void;\n /**\n * Removes a specific header from the collection.\n * @param name - The name of the header to delete.\n */\n delete(name: string): void;\n /**\n * Accesses a raw JS object that acts as a simple map\n * of header names to values.\n */\n toJSON(options?: { preserveCase?: boolean }): RawHttpHeaders;\n}\n\n/**\n * A part of the request body in a multipart request.\n */\nexport interface BodyPart {\n /**\n * The headers for this part of the multipart request.\n */\n headers: HttpHeaders;\n\n /**\n * The body of this part of the multipart request.\n */\n body:\n | ((() => WebReadableStream<Uint8Array>) | (() => NodeReadableStream))\n | WebReadableStream<Uint8Array>\n | NodeReadableStream\n | Uint8Array\n | Blob;\n}\n\n/**\n * A request body consisting of multiple parts.\n */\nexport interface MultipartRequestBody {\n /**\n * The parts of the request body.\n */\n parts: BodyPart[];\n\n /**\n * The boundary separating each part of the request body.\n * If not specified, a random boundary will be generated.\n *\n * When specified, '--' will be prepended to the boundary in the request to ensure the boundary follows the specification.\n */\n boundary?: string;\n}\n\n/**\n * Types of bodies supported on the request.\n * NodeJS.ReadableStream and () =\\> NodeJS.ReadableStream is Node only.\n * Blob, ReadableStream<Uint8Array>, and () =\\> ReadableStream<Uint8Array> are browser only.\n */\nexport type RequestBodyType =\n | NodeReadableStream\n | (() => NodeReadableStream)\n | WebReadableStream<Uint8Array>\n | (() => WebReadableStream<Uint8Array>)\n | Blob\n | ArrayBuffer\n | ArrayBufferView\n | FormData\n | string\n | null;\n\n/**\n * An interface compatible with NodeJS's `http.Agent`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface Agent {\n /**\n * Destroy any sockets that are currently in use by the agent.\n */\n destroy(): void;\n /**\n * For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.\n */\n maxFreeSockets: number;\n /**\n * Determines how many concurrent sockets the agent can have open per origin.\n */\n maxSockets: number;\n /**\n * An object which contains queues of requests that have not yet been assigned to sockets.\n */\n requests: unknown;\n /**\n * An object which contains arrays of sockets currently in use by the agent.\n */\n sockets: unknown;\n}\n\n/**\n * Metadata about a request being made by the pipeline.\n */\nexport interface PipelineRequest {\n /**\n * List of authentication schemes used for this specific request.\n * These schemes define how the request will be authenticated.\n *\n * If values are provided, these schemes override the client level authentication schemes.\n * If an empty array is provided, it explicitly specifies no authentication for the request.\n * If not provided at the request level, the client level authentication schemes will be used.\n */\n authSchemes?: AuthScheme[];\n\n /**\n * The URL to make the request to.\n */\n url: string;\n\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeaders;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n * Defaults to 0, which disables the timeout.\n */\n timeout: number;\n\n /**\n * Indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.\n * Defaults to false.\n */\n withCredentials: boolean;\n\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId: string;\n\n /**\n * The HTTP body content (if any)\n */\n body?: RequestBodyType;\n\n /**\n * Body for a multipart request.\n */\n multipartBody?: MultipartRequestBody;\n\n /**\n * To simulate a browser form post\n */\n formData?: FormDataMap;\n\n /**\n * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream.\n * When streamResponseStatusCodes contains the value Number.POSITIVE_INFINITY any status would be treated as a stream.\n */\n streamResponseStatusCodes?: Set<number>;\n\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n\n /**\n * If the connection should not be reused.\n */\n disableKeepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignal;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n\n /**\n * NODEJS ONLY\n *\n * A Node-only option to provide a custom `http.Agent`/`https.Agent`.\n * Does nothing when running in the browser.\n */\n agent?: Agent;\n\n /**\n * BROWSER ONLY\n *\n * A browser only option to enable browser Streams. If this option is set and a response is a stream\n * the response will have a property `browserStream` instead of `blobBody` which will be undefined.\n *\n * Default value is false\n */\n enableBrowserStreams?: boolean;\n\n /** Settings for configuring TLS authentication */\n tlsSettings?: TlsSettings;\n\n /**\n * Additional options to set on the request. This provides a way to override\n * existing ones or provide request properties that are not declared.\n *\n * For possible valid properties, see\n * - NodeJS https.request options: https://nodejs.org/api/http.html#httprequestoptions-callback\n * - Browser RequestInit: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit\n *\n * WARNING: Options specified here will override any properties of same names when request is sent by {@link HttpClient}.\n */\n requestOverrides?: Record<string, unknown>;\n}\n\n/**\n * Metadata about a response received by the pipeline.\n */\nexport interface PipelineResponse {\n /**\n * The request that generated this response.\n */\n request: PipelineRequest;\n /**\n * The HTTP status code of the response.\n */\n status: number;\n /**\n * The HTTP response headers.\n */\n headers: HttpHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText?: string | null;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise<Blob>;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser ReadableStream.\n * Always undefined in node.js.\n */\n browserStreamBody?: WebReadableStream<Uint8Array>;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeReadableStream;\n}\n\n/**\n * A simple interface for making a pipeline request and receiving a response.\n */\nexport type SendRequest = (request: PipelineRequest) => Promise<PipelineResponse>;\n\n/**\n * The required interface for a client that makes HTTP requests\n * on behalf of a pipeline.\n */\nexport interface HttpClient {\n /**\n * The method that makes the request and returns a response.\n */\n sendRequest: SendRequest;\n}\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number;\n};\n\n// UNBRANDED DIFFERENCE: HttpMethods are defined at the top level in unbranded instead of core-util since we don't\n// need to worry about creating a cyclic dependency\n/**\n * Supported HTTP methods to use when making requests.\n */\nexport type HttpMethods =\n | \"GET\"\n | \"PUT\"\n | \"POST\"\n | \"DELETE\"\n | \"PATCH\"\n | \"HEAD\"\n | \"OPTIONS\"\n | \"TRACE\";\n\n/**\n * Options to configure a proxy for outgoing requests (Node.js only).\n */\nexport interface ProxySettings {\n /**\n * The proxy's host address.\n * Must include the protocol (e.g., http:// or https://).\n */\n host: string;\n\n /**\n * The proxy host's port.\n */\n port: number;\n\n /**\n * The user name to authenticate with the proxy, if required.\n */\n username?: string;\n\n /**\n * The password to authenticate with the proxy, if required.\n */\n password?: string;\n}\n\n/**\n * Each form data entry can be a string, Blob, or a File. If you wish to pass a file with a name but do not have\n * access to the File class, you can use the createFile helper to create one.\n */\nexport type FormDataValue = string | Blob | File;\n\n/**\n * A simple object that provides form data, as if from a browser form.\n */\nexport type FormDataMap = { [key: string]: FormDataValue | FormDataValue[] };\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface PipelineRetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second). The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Represents a certificate credential for authentication.\n */\nexport interface CertificateCredential {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | NodeBuffer | Array<NodeBuffer | KeyObject> | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | NodeBuffer | Array<string | NodeBuffer | PxfObject> | undefined;\n}\n\n/**\n * Represents a certificate for TLS authentication.\n */\nexport interface TlsSettings {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | NodeBuffer | Array<string | NodeBuffer> | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | NodeBuffer | Array<NodeBuffer | KeyObject> | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: <string|buffer>[,passphrase: <string>]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | NodeBuffer | Array<string | NodeBuffer | PxfObject> | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.KeyObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface KeyObject {\n /**\n * Private keys in PEM format.\n */\n pem: string | NodeBuffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.PxfObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface PxfObject {\n /**\n * PFX or PKCS12 encoded private key and certificate chain.\n */\n buf: string | NodeBuffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }