@scalar/api-client 2.14.1 → 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 (293) hide show
  1. package/CHANGELOG.md +176 -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 +81 -65
  12. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -23
  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 +3 -3
  15. package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -38
  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 +202 -160
  78. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
  79. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +60 -51
  82. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
  83. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
  84. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
  85. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
  87. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
  89. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -4
  90. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  92. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +3 -2
  93. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +146 -147
  95. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
  96. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  97. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
  99. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  100. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  101. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
  102. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
  103. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  104. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
  105. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
  106. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
  108. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
  109. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
  111. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
  112. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
  113. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
  114. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
  115. package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
  116. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -15
  117. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  118. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  119. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +117 -71
  120. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
  121. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +59 -56
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  133. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
  134. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
  135. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
  137. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
  138. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  139. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
  140. package/dist/v2/components/code-input/CodeInput.vue.d.ts +16 -6
  141. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  142. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  143. package/dist/v2/components/code-input/CodeInput.vue2.js +81 -65
  144. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
  145. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  146. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
  147. package/dist/v2/components/resize/index.d.ts +0 -1
  148. package/dist/v2/components/resize/index.d.ts.map +1 -1
  149. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +9 -5
  150. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  151. package/dist/v2/components/sidebar/Sidebar.vue.js +51 -46
  152. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  153. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  154. package/dist/v2/features/app/App.vue.d.ts +3 -0
  155. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  156. package/dist/v2/features/app/App.vue.js +130 -143
  157. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
  158. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  159. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  160. package/dist/v2/features/app/components/AppSidebar.vue2.js +216 -106
  161. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
  162. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  163. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts +22 -0
  164. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
  165. package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
  166. package/dist/v2/features/app/components/ItemDecorator.vue2.js +4 -0
  167. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
  168. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  169. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  170. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  171. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  172. package/dist/v2/features/app/helpers/routes.d.ts +32 -6
  173. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  174. package/dist/v2/features/app/helpers/routes.js +25 -16
  175. package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
  176. package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
  177. package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
  178. package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
  179. package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
  180. package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
  181. package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
  182. package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
  183. package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
  184. package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
  185. package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
  186. package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
  187. package/dist/v2/features/app/hooks/use-workspace-client-app-events.js +156 -0
  188. package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
  189. package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
  190. package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
  191. package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
  192. package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
  193. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
  194. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  195. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  196. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
  197. package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
  198. package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
  199. package/dist/v2/features/collection/components/Environment.vue.js +32 -1
  200. package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
  201. package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
  202. package/dist/v2/features/collection/components/Servers.vue.js +142 -2
  203. package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
  204. package/dist/v2/features/collection/components/Settings.vue.js +58 -2
  205. package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
  206. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
  207. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  208. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
  209. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
  210. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  211. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
  212. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
  213. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  214. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
  215. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
  216. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  217. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
  218. package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
  219. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  220. package/dist/v2/features/modal/Modal.vue.js +1 -1
  221. package/dist/v2/features/modal/Modal.vue2.js +118 -31
  222. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
  223. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  224. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
  225. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
  226. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
  227. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
  228. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
  229. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
  230. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
  231. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
  232. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
  233. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
  234. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  235. package/dist/v2/features/operation/Operation.vue.js +59 -28
  236. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
  237. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
  238. package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
  239. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
  240. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
  241. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
  242. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
  243. package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
  244. package/dist/v2/features/operation/index.d.ts +0 -1
  245. package/dist/v2/features/operation/index.d.ts.map +1 -1
  246. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
  247. package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
  248. package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
  249. package/dist/v2/features/settings/DocumentSettings.vue.js +2 -2
  250. package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
  251. package/dist/v2/helpers/generate-location-id.d.ts +19 -0
  252. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
  253. package/dist/v2/helpers/generate-location-id.js +10 -0
  254. package/dist/v2/helpers/get-active-environment.d.ts +5 -0
  255. package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
  256. package/dist/v2/helpers/get-active-environment.js +22 -0
  257. package/dist/v2/helpers/get-tab-details.d.ts +2 -2
  258. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
  259. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  260. package/dist/v2/helpers/plugins.d.ts +59 -0
  261. package/dist/v2/helpers/plugins.d.ts.map +1 -0
  262. package/dist/v2/helpers/plugins.js +11 -0
  263. package/dist/v2/helpers/storage.d.ts.map +1 -1
  264. package/dist/v2/helpers/storage.js +5 -5
  265. package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
  266. package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
  267. package/dist/v2/hooks/use-scroll-lock.js +21 -0
  268. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
  269. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  270. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
  271. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
  272. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  273. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  274. package/package.json +19 -19
  275. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
  276. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
  277. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
  278. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
  279. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
  280. package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
  281. package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
  282. package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
  283. package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
  284. package/dist/v2/hooks/use-sync-path.js +0 -51
  285. package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
  286. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
  287. package/dist/v2/hooks/use-workspace-client-events.js +0 -112
  288. package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
  289. package/dist/v2/plugins.d.ts +0 -44
  290. package/dist/v2/plugins.d.ts.map +0 -1
  291. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
  292. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
  293. /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,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G,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":"AAwYA,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;IAC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AClC,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-3e0789a9"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b56a6b2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,223 +1,265 @@
