@scalar/api-client 2.6.1 → 2.8.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 (271) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +1 -1
  3. package/dist/analytics.d.ts +2 -18
  4. package/dist/analytics.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +66 -42
  8. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
  11. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  12. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
  13. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  14. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  15. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
  16. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  17. package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
  18. package/dist/hooks/useAnalytics.d.ts +2 -18
  19. package/dist/hooks/useAnalytics.d.ts.map +1 -1
  20. package/dist/hooks/useClientConfig.d.ts +114 -120
  21. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  22. package/dist/hooks/useResponseBody.js +6 -6
  23. package/dist/layouts/App/create-api-client-app.d.ts +1379 -1307
  24. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  25. package/dist/layouts/Modal/create-api-client-modal.d.ts +2754 -2610
  26. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  27. package/dist/layouts/Web/create-api-client-web.d.ts +1379 -1307
  28. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  29. package/dist/libs/create-client.d.ts +1379 -1307
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/find-request.d.ts +17 -17
  32. package/dist/libs/find-request.d.ts.map +1 -1
  33. package/dist/libs/hot-keys.d.ts +1 -1
  34. package/dist/libs/local-storage.d.ts.map +1 -1
  35. package/dist/libs/send-request/build-request-security.d.ts +1 -1
  36. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  37. package/dist/libs/send-request/create-request-operation.d.ts +2 -2
  38. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  39. package/dist/libs/send-request/create-request-operation.js +19 -19
  40. package/dist/libs/send-request/create-request-operation.test.d.ts +82 -82
  41. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  42. package/dist/plugins/plugin-manager.d.ts +3 -3
  43. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  44. package/dist/store/active-entities.d.ts +118 -118
  45. package/dist/store/active-entities.d.ts.map +1 -1
  46. package/dist/store/collections.d.ts +127 -127
  47. package/dist/store/collections.d.ts.map +1 -1
  48. package/dist/store/cookies.d.ts +14 -14
  49. package/dist/store/environment.d.ts +23 -23
  50. package/dist/store/request-example.d.ts +546 -546
  51. package/dist/store/request-example.d.ts.map +1 -1
  52. package/dist/store/requests.d.ts +194 -194
  53. package/dist/store/requests.d.ts.map +1 -1
  54. package/dist/store/security-schemes.d.ts +281 -281
  55. package/dist/store/security-schemes.d.ts.map +1 -1
  56. package/dist/store/servers.d.ts +45 -45
  57. package/dist/store/servers.d.ts.map +1 -1
  58. package/dist/store/store.d.ts +1379 -1307
  59. package/dist/store/store.d.ts.map +1 -1
  60. package/dist/store/store.js +18 -18
  61. package/dist/store/tags.d.ts +35 -35
  62. package/dist/store/tags.d.ts.map +1 -1
  63. package/dist/store/workspace.d.ts +47 -47
  64. package/dist/store/workspace.d.ts.map +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  67. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
  68. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +2 -0
  69. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +1 -0
  70. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts +25 -0
  71. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts.map +1 -0
  72. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +30 -0
  73. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +4 -0
  74. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  75. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +3 -3
  76. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +104 -98
  77. package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +16 -14
  78. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +31 -2
  79. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +6 -1
  80. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  81. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +198 -131
  82. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +2 -0
  83. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +1 -0
  84. package/dist/v2/blocks/operation-code-sample/index.d.ts +4 -1
  85. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  86. package/dist/v2/blocks/operation-code-sample/index.js +10 -4
  87. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  89. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
  90. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -6
  91. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  92. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
  93. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
  94. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
  95. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
  96. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
  97. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
  98. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
  99. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
  100. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
  101. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
  102. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
  103. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
  104. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
  105. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
  106. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
  107. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
  108. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
  109. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
  110. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
  111. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
  112. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
  113. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
  114. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
  115. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
  116. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
  117. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
  118. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
  119. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
  120. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
  121. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
  123. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
  124. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
  125. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
  126. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
  127. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
  128. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
  129. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
  131. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
  132. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
  133. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
  134. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
  135. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
  137. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
  138. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
  139. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
  140. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
  141. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
  142. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
  143. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
  144. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
  145. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
  147. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
  148. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
  149. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
  150. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
  151. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
  152. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
  153. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
  154. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
  155. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
  156. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
  157. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
  158. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
  159. package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
  160. package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
  161. package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
  162. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
  163. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
  164. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
  165. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
  166. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
  167. package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
  168. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
  169. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
  170. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
  171. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
  172. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
  173. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
  174. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
  175. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
  176. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
  177. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
  178. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
  179. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
  180. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
  181. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
  182. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
  183. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
  184. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
  185. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
  186. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
  187. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
  188. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
  189. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
  190. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
  191. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
  192. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
  193. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
  194. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
  195. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
  196. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
  197. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
  198. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
  199. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
  200. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
  201. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
  202. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
  203. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
  204. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
  205. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
  206. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
  207. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
  208. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
  209. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
  210. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
  211. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
  212. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
  213. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
  214. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
  215. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
  216. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
  217. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
  218. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
  219. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
  220. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
  221. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
  222. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  223. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
  224. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
  225. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
  226. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
  227. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
  228. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
  229. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
  230. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
  231. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
  232. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
  233. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
  234. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
  235. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
  236. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
  237. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
  238. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
  239. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
  240. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
  241. package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
  242. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
  243. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
  244. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
  245. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
  246. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
  247. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
  248. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
  249. package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
  250. package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
  251. package/dist/v2/blocks/scalar-response-block/index.js +4 -0
  252. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +54 -54
  253. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  254. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  255. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
  256. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +54 -54
  257. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  258. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  259. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  260. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
  261. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  262. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  263. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
  264. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  265. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  266. package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
  267. package/dist/views/Request/libs/auth.d.ts +2 -2
  268. package/dist/views/Request/libs/watch-mode.d.ts +4 -4
  269. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
  270. package/dist/views/Request/libs/watch-mode.js +241 -186
  271. package/package.json +21 -16
