@scalar/api-client 2.2.49 → 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 +31 -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/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 +15 -15
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Workspace } from '@scalar/oas-utils/entities';
|
|
2
|
+
import type { Collection, Operation, RequestExample, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
collection: Collection;
|
|
5
|
+
example: RequestExample;
|
|
6
|
+
operation: Operation;
|
|
7
|
+
server: Server | undefined;
|
|
8
|
+
workspace: Workspace;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2
11
|
export default _default;
|
|
3
12
|
//# sourceMappingURL=RequestCodeExample.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAQxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4PF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestCodeExample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const r = /* @__PURE__ */
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c2f2c62b"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,101 +1,98 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, Y = /* @__PURE__ */ S({
|
|
1
|
+
import { defineComponent as b, computed as c, openBlock as w, createElementBlock as x, createVNode as n, withCtx as s, createTextVNode as C, createElementVNode as m, unref as a, toDisplayString as S } from "vue";
|
|
2
|
+
import k from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import $ from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import { ScalarCombobox as K, ScalarButton as V, ScalarIcon as _ } from "@scalar/components";
|
|
6
|
+
import { snippetz as H } from "@scalar/snippetz";
|
|
7
|
+
import { filterSecurityRequirements as j } from "./helpers/filter-security-requirements.js";
|
|
8
|
+
import B from "../../Components/CodeSnippet/CodeSnippet.vue.js";
|
|
9
|
+
import { useWorkspace as D } from "../../../store/store.js";
|
|
10
|
+
const E = { class: "w-full" }, N = { class: "flex flex-1 -mx-1" }, R = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, P = /* @__PURE__ */ b({
|
|
12
11
|
__name: "RequestCodeExample",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
), r = a(() => {
|
|
12
|
+
props: {
|
|
13
|
+
collection: {},
|
|
14
|
+
example: {},
|
|
15
|
+
operation: {},
|
|
16
|
+
server: {},
|
|
17
|
+
workspace: {}
|
|
18
|
+
},
|
|
19
|
+
setup(o) {
|
|
20
|
+
const { securitySchemes: p, workspaceMutators: u } = D(), f = c(
|
|
21
|
+
() => j(
|
|
22
|
+
o.operation.security || o.collection.security || [],
|
|
23
|
+
o.collection.selectedSecuritySchemeUids,
|
|
24
|
+
p
|
|
25
|
+
)
|
|
26
|
+
), r = c(() => {
|
|
30
27
|
const e = {};
|
|
31
28
|
return {
|
|
32
|
-
options:
|
|
33
|
-
label:
|
|
34
|
-
options:
|
|
35
|
-
id: `${
|
|
36
|
-
label:
|
|
29
|
+
options: H().clients().map((t) => ({
|
|
30
|
+
label: t.title,
|
|
31
|
+
options: t.clients.map((i) => (e[`${t.key},${i.client}`] = i.title, {
|
|
32
|
+
id: `${t.key},${i.client}`,
|
|
33
|
+
label: i.title
|
|
37
34
|
}))
|
|
38
35
|
})),
|
|
39
36
|
dict: e
|
|
40
37
|
};
|
|
41
|
-
}), d =
|
|
42
|
-
var
|
|
43
|
-
const e =
|
|
38
|
+
}), d = c(() => {
|
|
39
|
+
var t;
|
|
40
|
+
const e = o.workspace.selectedHttpClient;
|
|
44
41
|
if (!e)
|
|
45
|
-
return ((
|
|
42
|
+
return ((t = r.value.options[0]) == null ? void 0 : t.options[0]) ?? {
|
|
46
43
|
id: "js,fetch",
|
|
47
44
|
label: "Fetch"
|
|
48
45
|
};
|
|
49
|
-
const
|
|
46
|
+
const l = `${e.targetKey},${e.clientKey}`;
|
|
50
47
|
return {
|
|
51
|
-
id:
|
|
52
|
-
label: r.value.dict[
|
|
48
|
+
id: l,
|
|
49
|
+
label: r.value.dict[l] ?? "Unknown"
|
|
53
50
|
};
|
|
54
|
-
}),
|
|
51
|
+
}), v = c(
|
|
55
52
|
() => {
|
|
56
|
-
var e
|
|
57
|
-
return ((
|
|
53
|
+
var e;
|
|
54
|
+
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.targetKey) ?? "js";
|
|
58
55
|
}
|
|
59
|
-
),
|
|
56
|
+
), y = c(
|
|
60
57
|
() => {
|
|
61
|
-
var e
|
|
62
|
-
return ((
|
|
58
|
+
var e;
|
|
59
|
+
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.clientKey) ?? "fetch";
|
|
63
60
|
}
|
|
64
|
-
),
|
|
65
|
-
const [
|
|
66
|
-
!
|
|
67
|
-
targetKey:
|
|
68
|
-
clientKey:
|
|
61
|
+
), h = ({ id: e }) => {
|
|
62
|
+
const [l, t] = e.split(",");
|
|
63
|
+
!l || !t || u.edit(o.workspace.uid, "selectedHttpClient", {
|
|
64
|
+
targetKey: l,
|
|
65
|
+
clientKey: t
|
|
69
66
|
});
|
|
70
67
|
};
|
|
71
|
-
return (e,
|
|
72
|
-
|
|
73
|
-
class: "group/preview -mt-0.25 w-full",
|
|
68
|
+
return (e, l) => (w(), x("div", E, [
|
|
69
|
+
n(g, {
|
|
70
|
+
class: "group/preview -mt-0.25 w-full border-b-0",
|
|
74
71
|
defaultOpen: !1,
|
|
75
72
|
hasIcon: !1
|
|
76
73
|
}, {
|
|
77
|
-
title:
|
|
78
|
-
|
|
74
|
+
title: s(() => l[0] || (l[0] = [
|
|
75
|
+
C("Code Snippet")
|
|
79
76
|
])),
|
|
80
|
-
actions:
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
actions: s(() => [
|
|
78
|
+
m("div", N, [
|
|
79
|
+
n(a(K), {
|
|
83
80
|
modelValue: d.value,
|
|
84
81
|
options: r.value.options,
|
|
85
82
|
placement: "bottom-end",
|
|
86
|
-
"onUpdate:modelValue":
|
|
83
|
+
"onUpdate:modelValue": h
|
|
87
84
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
85
|
+
default: s(() => [
|
|
86
|
+
n(a(V), {
|
|
90
87
|
class: "flex gap-1.5 h-full px-1.5 py-0.75 font-normal text-c-1 w-fit hover:bg-b-3",
|
|
91
88
|
fullWidth: "",
|
|
92
89
|
variant: "ghost"
|
|
93
90
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
var
|
|
91
|
+
default: s(() => {
|
|
92
|
+
var t;
|
|
96
93
|
return [
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
m("span", null, S((t = d.value) == null ? void 0 : t.label), 1),
|
|
95
|
+
n(a(_), {
|
|
99
96
|
icon: "ChevronDown",
|
|
100
97
|
size: "md"
|
|
101
98
|
})
|
|
@@ -108,20 +105,20 @@ const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class:
|
|
|
108
105
|
}, 8, ["modelValue", "options"])
|
|
109
106
|
])
|
|
110
107
|
]),
|
|
111
|
-
default:
|
|
112
|
-
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
default:
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
default: s(() => [
|
|
109
|
+
n(k, { columns: [""] }, {
|
|
110
|
+
default: s(() => [
|
|
111
|
+
n($, null, {
|
|
112
|
+
default: s(() => [
|
|
113
|
+
m("div", R, [
|
|
114
|
+
n(a(B), {
|
|
118
115
|
class: "px-3 py-1.5",
|
|
119
|
-
client:
|
|
120
|
-
example:
|
|
121
|
-
operation:
|
|
122
|
-
securitySchemes:
|
|
123
|
-
server:
|
|
124
|
-
target:
|
|
116
|
+
client: y.value,
|
|
117
|
+
example: e.example,
|
|
118
|
+
operation: e.operation,
|
|
119
|
+
securitySchemes: f.value,
|
|
120
|
+
server: e.server,
|
|
121
|
+
target: v.value
|
|
125
122
|
}, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
|
|
126
123
|
])
|
|
127
124
|
]),
|
|
@@ -137,5 +134,5 @@ const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class:
|
|
|
137
134
|
}
|
|
138
135
|
});
|
|
139
136
|
export {
|
|
140
|
-
|
|
137
|
+
P as default
|
|
141
138
|
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import type { EnvVariable } from '../../../store/active-entities';
|
|
2
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
1
3
|
import { type RequestExample } from '@scalar/oas-utils/entities/spec';
|
|
4
|
+
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
2
5
|
import type { RouteLocationRaw } from 'vue-router';
|
|
3
6
|
type __VLS_Props = {
|
|
7
|
+
example: RequestExample;
|
|
8
|
+
environment: Environment;
|
|
9
|
+
envVariables: EnvVariable[];
|
|
10
|
+
workspace: Workspace;
|
|
4
11
|
title: string;
|
|
5
12
|
paramKey: keyof RequestExample['parameters'];
|
|
6
13
|
readOnlyEntries?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AA8NA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AA6UF,wBAOG"}
|
|
@@ -1,150 +1,143 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const F = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, H = { class: "sr-only" }, te = /* @__PURE__ */ A({
|
|
1
|
+
import { defineComponent as O, computed as m, onMounted as T, ref as S, watch as N, openBlock as p, createBlock as d, withCtx as l, createTextVNode as b, toDisplayString as k, createElementVNode as r, unref as h, createVNode as w, withModifiers as z, createCommentVNode as x, normalizeClass as A, nextTick as R } from "vue";
|
|
2
|
+
import B from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import V from "./RequestTable.vue.js";
|
|
4
|
+
import { ScalarTooltip as M, ScalarButton as W } from "@scalar/components";
|
|
5
|
+
import { requestExampleParametersSchema as C } from "@scalar/oas-utils/entities/spec";
|
|
6
|
+
import { useWorkspace as D } from "../../../store/store.js";
|
|
7
|
+
const G = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Z = /* @__PURE__ */ O({
|
|
9
8
|
__name: "RequestParams",
|
|
10
9
|
props: {
|
|
10
|
+
example: {},
|
|
11
|
+
environment: {},
|
|
12
|
+
envVariables: {},
|
|
13
|
+
workspace: {},
|
|
11
14
|
title: {},
|
|
12
15
|
paramKey: {},
|
|
13
16
|
readOnlyEntries: { default: () => [] }
|
|
14
17
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
31
|
-
}, p = V(null), K = (e, t, h) => {
|
|
32
|
-
if (!o.value || !l.value) return;
|
|
33
|
-
const f = s.value;
|
|
34
|
-
if (f.length > e) {
|
|
35
|
-
const a = [...f];
|
|
36
|
-
if (!a[e]) return;
|
|
37
|
-
a[e] = { ...a[e], [t]: h }, (a[e].key !== "" || a[e].value !== "") && (a[e].enabled = !0), a[e].key === "" && a[e].value === "" && a.splice(e, 1), u.edit(
|
|
38
|
-
l.value.uid,
|
|
39
|
-
`parameters.${n.paramKey}`,
|
|
40
|
-
a
|
|
18
|
+
setup(t) {
|
|
19
|
+
const { requestExampleMutators: i } = D(), s = m(() => t.example.parameters[t.paramKey] ?? []);
|
|
20
|
+
T(() => f());
|
|
21
|
+
const o = () => {
|
|
22
|
+
const e = C.parse({ enabled: !1 }), a = [...s.value, e];
|
|
23
|
+
i.edit(t.example.uid, `parameters.${t.paramKey}`, a);
|
|
24
|
+
}, u = S(null), P = (e, a, g) => {
|
|
25
|
+
const c = s.value;
|
|
26
|
+
if (c.length > e) {
|
|
27
|
+
const n = [...c];
|
|
28
|
+
if (!n[e]) return;
|
|
29
|
+
n[e] = { ...n[e], [a]: g }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), i.edit(
|
|
30
|
+
t.example.uid,
|
|
31
|
+
`parameters.${t.paramKey}`,
|
|
32
|
+
n
|
|
41
33
|
);
|
|
42
34
|
} else {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
a
|
|
48
|
-
), q(() => {
|
|
49
|
-
var b;
|
|
50
|
-
if (!p.value) return;
|
|
51
|
-
(b = p.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || b.focus();
|
|
35
|
+
const n = [C.parse({ [a]: g })];
|
|
36
|
+
i.edit(t.example.uid, `parameters.${t.paramKey}`, n), R(() => {
|
|
37
|
+
var y;
|
|
38
|
+
if (!u.value) return;
|
|
39
|
+
(y = u.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || y.focus();
|
|
52
40
|
});
|
|
53
41
|
}
|
|
54
|
-
e ===
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
`parameters.${
|
|
58
|
-
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
`parameters.${n.paramKey}`,
|
|
42
|
+
e === c.length - 1 && o();
|
|
43
|
+
}, q = (e, a) => i.edit(
|
|
44
|
+
t.example.uid,
|
|
45
|
+
`parameters.${t.paramKey}.${e}.enabled`,
|
|
46
|
+
a
|
|
47
|
+
), E = () => {
|
|
48
|
+
const e = s.value.filter((a) => a.required);
|
|
49
|
+
i.edit(
|
|
50
|
+
t.example.uid,
|
|
51
|
+
`parameters.${t.paramKey}`,
|
|
65
52
|
e
|
|
66
|
-
),
|
|
53
|
+
), R(() => o());
|
|
67
54
|
};
|
|
68
|
-
function
|
|
55
|
+
function f() {
|
|
69
56
|
if (s.value.length === 0)
|
|
70
|
-
|
|
57
|
+
o();
|
|
71
58
|
else if (s.value.length >= 1) {
|
|
72
59
|
const e = s.value[s.value.length - 1];
|
|
73
|
-
e && e.key !== "" && e.value !== "" &&
|
|
60
|
+
e && e.key !== "" && e.value !== "" && o();
|
|
74
61
|
}
|
|
75
62
|
}
|
|
76
|
-
const
|
|
63
|
+
const K = m(
|
|
77
64
|
() => s.value.filter((e) => e.key || e.value).length
|
|
78
|
-
),
|
|
79
|
-
|
|
80
|
-
() =>
|
|
81
|
-
(e,
|
|
82
|
-
e !==
|
|
65
|
+
), $ = m(() => s.value.length > 1);
|
|
66
|
+
N(
|
|
67
|
+
() => t.example,
|
|
68
|
+
(e, a) => {
|
|
69
|
+
e !== a && f();
|
|
83
70
|
},
|
|
84
71
|
{ immediate: !0 }
|
|
85
72
|
);
|
|
86
|
-
const
|
|
87
|
-
return (e,
|
|
73
|
+
const v = m(() => (t.readOnlyEntries ?? []).length > 0);
|
|
74
|
+
return (e, a) => (p(), d(B, {
|
|
88
75
|
class: "group/params",
|
|
89
|
-
itemCount:
|
|
76
|
+
itemCount: K.value
|
|
90
77
|
}, {
|
|
91
|
-
title:
|
|
92
|
-
|
|
78
|
+
title: l(() => [
|
|
79
|
+
b(k(e.title), 1)
|
|
93
80
|
]),
|
|
94
|
-
actions:
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
actions: l(() => [
|
|
82
|
+
r("div", G, [
|
|
83
|
+
$.value ? (p(), d(h(M), {
|
|
97
84
|
key: 0,
|
|
98
85
|
side: "right",
|
|
99
86
|
sideOffset: 12
|
|
100
87
|
}, {
|
|
101
|
-
trigger:
|
|
102
|
-
|
|
88
|
+
trigger: l(() => [
|
|
89
|
+
w(h(W), {
|
|
103
90
|
class: "px-1 transition-none",
|
|
104
91
|
size: "sm",
|
|
105
92
|
variant: "ghost",
|
|
106
|
-
onClick:
|
|
93
|
+
onClick: z(E, ["stop"])
|
|
107
94
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
default: l(() => [
|
|
96
|
+
a[0] || (a[0] = b(" Clear ")),
|
|
97
|
+
r("span", U, "All " + k(e.title), 1)
|
|
111
98
|
]),
|
|
112
99
|
_: 1
|
|
113
100
|
})
|
|
114
101
|
]),
|
|
115
|
-
content:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
102
|
+
content: l(() => a[1] || (a[1] = [
|
|
103
|
+
r("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
104
|
+
r("div", { class: "flex items-center text-c-2" }, [
|
|
105
|
+
r("span", null, "Clear optional parameters")
|
|
119
106
|
])
|
|
120
107
|
], -1)
|
|
121
108
|
])),
|
|
122
109
|
_: 1
|
|
123
|
-
})) :
|
|
110
|
+
})) : x("", !0)
|
|
124
111
|
])
|
|
125
112
|
]),
|
|
126
|
-
default:
|
|
127
|
-
|
|
113
|
+
default: l(() => [
|
|
114
|
+
r("div", {
|
|
128
115
|
ref_key: "tableWrapperRef",
|
|
129
|
-
ref:
|
|
116
|
+
ref: u
|
|
130
117
|
}, [
|
|
131
|
-
|
|
118
|
+
v.value ? (p(), d(V, {
|
|
132
119
|
key: 0,
|
|
133
|
-
class:
|
|
134
|
-
"bg-mix-transparent bg-mix-amount-95 bg-c-3":
|
|
120
|
+
class: A(["flex-1", {
|
|
121
|
+
"bg-mix-transparent bg-mix-amount-95 bg-c-3": v.value
|
|
135
122
|
}]),
|
|
136
123
|
columns: ["32px", "", ""],
|
|
124
|
+
envVariables: e.envVariables,
|
|
125
|
+
environment: e.environment,
|
|
137
126
|
isGlobal: "",
|
|
138
127
|
isReadOnly: "",
|
|
139
|
-
items: e.readOnlyEntries
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
items: e.readOnlyEntries,
|
|
129
|
+
workspace: e.workspace
|
|
130
|
+
}, null, 8, ["class", "envVariables", "environment", "items", "workspace"])) : x("", !0),
|
|
131
|
+
w(V, {
|
|
142
132
|
class: "flex-1",
|
|
143
133
|
columns: ["32px", "", ""],
|
|
134
|
+
envVariables: e.envVariables,
|
|
135
|
+
environment: e.environment,
|
|
144
136
|
items: s.value,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
workspace: e.workspace,
|
|
138
|
+
onToggleRow: q,
|
|
139
|
+
onUpdateRow: P
|
|
140
|
+
}, null, 8, ["envVariables", "environment", "items", "workspace"])
|
|
148
141
|
], 512)
|
|
149
142
|
]),
|
|
150
143
|
_: 1
|
|
@@ -152,5 +145,5 @@ const F = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
152
145
|
}
|
|
153
146
|
});
|
|
154
147
|
export {
|
|
155
|
-
|
|
148
|
+
Z as default
|
|
156
149
|
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EnvVariable } from '../../../store/active-entities';
|
|
2
|
+
import type { Workspace } from '@scalar/oas-utils/entities';
|
|
3
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
4
|
+
import type { Operation, RequestExample } from '@scalar/oas-utils/entities/spec';
|
|
2
5
|
type __VLS_Props = {
|
|
3
|
-
|
|
6
|
+
example: RequestExample;
|
|
7
|
+
operation: Operation;
|
|
4
8
|
paramKey: keyof RequestExample['parameters'];
|
|
9
|
+
title: string;
|
|
10
|
+
environment: Environment;
|
|
11
|
+
envVariables: EnvVariable[];
|
|
12
|
+
workspace: Workspace;
|
|
5
13
|
};
|
|
6
14
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
15
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMhF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAoLF,wBAOG"}
|