@scalar/api-client 2.15.0 → 2.17.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 (264) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/dist/hooks/useResponseBody.js +6 -6
  3. package/dist/libs/errors.d.ts +1 -0
  4. package/dist/libs/errors.d.ts.map +1 -1
  5. package/dist/libs/errors.js +1 -0
  6. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  7. package/dist/libs/send-request/create-request-operation.js +41 -35
  8. package/dist/style.css +1 -1
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
  10. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +84 -45
  12. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -11
  13. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  15. package/dist/v2/blocks/operation-block/components/Header.vue2.js +28 -35
  16. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
  17. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
  18. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
  19. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
  20. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
  21. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
  22. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
  23. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  24. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
  25. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
  26. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
  28. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
  29. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
  30. package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
  31. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
  32. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
  33. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
  34. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
  35. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
  36. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
  37. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
  39. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
  40. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
  41. package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
  42. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
  43. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  45. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  46. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
  47. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
  48. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
  50. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
  52. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
  53. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  54. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
  55. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
  56. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
  57. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
  58. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
  59. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
  60. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
  61. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
  62. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  63. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
  64. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  65. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
  66. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
  67. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  68. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +15 -19
  69. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
  70. package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
  71. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  72. package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
  73. package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
  75. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  77. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +158 -125
  78. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  80. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +59 -50
  81. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
  82. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
  83. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
  84. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
  85. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
  87. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +1 -0
  88. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +148 -149
  90. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
  91. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  92. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
  94. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
  95. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  96. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
  97. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
  98. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
  100. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
  101. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  102. package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
  103. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
  104. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
  105. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
  106. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
  107. package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
  108. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +0 -2
  109. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  111. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -87
  112. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
  113. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
  114. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
  115. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
  116. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  117. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +59 -56
  118. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  119. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  120. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  122. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
  126. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
  127. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
  128. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
  129. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
  130. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  131. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
  132. package/dist/v2/components/code-input/CodeInput.vue.d.ts +7 -6
  133. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  134. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  135. package/dist/v2/components/code-input/CodeInput.vue2.js +61 -59
  136. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
  137. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  138. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
  139. package/dist/v2/components/resize/index.d.ts +0 -1
  140. package/dist/v2/components/resize/index.d.ts.map +1 -1
  141. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -5
  142. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  143. package/dist/v2/components/sidebar/Sidebar.vue.js +49 -47
  144. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  145. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  146. package/dist/v2/features/app/App.vue.d.ts +3 -0
  147. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  148. package/dist/v2/features/app/App.vue.js +128 -139
  149. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
  150. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  151. package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
  152. package/dist/v2/features/app/components/AppSidebar.vue2.js +103 -80
  153. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
  154. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  155. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
  156. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  157. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  158. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  159. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  160. package/dist/v2/features/app/helpers/routes.d.ts +32 -6
  161. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  162. package/dist/v2/features/app/helpers/routes.js +25 -16
  163. package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
  164. package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
  165. package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
  166. package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
  167. package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
  168. package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
  169. package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
  170. package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
  171. package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
  172. package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
  173. package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
  174. package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
  175. package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
  176. package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
  177. package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
  178. package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
  179. package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
  180. package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
  181. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
  182. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  183. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  184. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
  185. package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
  186. package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
  187. package/dist/v2/features/collection/components/Environment.vue.js +32 -1
  188. package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
  189. package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
  190. package/dist/v2/features/collection/components/Servers.vue.js +142 -2
  191. package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
  192. package/dist/v2/features/collection/components/Settings.vue.js +58 -2
  193. package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
  194. package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
  195. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  196. package/dist/v2/features/modal/Modal.vue.js +1 -1
  197. package/dist/v2/features/modal/Modal.vue2.js +118 -31
  198. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
  199. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  200. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
  201. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
  202. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
  203. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
  204. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
  205. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
  206. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
  207. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
  208. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
  209. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
  210. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  211. package/dist/v2/features/operation/Operation.vue.js +59 -28
  212. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
  213. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
  214. package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
  215. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
  216. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
  217. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
  218. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
  219. package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
  220. package/dist/v2/features/operation/index.d.ts +0 -1
  221. package/dist/v2/features/operation/index.d.ts.map +1 -1
  222. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
  223. package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
  224. package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
  225. package/dist/v2/helpers/generate-location-id.d.ts +19 -0
  226. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
  227. package/dist/v2/helpers/generate-location-id.js +10 -0
  228. package/dist/v2/helpers/get-active-environment.d.ts +5 -0
  229. package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
  230. package/dist/v2/helpers/get-active-environment.js +22 -0
  231. package/dist/v2/helpers/get-tab-details.d.ts +2 -2
  232. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
  233. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  234. package/dist/v2/helpers/plugins.d.ts +59 -0
  235. package/dist/v2/helpers/plugins.d.ts.map +1 -0
  236. package/dist/v2/helpers/plugins.js +11 -0
  237. package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
  238. package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
  239. package/dist/v2/hooks/use-scroll-lock.js +21 -0
  240. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
  241. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  242. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
  243. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
  244. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  245. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  246. package/package.json +18 -18
  247. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
  248. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
  249. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
  250. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
  251. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
  252. package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
  253. package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
  254. package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
  255. package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
  256. package/dist/v2/hooks/use-sync-path.js +0 -51
  257. package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
  258. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
  259. package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
  260. package/dist/v2/plugins.d.ts +0 -44
  261. package/dist/v2/plugins.d.ts.map +0 -1
  262. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
  263. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
  264. /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
