@scalar/api-client 2.26.2 → 2.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +218 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- 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 +52 -54
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +80 -78
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +172 -151
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
- 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 +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +132 -115
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -16
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -12,6 +12,7 @@ type __VLS_Props = {
|
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
14
|
navigate: (route: NonNullable<({
|
|
15
|
+
replace?: boolean;
|
|
15
16
|
namespace?: string;
|
|
16
17
|
workspaceSlug?: string;
|
|
17
18
|
callback?: (status: "success" | "error") => void;
|
|
@@ -39,6 +40,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
39
40
|
}) => any;
|
|
40
41
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
41
42
|
onNavigate?: ((route: NonNullable<({
|
|
43
|
+
replace?: boolean;
|
|
42
44
|
namespace?: string;
|
|
43
45
|
workspaceSlug?: string;
|
|
44
46
|
callback?: (status: "success" | "error") => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4OF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4OF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;cA1NN,MAAM;eACL,MAAM,GAAG,IAAI,GAAG,SAAS;oBACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;cAFb,MAAM;eACL,MAAM,GAAG,IAAI,GAAG,SAAS;oBACpB,OAAO;;kFA2NvB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -36,6 +36,7 @@ type __VLS_Props = {
|
|
|
36
36
|
};
|
|
37
37
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
38
38
|
navigate: (route: NonNullable<({
|
|
39
|
+
replace?: boolean;
|
|
39
40
|
namespace?: string;
|
|
40
41
|
workspaceSlug?: string;
|
|
41
42
|
callback?: (status: "success" | "error") => void;
|
|
@@ -63,6 +64,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
63
64
|
}) => any;
|
|
64
65
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
65
66
|
onNavigate?: ((route: NonNullable<({
|
|
67
|
+
replace?: boolean;
|
|
66
68
|
namespace?: string;
|
|
67
69
|
workspaceSlug?: string;
|
|
68
70
|
callback?: (status: "success" | "error") => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAC/C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAmlBF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAC/C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAmlBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;cAtkBG,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;kFAykBpE,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -18,7 +18,7 @@ type DefaultHeader = {
|
|
|
18
18
|
* This function intelligently adds standard HTTP headers based on the request context:
|
|
19
19
|
* - Content-Type: Added only if the HTTP method supports a request body (POST, PUT, PATCH, etc.).
|
|
20
20
|
* Uses the selected content type from the operation or defaults to "application/json".
|
|
21
|
-
* - Accept:
|
|
21
|
+
* - Accept: Derived from the 2xx response content types in the spec (joined as a comma-separated list), falling back to a wildcard.
|
|
22
22
|
* - User-Agent: Added in Electron environments (desktop app or proxy) to identify the client.
|
|
23
23
|
*
|
|
24
24
|
* The function respects OpenAPI operation parameters and marks headers as overridden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,EA0ChB,CAAA"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { canMethodHaveBody as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import { isElectron as
|
|
4
|
-
const
|
|
5
|
-
name:
|
|
6
|
-
defaultValue:
|
|
7
|
-
isOverridden: o.has(
|
|
8
|
-
}),
|
|
9
|
-
method:
|
|
10
|
-
operation:
|
|
1
|
+
import { canMethodHaveBody as m } from "@scalar/helpers/http/can-method-have-body";
|
|
2
|
+
import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isElectron as y } from "../../../../libs/electron.js";
|
|
4
|
+
const l = "2.29.1", T = "application/json", C = "*/*", a = (n, s, o) => ({
|
|
5
|
+
name: n,
|
|
6
|
+
defaultValue: s,
|
|
7
|
+
isOverridden: o.has(n.toLowerCase())
|
|
8
|
+
}), b = ({
|
|
9
|
+
method: n,
|
|
10
|
+
operation: s,
|
|
11
11
|
exampleKey: o,
|
|
12
|
-
hideDisabledHeaders:
|
|
12
|
+
hideDisabledHeaders: p = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
),
|
|
17
|
-
if (
|
|
18
|
-
const e = d?.["x-scalar-selected-content-type"]?.[o] ?? Object.keys(d?.content ?? {})[0] ??
|
|
19
|
-
e !== "none" &&
|
|
14
|
+
const c = new Set(
|
|
15
|
+
s.parameters?.filter((e) => r(e).in === "header").map((e) => r(e).name.toLowerCase()) ?? []
|
|
16
|
+
), f = s["x-scalar-disable-parameters"]?.["default-headers"]?.[o] ?? {}, t = [], d = r(s.requestBody);
|
|
17
|
+
if (m(n)) {
|
|
18
|
+
const e = d?.["x-scalar-selected-content-type"]?.[o] ?? Object.keys(d?.content ?? {})[0] ?? T;
|
|
19
|
+
e !== "none" && t.push(a("Content-Type", e, c));
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const i = Object.keys(s.responses ?? {}).find((e) => e.startsWith("2")), u = i ? r(s.responses[i]) : null, h = Object.keys(u?.content ?? {}).join(", ") || C;
|
|
22
|
+
return t.push(a("Accept", h, c)), y() && l && t.push(a("User-Agent", `Scalar/${l}`, c)), p ? t.filter((e) => f[e.name.toLowerCase()] !== !0) : t;
|
|
22
23
|
};
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
b as getDefaultHeaders
|
|
25
26
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9c1fd1c7"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, computed as i, ref as $, useId as S, createBlock as r, openBlock as o, withCtx as u, createElementVNode as c, normalizeClass as R, createElementBlock as p, createVNode as A, Fragment as y, createCommentVNode as d, createTextVNode as q, renderList as g,
|
|
1
|
+
import { defineComponent as T, computed as i, ref as $, useId as S, createBlock as r, openBlock as o, withCtx as u, createElementVNode as c, normalizeClass as R, createElementBlock as p, createVNode as A, Fragment as y, createCommentVNode as d, createTextVNode as q, renderList as g, unref as I, withDirectives as P, resolveDynamicComponent as E, mergeProps as O, vShow as z } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as N } from "@scalar/components";
|
|
3
3
|
import { isDefined as D } from "@scalar/helpers/array/is-defined";
|
|
4
4
|
import L from "../../../components/SectionFilter.vue.js";
|
|
@@ -120,17 +120,17 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
120
120
|
])]),
|
|
121
121
|
_: 1
|
|
122
122
|
}, 8, ["id", "headers", "role"])) : d("", !0),
|
|
123
|
-
(o(!0), p(y, null, g(e.plugins, (l, H) =>
|
|
123
|
+
(o(!0), p(y, null, g(e.plugins, (l, H) => (o(), r(I(N), { key: H }, {
|
|
124
124
|
default: u(() => [
|
|
125
|
-
l?.components?.response ? (o(), r(E(l.components.response.component), O({
|
|
125
|
+
l?.components?.response ? P((o(), r(E(l.components.response.component), O({
|
|
126
126
|
key: 0,
|
|
127
127
|
ref_for: !0
|
|
128
|
-
}, l.components.response.additionalProps), null, 16))
|
|
128
|
+
}, l.components.response.additionalProps), null, 16)), [
|
|
129
|
+
[z, n.value === "All"]
|
|
130
|
+
]) : d("", !0)
|
|
129
131
|
]),
|
|
130
132
|
_: 2
|
|
131
|
-
}, 1024)),
|
|
132
|
-
[z, n.value === "All"]
|
|
133
|
-
])), 128)),
|
|
133
|
+
}, 1024))), 128)),
|
|
134
134
|
n.value === "All" || n.value === "Body" ? (o(), p(y, { key: 3 }, [
|
|
135
135
|
"reader" in e.response ? (o(), r(F, {
|
|
136
136
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"AA4HA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,KAAK,WAAW,GAAG;IACjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC;AAuLF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-34b57d9d"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, createElementBlock as s, openBlock as a, createElementVNode as o, normalizeClass as c, createCommentVNode as m, createVNode as l, createTextVNode as r, toDisplayString as y, unref as n } from "vue";
|
|
2
2
|
import { ScalarHotkey as d } from "@scalar/components";
|
|
3
3
|
import x from "../../../../assets/computer.ascii.js";
|
|
4
|
-
import k from "../../../../components/
|
|
5
|
-
|
|
6
|
-
const v = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, g = {
|
|
4
|
+
import k from "../../../../components/ScalarAsciiArt.vue.js";
|
|
5
|
+
const b = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, g = {
|
|
7
6
|
key: 0,
|
|
8
7
|
class: "scalar-version-number"
|
|
9
|
-
},
|
|
8
|
+
}, v = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, V = /* @__PURE__ */ f({
|
|
10
9
|
__name: "ResponseEmpty",
|
|
11
10
|
props: {
|
|
12
11
|
layout: {},
|
|
@@ -14,75 +13,67 @@ const v = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
14
13
|
appVersion: {}
|
|
15
14
|
},
|
|
16
15
|
emits: ["addRequest", "sendRequest", "openCommandPalette"],
|
|
17
|
-
setup(t, { emit:
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
16
|
+
setup(t, { emit: p }) {
|
|
17
|
+
const i = p;
|
|
18
|
+
return (R, e) => (a(), s("div", b, [
|
|
20
19
|
o("div", {
|
|
21
|
-
class:
|
|
22
|
-
"hidden opacity-0": t.totalPerformedRequests
|
|
20
|
+
class: c(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
21
|
+
"hidden opacity-0": t.totalPerformedRequests > 0 && t.layout !== "modal"
|
|
23
22
|
}])
|
|
24
23
|
}, [
|
|
25
|
-
t.layout !== "modal" ? (
|
|
26
|
-
|
|
24
|
+
t.layout !== "modal" ? (a(), s("div", g, [
|
|
25
|
+
r(" Scalar App V" + y(t.appVersion) + " Beta ", 1),
|
|
27
26
|
e[3] || (e[3] = o("div", { class: "mt-2" }, [
|
|
28
27
|
o("a", {
|
|
29
28
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
30
29
|
target: "_blank"
|
|
31
30
|
}, " Roadmap ")
|
|
32
31
|
], -1))
|
|
33
|
-
])) :
|
|
32
|
+
])) : m("", !0),
|
|
34
33
|
e[4] || (e[4] = o("a", {
|
|
35
34
|
class: "gitbook-show scalar-version-number",
|
|
36
35
|
href: "https://www.scalar.com",
|
|
37
36
|
target: "_blank"
|
|
38
37
|
}, " Powered By Scalar.com ", -1)),
|
|
39
|
-
l(
|
|
40
|
-
art:
|
|
38
|
+
l(k, {
|
|
39
|
+
art: n(x),
|
|
41
40
|
class: "text-c-3"
|
|
42
41
|
}, null, 8, ["art"])
|
|
43
42
|
], 2),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class: f(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
|
|
47
|
-
"!flex opacity-100": t.totalPerformedRequests == 0
|
|
48
|
-
}])
|
|
49
|
-
}, [
|
|
50
|
-
l(k)
|
|
51
|
-
], 2)) : r("", !0),
|
|
52
|
-
o("div", R, [
|
|
53
|
-
t.layout !== "modal" ? (s(), a("button", {
|
|
43
|
+
o("div", v, [
|
|
44
|
+
t.layout !== "modal" ? (a(), s("button", {
|
|
54
45
|
key: 0,
|
|
55
46
|
class: "flex items-center gap-1.5",
|
|
56
47
|
type: "button",
|
|
57
|
-
onClick: e[0] || (e[0] = (u) =>
|
|
48
|
+
onClick: e[0] || (e[0] = (u) => i("openCommandPalette"))
|
|
58
49
|
}, [
|
|
59
|
-
e[5] || (e[5] =
|
|
60
|
-
l(
|
|
61
|
-
hotkey: "
|
|
62
|
-
modifier: ["default"
|
|
50
|
+
e[5] || (e[5] = r(" Get Started ", -1)),
|
|
51
|
+
l(n(d), {
|
|
52
|
+
hotkey: "k",
|
|
53
|
+
modifier: ["default"]
|
|
63
54
|
})
|
|
64
|
-
])) :
|
|
65
|
-
t.layout === "desktop" ? (
|
|
55
|
+
])) : m("", !0),
|
|
56
|
+
t.layout === "desktop" ? (a(), s("button", {
|
|
66
57
|
key: 1,
|
|
67
58
|
class: "flex items-center gap-1.5",
|
|
68
59
|
type: "button",
|
|
69
|
-
onClick: e[1] || (e[1] = (u) =>
|
|
60
|
+
onClick: e[1] || (e[1] = (u) => i("addRequest"))
|
|
70
61
|
}, [
|
|
71
|
-
e[6] || (e[6] =
|
|
72
|
-
l(
|
|
73
|
-
])) :
|
|
62
|
+
e[6] || (e[6] = r(" New Request ", -1)),
|
|
63
|
+
l(n(d), { hotkey: "N" })
|
|
64
|
+
])) : m("", !0),
|
|
74
65
|
o("button", {
|
|
75
66
|
class: "flex items-center gap-1.5",
|
|
76
67
|
type: "button",
|
|
77
|
-
onClick: e[2] || (e[2] = (u) =>
|
|
68
|
+
onClick: e[2] || (e[2] = (u) => i("sendRequest"))
|
|
78
69
|
}, [
|
|
79
|
-
e[7] || (e[7] =
|
|
80
|
-
l(
|
|
70
|
+
e[7] || (e[7] = r(" Send Request ", -1)),
|
|
71
|
+
l(n(d), { hotkey: "↵" })
|
|
81
72
|
])
|
|
82
73
|
])
|
|
83
74
|
]));
|
|
84
75
|
}
|
|
85
76
|
});
|
|
86
77
|
export {
|
|
87
|
-
|
|
78
|
+
V as default
|
|
88
79
|
};
|
|
@@ -8,6 +8,8 @@ import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-sel
|
|
|
8
8
|
type __VLS_Props = {
|
|
9
9
|
environment: XScalarEnvironment;
|
|
10
10
|
eventBus: WorkspaceEventBus;
|
|
11
|
+
/** Allows adding authentication which is not in the document */
|
|
12
|
+
createAnySecurityScheme?: boolean;
|
|
11
13
|
/** Creates a static disclosure that cannot be collapsed */
|
|
12
14
|
isStatic?: boolean;
|
|
13
15
|
meta: AuthMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAuTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA4eF,QAAA,MAAM,YAAY;;cA5cqB,IAAI;cAAQ,MAAM;;;;oPA+cvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, useId as $, ref as
|
|
1
|
+
import { defineComponent as U, useId as $, ref as f, computed as S, createBlock as x, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as p, createElementBlock as y, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as v, withModifiers as q, normalizeClass as M } from "vue";
|
|
2
2
|
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
|
|
4
4
|
import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
@@ -13,6 +13,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
13
13
|
props: {
|
|
14
14
|
environment: {},
|
|
15
15
|
eventBus: {},
|
|
16
|
+
createAnySecurityScheme: { type: Boolean, default: !0 },
|
|
16
17
|
isStatic: { type: Boolean, default: !1 },
|
|
17
18
|
meta: {},
|
|
18
19
|
proxyUrl: {},
|
|
@@ -22,8 +23,8 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
22
23
|
server: {},
|
|
23
24
|
title: {}
|
|
24
25
|
},
|
|
25
|
-
setup(e, { expose:
|
|
26
|
-
const
|
|
26
|
+
setup(e, { expose: A }) {
|
|
27
|
+
const k = $(), C = f(null), B = f(!1), d = N(), o = f(null), h = S(() => {
|
|
27
28
|
if (!e.securityRequirements?.length)
|
|
28
29
|
return null;
|
|
29
30
|
const l = J(e.securityRequirements);
|
|
@@ -31,71 +32,68 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
31
32
|
icon: l ? "Unlock" : "Lock",
|
|
32
33
|
text: l ? "Optional" : "Required"
|
|
33
34
|
};
|
|
34
|
-
}),
|
|
35
|
+
}), O = S(
|
|
35
36
|
() => K(
|
|
36
37
|
e.securityRequirements ?? [],
|
|
37
38
|
e.securitySchemes ?? {},
|
|
38
|
-
e.selectedSecurity?.selectedSchemes ?? []
|
|
39
|
+
e.selectedSecurity?.selectedSchemes ?? [],
|
|
40
|
+
e.createAnySecurityScheme
|
|
39
41
|
)
|
|
40
42
|
), i = S(() => {
|
|
41
43
|
const l = e.selectedSecurity?.selectedSchemes;
|
|
42
44
|
return l?.length ? l.flatMap((t) => {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
+
const n = Object.keys(t);
|
|
46
|
+
if (n.length === 0)
|
|
45
47
|
return [];
|
|
46
|
-
if (
|
|
48
|
+
if (n.length > 1)
|
|
47
49
|
return Q(t);
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const f = F(e.securitySchemes?.[n]);
|
|
52
|
-
return f ? W({
|
|
53
|
-
name: n,
|
|
54
|
-
type: f.type,
|
|
50
|
+
const a = n[0];
|
|
51
|
+
return a ? F(e.securitySchemes?.[a]) ? W({
|
|
52
|
+
name: a,
|
|
55
53
|
value: t
|
|
56
|
-
}) : [];
|
|
54
|
+
}) : [] : [];
|
|
57
55
|
}) : [];
|
|
58
|
-
}),
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
const t = l.filter((
|
|
62
|
-
name:
|
|
63
|
-
scheme:
|
|
56
|
+
}), D = (l) => {
|
|
57
|
+
B.value && l.stopPropagation(), C.value?.$el.click();
|
|
58
|
+
}, I = (l) => {
|
|
59
|
+
const t = l.filter((a) => a.payload === void 0).map((a) => G(a.value, { depth: 2 })), n = l.filter((a) => a.payload !== void 0).map((a) => ({
|
|
60
|
+
name: a.label,
|
|
61
|
+
scheme: a.payload
|
|
64
62
|
}));
|
|
65
63
|
e.eventBus.emit("auth:update:selected-security-schemes", {
|
|
66
64
|
selectedRequirements: t,
|
|
67
|
-
newSchemes:
|
|
65
|
+
newSchemes: n,
|
|
68
66
|
meta: e.meta
|
|
69
67
|
});
|
|
70
|
-
},
|
|
68
|
+
}, R = (l) => {
|
|
71
69
|
o.value = { label: l.label, payload: l.value }, d.show();
|
|
72
|
-
},
|
|
70
|
+
}, w = () => {
|
|
73
71
|
o.value && (e.eventBus.emit("auth:delete:security-scheme", {
|
|
74
72
|
names: Object.keys(o.value.payload)
|
|
75
73
|
}), o.value = null, d.hide());
|
|
76
74
|
};
|
|
77
|
-
return
|
|
75
|
+
return A({
|
|
78
76
|
authIndicator: h,
|
|
79
77
|
selectedSchemeOptions: i,
|
|
80
|
-
schemeOptions:
|
|
78
|
+
schemeOptions: O
|
|
81
79
|
}), (l, t) => (c(), x(s(Y), {
|
|
82
80
|
class: "group/params relative",
|
|
83
81
|
isStatic: e.isStatic,
|
|
84
82
|
itemCount: i.value.length,
|
|
85
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
83
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => B.value = n)
|
|
86
84
|
}, {
|
|
87
85
|
title: r(() => [
|
|
88
86
|
u("div", {
|
|
89
|
-
id: s(
|
|
87
|
+
id: s(k),
|
|
90
88
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
91
89
|
}, [
|
|
92
|
-
u("span", null,
|
|
93
|
-
h.value ? (c(),
|
|
90
|
+
u("span", null, v(e.title), 1),
|
|
91
|
+
h.value ? (c(), y("span", {
|
|
94
92
|
key: 0,
|
|
95
93
|
class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": h.value.text === "Required" }]),
|
|
96
94
|
"data-testid": "auth-indicator",
|
|
97
|
-
onClick:
|
|
98
|
-
},
|
|
95
|
+
onClick: D
|
|
96
|
+
}, v(h.value.text), 3)) : p("", !0)
|
|
99
97
|
], 8, Z)
|
|
100
98
|
]),
|
|
101
99
|
actions: r(() => [
|
|
@@ -103,45 +101,45 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
103
101
|
class: "w-72 text-xs",
|
|
104
102
|
modelValue: i.value,
|
|
105
103
|
multiple: "",
|
|
106
|
-
options:
|
|
104
|
+
options: O.value,
|
|
107
105
|
placement: "bottom-end",
|
|
108
106
|
teleport: "",
|
|
109
|
-
onDelete:
|
|
110
|
-
"onUpdate:modelValue":
|
|
107
|
+
onDelete: R,
|
|
108
|
+
"onUpdate:modelValue": I
|
|
111
109
|
}, {
|
|
112
|
-
option: r(({ option:
|
|
110
|
+
option: r(({ option: n, selected: a }) => [
|
|
113
111
|
m(s(z), {
|
|
114
112
|
multiselect: "",
|
|
115
|
-
selected:
|
|
113
|
+
selected: a
|
|
116
114
|
}, null, 8, ["selected"]),
|
|
117
|
-
u("div", _,
|
|
118
|
-
|
|
115
|
+
u("div", _, v(n.label), 1),
|
|
116
|
+
n.isDeletable ? (c(), x(s(E), {
|
|
119
117
|
key: 0,
|
|
120
118
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
121
119
|
icon: s(P),
|
|
122
|
-
label: `Delete ${
|
|
120
|
+
label: `Delete ${n.label}`,
|
|
123
121
|
size: "xs",
|
|
124
|
-
onClick: q((
|
|
125
|
-
}, null, 8, ["icon", "label", "onClick"])) :
|
|
122
|
+
onClick: q((V) => R(n), ["stop"])
|
|
123
|
+
}, null, 8, ["icon", "label", "onClick"])) : p("", !0)
|
|
126
124
|
]),
|
|
127
125
|
default: r(() => [
|
|
128
126
|
m(s(j), {
|
|
129
127
|
ref_key: "comboboxButtonRef",
|
|
130
|
-
ref:
|
|
131
|
-
"aria-describedby": s(
|
|
128
|
+
ref: C,
|
|
129
|
+
"aria-describedby": s(k),
|
|
132
130
|
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
|
|
133
131
|
variant: "ghost"
|
|
134
132
|
}, {
|
|
135
133
|
default: r(() => [
|
|
136
|
-
i.value.length === 1 ? (c(),
|
|
134
|
+
i.value.length === 1 ? (c(), y(b, { key: 0 }, [
|
|
137
135
|
t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
138
|
-
|
|
139
|
-
], 64)) : i.value.length > 1 ? (c(),
|
|
140
|
-
t[3] || (t[3] =
|
|
136
|
+
g(" " + v(i.value[0]?.label), 1)
|
|
137
|
+
], 64)) : i.value.length > 1 ? (c(), y(b, { key: 1 }, [
|
|
138
|
+
t[3] || (t[3] = g(" Multiple ", -1)),
|
|
141
139
|
t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
142
|
-
], 64)) : (c(),
|
|
140
|
+
], 64)) : (c(), y(b, { key: 2 }, [
|
|
143
141
|
t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
|
|
144
|
-
t[6] || (t[6] =
|
|
142
|
+
t[6] || (t[6] = g(" Auth Type ", -1))
|
|
145
143
|
], 64)),
|
|
146
144
|
m(s(L), {
|
|
147
145
|
class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
|
|
@@ -171,9 +169,9 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
171
169
|
label: o.value.label,
|
|
172
170
|
scheme: o.value,
|
|
173
171
|
state: s(d),
|
|
174
|
-
onClose: t[0] || (t[0] = (
|
|
175
|
-
onDelete:
|
|
176
|
-
}, null, 8, ["label", "scheme", "state"])) :
|
|
172
|
+
onClose: t[0] || (t[0] = (n) => s(d).hide()),
|
|
173
|
+
onDelete: w
|
|
174
|
+
}, null, 8, ["label", "scheme", "state"])) : p("", !0)
|
|
177
175
|
]),
|
|
178
176
|
_: 1
|
|
179
177
|
}, 8, ["isStatic", "itemCount"]));
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
2
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
3
3
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
|
-
import type { OAuthFlowsObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
4
|
+
import type { OAuthFlowsObjectSecret, SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
/** Current environment configuration */
|
|
7
7
|
environment: XScalarEnvironment;
|
|
8
8
|
/** OAuth flows */
|
|
9
9
|
flows: OAuthFlowsObjectSecret;
|
|
10
|
-
/** Current environment configuration */
|
|
11
10
|
/** Type of the OAuth flow */
|
|
12
11
|
type: keyof OAuthFlowsObjectSecret;
|
|
13
12
|
/** Selected scopes */
|
|
14
13
|
selectedScopes: string[];
|
|
14
|
+
/** Security scheme */
|
|
15
|
+
scheme: SecuritySchemeObjectSecret;
|
|
15
16
|
/** Current server configuration */
|
|
16
17
|
server: ServerObject | null;
|
|
17
18
|
/** Proxy URL */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AAkYA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,8DAA8D,CAAA;AAMrE,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,6DAA6D,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,kBAAkB;IAClB,KAAK,EAAE,sBAAsB,CAAA;IAC7B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,sBAAsB,CAAA;IAClC,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,sBAAsB;IACtB,MAAM,EAAE,0BAA0B,CAAA;IAClC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA8uBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|