@scalar/api-client 3.19.2 → 3.20.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 (409) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  3. package/dist/components/SectionFilter.vue.d.ts +2 -0
  4. package/dist/components/SectionFilter.vue.d.ts.map +1 -1
  5. package/dist/components/SectionFilter.vue.js +1 -1
  6. package/dist/components/SectionFilter.vue.js.map +1 -1
  7. package/dist/components/SectionFilter.vue.script.js +11 -8
  8. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  9. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  10. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  11. package/dist/components/Server/ServerVariablesSelect.vue.script.js +5 -3
  12. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
  13. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  14. package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
  15. package/dist/components/Server/ServerVariablesTextbox.vue.script.js +6 -3
  16. package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
  17. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  18. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
  19. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +4 -2
  20. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
  21. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  23. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +3 -1
  24. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
  25. package/dist/style.css +159 -135
  26. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +10 -1
  27. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  29. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +46 -5
  30. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -0
  32. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  34. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  35. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +15 -8
  36. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  37. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  39. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  40. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +4 -2
  41. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
  42. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-block/helpers/send-request.js +4 -3
  44. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  45. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
  46. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  48. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  49. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +51 -26
  50. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  51. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  52. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  53. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  54. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +28 -8
  55. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  56. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
  58. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +9 -3
  59. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
  60. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  62. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +6 -4
  63. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  64. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  65. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  66. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +3 -1
  67. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +7 -5
  71. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
  73. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +40 -7
  77. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +12 -12
  79. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +24 -20
  82. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  83. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  85. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +6 -4
  86. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  87. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +1 -1
  89. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  90. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  91. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -4
  92. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  93. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -0
  94. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  95. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  96. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  97. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +37 -13
  98. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  99. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts +3 -3
  100. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  101. package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
  102. package/dist/v2/blocks/response-block/components/Headers.vue.script.js +5 -3
  103. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
  104. package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
  105. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
  106. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
  107. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +3 -1
  108. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
  109. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  111. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +11 -3
  112. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  113. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  115. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  116. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +8 -6
  117. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  118. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts +1 -0
  119. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  120. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  121. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +109 -56
  122. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  123. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
  124. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
  125. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +5 -3
  126. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
  127. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  128. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  129. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +6 -3
  130. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  131. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  133. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +7 -5
  134. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  135. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +4 -2
  136. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  137. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  138. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  139. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +22 -14
  140. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  141. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  142. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  143. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  144. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +4 -2
  145. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
  147. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +11 -6
  149. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
  150. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts +4 -0
  151. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts.map +1 -0
  152. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +100 -0
  153. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -0
  154. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts +13 -0
  155. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts.map +1 -0
  156. package/dist/v2/blocks/response-block/helpers/response-stream.js +97 -0
  157. package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -0
  158. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +3 -1
  159. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  160. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  161. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  162. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +42 -29
  163. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  164. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +6 -6
  165. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  166. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  167. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  168. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +7 -4
  169. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  170. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  171. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  172. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +21 -16
  173. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  174. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  175. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  176. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +7 -5
  177. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  178. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  179. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  180. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +7 -5
  181. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  182. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  183. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  184. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +105 -40
  185. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  186. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  187. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  188. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +10 -8
  189. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  190. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  191. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  192. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +14 -9
  193. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +6 -4
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +3 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  204. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +40 -40
  205. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  206. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +108 -7
  207. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  208. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +12 -0
  209. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
  210. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  211. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts.map +1 -1
  212. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +8 -5
  213. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
  214. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +2 -0
  215. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
  216. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +2 -0
  217. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
  218. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts +3 -0
  219. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts.map +1 -0
  220. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js +8 -0
  221. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js.map +1 -0
  222. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts +3 -0
  223. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts.map +1 -0
  224. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +11 -0
  225. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js.map +1 -0
  226. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +19 -0
  227. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -0
  228. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +117 -0
  229. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -0
  230. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -1
  231. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  232. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +15 -11
  233. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  234. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts +1 -1
  235. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts.map +1 -1
  236. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +8 -1
  237. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js.map +1 -1
  238. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -1
  239. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +6 -0
  240. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
  241. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -1
  242. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  243. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +8 -6
  244. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  245. package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
  246. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  247. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  248. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  249. package/dist/v2/components/code-input/CodeInput.vue.script.js +10 -10
  250. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  251. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +4 -4
  252. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  253. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  254. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  255. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +8 -5
  256. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  257. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +4 -0
  258. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -1
  259. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  260. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +7 -3
  261. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  262. package/dist/v2/components/code-input/code-variable-widget.d.ts +3 -0
  263. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
  264. package/dist/v2/components/code-input/code-variable-widget.js +6 -3
  265. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  266. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +0 -1
  267. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
  268. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  269. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +4 -2
  270. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  271. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  272. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  273. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  274. package/dist/v2/components/data-table/DataTableInput.vue.script.js +5 -3
  275. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  276. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  277. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  278. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +12 -9
  279. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  280. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
  281. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  282. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +5 -3
  283. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  284. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  285. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  286. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +3 -1
  287. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  288. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
  289. package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
  290. package/dist/v2/components/modals/DeleteModal.vue.script.js +3 -1
  291. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
  292. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  293. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  294. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  295. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +5 -2
  296. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  297. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  298. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  299. package/dist/v2/components/server/ServerDropdown.vue.script.js +9 -5
  300. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  301. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  302. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  303. package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -2
  304. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  305. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  306. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  307. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +4 -2
  308. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  309. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
  310. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  311. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +4 -2
  312. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  313. package/dist/v2/constants.js +1 -1
  314. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
  315. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  316. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +4 -2
  317. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  318. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
  319. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  320. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  321. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +4 -2
  322. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  323. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  324. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  325. package/dist/v2/features/environments/components/Environment.vue.script.js +12 -10
  326. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  327. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  328. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  329. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +5 -3
  330. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  331. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  332. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  333. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +9 -6
  334. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  335. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  336. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  337. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +6 -4
  338. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  339. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  340. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  341. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  342. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +22 -10
  343. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  344. package/dist/v2/features/localization/index.d.ts +18 -0
  345. package/dist/v2/features/localization/index.d.ts.map +1 -0
  346. package/dist/v2/features/localization/index.js +35 -0
  347. package/dist/v2/features/localization/index.js.map +1 -0
  348. package/dist/v2/features/localization/locales/ar.d.ts +385 -0
  349. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -0
  350. package/dist/v2/features/localization/locales/ar.js +345 -0
  351. package/dist/v2/features/localization/locales/ar.js.map +1 -0
  352. package/dist/v2/features/localization/locales/de.d.ts +385 -0
  353. package/dist/v2/features/localization/locales/de.d.ts.map +1 -0
  354. package/dist/v2/features/localization/locales/de.js +345 -0
  355. package/dist/v2/features/localization/locales/de.js.map +1 -0
  356. package/dist/v2/features/localization/locales/es.d.ts +385 -0
  357. package/dist/v2/features/localization/locales/es.d.ts.map +1 -0
  358. package/dist/v2/features/localization/locales/es.js +345 -0
  359. package/dist/v2/features/localization/locales/es.js.map +1 -0
  360. package/dist/v2/features/localization/locales/fr.d.ts +385 -0
  361. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -0
  362. package/dist/v2/features/localization/locales/fr.js +345 -0
  363. package/dist/v2/features/localization/locales/fr.js.map +1 -0
  364. package/dist/v2/features/localization/locales/pt.d.ts +385 -0
  365. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -0
  366. package/dist/v2/features/localization/locales/pt.js +345 -0
  367. package/dist/v2/features/localization/locales/pt.js.map +1 -0
  368. package/dist/v2/features/localization/locales/ru.d.ts +385 -0
  369. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -0
  370. package/dist/v2/features/localization/locales/ru.js +345 -0
  371. package/dist/v2/features/localization/locales/ru.js.map +1 -0
  372. package/dist/v2/features/localization/locales/zh-cn.d.ts +385 -0
  373. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -0
  374. package/dist/v2/features/localization/locales/zh-cn.js +345 -0
  375. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -0
  376. package/dist/v2/features/localization/translations.d.ts +385 -0
  377. package/dist/v2/features/localization/translations.d.ts.map +1 -0
  378. package/dist/v2/features/localization/translations.js +345 -0
  379. package/dist/v2/features/localization/translations.js.map +1 -0
  380. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  381. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  382. package/dist/v2/features/modal/Modal.vue.script.js +17 -4
  383. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  384. package/dist/v2/features/modal/use-lazy-api-client.d.ts +11 -0
  385. package/dist/v2/features/modal/use-lazy-api-client.d.ts.map +1 -0
  386. package/dist/v2/features/modal/use-lazy-api-client.js +48 -0
  387. package/dist/v2/features/modal/use-lazy-api-client.js.map +1 -0
  388. package/dist/v2/features/operation/Operation.vue.d.ts +2 -0
  389. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  390. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  391. package/dist/v2/features/operation/Operation.vue.script.js +50 -12
  392. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  393. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  394. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  395. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  396. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +12 -8
  397. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  398. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  399. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  400. package/dist/v2/features/search/components/SearchResult.vue.script.js +14 -10
  401. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  402. package/dist/v2/types/options.d.ts +1 -1
  403. package/dist/v2/types/options.d.ts.map +1 -1
  404. package/dist/v2/workspace-events.d.ts +2 -2
  405. package/dist/v2/workspace-events.d.ts.map +1 -1
  406. package/dist/v2/workspace-events.js +8 -1
  407. package/dist/v2/workspace-events.js.map +1 -1
  408. package/dist/vue-styles.css +124 -125
  409. package/package.json +22 -11