@@ -3,5 +3,5 @@ export { default as OperationCodeSample } from './components/OperationCodeSample
3
3
  export { DEFAULT_CLIENT, findClient, isClient } from './helpers/find-client.js';
4
4
  export { generateClientOptions } from './helpers/generate-client-options.js';
5
5
  export { getExampleFromSchema } from './helpers/get-example-from-schema.js';
6
- export type { ClientOption, ClientOptionGroup } from './types';
6
+ export type { ClientOption, ClientOptionGroup, CustomClientOption, CustomClientOptionGroup } from './types';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
@@ -26,4 +26,20 @@ export type ClientOptionGroup = Omit<ScalarComboboxOptionGroup, 'options'> & {
26
26
  /** Array of client options that belong to this group */
27
27
  options: ClientOption[];
28
28
  };
29
+ /** Better type safety when we have custom clients in the selector */
30
+ export type CustomClientOption = ScalarComboboxOption & {
31
+ /** A custom ID */
32
+ id: `custom/${string}`;
33
+ /** Programming language or tool for code generation (e.g., 'javascript', 'python', 'curl') */
34
+ lang: TargetId | 'curl' | 'plaintext';
35
+ /** Title shows when the client is selected in the dropdown */
36
+ title: string;
37
+ /** Client key for the client */
38
+ clientKey: 'custom';
39
+ };
40
+ /** Augments the base combobox option group with CustomClientOptions */
41
+ export type CustomClientOptionGroup = Omit<ScalarComboboxOptionGroup, 'options'> & {
42
+ /** Array of client options that belong to this group */
43
+ options: (ClientOption | CustomClientOption)[];
44
+ };
29
45
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAChD,yBAAyB;IACzB,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC5B,8FAA8F;IAC9F,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,SAAS,EAAE,QAAQ,CAAA;IACnB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,gCAAgC;IAChC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG;IAC3E,wDAAwD;IACxD,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAChD,yBAAyB;IACzB,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC5B,8FAA8F;IAC9F,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,SAAS,EAAE,QAAQ,CAAA;IACnB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,gCAAgC;IAChC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG;IAC3E,wDAAwD;IACxD,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAED,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,kBAAkB;IAClB,EAAE,EAAE,UAAU,MAAM,EAAE,CAAA;IACtB,8FAA8F;IAC9F,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,SAAS,EAAE,QAAQ,CAAA;CACpB,CAAA;AAED,uEAAuE;AACvE,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG;IACjF,wDAAwD;IACxD,OAAO,EAAE,CAAC,YAAY,GAAG,kBAAkB,CAAC,EAAE,CAAA;CAC/C,CAAA"}
@@ -1,24 +1,29 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
2
3
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
4
  import type { AuthMeta } from '@scalar/workspace-store/mutators';
