@scalar/api-client 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +1 -1
  3. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -4
  4. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  5. package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
  8. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  9. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  10. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
  11. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  12. package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
  13. package/dist/hooks/useClientConfig.d.ts +36 -42
  14. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  15. package/dist/hooks/useResponseBody.js +6 -6
  16. package/dist/layouts/App/create-api-client-app.d.ts +36 -36
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +72 -72
  18. package/dist/layouts/Web/create-api-client-web.d.ts +36 -36
  19. package/dist/libs/create-client.d.ts +39 -39
  20. package/dist/libs/create-client.d.ts.map +1 -1
  21. package/dist/libs/create-client.js +23 -23
  22. package/dist/libs/find-request.d.ts +2 -2
  23. package/dist/libs/hot-keys.d.ts +1 -1
  24. package/dist/libs/send-request/create-request-operation.d.ts +2 -2
  25. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  26. package/dist/libs/send-request/create-request-operation.js +27 -27
  27. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
  28. package/dist/plugins/plugin-manager.d.ts +3 -3
  29. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  30. package/dist/store/active-entities.d.ts +3 -3
  31. package/dist/store/requests.d.ts +22 -22
  32. package/dist/store/store.d.ts +36 -36
  33. package/dist/store/workspace.d.ts +12 -12
  34. package/dist/style.css +1 -1
  35. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
  37. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  39. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +70 -71
  40. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +1 -1
  41. package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
  42. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-code-sample/index.js +8 -6
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
  47. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
  48. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
  49. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
  50. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
  51. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
  52. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
  53. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
  54. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
  55. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
  56. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
  57. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
  58. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
  59. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
  60. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
  61. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
  62. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
  63. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
  64. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
  65. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
  66. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
  67. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
  68. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
  69. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
  70. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
  71. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
  72. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
  73. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
  74. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
  75. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
  76. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
  77. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
  78. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
  79. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
  80. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
  81. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
  82. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
  83. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
  84. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
  85. package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
  86. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
  87. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
  88. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
  89. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
  90. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
  91. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
  92. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
  93. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
  94. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
  95. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
  96. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
  97. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
  98. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
  99. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
  100. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
  101. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
  102. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
  103. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
  104. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
  105. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
  106. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
  107. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
  108. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
  109. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
  110. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
  111. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
  112. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
  113. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
  114. package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
  115. package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
  116. package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
  117. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
  118. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
  119. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
  120. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
  121. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
  122. package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
  123. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
  124. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
  125. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
  126. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
  128. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
  129. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
  130. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
  131. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
  132. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
  133. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
  134. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
  135. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
  136. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
  137. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
  138. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
  139. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
  140. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
  141. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
  142. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
  143. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
  144. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
  145. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
  147. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
  148. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
  149. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
  150. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
  151. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
  152. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
  153. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
  154. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
  155. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
  156. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
  157. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
  158. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
  159. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
  160. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
  161. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
  162. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
  163. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
  164. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
  165. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
  166. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
  167. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
  168. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
  169. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
  170. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
  171. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
  172. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
  173. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
  174. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
  175. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
  176. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
  177. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  178. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
  179. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
  180. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
  181. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
  182. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
  183. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
  184. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
  185. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
  186. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
  187. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
  188. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
  189. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
  190. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
  191. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
  192. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
  193. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
  194. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
  195. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
  196. package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
  197. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
  198. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
  199. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
  200. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
  201. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
  202. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
  203. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
  204. package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
  205. package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
  206. package/dist/v2/blocks/scalar-response-block/index.js +4 -0
  207. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  208. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  209. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
  210. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  211. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  212. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
  213. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  214. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  215. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
  216. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  217. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  218. package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
  219. package/package.json +39 -19
