@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
@@ -1,18 +1,19 @@
1
- import { defineComponent as D, computed as r, resolveComponent as U, createBlock as u, openBlock as s, unref as l, normalizeClass as $, withCtx as n, createVNode as d, createCommentVNode as b, createElementVNode as m, createElementBlock as v, Fragment as q, toDisplayString as I } from "vue";
2
- import { ScalarTooltip as S, ScalarIcon as h, ScalarButton as y } from "@scalar/components";
3
- import { ScalarIconTrash as j } from "@scalar/icons";
4
- import { unpackProxyObject as c } from "@scalar/workspace-store/helpers/unpack-proxy";
1
+ import { defineComponent as z, computed as r, createBlock as u, openBlock as s, unref as l, normalizeClass as D, withCtx as n, createVNode as d, createCommentVNode as c, createElementVNode as m, createElementBlock as v, Fragment as U, toDisplayString as $ } from "vue";
2
+ import { ScalarTooltip as q, ScalarIcon as h, ScalarButton as y } from "@scalar/components";
3
+ import { ScalarIconTrash as I } from "@scalar/icons";
4
+ import { unpackProxyObject as p } from "@scalar/workspace-store/helpers/unpack-proxy";
5
+ import { RouterLink as S } from "vue-router";
5
6
  import { getFileName as k } from "../helpers/files.js";
6
- import { validateParameter as E } from "../helpers/validate-parameter.js";
7
- import N from "./RequestTableTooltip.vue.js";
8
- import O from "../../../components/data-table/DataTableRow.vue.js";
9
- import P from "../../../components/data-table/DataTableCheckbox.vue.js";
7
+ import { validateParameter as j } from "../helpers/validate-parameter.js";
8
+ import E from "./RequestTableTooltip.vue.js";
9
+ import N from "../../../components/data-table/DataTableRow.vue.js";
10
+ import O from "../../../components/data-table/DataTableCheckbox.vue.js";
10
11
  import f from "../../../components/data-table/DataTableCell.vue.js";
11
12
  import w from "../../../components/code-input/CodeInput.vue.js";
12
- const G = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, K = {
13
+ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, G = {
13
14
  key: 1,
14
15
  class: "p-0.5"
15
- }, ee = /* @__PURE__ */ D({
16
+ }, ee = /* @__PURE__ */ z({
16
17
  __name: "RequestTableRow",
17
18
  props: {
18
19
  data: {},
@@ -31,160 +32,158 @@ const G = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
31
32
  () => t.data.schema && "maximum" in t.data.schema ? t.data.schema.maximum : void 0
32
33
  ), F = r(
33
34
  () => t.data.schema && "type" in t.data.schema ? t.data.schema.type : void 0
34
- ), p = r(
35
- () => E(t.data.schema, t.data.value)
35
+ ), b = r(
36
+ () => j(t.data.schema, t.data.value)
36
37
  ), x = (e) => e instanceof File, T = r({
37
38
  get: () => {
38
- const e = c(t.data.value);
39
- return e instanceof File ? k(c(t.data.value)) ?? "" : e === null ? "" : e;
39
+ const e = p(t.data.value);
40
+ return e instanceof File ? k(p(t.data.value)) ?? "" : e === null ? "" : e;
40
41
  },
41
42
  set: (e) => {
42
43
  typeof e == "string" && i("updateRow", { value: e });
43
44
  }
44
45
  });
45
- return (e, a) => {
46
- const z = U("RouterLink");
47
- return s(), u(l(O), {
48
- id: e.data.name,
49
- class: $({
50
- alert: p.value.ok === !1,
51
- error: p.value.ok === !1 && e.invalidParams?.has(e.data.name)
52
- })
53
- }, {
54
- default: n(() => [
55
- e.data.globalRoute !== void 0 ? (s(), u(z, {
56
- key: 0,
57
- class: "text-c-2 flex items-center justify-center border-t !border-r",
58
- to: e.data.globalRoute ?? {}
59
- }, {
60
- default: n(() => [
61
- a[7] || (a[7] = m("span", { class: "sr-only" }, "Global", -1)),
62
- d(l(S), {
63
- content: "Global cookies are shared across the whole workspace.",
64
- placement: "top"
46
+ return (e, a) => (s(), u(l(N), {
47
+ id: e.data.name,
48
+ class: D({
49
+ alert: b.value.ok === !1,
50
+ error: b.value.ok === !1 && e.invalidParams?.has(e.data.name)
51
+ })
52
+ }, {
53
+ default: n(() => [
54
+ e.data.globalRoute !== void 0 ? (s(), u(l(S), {
55
+ key: 0,
56
+ class: "text-c-2 flex items-center justify-center border-t !border-r",
57
+ to: e.data.globalRoute ?? {}
58
+ }, {
59
+ default: n(() => [
60
+ a[7] || (a[7] = m("span", { class: "sr-only" }, "Global", -1)),
61
+ d(l(q), {
62
+ content: "Global cookies are shared across the whole workspace.",
63
+ placement: "top"
64
+ }, {
65
+ default: n(() => [
66
+ d(l(h), {
67
+ class: "text-c-1",
68
+ icon: "Globe",
69
+ size: "xs",
70
+ tabindex: "0"
71
+ })
72
+ ]),
73
+ _: 1
74
+ })
75
+ ]),
76
+ _: 1
77
+ }, 8, ["to"])) : (s(), u(l(O), {
78
+ key: 1,
79
+ class: "!border-r",
80
+ disabled: e.hasCheckboxDisabled ?? !1,
81
+ modelValue: !e.data.isDisabled,
82
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => i("updateRow", { isDisabled: !o }))
83
+ }, null, 8, ["disabled", "modelValue"])),
84
+ d(l(f), null, {
85
+ default: n(() => [
86
+ d(l(w), {
87
+ "aria-label": `${e.label} Key`,
88
+ disableCloseBrackets: "",
89
+ disabled: e.isReadOnly,
90
+ disableEnter: "",
91
+ disableTabIndent: "",
92
+ environment: e.environment,
93
+ lineWrapping: "",
94
+ modelValue: e.data.name,
95
+ placeholder: "Key",
96
+ required: !!e.data.isRequired,
97
+ onSelectVariable: a[1] || (a[1] = (o) => i("updateRow", { key: o })),
98
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => i("updateRow", { key: o }))
99
+ }, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
100
+ ]),
101
+ _: 1
102
+ }),
103
+ d(l(f), null, {
104
+ default: n(() => [
105
+ d(l(w), {
106
+ "aria-label": `${e.label} Value`,
107
+ class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
108
+ default: V.value,
109
+ disableCloseBrackets: "",
110
+ disabled: e.isReadOnly,
111
+ disableEnter: "",
112
+ disableTabIndent: "",
113
+ enum: g.value ?? [],
114
+ environment: e.environment,
115
+ lineWrapping: "",
116
+ max: C.value,
117
+ min: B.value,
118
+ modelValue: T.value,
119
+ placeholder: "Value",
120
+ type: F.value,
121
+ "onUpdate:modelValue": a[4] || (a[4] = (o) => i("updateRow", { value: o }))
122
+ }, {
123
+ icon: n(() => [
124
+ (e.data.name || e.data.value) && !e.data.isRequired ? (s(), u(l(y), {
125
+ key: 0,
126
+ class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
127
+ size: "sm",
128
+ variant: "ghost",
129
+ onClick: a[3] || (a[3] = (o) => i("deleteRow"))
130
+ }, {
131
+ default: n(() => [
132
+ d(l(I), { class: "size-3.5" })
133
+ ]),
134
+ _: 1
135
+ })) : c("", !0),
136
+ e.data.schema ? (s(), u(E, {
137
+ key: 1,
138
+ description: e.data.description,
139
+ schema: e.data.schema,
140
+ value: e.data.value
141
+ }, null, 8, ["description", "schema", "value"])) : c("", !0)
142
+ ]),
143
+ _: 1
144
+ }, 8, ["aria-label", "default", "disabled", "enum", "environment", "max", "min", "modelValue", "type"])
145
+ ]),
146
+ _: 1
147
+ }),
148
+ e.showUploadButton ? (s(), u(l(f), {
149
+ key: 2,
150
+ class: "group/upload flex items-center justify-center whitespace-nowrap"
151
+ }, {
152
+ default: n(() => [
153
+ x(l(p)(e.data.value)) ? (s(), v(U, { key: 0 }, [
154
+ m("div", P, [
155
+ m("span", null, $(l(k)(l(p)(e.data.value))), 1)
156
+ ]),
157
+ m("button", {
158
+ class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
159
+ type: "button",
160
+ onClick: a[5] || (a[5] = (o) => i("removeFile"))
161
+ }, " Delete ")
162
+ ], 64)) : (s(), v("div", G, [
163
+ d(l(y), {
164
+ class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
165
+ size: "sm",
166
+ variant: "outlined",
167
+ onClick: a[6] || (a[6] = (o) => i("uploadFile"))
65
168
  }, {
66
169
  default: n(() => [
170
+ a[8] || (a[8] = m("span", null, "Upload File", -1)),
67
171
  d(l(h), {
68
- class: "text-c-1",
69
- icon: "Globe",
172
+ class: "ml-1",
173
+ icon: "Upload",
70
174
  size: "xs",
71
- tabindex: "0"
175
+ thickness: "2.5"
72
176
  })
73
177
  ]),
74
178
  _: 1
75
179
  })
76
- ]),
77
- _: 1
78
- }, 8, ["to"])) : (s(), u(l(P), {
79
- key: 1,
80
- class: "!border-r",
81
- disabled: e.hasCheckboxDisabled ?? !1,
82
- modelValue: !e.data.isDisabled,
83
- "onUpdate:modelValue": a[0] || (a[0] = (o) => i("updateRow", { isDisabled: !o }))
84
- }, null, 8, ["disabled", "modelValue"])),
85
- d(l(f), null, {
86
- default: n(() => [
87
- d(l(w), {
88
- "aria-label": `${e.label} Key`,
89
- disableCloseBrackets: "",
90
- disabled: e.isReadOnly,
91
- disableEnter: "",
92
- disableTabIndent: "",
93
- environment: e.environment,
94
- lineWrapping: "",
95
- modelValue: e.data.name,
96
- placeholder: "Key",
97
- required: !!e.data.isRequired,
98
- onSelectVariable: a[1] || (a[1] = (o) => i("updateRow", { key: o })),
99
- "onUpdate:modelValue": a[2] || (a[2] = (o) => i("updateRow", { key: o }))
100
- }, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
101
- ]),
102
- _: 1
103
- }),
104
- d(l(f), null, {
105
- default: n(() => [
106
- d(l(w), {
107
- "aria-label": `${e.label} Value`,
108
- class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
109
- default: V.value,
110
- disableCloseBrackets: "",
111
- disabled: e.isReadOnly,
112
- disableEnter: "",
113
- disableTabIndent: "",
114
- enum: g.value ?? [],
115
- environment: e.environment,
116
- lineWrapping: "",
117
- max: C.value,
118
- min: B.value,
119
- modelValue: T.value,
120
- placeholder: "Value",
121
- type: F.value,
122
- "onUpdate:modelValue": a[4] || (a[4] = (o) => i("updateRow", { value: o }))
123
- }, {
124
- icon: n(() => [
125
- (e.data.name || e.data.value) && !e.data.isRequired ? (s(), u(l(y), {
126
- key: 0,
127
- class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
128
- size: "sm",
129
- variant: "ghost",
130
- onClick: a[3] || (a[3] = (o) => i("deleteRow"))
131
- }, {
132
- default: n(() => [
133
- d(l(j), { class: "size-3.5" })
134
- ]),
135
- _: 1
136
- })) : b("", !0),
137
- e.data.schema ? (s(), u(N, {
138
- key: 1,
139
- schema: e.data.schema,
140
- value: e.data.value
141
- }, null, 8, ["schema", "value"])) : b("", !0)
142
- ]),
143
- _: 1
144
- }, 8, ["aria-label", "default", "disabled", "enum", "environment", "max", "min", "modelValue", "type"])
145
- ]),
146
- _: 1
147
- }),
148
- e.showUploadButton ? (s(), u(l(f), {
149
- key: 2,
150
- class: "group/upload flex items-center justify-center whitespace-nowrap"
151
- }, {
152
- default: n(() => [
153
- x(l(c)(e.data.value)) ? (s(), v(q, { key: 0 }, [
154
- m("div", G, [
155
- m("span", null, I(l(k)(l(c)(e.data.value))), 1)
156
- ]),
157
- m("button", {
158
- class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
159
- type: "button",
160
- onClick: a[5] || (a[5] = (o) => i("removeFile"))
161
- }, " Delete ")
162
- ], 64)) : (s(), v("div", K, [
163
- d(l(y), {
164
- class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
165
- size: "sm",
166
- variant: "outlined",
167
- onClick: a[6] || (a[6] = (o) => i("uploadFile"))
168
- }, {
169
- default: n(() => [
170
- a[8] || (a[8] = m("span", null, "Upload File", -1)),
171
- d(l(h), {
172
- class: "ml-1",
173
- icon: "Upload",
174
- size: "xs",
175
- thickness: "2.5"
176
- })
177
- ]),
178
- _: 1
179
- })
180
- ]))
181
- ]),
182
- _: 1
183
- })) : b("", !0)
184
- ]),
185
- _: 1
186
- }, 8, ["id", "class"]);
187
- };
180
+ ]))
181
+ ]),
182
+ _: 1
183
+ })) : c("", !0)
184
+ ]),
185
+ _: 1
186
+ }, 8, ["id", "class"]));
188
187
  }
189
188
  });
190
189
  export {
@@ -2,6 +2,7 @@ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
2
2
  type __VLS_Props = {
3
3
  schema?: SchemaObject;
4
4
  value: string | File | null;
5
+ description?: string;
5
6
  };
6
7
  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>;
7
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;CAC5B,CAAC;;AA8KF,wBAMG"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;;AAmLF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTableTooltip.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e1aabec"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f2ab7aa3"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,57 +1,58 @@
1
- import { defineComponent as d, computed as c, createBlock as i, openBlock as a, unref as r, withCtx as h, createElementVNode as u, createElementBlock as t, createCommentVNode as s, toDisplayString as o } from "vue";
2
- import { ScalarPopover as p } from "@scalar/components";
3
- import { ScalarIconWarning as f, ScalarIconInfo as v } from "@scalar/icons";
1
+ import { defineComponent as h, computed as c, createBlock as i, openBlock as a, unref as m, withCtx as u, createElementVNode as d, createElementBlock as t, createCommentVNode as s, toDisplayString as o } from "vue";
2
+ import { ScalarPopover as p, ScalarMarkdown as f } from "@scalar/components";
3
+ import { ScalarIconWarning as v, ScalarIconInfo as k } from "@scalar/icons";
4
4
  import { validateParameter as y } from "../helpers/validate-parameter.js";
5
- const k = ["aria-label", "role"], g = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, b = {
5
+ const g = ["aria-label", "role"], b = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, I = {
6
6
  key: 0,
7
7
  class: "text-error-1"
8
- }, _ = {
8
+ }, w = {
9
9
  key: 1,
10
10
  class: "schema text-c-2 flex items-center"
11
- }, I = { key: 0 }, x = { key: 1 }, S = { key: 2 }, w = { key: 3 }, B = { key: 4 }, C = {
12
- key: 2,
13
- class: "text-sm leading-snug text-pretty",
14
- style: { maxWidth: "16rem" }
15
- }, T = /* @__PURE__ */ d({
11
+ }, S = { key: 0 }, _ = { key: 1 }, x = { key: 2 }, B = { key: 3 }, C = { key: 4 }, T = /* @__PURE__ */ h({
16
12
  __name: "RequestTableTooltip",
17
13
  props: {
18
14
  schema: {},
19
- value: {}
15
+ value: {},
16
+ description: {}
20
17
  },
21
18
  setup(l) {
22
- const m = c(() => y(l.schema, l.value)), n = c(() => m.value.ok === !1);
23
- return (e, P) => (a(), i(r(p), {
19
+ const r = c(() => y(l.schema, l.value)), n = c(() => r.value.ok === !1);
20
+ return (e, M) => (a(), i(m(p), {
24
21
  offset: 4,
25
22
  placement: "left",
26
23
  teleport: ""
27
24
  }, {
28
- popover: h(() => [
29
- u("div", g, [
30
- m.value.ok === !1 ? (a(), t("div", b, o(m.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (a(), t("div", _, [
31
- "type" in e.schema ? (a(), t("span", I, o(e.schema.type), 1)) : s("", !0),
32
- "format" in e.schema ? (a(), t("span", x, o(e.schema.format), 1)) : s("", !0),
33
- "minimum" in e.schema ? (a(), t("span", S, "min: " + o(e.schema.minimum), 1)) : s("", !0),
34
- "maximum" in e.schema ? (a(), t("span", w, "max: " + o(e.schema.maximum), 1)) : s("", !0),
35
- "default" in e.schema ? (a(), t("span", B, "default: " + o(e.schema.default), 1)) : s("", !0)
25
+ popover: u(() => [
26
+ d("div", b, [
27
+ r.value.ok === !1 ? (a(), t("div", I, o(r.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (a(), t("div", w, [
28
+ "type" in e.schema ? (a(), t("span", S, o(e.schema.type), 1)) : s("", !0),
29
+ "format" in e.schema ? (a(), t("span", _, o(e.schema.format), 1)) : s("", !0),
30
+ "minimum" in e.schema ? (a(), t("span", x, "min: " + o(e.schema.minimum), 1)) : s("", !0),
31
+ "maximum" in e.schema ? (a(), t("span", B, "max: " + o(e.schema.maximum), 1)) : s("", !0),
32
+ "default" in e.schema ? (a(), t("span", C, "default: " + o(e.schema.default), 1)) : s("", !0)
36
33
  ])) : s("", !0),
37
- e.schema?.description && !n.value ? (a(), t("span", C, o(e.schema.description), 1)) : s("", !0)
34
+ e.description && !n.value ? (a(), i(m(f), {
35
+ key: 2,
36
+ class: "max-w-[16rem]",
37
+ value: e.description
38
+ }, null, 8, ["value"])) : s("", !0)
38
39
  ])
39
40
  ]),
40
- default: h(() => [
41
- u("button", {
41
+ default: u(() => [
42
+ d("button", {
42
43
  "aria-label": n.value ? "Input is invalid" : "More Information",
43
44
  class: "text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1",
44
45
  role: n.value ? "alert" : "none",
45
46
  type: "button"
46
47
  }, [
47
- n.value ? (a(), i(r(f), {
48
+ n.value ? (a(), i(m(v), {
48
49
  key: 0,
49
50
  class: "text-orange size-3.5 brightness-90 hover:brightness-75"
50
- })) : (a(), i(r(v), {
51
+ })) : (a(), i(m(k), {
51
52
  key: 1,
52
53
  class: "text-c-2 hover:text-c-1 size-3.5"
53
54
  }))
54
- ], 8, k)
55
+ ], 8, g)
55
56
  ]),
56
57
  _: 1
57
58
  }));
@@ -1,3 +1,4 @@
1
- import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
1
+ import type { ExampleObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /** Grab the resolved reference to the example from the request body, or build an example from the schema */
3
+ export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => ExampleObject | null;
3
4
  //# sourceMappingURL=get-request-body-example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAErG,eAAO,MAAM,kBAAkB,GAAI,aAAa,iBAAiB,EAAE,aAAa,MAAM,EAAE,YAAY,MAAM,4FAEzG,CAAA"}
1
+ {"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAIpH,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KACjB,aAAa,GAAG,IAqBlB,CAAA"}
@@ -1,5 +1,15 @@
1
- import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- const n = (e, o, t) => r(e.content[o]?.examples?.[t]);
1
+ import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { getExampleFromSchema as s } from "../../operation-code-sample/helpers/get-example-from-schema.js";
3
+ const u = (m, l, c) => {
4
+ const e = m.content?.[l], t = n(e?.examples?.[c]);
5
+ if (t)
6
+ return t;
7
+ const o = n(e?.schema);
8
+ if (!o)
9
+ return null;
10
+ const r = s(o);
11
+ return r ? { value: r } : null;
12
+ };
3
13
  export {
4
- n as getExampleFromBody
14
+ u as getExampleFromBody
5
15
  };
@@ -2,12 +2,12 @@ import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
2
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import type { ClientLayout } from '../../../hooks/index.js';
4
4
  import type { createStoreEvents } from '../../../store/events.js';
5
- import type { ClientPlugin } from '../../../v2/plugins';
5
+ import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
6
6
  type __VLS_Props = {
7
7
  /** Preprocessed response */
8
- response?: ResponseInstance;
8
+ response: ResponseInstance | null;
9
9
  /** Original request instance */
10
- request?: Request;
10
+ request: Request | null;
11
11
  /** Client layout */
12
12
  layout: ClientLayout;
13
13
  /** Total number of performed requests */
@@ -15,7 +15,7 @@ type __VLS_Props = {
15
15
  /** Application version */
16
16
  appVersion: string;
17
17
  /** Registered app plugins */
18
- plugins?: ClientPlugin[];
18
+ plugins: ClientPlugin[];
19
19
  /** Event bus */
20
20
  events: ReturnType<typeof createStoreEvents>;
21
21
  eventBus: WorkspaceEventBus;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AAoSA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAUvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAElB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IAExB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAmCF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAmZvD,wBAQG"}
1
+ {"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AA4RA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4BF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAmZvD,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBlock.vue2.js";
2
2
  /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0a5d9028"]]);
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-aaba9a18"]]);
5
5
  export {
6
- a as default
6
+ s as default
7
7
  };