@scalar/api-client 2.39.4 → 2.40.0

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 (330) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js.map +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue.script.js +2 -2
  6. package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +1 -1
  7. package/dist/hooks/useClientConfig.d.ts +12 -0
  8. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  9. package/dist/hooks/useClientConfig.js +14 -1
  10. package/dist/hooks/useClientConfig.js.map +1 -1
  11. package/dist/libs/index.d.ts +0 -1
  12. package/dist/libs/index.d.ts.map +1 -1
  13. package/dist/libs/index.js +1 -2
  14. package/dist/style.css +207 -248
  15. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +14 -10
  16. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  18. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +57 -35
  19. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  20. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -5
  21. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  22. package/dist/v2/blocks/operation-block/helpers/send-request.js +18 -33
  23. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  24. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -1
  25. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +1 -1
  26. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -1
  27. package/dist/v2/blocks/operation-block/index.d.ts +0 -3
  28. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  29. package/dist/v2/blocks/operation-block/index.js +1 -4
  30. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +1 -1
  31. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  32. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  33. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
  34. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +3 -1
  35. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
  36. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +4 -2
  37. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +3 -2
  39. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -1
  40. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +1 -1
  41. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  42. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +7 -2
  45. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  46. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +4 -3
  47. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -1
  48. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +2 -3
  50. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +3 -1
  52. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  53. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +5 -8
  54. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js.map +1 -1
  55. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  56. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  57. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js.map +1 -1
  58. package/dist/v2/blocks/operation-code-sample/index.d.ts +0 -1
  59. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  60. package/dist/v2/blocks/operation-code-sample/index.js +2 -3
  61. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +7 -9
  62. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  64. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  65. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +49 -42
  66. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  67. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +2 -3
  71. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  73. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +1 -0
  75. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  77. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  80. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -1
  81. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +1 -1
  82. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -1
  83. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +2 -1
  84. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js.map +1 -1
  85. package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts.map +1 -1
  86. package/dist/v2/blocks/response-block/helpers/get-content-length.js +2 -2
  87. package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
  88. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  90. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  91. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +76 -25
  92. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  93. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  95. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  96. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +2 -2
  97. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  98. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -1
  99. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  100. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  101. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +1 -1
  102. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  103. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  104. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  105. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  106. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +8 -4
  107. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  108. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -1
  109. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  111. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  112. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  113. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  115. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  116. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +1 -1
  117. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  118. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +1 -1
  119. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  120. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +6 -2
  122. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  123. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +0 -3
  124. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/index.js +1 -3
  126. package/dist/v2/components/code-input/CodeInput.vue.d.ts +8 -6
  127. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  128. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  129. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  130. package/dist/v2/components/code-input/CodeInput.vue.script.js +11 -9
  131. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  132. package/dist/v2/constants.js +1 -1
  133. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  134. package/dist/v2/features/app/App.vue.js.map +1 -1
  135. package/dist/v2/features/app/App.vue.script.js +1 -5
  136. package/dist/v2/features/app/App.vue.script.js.map +1 -1
  137. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  138. package/dist/v2/features/app/app-events.js +1 -1
  139. package/dist/v2/features/app/app-events.js.map +1 -1
  140. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  141. package/dist/v2/features/app/app-state.js +2 -2
  142. package/dist/v2/features/app/app-state.js.map +1 -1
  143. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  144. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  145. package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
  146. package/dist/v2/features/app/components/AppSidebar.vue.script.js +1 -1
  147. package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
  148. package/dist/v2/features/app/helpers/routes.d.ts +0 -3
  149. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  150. package/dist/v2/features/app/helpers/routes.js +1 -1
  151. package/dist/v2/features/app/helpers/routes.js.map +1 -1
  152. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  153. package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -1
  154. package/dist/v2/features/collection/DocumentCollection.vue.script.js +30 -52
  155. package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
  156. package/dist/v2/features/collection/OperationCollection.vue.script.js +0 -1
  157. package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -1
  158. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +0 -1
  159. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -1
  160. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  161. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  162. package/dist/v2/features/collection/components/Authentication.vue.js.map +1 -1
  163. package/dist/v2/features/collection/components/Authentication.vue.script.js +6 -8
  164. package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -1
  165. package/dist/v2/features/collection/components/Cookies.vue.script.js +0 -1
  166. package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -1
  167. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +0 -1
  168. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -1
  169. package/dist/v2/features/collection/components/Environment.vue.script.js +0 -1
  170. package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -1
  171. package/dist/v2/features/collection/components/Overview.vue.script.js +0 -1
  172. package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -1
  173. package/dist/v2/features/collection/components/Servers.vue.script.js +0 -1
  174. package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -1
  175. package/dist/v2/features/collection/components/Settings.vue.js.map +1 -1
  176. package/dist/v2/features/collection/components/Settings.vue.script.js +2 -3
  177. package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -1
  178. package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +1 -1
  179. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  180. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  181. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +1 -1
  182. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  183. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  184. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  185. package/dist/v2/features/modal/Modal.vue.script.js +3 -4
  186. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  187. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +1 -1
  188. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  189. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  190. package/dist/v2/features/operation/Operation.vue.script.js +50 -84
  191. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  192. package/dist/v2/features/operation/index.d.ts +0 -4
  193. package/dist/v2/features/operation/index.d.ts.map +1 -1
  194. package/dist/v2/features/operation/index.js +1 -5
  195. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  196. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +1 -1
  197. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +11 -1
  198. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +1 -1
  199. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  200. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  201. package/dist/views/Request/RequestSection/RequestTable.vue.js.map +1 -1
  202. package/dist/views/Request/RequestSection/RequestTable.vue.script.js +1 -1
  203. package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +1 -1
  204. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +1 -1
  205. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  206. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +1 -1
  207. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +2 -2
  208. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +1 -1
  209. package/dist/views/Request/libs/oauth2.js +1 -1
  210. package/dist/views/Request/libs/oauth2.js.map +1 -1
  211. package/package.json +24 -30
  212. package/dist/libs/formatters.d.ts +0 -12
  213. package/dist/libs/formatters.d.ts.map +0 -1
  214. package/dist/libs/formatters.js +0 -36
  215. package/dist/libs/formatters.js.map +0 -1
  216. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +0 -6
  217. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +0 -1
  218. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js +0 -58
  219. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js.map +0 -1
  220. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +0 -12
  221. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +0 -1
  222. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -65
  223. package/dist/v2/blocks/operation-block/helpers/build-request-body.js.map +0 -1
  224. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +0 -31
  225. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +0 -1
  226. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -55
  227. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js.map +0 -1
  228. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -27
  229. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +0 -1
  230. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -159
  231. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js.map +0 -1
  232. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +0 -25
  233. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +0 -1
  234. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -53
  235. package/dist/v2/blocks/operation-block/helpers/build-request-security.js.map +0 -1
  236. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +0 -46
  237. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +0 -1
  238. package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -102
  239. package/dist/v2/blocks/operation-block/helpers/build-request.js.map +0 -1
  240. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts +0 -4
  241. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts.map +0 -1
  242. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -41
  243. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js.map +0 -1
  244. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +0 -14
  245. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +0 -1
  246. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -20
  247. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js.map +0 -1
  248. package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts +0 -8
  249. package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts.map +0 -1
  250. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts +0 -9
  251. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts.map +0 -1
  252. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -17
  253. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js.map +0 -1
  254. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +0 -10
  255. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +0 -1
  256. package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -41
  257. package/dist/v2/blocks/operation-block/helpers/get-example.js.map +0 -1
  258. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +0 -26
  259. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +0 -1
  260. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -32
  261. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js.map +0 -1
  262. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +0 -10
  263. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +0 -1
  264. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -15
  265. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js.map +0 -1
  266. package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts +0 -3
  267. package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts.map +0 -1
  268. package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -18
  269. package/dist/v2/blocks/operation-block/helpers/get-server-url.js.map +0 -1
  270. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +0 -96
  271. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +0 -1
  272. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -160
  273. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js.map +0 -1
  274. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +0 -40
  275. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +0 -1
  276. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -437
  277. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js.map +0 -1
  278. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +0 -6
  279. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +0 -1
  280. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -25
  281. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js.map +0 -1
  282. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -141
  283. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js.map +0 -1
  284. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +0 -4
  285. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +0 -1
  286. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -10
  287. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js.map +0 -1
  288. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +0 -9
  289. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +0 -1
  290. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -27
  291. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js.map +0 -1
  292. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +0 -25
  293. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +0 -1
  294. package/dist/v2/components/callout/Callout.vue.js +0 -9
  295. package/dist/v2/components/callout/Callout.vue.js.map +0 -1
  296. package/dist/v2/components/callout/Callout.vue.script.js +0 -35
  297. package/dist/v2/components/callout/Callout.vue.script.js.map +0 -1
  298. package/dist/v2/features/operation/helpers/combine-params.d.ts +0 -4
  299. package/dist/v2/features/operation/helpers/combine-params.d.ts.map +0 -1
  300. package/dist/v2/features/operation/helpers/combine-params.js +0 -20
  301. package/dist/v2/features/operation/helpers/combine-params.js.map +0 -1
  302. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +0 -17
  303. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +0 -1
  304. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +0 -12
  305. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +0 -1
  306. package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -17
  307. package/dist/v2/features/operation/helpers/get-security-requirements.js.map +0 -1
  308. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +0 -15
  309. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +0 -1
  310. package/dist/v2/features/operation/helpers/get-selected-security.js +0 -41
  311. package/dist/v2/features/operation/helpers/get-selected-security.js.map +0 -1
  312. package/dist/v2/features/operation/helpers/get-selected-server.d.ts +0 -13
  313. package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +0 -1
  314. package/dist/v2/features/operation/helpers/get-selected-server.js +0 -21
  315. package/dist/v2/features/operation/helpers/get-selected-server.js.map +0 -1
  316. package/dist/v2/helpers/get-active-environment.d.ts +0 -5
  317. package/dist/v2/helpers/get-active-environment.d.ts.map +0 -1
  318. package/dist/v2/helpers/get-active-environment.js +0 -19
  319. package/dist/v2/helpers/get-active-environment.js.map +0 -1
  320. package/dist/v2/helpers/get-active-proxy-url.d.ts +0 -18
  321. package/dist/v2/helpers/get-active-proxy-url.d.ts.map +0 -1
  322. package/dist/v2/helpers/get-active-proxy-url.js +0 -26
  323. package/dist/v2/helpers/get-active-proxy-url.js.map +0 -1
  324. package/dist/v2/helpers/get-servers.d.ts +0 -23
  325. package/dist/v2/helpers/get-servers.d.ts.map +0 -1
  326. package/dist/v2/helpers/get-servers.js +0 -106
  327. package/dist/v2/helpers/get-servers.js.map +0 -1
  328. package/dist/v2/helpers/index.d.ts +0 -3
  329. package/dist/v2/helpers/index.d.ts.map +0 -1
  330. package/dist/v2/helpers/index.js +0 -3