4
5
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
5
6
  import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
7
  import type { ClientLayout } from '../../../hooks/index.js';
7
- import type { ClientPlugin } from '../../../v2/plugins';
8
+ import type { ClientOptionGroup } from '../../../v2/blocks/operation-code-sample/index.js';
9
+ import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
8
10
  type __VLS_Props = {
11
+ authMeta: AuthMeta;
12
+ clientOptions: ClientOptionGroup[];
13
+ environment: XScalarEnvironment;
14
+ eventBus: WorkspaceEventBus;
15
+ exampleKey: string;
16
+ layout: ClientLayout;
9
17
  method: HttpMethod;
10
- path: string;
11
18
  operation: OperationObject;
12
- authMeta?: AuthMeta;
13
- exampleKey: string;
19
+ path: string;
20
+ plugins: ClientPlugin[];
21
+ proxyUrl: string;
22
+ securityRequirements: OpenApiDocument['security'];
14
23
  securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
24
+ selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
15
25
  selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
16
- security: OpenApiDocument['security'];
17
- server?: ServerObject;
18
- layout: ClientLayout;
19
- plugins?: ClientPlugin[];
20
- eventBus: WorkspaceEventBus;
21
- environment: XScalarEnvironment;
26
+ server: ServerObject | null;
22
27
  };
