@scalar/api-client 2.1.17 → 2.1.19

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 (194) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +78 -75
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +6 -6
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
  11. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  12. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  13. package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
  14. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +3 -0
  15. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  16. package/dist/components/CommandPalette/CommandActionForm.vue.js +13 -11
  17. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +0 -2
  18. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  19. package/dist/components/CommandPalette/CommandActionInput.vue.js +36 -38
  20. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
  21. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
  23. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +100 -80
  25. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
  28. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
  29. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +7 -7
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  31. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  32. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +42 -42
  33. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  34. package/dist/components/ContextBar.vue.js +2 -2
  35. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
  36. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  37. package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
  38. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  39. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
  40. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  41. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
  42. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
  43. package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
  44. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
  45. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  46. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  47. package/dist/components/SideNav/SideNav.vue.js +1 -1
  48. package/dist/components/SideNav/SideNav.vue2.js +37 -26
  49. package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
  50. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  51. package/dist/components/SideNav/SideNavLink.vue.js +10 -11
  52. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  53. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  54. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  55. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  56. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  57. package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
  58. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
  59. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  60. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  61. package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
  62. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
  63. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  64. package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
  65. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  66. package/dist/components/TopNav/TopNav.vue.js +1 -1
  67. package/dist/components/TopNav/TopNav.vue2.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  70. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  71. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  72. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  73. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
  74. package/dist/constants.d.ts +4 -0
  75. package/dist/constants.d.ts.map +1 -1
  76. package/dist/constants.js +2 -1
  77. package/dist/hooks/useDarkModeState.d.ts +4 -3
  78. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  79. package/dist/hooks/useDarkModeState.js +36 -21
  80. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  81. package/dist/layouts/App/ApiClientApp.vue.js +34 -41
  82. package/dist/layouts/App/create-api-client-app.d.ts +35 -32
  83. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  84. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  85. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  86. package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
  87. package/dist/layouts/Modal/create-api-client-modal.d.ts +70 -64
  88. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  89. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  90. package/dist/layouts/Web/ApiClientWeb.vue.js +35 -42
  91. package/dist/layouts/Web/create-api-client-web.d.ts +35 -32
  92. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  93. package/dist/libs/create-client.d.ts +35 -32
  94. package/dist/libs/create-client.d.ts.map +1 -1
  95. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  96. package/dist/libs/extractAttachmentFilename.d.ts +2 -0
  97. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -0
  98. package/dist/libs/extractAttachmentFilename.js +20 -0
  99. package/dist/libs/getOpenApiDocumentDetails.d.ts +10 -0
  100. package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -0
  101. package/dist/libs/getOpenApiDocumentDetails.js +40 -0
  102. package/dist/libs/importers/curl.d.ts +3 -0
  103. package/dist/libs/importers/curl.d.ts.map +1 -0
  104. package/dist/libs/importers/curl.js +61 -0
  105. package/dist/libs/importers/index.d.ts +2 -0
  106. package/dist/libs/importers/index.d.ts.map +1 -0
  107. package/dist/libs/importers/index.js +4 -0
  108. package/dist/libs/index.d.ts +2 -2
  109. package/dist/libs/index.d.ts.map +1 -1
  110. package/dist/libs/index.js +22 -22
  111. package/dist/libs/isUrl.d.ts +1 -1
  112. package/dist/libs/isUrl.d.ts.map +1 -1
  113. package/dist/libs/isUrl.js +4 -3
  114. package/dist/libs/parse-curl.d.ts +12 -0
  115. package/dist/libs/parse-curl.d.ts.map +1 -0
  116. package/dist/libs/parse-curl.js +70 -0
  117. package/dist/router.d.ts +2 -1
  118. package/dist/router.d.ts.map +1 -1
  119. package/dist/router.js +33 -24
  120. package/dist/store/collections.d.ts +4 -4
  121. package/dist/store/cookies.d.ts +4 -4
  122. package/dist/store/environment.d.ts +4 -4
  123. package/dist/store/import-spec.d.ts.map +1 -1
  124. package/dist/store/import-spec.js +21 -26
  125. package/dist/store/request-example.d.ts +4 -4
  126. package/dist/store/requests.d.ts +4 -4
  127. package/dist/store/router-params.d.ts +1 -0
  128. package/dist/store/router-params.d.ts.map +1 -1
  129. package/dist/store/router-params.js +2 -1
  130. package/dist/store/servers.d.ts +4 -4
  131. package/dist/store/store.d.ts +70 -64
  132. package/dist/store/store.d.ts.map +1 -1
  133. package/dist/store/store.js +126 -119
  134. package/dist/store/tags.d.ts +4 -4
  135. package/dist/store/workspace.d.ts +4 -4
  136. package/dist/style.css +1 -1
  137. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  138. package/dist/views/Cookies/Cookies.vue2.js +18 -18
  139. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  140. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
  141. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  142. package/dist/views/Request/Request.vue.js +1 -1
  143. package/dist/views/Request/Request.vue2.js +146 -96
  144. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  145. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  146. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
  147. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  148. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
  149. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  150. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  151. package/dist/views/Request/RequestSidebar.vue2.js +2 -2
  152. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  153. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  154. package/dist/views/Request/RequestSidebarItem.vue2.js +49 -49
  155. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
  156. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  157. package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
  158. package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
  159. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  160. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +63 -55
  161. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +2 -0
  162. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  163. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +14 -14
  164. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  166. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
  168. package/dist/views/Settings/Settings.vue.d.ts +4 -0
  169. package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
  170. package/dist/views/Settings/Settings.vue.js +4 -0
  171. package/dist/views/Settings/Settings.vue2.js +59 -0
  172. package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
  173. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
  174. package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
  175. package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
  176. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
  177. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
  178. package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
  179. package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
  180. package/package.json +60 -36
  181. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  182. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
  183. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
  184. package/dist/components/DarkModeToggle/index.d.ts +0 -2
  185. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  186. package/dist/components/DarkModeToggle/index.js +0 -4
  187. package/dist/components/ScreenReader.vue.js +0 -7
  188. package/dist/components/ScreenReader.vue2.js +0 -18
  189. package/dist/libs/getOpenApiDocumentVersion.d.ts +0 -8
  190. package/dist/libs/getOpenApiDocumentVersion.d.ts.map +0 -1
  191. package/dist/libs/getOpenApiDocumentVersion.js +0 -20
  192. package/dist/libs/isDocument.d.ts +0 -3
  193. package/dist/libs/isDocument.d.ts.map +0 -1
  194. package/dist/libs/isDocument.js +0 -7