@@ -1,9 +1,110 @@
1
- import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
2
- type AuthOption = {
3
- label: string;
4
- payload: SecuritySchemeObject;
5
- };
6
1
  /** Predefined authentication options */
7
- export declare const authOptions: Record<string, AuthOption>;
8
- export {};
2
+ export declare const authOptions: {
3
+ apiKeyCookie: {
4
+ label: string;
5
+ payload: {
6
+ type: "apiKey";
7
+ in: "cookie";
8
+ name: string;
9
+ };
10
+ };
11
+ apiKeyHeader: {
12
+ label: string;
13
+ payload: {
14
+ type: "apiKey";
15
+ in: "header";
16
+ name: string;
17
+ };
18
+ };
19
+ apiKeyQuery: {
20
+ label: string;
21
+ payload: {
22
+ type: "apiKey";
23
+ in: "query";
24
+ name: string;
25
+ };
26
+ };
27
+ httpBasic: {
28
+ label: string;
29
+ payload: {
30
+ type: "http";
31
+ scheme: "basic";
32
+ };
33
+ };
34
+ httpBearer: {
35
+ label: string;
36
+ payload: {
37
+ type: "http";
38
+ scheme: "bearer";
39
+ };
40
+ };
41
+ oauth2DeviceAuthorization: {
42
+ label: string;
43
+ payload: {
44
+ type: "oauth2";
45
+ flows: {
46
+ deviceAuthorization: {
47
+ deviceAuthorizationUrl: string;
48
+ tokenUrl: string;
49
+ refreshUrl: string;
50
+ scopes: {};
51
+ };
52
+ };
53
+ };
54
+ };
55
+ oauth2Implicit: {
56
+ label: string;
57
+ payload: {
58
+ type: "oauth2";
59
+ flows: {
60
+ implicit: {
61
+ authorizationUrl: string;
62
+ refreshUrl: string;
63
+ scopes: {};
64
+ };
65
+ };
66
+ };
67
+ };
68
+ oauth2Password: {
69
+ label: string;
70
+ payload: {
71
+ type: "oauth2";
72
+ flows: {
73
+ password: {
74
+ tokenUrl: string;
75
+ refreshUrl: string;
76
+ scopes: {};
77
+ };
78
+ };
79
+ };
80
+ };
81
+ oauth2ClientCredentials: {
82
+ label: string;
83
+ payload: {
84
+ type: "oauth2";
85
+ flows: {
86
+ clientCredentials: {
87
+ tokenUrl: string;
88
+ refreshUrl: string;
89
+ scopes: {};
90
+ };
91
+ };
92
+ };
93
+ };
94
+ oauth2AuthorizationFlow: {
95
+ label: string;
96
+ payload: {
97
+ type: "oauth2";
98
+ flows: {
99
+ authorizationCode: {
100
+ authorizationUrl: string;
101
+ tokenUrl: string;
102
+ refreshUrl: string;
103
+ 'x-usePkce': "no";
104
+ scopes: {};
105
+ };
106
+ };
107
+ };
108
+ };
109
+ };
9
110
  //# sourceMappingURL=auth-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,KAAK,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAElE,wCAAwC;AACxC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6FlD,CAAA"}
1
+ {"version":3,"file":"auth-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"names":[],"mappings":"AAIA,wCAAwC;AACxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGc,CAAA"}
@@ -39,6 +39,18 @@ var authOptions = {
39
39
  scheme: "bearer"
40
40
  }
41
41
  },
