@scalar/api-client 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +6 -6
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +14 -13
- package/dist/hooks/useClientConfig.d.ts +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
- package/dist/libs/create-client.d.ts +1 -1
- package/dist/store/store.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -6
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +24 -27
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +3 -6
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -12
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +11 -10
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +45 -47
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +11 -9
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +179 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -179
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +201 -198
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +11 -6
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +82 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +2 -85
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +3 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +16 -18
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +133 -142
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +2 -16
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +202 -229
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +3 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +81 -85
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +32 -34
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +31 -33
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +42 -45
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +9 -9
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +18 -18
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +14 -14
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +12 -12
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +13 -13
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.js +4 -4
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +5 -7
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
- package/dist/v2/components/data-table/DataTableInput.vue2.js +32 -36
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +25 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +45 -0
- package/dist/v2/components/forms/index.d.ts +2 -0
- package/dist/v2/components/forms/index.d.ts.map +1 -0
- package/dist/v2/components/forms/index.js +4 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +43 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.js +89 -0
- package/dist/v2/components/layout/CollapsibleSection.vue2.js +4 -0
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts +23 -0
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -0
- package/dist/v2/components/layout/ValueEmitter.vue.js +21 -0
- package/dist/v2/components/layout/ValueEmitter.vue2.js +4 -0
- package/dist/v2/components/layout/index.d.ts +2 -0
- package/dist/v2/components/layout/index.d.ts.map +1 -0
- package/dist/v2/components/layout/index.js +4 -0
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +15 -0
- package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -0
- package/dist/v2/components/modals/DeleteModal.vue.js +31 -0
- package/dist/v2/components/modals/DeleteModal.vue2.js +4 -0
- package/dist/v2/components/modals/index.d.ts +2 -0
- package/dist/v2/components/modals/index.d.ts.map +1 -0
- package/dist/v2/components/modals/index.js +4 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +4 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js +31 -31
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +2 -6
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +16 -16
- package/dist/v2/components/server/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +6 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +45 -55
- package/dist/v2/features/app/App.vue.d.ts +2 -2
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +89 -74
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +6 -2
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +50 -47
- package/dist/v2/features/app/helpers/routes.d.ts +0 -10
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue2.js +75 -73
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +13 -25
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +47 -35
- package/dist/v2/features/collection/components/Form.vue.d.ts +3 -7
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Form.vue.js +28 -33
- package/dist/v2/features/collection/components/Servers.vue.d.ts +13 -31
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue2.js +103 -82
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +3 -3
- package/dist/v2/features/modal/Modal.vue2.js +40 -32
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +22 -28
- package/dist/v2/hooks/use-sidebar-state.d.ts +47 -0
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -0
- package/dist/v2/hooks/use-sidebar-state.js +112 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +75 -107
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -17
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -45
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -29
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +0 -29
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +0 -1
|
@@ -1,87 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import w from "./RequestAuthTab.vue.js";
|
|
3
|
-
import A from "../../../../components/DataTable/DataTable.vue.js";
|
|
4
|
-
const B = ["onClick"], V = { class: "relative z-10 font-medium whitespace-nowrap" }, C = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"
|
|
7
|
-
}, O = /* @__PURE__ */ v({
|
|
8
|
-
__name: "RequestAuthDataTable",
|
|
9
|
-
props: {
|
|
10
|
-
environment: {},
|
|
11
|
-
envVariables: {},
|
|
12
|
-
layout: { default: "client" },
|
|
13
|
-
selectedSchemeOptions: { default: () => [] },
|
|
14
|
-
activeAuthIndex: {},
|
|
15
|
-
securitySchemes: {},
|
|
16
|
-
server: {},
|
|
17
|
-
eventBus: {},
|
|
18
|
-
meta: {}
|
|
19
|
-
},
|
|
20
|
-
setup(l, { expose: c }) {
|
|
21
|
-
const o = b(() => l.selectedSchemeOptions[l.activeAuthIndex]);
|
|
22
|
-
return c({
|
|
23
|
-
activeAuthIndex: l.activeAuthIndex,
|
|
24
|
-
activeScheme: o
|
|
25
|
-
}), (e, r) => (t(), n("form", {
|
|
26
|
-
onSubmit: r[2] || (r[2] = p(() => {
|
|
27
|
-
}, ["prevent"]))
|
|
28
|
-
}, [
|
|
29
|
-
e.selectedSchemeOptions.length > 1 ? (t(), n("div", {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: i(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3", e.layout === "client" && "border-x-0"]),
|
|
32
|
-
"data-testid": "auth-tabs"
|
|
33
|
-
}, [
|
|
34
|
-
(t(!0), n(f, null, y(e.selectedSchemeOptions, (a, s) => (t(), n("div", {
|
|
35
|
-
key: a.id,
|
|
36
|
-
class: i(["relative z-1 -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer", [e.activeAuthIndex === s ? "text-c-1" : "text-c-3"]])
|
|
37
|
-
}, [
|
|
38
|
-
d("button", {
|
|
39
|
-
class: "floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",
|
|
40
|
-
type: "button",
|
|
41
|
-
onClick: () => e.eventBus.emit("auth:update:active-index", { index: s, meta: e.meta })
|
|
42
|
-
}, [
|
|
43
|
-
d("span", V, S(a.label), 1)
|
|
44
|
-
], 8, B),
|
|
45
|
-
e.activeAuthIndex === s ? (t(), n("div", C)) : u("", !0)
|
|
46
|
-
], 2))), 128))
|
|
47
|
-
], 2)) : u("", !0),
|
|
48
|
-
o.value ? (t(), h(x(A), {
|
|
49
|
-
key: 1,
|
|
50
|
-
class: i(["flex-1", e.layout === "reference" && "bg-b-1 rounded-b-lg border border-t-0"]),
|
|
51
|
-
columns: [""],
|
|
52
|
-
presentational: ""
|
|
53
|
-
}, {
|
|
54
|
-
default: g(() => [
|
|
55
|
-
k(w, {
|
|
56
|
-
envVariables: e.envVariables,
|
|
57
|
-
environment: e.environment,
|
|
58
|
-
layout: e.layout,
|
|
59
|
-
securitySchemes: e.securitySchemes ?? {},
|
|
60
|
-
selectedSecuritySchemas: o.value.value,
|
|
61
|
-
server: e.server,
|
|
62
|
-
"onUpdate:securityScheme": r[0] || (r[0] = (a) => e.eventBus.emit("auth:update:security-scheme", {
|
|
63
|
-
data: a,
|
|
64
|
-
name: o.value?.id ?? ""
|
|
65
|
-
})),
|
|
66
|
-
"onUpdate:selectedScopes": r[1] || (r[1] = ({ id: a, name: s, scopes: m }) => e.eventBus.emit("auth:update:selected-scopes", {
|
|
67
|
-
id: a,
|
|
68
|
-
name: s,
|
|
69
|
-
scopes: m,
|
|
70
|
-
meta: e.meta
|
|
71
|
-
}))
|
|
72
|
-
}, null, 8, ["envVariables", "environment", "layout", "securitySchemes", "selectedSecuritySchemas", "server"])
|
|
73
|
-
]),
|
|
74
|
-
_: 1
|
|
75
|
-
}, 8, ["class"])) : (t(), n("div", {
|
|
76
|
-
key: 2,
|
|
77
|
-
class: i([
|
|
78
|
-
"text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm",
|
|
79
|
-
e.layout === "reference" && "min-h-[calc(4rem+0.5px)] rounded-b-lg border"
|
|
80
|
-
])
|
|
81
|
-
}, " No authentication selected ", 2))
|
|
82
|
-
], 32));
|
|
83
|
-
}
|
|
84
|
-
});
|
|
1
|
+
import f from "./RequestAuthDataTable.vue.js";
|
|
85
2
|
export {
|
|
86
|
-
|
|
3
|
+
f as default
|
|
87
4
|
};
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import type { EnvVariable } from '../../../../store/index.js';
|
|
4
|
-
/**
|
|
5
|
-
* Vue class prop type
|
|
6
|
-
*
|
|
7
|
-
* Vue seems to just use any behind the scenes
|
|
8
|
-
*
|
|
9
|
-
* @see https://vuejs.org/guide/essentials/class-and-style.html#class-and-style-bindings
|
|
10
|
-
*/
|
|
11
|
-
export type VueClassProp = MaybeRefOrGetter<string | Record<string, boolean> | (string | Record<string, boolean>)[] | false>;
|
|
1
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
2
|
+
import type { VueClassProp } from '../../../../types/vue';
|
|
12
3
|
type __VLS_Props = {
|
|
13
4
|
containerClass?: VueClassProp;
|
|
14
|
-
environment:
|
|
15
|
-
envVariables: EnvVariable[];
|
|
5
|
+
environment: XScalarEnvironment;
|
|
16
6
|
readOnly?: boolean;
|
|
17
7
|
required?: boolean;
|
|
18
8
|
type?: string;
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAyEF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineComponent as p, mergeModels as u, useModel as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as p, mergeModels as u, useModel as f, useId as V, createBlock as y, openBlock as v, unref as o, mergeProps as C, withCtx as d, renderSlot as s, createElementVNode as B } from "vue";
|
|
2
|
+
import b from "../../../components/data-table/DataTableInput.vue.js";
|
|
3
3
|
const q = ["for"], $ = /* @__PURE__ */ p({
|
|
4
4
|
__name: "RequestAuthDataTableInput",
|
|
5
5
|
props: /* @__PURE__ */ u({
|
|
6
6
|
containerClass: {},
|
|
7
7
|
environment: {},
|
|
8
|
-
envVariables: {},
|
|
9
8
|
readOnly: { type: Boolean, default: !1 },
|
|
10
9
|
required: { type: Boolean, default: !1 },
|
|
11
10
|
type: {}
|
|
@@ -14,33 +13,32 @@ const q = ["for"], $ = /* @__PURE__ */ p({
|
|
|
14
13
|
modelModifiers: {}
|
|
15
14
|
}),
|
|
16
15
|
emits: /* @__PURE__ */ u(["inputFocus", "inputBlur", "selectVariable"], ["update:modelValue"]),
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
return (e, n) => (
|
|
20
|
-
modelValue:
|
|
21
|
-
"onUpdate:modelValue": n[0] || (n[0] = (l) =>
|
|
16
|
+
setup(i, { emit: m }) {
|
|
17
|
+
const t = m, r = f(i, "modelValue"), a = V();
|
|
18
|
+
return (e, n) => (v(), y(o(b), C({ id: o(a) }, e.$attrs, {
|
|
19
|
+
modelValue: r.value,
|
|
20
|
+
"onUpdate:modelValue": n[0] || (n[0] = (l) => r.value = l),
|
|
22
21
|
canAddCustomEnumValue: !e.readOnly,
|
|
23
22
|
containerClass: e.containerClass,
|
|
24
|
-
envVariables: e.envVariables,
|
|
25
23
|
environment: e.environment,
|
|
26
24
|
lineWrapping: "",
|
|
27
25
|
readOnly: e.readOnly,
|
|
28
26
|
required: e.required,
|
|
29
27
|
type: e.type,
|
|
30
|
-
onInputBlur: n[1] || (n[1] = (l) =>
|
|
31
|
-
onInputFocus: n[2] || (n[2] = (l) =>
|
|
32
|
-
onSelectVariable: n[3] || (n[3] = (l) =>
|
|
28
|
+
onInputBlur: n[1] || (n[1] = (l) => t("inputBlur")),
|
|
29
|
+
onInputFocus: n[2] || (n[2] = (l) => t("inputFocus")),
|
|
30
|
+
onSelectVariable: n[3] || (n[3] = (l) => t("selectVariable", l))
|
|
33
31
|
}), {
|
|
34
|
-
default:
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
default: d(() => [
|
|
33
|
+
B("label", { for: o(a) }, [
|
|
34
|
+
s(e.$slots, "default")
|
|
37
35
|
], 8, q)
|
|
38
36
|
]),
|
|
39
|
-
icon:
|
|
40
|
-
|
|
37
|
+
icon: d(() => [
|
|
38
|
+
s(e.$slots, "icon")
|
|
41
39
|
]),
|
|
42
40
|
_: 3
|
|
43
|
-
}, 16, ["id", "modelValue", "canAddCustomEnumValue", "containerClass", "
|
|
41
|
+
}, 16, ["id", "modelValue", "canAddCustomEnumValue", "containerClass", "environment", "readOnly", "required", "type"]));
|
|
44
42
|
}
|
|
45
43
|
});
|
|
46
44
|
export {
|
|
@@ -1,67 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdownSummary as
|
|
3
|
-
import { getResolvedRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "flex min-h-8 border-t text-base"
|
|
11
|
-
}, Q = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, q = ["onClick"], D = { class: "relative z-10" }, Y = /* @__PURE__ */ R({
|
|
1
|
+
import { defineComponent as A, computed as N, ref as P, createElementBlock as s, openBlock as r, Fragment as d, renderList as C, createBlock as v, createCommentVNode as m, unref as i, withCtx as l, createVNode as n, createElementVNode as k, toDisplayString as R, createTextVNode as y, normalizeClass as z, capitalize as Q } from "vue";
|
|
2
|
+
import { ScalarMarkdownSummary as q } from "@scalar/components";
|
|
3
|
+
import { getResolvedRef as D } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import E from "./OAuth2.vue.js";
|
|
5
|
+
import b from "./RequestAuthDataTableInput.vue.js";
|
|
6
|
+
import c from "../../../components/data-table/DataTableRow.vue.js";
|
|
7
|
+
import I from "../../../components/data-table/DataTableCell.vue.js";
|
|
8
|
+
const H = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" }, L = { class: "flex min-h-8 border-t text-base" }, _ = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], J = { class: "relative z-10" }, re = /* @__PURE__ */ A({
|
|
12
9
|
__name: "RequestAuthTab",
|
|
13
10
|
props: {
|
|
14
11
|
environment: {},
|
|
15
|
-
|
|
16
|
-
layout: {},
|
|
12
|
+
isStatic: { type: Boolean },
|
|
17
13
|
selectedSecuritySchemas: {},
|
|
18
14
|
securitySchemes: {},
|
|
19
15
|
server: {}
|
|
20
16
|
},
|
|
21
17
|
emits: ["update:securityScheme", "update:selectedScopes"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
() => Object.entries(
|
|
25
|
-
scheme:
|
|
26
|
-
name:
|
|
18
|
+
setup(f, { emit: K }) {
|
|
19
|
+
const x = K, U = N(
|
|
20
|
+
() => Object.entries(f.selectedSecuritySchemas).map(([o, e]) => ({
|
|
21
|
+
scheme: D(f.securitySchemes[o]),
|
|
22
|
+
name: o,
|
|
27
23
|
scopes: e
|
|
28
24
|
}))
|
|
29
|
-
),
|
|
30
|
-
const t = e.description ? `: ${e.description}` : ""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
), w = P(""), h = N(() => U.value.length > 1), F = (o, e) => {
|
|
26
|
+
const t = Q(o), u = e.description ? `: ${e.description}` : "";
|
|
27
|
+
switch (e.type) {
|
|
28
|
+
case "apiKey":
|
|
29
|
+
return `${t}${u || `: ${e.in}`}`;
|
|
30
|
+
case "oauth2": {
|
|
31
|
+
const V = Object.keys(e.flows ?? {})[0], a = w.value || V;
|
|
32
|
+
return `${t}: ${a}${u}`;
|
|
33
|
+
}
|
|
34
|
+
case "http":
|
|
35
|
+
return `${t}: ${e.scheme}${u}`;
|
|
36
|
+
default:
|
|
37
|
+
return `${t}${u || `: ${e.type}`}`;
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
}, T = (o, e) => w.value === o || e === 0 && !w.value, B = () => f.isStatic && "border-t", g = (o, e) => x("update:securityScheme", {
|
|
40
|
+
type: "http",
|
|
41
|
+
[o]: e
|
|
42
|
+
}), j = (o, e) => x("update:securityScheme", {
|
|
43
|
+
type: "apiKey",
|
|
44
|
+
[o]: e
|
|
45
|
+
}), M = (o, e) => {
|
|
46
|
+
x("update:selectedScopes", {
|
|
47
|
+
id: Object.keys(f.selectedSecuritySchemas),
|
|
48
|
+
name: o,
|
|
49
|
+
...e
|
|
50
|
+
});
|
|
51
|
+
}, O = (o, e) => {
|
|
52
|
+
const t = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
|
|
53
|
+
return T(o, e) ? `${t} !text-c-1 !rounded-none border-b !border-current ${f.isStatic ? "opacity-100" : ""}` : t;
|
|
41
54
|
};
|
|
42
|
-
return (
|
|
43
|
-
h.value
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
"aria-label":
|
|
55
|
+
return (o, e) => (r(!0), s(d, null, C(U.value, ({ scheme: t, name: u, scopes: V }) => (r(), s(d, { key: u }, [
|
|
56
|
+
h.value && t ? (r(), v(i(c), { key: 0 }, {
|
|
57
|
+
default: l(() => [
|
|
58
|
+
n(i(I), {
|
|
59
|
+
"aria-label": F(u, t),
|
|
47
60
|
class: "text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"
|
|
48
61
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
62
|
+
default: l(() => [
|
|
63
|
+
k("p", H, R(F(u, t)), 1)
|
|
51
64
|
]),
|
|
52
65
|
_: 2
|
|
53
66
|
}, 1032, ["aria-label"])
|
|
54
67
|
]),
|
|
55
68
|
_: 2
|
|
56
|
-
}, 1024)) :
|
|
57
|
-
t?.description && h.value
|
|
58
|
-
default:
|
|
59
|
-
|
|
69
|
+
}, 1024)) : m("", !0),
|
|
70
|
+
t?.description && !h.value ? (r(), v(i(c), { key: 1 }, {
|
|
71
|
+
default: l(() => [
|
|
72
|
+
n(i(I), {
|
|
60
73
|
"aria-label": t.description,
|
|
61
74
|
class: "max-h-[auto]"
|
|
62
75
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
76
|
+
default: l(() => [
|
|
77
|
+
n(i(q), {
|
|
65
78
|
class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
|
|
66
79
|
value: t.description
|
|
67
80
|
}, null, 8, ["value"])
|
|
@@ -70,157 +83,135 @@ const L = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
|
|
|
70
83
|
}, 1032, ["aria-label"])
|
|
71
84
|
]),
|
|
72
85
|
_: 2
|
|
73
|
-
}, 1024)) :
|
|
74
|
-
t?.type === "http" ? (r(),
|
|
75
|
-
t.scheme === "bearer" ? (r(),
|
|
76
|
-
default:
|
|
77
|
-
|
|
78
|
-
containerClass:
|
|
86
|
+
}, 1024)) : m("", !0),
|
|
87
|
+
t?.type === "http" ? (r(), s(d, { key: 2 }, [
|
|
88
|
+
t.scheme === "bearer" ? (r(), v(i(c), { key: 0 }, {
|
|
89
|
+
default: l(() => [
|
|
90
|
+
n(b, {
|
|
91
|
+
containerClass: B(),
|
|
92
|
+
environment: o.environment,
|
|
79
93
|
modelValue: t["x-scalar-secret-token"],
|
|
80
94
|
placeholder: "Token",
|
|
81
95
|
type: "password",
|
|
82
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}), {
|
|
87
|
-
default: o(() => [...e[5] || (e[5] = [
|
|
88
|
-
x(" Bearer Token ", -1)
|
|
96
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => g("x-scalar-secret-token", a))
|
|
97
|
+
}, {
|
|
98
|
+
default: l(() => [...e[6] || (e[6] = [
|
|
99
|
+
y(" Bearer Token ", -1)
|
|
89
100
|
])]),
|
|
90
101
|
_: 1
|
|
91
|
-
},
|
|
102
|
+
}, 8, ["containerClass", "environment", "modelValue"])
|
|
92
103
|
]),
|
|
93
104
|
_: 2
|
|
94
|
-
}, 1024)) : t?.scheme === "basic" ? (r(),
|
|
95
|
-
|
|
96
|
-
default:
|
|
97
|
-
|
|
105
|
+
}, 1024)) : t?.scheme === "basic" ? (r(), s(d, { key: 1 }, [
|
|
106
|
+
n(i(c), null, {
|
|
107
|
+
default: l(() => [
|
|
108
|
+
n(b, {
|
|
98
109
|
class: "text-c-2",
|
|
110
|
+
environment: o.environment,
|
|
99
111
|
modelValue: t["x-scalar-secret-username"],
|
|
100
112
|
placeholder: "janedoe",
|
|
101
113
|
required: "",
|
|
102
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}), {
|
|
107
|
-
default: o(() => [...e[6] || (e[6] = [
|
|
108
|
-
x(" Username ", -1)
|
|
114
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => g("x-scalar-secret-username", a))
|
|
115
|
+
}, {
|
|
116
|
+
default: l(() => [...e[7] || (e[7] = [
|
|
117
|
+
y(" Username ", -1)
|
|
109
118
|
])]),
|
|
110
119
|
_: 1
|
|
111
|
-
},
|
|
120
|
+
}, 8, ["environment", "modelValue"])
|
|
112
121
|
]),
|
|
113
122
|
_: 2
|
|
114
123
|
}, 1024),
|
|
115
|
-
|
|
116
|
-
default:
|
|
117
|
-
|
|
124
|
+
n(i(c), null, {
|
|
125
|
+
default: l(() => [
|
|
126
|
+
n(b, {
|
|
127
|
+
environment: o.environment,
|
|
118
128
|
modelValue: t["x-scalar-secret-password"],
|
|
119
129
|
placeholder: "********",
|
|
120
130
|
type: "password",
|
|
121
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}), {
|
|
126
|
-
default: o(() => [...e[7] || (e[7] = [
|
|
127
|
-
x(" Password ", -1)
|
|
131
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => g("x-scalar-secret-password", a))
|
|
132
|
+
}, {
|
|
133
|
+
default: l(() => [...e[8] || (e[8] = [
|
|
134
|
+
y(" Password ", -1)
|
|
128
135
|
])]),
|
|
129
136
|
_: 1
|
|
130
|
-
},
|
|
137
|
+
}, 8, ["environment", "modelValue"])
|
|
131
138
|
]),
|
|
132
139
|
_: 2
|
|
133
140
|
}, 1024)
|
|
134
|
-
], 64)) :
|
|
135
|
-
], 64)) : t?.type === "apiKey" ? (r(),
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
|
|
139
|
-
containerClass:
|
|
141
|
+
], 64)) : m("", !0)
|
|
142
|
+
], 64)) : t?.type === "apiKey" ? (r(), s(d, { key: 3 }, [
|
|
143
|
+
n(i(c), null, {
|
|
144
|
+
default: l(() => [
|
|
145
|
+
n(b, {
|
|
146
|
+
containerClass: B(),
|
|
147
|
+
environment: o.environment,
|
|
140
148
|
modelValue: t.name,
|
|
141
149
|
placeholder: "api-key",
|
|
142
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}), {
|
|
147
|
-
default: o(() => [...e[8] || (e[8] = [
|
|
148
|
-
x(" Name ", -1)
|
|
150
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => j("name", a))
|
|
151
|
+
}, {
|
|
152
|
+
default: l(() => [...e[9] || (e[9] = [
|
|
153
|
+
y(" Name ", -1)
|
|
149
154
|
])]),
|
|
150
155
|
_: 1
|
|
151
|
-
},
|
|
156
|
+
}, 8, ["containerClass", "environment", "modelValue"])
|
|
152
157
|
]),
|
|
153
158
|
_: 2
|
|
154
159
|
}, 1024),
|
|
155
|
-
|
|
156
|
-
default:
|
|
157
|
-
|
|
160
|
+
n(i(c), null, {
|
|
161
|
+
default: l(() => [
|
|
162
|
+
n(b, {
|
|
163
|
+
environment: o.environment,
|
|
158
164
|
modelValue: t["x-scalar-secret-token"],
|
|
159
165
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
160
166
|
type: "password",
|
|
161
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}), {
|
|
166
|
-
default: o(() => [...e[9] || (e[9] = [
|
|
167
|
-
x(" Value ", -1)
|
|
167
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => j("x-scalar-secret-token", a))
|
|
168
|
+
}, {
|
|
169
|
+
default: l(() => [...e[10] || (e[10] = [
|
|
170
|
+
y(" Value ", -1)
|
|
168
171
|
])]),
|
|
169
172
|
_: 1
|
|
170
|
-
},
|
|
173
|
+
}, 8, ["environment", "modelValue"])
|
|
171
174
|
]),
|
|
172
175
|
_: 2
|
|
173
176
|
}, 1024)
|
|
174
|
-
], 64)) : t?.type === "oauth2" ? (r(),
|
|
175
|
-
|
|
176
|
-
default:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
(r(!0),
|
|
180
|
-
key:
|
|
181
|
-
class:
|
|
182
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current": l.layout !== "reference" && (p.value === d || V === 0 && !p.value),
|
|
183
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": l.layout === "reference" && (p.value === d || V === 0 && !p.value)
|
|
184
|
-
}]),
|
|
177
|
+
], 64)) : t?.type === "oauth2" ? (r(), s(d, { key: 4 }, [
|
|
178
|
+
Object.keys(t.flows).length > 1 ? (r(), v(i(c), { key: 0 }, {
|
|
179
|
+
default: l(() => [
|
|
180
|
+
k("div", L, [
|
|
181
|
+
k("div", _, [
|
|
182
|
+
(r(!0), s(d, null, C(t.flows, (a, p, $) => (r(), s("button", {
|
|
183
|
+
key: p,
|
|
184
|
+
class: z(O(p, $)),
|
|
185
185
|
type: "button",
|
|
186
|
-
onClick: (
|
|
186
|
+
onClick: (S) => w.value = p
|
|
187
187
|
}, [
|
|
188
|
-
|
|
189
|
-
], 10,
|
|
188
|
+
k("span", J, R(p), 1)
|
|
189
|
+
], 10, G))), 128))
|
|
190
190
|
])
|
|
191
|
-
])
|
|
191
|
+
])
|
|
192
192
|
]),
|
|
193
193
|
_: 2
|
|
194
|
-
}, 1024),
|
|
195
|
-
(r(!0),
|
|
196
|
-
p
|
|
194
|
+
}, 1024)) : m("", !0),
|
|
195
|
+
(r(!0), s(d, null, C(t.flows, (a, p, $) => (r(), s(d, { key: p }, [
|
|
196
|
+
T(p, $) ? (r(), v(E, {
|
|
197
197
|
key: 0,
|
|
198
|
-
|
|
199
|
-
}, y, {
|
|
198
|
+
environment: o.environment,
|
|
200
199
|
flows: t.flows,
|
|
201
200
|
proxyUrl: "",
|
|
202
|
-
selectedScopes:
|
|
203
|
-
server:
|
|
204
|
-
type:
|
|
205
|
-
"onUpdate:securityScheme": (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
payload: g
|
|
209
|
-
}),
|
|
210
|
-
"onUpdate:selectedScopes": (g) => c("update:selectedScopes", {
|
|
211
|
-
id: Object.keys(l.selectedSecuritySchemas),
|
|
212
|
-
name: m,
|
|
213
|
-
...g
|
|
214
|
-
})
|
|
215
|
-
}), null, 16, ["flows", "selectedScopes", "server", "type", "onUpdate:securityScheme", "onUpdate:selectedScopes"])) : b("", !0)
|
|
201
|
+
selectedScopes: V,
|
|
202
|
+
server: o.server,
|
|
203
|
+
type: p,
|
|
204
|
+
"onUpdate:securityScheme": e[5] || (e[5] = (S) => x("update:securityScheme", S)),
|
|
205
|
+
"onUpdate:selectedScopes": (S) => M(u, S)
|
|
206
|
+
}, null, 8, ["environment", "flows", "selectedScopes", "server", "type", "onUpdate:selectedScopes"])) : m("", !0)
|
|
216
207
|
], 64))), 128))
|
|
217
|
-
], 64)) : t?.type === "openIdConnect" ? (r(),
|
|
208
|
+
], 64)) : t?.type === "openIdConnect" ? (r(), s("div", {
|
|
218
209
|
key: 5,
|
|
219
|
-
class:
|
|
220
|
-
}, " Coming soon ", 2)) :
|
|
210
|
+
class: z(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base", { "rounded-b-lg": o.isStatic }])
|
|
211
|
+
}, " Coming soon ", 2)) : m("", !0)
|
|
221
212
|
], 64))), 128));
|
|
222
213
|
}
|
|
223
214
|
});
|
|
224
215
|
export {
|
|
225
|
-
|
|
216
|
+
re as default
|
|
226
217
|
};
|
|
@@ -18,7 +18,7 @@ export declare const generateCodeChallenge: (verifier: string, encoding: "SHA-25
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const authorizeOauth2: (flows: OAuthFlowsObject, type: keyof OAuthFlowsObject, selectedScopes: string[],
|
|
20
20
|
/** We use the active server to set a base for relative redirect uris */
|
|
21
|
-
activeServer: ServerObject,
|
|
21
|
+
activeServer: ServerObject | undefined,
|
|
22
22
|
/** If we want to use the proxy */
|
|
23
23
|
proxyUrl?: string) => Promise<ErrorResponse<string>>;
|
|
24
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEzD,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY;
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEzD,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,SAAS;AACtC,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAkK/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,eAAe,EACtB,MAAM,MAAM,eAAe,EAC3B,QAAQ,MAAM,EACd,4BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,KACL,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA8F/B,CAAA"}
|
|
@@ -37,7 +37,7 @@ const C = () => {
|
|
|
37
37
|
}
|
|
38
38
|
const w = a[t];
|
|
39
39
|
if (w["x-scalar-secret-redirect-uri"].startsWith("/")) {
|
|
40
|
-
const s = f
|
|
40
|
+
const s = f?.url || window.location.origin + window.location.pathname, n = new URL(w["x-scalar-secret-redirect-uri"], s).toString();
|
|
41
41
|
c.searchParams.set("redirect_uri", n);
|
|
42
42
|
} else
|
|
43
43
|
c.searchParams.set("redirect_uri", w["x-scalar-secret-redirect-uri"]);
|
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
3
|
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
4
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
5
|
import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
6
|
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
7
|
-
import type { EnvVariable } from '../../../../store/index.js';
|
|
8
7
|
import type { ClientPlugin } from '../../../../v2/plugins';
|
|
9
8
|
type __VLS_Props = {
|
|
10
|
-
/** Operation method */
|
|
11
9
|
method: HttpMethod;
|
|
12
|
-
/** Operation path */
|
|
13
10
|
path: string;
|
|
14
|
-
/** Operation object */
|
|
15
11
|
operation: OperationObject;
|
|
16
|
-
/** Meta information for the auth update */
|
|
17
12
|
authMeta?: AuthMeta;
|
|
18
|
-
/** Currently selected example key for the current operation */
|
|
19
13
|
exampleKey: string;
|
|
20
|
-
/** Document defined security schemes */
|
|
21
14
|
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
22
|
-
/** Currently selected security for the current operation */
|
|
23
15
|
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
24
|
-
/** Required security for the operation/document */
|
|
25
16
|
security: OpenApiDocument['security'];
|
|
26
|
-
/** Currently selected server for the current operation/document/workspace */
|
|
27
17
|
server?: ServerObject;
|
|
28
|
-
/** Client layout */
|
|
29
18
|
layout: ClientLayout;
|
|
30
|
-
/** Registered app plugins */
|
|
31
19
|
plugins?: ClientPlugin[];
|
|
32
20
|
eventBus: WorkspaceEventBus;
|
|
33
|
-
|
|
34
|
-
environment: Environment;
|
|
35
|
-
envVariables: EnvVariable[];
|
|
21
|
+
environment: XScalarEnvironment;
|
|
36
22
|
};
|
|
37
23
|
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>;
|
|
38
24
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"AAwYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AAgnBF,wBAMG"}
|