@@ -25,7 +25,7 @@ export declare const getModifiers: (modifiers: HotKeyModifiers) => ("altKey" | "
25
25
  * This is the brain of the operation, we turn keybindings -> events
26
26
  */
27
27
  export declare const handleHotKeyDown: (ev: KeyboardEvent, { hotKeys, modifiers, }?: {
28
- hotKeys?: Partial<Record<"" | "." | "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "-" | "ArrowLeft" | "ArrowRight" | "Delete" | "0" | "1" | "n" | "Escape" | "ArrowDown" | "ArrowUp" | "Enter" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | "Space" | "Backspace" | "Tab" | "End" | "Home" | "PageDown" | "PageUp" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "o" | "r" | "t" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "/" | ";" | "=" | "," | "`" | "[" | "\\" | "]", {
28
+ hotKeys?: Partial<Record<"" | "." | "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | ";" | "/" | "=" | "0" | "-" | "ArrowLeft" | "ArrowRight" | "Delete" | "1" | "n" | "Escape" | "ArrowDown" | "ArrowUp" | "Enter" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | "Space" | "Backspace" | "Tab" | "End" | "Home" | "PageDown" | "PageUp" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "o" | "r" | "t" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "," | "`" | "[" | "\\" | "]", {
29
29
  event: "closeModal" | "navigateSearchResultsDown" | "selectSearchResult" | "navigateSearchResultsUp" | "openCommandPalette" | "openCommandPaletteRequest" | "toggleSidebar" | "addTopNav" | "closeTopNav" | "navigateTopNavLeft" | "navigateTopNavRight" | "focusAddressBar" | "jumpToTab" | "jumpToLastTab" | "focusRequestSearch";
30
30
  modifiers?: ("Meta" | "Control" | "Shift" | "Alt" | "default")[] | undefined;
31
31
  }>> | undefined;
@@ -0,0 +1,2 @@
1
+ export declare function extractFilename(contentDisposition: string): string;
2
+ //# sourceMappingURL=extractAttachmentFilename.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractAttachmentFilename.d.ts","sourceRoot":"","sources":["../../src/libs/extractAttachmentFilename.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAAC,kBAAkB,EAAE,MAAM,UAezD"}
@@ -0,0 +1,20 @@
1
+ const a = (e) => {
2
+ try {
3
+ return decodeURIComponent(e);
4
+ } catch {
5
+ return e;
6
+ }
7
+ };
8
+ function c(e) {
9
+ let t = "";
10
+ if (e) {
11
+ const n = e.match(
12
+ /filename\s*=\s*"?([^";]+)"?/
13
+ );
14
+ n && n.length === 2 && (t = a(n[1].trim()));
15
+ }
16
+ return t;
17
+ }
18
+ export {
19
+ c as extractFilename
20
+ };
@@ -0,0 +1,10 @@
1
+ export type OpenApiDocumentDetails = {
2
+ version: string;
3
+ type: 'json' | 'yaml';
4
+ title?: string;
5
+ };
6
+ /**
7
+ * Get the base Swagger/OpenAPI details from the given string
8
+ */
9
+ export declare function getOpenApiDocumentDetails(input: string | null): OpenApiDocumentDetails | undefined;
10
+ //# sourceMappingURL=getOpenApiDocumentDetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOpenApiDocumentDetails.d.ts","sourceRoot":"","sources":["../../src/libs/getOpenApiDocumentDetails.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AASD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,sBAAsB,GAAG,SAAS,CAoDpC"}
@@ -0,0 +1,40 @@
1
+ import { json as n, yaml as o } from "@scalar/oas-utils/helpers";
2
+ import { isUrl as i } from "./isUrl.js";
3
+ function t(r) {
4
+ return {
5
+ title: typeof (r == null ? void 0 : r.title) == "string" ? `${r == null ? void 0 : r.title}` : void 0
6
+ };
7
+ }
8
+ function g(r) {
9
+ if (!(!r || i(r))) {
10
+ try {
11
+ const e = n.parse(r ?? "");
12
+ return typeof (e == null ? void 0 : e.openapi) == "string" ? {
13
+ version: `OpenAPI ${e.openapi}`,
14
+ type: "json",
15
+ ...t(e.info)
16
+ } : typeof (e == null ? void 0 : e.swagger) == "string" ? {
17
+ version: `Swagger ${e.swagger}`,
18
+ type: "json",
19
+ ...t(e.info)
20
+ } : void 0;
21
+ } catch {
22
+ }
23
+ try {
24
+ const e = o.parse(r ?? "");
25
+ return typeof (e == null ? void 0 : e.openapi) == "string" ? {
26
+ version: `OpenAPI ${e.openapi}`,
27
+ type: "yaml",
28
+ ...t(e.info)
29
+ } : typeof (e == null ? void 0 : e.swagger) == "string" ? {
30
+ version: `Swagger ${e.swagger}`,
31
+ type: "yaml",
32
+ ...t(e.info)
33
+ } : void 0;
34
+ } catch {
35
+ }
36
+ }
37
+ }
38
+ export {
39
+ g as getOpenApiDocumentDetails
40
+ };
@@ -0,0 +1,3 @@
1
+ /** Make a usable object from a curl command to create a request */
2
+ export declare function importCurlCommand(curlCommand: string): object;
3
+ //# sourceMappingURL=curl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../src/libs/importers/curl.ts"],"names":[],"mappings":"AAkBA,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqD7D"}
@@ -0,0 +1,61 @@
1
+ import { parseCurlCommand as d } from "../parse-curl.js";
2
+ function h(t) {
3
+ try {
4
+ return JSON.parse(t);
5
+ } catch {
6
+ const n = {};
7
+ return t.split("&").forEach((s) => {
8
+ const [r, e] = s.split("=");
9
+ n[decodeURIComponent(r)] = decodeURIComponent(e);
10
+ }), n;
11
+ }
12
+ }
13
+ function C(t) {
14
+ const n = d(t), {
15
+ method: s,
16
+ url: r,
17
+ body: e = "",
18
+ headers: o = {},
19
+ servers: m,
20
+ queryParameters: i
21
+ } = n, l = new URL(r).pathname, u = e != null && e.includes("=") && !e.startsWith("{") ? "application/x-www-form-urlencoded" : o["Content-Type"] || "application/json", a = e ? h(e) : {};
22
+ return {
23
+ method: s,
24
+ url: r,
25
+ path: l,
26
+ headers: o,
27
+ servers: m,
28
+ queryParameters: i,
29
+ ...Object.keys(a).length > 0 && {
30
+ requestBody: {
31
+ content: {
32
+ [u]: {
33
+ schema: {
34
+ type: "object",
35
+ properties: Object.fromEntries(
36
+ Object.entries(a).map(([p, c]) => [
37
+ p,
38
+ { type: typeof c }
39
+ ])
40
+ )
41
+ },
42
+ example: a
43
+ }
44
+ }
45
+ }
46
+ },
47
+ ...Object.keys(o).length > 0 && {
48
+ parameters: Object.entries(o).map(([p, c]) => ({
49
+ name: p,
50
+ in: "header",
51
+ schema: {
52
+ type: "string"
53
+ },
54
+ example: c
55
+ }))
56
+ }
57
+ };
58
+ }
59
+ export {
60
+ C as importCurlCommand
61
+ };
@@ -0,0 +1,2 @@
1
+ export * from './curl.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/importers/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { importCurlCommand as r } from "./curl.js";
2
+ export {
3
+ r as importCurlCommand
4
+ };
@@ -7,7 +7,7 @@ export * from './normalize-headers.js';
7
7
  export * from './local-storage.js';