42
+ oauth2DeviceAuthorization: {
43
+ label: "OAuth2 Device Authorization",
44
+ payload: {
45
+ type: "oauth2",
46
+ flows: { deviceAuthorization: {
47
+ deviceAuthorizationUrl: "",
48
+ tokenUrl: "",
49
+ refreshUrl: "",
50
+ scopes: {}
51
+ } }
52
+ }
53
+ },
42
54
  oauth2Implicit: {
43
55
  label: "Oauth2 Implicit Flow",
44
56
  payload: {
@@ -1 +1 @@
1
- {"version":3,"file":"auth-options.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"sourcesContent":["import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\ntype AuthOption = { label: string; payload: SecuritySchemeObject }\n\n/** Predefined authentication options */\nexport const authOptions: Record<string, AuthOption> = {\n apiKeyCookie: {\n label: 'API Key in Cookies',\n payload: {\n type: 'apiKey',\n in: 'cookie',\n name: 'apiKeyCookie',\n },\n },\n apiKeyHeader: {\n label: 'API Key in Headers',\n payload: {\n type: 'apiKey',\n in: 'header',\n name: 'apiKeyHeader',\n },\n },\n apiKeyQuery: {\n label: 'API Key in Query Params',\n payload: {\n type: 'apiKey',\n in: 'query',\n name: 'apiKeyQuery',\n },\n },\n httpBasic: {\n label: 'HTTP Basic',\n payload: {\n type: 'http',\n scheme: 'basic',\n },\n },\n httpBearer: {\n label: 'HTTP Bearer',\n payload: {\n type: 'http',\n scheme: 'bearer',\n },\n },\n oauth2Implicit: {\n label: 'Oauth2 Implicit Flow',\n payload: {\n type: 'oauth2',\n flows: {\n implicit: {\n authorizationUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2Password: {\n label: 'Oauth2 Password Flow',\n payload: {\n type: 'oauth2',\n flows: {\n password: {\n tokenUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2ClientCredentials: {\n label: 'Oauth2 Client Credentials',\n payload: {\n type: 'oauth2',\n flows: {\n clientCredentials: {\n tokenUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2AuthorizationFlow: {\n label: 'Oauth2 Authorization Code',\n payload: {\n type: 'oauth2',\n flows: {\n authorizationCode: {\n authorizationUrl: '',\n tokenUrl: '',\n refreshUrl: '',\n 'x-usePkce': 'no',\n scopes: {},\n },\n },\n },\n },\n}\n"],"mappings":";;AAKA,IAAa,cAA0C;CACrD,cAAc;EACZ,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,cAAc;EACZ,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,aAAa;EACX,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,WAAW;EACT,OAAO;EACP,SAAS;GACP,MAAM;GACN,QAAQ;EACV;CACF;CACA,YAAY;EACV,OAAO;EACP,SAAS;GACP,MAAM;GACN,QAAQ;EACV;CACF;CACA,gBAAgB;EACd,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,UAAU;IACR,kBAAkB;IAClB,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,gBAAgB;EACd,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,UAAU;IACR,UAAU;IACV,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,yBAAyB;EACvB,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,mBAAmB;IACjB,UAAU;IACV,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,yBAAyB;EACvB,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,mBAAmB;IACjB,kBAAkB;IAClB,UAAU;IACV,YAAY;IACZ,aAAa;IACb,QAAQ,CAAC;GACX,EACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"auth-options.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts"],"sourcesContent":["import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\ntype AuthOption = { label: string; payload: SecuritySchemeObject }\n\n/** Predefined authentication options */\nexport const authOptions = {\n apiKeyCookie: {\n label: 'API Key in Cookies',\n payload: {\n type: 'apiKey',\n in: 'cookie',\n name: 'apiKeyCookie',\n },\n },\n apiKeyHeader: {\n label: 'API Key in Headers',\n payload: {\n type: 'apiKey',\n in: 'header',\n name: 'apiKeyHeader',\n },\n },\n apiKeyQuery: {\n label: 'API Key in Query Params',\n payload: {\n type: 'apiKey',\n in: 'query',\n name: 'apiKeyQuery',\n },\n },\n httpBasic: {\n label: 'HTTP Basic',\n payload: {\n type: 'http',\n scheme: 'basic',\n },\n },\n httpBearer: {\n label: 'HTTP Bearer',\n payload: {\n type: 'http',\n scheme: 'bearer',\n },\n },\n oauth2DeviceAuthorization: {\n label: 'OAuth2 Device Authorization',\n payload: {\n type: 'oauth2',\n flows: { deviceAuthorization: { deviceAuthorizationUrl: '', tokenUrl: '', refreshUrl: '', scopes: {} } },\n },\n },\n oauth2Implicit: {\n label: 'Oauth2 Implicit Flow',\n payload: {\n type: 'oauth2',\n flows: {\n implicit: {\n authorizationUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2Password: {\n label: 'Oauth2 Password Flow',\n payload: {\n type: 'oauth2',\n flows: {\n password: {\n tokenUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2ClientCredentials: {\n label: 'Oauth2 Client Credentials',\n payload: {\n type: 'oauth2',\n flows: {\n clientCredentials: {\n tokenUrl: '',\n refreshUrl: '',\n scopes: {},\n },\n },\n },\n },\n oauth2AuthorizationFlow: {\n label: 'Oauth2 Authorization Code',\n payload: {\n type: 'oauth2',\n flows: {\n authorizationCode: {\n authorizationUrl: '',\n tokenUrl: '',\n refreshUrl: '',\n 'x-usePkce': 'no',\n scopes: {},\n },\n },\n },\n },\n} satisfies Record<string, AuthOption>\n"],"mappings":";;AAKA,IAAa,cAAc;CACzB,cAAc;EACZ,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,cAAc;EACZ,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,aAAa;EACX,OAAO;EACP,SAAS;GACP,MAAM;GACN,IAAI;GACJ,MAAM;EACR;CACF;CACA,WAAW;EACT,OAAO;EACP,SAAS;GACP,MAAM;GACN,QAAQ;EACV;CACF;CACA,YAAY;EACV,OAAO;EACP,SAAS;GACP,MAAM;GACN,QAAQ;EACV;CACF;CACA,2BAA2B;EACzB,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EAAE,qBAAqB;IAAE,wBAAwB;IAAI,UAAU;IAAI,YAAY;IAAI,QAAQ,CAAC;GAAE,EAAE;EACzG;CACF;CACA,gBAAgB;EACd,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,UAAU;IACR,kBAAkB;IAClB,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,gBAAgB;EACd,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,UAAU;IACR,UAAU;IACV,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,yBAAyB;EACvB,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,mBAAmB;IACjB,UAAU;IACV,YAAY;IACZ,QAAQ,CAAC;GACX,EACF;EACF;CACF;CACA,yBAAyB;EACvB,OAAO;EACP,SAAS;GACP,MAAM;GACN,OAAO,EACL,mBAAmB;IACjB,kBAAkB;IAClB,UAAU;IACV,YAAY;IACZ,aAAa;IACb,QAAQ,CAAC;GACX,EACF;EACF;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAClF,OAAO,KAAK,EASV,0BAA0B,EAC3B,MAAM,yCAAyC,CAAA;AAQhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAA;AAkLjF,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,GAEvC,QAAQ,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,EAC1D,WAAW,SAAS,EACpB,MAAM,MAAM,EACZ,cAAc,MAAM,KACnB,0BA2DF,CAAA"}
1
+ {"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAClF,OAAO,KAAK,EAUV,0BAA0B,EAC3B,MAAM,yCAAyC,CAAA;AAShD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAA;AAqMjF,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,GAEvC,QAAQ,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,EAC1D,WAAW,SAAS,EACpB,MAAM,MAAM,EACZ,cAAc,MAAM,KACnB,0BA4DF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-oauth2-metadata.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAK3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAGnF,OAAO,EACL,KAAK,sBAAsB,IAAI,2BAA2B,EAE3D,MAAM,kCAAkC,CAAA;AAKzC,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,EACX,UAAU,MAAM,EAChB,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAuBpD,CAAA"}
1
+ {"version":3,"file":"fetch-oauth2-metadata.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAI3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAGnF,OAAO,EACL,KAAK,sBAAsB,IAAI,2BAA2B,EAE3D,MAAM,kCAAkC,CAAA;AAGzC,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,EACX,UAAU,MAAM,EAChB,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAuBpD,CAAA"}
@@ -1,19 +1,22 @@
1
+ import { isAllowedOAuthUrl } from "./is-allowed-oauth-url.js";
1
2
  import { OpenIDConnectDiscoverySchema } from "./fetch-openid-connect-discovery.js";
2
3
  import { redirectToProxy } from "@scalar/helpers/url/redirect-to-proxy";
3
- import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
4
4
  import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
5
5
  //#region src/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.ts
6
- var isAllowedMetadataUrl = (url) => url.protocol === "https:" || url.protocol === "http:" && isLocalUrl(url.href);
7
6
  /** Fetches the exact RFC8414 metadata URL, without applying OIDC issuer URL conventions. */
8
7
  var fetchOAuth2Metadata = async (url, proxyUrl, customFetch = fetch) => {
9
8
  try {
10
9
  const metadataUrl = new URL(url.trim());
11
- if (!isAllowedMetadataUrl(metadataUrl)) return [/* @__PURE__ */ new Error("OAuth2 metadata URL must use HTTPS or HTTP for local development URLs"), null];
10
+ if (!isAllowedOAuthUrl(metadataUrl)) return [/* @__PURE__ */ new Error("OAuth2 metadata URL must use HTTPS or HTTP for local development URLs"), null];
12
11
  const response = await customFetch(redirectToProxy(proxyUrl, metadataUrl.href));
13
12
  if (!response.ok) return [/* @__PURE__ */ new Error(`Failed to fetch OAuth2 metadata: ${response.status} ${response.statusText}`), null];
14
13
  const data = coerceValue(OpenIDConnectDiscoverySchema, await response.json());
15
- if (!data.authorization_endpoint && !data.token_endpoint) return [/* @__PURE__ */ new Error("Invalid OAuth2 metadata: missing or invalid endpoints"), null];
16
- for (const endpoint of [data.authorization_endpoint, data.token_endpoint]) if (endpoint && !isAllowedMetadataUrl(new URL(endpoint))) return [/* @__PURE__ */ new Error("OAuth2 metadata endpoints must use HTTPS or HTTP for local development URLs"), null];
14
+ if (!data.authorization_endpoint && !data.token_endpoint && !data.device_authorization_endpoint) return [/* @__PURE__ */ new Error("Invalid OAuth2 metadata: missing or invalid endpoints"), null];
15
+ for (const endpoint of [
16
+ data.authorization_endpoint,
17
+ data.token_endpoint,
18
+ data.device_authorization_endpoint
19
+ ]) if (endpoint && !isAllowedOAuthUrl(new URL(endpoint))) return [/* @__PURE__ */ new Error("OAuth2 metadata endpoints must use HTTPS or HTTP for local development URLs"), null];
17
20
  return [null, data];
18
21
  } catch (error) {
19
22
  return [error instanceof Error ? error : /* @__PURE__ */ new Error("Failed to fetch OAuth2 metadata"), null];
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-oauth2-metadata.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport type { CustomFetch } from '@/v2/blocks/operation-block/helpers/send-request'\n\n// RFC 8414 and OIDC share these consumed fields; this alias does not imply OIDC issuer semantics.\nimport {\n type OpenIDConnectDiscovery as AuthorizationServerMetadata,\n OpenIDConnectDiscoverySchema as AuthorizationServerMetadataSchema,\n} from './fetch-openid-connect-discovery'\n\nconst isAllowedMetadataUrl = (url: URL): boolean =>\n url.protocol === 'https:' || (url.protocol === 'http:' && isLocalUrl(url.href))\n\n/** Fetches the exact RFC8414 metadata URL, without applying OIDC issuer URL conventions. */\nexport const fetchOAuth2Metadata = async (\n url: string,\n proxyUrl: string,\n customFetch: CustomFetch = fetch,\n): Promise<ErrorResponse<AuthorizationServerMetadata>> => {\n try {\n const metadataUrl = new URL(url.trim())\n if (!isAllowedMetadataUrl(metadataUrl)) {\n return [new Error('OAuth2 metadata URL must use HTTPS or HTTP for local development URLs'), null]\n }\n const response = await customFetch(redirectToProxy(proxyUrl, metadataUrl.href))\n if (!response.ok) {\n return [new Error(`Failed to fetch OAuth2 metadata: ${response.status} ${response.statusText}`), null]\n }\n const data = coerceValue(AuthorizationServerMetadataSchema, await response.json())\n if (!data.authorization_endpoint && !data.token_endpoint) {\n return [new Error('Invalid OAuth2 metadata: missing or invalid endpoints'), null]\n }\n for (const endpoint of [data.authorization_endpoint, data.token_endpoint]) {\n if (endpoint && !isAllowedMetadataUrl(new URL(endpoint))) {\n return [new Error('OAuth2 metadata endpoints must use HTTPS or HTTP for local development URLs'), null]\n }\n }\n return [null, data]\n } catch (error) {\n return [error instanceof Error ? error : new Error('Failed to fetch OAuth2 metadata'), null]\n }\n}\n"],"mappings":";;;;;AAaA,IAAM,wBAAwB,QAC5B,IAAI,aAAa,YAAa,IAAI,aAAa,WAAW,WAAW,IAAI,IAAI;;AAG/E,IAAa,sBAAsB,OACjC,KACA,UACA,cAA2B,UAC6B;CACxD,IAAI;EACF,MAAM,cAAc,IAAI,IAAI,IAAI,KAAK,CAAC;EACtC,IAAI,CAAC,qBAAqB,WAAW,GACnC,OAAO,iBAAC,IAAI,MAAM,uEAAuE,GAAG,IAAI;EAElG,MAAM,WAAW,MAAM,YAAY,gBAAgB,UAAU,YAAY,IAAI,CAAC;EAC9E,IAAI,CAAC,SAAS,IACZ,OAAO,iBAAC,IAAI,MAAM,oCAAoC,SAAS,OAAO,GAAG,SAAS,YAAY,GAAG,IAAI;EAEvG,MAAM,OAAO,YAAY,8BAAmC,MAAM,SAAS,KAAK,CAAC;EACjF,IAAI,CAAC,KAAK,0BAA0B,CAAC,KAAK,gBACxC,OAAO,iBAAC,IAAI,MAAM,uDAAuD,GAAG,IAAI;EAElF,KAAK,MAAM,YAAY,CAAC,KAAK,wBAAwB,KAAK,cAAc,GACtE,IAAI,YAAY,CAAC,qBAAqB,IAAI,IAAI,QAAQ,CAAC,GACrD,OAAO,iBAAC,IAAI,MAAM,6EAA6E,GAAG,IAAI;EAG1G,OAAO,CAAC,MAAM,IAAI;CACpB,SAAS,OAAO;EACd,OAAO,CAAC,iBAAiB,QAAQ,wBAAQ,IAAI,MAAM,iCAAiC,GAAG,IAAI;CAC7F;AACF"}
1
+ {"version":3,"file":"fetch-oauth2-metadata.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport type { CustomFetch } from '@/v2/blocks/operation-block/helpers/send-request'\n\n// RFC 8414 and OIDC share these consumed fields; this alias does not imply OIDC issuer semantics.\nimport {\n type OpenIDConnectDiscovery as AuthorizationServerMetadata,\n OpenIDConnectDiscoverySchema as AuthorizationServerMetadataSchema,\n} from './fetch-openid-connect-discovery'\nimport { isAllowedOAuthUrl } from './is-allowed-oauth-url'\n\n/** Fetches the exact RFC8414 metadata URL, without applying OIDC issuer URL conventions. */\nexport const fetchOAuth2Metadata = async (\n url: string,\n proxyUrl: string,\n customFetch: CustomFetch = fetch,\n): Promise<ErrorResponse<AuthorizationServerMetadata>> => {\n try {\n const metadataUrl = new URL(url.trim())\n if (!isAllowedOAuthUrl(metadataUrl)) {\n return [new Error('OAuth2 metadata URL must use HTTPS or HTTP for local development URLs'), null]\n }\n const response = await customFetch(redirectToProxy(proxyUrl, metadataUrl.href))\n if (!response.ok) {\n return [new Error(`Failed to fetch OAuth2 metadata: ${response.status} ${response.statusText}`), null]\n }\n const data = coerceValue(AuthorizationServerMetadataSchema, await response.json())\n if (!data.authorization_endpoint && !data.token_endpoint && !data.device_authorization_endpoint) {\n return [new Error('Invalid OAuth2 metadata: missing or invalid endpoints'), null]\n }\n for (const endpoint of [data.authorization_endpoint, data.token_endpoint, data.device_authorization_endpoint]) {\n if (endpoint && !isAllowedOAuthUrl(new URL(endpoint))) {\n return [new Error('OAuth2 metadata endpoints must use HTTPS or HTTP for local development URLs'), null]\n }\n }\n return [null, data]\n } catch (error) {\n return [error instanceof Error ? error : new Error('Failed to fetch OAuth2 metadata'), null]\n }\n}\n"],"mappings":";;;;;;AAcA,IAAa,sBAAsB,OACjC,KACA,UACA,cAA2B,UAC6B;CACxD,IAAI;EACF,MAAM,cAAc,IAAI,IAAI,IAAI,KAAK,CAAC;EACtC,IAAI,CAAC,kBAAkB,WAAW,GAChC,OAAO,iBAAC,IAAI,MAAM,uEAAuE,GAAG,IAAI;EAElG,MAAM,WAAW,MAAM,YAAY,gBAAgB,UAAU,YAAY,IAAI,CAAC;EAC9E,IAAI,CAAC,SAAS,IACZ,OAAO,iBAAC,IAAI,MAAM,oCAAoC,SAAS,OAAO,GAAG,SAAS,YAAY,GAAG,IAAI;EAEvG,MAAM,OAAO,YAAY,8BAAmC,MAAM,SAAS,KAAK,CAAC;EACjF,IAAI,CAAC,KAAK,0BAA0B,CAAC,KAAK,kBAAkB,CAAC,KAAK,+BAChE,OAAO,iBAAC,IAAI,MAAM,uDAAuD,GAAG,IAAI;EAElF,KAAK,MAAM,YAAY;GAAC,KAAK;GAAwB,KAAK;GAAgB,KAAK;EAA6B,GAC1G,IAAI,YAAY,CAAC,kBAAkB,IAAI,IAAI,QAAQ,CAAC,GAClD,OAAO,iBAAC,IAAI,MAAM,6EAA6E,GAAG,IAAI;EAG1G,OAAO,CAAC,MAAM,IAAI;CACpB,SAAS,OAAO;EACd,OAAO,CAAC,iBAAiB,QAAQ,wBAAQ,IAAI,MAAM,iCAAiC,GAAG,IAAI;CAC7F;AACF"}
@@ -10,6 +10,8 @@ import type { CustomFetch } from '../../../../v2/blocks/operation-block/helpers/
10
10
  export declare const OpenIDConnectDiscoverySchema: import("@scalar/typebox").TObject<{
11
11
  /** URL of the OAuth 2.0 Authorization Endpoint */
12
12
  authorization_endpoint: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
13
+ /** RFC8628 device authorization endpoint. */
14
+ device_authorization_endpoint: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
13
15
  /** URL of the OAuth 2.0 Token Endpoint */
14
16
  token_endpoint: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
15
17
  /** List of OAuth 2.0 scope values that this server supports */
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-openid-connect-discovery.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAGnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;IACvC,kDAAkD;;IAElD,0CAA0C;;IAE1C,+DAA+D;;IAE/D,oEAAoE;;IAEpE,uDAAuD;;EAEvD,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GACtC,KAAK,MAAM,EACX,UAAU,MAAM,EAChB,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CA2C/C,CAAA"}
1
+ {"version":3,"file":"fetch-openid-connect-discovery.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAGnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;IACvC,kDAAkD;;IAElD,6CAA6C;;IAE7C,0CAA0C;;IAE1C,+DAA+D;;IAE/D,oEAAoE;;IAEpE,uDAAuD;;EAEvD,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GACtC,KAAK,MAAM,EACX,UAAU,MAAM,EAChB,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CA2C/C,CAAA"}
@@ -11,6 +11,8 @@ import { Type } from "@scalar/typebox";
11
11
  var OpenIDConnectDiscoverySchema = Type.Object({
12
12
  /** URL of the OAuth 2.0 Authorization Endpoint */
13
13
  authorization_endpoint: Type.Optional(Type.String()),
14
+ /** RFC8628 device authorization endpoint. */
15
+ device_authorization_endpoint: Type.Optional(Type.String()),
14
16
  /** URL of the OAuth 2.0 Token Endpoint */
15
17
  token_endpoint: Type.Optional(Type.String()),
16
18
  /** List of OAuth 2.0 scope values that this server supports */
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-openid-connect-discovery.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { type Static, Type } from '@scalar/typebox'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport type { CustomFetch } from '@/v2/blocks/operation-block/helpers/send-request'\n\n/**\n * OpenID Connect Discovery Document (subset)\n * Represents the metadata fields consumed by the auth selector flow conversion.\n *\n * @see https://openid.net/specs/openid-connect-discovery-1_0.html\n */\nexport const OpenIDConnectDiscoverySchema = Type.Object({\n /** URL of the OAuth 2.0 Authorization Endpoint */\n authorization_endpoint: Type.Optional(Type.String()),\n /** URL of the OAuth 2.0 Token Endpoint */\n token_endpoint: Type.Optional(Type.String()),\n /** List of OAuth 2.0 scope values that this server supports */\n scopes_supported: Type.Optional(Type.Array(Type.String())),\n /** List of OAuth 2.0 grant type values that this server supports */\n grant_types_supported: Type.Optional(Type.Array(Type.String())),\n /** Supported PKCE code challenge methods (RFC 7636) */\n code_challenge_methods_supported: Type.Optional(Type.Array(Type.String())),\n})\n\nexport type OpenIDConnectDiscovery = Static<typeof OpenIDConnectDiscoverySchema>\n\n/**\n * The required scope for OpenID Connect requests.\n * If this scope is present, the request is an OIDC request; otherwise, it is a standard OAuth 2.0 request.\n */\nexport const OPENID_SCOPE = 'openid'\n\n/**\n * Fetches the OpenID Connect discovery document from the specified URL.\n * Supports both full discovery URLs and issuer URLs.\n *\n * @param url - The OpenID Connect discovery URL or issuer URL\n * @param proxyUrl - Optional CORS proxy to route the request through\n * @param customFetch - Fetch used for the discovery request; the desktop app passes an IPC-backed fetch so it leaves the renderer's network stack.\n * @returns The discovery document or an error\n */\nexport const fetchOpenIDConnectDiscovery = async (\n url: string,\n proxyUrl: string,\n customFetch: CustomFetch = fetch,\n): Promise<ErrorResponse<OpenIDConnectDiscovery>> => {\n try {\n // If the URL does not end with the well-known path, append it\n let discoveryUrl = url.trim()\n\n if (!discoveryUrl) {\n return [new Error('URL cannot be empty'), null]\n }\n\n // Remove trailing slash if present\n if (discoveryUrl.endsWith('/')) {\n discoveryUrl = discoveryUrl.slice(0, -1)\n }\n\n // If the URL does not already include the well-known path, append it\n if (!discoveryUrl.includes('/.well-known/openid-configuration')) {\n discoveryUrl = `${discoveryUrl}/.well-known/openid-configuration`\n }\n\n const proxiedUrl = redirectToProxy(proxyUrl, discoveryUrl)\n const response = await customFetch(proxiedUrl)\n\n if (!response.ok) {\n return [\n new Error(`Failed to fetch OpenID Connect discovery document: ${response.status} ${response.statusText}`),\n null,\n ]\n }\n\n const data = coerceValue(OpenIDConnectDiscoverySchema, await response.json())\n\n // Validate that we have the essential fields\n if (!data.authorization_endpoint && !data.token_endpoint) {\n return [new Error('Invalid OpenID Connect discovery document: missing required endpoints'), null]\n }\n\n return [null, data]\n } catch (error) {\n if (error instanceof Error) {\n return [error, null]\n }\n return [new Error('Failed to fetch OpenID Connect discovery document'), null]\n }\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAa,+BAA+B,KAAK,OAAO;;CAEtD,wBAAwB,KAAK,SAAS,KAAK,OAAO,CAAC;;CAEnD,gBAAgB,KAAK,SAAS,KAAK,OAAO,CAAC;;CAE3C,kBAAkB,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;;CAEzD,uBAAuB,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;;CAE9D,kCAAkC,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;AAC3E,CAAC;;;;;;;;;;AAmBD,IAAa,8BAA8B,OACzC,KACA,UACA,cAA2B,UACwB;CACnD,IAAI;EAEF,IAAI,eAAe,IAAI,KAAK;EAE5B,IAAI,CAAC,cACH,OAAO,iBAAC,IAAI,MAAM,qBAAqB,GAAG,IAAI;EAIhD,IAAI,aAAa,SAAS,GAAG,GAC3B,eAAe,aAAa,MAAM,GAAG,EAAE;EAIzC,IAAI,CAAC,aAAa,SAAS,mCAAmC,GAC5D,eAAe,GAAG,aAAa;EAIjC,MAAM,WAAW,MAAM,YADJ,gBAAgB,UAAU,YACV,CAAU;EAE7C,IAAI,CAAC,SAAS,IACZ,OAAO,iBACL,IAAI,MAAM,sDAAsD,SAAS,OAAO,GAAG,SAAS,YAAY,GACxG,IACF;EAGF,MAAM,OAAO,YAAY,8BAA8B,MAAM,SAAS,KAAK,CAAC;EAG5E,IAAI,CAAC,KAAK,0BAA0B,CAAC,KAAK,gBACxC,OAAO,iBAAC,IAAI,MAAM,uEAAuE,GAAG,IAAI;EAGlG,OAAO,CAAC,MAAM,IAAI;CACpB,SAAS,OAAO;EACd,IAAI,iBAAiB,OACnB,OAAO,CAAC,OAAO,IAAI;EAErB,OAAO,iBAAC,IAAI,MAAM,mDAAmD,GAAG,IAAI;CAC9E;AACF"}
1
+ {"version":3,"file":"fetch-openid-connect-discovery.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { type Static, Type } from '@scalar/typebox'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport type { CustomFetch } from '@/v2/blocks/operation-block/helpers/send-request'\n\n/**\n * OpenID Connect Discovery Document (subset)\n * Represents the metadata fields consumed by the auth selector flow conversion.\n *\n * @see https://openid.net/specs/openid-connect-discovery-1_0.html\n */\nexport const OpenIDConnectDiscoverySchema = Type.Object({\n /** URL of the OAuth 2.0 Authorization Endpoint */\n authorization_endpoint: Type.Optional(Type.String()),\n /** RFC8628 device authorization endpoint. */\n device_authorization_endpoint: Type.Optional(Type.String()),\n /** URL of the OAuth 2.0 Token Endpoint */\n token_endpoint: Type.Optional(Type.String()),\n /** List of OAuth 2.0 scope values that this server supports */\n scopes_supported: Type.Optional(Type.Array(Type.String())),\n /** List of OAuth 2.0 grant type values that this server supports */\n grant_types_supported: Type.Optional(Type.Array(Type.String())),\n /** Supported PKCE code challenge methods (RFC 7636) */\n code_challenge_methods_supported: Type.Optional(Type.Array(Type.String())),\n})\n\nexport type OpenIDConnectDiscovery = Static<typeof OpenIDConnectDiscoverySchema>\n\n/**\n * The required scope for OpenID Connect requests.\n * If this scope is present, the request is an OIDC request; otherwise, it is a standard OAuth 2.0 request.\n */\nexport const OPENID_SCOPE = 'openid'\n\n/**\n * Fetches the OpenID Connect discovery document from the specified URL.\n * Supports both full discovery URLs and issuer URLs.\n *\n * @param url - The OpenID Connect discovery URL or issuer URL\n * @param proxyUrl - Optional CORS proxy to route the request through\n * @param customFetch - Fetch used for the discovery request; the desktop app passes an IPC-backed fetch so it leaves the renderer's network stack.\n * @returns The discovery document or an error\n */\nexport const fetchOpenIDConnectDiscovery = async (\n url: string,\n proxyUrl: string,\n customFetch: CustomFetch = fetch,\n): Promise<ErrorResponse<OpenIDConnectDiscovery>> => {\n try {\n // If the URL does not end with the well-known path, append it\n let discoveryUrl = url.trim()\n\n if (!discoveryUrl) {\n return [new Error('URL cannot be empty'), null]\n }\n\n // Remove trailing slash if present\n if (discoveryUrl.endsWith('/')) {\n discoveryUrl = discoveryUrl.slice(0, -1)\n }\n\n // If the URL does not already include the well-known path, append it\n if (!discoveryUrl.includes('/.well-known/openid-configuration')) {\n discoveryUrl = `${discoveryUrl}/.well-known/openid-configuration`\n }\n\n const proxiedUrl = redirectToProxy(proxyUrl, discoveryUrl)\n const response = await customFetch(proxiedUrl)\n\n if (!response.ok) {\n return [\n new Error(`Failed to fetch OpenID Connect discovery document: ${response.status} ${response.statusText}`),\n null,\n ]\n }\n\n const data = coerceValue(OpenIDConnectDiscoverySchema, await response.json())\n\n // Validate that we have the essential fields\n if (!data.authorization_endpoint && !data.token_endpoint) {\n return [new Error('Invalid OpenID Connect discovery document: missing required endpoints'), null]\n }\n\n return [null, data]\n } catch (error) {\n if (error instanceof Error) {\n return [error, null]\n }\n return [new Error('Failed to fetch OpenID Connect discovery document'), null]\n }\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAa,+BAA+B,KAAK,OAAO;;CAEtD,wBAAwB,KAAK,SAAS,KAAK,OAAO,CAAC;;CAEnD,+BAA+B,KAAK,SAAS,KAAK,OAAO,CAAC;;CAE1D,gBAAgB,KAAK,SAAS,KAAK,OAAO,CAAC;;CAE3C,kBAAkB,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;;CAEzD,uBAAuB,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;;CAE9D,kCAAkC,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;AAC3E,CAAC;;;;;;;;;;AAmBD,IAAa,8BAA8B,OACzC,KACA,UACA,cAA2B,UACwB;CACnD,IAAI;EAEF,IAAI,eAAe,IAAI,KAAK;EAE5B,IAAI,CAAC,cACH,OAAO,iBAAC,IAAI,MAAM,qBAAqB,GAAG,IAAI;EAIhD,IAAI,aAAa,SAAS,GAAG,GAC3B,eAAe,aAAa,MAAM,GAAG,EAAE;EAIzC,IAAI,CAAC,aAAa,SAAS,mCAAmC,GAC5D,eAAe,GAAG,aAAa;EAIjC,MAAM,WAAW,MAAM,YADJ,gBAAgB,UAAU,YACV,CAAU;EAE7C,IAAI,CAAC,SAAS,IACZ,OAAO,iBACL,IAAI,MAAM,sDAAsD,SAAS,OAAO,GAAG,SAAS,YAAY,GACxG,IACF;EAGF,MAAM,OAAO,YAAY,8BAA8B,MAAM,SAAS,KAAK,CAAC;EAG5E,IAAI,CAAC,KAAK,0BAA0B,CAAC,KAAK,gBACxC,OAAO,iBAAC,IAAI,MAAM,uEAAuE,GAAG,IAAI;EAGlG,OAAO,CAAC,MAAM,IAAI;CACpB,SAAS,OAAO;EACd,IAAI,iBAAiB,OACnB,OAAO,CAAC,OAAO,IAAI;EAErB,OAAO,iBAAC,IAAI,MAAM,mDAAmD,GAAG,IAAI;CAC9E;AACF"}
@@ -0,0 +1,3 @@
1
+ /** Allows HTTPS, with HTTP reserved for local development hosts and reserved test domains. */
2
+ export declare const isAllowedOAuthUrl: (url: URL) => boolean;
3
+ //# sourceMappingURL=is-allowed-oauth-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-allowed-oauth-url.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,GAAI,KAAK,GAAG,KAAG,OACoC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
2
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.ts
3
+ /** Allows HTTPS, with HTTP reserved for local development hosts and reserved test domains. */
4
+ var isAllowedOAuthUrl = (url) => url.protocol === "https:" || url.protocol === "http:" && isLocalUrl(url.href);
5
+ //#endregion
6
+ export { isAllowedOAuthUrl };
7
+
8
+ //# sourceMappingURL=is-allowed-oauth-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-allowed-oauth-url.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.ts"],"sourcesContent":["import { isLocalUrl } from '@scalar/helpers/url/is-local-url'\n\n/** Allows HTTPS, with HTTP reserved for local development hosts and reserved test domains. */\nexport const isAllowedOAuthUrl = (url: URL): boolean =>\n url.protocol === 'https:' || (url.protocol === 'http:' && isLocalUrl(url.href))\n"],"mappings":";;;AAGA,IAAa,qBAAqB,QAChC,IAAI,aAAa,YAAa,IAAI,aAAa,WAAW,WAAW,IAAI,IAAI"}
@@ -0,0 +1,3 @@
1
+ /** Encode OAuth client passwords using form encoding before Basic authentication (RFC6749 section 2.3.1). */
2
+ export declare const oauthClientAuthorization: (clientId: string, clientSecret: string) => string;
3
+ //# sourceMappingURL=oauth-client-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.ts"],"names":[],"mappings":"AAEA,6GAA6G;AAC7G,eAAO,MAAM,wBAAwB,GAAI,UAAU,MAAM,EAAE,cAAc,MAAM,KAAG,MAGjF,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { encode } from "js-base64";
2
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.ts
3
+ /** Encode OAuth client passwords using form encoding before Basic authentication (RFC6749 section 2.3.1). */
4
+ var oauthClientAuthorization = (clientId, clientSecret) => {
5
+ const formEncode = (value) => new URLSearchParams({ value }).toString().slice(6);
6
+ return `Basic ${encode(`${formEncode(clientId)}:${formEncode(clientSecret)}`)}`;
7
+ };
8
+ //#endregion
9
+ export { oauthClientAuthorization };
10
+
11
+ //# sourceMappingURL=oauth-client-authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-authorization.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.ts"],"sourcesContent":["import { encode } from 'js-base64'\n\n/** Encode OAuth client passwords using form encoding before Basic authentication (RFC6749 section 2.3.1). */\nexport const oauthClientAuthorization = (clientId: string, clientSecret: string): string => {\n const formEncode = (value: string): string => new URLSearchParams({ value }).toString().slice('value='.length)\n return `Basic ${encode(`${formEncode(clientId)}:${formEncode(clientSecret)}`)}`\n}\n"],"mappings":";;;AAGA,IAAa,4BAA4B,UAAkB,iBAAiC;CAC1F,MAAM,cAAc,UAA0B,IAAI,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAe;CAC7G,OAAO,SAAS,OAAO,GAAG,WAAW,QAAQ,EAAE,GAAG,WAAW,YAAY,GAAG;AAC9E"}
@@ -0,0 +1,19 @@
1
+ import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error';
2
+ import type { OAuthFlowDeviceAuthorizationSecret } from '@scalar/workspace-store/request-example';
3
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
4
+ import type { CustomFetch } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
5
+ import { type OAuth2Tokens } from './oauth.js';
6
+ /** Information the user needs to approve a device without exposing the device code. */
7
+ export type DeviceAuthorizationPrompt = {
8
+ userCode: string;
9
+ verificationUri: string;
10
+ verificationUriComplete?: string;
11
+ };
12
+ /** Device flow UI and cancellation hooks. */
13
+ export type DeviceAuthorizationOptions = {
14
+ onPrompt: (prompt: DeviceAuthorizationPrompt) => void;
15
+ signal: AbortSignal;
16
+ };
17
+ /** Performs the RFC8628 device grant, respecting expiry, pending responses, and polling backoff. */
18
+ export declare const authorizeDevice: (flow: OAuthFlowDeviceAuthorizationSecret, scopes: string[], server: ServerObject | null, proxyUrl: string, environment: Record<string, string>, customFetch?: CustomFetch, options?: DeviceAuthorizationOptions) => Promise<ErrorResponse<OAuth2Tokens>>;
19
+ //# sourceMappingURL=oauth-device-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-device-authorization.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAK3E,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAA;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAGnF,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,SAAS,CAAA;AAOhE,uFAAuF;AACvF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC,CAAA;AAED,6CAA6C;AAC7C,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI,CAAA;IACrD,MAAM,EAAE,WAAW,CAAA;CACpB,CAAA;AA4BD,oGAAoG;AACpG,eAAO,MAAM,eAAe,GAC1B,MAAM,kCAAkC,EACxC,QAAQ,MAAM,EAAE,EAChB,QAAQ,YAAY,GAAG,IAAI,EAC3B,UAAU,MAAM,EAChB,aAAa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,cAAa,WAAmB,EAChC,UAAU,0BAA0B,KACnC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA4HrC,CAAA"}
@@ -0,0 +1,117 @@
1
+ import { oauthClientAuthorization } from "./oauth-client-authorization.js";
2
+ import { isAllowedOAuthUrl } from "./is-allowed-oauth-url.js";
3
+ import { getActiveServerBase } from "./oauth.js";
4
+ import { makeUrlAbsolute } from "@scalar/helpers/url/make-url-absolute";
5
+ import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
6
+ import { isObject } from "@scalar/helpers/object/is-object";
7
+ import { redirectToProxy } from "@scalar/helpers/url/redirect-to-proxy";
8
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.ts
9
+ var REQUEST_TIMEOUT_MS = 3e4;
10
+ var MAX_TIMEOUT_MS = 2147483647;
11
+ /** Waits between polls, releasing the timer immediately when cancelled or expired. */
12
+ var waitForPoll = (milliseconds, signal) => new Promise((resolve, reject) => {
13
+ signal.throwIfAborted();
14
+ const abort = () => {
15
+ clearTimeout(timer);
16
+ reject(signal.reason);
17
+ };
18
+ const timer = setTimeout(() => {
19
+ signal.removeEventListener("abort", abort);
20
+ resolve();
21
+ }, milliseconds);
22
+ signal.addEventListener("abort", abort, { once: true });
23
+ });
24
+ var verificationUrl = (value) => {
25
+ if (typeof value !== "string") throw new Error("Missing device verification URL");
26
+ const url = new URL(value);
27
+ if (!isAllowedOAuthUrl(url)) throw new Error("Device verification URL must use HTTPS or HTTP for local development URLs");
28
+ return url.href;
29
+ };
30
+ /** Performs the RFC8628 device grant, respecting expiry, pending responses, and polling backoff. */
31
+ var authorizeDevice = async (flow, scopes, server, proxyUrl, environment, customFetch = fetch, options) => {
32
+ try {
33
+ if (!options) throw new Error("Device authorization requires a verification prompt");
34
+ const resolveValue = (value) => replaceEnvVariables(value, environment);
35
+ const endpoint = (value) => redirectToProxy(proxyUrl, makeUrlAbsolute(resolveValue(value), getActiveServerBase(server, environment)));
36
+ const clientId = resolveValue(flow["x-scalar-secret-client-id"]);
37
+ const clientSecret = resolveValue(flow["x-scalar-secret-client-secret"]);
38
+ const headers = { "Content-Type": "application/x-www-form-urlencoded" };
39
+ const credentials = new URLSearchParams();
40
+ if (clientSecret && flow["x-scalar-credentials-location"] !== "body") headers.Authorization = oauthClientAuthorization(clientId, clientSecret);
41
+ else {
42
+ credentials.set("client_id", clientId);
43
+ if (clientSecret) credentials.set("client_secret", clientSecret);
44
+ }
45
+ const deviceBody = new URLSearchParams(credentials);
46
+ if (scopes.length) deviceBody.set("scope", scopes.join(" "));
47
+ const response = await customFetch(endpoint(flow.deviceAuthorizationUrl), {
48
+ method: "POST",
49
+ headers,
50
+ body: deviceBody,
51
+ signal: AbortSignal.any([options.signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)])
52
+ });
53
+ const data = await response.json();
54
+ options.signal.throwIfAborted();
55
+ if (!isObject(data)) throw new Error("Invalid device authorization response");
56
+ if (!response.ok) throw new Error(String(data.error_description ?? data.error ?? "Device authorization failed"));
57
+ if (typeof data.device_code !== "string" || !data.device_code || typeof data.user_code !== "string" || !data.user_code || typeof data.expires_in !== "number" || !Number.isFinite(data.expires_in) || data.expires_in <= 0 || data.interval !== void 0 && (typeof data.interval !== "number" || !Number.isFinite(data.interval) || data.interval < 0)) throw new Error("Invalid device authorization response");
58
+ const lifetime = Math.min(data.expires_in * 1e3, MAX_TIMEOUT_MS);
59
+ const expiresAt = Date.now() + lifetime;
60
+ const expiry = AbortSignal.timeout(lifetime);
61
+ const signal = AbortSignal.any([options.signal, expiry]);
62
+ options.onPrompt({
63
+ userCode: data.user_code,
64
+ verificationUri: verificationUrl(data.verification_uri),
65
+ ...data.verification_uri_complete ? { verificationUriComplete: verificationUrl(data.verification_uri_complete) } : {}
66
+ });
67
+ const body = new URLSearchParams(credentials);
68
+ for (const [key, value] of Object.entries(flow["x-scalar-security-body"] ?? {})) body.set(key, resolveValue(value));
69
+ body.set("grant_type", "urn:ietf:params:oauth:grant-type:device_code");
70
+ body.set("device_code", data.device_code);
71
+ let interval = typeof data.interval === "number" ? Math.max(1e3, data.interval * 1e3) : 5e3;
72
+ try {
73
+ while (Date.now() < expiresAt) {
74
+ await waitForPoll(Math.min(interval, expiresAt - Date.now()), signal);
75
+ signal.throwIfAborted();
76
+ if (Date.now() >= expiresAt) throw new Error("Device authorization expired");
77
+ const tokenResponse = await customFetch(endpoint(flow["x-scalar-secret-token-url"] || flow.tokenUrl), {
78
+ method: "POST",
79
+ headers,
80
+ body,
81
+ signal: AbortSignal.any([signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)])
82
+ }).catch((error) => {
83
+ signal.throwIfAborted();
84
+ if (error instanceof Error && error.name === "TimeoutError") return null;
85
+ throw error;
86
+ });
87
+ if (!tokenResponse) {
88
+ interval = Math.min(interval * 2, expiresAt - Date.now());
89
+ continue;
90
+ }
91
+ const token = await tokenResponse.json();
92
+ if (!isObject(token)) throw new Error("Invalid device token response");
93
+ if (token.error === "authorization_pending") continue;
94
+ if (token.error === "slow_down") {
95
+ interval = Math.min(interval + 5e3, expiresAt - Date.now());
96
+ continue;
97
+ }
98
+ const accessToken = token[flow["x-tokenName"] || "access_token"];
99
+ if (tokenResponse.ok && typeof accessToken === "string" && accessToken) return [null, {
100
+ accessToken,
101
+ ...typeof token.refresh_token === "string" ? { refreshToken: token.refresh_token } : {}
102
+ }];
103
+ throw new Error(String(token.error_description ?? token.error ?? "Failed to get an access token"));
104
+ }
105
+ throw new Error("Device authorization expired");
106
+ } catch (error) {
107
+ if (expiry.aborted && !options.signal.aborted) throw new Error("Device authorization expired");
108
+ throw error;
109
+ }
110
+ } catch (error) {
111
+ return [error instanceof Error ? error : new Error("Device authorization failed", { cause: error }), null];
112
+ }
113
+ };
114
+ //#endregion
115
+ export { authorizeDevice };
116
+
117
+ //# sourceMappingURL=oauth-device-authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-device-authorization.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { OAuthFlowDeviceAuthorizationSecret } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nimport type { CustomFetch } from '@/v2/blocks/operation-block/helpers/send-request'\n\nimport { isAllowedOAuthUrl } from './is-allowed-oauth-url'\nimport { type OAuth2Tokens, getActiveServerBase } from './oauth'\nimport { oauthClientAuthorization } from './oauth-client-authorization'\n\nconst REQUEST_TIMEOUT_MS = 30_000\n// Maximum delay supported by the browser timer API.\nconst MAX_TIMEOUT_MS = 2_147_483_647\n\n/** Information the user needs to approve a device without exposing the device code. */\nexport type DeviceAuthorizationPrompt = {\n userCode: string\n verificationUri: string\n verificationUriComplete?: string\n}\n\n/** Device flow UI and cancellation hooks. */\nexport type DeviceAuthorizationOptions = {\n onPrompt: (prompt: DeviceAuthorizationPrompt) => void\n signal: AbortSignal\n}\n\n/** Waits between polls, releasing the timer immediately when cancelled or expired. */\nconst waitForPoll = (milliseconds: number, signal: AbortSignal): Promise<void> =>\n new Promise((resolve, reject) => {\n signal.throwIfAborted()\n const abort = (): void => {\n clearTimeout(timer)\n reject(signal.reason)\n }\n const timer = setTimeout(() => {\n signal.removeEventListener('abort', abort)\n resolve()\n }, milliseconds)\n signal.addEventListener('abort', abort, { once: true })\n })\n\nconst verificationUrl = (value: unknown): string => {\n if (typeof value !== 'string') {\n throw new Error('Missing device verification URL')\n }\n const url = new URL(value)\n if (!isAllowedOAuthUrl(url)) {\n throw new Error('Device verification URL must use HTTPS or HTTP for local development URLs')\n }\n return url.href\n}\n\n/** Performs the RFC8628 device grant, respecting expiry, pending responses, and polling backoff. */\nexport const authorizeDevice = async (\n flow: OAuthFlowDeviceAuthorizationSecret,\n scopes: string[],\n server: ServerObject | null,\n proxyUrl: string,\n environment: Record<string, string>,\n customFetch: CustomFetch = fetch,\n options?: DeviceAuthorizationOptions,\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n try {\n if (!options) {\n throw new Error('Device authorization requires a verification prompt')\n }\n const resolveValue = (value: string): string => replaceEnvVariables(value, environment)\n const endpoint = (value: string): string =>\n redirectToProxy(proxyUrl, makeUrlAbsolute(resolveValue(value), getActiveServerBase(server, environment)))\n const clientId = resolveValue(flow['x-scalar-secret-client-id'])\n const clientSecret = resolveValue(flow['x-scalar-secret-client-secret'])\n const headers: Record<string, string> = { 'Content-Type': 'application/x-www-form-urlencoded' }\n const credentials = new URLSearchParams()\n if (clientSecret && flow['x-scalar-credentials-location'] !== 'body') {\n headers.Authorization = oauthClientAuthorization(clientId, clientSecret)\n } else {\n credentials.set('client_id', clientId)\n if (clientSecret) {\n credentials.set('client_secret', clientSecret)\n }\n }\n const deviceBody = new URLSearchParams(credentials)\n if (scopes.length) {\n deviceBody.set('scope', scopes.join(' '))\n }\n const response = await customFetch(endpoint(flow.deviceAuthorizationUrl), {\n method: 'POST',\n headers,\n body: deviceBody,\n signal: AbortSignal.any([options.signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)]),\n })\n const data: unknown = await response.json()\n options.signal.throwIfAborted()\n if (!isObject(data)) {\n throw new Error('Invalid device authorization response')\n }\n if (!response.ok) {\n throw new Error(String(data.error_description ?? data.error ?? 'Device authorization failed'))\n }\n if (\n typeof data.device_code !== 'string' ||\n !data.device_code ||\n typeof data.user_code !== 'string' ||\n !data.user_code ||\n typeof data.expires_in !== 'number' ||\n !Number.isFinite(data.expires_in) ||\n data.expires_in <= 0 ||\n (data.interval !== undefined &&\n (typeof data.interval !== 'number' || !Number.isFinite(data.interval) || data.interval < 0))\n ) {\n throw new Error('Invalid device authorization response')\n }\n const lifetime = Math.min(data.expires_in * 1000, MAX_TIMEOUT_MS)\n const expiresAt = Date.now() + lifetime\n const expiry = AbortSignal.timeout(lifetime)\n const signal = AbortSignal.any([options.signal, expiry])\n options.onPrompt({\n userCode: data.user_code,\n verificationUri: verificationUrl(data.verification_uri),\n ...(data.verification_uri_complete\n ? { verificationUriComplete: verificationUrl(data.verification_uri_complete) }\n : {}),\n })\n const body = new URLSearchParams(credentials)\n for (const [key, value] of Object.entries(flow['x-scalar-security-body'] ?? {})) {\n body.set(key, resolveValue(value))\n }\n body.set('grant_type', 'urn:ietf:params:oauth:grant-type:device_code')\n body.set('device_code', data.device_code)\n let interval = typeof data.interval === 'number' ? Math.max(1000, data.interval * 1000) : 5000\n try {\n while (Date.now() < expiresAt) {\n await waitForPoll(Math.min(interval, expiresAt - Date.now()), signal)\n signal.throwIfAborted()\n if (Date.now() >= expiresAt) {\n throw new Error('Device authorization expired')\n }\n // Connection timeouts require a lower polling frequency (RFC8628 section 3.5).\n const tokenResponse = await customFetch(endpoint(flow['x-scalar-secret-token-url'] || flow.tokenUrl), {\n method: 'POST',\n headers,\n body,\n signal: AbortSignal.any([signal, AbortSignal.timeout(REQUEST_TIMEOUT_MS)]),\n }).catch((error: unknown) => {\n signal.throwIfAborted()\n if (error instanceof Error && error.name === 'TimeoutError') {\n return null\n }\n throw error\n })\n if (!tokenResponse) {\n // Saturating at expiry never schedules an earlier poll: the loop expires instead.\n interval = Math.min(interval * 2, expiresAt - Date.now())\n continue\n }\n const token: unknown = await tokenResponse.json()\n if (!isObject(token)) {\n throw new Error('Invalid device token response')\n }\n if (token.error === 'authorization_pending') {\n continue\n }\n if (token.error === 'slow_down') {\n interval = Math.min(interval + 5000, expiresAt - Date.now())\n continue\n }\n const accessToken = token[flow['x-tokenName'] || 'access_token']\n if (tokenResponse.ok && typeof accessToken === 'string' && accessToken) {\n return [\n null,\n { accessToken, ...(typeof token.refresh_token === 'string' ? { refreshToken: token.refresh_token } : {}) },\n ]\n }\n throw new Error(String(token.error_description ?? token.error ?? 'Failed to get an access token'))\n }\n throw new Error('Device authorization expired')\n } catch (error) {\n if (expiry.aborted && !options.signal.aborted) {\n throw new Error('Device authorization expired')\n }\n throw error\n }\n } catch (error) {\n return [error instanceof Error ? error : new Error('Device authorization failed', { cause: error }), null]\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAM,qBAAqB;AAE3B,IAAM,iBAAiB;;AAgBvB,IAAM,eAAe,cAAsB,WACzC,IAAI,SAAS,SAAS,WAAW;CAC/B,OAAO,eAAe;CACtB,MAAM,cAAoB;EACxB,aAAa,KAAK;EAClB,OAAO,OAAO,MAAM;CACtB;CACA,MAAM,QAAQ,iBAAiB;EAC7B,OAAO,oBAAoB,SAAS,KAAK;EACzC,QAAQ;CACV,GAAG,YAAY;CACf,OAAO,iBAAiB,SAAS,OAAO,EAAE,MAAM,KAAK,CAAC;AACxD,CAAC;AAEH,IAAM,mBAAmB,UAA2B;CAClD,IAAI,OAAO,UAAU,UACnB,MAAM,IAAI,MAAM,iCAAiC;CAEnD,MAAM,MAAM,IAAI,IAAI,KAAK;CACzB,IAAI,CAAC,kBAAkB,GAAG,GACxB,MAAM,IAAI,MAAM,2EAA2E;CAE7F,OAAO,IAAI;AACb;;AAGA,IAAa,kBAAkB,OAC7B,MACA,QACA,QACA,UACA,aACA,cAA2B,OAC3B,YACyC;CACzC,IAAI;EACF,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;EAEvE,MAAM,gBAAgB,UAA0B,oBAAoB,OAAO,WAAW;EACtF,MAAM,YAAY,UAChB,gBAAgB,UAAU,gBAAgB,aAAa,KAAK,GAAG,oBAAoB,QAAQ,WAAW,CAAC,CAAC;EAC1G,MAAM,WAAW,aAAa,KAAK,4BAA4B;EAC/D,MAAM,eAAe,aAAa,KAAK,gCAAgC;EACvE,MAAM,UAAkC,EAAE,gBAAgB,oCAAoC;EAC9F,MAAM,cAAc,IAAI,gBAAgB;EACxC,IAAI,gBAAgB,KAAK,qCAAqC,QAC5D,QAAQ,gBAAgB,yBAAyB,UAAU,YAAY;OAClE;GACL,YAAY,IAAI,aAAa,QAAQ;GACrC,IAAI,cACF,YAAY,IAAI,iBAAiB,YAAY;EAEjD;EACA,MAAM,aAAa,IAAI,gBAAgB,WAAW;EAClD,IAAI,OAAO,QACT,WAAW,IAAI,SAAS,OAAO,KAAK,GAAG,CAAC;EAE1C,MAAM,WAAW,MAAM,YAAY,SAAS,KAAK,sBAAsB,GAAG;GACxE,QAAQ;GACR;GACA,MAAM;GACN,QAAQ,YAAY,IAAI,CAAC,QAAQ,QAAQ,YAAY,QAAQ,kBAAkB,CAAC,CAAC;EACnF,CAAC;EACD,MAAM,OAAgB,MAAM,SAAS,KAAK;EAC1C,QAAQ,OAAO,eAAe;EAC9B,IAAI,CAAC,SAAS,IAAI,GAChB,MAAM,IAAI,MAAM,uCAAuC;EAEzD,IAAI,CAAC,SAAS,IACZ,MAAM,IAAI,MAAM,OAAO,KAAK,qBAAqB,KAAK,SAAS,6BAA6B,CAAC;EAE/F,IACE,OAAO,KAAK,gBAAgB,YAC5B,CAAC,KAAK,eACN,OAAO,KAAK,cAAc,YAC1B,CAAC,KAAK,aACN,OAAO,KAAK,eAAe,YAC3B,CAAC,OAAO,SAAS,KAAK,UAAU,KAChC,KAAK,cAAc,KAClB,KAAK,aAAa,KAAA,MAChB,OAAO,KAAK,aAAa,YAAY,CAAC,OAAO,SAAS,KAAK,QAAQ,KAAK,KAAK,WAAW,IAE3F,MAAM,IAAI,MAAM,uCAAuC;EAEzD,MAAM,WAAW,KAAK,IAAI,KAAK,aAAa,KAAM,cAAc;EAChE,MAAM,YAAY,KAAK,IAAI,IAAI;EAC/B,MAAM,SAAS,YAAY,QAAQ,QAAQ;EAC3C,MAAM,SAAS,YAAY,IAAI,CAAC,QAAQ,QAAQ,MAAM,CAAC;EACvD,QAAQ,SAAS;GACf,UAAU,KAAK;GACf,iBAAiB,gBAAgB,KAAK,gBAAgB;GACtD,GAAI,KAAK,4BACL,EAAE,yBAAyB,gBAAgB,KAAK,yBAAyB,EAAE,IAC3E,CAAC;EACP,CAAC;EACD,MAAM,OAAO,IAAI,gBAAgB,WAAW;EAC5C,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,6BAA6B,CAAC,CAAC,GAC5E,KAAK,IAAI,KAAK,aAAa,KAAK,CAAC;EAEnC,KAAK,IAAI,cAAc,8CAA8C;EACrE,KAAK,IAAI,eAAe,KAAK,WAAW;EACxC,IAAI,WAAW,OAAO,KAAK,aAAa,WAAW,KAAK,IAAI,KAAM,KAAK,WAAW,GAAI,IAAI;EAC1F,IAAI;GACF,OAAO,KAAK,IAAI,IAAI,WAAW;IAC7B,MAAM,YAAY,KAAK,IAAI,UAAU,YAAY,KAAK,IAAI,CAAC,GAAG,MAAM;IACpE,OAAO,eAAe;IACtB,IAAI,KAAK,IAAI,KAAK,WAChB,MAAM,IAAI,MAAM,8BAA8B;IAGhD,MAAM,gBAAgB,MAAM,YAAY,SAAS,KAAK,gCAAgC,KAAK,QAAQ,GAAG;KACpG,QAAQ;KACR;KACA;KACA,QAAQ,YAAY,IAAI,CAAC,QAAQ,YAAY,QAAQ,kBAAkB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC,OAAO,UAAmB;KAC3B,OAAO,eAAe;KACtB,IAAI,iBAAiB,SAAS,MAAM,SAAS,gBAC3C,OAAO;KAET,MAAM;IACR,CAAC;IACD,IAAI,CAAC,eAAe;KAElB,WAAW,KAAK,IAAI,WAAW,GAAG,YAAY,KAAK,IAAI,CAAC;KACxD;IACF;IACA,MAAM,QAAiB,MAAM,cAAc,KAAK;IAChD,IAAI,CAAC,SAAS,KAAK,GACjB,MAAM,IAAI,MAAM,+BAA+B;IAEjD,IAAI,MAAM,UAAU,yBAClB;IAEF,IAAI,MAAM,UAAU,aAAa;KAC/B,WAAW,KAAK,IAAI,WAAW,KAAM,YAAY,KAAK,IAAI,CAAC;KAC3D;IACF;IACA,MAAM,cAAc,MAAM,KAAK,kBAAkB;IACjD,IAAI,cAAc,MAAM,OAAO,gBAAgB,YAAY,aACzD,OAAO,CACL,MACA;KAAE;KAAa,GAAI,OAAO,MAAM,kBAAkB,WAAW,EAAE,cAAc,MAAM,cAAc,IAAI,CAAC;IAAG,CAC3G;IAEF,MAAM,IAAI,MAAM,OAAO,MAAM,qBAAqB,MAAM,SAAS,+BAA+B,CAAC;GACnG;GACA,MAAM,IAAI,MAAM,8BAA8B;EAChD,SAAS,OAAO;GACd,IAAI,OAAO,WAAW,CAAC,QAAQ,OAAO,SACpC,MAAM,IAAI,MAAM,8BAA8B;GAEhD,MAAM;EACR;CACF,SAAS,OAAO;EACd,OAAO,CAAC,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,+BAA+B,EAAE,OAAO,MAAM,CAAC,GAAG,IAAI;CAC3G;AACF"}
@@ -2,6 +2,7 @@ import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error';
2
2
  import type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example';
3
3
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
4
4
  import type { CustomFetch } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
5
+ import { type DeviceAuthorizationOptions } from './oauth-device-authorization.js';
5
6
  type ActiveServerBase = {
6
7
  basePath: string;
7
8
  } | {
@@ -64,7 +65,7 @@ customFetch?: CustomFetch,
64
65
  * When provided, the system browser plus a host-owned redirect target replaces the
65
66
  * default popup-polling approach. Required for the Electron desktop app.
66
67
  */
67
- captureCallback?: CaptureOAuth2Callback) => Promise<ErrorResponse<OAuth2Tokens>>;
68
+ captureCallback?: CaptureOAuth2Callback, deviceOptions?: DeviceAuthorizationOptions) => Promise<ErrorResponse<OAuth2Tokens>>;
68
69
  /**
69
70
  * Exchange a refresh token for a new access token using the `grant_type=refresh_token` flow.
70
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAK3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAanF,KAAK,gBAAgB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE1F,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE;IAC3C,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,CAAA;CACzB,KAAK,OAAO,CACX,aAAa,CAAC;IACZ,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CACH,CAAA;AAED,kEAAkE;AAClE,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,sBAAsB,EAAE,UAAU,CAAC,CAAA;AAEzE;;;GAGG;AACH,eAAO,MAAM,YAAY,GACvB,cAAc,YAAY,GAAG,IAAI,EACjC,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,MAIA,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,cAAc,YAAY,GAAG,IAAI,EACjC,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,gBAWF,CAAA;AAuCD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,sBAAsB,EAC7B,MAAM,MAAM,sBAAsB,EAClC,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM;AAChB,6FAA6F;AAC7F,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AACjD,mHAAmH;AACnH,cAAc,WAAW;AACzB;;;;GAIG;AACH,kBAAkB,qBAAqB,KACtC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA6NrC,CAAA;AAkJD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,sBAAsB,EAC7B,MAAM,gBAAgB;AACtB,kCAAkC;AAClC,UAAU,MAAM;AAChB,+DAA+D;AAC/D,cAAc,YAAY,GAAG,IAAI;AACjC,2EAA2E;AAC3E,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AACjD,gIAAgI;AAChI,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAwFrC,CAAA"}
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAK3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAInF,OAAO,EAAE,KAAK,0BAA0B,EAAmB,MAAM,8BAA8B,CAAA;AAW/F,KAAK,gBAAgB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE1F,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE;IAC3C,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,CAAA;CACzB,KAAK,OAAO,CACX,aAAa,CAAC;IACZ,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CACH,CAAA;AAED,kEAAkE;AAClE,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,sBAAsB,EAAE,UAAU,CAAC,CAAA;AAEzE;;;GAGG;AACH,eAAO,MAAM,YAAY,GACvB,cAAc,YAAY,GAAG,IAAI,EACjC,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,MAIA,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,cAAc,YAAY,GAAG,IAAI,EACjC,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,gBAWF,CAAA;AAuCD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,sBAAsB,EAC7B,MAAM,MAAM,sBAAsB,EAClC,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM;AAChB,6FAA6F;AAC7F,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AACjD,mHAAmH;AACnH,cAAc,WAAW;AACzB;;;;GAIG;AACH,kBAAkB,qBAAqB,EACvC,gBAAgB,0BAA0B,KACzC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA8OrC,CAAA;AAmJD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,sBAAsB,EAC7B,MAAM,gBAAgB;AACtB,kCAAkC;AAClC,UAAU,MAAM;AAChB,+DAA+D;AAC/D,cAAc,YAAY,GAAG,IAAI;AACjC,2EAA2E;AAC3E,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AACjD,gIAAgI;AAChI,cAAa,WAAmB,KAC/B,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAyFrC,CAAA"}