@scalar/api-client 2.2.48 → 2.2.50
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.
- package/CHANGELOG.md +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +15 -3
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +102 -94
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +54 -58
- package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +95 -93
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +1 -3
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -22
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +12 -12
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +54 -49
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +9 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -8
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +36 -30
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -15
- package/dist/components/Form/Form.vue.d.ts +3 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +30 -25
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +41 -41
- package/dist/components/ImportCollection/ImportNowButton.vue.js +24 -24
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +13 -13
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +19 -19
- package/dist/layouts/App/create-api-client-app.d.ts +387 -477
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +774 -954
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +387 -477
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +390 -479
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +3 -15
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +7 -7
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +3 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +11 -15
- package/dist/libs/hot-keys.test.d.ts +2 -0
- package/dist/libs/hot-keys.test.d.ts.map +1 -0
- package/dist/libs/index.js +27 -26
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/build-request-security.js +19 -16
- package/dist/libs/send-request/create-request-operation.test.d.ts +10 -10
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +37 -34
- package/dist/store/active-entities.d.ts +58 -67
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +61 -74
- package/dist/store/collections.d.ts +90 -90
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -17
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +19 -18
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +2 -8
- package/dist/store/import-spec.d.ts +16 -106
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +9 -14
- package/dist/store/request-example.d.ts +25 -25
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +15 -20
- package/dist/store/requests.d.ts +84 -84
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +17 -40
- package/dist/store/router-params.d.ts +13 -11
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +5 -5
- package/dist/store/security-schemes.d.ts +58 -58
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +1 -3
- package/dist/store/servers.d.ts +17 -17
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +2 -9
- package/dist/store/store.d.ts +387 -477
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +2 -4
- package/dist/store/tags.d.ts +28 -28
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +19 -34
- package/dist/store/workspace.d.ts +36 -36
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +1 -5
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -18
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +24 -24
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +140 -132
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +15 -15
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +160 -141
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +6 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +99 -95
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +70 -64
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +40 -34
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +32 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +93 -85
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +9 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +214 -244
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +10 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +77 -80
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +89 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +10 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +59 -66
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +11 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +176 -155
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +97 -100
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +31 -22
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +2 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +11 -13
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +50 -48
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +38 -44
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +10 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +77 -69
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +4 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +41 -39
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +56 -52
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +68 -68
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +38 -55
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +28 -29
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -65
- package/dist/views/Request/libs/request.d.ts +5 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +37 -2
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +10 -34
- package/dist/views/Servers/ServerForm.vue.d.ts +1 -8
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +21 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +73 -81
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +118 -134
- package/package.json +14 -14
|
@@ -5,17 +5,16 @@ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
|
5
5
|
export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
6
6
|
collections: Record<string, {
|
|
7
7
|
type: "collection";
|
|
8
|
-
uid: string
|
|
9
|
-
children: string[];
|
|
8
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
9
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
10
10
|
openapi: string;
|
|
11
11
|
security: Record<string, string[]>[];
|
|
12
12
|
'x-scalar-icon': string;
|
|
13
13
|
securitySchemes: string[];
|
|
14
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tags: string[];
|
|
14
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
15
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
16
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
17
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
19
18
|
watchMode: boolean;
|
|
20
19
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
21
20
|
externalDocs?: {
|
|
@@ -52,26 +51,26 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
52
51
|
color?: string | undefined;
|
|
53
52
|
}> | undefined;
|
|
54
53
|
'x-scalar-secrets'?: Record<string, {
|
|
55
|
-
description?: string | undefined;
|
|
56
54
|
example?: string | undefined;
|
|
55
|
+
description?: string | undefined;
|
|
57
56
|
}> | undefined;
|
|
57
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
58
58
|
documentUrl?: string | undefined;
|
|
59
59
|
integration?: string | null | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
collectionMutators: {
|
|
62
62
|
add: (item: {
|
|
63
63
|
type: "collection";
|
|
64
|
-
uid: string
|
|
65
|
-
children: string[];
|
|
64
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
65
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
66
66
|
openapi: string;
|
|
67
67
|
security: Record<string, string[]>[];
|
|
68
68
|
'x-scalar-icon': string;
|
|
69
69
|
securitySchemes: string[];
|
|
70
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
tags: string[];
|
|
70
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
71
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
72
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
73
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
75
74
|
watchMode: boolean;
|
|
76
75
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
77
76
|
externalDocs?: {
|
|
@@ -108,26 +107,26 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
108
107
|
color?: string | undefined;
|
|
109
108
|
}> | undefined;
|
|
110
109
|
'x-scalar-secrets'?: Record<string, {
|
|
111
|
-
description?: string | undefined;
|
|
112
110
|
example?: string | undefined;
|
|
111
|
+
description?: string | undefined;
|
|
113
112
|
}> | undefined;
|
|
113
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
114
114
|
documentUrl?: string | undefined;
|
|
115
115
|
integration?: string | null | undefined;
|
|
116
116
|
}) => void;
|
|
117
|
-
delete: (uid: string) => void;
|
|
117
|
+
delete: (uid: (string & import("zod").BRAND<"collection">) | null | undefined) => void;
|
|
118
118
|
set: (item: {
|
|
119
119
|
type: "collection";
|
|
120
|
-
uid: string
|
|
121
|
-
children: string[];
|
|
120
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
121
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
122
122
|
openapi: string;
|
|
123
123
|
security: Record<string, string[]>[];
|
|
124
124
|
'x-scalar-icon': string;
|
|
125
125
|
securitySchemes: string[];
|
|
126
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
tags: string[];
|
|
126
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
127
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
128
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
129
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
131
130
|
watchMode: boolean;
|
|
132
131
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
133
132
|
externalDocs?: {
|
|
@@ -164,25 +163,25 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
164
163
|
color?: string | undefined;
|
|
165
164
|
}> | undefined;
|
|
166
165
|
'x-scalar-secrets'?: Record<string, {
|
|
167
|
-
description?: string | undefined;
|
|
168
166
|
example?: string | undefined;
|
|
167
|
+
description?: string | undefined;
|
|
169
168
|
}> | undefined;
|
|
169
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
170
170
|
documentUrl?: string | undefined;
|
|
171
171
|
integration?: string | null | undefined;
|
|
172
172
|
}) => void;
|
|
173
|
-
edit: <P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "
|
|
173
|
+
edit: <P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `requests.${number}` | `x-scalar-environments.${string}` | `children.${number}` | `securitySchemes.${number}` | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | "info.summary" | "info.description" | "info.title" | "info.version" | "info.termsOfService" | "info.contact" | "info.license" | "info.contact.name" | "info.contact.url" | "info.contact.email" | "info.license.name" | "info.license.url" | "info.license.identifier" | `components.${string}` | `webhooks.${string}` | `x-scalar-secrets.${string}`>(uid: (string & import("zod").BRAND<"collection">) | null | undefined, path: P, value: P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" ? {
|
|
174
174
|
type: "collection";
|
|
175
|
-
uid: string
|
|
176
|
-
children: string[];
|
|
175
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
176
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
177
177
|
openapi: string;
|
|
178
178
|
security: Record<string, string[]>[];
|
|
179
179
|
'x-scalar-icon': string;
|
|
180
180
|
securitySchemes: string[];
|
|
181
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
tags: string[];
|
|
181
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
182
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
183
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
184
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
186
185
|
watchMode: boolean;
|
|
187
186
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
188
187
|
externalDocs?: {
|
|
@@ -219,24 +218,24 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
219
218
|
color?: string | undefined;
|
|
220
219
|
}> | undefined;
|
|
221
220
|
'x-scalar-secrets'?: Record<string, {
|
|
222
|
-
description?: string | undefined;
|
|
223
221
|
example?: string | undefined;
|
|
222
|
+
description?: string | undefined;
|
|
224
223
|
}> | undefined;
|
|
224
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
225
225
|
documentUrl?: string | undefined;
|
|
226
226
|
integration?: string | null | undefined;
|
|
227
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "
|
|
227
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
228
228
|
type: "collection";
|
|
229
|
-
uid: string
|
|
230
|
-
children: string[];
|
|
229
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
230
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
231
231
|
openapi: string;
|
|
232
232
|
security: Record<string, string[]>[];
|
|
233
233
|
'x-scalar-icon': string;
|
|
234
234
|
securitySchemes: string[];
|
|
235
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
tags: string[];
|
|
235
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
236
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
237
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
238
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
240
239
|
watchMode: boolean;
|
|
241
240
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
242
241
|
externalDocs?: {
|
|
@@ -273,24 +272,24 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
273
272
|
color?: string | undefined;
|
|
274
273
|
}> | undefined;
|
|
275
274
|
'x-scalar-secrets'?: Record<string, {
|
|
276
|
-
description?: string | undefined;
|
|
277
275
|
example?: string | undefined;
|
|
276
|
+
description?: string | undefined;
|
|
278
277
|
}> | undefined;
|
|
278
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
279
279
|
documentUrl?: string | undefined;
|
|
280
280
|
integration?: string | null | undefined;
|
|
281
281
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
282
282
|
type: "collection";
|
|
283
|
-
uid: string
|
|
284
|
-
children: string[];
|
|
283
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
284
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
285
285
|
openapi: string;
|
|
286
286
|
security: Record<string, string[]>[];
|
|
287
287
|
'x-scalar-icon': string;
|
|
288
288
|
securitySchemes: string[];
|
|
289
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
tags: string[];
|
|
289
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
290
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
291
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
292
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
294
293
|
watchMode: boolean;
|
|
295
294
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
296
295
|
externalDocs?: {
|
|
@@ -327,25 +326,25 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
327
326
|
color?: string | undefined;
|
|
328
327
|
}> | undefined;
|
|
329
328
|
'x-scalar-secrets'?: Record<string, {
|
|
330
|
-
description?: string | undefined;
|
|
331
329
|
example?: string | undefined;
|
|
330
|
+
description?: string | undefined;
|
|
332
331
|
}> | undefined;
|
|
332
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
333
333
|
documentUrl?: string | undefined;
|
|
334
334
|
integration?: string | null | undefined;
|
|
335
335
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
336
|
-
untrackedEdit: <P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "
|
|
336
|
+
untrackedEdit: <P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `requests.${number}` | `x-scalar-environments.${string}` | `children.${number}` | `securitySchemes.${number}` | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | "info.summary" | "info.description" | "info.title" | "info.version" | "info.termsOfService" | "info.contact" | "info.license" | "info.contact.name" | "info.contact.url" | "info.contact.email" | "info.license.name" | "info.license.url" | "info.license.identifier" | `components.${string}` | `webhooks.${string}` | `x-scalar-secrets.${string}`>(uid: string & import("zod").BRAND<"collection">, path: P, value: P extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" ? {
|
|
337
337
|
type: "collection";
|
|
338
|
-
uid: string
|
|
339
|
-
children: string[];
|
|
338
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
339
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
340
340
|
openapi: string;
|
|
341
341
|
security: Record<string, string[]>[];
|
|
342
342
|
'x-scalar-icon': string;
|
|
343
343
|
securitySchemes: string[];
|
|
344
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
tags: string[];
|
|
344
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
345
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
346
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
347
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
349
348
|
watchMode: boolean;
|
|
350
349
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
351
350
|
externalDocs?: {
|
|
@@ -382,24 +381,24 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
382
381
|
color?: string | undefined;
|
|
383
382
|
}> | undefined;
|
|
384
383
|
'x-scalar-secrets'?: Record<string, {
|
|
385
|
-
description?: string | undefined;
|
|
386
384
|
example?: string | undefined;
|
|
385
|
+
description?: string | undefined;
|
|
387
386
|
}> | undefined;
|
|
387
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
388
388
|
documentUrl?: string | undefined;
|
|
389
389
|
integration?: string | null | undefined;
|
|
390
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "
|
|
390
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "tags" | "security" | "externalDocs" | "type" | "uid" | "requests" | "x-scalar-environments" | "children" | "openapi" | "x-scalar-icon" | "securitySchemes" | "selectedSecuritySchemeUids" | "watchMode" | "watchModeStatus" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-active-environment" | "x-scalar-secrets" | "selectedServerUid" | "documentUrl" | "integration" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
391
391
|
type: "collection";
|
|
392
|
-
uid: string
|
|
393
|
-
children: string[];
|
|
392
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
393
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
394
394
|
openapi: string;
|
|
395
395
|
security: Record<string, string[]>[];
|
|
396
396
|
'x-scalar-icon': string;
|
|
397
397
|
securitySchemes: string[];
|
|
398
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
tags: string[];
|
|
398
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
399
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
400
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
401
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
403
402
|
watchMode: boolean;
|
|
404
403
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
405
404
|
externalDocs?: {
|
|
@@ -436,24 +435,24 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
436
435
|
color?: string | undefined;
|
|
437
436
|
}> | undefined;
|
|
438
437
|
'x-scalar-secrets'?: Record<string, {
|
|
439
|
-
description?: string | undefined;
|
|
440
438
|
example?: string | undefined;
|
|
439
|
+
description?: string | undefined;
|
|
441
440
|
}> | undefined;
|
|
441
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
442
442
|
documentUrl?: string | undefined;
|
|
443
443
|
integration?: string | null | undefined;
|
|
444
444
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
445
445
|
type: "collection";
|
|
446
|
-
uid: string
|
|
447
|
-
children: string[];
|
|
446
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
447
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
448
448
|
openapi: string;
|
|
449
449
|
security: Record<string, string[]>[];
|
|
450
450
|
'x-scalar-icon': string;
|
|
451
451
|
securitySchemes: string[];
|
|
452
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
tags: string[];
|
|
452
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
453
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
454
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
455
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
457
456
|
watchMode: boolean;
|
|
458
457
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
459
458
|
externalDocs?: {
|
|
@@ -490,32 +489,32 @@ export declare function createStoreCollections(useLocalStorage: boolean): {
|
|
|
490
489
|
color?: string | undefined;
|
|
491
490
|
}> | undefined;
|
|
492
491
|
'x-scalar-secrets'?: Record<string, {
|
|
493
|
-
description?: string | undefined;
|
|
494
492
|
example?: string | undefined;
|
|
493
|
+
description?: string | undefined;
|
|
495
494
|
}> | undefined;
|
|
495
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
496
496
|
documentUrl?: string | undefined;
|
|
497
497
|
integration?: string | null | undefined;
|
|
498
498
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
499
|
-
undo: (uid: string) => void;
|
|
500
|
-
redo: (uid: string) => void;
|
|
499
|
+
undo: (uid: string & import("zod").BRAND<"collection">) => void;
|
|
500
|
+
redo: (uid: string & import("zod").BRAND<"collection">) => void;
|
|
501
501
|
reset: () => void;
|
|
502
502
|
};
|
|
503
503
|
};
|
|
504
504
|
/** Extended mutators and data for collections that required workspace access */
|
|
505
505
|
export declare function extendedCollectionDataFactory({ requests, requestMutators, requestExamples, requestExampleMutators, workspaces, workspaceMutators, collections, collectionMutators, tagMutators, serverMutators, }: StoreContext): {
|
|
506
|
-
addCollection: (payload: CollectionPayload, workspaceUid:
|
|
506
|
+
addCollection: (payload: CollectionPayload, workspaceUid: Workspace["uid"]) => {
|
|
507
507
|
type: "collection";
|
|
508
|
-
uid: string
|
|
509
|
-
children: string[];
|
|
508
|
+
uid: string & import("zod").BRAND<"collection">;
|
|
509
|
+
children: ((string & import("zod").BRAND<"tag">) | (string & import("zod").BRAND<"operation">))[];
|
|
510
510
|
openapi: string;
|
|
511
511
|
security: Record<string, string[]>[];
|
|
512
512
|
'x-scalar-icon': string;
|
|
513
513
|
securitySchemes: string[];
|
|
514
|
-
selectedSecuritySchemeUids: (string | string[])[];
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
tags: string[];
|
|
514
|
+
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
515
|
+
servers: (string & import("zod").BRAND<"server">)[];
|
|
516
|
+
requests: (string & import("zod").BRAND<"operation">)[];
|
|
517
|
+
tags: (string & import("zod").BRAND<"tag">)[];
|
|
519
518
|
watchMode: boolean;
|
|
520
519
|
watchModeStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
521
520
|
externalDocs?: {
|
|
@@ -552,14 +551,15 @@ export declare function extendedCollectionDataFactory({ requests, requestMutator
|
|
|
552
551
|
color?: string | undefined;
|
|
553
552
|
}> | undefined;
|
|
554
553
|
'x-scalar-secrets'?: Record<string, {
|
|
555
|
-
description?: string | undefined;
|
|
556
554
|
example?: string | undefined;
|
|
555
|
+
description?: string | undefined;
|
|
557
556
|
}> | undefined;
|
|
557
|
+
selectedServerUid?: (string & import("zod").BRAND<"server">) | undefined;
|
|
558
558
|
documentUrl?: string | undefined;
|
|
559
559
|
integration?: string | null | undefined;
|
|
560
560
|
};
|
|
561
561
|
deleteCollection: (collection: Collection, workspace: Workspace) => void;
|
|
562
|
-
addCollectionEnvironment: (environmentName: string, environment: XScalarEnvironment, collectionUid:
|
|
563
|
-
removeCollectionEnvironment: (environmentName: string, collectionUid:
|
|
562
|
+
addCollectionEnvironment: (environmentName: string, environment: XScalarEnvironment, collectionUid: Collection["uid"]) => void;
|
|
563
|
+
removeCollectionEnvironment: (environmentName: string, collectionUid: Collection["uid"]) => void;
|
|
564
564
|
};
|
|
565
565
|
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/store/collections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAKrE,yCAAyC;AACzC,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,OAAO
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/store/collections.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,11 +3,7 @@ import { LS_KEYS as p } from "@scalar/oas-utils/helpers";
|
|
|
3
3
|
import { mutationFactory as S } from "@scalar/object-utils/mutator-record";
|
|
4
4
|
import { reactive as u } from "vue";
|
|
5
5
|
function T(s) {
|
|
6
|
-
const i = u({}), a = S(
|
|
7
|
-
i,
|
|
8
|
-
u({}),
|
|
9
|
-
s && p.COLLECTION
|
|
10
|
-
);
|
|
6
|
+
const i = u({}), a = S(i, u({}), s && p.COLLECTION);
|
|
11
7
|
return {
|
|
12
8
|
collections: i,
|
|
13
9
|
collectionMutators: a
|
|
@@ -28,10 +24,7 @@ function Y({
|
|
|
28
24
|
return {
|
|
29
25
|
addCollection: (e, o) => {
|
|
30
26
|
const t = x.parse(e), n = C[o];
|
|
31
|
-
return n && d.edit(o, "collections", [
|
|
32
|
-
...n.collections,
|
|
33
|
-
t.uid
|
|
34
|
-
]), l.add(t), t;
|
|
27
|
+
return n && d.edit(o, "collections", [...n.collections, t.uid]), l.add(t), t;
|
|
35
28
|
},
|
|
36
29
|
deleteCollection: (e, o) => {
|
|
37
30
|
var t, n;
|
|
@@ -46,9 +39,7 @@ function Y({
|
|
|
46
39
|
}
|
|
47
40
|
e.tags.forEach((r) => E.delete(r)), e.requests.forEach((r) => {
|
|
48
41
|
const f = s[r];
|
|
49
|
-
f && (i.delete(r), f.examples.forEach(
|
|
50
|
-
(m) => a[m] && v.delete(m)
|
|
51
|
-
));
|
|
42
|
+
f && (i.delete(r), f.examples.forEach((m) => a[m] && v.delete(m)));
|
|
52
43
|
}), e.servers.forEach((r) => {
|
|
53
44
|
r && h.delete(r);
|
|
54
45
|
}), d.edit(
|
|
@@ -72,11 +63,7 @@ function Y({
|
|
|
72
63
|
const t = c[o];
|
|
73
64
|
if (t) {
|
|
74
65
|
const n = t["x-scalar-environments"] || {};
|
|
75
|
-
e in n && (delete n[e], l.edit(
|
|
76
|
-
o,
|
|
77
|
-
"x-scalar-environments",
|
|
78
|
-
n
|
|
79
|
-
));
|
|
66
|
+
e in n && (delete n[e], l.edit(o, "x-scalar-environments", n));
|
|
80
67
|
}
|
|
81
68
|
}
|
|
82
69
|
};
|
package/dist/store/cookies.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare function createStoreCookies(useLocalStorage: boolean): {
|
|
3
3
|
cookies: Record<string, {
|
|
4
4
|
value: string;
|
|
5
|
-
uid: string
|
|
5
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
6
6
|
name: string;
|
|
7
7
|
path?: string | undefined;
|
|
8
8
|
domain?: string | undefined;
|
|
@@ -10,59 +10,59 @@ export declare function createStoreCookies(useLocalStorage: boolean): {
|
|
|
10
10
|
cookieMutators: {
|
|
11
11
|
add: (item: {
|
|
12
12
|
value: string;
|
|
13
|
-
uid: string
|
|
13
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
14
14
|
name: string;
|
|
15
15
|
path?: string | undefined;
|
|
16
16
|
domain?: string | undefined;
|
|
17
17
|
}) => void;
|
|
18
|
-
delete: (uid: string) => void;
|
|
18
|
+
delete: (uid: (string & import("zod").BRAND<"cookie">) | null | undefined) => void;
|
|
19
19
|
set: (item: {
|
|
20
20
|
value: string;
|
|
21
|
-
uid: string
|
|
21
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
22
22
|
name: string;
|
|
23
23
|
path?: string | undefined;
|
|
24
24
|
domain?: string | undefined;
|
|
25
25
|
}) => void;
|
|
26
|
-
edit: <P extends "name" | "uid" | "path" | "value" | "domain">(uid: string, path: P, value: P extends "name" | "uid" | "path" | "value" | "domain" ? {
|
|
26
|
+
edit: <P extends "name" | "uid" | "path" | "value" | "domain">(uid: (string & import("zod").BRAND<"cookie">) | null | undefined, path: P, value: P extends "name" | "uid" | "path" | "value" | "domain" ? {
|
|
27
27
|
value: string;
|
|
28
|
-
uid: string
|
|
28
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
29
29
|
name: string;
|
|
30
30
|
path?: string | undefined;
|
|
31
31
|
domain?: string | undefined;
|
|
32
32
|
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "path" | "value" | "domain" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
33
33
|
value: string;
|
|
34
|
-
uid: string
|
|
34
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
35
35
|
name: string;
|
|
36
36
|
path?: string | undefined;
|
|
37
37
|
domain?: string | undefined;
|
|
38
38
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
39
39
|
value: string;
|
|
40
|
-
uid: string
|
|
40
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
41
41
|
name: string;
|
|
42
42
|
path?: string | undefined;
|
|
43
43
|
domain?: string | undefined;
|
|
44
44
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
45
|
-
untrackedEdit: <P extends "name" | "uid" | "path" | "value" | "domain">(uid: string
|
|
45
|
+
untrackedEdit: <P extends "name" | "uid" | "path" | "value" | "domain">(uid: string & import("zod").BRAND<"cookie">, path: P, value: P extends "name" | "uid" | "path" | "value" | "domain" ? {
|
|
46
46
|
value: string;
|
|
47
|
-
uid: string
|
|
47
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
48
48
|
name: string;
|
|
49
49
|
path?: string | undefined;
|
|
50
50
|
domain?: string | undefined;
|
|
51
51
|
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "path" | "value" | "domain" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
52
52
|
value: string;
|
|
53
|
-
uid: string
|
|
53
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
54
54
|
name: string;
|
|
55
55
|
path?: string | undefined;
|
|
56
56
|
domain?: string | undefined;
|
|
57
57
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
58
58
|
value: string;
|
|
59
|
-
uid: string
|
|
59
|
+
uid: string & import("zod").BRAND<"cookie">;
|
|
60
60
|
name: string;
|
|
61
61
|
path?: string | undefined;
|
|
62
62
|
domain?: string | undefined;
|
|
63
63
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
64
|
-
undo: (uid: string) => void;
|
|
65
|
-
redo: (uid: string) => void;
|
|
64
|
+
undo: (uid: string & import("zod").BRAND<"cookie">) => void;
|
|
65
|
+
redo: (uid: string & import("zod").BRAND<"cookie">) => void;
|
|
66
66
|
reset: () => void;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { StoreContext } from '../store/store-context';
|
|
2
|
+
import { type Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
3
|
/** Generate reactive environments for the workspace */
|
|
3
4
|
export declare function createStoreEnvironments(useLocalStorage: boolean): {
|
|
4
5
|
environments: Record<string, {
|
|
5
6
|
value: string;
|
|
6
|
-
uid: string
|
|
7
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
7
8
|
name: string;
|
|
8
9
|
color: string;
|
|
9
10
|
isDefault?: boolean | undefined;
|
|
@@ -11,64 +12,64 @@ export declare function createStoreEnvironments(useLocalStorage: boolean): {
|
|
|
11
12
|
environmentMutators: {
|
|
12
13
|
add: (item: {
|
|
13
14
|
value: string;
|
|
14
|
-
uid: string
|
|
15
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
15
16
|
name: string;
|
|
16
17
|
color: string;
|
|
17
18
|
isDefault?: boolean | undefined;
|
|
18
19
|
}) => void;
|
|
19
|
-
delete: (uid: string) => void;
|
|
20
|
+
delete: (uid: (string & import("zod").BRAND<"environment">) | null | undefined) => void;
|
|
20
21
|
set: (item: {
|
|
21
22
|
value: string;
|
|
22
|
-
uid: string
|
|
23
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
23
24
|
name: string;
|
|
24
25
|
color: string;
|
|
25
26
|
isDefault?: boolean | undefined;
|
|
26
27
|
}) => void;
|
|
27
|
-
edit: <P extends "name" | "uid" | "color" | "
|
|
28
|
+
edit: <P extends "name" | "uid" | "color" | "value" | "isDefault">(uid: (string & import("zod").BRAND<"environment">) | null | undefined, path: P, value: P extends "name" | "uid" | "color" | "value" | "isDefault" ? {
|
|
28
29
|
value: string;
|
|
29
|
-
uid: string
|
|
30
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
30
31
|
name: string;
|
|
31
32
|
color: string;
|
|
32
33
|
isDefault?: boolean | undefined;
|
|
33
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "color" | "
|
|
34
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "color" | "value" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
34
35
|
value: string;
|
|
35
|
-
uid: string
|
|
36
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
36
37
|
name: string;
|
|
37
38
|
color: string;
|
|
38
39
|
isDefault?: boolean | undefined;
|
|
39
40
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
40
41
|
value: string;
|
|
41
|
-
uid: string
|
|
42
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
42
43
|
name: string;
|
|
43
44
|
color: string;
|
|
44
45
|
isDefault?: boolean | undefined;
|
|
45
46
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
46
|
-
untrackedEdit: <P extends "name" | "uid" | "color" | "
|
|
47
|
+
untrackedEdit: <P extends "name" | "uid" | "color" | "value" | "isDefault">(uid: string & import("zod").BRAND<"environment">, path: P, value: P extends "name" | "uid" | "color" | "value" | "isDefault" ? {
|
|
47
48
|
value: string;
|
|
48
|
-
uid: string
|
|
49
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
49
50
|
name: string;
|
|
50
51
|
color: string;
|
|
51
52
|
isDefault?: boolean | undefined;
|
|
52
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "color" | "
|
|
53
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "name" | "uid" | "color" | "value" | "isDefault" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
53
54
|
value: string;
|
|
54
|
-
uid: string
|
|
55
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
55
56
|
name: string;
|
|
56
57
|
color: string;
|
|
57
58
|
isDefault?: boolean | undefined;
|
|
58
59
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
59
60
|
value: string;
|
|
60
|
-
uid: string
|
|
61
|
+
uid: string & import("zod").BRAND<"environment">;
|
|
61
62
|
name: string;
|
|
62
63
|
color: string;
|
|
63
64
|
isDefault?: boolean | undefined;
|
|
64
65
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
65
|
-
undo: (uid: string) => void;
|
|
66
|
-
redo: (uid: string) => void;
|
|
66
|
+
undo: (uid: string & import("zod").BRAND<"environment">) => void;
|
|
67
|
+
redo: (uid: string & import("zod").BRAND<"environment">) => void;
|
|
67
68
|
reset: () => void;
|
|
68
69
|
};
|
|
69
70
|
};
|
|
70
71
|
/** Extended environment data factory where workspace access is needed */
|
|
71
|
-
export declare function extendedEnvironmentDataFactory({ environmentMutators
|
|
72
|
-
deleteEnvironment: (uid:
|
|
72
|
+
export declare function extendedEnvironmentDataFactory({ environmentMutators }: StoreContext): {
|
|
73
|
+
deleteEnvironment: (uid: Environment["uid"]) => void;
|
|
73
74
|
};
|
|
74
75
|
//# sourceMappingURL=environment.d.ts.map
|