8
8
  export * from './environment-parser.js';
9
9
  export * from './isUrl.js';
10
- export * from './isDocument.js';
11
- export * from './getOpenApiDocumentVersion.js';
10
+ export * from './getOpenApiDocumentDetails.js';
11
+ export * from './parse-curl.js';
12
12
  export { createRequestOperation } from './send-request.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,39 +1,39 @@
1
1
  import { createApiClient as o } from "./create-client.js";
2
- import { formatBytes as m, formatMs as s } from "./formatters.js";
3
- import { ERRORS as a, normalizeError as f, prettyErrorMessage as x } from "./errors.js";
4
- import { formatHeaderKey as n, normalizeHeaders as i } from "./normalize-headers.js";
2
+ import { formatBytes as m, formatMs as a } from "./formatters.js";
3
+ import { ERRORS as p, normalizeError as f, prettyErrorMessage as x } from "./errors.js";
4
+ import { formatHeaderKey as l, normalizeHeaders as n } from "./normalize-headers.js";
5
5
  import { loadAllResources as c } from "./local-storage.js";
6
- import { parseEnvVariables as d } from "./environment-parser.js";
6
+ import { parseEnvVariables as R } from "./environment-parser.js";
7
7
  import { isUrl as E } from "./isUrl.js";
8
- import { isDocument as q } from "./isDocument.js";
9
- import { getOpenApiDocumentVersion as D } from "./getOpenApiDocumentVersion.js";
8
+ import { getOpenApiDocumentDetails as q } from "./getOpenApiDocumentDetails.js";
9
+ import { parseCurlCommand as D } from "./parse-curl.js";
10
10
  import { createRequestOperation as K } from "./send-request.js";