1
- import { defineComponent as D, computed as l, ref as Q, useId as o, watch as $, createBlock as w, openBlock as r, withCtx as K, withDirectives as d, createElementBlock as f, createVNode as u, unref as v, vShow as y, mergeProps as B, toHandlers as k, Fragment as M, renderList as j, createCommentVNode as g, resolveDynamicComponent as z, createElementVNode as L, toDisplayString as G } from "vue";
2
- import { ScalarErrorBoundary as X } from "@scalar/components";
3
- import { canMethodHaveBody as S } from "@scalar/helpers/http/can-method-have-body";
4
- import { REGEX as J } from "@scalar/helpers/regex/regex-helpers";
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
+ import { canMethodHaveBody as b } from "@scalar/helpers/http/can-method-have-body";
4
+ import { REGEX as W } from "@scalar/helpers/regex/regex-helpers";
5
5
  import { getResolvedRef as V } 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 q } 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 = {
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
- }, fe = /* @__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 = l(() => ({
39
+ const o = r(() => ({
35
40
  method: t.method,
36
41
  path: t.path,
37
42
  exampleKey: t.exampleKey
38
- })), i = l(
39
- () => _(
43
+ })), c = r(
44
+ () => oe(
40
45
  t.operation.parameters?.map((e) => V(e)) ?? [],
41
46
  "in"
42
47
  )
43
- ), m = Q("All"), C = [
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: o(),
52
- Auth: o(),
53
- Variables: o(),
54
- Cookies: o(),
55
- Headers: o(),
56
- Query: o(),
57
- Body: o()
58
- }, A = l(() => {
59
- const e = /* @__PURE__ */ new Set(["All", ...C]);
60
- return i.value.path?.length || e.delete("Variables"), S(t.method) || e.delete("Body"), b.value && e.delete("Auth"), [...e];
61
- }), n = l(
55
+ ], U = {
56
+ All: i(),
57
+ Auth: i(),
58
+ Variables: i(),
59
+ Cookies: i(),
60
+ Headers: i(),
61
+ Query: i(),
62
+ Body: i()
63
+ }, A = 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
- ), b = l(
70
+ ), g = r(
66
71
  () => t.layout === "modal" && !t.operation.security && !Object.keys(t.securitySchemes ?? {}).length
67
- ), H = l(() => t.operation.summary ? t.operation.summary : t.path.replace(J.PROTOCOL, "") || "Request Name"), s = (e) => m.value === "All" || m.value === e;
68
- $(
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
- m.value === "Body" && !S(e) && (m.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 = l(() => ({
81
- path: q("path", t.eventBus, a.value),
82
- cookie: q("cookie", t.eventBus, a.value),
83
- header: q("header", t.eventBus, a.value),
84
- query: q("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
- }, N = (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
- }), O = (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("operation:update:requestBody:formRow", {
102
- contentType: e.contentType,
103
- meta: a.value,
104
- index: e.index,
105
- payload: {
106
- key: e.data.key ?? "",
107
- value: e.data.value ?? ""
105
+ meta: o.value
106
+ }), N = (e) => t.eventBus.emit(
107
+ "operation:update:requestBody:formRow",
108
+ {
109
+ contentType: e.contentType,
110
+ meta: o.value,
111
+ index: e.index,
112
+ payload: e.data
113
+ },
114
+ {
115
+ debounceKey: `update:requestBody:formRow-${e.index}-${Object.keys(e.data).join("-")}`
108
116
  }
109
- }), x = (e) => t.eventBus.emit("operation:update:requestBody:value", {
110
- contentType: e.contentType,
111
- payload: { value: e.value ?? "" },
112
- meta: a.value
113
- }), T = o();
114
- return (e, p) => (r(), 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, {
115
137
  "aria-label": `Request: ${e.operation.summary}`
116
138
  }, {
117
- title: K(() => [
118
- L("div", te, [
119
- e.layout !== "modal" ? (r(), f("label", {
139
+ title: w(() => [
140
+ K("div", ne, [
141
+ e.layout !== "modal" ? (s(), f("label", {
120
142
  key: 0,
121
143
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
122
- for: v(T)
123
- }, null, 8, ae)) : g("", !0),
124
- e.layout !== "modal" ? (r(), f("input", {
144
+ for: y(C)
145
+ }, null, 8, le)) : T("", !0),
146
+ e.layout !== "modal" ? (s(), f("input", {
125
147
  key: 1,
126
- id: v(T),
148
+ id: y(C),
127
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",
128
- placeholder: H.value,
150
+ placeholder: E.value,
129
151
  value: e.operation.summary,
130
- onInput: P
131
- }, null, 40, oe)) : (r(), f("span", ne, G(e.operation.summary), 1))
152
+ onInput: H
153
+ }, null, 40, re)) : (s(), f("span", ie, X(e.operation.summary), 1))
132
154
  ]),
133
- u(W, {
134
- modelValue: m.value,
135
- "onUpdate:modelValue": p[0] || (p[0] = (h) => m.value = h),
155
+ u(Y, {
156
+ modelValue: a.value,
157
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => a.value = h),
136
158
  filterIds: n.value,
137
159
  filters: A.value
138
160
  }, null, 8, ["modelValue", "filterIds", "filters"])
139
161
  ]),
140
- default: K(() => [
141
- d(u(v(ee), {
142
- id: n.value.Auth,
143
- environment: e.environment,
144
- eventBus: e.eventBus,
145
- meta: e.authMeta,
146
- security: e.security,
147
- securitySchemes: e.securitySchemes,
148
- selectedSecurity: e.selectedSecurity,
149
- server: e.server,
150
- title: "Authorization"
151
- }, null, 8, ["id", "environment", "eventBus", "meta", "security", "securitySchemes", "selectedSecurity", "server"]), [
152
- [y, s("Auth") && !b.value]
153
- ]),
154
- d(u(R, B({
155
- id: n.value.Variables,
156
- environment: e.environment,
157
- exampleKey: e.exampleKey,
158
- parameters: i.value.path ?? [],
159
- showAddRowPlaceholder: !1,
160
- title: "Variables"
161
- }, k(c.value.path)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
162
- [y, s("Variables") && i.value.path?.length]
163
- ]),
164
- d(u(R, B({
165
- id: n.value.Cookies,
166
- environment: e.environment,
167
- exampleKey: e.exampleKey,
168
- parameters: i.value.cookie ?? [],
169
- showAddRowPlaceholder: !0,
170
- title: "Cookies"
171
- }, k(c.value.cookie)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
172
- [y, s("Cookies")]
173
- ]),
174
- d(u(R, B({
175
- id: n.value.Headers,
176
- environment: e.environment,
177
- exampleKey: e.exampleKey,
178
- parameters: i.value.header ?? [],
179
- title: "Headers"
180
- }, k(c.value.header)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
181
- [y, s("Headers")]
182
- ]),
183
- d(u(R, B({
184
- id: n.value.Query,
185
- environment: e.environment,
186
- exampleKey: e.exampleKey,
187
- parameters: i.value.query ?? [],
188
- title: "Query Parameters"
189
- }, k(c.value.query)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
190
- [y, s("Query")]
191
- ]),
192
- d(u(Z, {
193
- id: n.value.Body,
194
- environment: e.environment,
195
- exampleKey: e.exampleKey,
196
- requestBody: v(V)(e.operation.requestBody),
197
- title: "Request Body",
198
- "onAdd:formRow": I,
199
- "onDelete:fromRow": N,
200
- "onUpdate:contentType": O,
201
- "onUpdate:formRow": U,
202
- "onUpdate:value": x
203
- }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
204
- [y, s("Body") && v(S)(e.method)]
205
- ]),
206
- (r(!0), f(M, null, j(e.plugins, (h, F) => (r(), w(v(X), { key: F }, {
207
- default: K(() => [
208
- h?.components?.request ? (r(), w(z(h.components.request), {
209
- key: 0,
210
- operation: e.operation,
211
- selectedExample: e.exampleKey
212
- }, null, 8, ["operation", "selectedExample"])) : g("", !0)
162
+ default: w(() => [
163
+ K("div", {
164
+ id: n.value.All,
165
+ class: "request-section-content custom-scroll relative flex flex-1 flex-col",
166
+ role: a.value === "All" ? "tabpanel" : "none"
167
+ }, [
168
+ m(u(y(ae), {
169
+ id: n.value.Auth,
170
+ environment: e.environment,
171
+ eventBus: e.eventBus,
172
+ meta: e.authMeta,
173
+ proxyUrl: e.proxyUrl,
174
+ securityRequirements: e.securityRequirements,
175
+ securitySchemes: e.securitySchemes,
176
+ selectedSecurity: e.selectedSecurity,
177
+ server: e.server,
178
+ title: "Authorization"
179
+ }, null, 8, ["id", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"]), [
180
+ [d, v("Auth") && !g.value]
181
+ ]),
182
+ m(u(q, B({
183
+ id: n.value.Variables,
184
+ environment: e.environment,
185
+ exampleKey: e.exampleKey,
186
+ parameters: c.value.path ?? [],
187
+ showAddRowPlaceholder: !1,
188
+ title: "Variables"
189
+ }, S(p.value.path)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
190
+ [d, v("Variables") && c.value.path?.length]
191
+ ]),
192
+ m(u(q, B({
193
+ id: n.value.Cookies,
194
+ environment: e.environment,
195
+ exampleKey: e.exampleKey,
196
+ parameters: c.value.cookie ?? [],
197
+ showAddRowPlaceholder: !0,
198
+ title: "Cookies"
199
+ }, S(p.value.cookie)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
200
+ [d, v("Cookies")]
201
+ ]),
202
+ m(u(q, B({
203
+ id: n.value.Headers,
204
+ environment: e.environment,
205
+ exampleKey: e.exampleKey,
206
+ parameters: c.value.header ?? [],
207
+ title: "Headers"
208
+ }, S(p.value.header)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
209
+ [d, v("Headers")]
210
+ ]),
211
+ m(u(q, B({
212
+ id: n.value.Query,
213
+ environment: e.environment,
214
+ exampleKey: e.exampleKey,
215
+ parameters: c.value.query ?? [],
216
+ title: "Query Parameters"
217
+ }, S(p.value.query)), null, 16, ["id", "environment", "exampleKey", "parameters"]), [
218
+ [d, v("Query")]
219
+ ]),
220
+ m(u(ee, {
221
+ id: n.value.Body,
222
+ environment: e.environment,
223
+ exampleKey: e.exampleKey,
224
+ requestBody: y(V)(e.operation.requestBody),
225
+ title: "Request Body",
226
+ "onAdd:formRow": P,
227
+ "onDelete:fromRow": x,
228
+ "onUpdate:contentType": I,
229
+ "onUpdate:formRow": N,
230
+ "onUpdate:value": $
231
+ }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
232
+ [d, v("Body") && y(b)(e.method)]
213
233
  ]),
214
- _: 2
215
- }, 1024))), 128))
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), {
237
+ key: 0,
238
+ operation: e.operation,
239
+ selectedExample: e.exampleKey
240
+ }, null, 8, ["operation", "selectedExample"])) : T("", !0)
241
+ ]),
242
+ _: 2
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)
216
258
  ]),
217
259
  _: 1
218
260
  }, 8, ["aria-label"]));
219
261
  }
220
262
  });
221
263
  export {
222
- fe as default
264
+ we as default
223
265
  };
@@ -30,6 +30,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
30
30
  data: Partial<{
31
31
  key: string;
32
32
  value: string | File | null;
33
+ isDisabled: boolean;
33
34
  }>;
34
35
  contentType: string;
35
36
  }) => any;
@@ -57,6 +58,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
57
58
  data: Partial<{
58
59
  key: string;
59
60
  value: string | File | null;
61
+ isDisabled: boolean;
60
62
  }>;
61
63
  contentType: string;
62
64
  }) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAwVA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,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AAK,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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1b70fdaa"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e4bd17fa"]]);
5
5
  export {
6
6
  f as default
7
7
  };