@@ -1,16 +1,16 @@
1
- import { CLIENT_CONFIGURATION_SYMBOL as N } from "../hooks/useClientConfig.js";
2
- import { LAYOUT_SYMBOL as F } from "../hooks/useLayout.js";
3
- import { createSidebarState as j, SIDEBAR_SYMBOL as W } from "../hooks/useSidebar.js";
4
- import { getRequestUidByPathMethod as K } from "./get-request-uid-by-path-method.js";
5
- import { loadAllResources as D } from "./local-storage.js";
6
- import { createActiveEntitiesStore as G, ACTIVE_ENTITIES_SYMBOL as V } from "../store/active-entities.js";
7
- import { createWorkspaceStore as z, WORKSPACE_SYMBOL as H } from "../store/store.js";
8
- import { workspaceSchema as J } from "@scalar/oas-utils/entities/workspace";
9
- import { prettyPrintJson as Q } from "@scalar/oas-utils/helpers";
10
- import { LS_KEYS as X } from "@scalar/helpers/object/local-storage";
11
- import { DATA_VERSION_LS_LEY as Z, DATA_VERSION as $ } from "@scalar/oas-utils/migrations";
1
+ import { LS_KEYS as N } from "@scalar/helpers/object/local-storage";
2
+ import { workspaceSchema as F } from "@scalar/oas-utils/entities/workspace";
3
+ import { prettyPrintJson as j } from "@scalar/oas-utils/helpers";
4
+ import { DATA_VERSION_LS_LEY as W, DATA_VERSION as K } from "@scalar/oas-utils/migrations";
12
5
  import { apiClientConfigurationSchema as _ } from "@scalar/types/api-reference";
13
- import { ref as ee, createApp as te, watch as re } from "vue";
6
+ import { ref as D, createApp as G, watch as V } from "vue";
7
+ import { CLIENT_CONFIGURATION_SYMBOL as z } from "../hooks/useClientConfig.js";
8
+ import { LAYOUT_SYMBOL as H } from "../hooks/useLayout.js";
9
+ import { createSidebarState as J, SIDEBAR_SYMBOL as Q } from "../hooks/useSidebar.js";
10
+ import { getRequestUidByPathMethod as X } from "./get-request-uid-by-path-method.js";
11
+ import { loadAllResources as Z } from "./local-storage.js";
12
+ import { createActiveEntitiesStore as $, ACTIVE_ENTITIES_SYMBOL as ee } from "../store/active-entities.js";
13
+ import { createWorkspaceStore as te, WORKSPACE_SYMBOL as re } from "../store/store.js";
14
14
  import { createPluginManager as oe } from "../plugins/plugin-manager.js";
15
15
  import { PLUGIN_MANAGER_SYMBOL as ae } from "../plugins/hooks/usePluginManager.js";