11
11
  import { commandPaletteBus as g } from "./event-busses/command-palette-bus.js";
12
- import { DEFAULT_HOTKEYS as S, getModifiers as h, handleHotKeyDown as z, hotKeyBus as T } from "./event-busses/hot-keys-bus.js";
13
- import { executeRequestBus as V } from "./event-busses/execute-request-bus.js";
12
+ import { DEFAULT_HOTKEYS as M, getModifiers as S, handleHotKeyDown as h, hotKeyBus as z } from "./event-busses/hot-keys-bus.js";
13
+ import { executeRequestBus as U } from "./event-busses/execute-request-bus.js";
14
14
  import { cancelRequestBus as v } from "./event-busses/cancel-request-bus.js";
15
- import { requestStatusBus as C } from "./event-busses/request-status-bus.js";
15
+ import { requestStatusBus as F } from "./event-busses/request-status-bus.js";
16
16
  export {
17
- S as DEFAULT_HOTKEYS,
18
- a as ERRORS,
17
+ M as DEFAULT_HOTKEYS,
18
+ p as ERRORS,
19
19
  v as cancelRequestBus,
20
20
  g as commandPaletteBus,
21
21
  o as createApiClient,
22
22
  K as createRequestOperation,
23
- V as executeRequestBus,
23
+ U as executeRequestBus,
24
24
  m as formatBytes,
25
- n as formatHeaderKey,
26
- s as formatMs,
27
- h as getModifiers,
28
- D as getOpenApiDocumentVersion,
29
- z as handleHotKeyDown,
30
- T as hotKeyBus,
31
- q as isDocument,
25
+ l as formatHeaderKey,
26
+ a as formatMs,
27
+ S as getModifiers,
28
+ q as getOpenApiDocumentDetails,
29
+ h as handleHotKeyDown,
30
+ z as hotKeyBus,
32
31
  E as isUrl,
33
32
  c as loadAllResources,
34
33
  f as normalizeError,
35
- i as normalizeHeaders,
36
- d as parseEnvVariables,
34
+ n as normalizeHeaders,
35
+ D as parseCurlCommand,
36
+ R as parseEnvVariables,
37
37
  x as prettyErrorMessage,
38
- C as requestStatusBus
38
+ F as requestStatusBus
39
39
  };
@@ -1,3 +1,3 @@
1
1
  /** Checks whether the given string is an URL */
2
- export declare function isUrl(input: string | null): boolean | "" | null;
2
+ export declare function isUrl(input: string | null): boolean;
3
3
  //# sourceMappingURL=isUrl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isUrl.d.ts","sourceRoot":"","sources":["../../src/libs/isUrl.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,uBAEzC"}
1
+ {"version":3,"file":"isUrl.d.ts","sourceRoot":"","sources":["../../src/libs/isUrl.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,WAMzC"}
@@ -1,6 +1,7 @@
1
- function r(t) {
2
- return t && (t.startsWith("http://") || t.startsWith("https://"));
1
+ import { isValidUrl as t } from "@scalar/oas-utils/helpers";
2
+ function e(r) {
3
+ return !r || !(r.startsWith("http://") || r.startsWith("https://")) ? !1 : t(r);
3
4
  }
4
5
  export {
5
- r as isUrl
6
+ e as isUrl
6
7
  };
@@ -0,0 +1,12 @@
1
+ /** Parse and normalize a curl command */
2
+ export declare function parseCurlCommand(curlCommand: string): {
3
+ queryParameters: {
4
+ [x: string]: string;
5
+ };
6
+ url: string;
7
+ method?: string;
8
+ headers?: Record<string, string>;
9
+ body?: string;
10
+ servers?: string[];
11
+ };
12
+ //# sourceMappingURL=parse-curl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-curl.d.ts","sourceRoot":"","sources":["../../src/libs/parse-curl.ts"],"names":[],"mappings":"AAEA,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM;;;;SAW3C,MAAM;aACF,MAAM;cACL,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;WACzB,MAAM;cAEH,MAAM,EAAE;EA0DrB"}
@@ -0,0 +1,70 @@
1
+ import { parse as c } from "shell-quote";
2
+ function v(a) {
3
+ const r = c(a).map((s) => typeof s == "object" && "op" in s && s.op === "glob" ? s.pattern.trim() : typeof s == "string" ? s.trim() : s).filter((s) => s !== ""), e = { url: "" }, i = r[Symbol.iterator]();
4
+ let t = i.next().value;
5
+ for (; t; ) {
6
+ if (typeof t == "object" && "op" in t) {
7
+ t = i.next().value;
8
+ continue;
9
+ }
10
+ if (t === "-X" || t === "--request")
11
+ m(i, e);
12
+ else if (t === "--url")
13
+ o(i, e);
14
+ else if (t === "-H" || t === "--header")
15
+ f(i, e);
16
+ else if (t === "--data" || t === "-d" || t === "--data-raw" || t === "--data-urlencode" || t === "--data-binary" || t === "--data-ascii") {
17
+ const s = i.next().value;
18
+ typeof s == "string" && (e.body = s);
19
+ } else typeof t == "string" && !e.url && (t.startsWith("http") || t.startsWith("www.")) ? o([t][Symbol.iterator](), e) : t === "-P" ? p(i, e) : typeof t == "string" && t.toLowerCase().includes("content-type") ? h(t, e) : t === "-u" || t === "--user" ? u(i, e) : (t === "-b" || t === "--cookie") && l(i, e);
20
+ t = i.next().value;
21
+ }
22
+ return {
23
+ ...e,
24
+ queryParameters: {
25
+ ...d(e.url),
26
+ ...e.queryParameters
27
+ }
28
+ };
29
+ }
30
+ function m(a, r) {
31
+ r.method = a.next().value.toLowerCase();
32
+ }
33
+ function o(a, r) {
34
+ const e = new URL(a.next().value.replace(/['"]/g, ""));
35
+ r.servers = [e.origin], r.path = e.pathname !== "/" ? e.pathname : "", r.url = r.servers[0] + r.path, r.queryParameters = r.queryParameters || {};
36
+ const i = e.search.substring(1);
37
+ i && i.split("&").forEach((t) => {
38
+ p([t][Symbol.iterator](), r);
39
+ });
40
+ }
41
+ function f(a, r) {
42
+ const e = a.next().value.replace(/['"]/g, "").split(/:(.*)/);
43
+ r.headers = r.headers || {}, e[1] !== void 0 ? r.headers[e[0].trim()] = e[1].trim() : r.headers[e[0].trim()] = "";
44
+ }
45
+ function p(a, r) {
46
+ const e = a.next().value.replace(/['"]/g, "").split("=");
47
+ r.queryParameters = r.queryParameters || {}, e[1] !== void 0 ? r.queryParameters[e[0].trim()] = e[1].trim() : r.queryParameters[e[0].trim()] = "";
48
+ }
49
+ function d(a) {
50
+ const r = a.indexOf("?"), e = {};
51
+ return r !== -1 && (a.substring(r + 1).split("&") || []).forEach((s) => {
52
+ const n = s.split("=");
53
+ e[n[0]] = n[1];
54
+ }), e;
55
+ }
56
+ function h(a, r) {
57
+ const e = a.replace(/['"]/g, "").split(/:(.+)/);
58
+ r.headers = r.headers || {}, e[1] !== void 0 ? r.headers[e[0].trim()] = e[1].trim() : r.headers[e[0].trim()] = "";
59
+ }
60
+ function u(a, r) {
61
+ const e = a.next().value.split(":");
62
+ r.headers = r.headers || {}, r.headers.Authorization = e[1];
63
+ }
64
+ function l(a, r) {
65
+ const e = a.next().value;
66
+ r.headers = r.headers || {}, r.headers.Cookie = e;
67
+ }
68
+ export {
69
+ v as parseCurlCommand
70
+ };
package/dist/router.d.ts CHANGED
@@ -7,7 +7,8 @@ export declare enum PathId {
7
7
  Schema = "schema",
8
8
  Environment = "environment",
9
9
  Servers = "servers",
10
- Workspace = "workspace"
10
+ Workspace = "workspace",
11
+ Settings = "settings"
11
12
  }
12
13
  /** Routes required by the API client modal */
13
14
  export declare const modalRoutes: ({
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAM7B,MAAM,YAAY,CAAA;AAEnB,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAwBD,8CAA8C;AAC9C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;IAaI,CAAA;AA2E5B,oCAAoC;AACpC,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,mCAI5B,CAAA;AAEJ,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,mCAI1B,CAAA;AAKJ,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,EAAE,EAAE,uBAAuB,QAGxD;AAED,+DAA+D;AAC/D,wBAAgB,0BAA0B,WAGzC;AAED,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAM7B,MAAM,YAAY,CAAA;AAEnB,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAwBD,8CAA8C;AAC9C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;IAaI,CAAA;AAoF5B,oCAAoC;AACpC,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,mCAI5B,CAAA;AAEJ,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,mCAI1B,CAAA;AAKJ,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,EAAE,EAAE,uBAAuB,QAGxD;AAED,+DAA+D;AAC/D,wBAAgB,0BAA0B,WAGzC;AAED,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}
package/dist/router.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRouter as a, createWebHistory as l, createWebHashHistory as i, createMemoryHistory as m } from "vue-router";
2
- var f = /* @__PURE__ */ ((e) => (e.Request = "request", e.Examples = "examples", e.Cookies = "cookies", e.Collection = "collection", e.Schema = "schema", e.Environment = "environment", e.Servers = "servers", e.Workspace = "workspace", e))(f || {});
3
- const p = [
2
+ var f = /* @__PURE__ */ ((e) => (e.Request = "request", e.Examples = "examples", e.Cookies = "cookies", e.Collection = "collection", e.Schema = "schema", e.Environment = "environment", e.Servers = "servers", e.Workspace = "workspace", e.Settings = "settings", e))(f || {});
3
+ const n = [
4
4
  {
5
5
  path: "",
6
6
  redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/request/default`
@@ -30,9 +30,9 @@ const p = [
30
30
  },
31
31
  {
32
32
  path: "/workspace/:workspace",
33
- children: p
33
+ children: n
34
34
  }
35
- ], u = [
35
+ ], p = [
36
36
  {
37
37
  path: "/",
38
38
  redirect: c
@@ -44,7 +44,7 @@ const p = [
44
44
  {
45
45
  path: "/workspace/:workspace",
46
46
  children: [
47
- ...p,
47
+ ...n,
48
48
  // {
49
49
  // path: 'collection',
50
50
  // redirect: (to) =>
@@ -99,44 +99,53 @@ const p = [
99
99
  name: "servers",
100
100
  path: "servers/:servers",
101
101
  component: () => import("./views/Servers/Servers.vue.js")
102
+ },
103
+ {
104
+ path: "settings",
105
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/general`
106
+ },
107
+ {
108
+ name: "settings",
109
+ path: "settings/:settings",
110
+ component: () => import("./views/Settings/Settings.vue.js")
102
111
  }
103
112
  ]
104
113
  }
105
- ], r = a({
114
+ ], t = a({
106
115
  history: l(),
107
- routes: u
108
- }), d = () => a({
116
+ routes: p
117
+ }), k = () => a({
109
118
  history: i(),
110
- routes: u
111
- }), v = () => a({
119
+ routes: p
120
+ }), d = () => a({
112
121
  history: m(),
113
122
  routes: h
114
- }), n = "activeWorkspace";
115
- function $(e) {
116
- const t = e.params.workspace;
117
- t && localStorage.setItem(n, `${t}`);
123
+ }), u = "activeWorkspace";
124
+ function v(e) {
125
+ const r = e.params.workspace;
126
+ r && localStorage.setItem(u, `${r}`);
118
127
  }
119
128
  function c() {
120
- return `/workspace/${localStorage.getItem(n) ?? "default"}/request/default`;
129
+ return `/workspace/${localStorage.getItem(u) ?? "default"}/request/default`;
121
130
  }
122
- function w(e, t) {
131
+ function w(e, r) {
123
132
  var o, s;
124
- r.currentRoute.value && // If the item is missing then we know the UID is no longer in use and redirect to the default
125
- !t && ((o = r.currentRoute.value) != null && o.params[e]) && ((s = r.currentRoute.value) == null ? void 0 : s.params[e]) !== "default" && // We only redirect if the key is missing for the matching route
126
- r.currentRoute.value.path.includes(e) && r.push({
133
+ t.currentRoute.value && // If the item is missing then we know the UID is no longer in use and redirect to the default
134
+ !r && ((o = t.currentRoute.value) != null && o.params[e]) && ((s = t.currentRoute.value) == null ? void 0 : s.params[e]) !== "default" && // We only redirect if the key is missing for the matching route
135
+ t.currentRoute.value.path.includes(e) && t.push({
127
136
  params: {
128
- ...r.currentRoute.value.params,
137
+ ...t.currentRoute.value.params,
129
138
  [e]: "default"
130
139
  }
131
140
  });
132
141
  }
133
142
  export {
134
143
  f as PathId,
135
- v as createModalRouter,
136
- d as createWebHashRouter,
144
+ d as createModalRouter,
145
+ k as createWebHashRouter,
137
146
  w as fallbackMissingParams,
138
147
  h as modalRoutes,
139
148
  c as redirectToDefaultWorkspace,
140
- r as router,
141
- $ as saveWorkspace
149
+ t as router,
150
+ v as saveWorkspace
142
151
  };
@@ -197,7 +197,7 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
197
197
  components?: Record<string, unknown> | undefined;
198
198
  webhooks?: Record<string, unknown> | undefined;
199
199
  }) => void;
200
- edit: <P extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" | `children.${number}` | `tags.${number}` | `requests.${number}` | `servers.${number}` | `securitySchemes.${number}` | `components.${string}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.name" | "info.contact.url" | "info.contact.email" | "info.license.name" | "info.license.url" | "info.license.identifier" | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `webhooks.${string}` | `auth.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? {
200
+ edit: <P extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `servers.${number}` | `tags.${number}` | `requests.${number}` | `securitySchemes.${number}` | `components.${string}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | `webhooks.${string}` | `auth.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? {
201
201
  type: "collection";
202
202
  uid: string;
203
203
  children: string[];
@@ -260,7 +260,7 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
260
260
  } | undefined;
261
261
  components?: Record<string, unknown> | undefined;
262
262
  webhooks?: Record<string, unknown> | undefined;
263
- }[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? R extends import("@scalar/object-utils/nested").Path<{
263
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? R extends import("@scalar/object-utils/nested").Path<{
264
264
  type: "collection";
265
265
  uid: string;
266
266
  children: string[];
@@ -387,7 +387,7 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
387
387
  components?: Record<string, unknown> | undefined;
388
388
  webhooks?: Record<string, unknown> | undefined;
389
389
  }[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
390
- untrackedEdit: <P extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" | `children.${number}` | `tags.${number}` | `requests.${number}` | `servers.${number}` | `securitySchemes.${number}` | `components.${string}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.name" | "info.contact.url" | "info.contact.email" | "info.license.name" | "info.license.url" | "info.license.identifier" | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `webhooks.${string}` | `auth.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? {
390
+ untrackedEdit: <P extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `servers.${number}` | `tags.${number}` | `requests.${number}` | `securitySchemes.${number}` | `components.${string}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | `webhooks.${string}` | `auth.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? {
391
391
  type: "collection";
392
392
  uid: string;
393
393
  children: string[];
@@ -450,7 +450,7 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
450
450
  } | undefined;
451
451
  components?: Record<string, unknown> | undefined;
452
452
  webhooks?: Record<string, unknown> | undefined;
453
- }[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "tags" | "requests" | "servers" | "securitySchemes" | "components" | "openapi" | "info" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? R extends import("@scalar/object-utils/nested").Path<{
453
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "info" | "servers" | "tags" | "requests" | "securitySchemes" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "uid" | "selectedServerUid" | "x-scalar-icon" | "auth" ? R extends import("@scalar/object-utils/nested").Path<{
454
454
  type: "collection";
455
455
  uid: string;
456
456
  children: string[];
@@ -41,7 +41,7 @@ export declare function createStoreCookies(useLocalStorage: boolean): {
41
41
  partitioned?: boolean | undefined;
42
42
  secure?: boolean | undefined;
43
43
  }) => void;
44
- edit: <P extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure">(uid: string, path: P, value: P extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? {
44
+ edit: <P extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure">(uid: string, path: P, value: P extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? {
45
45
  value: string;
46
46
  uid: string;
47
47
  name: string;
@@ -53,7 +53,7 @@ export declare function createStoreCookies(useLocalStorage: boolean): {
53
53
  maxAge?: number | undefined;
54
54
  partitioned?: boolean | undefined;
55
55
  secure?: boolean | undefined;
56
- }[P] : P extends `${infer K}.${infer R}` ? K extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? R extends import("@scalar/object-utils/nested").Path<{
56
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? R extends import("@scalar/object-utils/nested").Path<{
57
57
  value: string;
58
58
  uid: string;
59
59
  name: string;
@@ -78,7 +78,7 @@ export declare function createStoreCookies(useLocalStorage: boolean): {
78
78
  partitioned?: boolean | undefined;
79
79
  secure?: boolean | undefined;
80
80
  }[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
81
- untrackedEdit: <P extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure">(uid: string, path: P, value: P extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? {
81
+ untrackedEdit: <P extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure">(uid: string, path: P, value: P extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? {
82
82
  value: string;
83
83
  uid: string;
84
84
  name: string;
@@ -90,7 +90,7 @@ export declare function createStoreCookies(useLocalStorage: boolean): {
90
90
  maxAge?: number | undefined;
91
91
  partitioned?: boolean | undefined;
92
92
  secure?: boolean | undefined;
93
- }[P] : P extends `${infer K}.${infer R}` ? K extends "path" | "name" | "value" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? R extends import("@scalar/object-utils/nested").Path<{
93
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "path" | "value" | "name" | "uid" | "domain" | "sameSite" | "expires" | "httpOnly" | "maxAge" | "partitioned" | "secure" ? R extends import("@scalar/object-utils/nested").Path<{
94
94
  value: string;
95
95
  uid: string;
96
96
  name: string;
@@ -24,13 +24,13 @@ export declare function createStoreEnvironments(useLocalStorage: boolean): {
24
24
  color: string;
25
25
  isDefault?: boolean | undefined;
26
26
  }) => void;
27
- edit: <P extends "name" | "value" | "uid" | "color" | "isDefault">(uid: string, path: P, value: P extends "name" | "value" | "uid" | "color" | "isDefault" ? {
27
+ edit: <P extends "color" | "value" | "name" | "uid" | "isDefault">(uid: string, path: P, value: P extends "color" | "value" | "name" | "uid" | "isDefault" ? {
28
28
  value: string;
29
29
  uid: string;
30
30
  name: string;
31
31
  color: string;
32
32
  isDefault?: boolean | undefined;
33
- }[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "value" | "uid" | "color" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
33
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "color" | "value" | "name" | "uid" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
34
34
  value: string;
35
35
  uid: string;
36
36
  name: string;
@@ -43,13 +43,13 @@ export declare function createStoreEnvironments(useLocalStorage: boolean): {
43
43
  color: string;
44
44
  isDefault?: boolean | undefined;
45
45
  }[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
46
- untrackedEdit: <P extends "name" | "value" | "uid" | "color" | "isDefault">(uid: string, path: P, value: P extends "name" | "value" | "uid" | "color" | "isDefault" ? {
46
+ untrackedEdit: <P extends "color" | "value" | "name" | "uid" | "isDefault">(uid: string, path: P, value: P extends "color" | "value" | "name" | "uid" | "isDefault" ? {
47
47
  value: string;
48
48
  uid: string;
49
49
  name: string;
50
50
  color: string;
51
51
  isDefault?: boolean | undefined;
52
- }[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "value" | "uid" | "color" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
52
+ }[P] : P extends `${infer K}.${infer R}` ? K extends "color" | "value" | "name" | "uid" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
53
53
  value: string;
54
54
  uid: string;
55
55
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/store/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAGhD,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,GACX,EAAE,YAAY;4BAEJ,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CAQjB,IAAI,CAAC,SAAS,CAAC,4BACP,mBAAmB,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAsE81W,CAAC;;;;;;uBAAqK,CAAC;mBAAqC,CAAC;0BAA4C,CAAC;mBAAqC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;6BA3B57X,MAAM,UACH,MAAM,oBACI,IAAI,CAAC,SAAS,CAAC,4BACP,mBAAmB,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwB81W,CAAC;;;;;;uBAAqK,CAAC;mBAAqC,CAAC;0BAA4C,CAAC;mBAAqC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;EADp8X"}
1
+ {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/store/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAGhD,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,GACX,EAAE,YAAY;4BAEJ,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CAQjB,IAAI,CAAC,SAAS,CAAC,4BACP,mBAAmB,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAmE09W,CAAC;;;;;;uBAAqK,CAAC;mBAAqC,CAAC;0BAA4C,CAAC;mBAAqC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;6BAtBxjY,MAAM,UACH,MAAM,oBACI,IAAI,CAAC,SAAS,CAAC,4BACP,mBAAmB,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAmB09W,CAAC;;;;;;uBAAqK,CAAC;mBAAqC,CAAC;0BAA4C,CAAC;mBAAqC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;EADhkY"}