23
28
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
29
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAoZA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAWhD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AAohBF,wBAMG"}
1
+ {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAkcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAO1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;AA2kBF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-753ab733"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b56a6b2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,232 +1,265 @@
1
- import { defineComponent as D, computed as r, ref as Q, useId as n, watch as j, createBlock as w, openBlock as u, withCtx as K, createElementVNode as g, withDirectives as d, createElementBlock as f, createVNode as i, unref as v, vShow as y, mergeProps as B, toHandlers as q, Fragment as M, renderList as z, createCommentVNode as V, resolveDynamicComponent as L, toDisplayString as G } from "vue";
2
- import { ScalarErrorBoundary as X } from "@scalar/components";
1
+ import { defineComponent as Q, computed as r, ref as j, useId as i, watch as M, createBlock as k, openBlock as s, withCtx as w, createElementVNode as K, withDirectives as m, createElementBlock as f, createVNode as u, unref as y, vShow as d, mergeProps as B, toHandlers as S, Fragment as z, renderList as L, createCommentVNode as T, resolveDynamicComponent as G, toDisplayString as X } from "vue";
2
+ import { ScalarErrorBoundary as J } from "@scalar/components";
3
3
  import { canMethodHaveBody as b } from "@scalar/helpers/http/can-method-have-body";
4
- import { REGEX as J } from "@scalar/helpers/regex/regex-helpers";
5
- import { getResolvedRef as C } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
- import W from "../../../components/SectionFilter.vue.js";
7
- import Y from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
8
- import Z from "./components/RequestBody.vue.js";
9
- import R from "./components/RequestParams.vue.js";
10
- import { createParameterHandlers as k } from "./helpers/create-parameter-handlers.js";
11
- import { groupBy as _ } from "./helpers/group-by.js";
12
- import ee from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
13
- const te = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ae = ["for"], oe = ["id", "placeholder", "value"], ne = {
4
+ import { REGEX as W } from "@scalar/helpers/regex/regex-helpers";
5
+ import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import Y from "../../../components/SectionFilter.vue.js";
7
+ import Z from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
8
+ import { getSelectedSecuritySchemes as _ } from "../operation-block/helpers/build-request-security.js";
9
+ import ee from "./components/RequestBody.vue.js";
10
+ import te from "./components/RequestCodeSnippet.vue.js";
11
+ import q from "./components/RequestParams.vue.js";
12
+ import { createParameterHandlers as R } from "./helpers/create-parameter-handlers.js";
13
+ import { groupBy as oe } from "./helpers/group-by.js";
14
+ import ae from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
15
+ const ne = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, le = ["for"], re = ["id", "placeholder", "value"], ie = {
14
16
  key: 2,
15
17
  class: "text-c-1 flex h-8 items-center"
16
- }, le = ["id", "role"], Be = /* @__PURE__ */ D({
18
+ }, ue = ["id", "role"], we = /* @__PURE__ */ Q({
17
19
  __name: "RequestBlock",
18
20
  props: {
19
- method: {},
20
- path: {},
21
- operation: {},
22
21
  authMeta: { default: () => ({ type: "document" }) },
22
+ clientOptions: {},
23
+ environment: {},
24
+ eventBus: {},
23
25
  exampleKey: {},
24
- securitySchemes: {},
25
- selectedSecurity: {},
26
- security: {},
27
- server: {},
28
26
  layout: {},
27
+ method: {},
28
+ operation: {},
29
+ path: {},
29
30
  plugins: {},
30
- eventBus: {},
31
- environment: {}
31
+ proxyUrl: {},
32
+ securityRequirements: {},
33
+ securitySchemes: {},
34
+ selectedClient: {},
35
+ selectedSecurity: {},
36
+ server: {}
32
37
  },
33
38
  setup(t) {
34
- const a = r(() => ({
39
+ const o = r(() => ({
35
40
  method: t.method,
36
41
  path: t.path,
37
42
  exampleKey: t.exampleKey
38
- })), s = r(
39
- () => _(
40
- t.operation.parameters?.map((e) => C(e)) ?? [],
43
+ })), c = r(
44
+ () => oe(
45
+ t.operation.parameters?.map((e) => V(e)) ?? [],
41
46
  "in"
42
47
  )
43
- ), l = Q("All"), x = [
48
+ ), a = j("All"), O = [
44
49
  "Auth",
45
50
  "Variables",
46
51
  "Cookies",
47
52
  "Headers",
48
53
  "Query",
49
54
  "Body"
50
- ], E = {
51
- All: n(),
52
- Auth: n(),
53
- Variables: n(),
54
- Cookies: n(),
55
- Headers: n(),
56
- Query: n(),
57
- Body: n()
55
+ ], U = {
56
+ All: i(),
57
+ Auth: i(),
58
+ Variables: i(),
59
+ Cookies: i(),
60
+ Headers: i(),
61
+ Query: i(),
62
+ Body: i()
58
63
  }, A = r(() => {
59
- const e = /* @__PURE__ */ new Set(["All", ...x]);
60
- return s.value.path?.length || e.delete("Variables"), b(t.method) || e.delete("Body"), S.value && e.delete("Auth"), [...e];
61
- }), o = r(
64
+ const e = /* @__PURE__ */ new Set(["All", ...O]);
65
+ return c.value.path?.length || e.delete("Variables"), b(t.method) || e.delete("Body"), g.value && e.delete("Auth"), [...e];
66
+ }), n = r(
62
67
  () => Object.fromEntries(
63
- A.value.map((e) => [e, E[e]])
68
+ A.value.map((e) => [e, U[e]])
64
69
  )
65
- ), S = r(
70
+ ), g = r(
66
71
  () => t.layout === "modal" && !t.operation.security && !Object.keys(t.securitySchemes ?? {}).length
67
- ), H = r(() => t.operation.summary ? t.operation.summary : t.path.replace(J.PROTOCOL, "") || "Request Name"), m = (e) => l.value === "All" || l.value === e;
68
- j(
72
+ ), E = r(() => t.operation.summary ? t.operation.summary : t.path.replace(W.PROTOCOL, "") || "Request Name"), v = (e) => a.value === "All" || a.value === e;
73
+ M(
69
74
  () => t.method,
70
75
  (e) => {
71
- l.value === "Body" && !b(e) && (l.value = "All");
76
+ a.value === "Body" && !b(e) && (a.value = "All");
72
77
  }
73
78
  );
74
- const P = (e) => {
75
- const p = e.target.value;
79
+ const H = (e) => {
80
+ const l = e.target.value;
76
81
  t.eventBus.emit("operation:update:summary", {
77
- meta: a.value,
78
- payload: { summary: p }
82
+ meta: o.value,
83
+ payload: { summary: l }
79
84
  });
80
- }, c = r(() => ({
81
- path: k("path", t.eventBus, a.value),
82
- cookie: k("cookie", t.eventBus, a.value),
83
- header: k("header", t.eventBus, a.value),
84
- query: k("query", t.eventBus, a.value)
85
- })), I = (e) => {
85
+ }, p = r(() => ({
86
+ path: R("path", t.eventBus, o.value),
87
+ cookie: R("cookie", t.eventBus, o.value),
88
+ header: R("header", t.eventBus, o.value),
89
+ query: R("query", t.eventBus, o.value)
90
+ })), P = (e) => {
86
91
  t.eventBus.emit("operation:add:requestBody:formRow", {
87
92
  contentType: e.contentType,
88
- meta: a.value,
93
+ meta: o.value,
89
94
  payload: {
90
95
  key: e.data.key ?? "",
91
96
  value: e.data.value ?? ""
92
97
  }
93
98
  });
94
- }, O = (e) => t.eventBus.emit("operation:delete:requestBody:formRow", {
99
+ }, x = (e) => t.eventBus.emit("operation:delete:requestBody:formRow", {
95
100
  contentType: e.contentType,
96
101
  index: e.index,
97
- meta: a.value
98
- }), N = (e) => t.eventBus.emit("operation:update:requestBody:contentType", {
102
+ meta: o.value
103
+ }), I = (e) => t.eventBus.emit("operation:update:requestBody:contentType", {
99
104
  payload: { contentType: e.value },
100
- meta: a.value
101
- }), U = (e) => t.eventBus.emit(
105
+ meta: o.value
106
+ }), N = (e) => t.eventBus.emit(
102
107
  "operation:update:requestBody:formRow",
103
108
  {
104
109
  contentType: e.contentType,
105
- meta: a.value,
110
+ meta: o.value,
106
111
  index: e.index,
107
112
  payload: e.data
108
113
  },
109
114
  {
110
115
  debounceKey: `update:requestBody:formRow-${e.index}-${Object.keys(e.data).join("-")}`
111
116
  }
112
- ), F = (e) => t.eventBus.emit("operation:update:requestBody:value", {
113
- contentType: e.contentType,
114
- payload: { value: e.value ?? "" },
115
- meta: a.value
116
- }), T = n();
117
- return (e, p) => (u(), w(Y, {
117
+ ), $ = (e) => {
118
+ const l = typeof e.value == "string" ? `update:requestBody:value-${e.contentType}` : void 0;
119
+ t.eventBus.emit(
120
+ "operation:update:requestBody:value",
121
+ {
122
+ contentType: e.contentType,
123
+ payload: { value: e.value ?? "" },
124
+ meta: o.value
125
+ },
126
+ {
127
+ debounceKey: l
128
+ }
129
+ );
130
+ }, C = i(), F = r(
131
+ () => _(
132
+ t.securitySchemes,
133
+ t.selectedSecurity?.selectedSchemes ?? []
134
+ )
135
+ );
136
+ return (e, l) => (s(), k(Z, {
118
137
  "aria-label": `Request: ${e.operation.summary}`
119
138
  }, {
120
- title: K(() => [
121
- g("div", te, [
122
- e.layout !== "modal" ? (u(), f("label", {
139
+ title: w(() => [
140
+ K("div", ne, [
141
+ e.layout !== "modal" ? (s(), f("label", {
123
142
  key: 0,
124
143
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
125
- for: v(T)
126
- }, null, 8, ae)) : V("", !0),
127
- e.layout !== "modal" ? (u(), f("input", {
144
+ for: y(C)
145
+ }, null, 8, le)) : T("", !0),
146
+ e.layout !== "modal" ? (s(), f("input", {
128
147
  key: 1,
129
- id: v(T),
148
+ id: y(C),
130
149
  class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
131
- placeholder: H.value,
150
+ placeholder: E.value,
132
151
  value: e.operation.summary,
133
- onInput: P
134
- }, null, 40, oe)) : (u(), f("span", ne, G(e.operation.summary), 1))
152
+ onInput: H
153
+ }, null, 40, re)) : (s(), f("span", ie, X(e.operation.summary), 1))
135
154
  ]),
136
- i(W, {
137
- modelValue: l.value,
138
- "onUpdate:modelValue": p[0] || (p[0] = (h) => l.value = h),
139
- filterIds: o.value,
155
+ u(Y, {
156
+ modelValue: a.value,
157
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => a.value = h),
158
+ filterIds: n.value,
140
159
  filters: A.value
141
160
  }, null, 8, ["modelValue", "filterIds", "filters"])
142
161
  ]),
143
- default: K(() => [
144
- g("div", {
145
- id: o.value.All,
162
+ default: w(() => [
163
+ K("div", {
164
+ id: n.value.All,
146
165
  class: "request-section-content custom-scroll relative flex flex-1 flex-col",
147
- role: l.value === "All" ? "tabpanel" : "none"
166
+ role: a.value === "All" ? "tabpanel" : "none"
148
167
  }, [
149
- d(i(v(ee), {
150
- id: o.value.Auth,
168
+ m(u(y(ae), {
169
+ id: n.value.Auth,
151
170
  environment: e.environment,
152
171
  eventBus: e.eventBus,
153
172
  meta: e.authMeta,
154
- security: e.security,
173
+ proxyUrl: e.proxyUrl,
174
+ securityRequirements: e.securityRequirements,
155
175
  securitySchemes: e.securitySchemes,
156
176
  selectedSecurity: e.selectedSecurity,
157
177
  server: e.server,
158
178
  title: "Authorization"
159
- }, null, 8, ["id", "environment", "eventBus", "meta", "security", "securitySchemes", "selectedSecurity", "server"]), [
160
- [y, m("Auth") && !S.value]
179
+ }, null, 8, ["id", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"]), [
180
+ [d, v("Auth") && !g.value]
161
181
  ]),
162
- d(i(R, B({
163
- id: o.value.Variables,
182
+ m(u(q, B({
183
+ id: n.value.Variables,
164
184
  environment: e.environment,
165
185
  exampleKey: e.exampleKey,
166
- parameters: s.value.path ?? [],
186
+ parameters: c.value.path ?? [],
167
187
  showAddRowPlaceholder: !1,
168
188
  title: "Variables"
169
- }, q(c.value.path)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
170
- [y, m("Variables") && s.value.path?.length]
189
+ }, S(p.value.path)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
190
+ [d, v("Variables") && c.value.path?.length]
171
191
  ]),
172
- d(i(R, B({
173
- id: o.value.Cookies,
192
+ m(u(q, B({
193
+ id: n.value.Cookies,
174
194
  environment: e.environment,
175
195
  exampleKey: e.exampleKey,
176
- parameters: s.value.cookie ?? [],
196
+ parameters: c.value.cookie ?? [],
177
197
  showAddRowPlaceholder: !0,
178
198
  title: "Cookies"
179
- }, q(c.value.cookie)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
180
- [y, m("Cookies")]
199
+ }, S(p.value.cookie)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
200
+ [d, v("Cookies")]
181
201
  ]),
182
- d(i(R, B({
183
- id: o.value.Headers,
202
+ m(u(q, B({
203
+ id: n.value.Headers,
184
204
  environment: e.environment,
185
205
  exampleKey: e.exampleKey,
186
- parameters: s.value.header ?? [],
206
+ parameters: c.value.header ?? [],
187
207
  title: "Headers"
188
- }, q(c.value.header)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
189
- [y, m("Headers")]
208
+ }, S(p.value.header)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
209
+ [d, v("Headers")]
190
210
  ]),
191
- d(i(R, B({
192
- id: o.value.Query,
211
+ m(u(q, B({
212
+ id: n.value.Query,
193
213
  environment: e.environment,
194
214
  exampleKey: e.exampleKey,
195
- parameters: s.value.query ?? [],
215
+ parameters: c.value.query ?? [],
196
216
  title: "Query Parameters"
197
- }, q(c.value.query)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
198
- [y, m("Query")]
217
+ }, S(p.value.query)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
218
+ [d, v("Query")]
199
219
  ]),
200
- d(i(Z, {
201
- id: o.value.Body,
220
+ m(u(ee, {
221
+ id: n.value.Body,
202
222
  environment: e.environment,
203
223
  exampleKey: e.exampleKey,
204
- requestBody: v(C)(e.operation.requestBody),
224
+ requestBody: y(V)(e.operation.requestBody),
205
225
  title: "Request Body",
206
- "onAdd:formRow": I,
207
- "onDelete:fromRow": O,
208
- "onUpdate:contentType": N,
209
- "onUpdate:formRow": U,
210
- "onUpdate:value": F
226
+ "onAdd:formRow": P,
227
+ "onDelete:fromRow": x,
228
+ "onUpdate:contentType": I,
229
+ "onUpdate:formRow": N,
230
+ "onUpdate:value": $
211
231
  }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
212
- [y, m("Body") && v(b)(e.method)]
232
+ [d, v("Body") && y(b)(e.method)]
213
233
  ]),
214
- (u(!0), f(M, null, z(e.plugins, (h, $) => (u(), w(v(X), { key: $ }, {
215
- default: K(() => [
216
- h?.components?.request ? (u(), w(L(h.components.request), {
234
+ (s(!0), f(z, null, L(e.plugins, (h, D) => (s(), k(y(J), { key: D }, {
235
+ default: w(() => [
236
+ h?.components?.request ? (s(), k(G(h.components.request), {
217
237
  key: 0,
218
238
  operation: e.operation,
219
239
  selectedExample: e.exampleKey
220
- }, null, 8, ["operation", "selectedExample"])) : V("", !0)
240
+ }, null, 8, ["operation", "selectedExample"])) : T("", !0)
221
241
  ]),
222
242
  _: 2
223
- }, 1024))), 128))
224
- ], 8, le)
243
+ }, 1024))), 128)),
244
+ l[1] || (l[1] = K("div", { class: "flex flex-grow" }, null, -1)),
245
+ m(u(te, {
246
+ clientOptions: e.clientOptions,
247
+ eventBus: e.eventBus,
248
+ method: e.method,
249
+ operation: e.operation,
250
+ path: e.path,
251
+ securitySchemes: F.value,
252
+ selectedClient: e.selectedClient,
253
+ selectedServer: e.server ?? void 0
254
+ }, null, 8, ["clientOptions", "eventBus", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"]), [
255
+ [d, a.value === "All"]
256
+ ])
257
+ ], 8, ue)
225
258
  ]),
226
259
  _: 1
227
260
  }, 8, ["aria-label"]));
228
261
  }
229
262
  });
230
263
  export {
231
- Be as default
264
+ we as default
232
265
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AA4VA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAI4C,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YACZ,GAAG,EAAE,MAAM,CAAA;YACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;YAC3B,UAAU,EAAE,OAAO,CAAA;SACpB,CAAC;qBACW,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;;eA1BvB,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YACZ,GAAG,EAAE,MAAM,CAAA;YACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;YAC3B,UAAU,EAAE,OAAO,CAAA;SACpB,CAAC;qBACW,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;AA6jBrE,wBAOG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAqWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAI4C,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YACZ,GAAG,EAAE,MAAM,CAAA;YACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;YAC3B,UAAU,EAAE,OAAO,CAAA;SACpB,CAAC;qBACW,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;;eA1BvB,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YACZ,GAAG,EAAE,MAAM,CAAA;YACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;YAC3B,UAAU,EAAE,OAAO,CAAA;SACpB,CAAC;qBACW,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;AAokBrE,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a0dd1ca2"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e4bd17fa"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };