@scalar/api-client 2.9.1 → 2.11.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 (434) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +2 -2
  3. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  4. package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -0
  5. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  6. package/dist/components/Server/ServerVariablesForm.vue.js +6 -6
  7. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  8. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  9. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +14 -13
  10. package/dist/hooks/useClientConfig.d.ts +3 -3
  11. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  12. package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
  13. package/dist/libs/create-client.d.ts +1 -1
  14. package/dist/libs/send-request/build-request-security.d.ts.map +1 -1
  15. package/dist/libs/send-request/build-request-security.js +1 -1
  16. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  17. package/dist/store/store.d.ts +1 -1
  18. package/dist/style.css +1 -1
  19. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +87 -0
  20. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -0
  21. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +126 -0
  22. package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +4 -0
  23. package/dist/v2/{features/operation → blocks/operation-block}/components/Header.vue.d.ts +10 -32
  24. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -0
  25. package/dist/v2/{features/operation → blocks/operation-block}/components/Header.vue.js +2 -2
  26. package/dist/v2/blocks/operation-block/components/Header.vue2.js +91 -0
  27. package/dist/v2/blocks/operation-block/index.d.ts +2 -0
  28. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -0
  29. package/dist/v2/blocks/operation-block/index.js +4 -0
  30. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +11 -10
  32. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +10 -29
  33. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  35. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +52 -53
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +15 -34
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +179 -5
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -169
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +201 -198
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +17 -22
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +82 -5
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +2 -80
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +3 -13
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +16 -18
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +134 -144
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +47 -45
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +5 -5
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +7 -7
  55. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +7 -24
  56. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
  58. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +230 -208
  59. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +33 -30
  60. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
  62. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +138 -99
  63. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +3 -5
  64. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
  65. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +35 -35
  66. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +3 -5
  67. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
  68. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +1 -1
  69. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +45 -44
  70. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +2 -5
  71. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
  72. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +67 -65
  73. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +2 -2
  74. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -1
  75. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +9 -9
  76. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +2 -4
  77. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
  78. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
  79. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +39 -38
  80. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -1
  81. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +2 -2
  82. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +18 -18
  83. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +14 -14
  85. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  86. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +12 -12
  87. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +13 -13
  89. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
  90. package/dist/v2/components/data-table/DataTable.vue.js +4 -4
  91. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +5 -7
  92. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  93. package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
  94. package/dist/v2/components/data-table/DataTableInput.vue2.js +32 -36
  95. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +25 -0
  96. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -0
  97. package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
  98. package/dist/v2/components/forms/ConfirmationForm.vue2.js +45 -0
  99. package/dist/v2/components/forms/index.d.ts +2 -0
  100. package/dist/v2/components/forms/index.d.ts.map +1 -0
  101. package/dist/v2/components/forms/index.js +4 -0
  102. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +43 -0
  103. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -0
  104. package/dist/v2/components/layout/CollapsibleSection.vue.js +89 -0
  105. package/dist/v2/components/layout/CollapsibleSection.vue2.js +4 -0
  106. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +23 -0
  107. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -0
  108. package/dist/v2/components/layout/ValueEmitter.vue.js +21 -0
  109. package/dist/v2/components/layout/ValueEmitter.vue2.js +4 -0
  110. package/dist/v2/components/layout/index.d.ts +2 -0
  111. package/dist/v2/components/layout/index.d.ts.map +1 -0
  112. package/dist/v2/components/layout/index.js +4 -0
  113. package/dist/v2/components/modals/DeleteModal.vue.d.ts +15 -0
  114. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -0
  115. package/dist/v2/components/modals/DeleteModal.vue.js +31 -0
  116. package/dist/v2/components/modals/DeleteModal.vue2.js +4 -0
  117. package/dist/v2/components/modals/index.d.ts +2 -0
  118. package/dist/v2/components/modals/index.d.ts.map +1 -0
  119. package/dist/v2/components/modals/index.js +4 -0
  120. package/dist/v2/components/server/ServerDropdown.vue.d.ts +4 -2
  121. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  122. package/dist/v2/components/server/ServerDropdown.vue.js +31 -31
  123. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +2 -6
  124. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  125. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  126. package/dist/v2/components/server/ServerDropdownItem.vue2.js +16 -16
  127. package/dist/v2/components/server/index.d.ts.map +1 -1
  128. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +6 -2
  129. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  130. package/dist/v2/components/sidebar/Sidebar.vue.js +38 -47
  131. package/dist/v2/features/app/App.vue.d.ts +2 -2
  132. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  133. package/dist/v2/features/app/App.vue.js +93 -65
  134. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +7 -3
  135. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  136. package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
  137. package/dist/v2/features/app/components/AppSidebar.vue2.js +50 -47
  138. package/dist/v2/features/app/helpers/routes.d.ts +5 -11
  139. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  140. package/dist/v2/features/app/helpers/routes.js +1 -1
  141. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  142. package/dist/v2/features/collection/DocumentCollection.vue2.js +77 -72
  143. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +15 -12
  144. package/dist/v2/features/collection/components/Authentication.vue.d.ts +13 -46
  145. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  146. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  147. package/dist/v2/features/collection/components/Authentication.vue2.js +48 -37
  148. package/dist/v2/features/collection/components/Environment.vue2.js +3 -0
  149. package/dist/v2/features/collection/components/Form.vue.d.ts +3 -7
  150. package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
  151. package/dist/v2/features/collection/components/Form.vue.js +28 -33
  152. package/dist/v2/features/collection/components/Overview.vue2.js +24 -21
  153. package/dist/v2/features/collection/components/Servers.vue.d.ts +13 -31
  154. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  155. package/dist/v2/features/collection/components/Servers.vue2.js +103 -82
  156. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  157. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
  158. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  159. package/dist/v2/features/modal/Modal.vue.js +3 -3
  160. package/dist/v2/features/modal/Modal.vue2.js +40 -32
  161. package/dist/v2/features/operation/Operation.vue.d.ts +10 -77
  162. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  163. package/dist/v2/features/operation/Operation.vue.js +50 -114
  164. package/dist/v2/hooks/use-sidebar-state.d.ts +47 -0
  165. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -0
  166. package/dist/v2/hooks/use-sidebar-state.js +112 -0
  167. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  168. package/dist/v2/hooks/use-workspace-client-events.js +100 -19
  169. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  170. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  171. package/dist/views/Request/libs/oauth2.js +8 -6
  172. package/package.json +17 -17
  173. package/dist/components/CodeInput/CodeInput.test.d.ts +0 -2
  174. package/dist/components/CodeInput/CodeInput.test.d.ts.map +0 -1
  175. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts +0 -2
  176. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts.map +0 -1
  177. package/dist/components/ImportCollection/utils/is-document.test.d.ts +0 -2
  178. package/dist/components/ImportCollection/utils/is-document.test.d.ts.map +0 -1
  179. package/dist/components/ImportCollection/utils/is-url.test.d.ts +0 -2
  180. package/dist/components/ImportCollection/utils/is-url.test.d.ts.map +0 -1
  181. package/dist/components/Search/useSearch.test.d.ts +0 -2
  182. package/dist/components/Search/useSearch.test.d.ts.map +0 -1
  183. package/dist/components/Server/ServerDropdown.test.d.ts +0 -2
  184. package/dist/components/Server/ServerDropdown.test.d.ts.map +0 -1
  185. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +0 -2
  186. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +0 -1
  187. package/dist/hooks/useResponseBody.test.d.ts +0 -2
  188. package/dist/hooks/useResponseBody.test.d.ts.map +0 -1
  189. package/dist/hooks/useSidebar.test.d.ts +0 -2
  190. package/dist/hooks/useSidebar.test.d.ts.map +0 -1
  191. package/dist/layouts/App/create-api-client-app.test.d.ts +0 -2
  192. package/dist/layouts/App/create-api-client-app.test.d.ts.map +0 -1
  193. package/dist/layouts/Modal/create-api-client-modal.test.d.ts +0 -2
  194. package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +0 -1
  195. package/dist/layouts/Web/create-api-client-web.test.d.ts +0 -2
  196. package/dist/layouts/Web/create-api-client-web.test.d.ts.map +0 -1
  197. package/dist/libs/create-client.test.d.ts +0 -2
  198. package/dist/libs/create-client.test.d.ts.map +0 -1
  199. package/dist/libs/env-helpers.test.d.ts +0 -2
  200. package/dist/libs/env-helpers.test.d.ts.map +0 -1
  201. package/dist/libs/event-bus.test.d.ts +0 -2
  202. package/dist/libs/event-bus.test.d.ts.map +0 -1
  203. package/dist/libs/extractAttachmentFilename.test.d.ts +0 -2
  204. package/dist/libs/extractAttachmentFilename.test.d.ts.map +0 -1
  205. package/dist/libs/find-request.test.d.ts +0 -2
  206. package/dist/libs/find-request.test.d.ts.map +0 -1
  207. package/dist/libs/get-request-uid-by-path-method.test.d.ts +0 -2
  208. package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +0 -1
  209. package/dist/libs/hot-keys.test.d.ts +0 -2
  210. package/dist/libs/hot-keys.test.d.ts.map +0 -1
  211. package/dist/libs/importers/curl.test.d.ts +0 -2
  212. package/dist/libs/importers/curl.test.d.ts.map +0 -1
  213. package/dist/libs/normalize-headers.test.d.ts +0 -2
  214. package/dist/libs/normalize-headers.test.d.ts.map +0 -1
  215. package/dist/libs/parse-curl.test.d.ts +0 -2
  216. package/dist/libs/parse-curl.test.d.ts.map +0 -1
  217. package/dist/libs/send-request/build-request-security.test.d.ts +0 -2
  218. package/dist/libs/send-request/build-request-security.test.d.ts.map +0 -1
  219. package/dist/libs/send-request/create-fetch-auth.test.d.ts +0 -2
  220. package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +0 -1
  221. package/dist/libs/send-request/create-fetch-body.test.d.ts +0 -2
  222. package/dist/libs/send-request/create-fetch-body.test.d.ts.map +0 -1
  223. package/dist/libs/send-request/create-fetch-headers.test.d.ts +0 -2
  224. package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +0 -1
  225. package/dist/libs/send-request/create-fetch-query-params.test.d.ts +0 -2
  226. package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +0 -1
  227. package/dist/libs/send-request/create-request-operation.test.d.ts +0 -191
  228. package/dist/libs/send-request/create-request-operation.test.d.ts.map +0 -1
  229. package/dist/libs/send-request/decode-buffer.test.d.ts +0 -2
  230. package/dist/libs/send-request/decode-buffer.test.d.ts.map +0 -1
  231. package/dist/libs/send-request/set-request-cookies.test.d.ts +0 -2
  232. package/dist/libs/send-request/set-request-cookies.test.d.ts.map +0 -1
  233. package/dist/libs/string-template.test.d.ts +0 -2
  234. package/dist/libs/string-template.test.d.ts.map +0 -1
  235. package/dist/libs/validate-parameters.test.d.ts +0 -2
  236. package/dist/libs/validate-parameters.test.d.ts.map +0 -1
  237. package/dist/plugins/plugin-manager.test.d.ts +0 -2
  238. package/dist/plugins/plugin-manager.test.d.ts.map +0 -1
  239. package/dist/routes.test.d.ts +0 -2
  240. package/dist/routes.test.d.ts.map +0 -1
  241. package/dist/store/collections.test.d.ts +0 -2
  242. package/dist/store/collections.test.d.ts.map +0 -1
  243. package/dist/store/request.test.d.ts +0 -2
  244. package/dist/store/request.test.d.ts.map +0 -1
  245. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +0 -2
  246. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +0 -1
  247. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +0 -2
  248. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +0 -1
  249. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +0 -2
  250. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +0 -1
  251. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +0 -2
  252. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +0 -1
  253. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +0 -2
  254. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +0 -1
  255. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +0 -2
  256. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +0 -1
  257. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +0 -2
  258. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +0 -1
  259. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +0 -2
  260. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +0 -1
  261. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +0 -2
  262. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +0 -1
  263. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +0 -2
  264. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +0 -1
  265. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +0 -2
  266. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +0 -1
  267. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +0 -2
  268. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +0 -1
  269. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +0 -2
  270. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +0 -1
  271. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +0 -2
  272. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +0 -1
  273. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +0 -2
  274. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +0 -1
  275. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +0 -2
  276. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +0 -1
  277. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +0 -2
  278. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +0 -1
  279. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +0 -2
  280. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +0 -1
  281. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +0 -2
  282. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +0 -1
  283. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +0 -2
  284. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +0 -1
  285. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -45
  286. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
  287. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +0 -2
  288. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +0 -1
  289. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +0 -2
  290. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +0 -1
  291. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +0 -2
  292. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +0 -1
  293. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -29
  294. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
  295. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +0 -29
  296. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +0 -1
  297. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +0 -2
  298. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +0 -1
  299. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +0 -2
  300. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +0 -1
  301. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +0 -2
  302. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +0 -1
  303. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +0 -2
  304. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +0 -1
  305. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +0 -2
  306. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +0 -1
  307. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +0 -2
  308. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +0 -1
  309. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +0 -2
  310. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +0 -1
  311. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +0 -2
  312. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +0 -1
  313. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +0 -2
  314. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +0 -1
  315. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +0 -2
  316. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +0 -1
  317. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +0 -2
  318. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +0 -1
  319. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +0 -2
  320. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +0 -1
  321. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +0 -2
  322. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +0 -1
  323. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +0 -2
  324. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +0 -1
  325. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +0 -2
  326. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +0 -1
  327. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +0 -2
  328. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +0 -1
  329. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +0 -2
  330. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +0 -1
  331. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +0 -2
  332. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +0 -1
  333. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +0 -2
  334. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +0 -1
  335. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +0 -2
  336. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +0 -1
  337. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +0 -2
  338. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +0 -1
  339. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +0 -2
  340. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +0 -1
  341. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +0 -2
  342. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +0 -1
  343. package/dist/v2/components/code-input/CodeInput.test.d.ts +0 -2
  344. package/dist/v2/components/code-input/CodeInput.test.d.ts.map +0 -1
  345. package/dist/v2/components/code-input/code-variable-widget.test.d.ts +0 -2
  346. package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +0 -1
  347. package/dist/v2/components/server/ServerDropdown.test.d.ts +0 -2
  348. package/dist/v2/components/server/ServerDropdown.test.d.ts.map +0 -1
  349. package/dist/v2/components/server/ServerDropdownItem.test.d.ts +0 -2
  350. package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +0 -1
  351. package/dist/v2/features/app/App.test.d.ts +0 -2
  352. package/dist/v2/features/app/App.test.d.ts.map +0 -1
  353. package/dist/v2/features/collection/DocumentCollection.test.d.ts +0 -2
  354. package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +0 -1
  355. package/dist/v2/features/collection/components/Authentication.test.d.ts +0 -2
  356. package/dist/v2/features/collection/components/Authentication.test.d.ts.map +0 -1
  357. package/dist/v2/features/collection/components/Environment.test.d.ts +0 -2
  358. package/dist/v2/features/collection/components/Environment.test.d.ts.map +0 -1
  359. package/dist/v2/features/collection/components/LabelInput.test.d.ts +0 -2
  360. package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +0 -1
  361. package/dist/v2/features/collection/components/Overview.test.d.ts +0 -2
  362. package/dist/v2/features/collection/components/Overview.test.d.ts.map +0 -1
  363. package/dist/v2/features/collection/components/Servers.test.d.ts +0 -2
  364. package/dist/v2/features/collection/components/Servers.test.d.ts.map +0 -1
  365. package/dist/v2/features/collection/components/Settings.test.d.ts +0 -2
  366. package/dist/v2/features/collection/components/Settings.test.d.ts.map +0 -1
  367. package/dist/v2/features/collection/components/Tabs.test.d.ts +0 -2
  368. package/dist/v2/features/collection/components/Tabs.test.d.ts.map +0 -1
  369. package/dist/v2/features/environments/EnvironmentsList.test.d.ts +0 -2
  370. package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +0 -1
  371. package/dist/v2/features/environments/components/Environment.test.d.ts +0 -2
  372. package/dist/v2/features/environments/components/Environment.test.d.ts.map +0 -1
  373. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +0 -2
  374. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +0 -1
  375. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +0 -2
  376. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +0 -1
  377. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +0 -2
  378. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +0 -1
  379. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +0 -2
  380. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +0 -1
  381. package/dist/v2/features/operation/Operation.test.d.ts +0 -2
  382. package/dist/v2/features/operation/Operation.test.d.ts.map +0 -1
  383. package/dist/v2/features/operation/components/Header.test.d.ts +0 -2
  384. package/dist/v2/features/operation/components/Header.test.d.ts.map +0 -1
  385. package/dist/v2/features/operation/components/Header.vue.d.ts.map +0 -1
  386. package/dist/v2/features/operation/components/Header.vue2.js +0 -97
  387. package/dist/v2/features/settings/Settings.test.d.ts +0 -2
  388. package/dist/v2/features/settings/Settings.test.d.ts.map +0 -1
  389. package/dist/v2/hooks/use-document-watcher.test.d.ts +0 -2
  390. package/dist/v2/hooks/use-document-watcher.test.d.ts.map +0 -1
  391. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +0 -2
  392. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +0 -1
  393. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +0 -2
  394. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +0 -1
  395. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +0 -2
  396. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +0 -1
  397. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +0 -2
  398. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +0 -1
  399. package/dist/views/Request/RequestRoot.test.d.ts +0 -2
  400. package/dist/views/Request/RequestRoot.test.d.ts.map +0 -1
  401. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +0 -2
  402. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +0 -1
  403. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +0 -2
  404. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +0 -1
  405. package/dist/views/Request/RequestSection/RequestBody.test.d.ts +0 -2
  406. package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +0 -1
  407. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +0 -2
  408. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +0 -1
  409. package/dist/views/Request/RequestSection/RequestSection.test.d.ts +0 -2
  410. package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +0 -1
  411. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +0 -2
  412. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +0 -1
  413. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +0 -2
  414. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +0 -1
  415. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +0 -2
  416. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +0 -1
  417. package/dist/views/Request/RequestSubpageHeader.test.d.ts +0 -2
  418. package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +0 -1
  419. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +0 -2
  420. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +0 -1
  421. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +0 -2
  422. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +0 -1
  423. package/dist/views/Request/consts/mediaTypes.test.d.ts +0 -2
  424. package/dist/views/Request/consts/mediaTypes.test.d.ts.map +0 -1
  425. package/dist/views/Request/libs/auth.test.d.ts +0 -2
  426. package/dist/views/Request/libs/auth.test.d.ts.map +0 -1
  427. package/dist/views/Request/libs/oauth2.test.d.ts +0 -2
  428. package/dist/views/Request/libs/oauth2.test.d.ts.map +0 -1
  429. package/dist/views/Request/libs/request.test.d.ts +0 -2
  430. package/dist/views/Request/libs/request.test.d.ts.map +0 -1
  431. package/dist/views/Request/libs/watch-mode.test.d.ts +0 -2
  432. package/dist/views/Request/libs/watch-mode.test.d.ts.map +0 -1
  433. package/dist/vitest.setup.d.ts +0 -34
  434. package/dist/vitest.setup.d.ts.map +0 -1
@@ -1,240 +1,262 @@
1
- import { defineComponent as E, ref as T, computed as b, useId as K, watch as N, resolveComponent as H, createBlock as V, openBlock as s, withCtx as S, withDirectives as m, createElementBlock as v, createVNode as i, unref as l, vShow as y, Fragment as I, renderList as P, createCommentVNode as R, resolveDynamicComponent as Q, createElementVNode as F, toDisplayString as L } from "vue";
2
- import { canMethodHaveBody as A, REGEX as C } from "@scalar/oas-utils/helpers";
3
- import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import $ from "../../../../components/SectionFilter.vue.js";
5
- import j from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
6
- import z from "./OperationBody.vue.js";
7
- import f from "./OperationParams.vue.js";
8
- import { groupBy as G } from "../helpers/group-by.js";
9
- import M from "../../scalar-auth-selector-block/components/AuthSelector.vue.js";
10
- const X = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, J = ["for"], W = ["id", "placeholder", "value"], Y = {
1
+ import { defineComponent as L, computed as v, ref as G, useId as V, watch as X, createBlock as U, openBlock as u, unref as t, withCtx as q, withDirectives as h, createElementBlock as x, createVNode as s, vShow as f, Fragment as J, renderList as W, createCommentVNode as K, resolveDynamicComponent as Y, createElementVNode as Z, toDisplayString as ee } from "vue";
2
+ import { ScalarErrorBoundary as te } from "@scalar/components";
3
+ import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
4
+ import { REGEX as oe } from "@scalar/helpers/regex/regex-helpers";
5
+ import { getResolvedRef as C } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import ae from "../../../../components/SectionFilter.vue.js";
7
+ import le from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
8
+ import ne from "./OperationBody.vue.js";
9
+ import B from "./OperationParams.vue.js";
10
+ import { groupBy as re } from "../helpers/group-by.js";
11
+ import de from "../../scalar-auth-selector-block/components/AuthSelector.vue.js";
12
+ const ie = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ue = ["for"], se = ["id", "placeholder", "value"], me = {
11
13
  key: 2,
12
14
  class: "text-c-1 flex h-8 items-center"
13
- }, le = /* @__PURE__ */ E({
15
+ }, Ue = /* @__PURE__ */ L({
14
16
  __name: "OperationBlock",
15
17
  props: {
16
18
  method: {},
17
19
  path: {},
18
20
  operation: {},
21
+ authMeta: {},
19
22
  exampleKey: {},
20
- selectedContentType: {},
21
23
  securitySchemes: {},
22
24
  selectedSecurity: {},
23
25
  security: {},
24
26
  server: {},
25
27
  layout: {},
26
28
  plugins: {},
27
- environment: {},
28
- envVariables: {}
29
+ eventBus: {},
30
+ environment: {}
29
31
  },
30
- emits: ["operation:update:requestName", "auth:delete", "auth:update:securityScheme", "auth:update:selectedScopes", "auth:update:selectedSecurity", "parameters:add", "parameters:update", "parameters:delete", "parameters:deleteAll", "requestBody:update:contentType", "requestBody:update:value", "requestBody:add:formRow", "requestBody:update:formRow"],
31
- setup(o, { emit: g }) {
32
- const a = g, d = G(
33
- o.operation.parameters?.map((r) => h(r)) ?? [],
34
- "in"
35
- ), w = [
32
+ setup(E) {
33
+ const R = E, {
34
+ operation: r,
35
+ method: A,
36
+ layout: k,
37
+ securitySchemes: S,
38
+ path: _,
39
+ exampleKey: d,
40
+ security: P,
41
+ eventBus: l,
42
+ environment: m
43
+ } = R, H = R.authMeta ?? { type: "document" }, n = v(() => ({
44
+ method: A,
45
+ path: _,
46
+ exampleKey: d
47
+ })), p = v(
48
+ () => re(r.parameters?.map((e) => C(e)) ?? [], "in")
49
+ ), O = [
36
50
  "Auth",
37
51
  "Variables",
38
52
  "Cookies",
39
53
  "Headers",
40
54
  "Query",
41
55
  "Body"
42
- ], u = T("All"), B = b(() => {
43
- const r = /* @__PURE__ */ new Set(["All", ...w]);
44
- return d.path?.length || r.delete("Variables"), A(o.method) || r.delete("Body"), q.value && r.delete("Auth"), [...r];
45
- }), n = b(
56
+ ], c = G("All"), b = v(() => {
57
+ const e = /* @__PURE__ */ new Set(["All", ...O]);
58
+ return p.value.path?.length || e.delete("Variables"), w(A) || e.delete("Body"), g.value && e.delete("Auth"), [...e];
59
+ }), i = v(
46
60
  () => Object.fromEntries(
47
- B.value.map((r) => [r, K()])
61
+ b.value.map((e) => [e, V()])
48
62
  )
49
63
  );
50
- N(
51
- () => o.method,
52
- (r) => {
53
- u.value === "Body" && !A(r) && (u.value = "All");
64
+ X(
65
+ () => A,
66
+ (e) => {
67
+ c.value === "Body" && !w(e) && (c.value = "All");
54
68
  }
55
69
  );
56
- const q = b(
57
- () => o.layout === "modal" && !o.operation.security && !Object.keys(o.securitySchemes ?? {}).length
58
- ), D = () => o.operation.summary ? o.operation.summary : o.path.replace(C.PROTOCOL, "") ? o.path.replace(C.PROTOCOL, "") : "Request Name", p = (r) => u.value === "All" || u.value === r, k = K();
59
- return (r, e) => {
60
- const O = H("ScalarErrorBoundary");
61
- return s(), V(j, {
62
- "aria-label": `Request: ${r.operation.summary}`
63
- }, {
64
- title: S(() => [
65
- F("div", X, [
66
- r.layout !== "modal" ? (s(), v("label", {
67
- key: 0,
68
- class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
69
- for: l(k)
70
- }, null, 8, J)) : R("", !0),
71
- r.layout !== "modal" ? (s(), v("input", {
72
- key: 1,
73
- id: l(k),
74
- 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",
75
- placeholder: D(),
76
- value: r.operation.summary,
77
- onInput: e[0] || (e[0] = (t) => a("operation:update:requestName", {
78
- name: t.target.value
79
- }))
80
- }, null, 40, W)) : (s(), v("span", Y, L(r.operation.summary), 1))
81
- ]),
82
- i($, {
83
- modelValue: u.value,
84
- "onUpdate:modelValue": e[1] || (e[1] = (t) => u.value = t),
85
- filterIds: n.value,
86
- filters: B.value
87
- }, null, 8, ["modelValue", "filterIds", "filters"])
70
+ const g = v(
71
+ () => k === "modal" && !r.security && !Object.keys(S ?? {}).length
72
+ ), F = v(() => r.summary ? r.summary : _.replace(oe.PROTOCOL, "") || "Request Name"), y = (e) => c.value === "All" || c.value === e, I = (e) => {
73
+ const a = e.target.value;
74
+ l.emit("operation:update:summary", {
75
+ meta: n.value,
76
+ payload: { summary: a }
77
+ });
78
+ }, o = (e) => ({
79
+ onAdd: (a) => {
80
+ l.emit("operation:add:parameter", {
81
+ type: e,
82
+ payload: {
83
+ key: a.key ?? "",
84
+ value: a.value ?? "",
85
+ isEnabled: !0
86
+ },
87
+ meta: n.value
88
+ });
89
+ },
90
+ onDelete: (a) => {
91
+ l.emit("operation:delete:parameter", {
92
+ type: e,
93
+ index: a.index,
94
+ meta: n.value
95
+ });
96
+ },
97
+ onDeleteAll: () => {
98
+ l.emit("operation:delete-all:parameters", {
99
+ type: e,
100
+ meta: n.value
101
+ });
102
+ },
103
+ onUpdate: (a) => {
104
+ l.emit("operation:update:parameter", {
105
+ type: e,
106
+ index: a.index,
107
+ payload: a.payload,
108
+ meta: n.value
109
+ });
110
+ }
111
+ }), N = (e) => l.emit("operation:add:requestBody:formRow", {
112
+ contentType: e.contentType,
113
+ meta: n.value,
114
+ payload: {
115
+ key: e.data.key ?? "",
116
+ value: e.data.value ?? ""
117
+ }
118
+ }), M = (e) => l.emit("operation:delete:requestBody:formRow", {
119
+ contentType: e.contentType,
120
+ index: e.index,
121
+ meta: n.value
122
+ }), Q = (e) => l.emit("operation:update:requestBody:contentType", {
123
+ payload: { contentType: e.value },
124
+ meta: n.value
125
+ }), $ = (e) => l.emit("operation:update:requestBody:formRow", {
126
+ contentType: e.contentType,
127
+ meta: n.value,
128
+ index: e.index,
129
+ payload: {
130
+ key: e.data.key ?? "",
131
+ value: e.data.value ?? ""
132
+ }
133
+ }), j = (e) => l.emit("operation:update:requestBody:value", {
134
+ contentType: e.contentType,
135
+ payload: { value: e.value ?? "" },
136
+ meta: n.value
137
+ }), T = V();
138
+ return (e, a) => (u(), U(le, {
139
+ "aria-label": `Request: ${t(r).summary}`
140
+ }, {
141
+ title: q(() => [
142
+ Z("div", ie, [
143
+ t(k) !== "modal" ? (u(), x("label", {
144
+ key: 0,
145
+ class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
146
+ for: t(T)
147
+ }, null, 8, ue)) : K("", !0),
148
+ t(k) !== "modal" ? (u(), x("input", {
149
+ key: 1,
150
+ id: t(T),
151
+ 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",
152
+ placeholder: F.value,
153
+ value: t(r).summary,
154
+ onInput: I
155
+ }, null, 40, se)) : (u(), x("span", me, ee(t(r).summary), 1))
88
156
  ]),
89
- default: S(() => [
90
- m(i(l(M), {
91
- id: n.value.Auth,
92
- envVariables: r.envVariables,
93
- environment: r.environment,
94
- layout: "client",
95
- security: r.security,
96
- securitySchemes: r.securitySchemes,
97
- selectedSecurity: r.selectedSecurity,
98
- server: r.server,
99
- title: "Authorization",
100
- onDeleteOperationAuth: e[2] || (e[2] = (t) => a("auth:delete", t)),
101
- "onUpdate:securityScheme": e[3] || (e[3] = (t) => a("auth:update:securityScheme", t)),
102
- "onUpdate:selectedScopes": e[4] || (e[4] = (t) => a("auth:update:selectedScopes", t)),
103
- "onUpdate:selectedSecurity": e[5] || (e[5] = (t) => a("auth:update:selectedSecurity", t))
104
- }, null, 8, ["id", "envVariables", "environment", "security", "securitySchemes", "selectedSecurity", "server"]), [
105
- [y, p("Auth") && !q.value]
106
- ]),
107
- m(i(f, {
108
- id: n.value.Variables,
109
- envVariables: r.envVariables,
110
- environment: r.environment,
111
- exampleKey: r.exampleKey,
112
- parameters: l(d).path ?? [],
113
- title: "Variables",
114
- onAdd: e[6] || (e[6] = (t) => a("parameters:add", {
115
- type: "path",
116
- payload: t
117
- })),
118
- onDelete: e[7] || (e[7] = (t) => a("parameters:delete", {
119
- type: "path",
120
- ...t
121
- })),
122
- onDeleteAll: e[8] || (e[8] = () => a("parameters:deleteAll", {
123
- type: "path"
124
- })),
125
- onUpdate: e[9] || (e[9] = (t) => a("parameters:update", {
126
- type: "path",
127
- ...t
128
- }))
129
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
130
- [y, p("Variables") && l(d).path?.length]
131
- ]),
132
- m(i(f, {
133
- id: n.value.Cookies,
134
- envVariables: r.envVariables,
135
- environment: r.environment,
136
- exampleKey: r.exampleKey,
137
- parameters: l(d).cookie ?? [],
138
- title: "Cookies",
139
- onAdd: e[10] || (e[10] = (t) => a("parameters:add", {
140
- type: "cookie",
141
- payload: t
142
- })),
143
- onDelete: e[11] || (e[11] = (t) => a("parameters:delete", {
144
- type: "cookie",
145
- ...t
146
- })),
147
- onDeleteAll: e[12] || (e[12] = () => a("parameters:deleteAll", {
148
- type: "cookie"
149
- })),
150
- onUpdate: e[13] || (e[13] = (t) => a("parameters:update", {
151
- type: "cookie",
152
- ...t
153
- }))
154
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
155
- [y, p("Cookies")]
156
- ]),
157
- m(i(f, {
158
- id: n.value.Headers,
159
- envVariables: r.envVariables,
160
- environment: r.environment,
161
- exampleKey: r.exampleKey,
162
- parameters: l(d).header ?? [],
163
- title: "Headers",
164
- onAdd: e[14] || (e[14] = (t) => a("parameters:add", {
165
- type: "header",
166
- payload: t
167
- })),
168
- onDelete: e[15] || (e[15] = (t) => a("parameters:delete", {
169
- type: "header",
170
- ...t
171
- })),
172
- onDeleteAll: e[16] || (e[16] = () => a("parameters:deleteAll", {
173
- type: "header"
174
- })),
175
- onUpdate: e[17] || (e[17] = (t) => a("parameters:update", {
176
- type: "header",
177
- ...t
178
- }))
179
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
180
- [y, p("Headers")]
181
- ]),
182
- m(i(f, {
183
- id: n.value.Query,
184
- envVariables: r.envVariables,
185
- environment: r.environment,
186
- exampleKey: r.exampleKey,
187
- parameters: l(d).query ?? [],
188
- title: "Query Parameters",
189
- onAdd: e[18] || (e[18] = (t) => a("parameters:add", {
190
- type: "query",
191
- payload: t
192
- })),
193
- onDelete: e[19] || (e[19] = (t) => a("parameters:delete", {
194
- type: "query",
195
- ...t
196
- })),
197
- onDeleteAll: e[20] || (e[20] = () => a("parameters:deleteAll", {
198
- type: "query"
199
- })),
200
- onUpdate: e[21] || (e[21] = (t) => a("parameters:update", {
201
- type: "query",
202
- ...t
203
- }))
204
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
205
- [y, p("Query")]
206
- ]),
207
- m(i(z, {
208
- id: n.value.Body,
209
- envVariables: r.envVariables,
210
- environment: r.environment,
211
- exampleKey: r.exampleKey,
212
- requestBody: l(h)(r.operation.requestBody),
213
- selectedContentType: r.selectedContentType ?? "other",
214
- title: "Request Body",
215
- "onAdd:formRow": e[22] || (e[22] = (t) => a("requestBody:add:formRow", t)),
216
- "onUpdate:contentType": e[23] || (e[23] = (t) => a("requestBody:update:contentType", t)),
217
- "onUpdate:formRow": e[24] || (e[24] = (t) => a("requestBody:update:formRow", t)),
218
- "onUpdate:value": e[25] || (e[25] = (t) => a("requestBody:update:value", t))
219
- }, null, 8, ["id", "envVariables", "environment", "exampleKey", "requestBody", "selectedContentType"]), [
220
- [y, p("Body") && l(A)(r.method)]
221
- ]),
222
- (s(!0), v(I, null, P(r.plugins, (t, U) => (s(), V(O, { key: U }, {
223
- default: S(() => [
224
- t?.components?.request ? (s(), V(Q(t.components.request), {
225
- key: 0,
226
- operation: r.operation,
227
- selectedExample: r.exampleKey
228
- }, null, 8, ["operation", "selectedExample"])) : R("", !0)
229
- ]),
230
- _: 2
231
- }, 1024))), 128))
157
+ s(ae, {
158
+ modelValue: c.value,
159
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => c.value = D),
160
+ filterIds: i.value,
161
+ filters: b.value
162
+ }, null, 8, ["modelValue", "filterIds", "filters"])
163
+ ]),
164
+ default: q(() => [
165
+ h(s(t(de), {
166
+ id: i.value.Auth,
167
+ environment: t(m),
168
+ eventBus: t(l),
169
+ meta: t(H),
170
+ security: t(P),
171
+ securitySchemes: t(S),
172
+ selectedSecurity: e.selectedSecurity,
173
+ server: e.server,
174
+ title: "Authorization"
175
+ }, null, 8, ["id", "environment", "eventBus", "meta", "security", "securitySchemes", "selectedSecurity", "server"]), [
176
+ [f, y("Auth") && !g.value]
177
+ ]),
178
+ h(s(B, {
179
+ id: i.value.Variables,
180
+ environment: t(m),
181
+ exampleKey: t(d),
182
+ parameters: p.value.path ?? [],
183
+ showAddRowPlaceholder: !1,
184
+ title: "Variables",
185
+ onDelete: o("path").onDelete,
186
+ onDeleteAll: o("path").onDeleteAll,
187
+ onUpdate: o("path").onUpdate
188
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onDelete", "onDeleteAll", "onUpdate"]), [
189
+ [f, y("Variables") && p.value.path?.length]
190
+ ]),
191
+ h(s(B, {
192
+ id: i.value.Cookies,
193
+ environment: t(m),
194
+ exampleKey: t(d),
195
+ parameters: p.value.cookie ?? [],
196
+ showAddRowPlaceholder: !0,
197
+ title: "Cookies",
198
+ onAdd: o("cookie").onAdd,
199
+ onDelete: o("cookie").onDelete,
200
+ onDeleteAll: o("cookie").onDeleteAll,
201
+ onUpdate: o("cookie").onUpdate
202
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
203
+ [f, y("Cookies")]
204
+ ]),
205
+ h(s(B, {
206
+ id: i.value.Headers,
207
+ environment: t(m),
208
+ exampleKey: t(d),
209
+ parameters: p.value.header ?? [],
210
+ title: "Headers",
211
+ onAdd: o("header").onAdd,
212
+ onDelete: o("header").onDelete,
213
+ onDeleteAll: o("header").onDeleteAll,
214
+ onUpdate: o("header").onUpdate
215
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
216
+ [f, y("Headers")]
232
217
  ]),
233
- _: 1
234
- }, 8, ["aria-label"]);
235
- };
218
+ h(s(B, {
219
+ id: i.value.Query,
220
+ environment: t(m),
221
+ exampleKey: t(d),
222
+ parameters: p.value.query ?? [],
223
+ title: "Query Parameters",
224
+ onAdd: o("query").onAdd,
225
+ onDelete: o("query").onDelete,
226
+ onDeleteAll: o("query").onDeleteAll,
227
+ onUpdate: o("query").onUpdate
228
+ }, null, 8, ["id", "environment", "exampleKey", "parameters", "onAdd", "onDelete", "onDeleteAll", "onUpdate"]), [
229
+ [f, y("Query")]
230
+ ]),
231
+ h(s(ne, {
232
+ id: i.value.Body,
233
+ environment: t(m),
234
+ exampleKey: t(d),
235
+ requestBody: t(C)(t(r).requestBody),
236
+ title: "Request Body",
237
+ "onAdd:formRow": N,
238
+ "onDelete:fromRow": M,
239
+ "onUpdate:contentType": Q,
240
+ "onUpdate:formRow": $,
241
+ "onUpdate:value": j
242
+ }, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
243
+ [f, y("Body") && t(w)(t(A))]
244
+ ]),
245
+ (u(!0), x(J, null, W(e.plugins, (D, z) => (u(), U(t(te), { key: z }, {
246
+ default: q(() => [
247
+ D?.components?.request ? (u(), U(Y(D.components.request), {
248
+ key: 0,
249
+ operation: t(r),
250
+ selectedExample: t(d)
251
+ }, null, 8, ["operation", "selectedExample"])) : K("", !0)
252
+ ]),
253
+ _: 2
254
+ }, 1024))), 128))
255
+ ]),
256
+ _: 1
257
+ }, 8, ["aria-label"]));
236
258
  }
237
259
  });
238
260
  export {
239
- le as default
261
+ Ue as default
240
262
  };
@@ -1,29 +1,14 @@
1
- import type { Environment } from '@scalar/oas-utils/entities/environment';
1
+ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
2
  import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
- import type { EnvVariable } from '../../../../store/active-entities.js';
4
3
  type __VLS_Props = {
5
4
  /** Request body */
6
5
  requestBody?: RequestBodyObject;
7
- /** Currently selected content type for the current operation */
8
- selectedContentType: keyof typeof contentTypes | (string & {});
9
6
  /** Currently selected example key for the current operation */
10
7
  exampleKey: string;
11
8
  /** Display title */
12
9
  title: string;
13
- /** TODO: remove when we do the migration */
14
- environment: Environment;
15
- envVariables: EnvVariable[];
16
- };
17
- declare const contentTypes: {
18
- readonly 'multipart/form-data': "Multipart Form";
19
- readonly 'application/x-www-form-urlencoded': "Form URL Encoded";
20
- readonly 'application/octet-stream': "Binary File";
21
- readonly 'application/json': "JSON";
22
- readonly 'application/xml': "XML";
23
- readonly 'application/yaml': "YAML";
24
- readonly 'application/edn': "EDN";
25
- readonly other: "Other";
26
- readonly none: "None";
10
+ /** Selected environment */
11
+ environment: XScalarEnvironment;
27
12
  };
28
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
29
14
  "update:contentType": (payload: {
@@ -31,17 +16,26 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
31
16
  }) => any;
32
17
  "update:value": (payload: {
33
18
  value?: string | File;
19
+ contentType: string;
20
+ }) => any;
21
+ "add:formRow": (payload: {
22
+ data: Partial<{
23
+ key: string;
24
+ value?: string | File;
25
+ }>;
26
+ contentType: string;
34
27
  }) => any;
35
- "add:formRow": (payload: Partial<{
36
- key: string;
37
- value?: string | File;
38
- }>) => any;
39
28
  "update:formRow": (payload: {
40
29
  index: number;
41
- payload: Partial<{
30
+ data: Partial<{
42
31
  key: string;
43
- value?: string | File;
32
+ value: string | File | null;
44
33
  }>;
34
+ contentType: string;
35
+ }) => any;
36
+ "delete:fromRow": (payload: {
37
+ index: number;
38
+ contentType: string;
45
39
  }) => any;
46
40
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
47
41
  "onUpdate:contentType"?: ((payload: {
@@ -49,17 +43,26 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
49
43
  }) => any) | undefined;
50
44
  "onUpdate:value"?: ((payload: {
51
45
  value?: string | File;
46
+ contentType: string;
47
+ }) => any) | undefined;
48
+ "onAdd:formRow"?: ((payload: {
49
+ data: Partial<{
50
+ key: string;
51
+ value?: string | File;
52
+ }>;
53
+ contentType: string;
52
54
  }) => any) | undefined;
53
- "onAdd:formRow"?: ((payload: Partial<{
54
- key: string;
55
- value?: string | File;
56
- }>) => any) | undefined;
57
55
  "onUpdate:formRow"?: ((payload: {
58
56
  index: number;
59
- payload: Partial<{
57
+ data: Partial<{
60
58
  key: string;
61
- value?: string | File;
59
+ value: string | File | null;
62
60
  }>;
61
+ contentType: string;
62
+ }) => any) | undefined;
63
+ "onDelete:fromRow"?: ((payload: {
64
+ index: number;
65
+ contentType: string;
63
66
  }) => any) | undefined;
64
67
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
65
68
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBody.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAUrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,gEAAgE;IAChE,mBAAmB,EAAE,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAC9D,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IAEb,4CAA4C;IAC5C,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;AAoCF,QAAA,MAAM,YAAY;;;;;;;;;;CAUR,CAAA;;;eAnCoC,MAAM;;;gBAEX,MAAM,GAAG,IAAI;;;aAI1B,MAAM;gBAAU,MAAM,GAAG,IAAI;;;eAK5C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;;;;eAZhB,MAAM;;;gBAEX,MAAM,GAAG,IAAI;;;aAI1B,MAAM;gBAAU,MAAM,GAAG,IAAI;;;eAK5C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;;;AA+c9D,wBAOG"}
1
+ {"version":3,"file":"OperationBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBody.vue"],"names":[],"mappings":"AAuVA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAI4C,MAAM;;;gBAI7B,MAAM,GAAG,IAAI;qBAAe,MAAM;;;cAM7C,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;qBACxC,MAAM;;;eAMZ,MAAM;cACP,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;;eAtBvB,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;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;SAAE,CAAC;qBAC9C,MAAM;;;eAGiB,MAAM;qBAAe,MAAM;;;AAyjBrE,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ff76e2a1"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-01b90115"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };