@scalar/api-client 2.5.19 → 2.5.20
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 +37 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +2 -2
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue3.js +4 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +4 -0
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -5
- 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.vue3.js +4 -0
- package/dist/components/CodeInput/CodeInput.vue4.js +4 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +3 -3
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +22 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +4 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +40 -40
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue3.js +4 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue3.js +4 -0
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/LabelInput.vue.d.ts +2 -2
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/Form/LabelInput.vue3.js +4 -0
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue3.js +4 -0
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +1 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +2 -2
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +3 -3
- package/dist/components/OpenApiClientButton.vue2.js +11 -8
- package/dist/components/OpenApiClientButton.vue3.js +4 -0
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue3.js +4 -0
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/SectionFilter.vue.d.ts +1 -1
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue3.js +4 -0
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue3.js +4 -0
- package/dist/components/Server/ServerSelector.vue.d.ts +1 -1
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerSelector.vue.js +27 -26
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +5 -2
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +19 -19
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +1 -1
- package/dist/components/Server/index.d.ts +3 -3
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue3.js +4 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- 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.vue3.js +4 -0
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue3.js +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +4 -4
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue3.js +4 -0
- package/dist/components/Sidebar/SidebarListElement.vue4.js +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts +5 -5
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue3.js +4 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.d.ts +2 -2
- package/dist/layouts/App/ApiClientApp.vue2.js +4 -0
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +131 -101
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +1 -1
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue3.js +4 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts +263 -203
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Web/ApiClientWeb.vue2.js +4 -0
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +131 -101
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +1 -1
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.d.ts +131 -101
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/find-request.d.ts +2 -2
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/index.d.ts +16 -16
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/create-request-operation.test.d.ts +9 -9
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/router.d.ts +1 -1
- package/dist/routes.d.ts +38 -38
- package/dist/store/active-entities.d.ts +9 -9
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/store/request-example.d.ts +70 -70
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +23 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +32 -2
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +129 -99
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.js +4 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue3.js +4 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue3.js +4 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue3.js +4 -0
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue3.js +4 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +4 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +2 -2
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue3.js +4 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Cookies/CookieModal.vue.d.ts +3 -3
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/CookieModal.vue3.js +4 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -2
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +3 -3
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +3 -3
- package/dist/views/Request/Request.vue2.js +22 -22
- package/dist/views/Request/Request.vue3.js +4 -0
- package/dist/views/Request/RequestRoot.vue.d.ts +2 -2
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +55 -57
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +34 -32
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +239 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +2 -244
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -9
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +4 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +10 -10
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -3
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue3.js +4 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +14 -14
- 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.vue3.js +4 -0
- package/dist/views/Request/RequestSidebarItem.vue4.js +4 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +4 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/index.d.ts +2 -2
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/consts/index.d.ts +3 -3
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +51 -51
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/vitest.setup.d.ts +21 -7
- package/dist/vitest.setup.d.ts.map +1 -1
- package/package.json +21 -21
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { isDefined as j } from "@scalar/oas-utils/helpers";
|
|
2
|
+
const b = (r, f = [], a = {}) => {
|
|
3
|
+
const i = new Set(
|
|
4
|
+
(r == null ? void 0 : r.map((o) => Object.keys(o).sort().join(","))) ?? []
|
|
5
5
|
);
|
|
6
|
-
return
|
|
7
|
-
const
|
|
8
|
-
var
|
|
9
|
-
return (
|
|
6
|
+
return f.reduce((o, n) => {
|
|
7
|
+
const p = Array.isArray(n) ? n : [n], m = p.map((t) => {
|
|
8
|
+
var e;
|
|
9
|
+
return (e = a[t]) == null ? void 0 : e.nameKey;
|
|
10
10
|
}).sort().join(",");
|
|
11
|
-
return
|
|
11
|
+
return i.has(m) && o.push(...p.map((t) => a[t]).filter(j)), o;
|
|
12
12
|
}, []);
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
b as filterSecurityRequirements
|
|
16
16
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { Path, PathValue } from '@scalar/object-utils/nested';
|
|
3
|
-
import type { WorkspaceStore } from '../../../../store/store';
|
|
3
|
+
import type { WorkspaceStore } from '../../../../store/store.js';
|
|
4
4
|
/** Shape of the local storage auth object */
|
|
5
5
|
export type Auth<P extends Path<SecurityScheme>> = Record<string, Record<P, NonNullable<PathValue<SecurityScheme, P>>>>;
|
|
6
6
|
/** Update the security scheme with side effects */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as RequestSection } from './RequestSection.vue';
|
|
2
|
-
export { filterSecurityRequirements } from './helpers/filter-security-requirements';
|
|
1
|
+
export { default as RequestSection } from './RequestSection.vue.js';
|
|
2
|
+
export { filterSecurityRequirements } from './helpers/filter-security-requirements.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,11 +5,11 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
5
5
|
uid: string;
|
|
6
6
|
}) => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
8
|
-
onClearDrafts?: () => any;
|
|
9
|
-
onNewTab?: (args_0: {
|
|
8
|
+
onClearDrafts?: (() => any) | undefined;
|
|
9
|
+
onNewTab?: ((args_0: {
|
|
10
10
|
name: string;
|
|
11
11
|
uid: string;
|
|
12
|
-
}) => any;
|
|
12
|
+
}) => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
export default _default;
|
|
15
15
|
//# sourceMappingURL=RequestSidebar.vue.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DraggableProps, type DraggingItem, type HoveredItem } from '@scalar/draggable';
|
|
2
2
|
import { nextTick } from 'vue';
|
|
3
|
-
import type { SidebarMenuItem } from '../../views/Request/types';
|
|
3
|
+
import type { SidebarMenuItem } from '../../views/Request/types/index.js';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
/**
|
|
6
6
|
* Toggle dragging on and off
|
|
@@ -33,14 +33,14 @@ declare function __VLS_template(): {
|
|
|
33
33
|
$: import("vue").ComponentInternalInstance;
|
|
34
34
|
$data: {};
|
|
35
35
|
$props: {
|
|
36
|
-
readonly ceiling?: number;
|
|
37
|
-
readonly floor?: number;
|
|
38
|
-
readonly isDraggable?: boolean;
|
|
39
|
-
readonly isDroppable?: boolean | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean);
|
|
36
|
+
readonly ceiling?: number | undefined;
|
|
37
|
+
readonly floor?: number | undefined;
|
|
38
|
+
readonly isDraggable?: boolean | undefined;
|
|
39
|
+
readonly isDroppable?: (boolean | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)) | undefined;
|
|
40
40
|
readonly parentIds: string[];
|
|
41
41
|
readonly id: string;
|
|
42
|
-
readonly onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
|
|
43
|
-
readonly onOnDragStart?: (draggingItem: DraggingItem) => any;
|
|
42
|
+
readonly onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
|
|
43
|
+
readonly onOnDragStart?: ((draggingItem: DraggingItem) => any) | undefined;
|
|
44
44
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
45
45
|
$attrs: {
|
|
46
46
|
[x: string]: unknown;
|
|
@@ -57,8 +57,8 @@ declare function __VLS_template(): {
|
|
|
57
57
|
$emit: ((event: "onDragEnd", draggingItem: DraggingItem, hoveredItem: HoveredItem) => void) & ((event: "onDragStart", draggingItem: DraggingItem) => void);
|
|
58
58
|
$el: HTMLDivElement;
|
|
59
59
|
$options: import("vue").ComponentOptionsBase<Readonly<DraggableProps> & Readonly<{
|
|
60
|
-
onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
|
|
61
|
-
onOnDragStart?: (draggingItem: DraggingItem) => any;
|
|
60
|
+
onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
|
|
61
|
+
onOnDragStart?: ((draggingItem: DraggingItem) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
63
|
draggingItem: import("vue").Ref<{
|
|
64
64
|
id: string;
|
|
@@ -100,8 +100,8 @@ declare function __VLS_template(): {
|
|
|
100
100
|
$nextTick: typeof nextTick;
|
|
101
101
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
102
102
|
} & Readonly<{}> & Omit<Readonly<DraggableProps> & Readonly<{
|
|
103
|
-
onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
|
|
104
|
-
onOnDragStart?: (draggingItem: DraggingItem) => any;
|
|
103
|
+
onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
|
|
104
|
+
onOnDragStart?: ((draggingItem: DraggingItem) => any) | undefined;
|
|
105
105
|
}>, "draggingItem" | "hoveredItem"> & import("vue").ShallowUnwrapRef<{
|
|
106
106
|
draggingItem: import("vue").Ref<{
|
|
107
107
|
id: string;
|
|
@@ -133,9 +133,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
133
133
|
newTab: (name: string, uid: string) => any;
|
|
134
134
|
openMenu: (menuItem: SidebarMenuItem) => any;
|
|
135
135
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
136
|
-
onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
|
|
137
|
-
onNewTab?: (name: string, uid: string) => any;
|
|
138
|
-
onOpenMenu?: (menuItem: SidebarMenuItem) => any;
|
|
136
|
+
onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
|
|
137
|
+
onNewTab?: ((name: string, uid: string) => any) | undefined;
|
|
138
|
+
onOpenMenu?: ((menuItem: SidebarMenuItem) => any) | undefined;
|
|
139
139
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
140
140
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
141
141
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA+rBA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAU7C,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAIzE,KAAK,WAAW,GAAG;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AA4VF,iBAAS,cAAc;WA+tBT,OAAO,IAA6B;;oBAziCpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjElB,
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA+rBA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAU7C,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAIzE,KAAK,WAAW,GAAG;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AA4VF,iBAAS,cAAc;WA+tBT,OAAO,IAA6B;;oBAziCpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjElB,KA5oBsB;;;;;;;oCA4oBtB,KAxoBU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAuyBO,GACjB,8CACqB,GAAG,yBAAyB,GAAG,6DAIlD,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA08BD;AAqCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kFAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "./RequestSidebarItem.vue2.js";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import "./RequestSidebarItem.vue3.js";
|
|
3
|
+
import "./RequestSidebarItem.vue4.js";
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const d = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4dedda07"]]);
|
|
6
6
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { SidebarMenuItem } from '../../views/Request/types';
|
|
1
|
+
import type { SidebarMenuItem } from '../../views/Request/types/index.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
menuItem: SidebarMenuItem;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
closeMenu: () => any;
|
|
7
|
-
toggleWatchMode: (item: import("../../views/Request/types").SidebarItem | undefined) => any;
|
|
7
|
+
toggleWatchMode: (item: import("../../views/Request/types/index.js").SidebarItem | undefined) => any;
|
|
8
8
|
clearDrafts: () => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onCloseMenu?: () => any;
|
|
11
|
-
onToggleWatchMode?: (item: import("../../views/Request/types").SidebarItem | undefined) => any;
|
|
12
|
-
onClearDrafts?: () => any;
|
|
10
|
+
onCloseMenu?: (() => any) | undefined;
|
|
11
|
+
onToggleWatchMode?: ((item: import("../../views/Request/types/index.js").SidebarItem | undefined) => any) | undefined;
|
|
12
|
+
onClearDrafts?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
|
15
15
|
//# sourceMappingURL=RequestSidebarItemMenu.vue.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
2
|
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
|
-
import type { EnvVariable } from '../../store/active-entities';
|
|
4
|
+
import type { EnvVariable } from '../../store/active-entities.js';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
collection: Collection;
|
|
7
7
|
operation: Operation;
|
|
@@ -14,8 +14,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
14
14
|
importCurl: (value: string) => any;
|
|
15
15
|
hideModal: () => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
onImportCurl?: (value: string) => any;
|
|
18
|
-
onHideModal?: () => any;
|
|
17
|
+
onImportCurl?: ((value: string) => any) | undefined;
|
|
18
|
+
onHideModal?: (() => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
20
|
export default _default;
|
|
21
21
|
//# sourceMappingURL=RequestSubpageHeader.vue.d.ts.map
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
5
|
"update:modelValue": (v: boolean) => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
"onUpdate:modelValue"?: (v: boolean) => any;
|
|
7
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=ResponseBodyToggle.vue.d.ts.map
|
|
@@ -34,7 +34,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
34
34
|
}));
|
|
35
35
|
}, k = (o) => {
|
|
36
36
|
o != null && o.createNew && g.name === "request" && f();
|
|
37
|
-
}, w = "2.5.
|
|
37
|
+
}, w = "2.5.20";
|
|
38
38
|
return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), i("div", W, [
|
|
39
39
|
s("div", {
|
|
40
40
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Collection, Operation, ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
|
-
import type { SendRequestResult } from '../../../libs/send-request/create-request-operation';
|
|
3
|
+
import type { SendRequestResult } from '../../../libs/send-request/create-request-operation.js';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
collection: Collection;
|
|
6
6
|
operation: Operation;
|
|
@@ -6,7 +6,7 @@ import M from "./RequestHeaders.vue.js";
|
|
|
6
6
|
import N from "./ResponseBody.vue.js";
|
|
7
7
|
import W from "./ResponseBodyStreaming.vue.js";
|
|
8
8
|
import D from "./ResponseBodyVirtual.vue.js";
|
|
9
|
-
|
|
9
|
+
import "./ResponseBodyVirtual.vue2.js";
|
|
10
10
|
import F from "./ResponseCookies.vue.js";
|
|
11
11
|
import P from "./ResponseEmpty.vue.js";
|
|
12
12
|
import U from "./ResponseHeaders.vue.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as ResponseSection } from './ResponseSection.vue';
|
|
2
|
-
export { default as ResponseBody } from './ResponseBody.vue';
|
|
1
|
+
export { default as ResponseSection } from './ResponseSection.vue.js';
|
|
2
|
+
export { default as ResponseBody } from './ResponseBody.vue.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as WorkspaceDropdown } from './WorkspaceDropdown.vue';
|
|
1
|
+
export { default as WorkspaceDropdown } from './WorkspaceDropdown.vue.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './mediaTypes';
|
|
2
|
-
export type * from './mediaTypes';
|
|
3
|
-
export * from './new-auth-options';
|
|
1
|
+
export * from './mediaTypes.js';
|
|
2
|
+
export type * from './mediaTypes.js';
|
|
3
|
+
export * from './new-auth-options.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '../../store';
|
|
2
|
-
import type { ActiveEntitiesStore } from '../../store/active-entities';
|
|
1
|
+
import type { WorkspaceStore } from '../../store/index.js';
|
|
2
|
+
import type { ActiveEntitiesStore } from '../../store/active-entities.js';
|
|
3
3
|
import type { DraggingItem, HoveredItem } from '@scalar/draggable';
|
|
4
4
|
/** Create DnD handlers */
|
|
5
5
|
export declare function dragHandlerFactory(activeWorkspace: ActiveEntitiesStore['activeWorkspace'], { collections, collectionMutators, tags, tagMutators, workspaceMutators }: WorkspaceStore): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SecuritySchemeGroup, type SecuritySchemeOption } from '../../../views/Request/consts';
|
|
1
|
+
import { type SecuritySchemeGroup, type SecuritySchemeOption } from '../../../views/Request/consts/index.js';
|
|
2
2
|
import type { Collection, Operation, SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
type DisplayScheme = {
|
|
4
4
|
type: SecurityScheme['type'] | 'complex';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './auth';
|
|
2
|
-
export * from './oauth2';
|
|
3
|
-
export * from './watch-mode';
|
|
1
|
+
export * from './auth.js';
|
|
2
|
+
export * from './oauth2.js';
|
|
3
|
+
export * from './watch-mode.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ErrorResponse } from '../../../libs/errors';
|
|
1
|
+
import type { ErrorResponse } from '../../../libs/errors.js';
|
|
2
2
|
import type { Oauth2Flow, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
/** Oauth2 security schemes which are not implicit */
|
|
4
4
|
type NonImplicitFlow = Exclude<Oauth2Flow, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAGzE,qDAAqD;AACrD,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEhE,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAmBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,aAAoB,MAAM,YAAY,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAe3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,SACpB,UAAU,gBAEF,MAAM,aAET,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA8J/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,SACrB,eAAe,UACb,MAAM,8BAKX;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,KACA,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAGzE,qDAAqD;AACrD,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEhE,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAmBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,aAAoB,MAAM,YAAY,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAe3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,SACpB,UAAU,gBAEF,MAAM,aAET,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA8J/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,SACrB,eAAe,UACb,MAAM,8BAKX;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,KACA,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA0F/B,CAAA"}
|
|
@@ -2,98 +2,98 @@ import { shouldUseProxy as S } from "@scalar/oas-utils/helpers";
|
|
|
2
2
|
const k = () => {
|
|
3
3
|
const e = new Uint8Array(32);
|
|
4
4
|
return crypto.getRandomValues(e), btoa(String.fromCharCode(...e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
5
|
-
},
|
|
6
|
-
if (
|
|
5
|
+
}, C = async (e, l) => {
|
|
6
|
+
if (l === "plain")
|
|
7
7
|
return e;
|
|
8
|
-
const
|
|
9
|
-
return btoa(String.fromCharCode(...new Uint8Array(
|
|
10
|
-
},
|
|
8
|
+
const n = new TextEncoder().encode(e), i = await crypto.subtle.digest("SHA-256", n);
|
|
9
|
+
return btoa(String.fromCharCode(...new Uint8Array(i))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
10
|
+
}, b = async (e, l, u) => {
|
|
11
11
|
try {
|
|
12
12
|
if (!e)
|
|
13
13
|
return [new Error("Flow not found"), null];
|
|
14
|
-
const
|
|
14
|
+
const n = e.selectedScopes.join(" ");
|
|
15
15
|
if (e.type === "clientCredentials" || e.type === "password")
|
|
16
|
-
return
|
|
16
|
+
return P(e, n, {
|
|
17
17
|
proxyUrl: u
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
let
|
|
19
|
+
const i = (Math.random() + 1).toString(36).substring(2, 10), t = new URL(e.authorizationUrl);
|
|
20
|
+
let m = null;
|
|
21
21
|
if (e.type === "implicit")
|
|
22
22
|
t.searchParams.set("response_type", "token");
|
|
23
23
|
else if (e.type === "authorizationCode" && (t.searchParams.set("response_type", "code"), e["x-usePkce"] !== "no")) {
|
|
24
|
-
const r = k(),
|
|
25
|
-
|
|
24
|
+
const r = k(), s = await C(r, e["x-usePkce"]);
|
|
25
|
+
m = {
|
|
26
26
|
codeVerifier: r,
|
|
27
|
-
codeChallenge:
|
|
27
|
+
codeChallenge: s,
|
|
28
28
|
codeChallengeMethod: e["x-usePkce"] === "SHA-256" ? "S256" : "plain"
|
|
29
|
-
}, t.searchParams.set("code_challenge",
|
|
29
|
+
}, t.searchParams.set("code_challenge", s), t.searchParams.set("code_challenge_method", m.codeChallengeMethod);
|
|
30
30
|
}
|
|
31
31
|
if (e["x-scalar-redirect-uri"].startsWith("/")) {
|
|
32
|
-
const r =
|
|
33
|
-
t.searchParams.set("redirect_uri",
|
|
32
|
+
const r = l.url || window.location.origin + window.location.pathname, s = new URL(e["x-scalar-redirect-uri"], r).toString();
|
|
33
|
+
t.searchParams.set("redirect_uri", s);
|
|
34
34
|
} else
|
|
35
35
|
t.searchParams.set("redirect_uri", e["x-scalar-redirect-uri"]);
|
|
36
36
|
e["x-scalar-security-query"] && Object.keys(e["x-scalar-security-query"]).forEach((r) => {
|
|
37
|
-
var
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}), t.searchParams.set("client_id", e["x-scalar-client-id"]), t.searchParams.set("state",
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
const
|
|
37
|
+
var c;
|
|
38
|
+
const s = (c = e["x-scalar-security-query"]) == null ? void 0 : c[r];
|
|
39
|
+
s && t.searchParams.set(r, s);
|
|
40
|
+
}), t.searchParams.set("client_id", e["x-scalar-client-id"]), t.searchParams.set("state", i), n && t.searchParams.set("scope", n);
|
|
41
|
+
const a = window.open(t, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
42
|
+
return a ? new Promise((r) => {
|
|
43
|
+
const s = setInterval(() => {
|
|
44
44
|
var _;
|
|
45
|
-
let
|
|
45
|
+
let c = null, d = null, h = null, g = null;
|
|
46
46
|
try {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const y = new URLSearchParams(
|
|
50
|
-
|
|
47
|
+
const o = new URL(a.location.href).searchParams, x = e["x-tokenName"] || "access_token";
|
|
48
|
+
c = o.get(x), d = o.get("code"), h = o.get("error"), g = o.get("error_description");
|
|
49
|
+
const y = new URLSearchParams(a.location.href.split("#")[1]);
|
|
50
|
+
c || (c = y.get(x)), d || (d = y.get("code")), h || (h = y.get("error")), g || (g = y.get("error_description"));
|
|
51
51
|
} catch {
|
|
52
52
|
}
|
|
53
|
-
if (
|
|
54
|
-
if (clearInterval(
|
|
55
|
-
r([new Error(`OAuth error: ${
|
|
56
|
-
else if (
|
|
57
|
-
const
|
|
58
|
-
r(
|
|
59
|
-
} else
|
|
60
|
-
code:
|
|
61
|
-
pkce:
|
|
53
|
+
if (a.closed || c || d || h)
|
|
54
|
+
if (clearInterval(s), a.close(), h)
|
|
55
|
+
r([new Error(`OAuth error: ${h}${g ? ` (${g})` : ""}`), null]);
|
|
56
|
+
else if (c) {
|
|
57
|
+
const o = (_ = a.location.href.match(/state=([^&]*)/)) == null ? void 0 : _[1];
|
|
58
|
+
r(o === i ? [null, c] : [new Error("State mismatch"), null]);
|
|
59
|
+
} else d ? new URL(a.location.href).searchParams.get("state") === i ? P(e, n, {
|
|
60
|
+
code: d,
|
|
61
|
+
pkce: m,
|
|
62
62
|
proxyUrl: u
|
|
63
|
-
}).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(
|
|
63
|
+
}).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(s), r([new Error("Window was closed without granting authorization"), null]));
|
|
64
64
|
}, 200);
|
|
65
65
|
}) : [new Error("Failed to open auth window"), null];
|
|
66
66
|
} catch {
|
|
67
67
|
return [new Error("Failed to authorize oauth2 flow"), null];
|
|
68
68
|
}
|
|
69
|
-
},
|
|
69
|
+
}, P = async (e, l, {
|
|
70
70
|
code: u,
|
|
71
|
-
pkce:
|
|
72
|
-
proxyUrl:
|
|
71
|
+
pkce: n,
|
|
72
|
+
proxyUrl: i
|
|
73
73
|
} = {}) => {
|
|
74
74
|
if (!e)
|
|
75
75
|
return [new Error("OAuth2 flow was not defined"), null];
|
|
76
76
|
const t = new URLSearchParams();
|
|
77
|
-
t.set("client_id", e["x-scalar-client-id"]),
|
|
78
|
-
|
|
77
|
+
t.set("client_id", e["x-scalar-client-id"]), l && (e.type === "clientCredentials" || e.type === "password") && t.set("scope", l), e.clientSecret && (!e["x-scalar-credentials-location"] || e["x-scalar-credentials-location"] === "body") && t.set("client_secret", e.clientSecret), "x-scalar-redirect-uri" in e && e["x-scalar-redirect-uri"] && t.set("redirect_uri", e["x-scalar-redirect-uri"]), u ? (t.set("code", u), t.set("grant_type", "authorization_code"), n && t.set("code_verifier", n.codeVerifier)) : e.type === "password" ? (t.set("grant_type", "password"), t.set("username", e.username), t.set("password", e.password)) : t.set("grant_type", "client_credentials"), e["x-scalar-security-body"] && Object.entries(e["x-scalar-security-body"]).forEach(([p, a]) => {
|
|
78
|
+
a && t.set(p, a);
|
|
79
79
|
});
|
|
80
80
|
try {
|
|
81
|
-
const
|
|
81
|
+
const p = {
|
|
82
82
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
83
83
|
};
|
|
84
|
-
e.clientSecret && (
|
|
85
|
-
const
|
|
84
|
+
e.clientSecret && (!e["x-scalar-credentials-location"] || e["x-scalar-credentials-location"] === "header") && (p.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${e.clientSecret}`)}`);
|
|
85
|
+
const r = S(i, e.tokenUrl) ? `${i}?${new URLSearchParams([["scalar_url", e.tokenUrl]]).toString()}` : e.tokenUrl, c = await (await fetch(r, {
|
|
86
86
|
method: "POST",
|
|
87
|
-
headers:
|
|
87
|
+
headers: p,
|
|
88
88
|
body: t
|
|
89
|
-
})).json(),
|
|
90
|
-
return [null,
|
|
89
|
+
})).json(), d = e["x-tokenName"] || "access_token";
|
|
90
|
+
return [null, c[d]];
|
|
91
91
|
} catch {
|
|
92
92
|
return [new Error("Failed to get an access token. Please check your credentials."), null];
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
b as authorizeOauth2,
|
|
97
|
+
P as authorizeServers,
|
|
98
|
+
C as generateCodeChallenge
|
|
99
99
|
};
|