@scalar/api-client 2.15.0 → 2.17.1

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 (271) hide show
  1. package/CHANGELOG.md +166 -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 +3 -3
  152. package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -105
  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/{ItemDecorator.vue.d.ts → SidebarItemMenu.vue.d.ts} +1 -1
  156. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -0
  157. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +129 -0
  158. package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +4 -0
  159. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
  160. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  161. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  162. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  163. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  164. package/dist/v2/features/app/helpers/routes.d.ts +32 -6
  165. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  166. package/dist/v2/features/app/helpers/routes.js +25 -16
  167. package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
  168. package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
  169. package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
  170. package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
  171. package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
  172. package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
  173. package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
  174. package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
  175. package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
  176. package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
  177. package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
  178. package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
  179. package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
  180. package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
  181. package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
  182. package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
  183. package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
  184. package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
  185. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
  186. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  187. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  188. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
  189. package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
  190. package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
  191. package/dist/v2/features/collection/components/Environment.vue.js +32 -1
  192. package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
  193. package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
  194. package/dist/v2/features/collection/components/Servers.vue.js +142 -2
  195. package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
  196. package/dist/v2/features/collection/components/Settings.vue.js +58 -2
  197. package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
  198. package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
  199. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  200. package/dist/v2/features/modal/Modal.vue.js +1 -1
  201. package/dist/v2/features/modal/Modal.vue2.js +118 -31
  202. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
  203. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  204. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
  205. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
  206. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
  207. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
  208. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
  209. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
  210. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
  211. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
  212. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
  213. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
  214. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  215. package/dist/v2/features/operation/Operation.vue.js +59 -28
  216. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
  217. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
  218. package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
  219. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
  220. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
  221. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
  222. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
  223. package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
  224. package/dist/v2/features/operation/index.d.ts +0 -1
  225. package/dist/v2/features/operation/index.d.ts.map +1 -1
  226. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
  227. package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
  228. package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
  229. package/dist/v2/helpers/generate-location-id.d.ts +19 -0
  230. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
  231. package/dist/v2/helpers/generate-location-id.js +10 -0
  232. package/dist/v2/helpers/get-active-environment.d.ts +5 -0
  233. package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
  234. package/dist/v2/helpers/get-active-environment.js +22 -0
  235. package/dist/v2/helpers/get-tab-details.d.ts +2 -2
  236. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
  237. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  238. package/dist/v2/helpers/plugins.d.ts +59 -0
  239. package/dist/v2/helpers/plugins.d.ts.map +1 -0
  240. package/dist/v2/helpers/plugins.js +11 -0
  241. package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
  242. package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
  243. package/dist/v2/hooks/use-scroll-lock.js +21 -0
  244. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
  245. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  246. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
  247. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
  248. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  249. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  250. package/package.json +20 -20
  251. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
  252. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
  253. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
  254. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
  255. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
  256. package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
  257. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +0 -1
  258. package/dist/v2/features/app/components/ItemDecorator.vue.js +0 -138
  259. package/dist/v2/features/app/components/ItemDecorator.vue2.js +0 -4
  260. package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
  261. package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
  262. package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
  263. package/dist/v2/hooks/use-sync-path.js +0 -51
  264. package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
  265. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
  266. package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
  267. package/dist/v2/plugins.d.ts +0 -44
  268. package/dist/v2/plugins.d.ts.map +0 -1
  269. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
  270. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
  271. /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,+DAM3B;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KAAG,UA0GH,CAAA"}
1
+ {"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAExG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAQtD;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,+DAM3B;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KAAG,UA0GH,CAAA"}
@@ -1,6 +1,6 @@
1
+ import { REGEX as t } from "@scalar/oas-utils/helpers";
1
2
  import { buildRequestSecurity as T } from "../../../../libs/send-request/build-request-security.js";
2
3
  import { replaceTemplateVariables as a } from "../../../../libs/string-template.js";
3
- import { REGEX as t } from "@scalar/oas-utils/helpers";
4
4
  import { convertToHarRequest as P } from "./convert-to-har-request.js";
5
5
  const S = "YOUR_SECRET_TOKEN", O = ({
6
6
  operation: d,
@@ -1,4 +1,3 @@
1
- /** biome-ignore-all lint/performance/noBarrelFile: these are exported publicly */
2
1
  export { restoreAuthFromLocalStorage } from './helpers/restore-auth-from-local-storage.js';
3
2
  export { default as RequestAuth } from './RequestAuth.vue.js';
4
3
  export { default as RequestAuthDataTable } from './RequestAuthDataTable.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (o) => {
35
35
  o?.createNew && g.name === "request" && d();
36
- }, v = "2.15.0";
36
+ }, v = "2.17.1";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (o, e) => (i(), l("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.15.0",
21
+ "version": "2.17.1",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -321,26 +321,26 @@
321
321
  "whatwg-mimetype": "^4.0.0",
322
322
  "yaml": "^2.8.0",
323
323
  "zod": "^4.1.11",
324
- "@scalar/analytics-client": "1.0.1",
325
- "@scalar/helpers": "0.2.2",
324
+ "@scalar/components": "0.16.12",
326
325
  "@scalar/draggable": "0.3.0",
327
- "@scalar/components": "0.16.8",
328
- "@scalar/icons": "0.5.0",
329
- "@scalar/import": "0.4.39",
330
- "@scalar/json-magic": "0.8.6",
331
- "@scalar/object-utils": "1.2.16",
332
- "@scalar/oas-utils": "0.6.8",
326
+ "@scalar/analytics-client": "1.0.1",
327
+ "@scalar/helpers": "0.2.4",
328
+ "@scalar/icons": "0.5.2",
329
+ "@scalar/import": "0.4.41",
330
+ "@scalar/json-magic": "0.8.8",
331
+ "@scalar/oas-utils": "0.6.11",
332
+ "@scalar/object-utils": "1.2.18",
333
333
  "@scalar/openapi-types": "0.5.3",
334
- "@scalar/postman-to-openapi": "0.3.49",
335
- "@scalar/openapi-parser": "0.23.7",
336
- "@scalar/sidebar": "0.6.0",
337
- "@scalar/snippetz": "0.5.5",
338
- "@scalar/types": "0.5.2",
339
- "@scalar/use-codemirror": "0.13.2",
340
- "@scalar/use-hooks": "0.3.3",
334
+ "@scalar/openapi-parser": "0.23.9",
335
+ "@scalar/sidebar": "0.7.2",
336
+ "@scalar/postman-to-openapi": "0.3.52",
341
337
  "@scalar/themes": "0.13.26",
342
- "@scalar/workspace-store": "0.23.0",
343
- "@scalar/use-toasts": "0.9.1"
338
+ "@scalar/types": "0.5.4",
339
+ "@scalar/use-codemirror": "0.13.6",
340
+ "@scalar/snippetz": "0.6.1",
341
+ "@scalar/use-toasts": "0.9.1",
342
+ "@scalar/workspace-store": "0.24.1",
343
+ "@scalar/use-hooks": "0.3.3"
344
344
  },
345
345
  "devDependencies": {
346
346
  "@tailwindcss/vite": "^4.1.7",
@@ -355,8 +355,8 @@
355
355
  "vite": "7.1.11",
356
356
  "vite-svg-loader": "5.1.0",
357
357
  "vitest": "3.2.4",
358
- "@scalar/galaxy": "0.5.12",
359
- "@scalar/build-tooling": "0.3.1"
358
+ "@scalar/build-tooling": "0.4.0",
359
+ "@scalar/galaxy": "0.5.12"
360
360
  },
361
361
  "scripts": {
362
362
  "build": "scalar-build-vite",
@@ -1,7 +0,0 @@
1
- import type { ParameterObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- /**
3
- * Resolve an example value for a parameter or requestBody from either `examples` or `content.*.examples`.
4
- * Or the [deprecated] `example` field.
5
- */
6
- export declare const getExampleValue: (param: ParameterObject | RequestBodyObject, example?: string, contentType?: string) => unknown;
7
- //# sourceMappingURL=get-example-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-example-value.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAItH;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,eAAe,GAAG,iBAAiB,EAC1C,UAAU,MAAM,EAChB,cAAc,MAAM,KACnB,OA8CF,CAAA"}
@@ -1,28 +0,0 @@
1
- import { getResolvedRefDeep as l } from "../get-resolved-ref-deep.js";
2
- const f = (e, s, i) => {
3
- if (s && "examples" in e && e.examples) {
4
- const n = l(e.examples[s])?.value;
5
- if (n)
6
- return n;
7
- }
8
- if ("content" in e && e.content) {
9
- const n = i ?? Object.keys(e.content)[0], t = e.content[n ?? ""];
10
- if (t?.examples) {
11
- const x = s ?? Object.keys(t.examples)[0], o = l(t.examples[x ?? ""]);
12
- if (o)
13
- return o.value;
14
- }
15
- if (t?.example !== void 0)
16
- return t.example;
17
- }
18
- if ("example" in e && e.example !== void 0)
19
- return e.example;
20
- if ("examples" in e && e.examples) {
21
- const n = Object.keys(e.examples)[0] ?? "", t = l(e.examples[n])?.value;
22
- if (t)
23
- return t;
24
- }
25
- };
26
- export {
27
- f as getExampleValue
28
- };
@@ -1,6 +0,0 @@
1
- import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- /**
3
- * Extract example from parameter object
4
- */
5
- export declare const getParameterExample: (parameter: ParameterObject, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
6
- //# sourceMappingURL=get-parameter-example.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-parameter-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-parameter-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAW,eAAe,EAAE,YAAY,MAAM,4FAYjF,CAAA"}
@@ -1,12 +0,0 @@
1
- import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- import { getParameterContentValue as r } from "./get-parameter-content.js";
3
- const l = (e, t) => {
4
- if ("examples" in e && e.examples)
5
- return n(e.examples[t]);
6
- const o = r(e);
7
- if (o?.examples)
8
- return n(o.examples[t]);
9
- };
10
- export {
11
- l as getParameterExample
12
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemDecorator.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/ItemDecorator.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAIhF,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,IAAI,EAAE,cAAc,CAAA;IACpB,sCAAsC;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,qDAAqD;IACrD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,sDAAsD;IACtD,MAAM,EAAE,WAAW,CAAA;CACpB,CAAC;;;;;;;;AAsVF,wBAOG"}
@@ -1,138 +0,0 @@
1
- import { defineComponent as M, ref as p, createBlock as d, openBlock as i, unref as n, withCtx as o, createVNode as l, withKeys as S, createCommentVNode as r, createElementVNode as c, createTextVNode as s } from "vue";
2
- import { ScalarFloating as E, ScalarDropdownMenu as $, ScalarDropdownButton as y, ScalarIcon as f, ScalarDropdownDivider as b } from "@scalar/components";
3
- import { getParentEntry as w } from "@scalar/workspace-store/navigation";
4
- import { onClickOutside as z } from "@vueuse/core";
5
- const N = { class: "flex items-center gap-2" }, O = { class: "flex items-center gap-2" }, T = { class: "flex items-center gap-2" }, V = { class: "text-red flex items-center gap-2" }, W = /* @__PURE__ */ M({
6
- __name: "ItemDecorator",
7
- props: {
8
- item: {},
9
- eventBus: {},
10
- sidebarState: {},
11
- target: {}
12
- },
13
- emits: ["closeMenu", "showDeleteModal"],
14
- setup(e, { emit: B }) {
15
- const u = B, g = p(null);
16
- z(e.target, () => u("closeMenu"), {
17
- ignore: [g]
18
- });
19
- const v = () => e.item.type === "document" || e.item.type === "tag", k = () => e.item.type === "document", x = () => e.item.type === "operation", A = () => e.item.type === "document" && e.item.id !== "drafts" || e.item.type === "tag" || e.item.type === "operation" || e.item.type === "example", D = () => {
20
- if (e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
21
- action: "create-request",
22
- payload: {
23
- documentId: e.item.id
24
- }
25
- }), e.item.type === "tag") {
26
- const a = e.sidebarState.getEntryById(e.item.id);
27
- e.eventBus.emit("ui:open:command-palette", {
28
- action: "create-request",
29
- payload: {
30
- documentId: w("document", a)?.id,
31
- tagId: e.item.name
32
- }
33
- });
34
- }
35
- }, I = () => {
36
- e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
37
- action: "add-tag",
38
- payload: {
39
- documentId: e.item.id
40
- }
41
- });
42
- }, C = () => {
43
- if (e.item.type === "operation") {
44
- const a = e.sidebarState.getEntryById(e.item.id);
45
- e.eventBus.emit("ui:open:command-palette", {
46
- action: "add-example",
47
- payload: {
48
- documentId: w("document", a)?.id,
49
- operationId: e.item.id
50
- }
51
- });
52
- }
53
- };
54
- return (a, t) => (i(), d(n(E), {
55
- placement: "bottom-end",
56
- target: a.target,
57
- teleport: ""
58
- }, {
59
- floating: o(() => [
60
- l(n($), {
61
- ref_key: "dropdownMenuRef",
62
- ref: g,
63
- onClick: t[4] || (t[4] = (m) => u("closeMenu")),
64
- onKeydown: t[5] || (t[5] = S((m) => u("closeMenu"), ["escape"]))
65
- }, {
66
- default: o(() => [
67
- v() ? (i(), d(n(y), {
68
- key: 0,
69
- onClick: t[0] || (t[0] = (m) => D())
70
- }, {
71
- default: o(() => [
72
- c("div", N, [
73
- l(n(f), {
74
- icon: "Add",
75
- size: "sm"
76
- }),
77
- t[6] || (t[6] = s(" Add Operation ", -1))
78
- ])
79
- ]),
80
- _: 1
81
- })) : r("", !0),
82
- k() ? (i(), d(n(y), {
83
- key: 1,
84
- onClick: t[1] || (t[1] = (m) => I())
85
- }, {
86
- default: o(() => [
87
- c("div", O, [
88
- l(n(f), {
89
- icon: "Add",
90
- size: "sm"
91
- }),
92
- t[7] || (t[7] = s(" Add Tag ", -1))
93
- ])
94
- ]),
95
- _: 1
96
- })) : r("", !0),
97
- x() ? (i(), d(n(y), {
98
- key: 2,
99
- onClick: t[2] || (t[2] = (m) => C())
100
- }, {
101
- default: o(() => [
102
- c("div", T, [
103
- l(n(f), {
104
- icon: "Add",
105
- size: "sm"
106
- }),
107
- t[8] || (t[8] = s(" Add Example ", -1))
108
- ])
109
- ]),
110
- _: 1
111
- })) : r("", !0),
112
- (x() || v() || k()) && A() ? (i(), d(n(b), { key: 3 })) : r("", !0),
113
- A() ? (i(), d(n(y), {
114
- key: 4,
115
- onClick: t[3] || (t[3] = (m) => u("showDeleteModal"))
116
- }, {
117
- default: o(() => [
118
- c("div", V, [
119
- l(n(f), {
120
- icon: "Delete",
121
- size: "sm"
122
- }),
123
- t[9] || (t[9] = s(" Delete ", -1))
124
- ])
125
- ]),
126
- _: 1
127
- })) : r("", !0)
128
- ]),
129
- _: 1
130
- }, 512)
131
- ]),
132
- _: 1
133
- }, 8, ["target"]));
134
- }
135
- });
136
- export {
137
- W as default
138
- };
@@ -1,4 +0,0 @@
1
- import f from "./ItemDecorator.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-document-watcher.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-document-watcher.ts"],"names":[],"mappings":"AACA,O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B;IACD,cAAc,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACvD,aAAa,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACnD,YAAY,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAClD,IAAI,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC1C,MAAM,EAAE,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAChD,WAAW,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAClD,KAAG,qBAoOH,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-sync-path.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-sync-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,EAAqB,KAAK,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAEtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,eAAO,MAAM,WAAW,GAAI,kDAIzB;IACD,sBAAsB,EAAE,0BAA0B,CAAA;IAClD,SAAS,EAAE,aAAa,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B;;CA2IA,CAAA"}
@@ -1,51 +0,0 @@
1
- import { ref as m, watch as h } from "vue";
2
- import { useRoute as v, useRouter as x } from "vue-router";
3
- import { workspaceStorage as d } from "../helpers/storage.js";
4
- import { DEFAULT_WORKSPACE as k } from "./use-workspace-selector.js";
5
- const W = ({
6
- workspaceSelectorState: e,
7
- tabsState: u,
8
- eventBus: l
9
- }) => {
10
- const n = v(), p = x(), s = m(!1), f = () => {
11
- const a = e.store.value;
12
- if (!a)
13
- return;
14
- const t = a.workspace["x-scalar-tabs"], r = a.workspace["x-scalar-active-tab"] ?? 0;
15
- t?.[r] && (t[r] = u.createTabFromCurrentRoute());
16
- }, b = async (a) => {
17
- const t = e.store.value;
18
- if (!t)
19
- return;
20
- const r = t.workspace["x-scalar-tabs"] ?? [], o = t.workspace["x-scalar-active-tab"] ?? 0, c = r[o];
21
- c && c.path !== n.path && await a?.({ tabPath: c.path });
22
- }, w = async (a) => {
23
- e.store.value = null, s.value = !0;
24
- const t = await e.loadWorkspace(a);
25
- if (t.success) {
26
- const { workspace: o } = t, c = o.workspace["x-scalar-active-tab"] ?? 0, i = o.workspace["x-scalar-tabs"]?.[c];
27
- i && await p.replace(i.path), o.workspace["x-scalar-tabs"] || l.emit("tabs:update:tabs", {
28
- "x-scalar-tabs": [u.createTabFromCurrentRoute()],
29
- "x-scalar-active-tab": 0
30
- }), s.value = !1;
31
- return;
32
- }
33
- const r = await e.createWorkspace(k);
34
- if (s.value = !1, !r)
35
- return console.error("Failed to create the default workspace, something went wrong, can not load the workspace");
36
- };
37
- return h(
38
- [() => n.path],
39
- async () => {
40
- d.setCurrentPath(n.path);
41
- const a = n.params.workspaceSlug;
42
- if (typeof a == "string" && a !== e.activeWorkspace.value?.id)
43
- return await w(a);
44
- await b(f), s.value = !1;
45
- },
46
- { immediate: !0 }
47
- ), { isLoading: s };
48
- };
49
- export {
50
- W as useSyncPath
51
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-tabs.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sDAAsD,CAAA;AAC/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA0B,MAAM,KAAK,CAAA;AAI7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B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AC5E,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,SAAS,EAAE,cAAc,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;CAC1G,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAO,0BAiJvC,CAAA"}
@@ -1,44 +0,0 @@
1
- import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
2
- import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
3
- import type { Component } from 'vue';
4
- /**
5
- * ClientPlugin is used to extend the API Client with custom hooks and UI components.
6
- *
7
- * Example usage:
8
- *
9
- * const myPlugin: ClientPlugin = {
10
- * hooks: {
11
- * beforeRequest: (request) => {
12
- * // Modify the request before it is sent
13
- * request.headers.set('X-Custom-Header', 'foo');
14
- * return request;
15
- * },
16
- * responseReceived: async (response, operation) => {
17
- * // Handle post-response logic
18
- * const data = await response.json();
19
- * console.log('Received:', data, 'for operation:', operation.operationId);
20
- * }
21
- * },
22
- * components: {
23
- * request: MyRequestComponent, // Custom Vue component for rendering the request section
24
- * response: MyResponseComponent // Custom Vue component for rendering the response section
25
- * }
26
- * }
27
- */
28
- export type ClientPlugin = {
29
- hooks?: Partial<{
30
- beforeRequest: (request: Request) => Request | Promise<Request>;
31
- responseReceived: (response: Response, operation: Record<string, any>) => void | Promise<void>;
32
- }>;
33
- components?: Partial<{
34
- request: Component<{
35
- operation: OperationObject;
36
- selectedExample?: string;
37
- }>;
38
- response: Component<{
39
- request?: Request;
40
- response?: ResponseInstance;
41
- }>;
42
- }>;
43
- };
44
- //# sourceMappingURL=plugins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/v2/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;QACd,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAC/D,gBAAgB,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;KAC/F,CAAC,CAAA;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,EAAE,SAAS,CAAC;YAAE,SAAS,EAAE,eAAe,CAAC;YAAC,eAAe,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAC5E,QAAQ,EAAE,SAAS,CAAC;YAAE,OAAO,CAAC,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;SAAE,CAAC,CAAA;KACxE,CAAC,CAAA;CACH,CAAA"}