16
16
  const Me = ({
@@ -24,14 +24,14 @@ const Me = ({
24
24
  layout: m = "desktop",
25
25
  router: n
26
26
  }) => {
27
- const a = ee(_.parse(U)), o = x || z({
27
+ const a = D(_.parse(U)), o = x || te({
28
28
  proxyUrl: a.value.proxyUrl,
29
29
  theme: a.value.theme,
30
30
  showSidebar: a.value.showSidebar ?? !0,
31
31
  hideClientButton: a.value.hideClientButton ?? !1,
32
32
  _integration: a.value._integration,
33
33
  useLocalStorage: C
34
- }), f = G({ ...o, router: n }), b = j({ layout: m }), E = oe({
34
+ }), f = $({ ...o, router: n }), b = J({ layout: m }), E = oe({
35
35
  plugins: a.value.plugins ?? []
36
36
  }), v = () => {
37
37
  try {
@@ -40,13 +40,13 @@ const Me = ({
40
40
  return !1;
41
41
  }
42
42
  };
43
- if (v() && localStorage.getItem(X.WORKSPACE) && !l)
43
+ if (v() && localStorage.getItem(N.WORKSPACE) && !l)
44
44
  try {
45
45
  const t = {};
46
46
  let e = 0, r = 0, s = "";
47
47
  for (s in localStorage)
48
48
  Object.hasOwn(localStorage, s) && (r = (localStorage[s].length + s.length) * 2, e += r, t[s] = (r / 1024).toFixed(2) + " KB");
49
- t.Total = (e / 1024).toFixed(2) + " KB", console.table(t), D(o);
49
+ t.Total = (e / 1024).toFixed(2) + " KB", console.table(t), Z(o);
50
50
  } catch (t) {
51
51
  console.warn("Failed to load from localStorage:", t);
52
52
  }
@@ -57,20 +57,20 @@ const Me = ({
57
57
  proxyUrl: a.value.proxyUrl
58
58
  }), v())
59
59
  try {
60
- localStorage.setItem(Z, $);
60
+ localStorage.setItem(W, K);
61
61
  } catch (t) {
62
62
  console.warn("Failed to set localStorage version:", t);
63
63
  }
64
64
  } else {
65
- const t = J.parse({
65
+ const t = F.parse({
66
66
  uid: "default",
67
67
  name: "Workspace",
68
68
  proxyUrl: a.value.proxyUrl
69
69
  });
70
70
  o.workspaceMutators.rawAdd(t);
71
71
  }
72
- const i = te(y);
73
- i.use(n), i.provide(H, o), i.provide(F, m), i.provide(V, f), i.provide(W, b), i.provide(N, a), i.provide(ae, E), i.config.idPrefix = "scalar-client";
72
+ const i = G(y);
73
+ i.use(n), i.provide(re, o), i.provide(H, m), i.provide(ee, f), i.provide(Q, b), i.provide(z, a), i.provide(ae, E), i.config.idPrefix = "scalar-client";
74
74
  const {
75
75
  collectionMutators: k,
76
76
  importSpecFile: I,
@@ -95,7 +95,7 @@ const Me = ({
95
95
  };
96
96
  L && w();
97
97
  const M = (t) => {
98
- const e = K(h, t);
98
+ const e = X(h, t);
99
99
  e ? n.push({
100
100
  name: "request",
101
101
  query: t?._source ? { source: t._source } : {},
@@ -138,7 +138,7 @@ const Me = ({
138
138
  },
139
139
  /** Update the currently selected server via URL */
140
140
  onUpdateServer: (t) => {
141
- re(
141
+ V(
142
142
  () => u.value?.selectedServerUid,
143
143
  (e) => {
144
144
  const r = Object.values(g).find((s) => s.uid === e);
@@ -180,7 +180,7 @@ const Me = ({
180
180
  if (!r)
181
181
  return;
182
182
  const s = Object.keys(r.requestBody?.content || {})[0] || "", c = r.requestBody?.content?.[s]?.examples?.[t];
183
- c && R.edit(r.examples[0], "body.raw.value", Q(c.value));
183
+ c && R.edit(r.examples[0], "body.raw.value", j(c.value));
184
184
  }
185
185
  };
186
186
  };
@@ -12,7 +12,7 @@ export declare const findRequestByPathMethod: (path: string, method: string, req
12
12
  type: "request";
13
13
  uid: string & import("zod").$brand<"operation">;
14
14
  path: string;
15
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
15
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
16
16
  servers: (string & import("zod").$brand<"server">)[];
17
17
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
18
18
  examples: (string & import("zod").$brand<"example">)[];
@@ -38,7 +38,7 @@ export declare const findRequestByPathMethod: (path: string, method: string, req
38
38
  description?: string | undefined;
39
39
  schema?: unknown;
40
40
  content?: unknown;
41
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
41
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
42
42
  explode?: boolean | undefined;
43
43
  example?: unknown;
44
44
  examples?: Record<string, {
@@ -26,7 +26,7 @@ export declare const getModifiers: (modifiers: HotKeyModifiers) => ("metaKey" |
26
26
  * This is the brain of the operation, we turn keybindings -> events
27
27
  */
28
28
  export declare const handleHotKeyDown: (ev: KeyboardEvent, eventBus: EventBus<HotKeyEvent>, { hotKeys, modifiers }?: {
29
- hotKeys?: Partial<Record<"" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "-" | "." | "/" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]" | "4" | "1" | "2" | "3" | "5" | "6" | "7" | "8" | "9", {
29
+ hotKeys?: Partial<Record<"" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "-" | "." | "/" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]" | "4" | "1" | "2" | "3" | "5" | "6" | "7" | "8" | "9", {
30
30
  event: "addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar";
31
31
  modifiers?: ("default" | "Meta" | "Control" | "Shift" | "Alt")[] | undefined;
32
32
  }>> | undefined;
@@ -1,8 +1,8 @@
1
+ import type { Cookie } from '@scalar/oas-utils/entities/cookie';
2
+ import type { Operation, RequestExample, ResponseInstance, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
1
3
  import { type ErrorResponse } from '../../libs/errors.js';
2
4
  import type { EventBus } from '../../libs/event-bus.js';
3
5
  import type { PluginManager } from '../../plugins/index.js';
4
- import type { Cookie } from '@scalar/oas-utils/entities/cookie';
5
- import type { Operation, RequestExample, ResponseInstance, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
6
6
  export type RequestStatus = 'start' | 'stop' | 'abort';
7
7
  /** Response from sendRequest hoisted so we can use it as the return type for createRequestOperation */
8
8
  type SendRequestResponse = Promise<ErrorResponse<{
@@ -1 +1 @@
1
- {"version":3,"file":"create-request-operation.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAQhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAMxC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAEtD,uGAAuG;AACvG,KAAK,mBAAmB,GAAG,OAAO,CAChC,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC,CACH,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/D,0BAA0B;AAC1B,eAAO,MAAM,sBAAsB,GAAI,yIAWpC;IACD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,EAAE,SAAS,CAAA;IAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC/C,0BAA0B,CAAC,EAAE,SAAS,CAAC,4BAA4B,CAAC,CAAA;IACpE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;IAChC,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,WAAW,EAAE,MAAM,mBAAmB,CAAA;IACtC,OAAO,EAAE,OAAO,CAAA;CACjB,CAmPA,CAAA"}
1
+ {"version":3,"file":"create-request-operation.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAIxC,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAQhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAI9C,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAEtD,uGAAuG;AACvG,KAAK,mBAAmB,GAAG,OAAO,CAChC,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC,CACH,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/D,0BAA0B;AAC1B,eAAO,MAAM,sBAAsB,GAAI,yIAWpC;IACD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,EAAE,SAAS,CAAA;IAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC/C,0BAA0B,CAAC,EAAE,SAAS,CAAC,4BAA4B,CAAC,CAAA;IACpE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;IAChC,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,WAAW,EAAE,MAAM,mBAAmB,CAAA;IACtC,OAAO,EAAE,OAAO,CAAA;CACjB,CAmPA,CAAA"}
@@ -1,15 +1,15 @@
1
- import { ERRORS as T, normalizeError as H } from "../errors.js";
2
- import { normalizeHeaders as Y } from "../normalize-headers.js";
3
- import { createFetchBody as G } from "./create-fetch-body.js";
4
- import { createFetchHeaders as J } from "./create-fetch-headers.js";
5
- import { createFetchQueryParams as N } from "./create-fetch-query-params.js";
6
- import { decodeBuffer as Z } from "./decode-buffer.js";
7
- import { setRequestCookies as $, getCookieHeader as M } from "./set-request-cookies.js";
1
+ import { isDefined as Y, mergeUrls as G, shouldUseProxy as T, redirectToProxy as J, httpStatusCodes as N } from "@scalar/oas-utils/helpers";
2
+ import { isElectron as H } from "../electron.js";
3
+ import { ERRORS as P, normalizeError as U } from "../errors.js";
4
+ import { normalizeHeaders as Z } from "../normalize-headers.js";
5
+ import { createFetchBody as $ } from "./create-fetch-body.js";
6
+ import { createFetchHeaders as M } from "./create-fetch-headers.js";
7
+ import { createFetchQueryParams as ee } from "./create-fetch-query-params.js";
8
+ import { decodeBuffer as te } from "./decode-buffer.js";
9
+ import { setRequestCookies as oe, getCookieHeader as re } from "./set-request-cookies.js";
8
10
  import { replaceTemplateVariables as c } from "../string-template.js";
9
- import { isElectron as P } from "../electron.js";
10
- import { isDefined as ee, mergeUrls as te, shouldUseProxy as U, redirectToProxy as oe, httpStatusCodes as re } from "@scalar/oas-utils/helpers";
11
11
  import { buildRequestSecurity as se } from "./build-request-security.js";
12
- const be = ({
12
+ const we = ({
13
13
  environment: q,
14
14
  example: s,
15
15
  globalCookies: v,
@@ -22,28 +22,28 @@ const be = ({
22
22
  pluginManager: h
23
23
  }) => {
24
24
  try {
25
- const o = q ?? {}, b = new AbortController(), w = s.parameters.path.reduce((t, e) => (e.enabled && (t[e.key] = c(e.value, o)), t), {}), L = c(k?.url ?? "", o), l = c(c(a.path, o), w);
25
+ const o = q ?? {}, w = new AbortController(), b = s.parameters.path.reduce((t, e) => (e.enabled && (t[e.key] = c(e.value, o)), t), {}), L = c(k?.url ?? "", o), l = c(c(a.path, o), b);
26
26
  let r = L || l;
27
27
  if (!r)
28
- throw T.URL_EMPTY;
28
+ throw P.URL_EMPTY;
29
29
  Object.entries(k?.variables ?? {}).forEach(([t, e]) => {
30
30
  r = c(r, {
31
- [t]: w[t] || e.default
31
+ [t]: b[t] || e.default
32
32
  });
33
33
  });
34
- const z = N(s, o, a), B = J(s, o), { body: F } = G(a.method, s, o), { cookieParams: _ } = $({
34
+ const z = ee(s, o, a), B = M(s, o), { body: F } = $(a.method, s, o), { cookieParams: _ } = oe({
35
35
  example: s,
36
36
  env: o,
37
37
  globalCookies: v,
38
38
  serverUrl: r,
39
39
  proxyUrl: u
40
- }), O = E.flat().map((t) => D[t]).filter(ee), f = se(O, o), n = { ...Object.entries(f.headers).reduce(
40
+ }), O = E.flat().map((t) => D[t]).filter(Y), f = se(O, o), n = { ...Object.entries(f.headers).reduce(
41
41
  (t, [e, S]) => (t[e.toLowerCase()] = S, t),
42
42
  {}
43
43
  ), ...B }, W = [..._, ...f.cookies], x = new URLSearchParams([...z, ...f.urlParams]);
44
- P() && n["user-agent"] && (n["X-Scalar-User-Agent"] = n["user-agent"]), r = te(r, l, x);
45
- const p = c(M(W, n.Cookie), o);
46
- p && (P() || U(u, r) ? (console.warn(
44
+ H() && n["user-agent"] && (n["X-Scalar-User-Agent"] = n["user-agent"]), r = G(r, l, x);
45
+ const p = c(re(W, n.Cookie), o);
46
+ p && (H() || T(u, r) ? (console.warn(
47
47
  "We're using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons."
48
48
  ), n["X-Scalar-Cookie"] = p) : (console.warn(
49
49
  `We're trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it's not working, that's probably why. Here are the requirements for it to work:
@@ -52,7 +52,7 @@ const be = ({
52
52
  - The connection must be made over HTTPS.
53
53
  `
54
54
  ), n.Cookie = p));
55
- const A = oe(u, r), y = new Request(A, {
55
+ const A = J(u, r), y = new Request(A, {
56
56
  method: a.method.toUpperCase(),
57
57
  body: F ?? null,
58
58
  headers: n
@@ -62,19 +62,19 @@ const be = ({
62
62
  {
63
63
  request: y,
64
64
  sendRequest: async () => {
65
- m?.emit("start"), h && h.executeHook("onBeforeRequest", { request: y });
65
+ m?.emit("start"), h && await h.executeHook("onBeforeRequest", { request: y });
66
66
  const t = Date.now();
67
67
  try {
68
68
  const e = await fetch(y, {
69
- signal: b.signal
69
+ signal: w.signal
70
70
  }), S = e.headers.get("content-type")?.startsWith("text/event-stream");
71
71
  m?.emit("stop");
72
- const X = Date.now() - t, j = e.clone(), R = Y(e.headers, U(u, r)), I = e.headers.get("content-type") ?? "text/plain;charset=UTF-8", C = await j.arrayBuffer(), Q = Z(C, I), i = e.clone(), V = i.statusText || re[i.status]?.name || "", K = [204, 205, 304].includes(i.status), d = new Response(K ? null : i.body, {
72
+ const X = Date.now() - t, j = e.clone(), R = Z(e.headers, T(u, r)), I = e.headers.get("content-type") ?? "text/plain;charset=UTF-8", C = await j.arrayBuffer(), Q = te(C, I), i = e.clone(), V = i.statusText || N[i.status]?.name || "", K = [204, 205, 304].includes(i.status), d = new Response(K ? null : i.body, {
73
73
  status: i.status,
74
74
  statusText: V,
75
75
  headers: i.headers
76
76
  });
77
- h && h.executeHook("onResponseReceived", { response: d, operation: a });
77
+ h && await h.executeHook("onResponseReceived", { response: d, operation: a });
78
78
  const g = "getSetCookie" in d.headers && typeof d.headers.getSetCookie == "function" ? d.headers.getSetCookie() : [];
79
79
  return S && e.body ? [
80
80
  null,
@@ -110,16 +110,16 @@ const be = ({
110
110
  }
111
111
  ];
112
112
  } catch (e) {
113
- return m?.emit("abort"), [H(e, T.REQUEST_FAILED), null];
113
+ return m?.emit("abort"), [U(e, P.REQUEST_FAILED), null];
114
114
  }
115
115
  },
116
- controller: b
116
+ controller: w
117
117
  }
118
118
  ];
119
119
  } catch (o) {
120
- return console.error(o), m?.emit("abort"), [H(o), null];
120
+ return console.error(o), m?.emit("abort"), [U(o), null];
121
121
  }
122
122
  };
123
123
  export {
124
- be as createRequestOperation
124
+ we as createRequestOperation
125
125
  };
@@ -15,7 +15,7 @@ export declare const createRequestPayload: (metaRequestPayload?: MetaRequestPayl
15
15
  type: "request";
16
16
  uid: string & z.core.$brand<"operation">;
17
17
  path: string;
18
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
18
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
19
19
  servers: (string & z.core.$brand<"server">)[];
20
20
  selectedServerUid: (string & z.core.$brand<"server">) | null;
21
21
  examples: (string & z.core.$brand<"example">)[];
@@ -41,7 +41,7 @@ export declare const createRequestPayload: (metaRequestPayload?: MetaRequestPayl
41
41
  description?: string | undefined;
42
42
  schema?: unknown;
43
43
  content?: unknown;
44
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
44
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
45
45
  explode?: boolean | undefined;
46
46
  example?: unknown;
47
47
  examples?: Record<string, {
@@ -1,8 +1,8 @@
1
- import type { ApiClientPlugin, HooksSchema } from '@scalar/types/api-client';
1
+ import type { ApiClientPlugin, hooksSchema } from '@scalar/types/api-reference';
2
2
  import type { InjectionKey } from 'vue';
3
3
  import type { z } from 'zod';
4
4
  export type { ApiClientPlugin };
5
- type HookFunctions = z.infer<typeof HooksSchema>;
5
+ type HookFunctions = z.infer<typeof hooksSchema>;
6
6
  type CreatePluginManagerParams = {
7
7
  plugins?: ApiClientPlugin[];
8
8
  };
@@ -23,7 +23,7 @@ export declare const createPluginManager: ({ plugins }: CreatePluginManagerParam
23
23
  /**
24
24
  * Execute a hook for a specific event
25
25
  */
26
- executeHook: <E extends keyof HookFunctions>(event: E, ...args: HookFunctions[E] extends z.ZodFunction<infer Args, any> ? z.infer<Args> : any) => Promise<(void | undefined)[]>;
26
+ executeHook: <E extends keyof HookFunctions>(event: E, ...args: HookFunctions[E] extends z.ZodFunction<infer Args, any> ? z.infer<Args> : any) => Promise<unknown[]>;
27
27
  };
28
28
  export type PluginManager = ReturnType<typeof createPluginManager>;
29
29
  export declare const PLUGIN_MANAGER_SYMBOL: InjectionKey<PluginManager>;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAEhD,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAkB,yBAAyB;IAU3E;;OAEG;8BACuB,MAAM,WAAW,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;;;;;IAIjF;;OAEG;kBACW,CAAC,SAAS,MAAM,aAAa,SAClC,CAAC,WACC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,MAAM,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG;CAe3F,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAClE,eAAO,MAAM,qBAAqB,EAAe,YAAY,CAAC,aAAa,CAAC,CAAA"}
1
+ {"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAEhD,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAkB,yBAAyB;IAU3E;;OAEG;8BACuB,MAAM,WAAW,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;;;;;IAIjF;;OAEG;kBACW,CAAC,SAAS,MAAM,aAAa,SAClC,CAAC,WACC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,MAAM,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG;CAe3F,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAClE,eAAO,MAAM,qBAAqB,EAAe,YAAY,CAAC,aAAa,CAAC,CAAA"}
@@ -191,7 +191,7 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
191
191
  type: "request";
192
192
  uid: string & import("zod").$brand<"operation">;
193
193
  path: string;
194
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
194
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
195
195
  servers: (string & import("zod").$brand<"server">)[];
196
196
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
197
197
  examples: (string & import("zod").$brand<"example">)[];
@@ -217,7 +217,7 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
217
217
  description?: string | undefined;
218
218
  schema?: unknown;
219
219
  content?: unknown;
220
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
220
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
221
221
  explode?: boolean | undefined;
222
222
  example?: unknown;
223
223
  examples?: Record<string, {
@@ -290,7 +290,7 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
290
290
  };
291
291
  hotKeyConfig?: {
292
292
  modifiers: ("default" | "Meta" | "Control" | "Shift" | "Alt")[];
293
- hotKeys?: Partial<Record<"" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "-" | "." | "/" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]" | "4" | "1" | "2" | "3" | "5" | "6" | "7" | "8" | "9", {
293
+ hotKeys?: Partial<Record<"" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "-" | "." | "/" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]" | "4" | "1" | "2" | "3" | "5" | "6" | "7" | "8" | "9", {
294
294
  event: "addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar";
295
295
  modifiers?: ("default" | "Meta" | "Control" | "Shift" | "Alt")[] | undefined;
296
296
  }>> | undefined;
@@ -7,7 +7,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
7
7
  type: "request";
8
8
  uid: string & import("zod").$brand<"operation">;
9
9
  path: string;
10
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
10
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
11
11
  servers: (string & import("zod").$brand<"server">)[];
12
12
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
13
13
  examples: (string & import("zod").$brand<"example">)[];
@@ -33,7 +33,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
33
33
  description?: string | undefined;
34
34
  schema?: unknown;
35
35
  content?: unknown;
36
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
36
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
37
37
  explode?: boolean | undefined;
38
38
  example?: unknown;
39
39
  examples?: Record<string, {
@@ -67,7 +67,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
67
67
  type: "request";
68
68
  uid: string & import("zod").$brand<"operation">;
69
69
  path: string;
70
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
70
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
71
71
  servers: (string & import("zod").$brand<"server">)[];
72
72
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
73
73
  examples: (string & import("zod").$brand<"example">)[];
@@ -93,7 +93,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
93
93
  description?: string | undefined;
94
94
  schema?: unknown;
95
95
  content?: unknown;
96
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
96
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
97
97
  explode?: boolean | undefined;
98
98
  example?: unknown;
99
99
  examples?: Record<string, {
@@ -127,7 +127,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
127
127
  type: "request";
128
128
  uid: string & import("zod").$brand<"operation">;
129
129
  path: string;
130
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
130
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
131
131
  servers: (string & import("zod").$brand<"server">)[];
132
132
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
133
133
  examples: (string & import("zod").$brand<"example">)[];
@@ -153,7 +153,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
153
153
  description?: string | undefined;
154
154
  schema?: unknown;
155
155
  content?: unknown;
156
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
156
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
157
157
  explode?: boolean | undefined;
158
158
  example?: unknown;
159
159
  examples?: Record<string, {
@@ -186,7 +186,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
186
186
  type: "request";
187
187
  uid: string & import("zod").$brand<"operation">;
188
188
  path: string;
189
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
189
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
190
190
  servers: (string & import("zod").$brand<"server">)[];
191
191
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
192
192
  examples: (string & import("zod").$brand<"example">)[];
@@ -212,7 +212,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
212
212
  description?: string | undefined;
213
213
  schema?: unknown;
214
214
  content?: unknown;
215
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
215
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
216
216
  explode?: boolean | undefined;
217
217
  example?: unknown;
218
218
  examples?: Record<string, {
@@ -244,7 +244,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
244
244
  type: "request";
245
245
  uid: string & import("zod").$brand<"operation">;
246
246
  path: string;
247
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
247
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
248
248
  servers: (string & import("zod").$brand<"server">)[];
249
249
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
250
250
  examples: (string & import("zod").$brand<"example">)[];
@@ -270,7 +270,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
270
270
  description?: string | undefined;
271
271
  schema?: unknown;
272
272
  content?: unknown;
273
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
273
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
274
274
  explode?: boolean | undefined;
275
275
  example?: unknown;
276
276
  examples?: Record<string, {
@@ -302,7 +302,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
302
302
  type: "request";
303
303
  uid: string & import("zod").$brand<"operation">;
304
304
  path: string;
305
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
305
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
306
306
  servers: (string & import("zod").$brand<"server">)[];
307
307
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
308
308
  examples: (string & import("zod").$brand<"example">)[];
@@ -328,7 +328,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
328
328
  description?: string | undefined;
329
329
  schema?: unknown;
330
330
  content?: unknown;
331
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
331
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
332
332
  explode?: boolean | undefined;
333
333
  example?: unknown;
334
334
  examples?: Record<string, {
@@ -361,7 +361,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
361
361
  type: "request";
362
362
  uid: string & import("zod").$brand<"operation">;
363
363
  path: string;
364
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
364
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
365
365
  servers: (string & import("zod").$brand<"server">)[];
366
366
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
367
367
  examples: (string & import("zod").$brand<"example">)[];
@@ -387,7 +387,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
387
387
  description?: string | undefined;
388
388
  schema?: unknown;
389
389
  content?: unknown;
390
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
390
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
391
391
  explode?: boolean | undefined;
392
392
  example?: unknown;
393
393
  examples?: Record<string, {
@@ -419,7 +419,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
419
419
  type: "request";
420
420
  uid: string & import("zod").$brand<"operation">;
421
421
  path: string;
422
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
422
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
423
423
  servers: (string & import("zod").$brand<"server">)[];
424
424
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
425
425
  examples: (string & import("zod").$brand<"example">)[];
@@ -445,7 +445,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
445
445
  description?: string | undefined;
446
446
  schema?: unknown;
447
447
  content?: unknown;
448
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
448
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
449
449
  explode?: boolean | undefined;
450
450
  example?: unknown;
451
451
  examples?: Record<string, {
@@ -477,7 +477,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
477
477
  type: "request";
478
478
  uid: string & import("zod").$brand<"operation">;
479
479
  path: string;
480
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
480
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
481
481
  servers: (string & import("zod").$brand<"server">)[];
482
482
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
483
483
  examples: (string & import("zod").$brand<"example">)[];
@@ -503,7 +503,7 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
503
503
  description?: string | undefined;
504
504
  schema?: unknown;
505
505
  content?: unknown;
506
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
506
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
507
507
  explode?: boolean | undefined;
508
508
  example?: unknown;
509
509
  examples?: Record<string, {
@@ -546,7 +546,7 @@ export declare function extendedRequestDataFactory({ requestExamples, requestExa
546
546
  type: "request";
547
547
  uid: string & import("zod").$brand<"operation">;
548
548
  path: string;
549
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
549
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
550
550
  servers: (string & import("zod").$brand<"server">)[];
551
551
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
552
552
  examples: (string & import("zod").$brand<"example">)[];
@@ -572,7 +572,7 @@ export declare function extendedRequestDataFactory({ requestExamples, requestExa
572
572
  description?: string | undefined;
573
573
  schema?: unknown;
574
574
  content?: unknown;
575
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
575
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
576
576
  explode?: boolean | undefined;
577
577
  example?: unknown;
578
578
  examples?: Record<string, {
@@ -615,7 +615,7 @@ export declare function createInitialRequest(): {
615
615
  type: "request";
616
616
  uid: string & import("zod").$brand<"operation">;
617
617
  path: string;
618
- method: "delete" | "get" | "connect" | "head" | "options" | "patch" | "post" | "put" | "trace";
618
+ method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
619
619
  servers: (string & import("zod").$brand<"server">)[];
620
620
  selectedServerUid: (string & import("zod").$brand<"server">) | null;
621
621
  examples: (string & import("zod").$brand<"example">)[];
@@ -641,7 +641,7 @@ export declare function createInitialRequest(): {
641
641
  description?: string | undefined;
642
642
  schema?: unknown;
643
643
  content?: unknown;
644
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
644
+ style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
645
645
  explode?: boolean | undefined;
646
646
  example?: unknown;
647
647
  examples?: Record<string, {