@@ -1,19 +0,0 @@
1
- import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
2
- import { xScalarEnvironmentSchema } from "@scalar/workspace-store/schemas/extensions/document/x-scalar-environments";
3
- //#region src/v2/helpers/get-active-environment.ts
4
- var getActiveEnvironment = (workspace, document) => {
5
- if (workspace === null) return coerceValue(xScalarEnvironmentSchema, {});
6
- const activeEnv = workspace.workspace["x-scalar-active-environment"];
7
- if (!activeEnv) return coerceValue(xScalarEnvironmentSchema, {});
8
- const workspaceEnv = workspace.workspace["x-scalar-environments"]?.[activeEnv] ?? { variables: [] };
9
- const documentEnv = document?.["x-scalar-environments"]?.[activeEnv] ?? { variables: [] };
10
- return coerceValue(xScalarEnvironmentSchema, {
11
- ...workspaceEnv,
12
- ...documentEnv,
13
- variables: [...workspaceEnv.variables, ...documentEnv.variables]
14
- });
15
- };
16
- //#endregion
17
- export { getActiveEnvironment };
18
-
19
- //# sourceMappingURL=get-active-environment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-active-environment.js","names":[],"sources":["../../../src/v2/helpers/get-active-environment.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport {\n type XScalarEnvironment,\n xScalarEnvironmentSchema,\n} from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nexport const getActiveEnvironment = (\n workspace: WorkspaceStore | null,\n document: WorkspaceDocument | null,\n): XScalarEnvironment => {\n if (workspace === null) {\n return coerceValue(xScalarEnvironmentSchema, {})\n }\n const activeEnv = workspace.workspace['x-scalar-active-environment']\n\n if (!activeEnv) {\n return coerceValue(xScalarEnvironmentSchema, {})\n }\n\n const workspaceEnv = workspace.workspace['x-scalar-environments']?.[activeEnv] ?? {\n variables: [],\n }\n const documentEnv = document?.['x-scalar-environments']?.[activeEnv] ?? {\n variables: [],\n }\n\n return coerceValue(xScalarEnvironmentSchema, {\n ...workspaceEnv,\n ...documentEnv,\n variables: [...workspaceEnv.variables, ...documentEnv.variables],\n })\n}\n"],"mappings":";;;AAQA,IAAa,wBACX,WACA,aACuB;AACvB,KAAI,cAAc,KAChB,QAAO,YAAY,0BAA0B,EAAE,CAAC;CAElD,MAAM,YAAY,UAAU,UAAU;AAEtC,KAAI,CAAC,UACH,QAAO,YAAY,0BAA0B,EAAE,CAAC;CAGlD,MAAM,eAAe,UAAU,UAAU,2BAA2B,cAAc,EAChF,WAAW,EAAE,EACd;CACD,MAAM,cAAc,WAAW,2BAA2B,cAAc,EACtE,WAAW,EAAE,EACd;AAED,QAAO,YAAY,0BAA0B;EAC3C,GAAG;EACH,GAAG;EACH,WAAW,CAAC,GAAG,aAAa,WAAW,GAAG,YAAY,UAAU;EACjE,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { Workspace } from '@scalar/workspace-store/schemas';
2
- import type { ClientLayout } from '../../v2/types/layout';
3
- /**
4
- * Returns the default proxy URL for web layout.
5
- * For the 'web' layout, this ensures requests use Scalar's hosted proxy unless overridden,
6
- * which is important for browser environments with CORS or network restrictions.
7
- * For 'desktop' or 'modal' layouts, returns null to indicate no proxy by default.
8
- */
9
- export declare const getDefaultProxyUrl: (layout: ClientLayout) => "https://proxy.scalar.com" | null;
10
- /**
11
- * Returns the active proxy URL for the workspace.
12
- *
13
- * Logic:
14
- * - If the active proxy url is not set, use the default proxy url.
15
- * - Otherwise, use the active proxy url.
16
- */
17
- export declare const getActiveProxyUrl: (activeProxyUrl: Workspace["x-scalar-active-proxy"], layout: ClientLayout) => string | null;
18
- //# sourceMappingURL=get-active-proxy-url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-active-proxy-url.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/get-active-proxy-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,sCAKtD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,SAAS,CAAC,uBAAuB,CAAC,EAAE,QAAQ,YAAY,kBAMzG,CAAA"}
@@ -1,26 +0,0 @@
1
- //#region src/v2/helpers/get-active-proxy-url.ts
2
- /**
3
- * Returns the default proxy URL for web layout.
4
- * For the 'web' layout, this ensures requests use Scalar's hosted proxy unless overridden,
5
- * which is important for browser environments with CORS or network restrictions.
6
- * For 'desktop' or 'modal' layouts, returns null to indicate no proxy by default.
7
- */
8
- var getDefaultProxyUrl = (layout) => {
9
- if (layout === "web") return "https://proxy.scalar.com";
10
- return null;
11
- };
12
- /**
13
- * Returns the active proxy URL for the workspace.
14
- *
15
- * Logic:
16
- * - If the active proxy url is not set, use the default proxy url.
17
- * - Otherwise, use the active proxy url.
18
- */
19
- var getActiveProxyUrl = (activeProxyUrl, layout) => {
20
- if (activeProxyUrl === void 0) return getDefaultProxyUrl(layout);
21
- return activeProxyUrl;
22
- };
23
- //#endregion
24
- export { getActiveProxyUrl };
25
-
26
- //# sourceMappingURL=get-active-proxy-url.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-active-proxy-url.js","names":[],"sources":["../../../src/v2/helpers/get-active-proxy-url.ts"],"sourcesContent":["import type { Workspace } from '@scalar/workspace-store/schemas'\n\nimport type { ClientLayout } from '@/v2/types/layout'\n\n/**\n * Returns the default proxy URL for web layout.\n * For the 'web' layout, this ensures requests use Scalar's hosted proxy unless overridden,\n * which is important for browser environments with CORS or network restrictions.\n * For 'desktop' or 'modal' layouts, returns null to indicate no proxy by default.\n */\nexport const getDefaultProxyUrl = (layout: ClientLayout) => {\n if (layout === 'web') {\n return 'https://proxy.scalar.com'\n }\n return null\n}\n\n/**\n * Returns the active proxy URL for the workspace.\n *\n * Logic:\n * - If the active proxy url is not set, use the default proxy url.\n * - Otherwise, use the active proxy url.\n */\nexport const getActiveProxyUrl = (activeProxyUrl: Workspace['x-scalar-active-proxy'], layout: ClientLayout) => {\n // If the active proxy url is not set, use the default proxy url\n if (activeProxyUrl === undefined) {\n return getDefaultProxyUrl(layout)\n }\n return activeProxyUrl\n}\n"],"mappings":";;;;;;;AAUA,IAAa,sBAAsB,WAAyB;AAC1D,KAAI,WAAW,MACb,QAAO;AAET,QAAO;;;;;;;;;AAUT,IAAa,qBAAqB,gBAAoD,WAAyB;AAE7G,KAAI,mBAAmB,KAAA,EACrB,QAAO,mBAAmB,OAAO;AAEnC,QAAO"}
@@ -1,23 +0,0 @@
1
- import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- /**
3
- * Server processing options containing base URLs for resolving relative server URLs.
4
- */
5
- type ServerProcessingOptions = {
6
- baseServerUrl?: string;
7
- documentUrl?: string;
8
- };
9
- /**
10
- * Retrieves and processes servers from an OpenAPI document.
11
- *
12
- * This function handles several scenarios:
13
- * 1. No servers provided - creates a default server from document URL or fallback
14
- * 2. Invalid server configurations - filters them out with warnings
15
- * 3. Relative URLs - resolves them to absolute URLs using available base URLs
16
- *
17
- * @param servers - Array of OpenAPI server objects from the document
18
- * @param options - Configuration options for server processing
19
- * @returns Array of validated Server entities
20
- */
21
- export declare function getServers(servers: ServerObject[] | undefined, options?: ServerProcessingOptions): ServerObject[];
22
- export {};
23
- //# sourceMappingURL=get-servers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-servers.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/get-servers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,OAAO,GAAE,uBAA4B,GAAG,YAAY,EAAE,CAsBrH"}
@@ -1,106 +0,0 @@
1
- import { combineUrlAndPath } from "@scalar/helpers/url/merge-urls";
2
- //#region src/v2/helpers/get-servers.ts
3
- /**
4
- * Retrieves and processes servers from an OpenAPI document.
5
- *
6
- * This function handles several scenarios:
7
- * 1. No servers provided - creates a default server from document URL or fallback
8
- * 2. Invalid server configurations - filters them out with warnings
9
- * 3. Relative URLs - resolves them to absolute URLs using available base URLs
10
- *
11
- * @param servers - Array of OpenAPI server objects from the document
12
- * @param options - Configuration options for server processing
13
- * @returns Array of validated Server entities
14
- */
15
- function getServers(servers, options = {}) {
16
- if (!servers?.length) {
17
- const fallbackServer = createFallbackServer(options);
18
- return fallbackServer ? [fallbackServer] : [];
19
- }
20
- if (!Array.isArray(servers)) return [];
21
- const validServers = servers.map((server) => processServerObject(server, options));
22
- if (validServers.length === 0) {
23
- const fallbackServer = createFallbackServer(options);
24
- return fallbackServer ? [fallbackServer] : [];
25
- }
26
- return validServers;
27
- }
28
- /**
29
- * Extracts the base URL (protocol + hostname) from a document URL.
30
- * Returns undefined if the URL is invalid.
31
- */
32
- function extractBaseUrlFromDocumentUrl(documentUrl) {
33
- try {
34
- const url = new URL(documentUrl);
35
- const port = url.port ? `:${url.port}` : "";
36
- return `${url.protocol}//${url.hostname}${port}`;
37
- } catch {
38
- return;
39
- }
40
- }
41
- /**
42
- * Gets the fallback URL from window.location.origin if available.
43
- */
44
- function getFallbackUrl() {
45
- if (typeof window === "undefined" || typeof window?.location?.origin !== "string") return;
46
- return window.location.origin;
47
- }
48
- /**
49
- * Creates a server object from a URL string, with error handling.
50
- */
51
- function createServerFromUrl(url) {
52
- return { url };
53
- }
54
- /**
55
- * Creates a default server using the document URL as the base.
56
- */
57
- function createDefaultServerFromDocumentUrl(documentUrl) {
58
- const baseUrl = extractBaseUrlFromDocumentUrl(documentUrl);
59
- if (!baseUrl) return;
60
- return createServerFromUrl(baseUrl);
61
- }
62
- /**
63
- * Creates a default server using the fallback URL (window.location.origin).
64
- */
65
- function createDefaultServerFromFallback() {
66
- const fallbackUrl = getFallbackUrl();
67
- if (!fallbackUrl) return;
68
- return createServerFromUrl(fallbackUrl);
69
- }
70
- /**
71
- * Resolves a relative server URL to an absolute URL using available base URLs.
72
- * Uses a priority system: baseServerURL > documentUrl > fallbackUrl.
73
- */
74
- function resolveRelativeServerUrl(serverUrl, options) {
75
- const { baseServerUrl: baseServerURL, documentUrl } = options;
76
- if (baseServerURL) return combineUrlAndPath(baseServerURL, serverUrl);
77
- if (documentUrl) {
78
- const baseUrl = extractBaseUrlFromDocumentUrl(documentUrl);
79
- if (baseUrl) return combineUrlAndPath(baseUrl, serverUrl);
80
- }
81
- const fallbackUrl = getFallbackUrl();
82
- if (fallbackUrl) return combineUrlAndPath(fallbackUrl, serverUrl);
83
- return serverUrl;
84
- }
85
- /**
86
- * Processes a single server object, handling validation and URL resolution.
87
- */
88
- function processServerObject(server, options) {
89
- if (server.url?.startsWith("/")) server.url = resolveRelativeServerUrl(server.url, options);
90
- return server;
91
- }
92
- /**
93
- * Creates a fallback server when no valid servers are available.
94
- * Uses document URL first, then fallback URL.
95
- */
96
- function createFallbackServer(options) {
97
- if (options.documentUrl) {
98
- const defaultServer = createDefaultServerFromDocumentUrl(options.documentUrl);
99
- if (defaultServer) return defaultServer;
100
- }
101
- return createDefaultServerFromFallback();
102
- }
103
- //#endregion
104
- export { getServers };
105
-
106
- //# sourceMappingURL=get-servers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-servers.js","names":[],"sources":["../../../src/v2/helpers/get-servers.ts"],"sourcesContent":["import { combineUrlAndPath } from '@scalar/helpers/url/merge-urls'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Server processing options containing base URLs for resolving relative server URLs.\n */\ntype ServerProcessingOptions = {\n baseServerUrl?: string\n documentUrl?: string\n}\n\n/**\n * Retrieves and processes servers from an OpenAPI document.\n *\n * This function handles several scenarios:\n * 1. No servers provided - creates a default server from document URL or fallback\n * 2. Invalid server configurations - filters them out with warnings\n * 3. Relative URLs - resolves them to absolute URLs using available base URLs\n *\n * @param servers - Array of OpenAPI server objects from the document\n * @param options - Configuration options for server processing\n * @returns Array of validated Server entities\n */\nexport function getServers(servers: ServerObject[] | undefined, options: ServerProcessingOptions = {}): ServerObject[] {\n // Handle case where no servers are provided\n if (!servers?.length) {\n const fallbackServer = createFallbackServer(options)\n return fallbackServer ? [fallbackServer] : []\n }\n\n // Handle invalid server array\n if (!Array.isArray(servers)) {\n return []\n }\n\n // Process each server and filter out invalid ones\n const validServers = servers.map((server) => processServerObject(server, options))\n\n // If all servers were invalid, provide a fallback\n if (validServers.length === 0) {\n const fallbackServer = createFallbackServer(options)\n return fallbackServer ? [fallbackServer] : []\n }\n\n return validServers\n}\n\n/**\n * Extracts the base URL (protocol + hostname) from a document URL.\n * Returns undefined if the URL is invalid.\n */\nfunction extractBaseUrlFromDocumentUrl(documentUrl: string): string | undefined {\n try {\n const url = new URL(documentUrl)\n const port = url.port ? `:${url.port}` : ''\n return `${url.protocol}//${url.hostname}${port}`\n } catch {\n return undefined\n }\n}\n\n/**\n * Gets the fallback URL from window.location.origin if available.\n */\nfunction getFallbackUrl(): string | undefined {\n if (typeof window === 'undefined' || typeof window?.location?.origin !== 'string') {\n return undefined\n }\n return window.location.origin\n}\n\n/**\n * Creates a server object from a URL string, with error handling.\n */\nfunction createServerFromUrl(url: string): ServerObject | undefined {\n return { url }\n}\n\n/**\n * Creates a default server using the document URL as the base.\n */\nfunction createDefaultServerFromDocumentUrl(documentUrl: string): ServerObject | undefined {\n const baseUrl = extractBaseUrlFromDocumentUrl(documentUrl)\n if (!baseUrl) {\n return undefined\n }\n\n return createServerFromUrl(baseUrl)\n}\n\n/**\n * Creates a default server using the fallback URL (window.location.origin).\n */\nfunction createDefaultServerFromFallback(): ServerObject | undefined {\n const fallbackUrl = getFallbackUrl()\n if (!fallbackUrl) {\n return undefined\n }\n\n return createServerFromUrl(fallbackUrl)\n}\n\n/**\n * Resolves a relative server URL to an absolute URL using available base URLs.\n * Uses a priority system: baseServerURL > documentUrl > fallbackUrl.\n */\nfunction resolveRelativeServerUrl(serverUrl: string, options: ServerProcessingOptions): string {\n const { baseServerUrl: baseServerURL, documentUrl } = options\n\n // Priority 1: Use provided base server URL\n if (baseServerURL) {\n return combineUrlAndPath(baseServerURL, serverUrl)\n }\n\n // Priority 2: Extract base URL from document URL\n if (documentUrl) {\n const baseUrl = extractBaseUrlFromDocumentUrl(documentUrl)\n if (baseUrl) {\n return combineUrlAndPath(baseUrl, serverUrl)\n }\n }\n\n // Priority 3: Use fallback URL (window.location.origin)\n const fallbackUrl = getFallbackUrl()\n if (fallbackUrl) {\n return combineUrlAndPath(fallbackUrl, serverUrl)\n }\n\n // If no base URL is available, return the original URL\n return serverUrl\n}\n\n/**\n * Processes a single server object, handling validation and URL resolution.\n */\nfunction processServerObject(server: ServerObject, options: ServerProcessingOptions): ServerObject {\n // Resolve relative URLs to absolute URLs\n if (server.url?.startsWith('/')) {\n server.url = resolveRelativeServerUrl(server.url, options)\n }\n\n return server\n}\n\n/**\n * Creates a fallback server when no valid servers are available.\n * Uses document URL first, then fallback URL.\n */\nfunction createFallbackServer(options: ServerProcessingOptions): ServerObject | undefined {\n // Priority 1: Try to create default server from document URL\n if (options.documentUrl) {\n const defaultServer = createDefaultServerFromDocumentUrl(options.documentUrl)\n\n if (defaultServer) {\n return defaultServer\n }\n }\n\n // Priority 2: Try to create default server from fallback URL\n return createDefaultServerFromFallback()\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,SAAgB,WAAW,SAAqC,UAAmC,EAAE,EAAkB;AAErH,KAAI,CAAC,SAAS,QAAQ;EACpB,MAAM,iBAAiB,qBAAqB,QAAQ;AACpD,SAAO,iBAAiB,CAAC,eAAe,GAAG,EAAE;;AAI/C,KAAI,CAAC,MAAM,QAAQ,QAAQ,CACzB,QAAO,EAAE;CAIX,MAAM,eAAe,QAAQ,KAAK,WAAW,oBAAoB,QAAQ,QAAQ,CAAC;AAGlF,KAAI,aAAa,WAAW,GAAG;EAC7B,MAAM,iBAAiB,qBAAqB,QAAQ;AACpD,SAAO,iBAAiB,CAAC,eAAe,GAAG,EAAE;;AAG/C,QAAO;;;;;;AAOT,SAAS,8BAA8B,aAAyC;AAC9E,KAAI;EACF,MAAM,MAAM,IAAI,IAAI,YAAY;EAChC,MAAM,OAAO,IAAI,OAAO,IAAI,IAAI,SAAS;AACzC,SAAO,GAAG,IAAI,SAAS,IAAI,IAAI,WAAW;SACpC;AACN;;;;;;AAOJ,SAAS,iBAAqC;AAC5C,KAAI,OAAO,WAAW,eAAe,OAAO,QAAQ,UAAU,WAAW,SACvE;AAEF,QAAO,OAAO,SAAS;;;;;AAMzB,SAAS,oBAAoB,KAAuC;AAClE,QAAO,EAAE,KAAK;;;;;AAMhB,SAAS,mCAAmC,aAA+C;CACzF,MAAM,UAAU,8BAA8B,YAAY;AAC1D,KAAI,CAAC,QACH;AAGF,QAAO,oBAAoB,QAAQ;;;;;AAMrC,SAAS,kCAA4D;CACnE,MAAM,cAAc,gBAAgB;AACpC,KAAI,CAAC,YACH;AAGF,QAAO,oBAAoB,YAAY;;;;;;AAOzC,SAAS,yBAAyB,WAAmB,SAA0C;CAC7F,MAAM,EAAE,eAAe,eAAe,gBAAgB;AAGtD,KAAI,cACF,QAAO,kBAAkB,eAAe,UAAU;AAIpD,KAAI,aAAa;EACf,MAAM,UAAU,8BAA8B,YAAY;AAC1D,MAAI,QACF,QAAO,kBAAkB,SAAS,UAAU;;CAKhD,MAAM,cAAc,gBAAgB;AACpC,KAAI,YACF,QAAO,kBAAkB,aAAa,UAAU;AAIlD,QAAO;;;;;AAMT,SAAS,oBAAoB,QAAsB,SAAgD;AAEjG,KAAI,OAAO,KAAK,WAAW,IAAI,CAC7B,QAAO,MAAM,yBAAyB,OAAO,KAAK,QAAQ;AAG5D,QAAO;;;;;;AAOT,SAAS,qBAAqB,SAA4D;AAExF,KAAI,QAAQ,aAAa;EACvB,MAAM,gBAAgB,mCAAmC,QAAQ,YAAY;AAE7E,MAAI,cACF,QAAO;;AAKX,QAAO,iCAAiC"}
@@ -1,3 +0,0 @@
1
- export { getActiveEnvironment } from './get-active-environment.js';
2
- export { getServers } from './get-servers.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA"}
@@ -1,3 +0,0 @@
1
- import { getServers } from "./get-servers.js";
2
- import { getActiveEnvironment } from "./get-active-environment.js";
3
- export { getActiveEnvironment, getServers };