@@ -1,8 +1,10 @@
1
- import { isDefined as x } from "@scalar/helpers/array/is-defined";
2
- import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- const N = 10, A = 10, E = "propertyName*", O = (/* @__PURE__ */ new Date()).toISOString(), S = O.split("T")[0], R = O.split("T")[1].split(".")[0], T = {
4
- "date-time": O,
5
- date: S,
1
+ import { isDefined as v } from "@scalar/helpers/array/is-defined";
2
+ import { getRaw as S } from "@scalar/json-magic/magic-proxy";
3
+ import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { unpackOverridesProxy as N } from "@scalar/workspace-store/helpers/overrides-proxy";
5
+ const T = 10, j = 10, D = "propertyName*", A = (/* @__PURE__ */ new Date()).toISOString(), q = A.split("T")[0], k = A.split("T")[1].split(".")[0], I = {
6
+ "date-time": A,
7
+ date: q,
6
8
  email: "hello@example.com",
7
9
  hostname: "example.com",
8
10
  // https://tools.ietf.org/html/rfc6531#section-3.3
@@ -20,190 +22,255 @@ const N = 10, A = 10, E = "propertyName*", O = (/* @__PURE__ */ new Date()).toIS
20
22
  // https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01
21
23
  "relative-json-pointer": "1/nested/objects",
22
24
  // full-time in https://tools.ietf.org/html/rfc3339#section-5.6
23
- time: R,
25
+ time: k,
24
26
  // either a URI or relative-reference https://tools.ietf.org/html/rfc3986#section-4.1
25
27
  "uri-reference": "../folder",
26
28
  "uri-template": "https://example.com/{id}",
27
29
  uri: "https://example.com",
28
30
  uuid: "123e4567-e89b-12d3-a456-426614174000",
29
31
  "object-id": "6592008029c8c3e4dc76256c"
30
- }, v = (t, r = !1, o = "") => "type" in t && t.type === "string" && "format" in t && t.format === "binary" ? new File([""], "filename") : r && "format" in t && t.format ? T[t.format] ?? o : o, g = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), D = (t) => {
31
- if (!t)
32
+ }, E = (e, r = !1, l = "") => "type" in e && e.type === "string" && "format" in e && e.format === "binary" ? new File([""], "filename") : r && "format" in e && e.format ? I[e.format] ?? l : l, O = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), M = (e) => {
33
+ if (!e)
32
34
  return;
33
- const r = j.get(t);
35
+ const r = P.get(e);
34
36
  if (r)
35
37
  return r;
36
- if ("required" in t) {
37
- const o = t.required;
38
- if (Array.isArray(o) && o.length > 0) {
39
- const i = new Set(o);
40
- return j.set(t, i), i;
38
+ if ("required" in e) {
39
+ const l = e.required;
40
+ if (Array.isArray(l) && l.length > 0) {
41
+ const a = new Set(l);
42
+ return P.set(e, a), a;
41
43
  }
42
44
  }
43
- }, p = (t, r) => (typeof r != "object" || r === null || g.set(t, r), r), q = (t) => !!(t.allOf || t.oneOf || t.anyOf), w = (t, r, o, i) => {
44
- if (i?.omitEmptyAndOptionalProperties !== !0 || "type" in t && (t.type === "object" || t.type === "array") || q(t) || "examples" in t && Array.isArray(t.examples) && t.examples.length > 0 || "example" in t && t.example !== void 0 || "default" in t && t.default !== void 0 || "const" in t && t.const !== void 0 || "enum" in t && Array.isArray(t.enum) && t.enum.length > 0)
45
+ }, d = (e, r) => (typeof r != "object" || r === null || O.set(S(N(e)), r), r), _ = (e) => !!(e.allOf || e.oneOf || e.anyOf), C = (e, r, l, a) => {
46
+ if (a?.omitEmptyAndOptionalProperties !== !0 || "type" in e && (e.type === "object" || e.type === "array") || _(e) || "examples" in e && Array.isArray(e.examples) && e.examples.length > 0 || "example" in e && e.example !== void 0 || "default" in e && e.default !== void 0 || "const" in e && e.const !== void 0 || "enum" in e && Array.isArray(e.enum) && e.enum.length > 0)
45
47
  return !1;
46
- const e = o ?? t.title ?? "", u = D(r);
47
- return !(u ? u.has(e) : !1);
48
- }, P = (t, r) => Array.isArray(t) && Array.isArray(r) ? [...t, ...r] : t && typeof t == "object" && r && typeof r == "object" ? { ...t, ...r } : r, I = (t, r, o) => {
49
- const i = {};
50
- if ("properties" in t && t.properties) {
51
- const n = Object.keys(t.properties), e = o > 3 ? Math.min(A, n.length) : n.length;
52
- for (let u = 0; u < e; u++) {
53
- const s = n[u], a = l(t.properties[s]);
54
- if (!a)
48
+ const o = l ?? e.title ?? "", i = M(r);
49
+ return !(i ? i.has(o) : !1);
50
+ }, R = (e, r) => Array.isArray(e) && Array.isArray(r) ? [...e, ...r] : e && typeof e == "object" && r && typeof r == "object" ? { ...e, ...r } : r, F = (e, r, l, a) => {
51
+ const n = {};
52
+ if ("properties" in e && e.properties) {
53
+ const o = Object.keys(e.properties), i = l > 3 ? Math.min(j, o.length) : o.length;
54
+ for (let t = 0; t < i; t++) {
55
+ const p = o[t], u = m(e.properties[p]);
56
+ if (!u)
55
57
  continue;
56
- const y = r?.xml && "xml" in a ? a.xml?.name : void 0, f = d(a, r, o + 1, t, s);
57
- typeof f < "u" && (i[y ?? s] = f);
58
+ const c = r?.xml && "xml" in u ? u.xml?.name : void 0, y = s(u, r, {
59
+ level: l + 1,
60
+ parentSchema: e,
61
+ name: p,
62
+ seen: a
63
+ });
64
+ typeof y < "u" && (n[c ?? p] = y);
58
65
  }
59
- o > 3 && n.length > A && (i["..."] = "[Additional Properties Truncated]");
66
+ l > 3 && o.length > j && (n["..."] = "[Additional Properties Truncated]");
60
67
  }
61
- if ("patternProperties" in t && t.patternProperties)
62
- for (const n of Object.keys(t.patternProperties)) {
63
- const e = l(t.patternProperties[n]);
64
- e && (i[n] = d(e, r, o + 1, t, n));
68
+ if ("patternProperties" in e && e.patternProperties)
69
+ for (const o of Object.keys(e.patternProperties)) {
70
+ const i = m(e.patternProperties[o]);
71
+ i && (n[o] = s(i, r, {
72
+ level: l + 1,
73
+ parentSchema: e,
74
+ name: o,
75
+ seen: a
76
+ }));
65
77
  }
66
- if ("additionalProperties" in t && t.additionalProperties !== void 0) {
67
- const n = l(t.additionalProperties), e = t.additionalProperties === !0 || typeof t.additionalProperties == "object" && Object.keys(t.additionalProperties).length === 0, u = typeof n == "object" && "x-additionalPropertiesName" in n && typeof n["x-additionalPropertiesName"] == "string" && n["x-additionalPropertiesName"].trim().length > 0 ? `${n["x-additionalPropertiesName"].trim()}*` : E;
68
- i[u] = e ? "anything" : typeof n == "object" ? d(n, r, o + 1) : "anything";
78
+ if ("additionalProperties" in e && e.additionalProperties) {
79
+ const o = m(e.additionalProperties), i = e.additionalProperties === !0 || typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length === 0, t = typeof o == "object" && "x-additionalPropertiesName" in o && typeof o["x-additionalPropertiesName"] == "string" && o["x-additionalPropertiesName"].trim().length > 0 ? `${o["x-additionalPropertiesName"].trim()}*` : D;
80
+ n[t] = i ? "anything" : typeof o == "object" ? s(o, r, {
81
+ level: l + 1,
82
+ seen: a
83
+ }) : "anything";
69
84
  }
70
- if (t.oneOf?.[0])
71
- Object.assign(i, d(l(t.oneOf[0]), r, o + 1));
72
- else if (t.anyOf?.[0])
73
- Object.assign(i, d(l(t.anyOf[0]), r, o + 1));
74
- else if (Array.isArray(t.allOf) && t.allOf.length > 0) {
75
- let n = i;
76
- for (const e of t.allOf) {
77
- const u = d(l(e), r, o + 1, t);
78
- n = P(n, u);
85
+ if (e.oneOf?.[0])
86
+ Object.assign(
87
+ n,
88
+ s(m(e.oneOf[0]), r, {
89
+ level: l + 1,
90
+ seen: a
91
+ })
92
+ );
93
+ else if (e.anyOf?.[0])
94
+ Object.assign(
95
+ n,
96
+ s(m(e.anyOf[0]), r, {
97
+ level: l + 1,
98
+ seen: a
99
+ })
100
+ );
101
+ else if (Array.isArray(e.allOf) && e.allOf.length > 0) {
102
+ let o = n;
103
+ for (const i of e.allOf) {
104
+ const t = s(m(i), r, {
105
+ level: l + 1,
106
+ parentSchema: e,
107
+ seen: a
108
+ });
109
+ o = R(o, t);
79
110
  }
80
- n && typeof n == "object" && Object.assign(i, n);
111
+ o && typeof o == "object" && Object.assign(n, o);
81
112
  }
82
- if (r?.xml && "xml" in t && t.xml?.name && o === 0) {
83
- const n = {};
84
- return n[t.xml.name] = i, p(t, n);
113
+ if (r?.xml && "xml" in e && e.xml?.name && l === 0) {
114
+ const o = {};
115
+ return o[e.xml.name] = n, d(e, o);
85
116
  }
86
- return p(t, i);
87
- }, M = (t, r, o) => {
88
- const i = "items" in t ? l(t.items) : void 0, n = i && typeof i == "object" && "xml" in i ? i.xml?.name : void 0, e = !!(r?.xml && "xml" in t && t.xml?.wrapped && n);
89
- if (t.example !== void 0)
90
- return p(t, e ? { [n]: t.example } : t.example);
91
- if (i && typeof i == "object") {
92
- if (Array.isArray(i.allOf) && i.allOf.length > 0) {
93
- const y = i.allOf.filter(x), f = l(y[0]);
94
- if (f && typeof f == "object" && "type" in f && f.type === "object") {
95
- const c = d({ type: "object", allOf: y }, r, o + 1, t);
96
- return p(t, e ? [{ [n]: c }] : [c]);
117
+ return d(e, n);
118
+ }, L = (e, r, l, a) => {
119
+ const n = "items" in e ? m(e.items) : void 0, o = n && typeof n == "object" && "xml" in n ? n.xml?.name : void 0, i = !!(r?.xml && "xml" in e && e.xml?.wrapped && o);
120
+ if (e.example !== void 0)
121
+ return d(e, i ? { [o]: e.example } : e.example);
122
+ if (n && typeof n == "object") {
123
+ if (Array.isArray(n.allOf) && n.allOf.length > 0) {
124
+ const c = n.allOf.filter(v), y = m(c[0]);
125
+ if (y && typeof y == "object" && "type" in y && y.type === "object") {
126
+ const x = s({ type: "object", allOf: c }, r, {
127
+ level: l + 1,
128
+ parentSchema: e,
129
+ seen: a
130
+ });
131
+ return d(e, i ? [{ [o]: x }] : [x]);
97
132
  }
98
- const m = y.map((b) => d(l(b), r, o + 1, t)).filter(x);
99
- return p(
100
- t,
101
- e ? m.map((b) => ({ [n]: b })) : m
133
+ const g = c.map(
134
+ (f) => s(m(f), r, {
135
+ level: l + 1,
136
+ parentSchema: e,
137
+ seen: a
138
+ })
139
+ ).filter(v);
140
+ return d(
141
+ e,
142
+ i ? g.map((f) => ({ [o]: f })) : g
102
143
  );
103
144
  }
104
- const a = i.anyOf || i.oneOf;
105
- if (a && a.length > 0) {
106
- const y = a[0], f = d(l(y), r, o + 1, t);
107
- return p(t, e ? [{ [n]: f }] : [f]);
145
+ const u = n.anyOf || n.oneOf;
146
+ if (u && u.length > 0) {
147
+ const c = u[0], y = s(m(c), r, {
148
+ level: l + 1,
149
+ parentSchema: e,
150
+ seen: a
151
+ });
152
+ return d(e, i ? [{ [o]: y }] : [y]);
108
153
  }
109
154
  }
110
- const u = i && typeof i == "object" && ("type" in i && i.type === "object" || "properties" in i), s = i && typeof i == "object" && ("type" in i && i.type === "array" || "items" in i);
111
- if (i && typeof i == "object" && ("type" in i && i.type || u || s)) {
112
- const a = d(i, r, o + 1);
113
- return p(t, e ? [{ [n]: a }] : [a]);
155
+ const t = n && typeof n == "object" && ("type" in n && n.type === "object" || "properties" in n), p = n && typeof n == "object" && ("type" in n && n.type === "array" || "items" in n);
156
+ if (n && typeof n == "object" && ("type" in n && n.type || t || p)) {
157
+ const u = s(n, r, {
158
+ level: l + 1,
159
+ seen: a
160
+ });
161
+ return d(e, i ? [{ [o]: u }] : [u]);
114
162
  }
115
- return p(t, []);
116
- }, _ = (t, r, o) => {
117
- if ("type" in t && t.type && !Array.isArray(t.type))
118
- switch (t.type) {
163
+ return d(e, []);
164
+ }, X = (e, r, l) => {
165
+ if ("type" in e && e.type && !Array.isArray(e.type))
166
+ switch (e.type) {
119
167
  case "string":
120
- return v(t, r, o ?? "");
168
+ return E(e, r, l ?? "");
121
169
  case "boolean":
122
170
  return !0;
123
171
  case "integer":
124
- return "minimum" in t && typeof t.minimum == "number" ? t.minimum : 1;
172
+ return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
125
173
  case "number":
126
- return "minimum" in t && typeof t.minimum == "number" ? t.minimum : 1;
174
+ return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
127
175
  case "array":
128
176
  return [];
129
177
  default:
130
178
  return;
131
179
  }
132
- }, k = (t, r, o) => {
133
- if ("type" in t && Array.isArray(t.type)) {
134
- if (t.type.includes("null"))
180
+ }, U = (e, r, l) => {
181
+ if ("type" in e && Array.isArray(e.type)) {
182
+ if (e.type.includes("null"))
135
183
  return null;
136
- const i = t.type[0];
137
- if (i)
138
- switch (i) {
184
+ const a = e.type[0];
185
+ if (a)
186
+ switch (a) {
139
187
  case "string":
140
- return v(t, r, o ?? "");
188
+ return E(e, r, l ?? "");
141
189
  case "boolean":
142
190
  return !0;
143
191
  case "integer":
144
- return "minimum" in t && typeof t.minimum == "number" ? t.minimum : 1;
192
+ return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
145
193
  case "number":
146
- return "minimum" in t && typeof t.minimum == "number" ? t.minimum : 1;
194
+ return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
147
195
  case "null":
148
196
  return null;
149
197
  default:
150
198
  return;
151
199
  }
152
200
  }
153
- }, d = (t, r, o = 0, i, n) => {
154
- const e = l(t);
155
- if (!x(e))
201
+ }, s = (e, r, l) => {
202
+ const { level: a = 0, parentSchema: n, name: o, seen: i = /* @__PURE__ */ new WeakSet() } = l ?? {}, t = m(e);
203
+ if (!v(t))
156
204
  return;
157
- if (g.has(e))
158
- return g.get(e);
159
- if (o > N)
160
- return "[Max Depth Exceeded]";
205
+ const p = S(N(t));
206
+ if (i.has(p))
207
+ return "[Circular Reference]";
208
+ if (i.add(p), O.has(p))
209
+ return i.delete(p), O.get(p);
210
+ if (a > T)
211
+ return i.delete(p), "[Max Depth Exceeded]";
161
212
  const u = !!r?.emptyString;
162
- if (e.deprecated || r?.mode === "write" && e.readOnly || r?.mode === "read" && e.writeOnly || w(e, i, n, r))
213
+ if (t.deprecated || r?.mode === "write" && t.readOnly || r?.mode === "read" && t.writeOnly || C(t, n, o, r)) {
214
+ i.delete(p);
163
215
  return;
164
- if ("x-variable" in e && e["x-variable"]) {
165
- const f = r?.variables?.[e["x-variable"]];
216
+ }
217
+ if ("x-variable" in t && t["x-variable"]) {
218
+ const f = r?.variables?.[t["x-variable"]];
166
219
  if (f !== void 0)
167
- return "type" in e && (e.type === "number" || e.type === "integer") ? p(e, Number(f)) : p(e, f);
220
+ return "type" in t && (t.type === "number" || t.type === "integer") ? (i.delete(p), d(t, Number(f))) : (i.delete(p), d(t, f));
168
221
  }
169
- if (Array.isArray(e.examples) && e.examples.length > 0)
170
- return p(e, e.examples[0]);
171
- if (e.example !== void 0)
172
- return p(e, e.example);
173
- if (e.default !== void 0)
174
- return p(e, e.default);
175
- if (e.const !== void 0)
176
- return p(e, e.const);
177
- if (Array.isArray(e.enum) && e.enum.length > 0)
178
- return p(e, e.enum[0]);
179
- if ("properties" in e || "type" in e && e.type === "object")
180
- return I(t, r, o);
181
- if ("type" in e && e.type === "array" || "items" in e)
182
- return M(e, r, o);
183
- const s = _(e, u, r?.emptyString);
184
- if (s !== void 0)
185
- return p(e, s);
186
- const a = e.oneOf || e.anyOf;
187
- if (Array.isArray(a) && a.length > 0) {
188
- for (const f of a) {
189
- const m = l(f);
190
- if (m && (!("type" in m) || m.type !== "null"))
191
- return p(e, d(m, r, o + 1));
222
+ if (Array.isArray(t.examples) && t.examples.length > 0)
223
+ return i.delete(p), d(t, t.examples[0]);
224
+ if (t.example !== void 0)
225
+ return i.delete(p), d(t, t.example);
226
+ if (t.default !== void 0)
227
+ return i.delete(p), d(t, t.default);
228
+ if (t.const !== void 0)
229
+ return i.delete(p), d(t, t.const);
230
+ if (Array.isArray(t.enum) && t.enum.length > 0)
231
+ return i.delete(p), d(t, t.enum[0]);
232
+ if ("properties" in t || "type" in t && t.type === "object") {
233
+ const f = F(t, r, a, i);
234
+ return i.delete(p), f;
235
+ }
236
+ if ("type" in t && t.type === "array" || "items" in t) {
237
+ const f = L(t, r, a, i);
238
+ return i.delete(p), f;
239
+ }
240
+ const c = X(t, u, r?.emptyString);
241
+ if (c !== void 0)
242
+ return i.delete(p), d(t, c);
243
+ const y = t.oneOf || t.anyOf;
244
+ if (Array.isArray(y) && y.length > 0) {
245
+ for (const f of y) {
246
+ const x = m(f);
247
+ if (x && (!("type" in x) || x.type !== "null"))
248
+ return i.delete(p), d(
249
+ t,
250
+ s(x, r, {
251
+ level: a + 1,
252
+ seen: i
253
+ })
254
+ );
192
255
  }
193
- return p(e, null);
256
+ return i.delete(p), d(t, null);
194
257
  }
195
- if (Array.isArray(e.allOf) && e.allOf.length > 0) {
258
+ if (Array.isArray(t.allOf) && t.allOf.length > 0) {
196
259
  let f;
197
- const m = e.allOf;
198
- for (const b of m) {
199
- const c = d(b, r, o + 1, e);
200
- f === void 0 ? f = c : f && typeof f == "object" && c && typeof c == "object" ? f = P(f, c) : c !== void 0 && (f = c);
260
+ const x = t.allOf;
261
+ for (const w of x) {
262
+ const b = s(w, r, {
263
+ level: a + 1,
264
+ parentSchema: t,
265
+ seen: i
266
+ });
267
+ f === void 0 ? f = b : f && typeof f == "object" && b && typeof b == "object" ? f = R(f, b) : b !== void 0 && (f = b);
201
268
  }
202
- return p(e, f ?? null);
269
+ return i.delete(p), d(t, f ?? null);
203
270
  }
204
- const y = k(e, u, r?.emptyString);
205
- return y !== void 0 ? p(e, y) : p(e, null);
271
+ const g = U(t, u, r?.emptyString);
272
+ return g !== void 0 ? (i.delete(p), d(t, g)) : (i.delete(p), d(t, null));
206
273
  };
207
274
  export {
208
- d as getExampleFromSchema
275
+ s as getExampleFromSchema
209
276
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=operation-to-har.bench.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-to-har.bench.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.ts"],"names":[],"mappings":""}
@@ -1,3 +1,6 @@
1
- export { default as RequestExample } from './components/OperationCodeSample.vue.js';
2
1
  export { default as ExamplePicker } from './components/ExamplePicker.vue.js';
2
+ export { default as OperationCodeSample } from './components/OperationCodeSample.vue.js';
3
+ export { DEFAULT_CLIENT, findClient, isClient } from './helpers/find-client.js';
4
+ export { generateClientOptions } from './helpers/generate-client-options.js';
5
+ export type { ClientOption, ClientOptionGroup } from './types';
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,6 +1,12 @@
1
- import { default as r } from "./components/OperationCodeSample.vue.js";
2
- import { default as f } from "./components/ExamplePicker.vue.js";
1
+ import { default as o } from "./components/ExamplePicker.vue.js";
2
+ import { default as a } from "./components/OperationCodeSample.vue.js";
3
+ import { DEFAULT_CLIENT as p, findClient as f, isClient as l } from "./helpers/find-client.js";
4
+ import { generateClientOptions as m } from "./helpers/generate-client-options.js";
3
5
  export {
4
- f as ExamplePicker,
5
- r as RequestExample
6
+ p as DEFAULT_CLIENT,
7
+ o as ExamplePicker,
8
+ a as OperationCodeSample,
9
+ f as findClient,
10
+ m as generateClientOptions,
11
+ l as isClient
6
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAyWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IAC7C,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;;;;;YAiBiB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;;YANjB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;AA4epC,wBAQG"}
1
+ {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAwWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IAC7C,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;;;;;YAiBiB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;;YANjB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;AA2epC,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AuthSelector.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a3aa1264"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9df56497"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as h, Fragment as k, createTextVNode as C, toDisplayString as v, withModifiers as U, normalizeClass as j } from "vue";
2
- import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as W } from "@scalar/components";
3
- import { ScalarIconCaretDown as G, ScalarIconTrash as H } from "@scalar/icons";
1
+ import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as v, Fragment as k, createTextVNode as C, toDisplayString as h, withModifiers as U, normalizeClass as j } from "vue";
2
+ import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as G } from "@scalar/components";
3
+ import { ScalarIconCaretDown as H, ScalarIconTrash as J } from "@scalar/icons";
4
4
  import { isDefined as B } from "@scalar/oas-utils/helpers";
5
- import { getResolvedRef as J } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
- import K from "./DeleteRequestAuthModal.vue.js";
7
- import { formatComplexScheme as Q, formatScheme as X, getSecuritySchemeOptions as Y } from "../helpers/security-scheme.js";
5
+ import { getResolvedRef as K } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import Q from "./DeleteRequestAuthModal.vue.js";
7
+ import { formatComplexScheme as W, formatScheme as X, getSecuritySchemeOptions as Y } from "../helpers/security-scheme.js";
8
8
  import Z from "./RequestAuthDataTable.vue.js";
9
9
  import _ from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
10
10
  import { useLayout as ee } from "../../../../hooks/useLayout.js";
@@ -22,7 +22,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
22
22
  },
23
23
  emits: ["deleteOperationAuth", "update:securityScheme", "update:selectedScopes", "update:selectedSecurity"],
24
24
  setup(n, { expose: I, emit: T }) {
25
- const d = T, { layout: O } = ee(), V = N(), A = b(null), p = z(), a = b(null), D = b(!1), y = S(() => {
25
+ const d = T, { layout: O } = ee(), V = N(), w = b(null), p = z(), a = b(null), A = b(!1), y = S(() => {
26
26
  if (!n.security?.length)
27
27
  return null;
28
28
  const e = !n.security.some(
@@ -32,26 +32,26 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
32
32
  }), s = S(() => n.selectedSecurity?.length ? n.selectedSecurity.map((t) => {
33
33
  const e = Object.keys(t);
34
34
  if (e.length > 1)
35
- return Q(t);
35
+ return W(t);
36
36
  const l = e[0];
37
37
  if (!l)
38
38
  return;
39
- const c = J(n.securitySchemes?.[l]);
39
+ const c = K(n.securitySchemes?.[l]);
40
40
  if (c)
41
41
  return X({ name: l, type: c.type, value: { [l]: [] } });
42
42
  }).filter(B) : []);
43
- function R({
43
+ function D({
44
44
  label: t,
45
45
  value: e
46
46
  }) {
47
47
  a.value = { label: t, payload: e }, p.show();
48
48
  }
49
- const w = S(() => Y(
49
+ const R = S(() => Y(
50
50
  n.security ?? [],
51
51
  n.securitySchemes ?? {},
52
52
  O === "modal" || n.layout === "reference"
53
53
  )), $ = (t) => {
54
- D.value && t.stopPropagation(), A.value?.$el.click();
54
+ A.value && t.stopPropagation(), w.value?.$el.click();
55
55
  }, q = (t) => {
56
56
  d("update:selectedSecurity", {
57
57
  value: t.map((e) => e.value),
@@ -63,25 +63,25 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
63
63
  return I({
64
64
  authIndicator: y,
65
65
  selectedSchemeOptions: s,
66
- schemeOptions: w
66
+ schemeOptions: R
67
67
  }), (t, e) => (r(), x(o(_), {
68
68
  class: "group/params relative",
69
69
  itemCount: s.value.length,
70
70
  layout: t.layout,
71
- "onUpdate:modelValue": e[3] || (e[3] = (l) => D.value = l)
71
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => A.value = l)
72
72
  }, {
73
73
  title: u(() => [
74
74
  i("div", {
75
75
  id: o(V),
76
76
  class: "inline-flex items-center gap-0.5 leading-[20px]"
77
77
  }, [
78
- i("span", null, v(t.title), 1),
79
- y.value ? (r(), h("span", {
78
+ i("span", null, h(t.title), 1),
79
+ y.value ? (r(), v("span", {
80
80
  key: 0,
81
81
  class: j(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": y.value.text === "Required" }]),
82
82
  "data-testid": "auth-indicator",
83
83
  onClick: $
84
- }, v(y.value.text), 3)) : g("", !0)
84
+ }, h(y.value.text), 3)) : g("", !0)
85
85
  ], 8, te)
86
86
  ]),
87
87
  actions: u(() => [
@@ -90,10 +90,10 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
90
90
  class: "w-72 text-xs",
91
91
  modelValue: s.value,
92
92
  multiple: "",
93
- options: w.value,
93
+ options: R.value,
94
94
  placement: "bottom-end",
95
95
  teleport: "",
96
- onDelete: R,
96
+ onDelete: D,
97
97
  "onUpdate:modelValue": q
98
98
  }, {
99
99
  option: u(({ option: l, selected: c }) => [
@@ -101,37 +101,36 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
101
101
  multiselect: "",
102
102
  selected: c
103
103
  }, null, 8, ["selected"]),
104
- i("div", oe, v(l.label), 1),
105
- l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(W), {
104
+ i("div", oe, h(l.label), 1),
105
+ l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(G), {
106
106
  key: 0,
107
107
  class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
108
- icon: o(H),
108
+ icon: o(J),
109
109
  label: `Delete ${l.label}`,
110
110
  size: "xs",
111
- onClick: U((f) => R(l), ["stop"])
111
+ onClick: U((f) => D(l), ["stop"])
112
112
  }, null, 8, ["icon", "label", "onClick"])) : g("", !0)
113
113
  ]),
114
114
  default: u(() => [
115
115
  m(o(F), {
116
116
  ref_key: "comboboxButtonRef",
117
- ref: A,
117
+ ref: w,
118
118
  "aria-describedby": o(V),
119
- class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
120
- fullWidth: "",
119
+ class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
121
120
  variant: "ghost"
122
121
  }, {
123
122
  default: u(() => [
124
- s.value.length === 1 ? (r(), h(k, { key: 0 }, [
123
+ s.value.length === 1 ? (r(), v(k, { key: 0 }, [
125
124
  e[4] || (e[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
126
- C(" " + v(s.value[0]?.label), 1)
127
- ], 64)) : s.value.length > 1 ? (r(), h(k, { key: 1 }, [
125
+ C(" " + h(s.value[0]?.label), 1)
126
+ ], 64)) : s.value.length > 1 ? (r(), v(k, { key: 1 }, [
128
127
  e[5] || (e[5] = C(" Multiple ")),
129
128
  e[6] || (e[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
130
- ], 64)) : (r(), h(k, { key: 2 }, [
129
+ ], 64)) : (r(), v(k, { key: 2 }, [
131
130
  e[7] || (e[7] = i("span", { class: "sr-only" }, "Select", -1)),
132
131
  e[8] || (e[8] = C(" Auth Type "))
133
132
  ], 64)),
134
- m(o(G), {
133
+ m(o(H), {
135
134
  class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
136
135
  weight: "bold"
137
136
  })
@@ -154,7 +153,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
154
153
  "onUpdate:securityScheme": e[0] || (e[0] = (l) => d("update:securityScheme", l)),
155
154
  "onUpdate:selectedScopes": e[1] || (e[1] = (l) => d("update:selectedScopes", l))
156
155
  }, null, 8, ["envVariables", "environment", "layout", "securitySchemes", "selectedSchemeOptions", "server"]),
157
- a.value ? (r(), x(K, {
156
+ a.value ? (r(), x(Q, {
158
157
  key: 0,
159
158
  label: a.value.label,
160
159
  scheme: a.value,