import { type ZodType, z } from 'zod'; import type { AuthenticationConfiguration } from './authentication-configuration.js'; import { type SourceConfiguration } from './source-configuration.js'; /** * Standard configuration for the Api Reference. * * This is used internally to the configure the applications and does not include the sources. * * Sources should only be specified in the user facing configurations. * * In the the future it is likely sources will be removed completely from the configuration and instead * specified through a separate addDocument interface. */ export declare const apiReferenceConfigurationSchema: z.ZodObject<{ title: z.ZodOptional; slug: z.ZodOptional; authentication: z.ZodOptional; baseServerURL: z.ZodOptional; hideClientButton: z.ZodCatch>>; proxyUrl: z.ZodOptional; searchHotKey: z.ZodOptional>; servers: z.ZodOptional>; showSidebar: z.ZodCatch>>; showDeveloperTools: z.ZodCatch>>>; showToolbar: z.ZodCatch>>>; operationTitleSource: z.ZodCatch>>>; theme: z.ZodCatch>>>; _integration: z.ZodOptional>>; onRequestSent: z.ZodOptional, z.ZodVoid>>; persistAuth: z.ZodCatch>>; telemetry: z.ZodDefault>; layout: z.ZodCatch>>>; proxy: z.ZodOptional; fetch: z.ZodOptional Promise, (input: string | URL | Request, init?: RequestInit) => Promise>>; plugins: z.ZodOptional, z.ZodObject<{ name: z.ZodString; extensions: z.ZodArray; }, z.core.$strip>>; views: z.ZodOptional; props: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>>>>; isEditable: z.ZodCatch>>; isLoading: z.ZodCatch>>; hideModels: z.ZodCatch>>; documentDownloadType: z.ZodCatch>>>; hideDownloadButton: z.ZodOptional; hideTestRequestButton: z.ZodCatch>>; hideSearch: z.ZodCatch>>; showOperationId: z.ZodCatch>>; darkMode: z.ZodOptional; forceDarkModeState: z.ZodOptional>; hideDarkModeToggle: z.ZodCatch>>; metaData: z.ZodOptional; favicon: z.ZodOptional; hiddenClients: z.ZodOptional]>>, z.ZodArray, z.ZodLiteral]>>; defaultHttpClient: z.ZodOptional; clientKey: z.ZodString; }, z.core.$strip>>; customCss: z.ZodOptional; onSpecUpdate: z.ZodOptional, z.ZodVoid>>; onServerChange: z.ZodOptional, z.ZodVoid>>; onDocumentSelect: z.ZodType<(() => Promise | void) | undefined>; onLoaded: z.ZodType<((slug: string) => Promise | void) | undefined>; onBeforeRequest: z.ZodType<((a: { request: Request; }) => Promise | void) | undefined>; onShowMore: z.ZodType<((a: string) => Promise | void) | undefined>; onSidebarClick: z.ZodType<((a: string) => Promise | void) | undefined>; pathRouting: z.ZodOptional>; generateHeadingSlug: z.ZodOptional; }, z.core.$strip>], null>, z.ZodString>>; generateModelSlug: z.ZodOptional; }, z.core.$strip>], null>, z.ZodString>>; generateTagSlug: z.ZodOptional; }, z.core.$strip>], null>, z.ZodString>>; generateOperationSlug: z.ZodOptional; method: z.ZodString; summary: z.ZodOptional; }, z.core.$strip>], null>, z.ZodString>>; generateWebhookSlug: z.ZodOptional; }, z.core.$strip>], null>, z.ZodString>>; redirect: z.ZodOptional, z.ZodOptional>>>; withDefaultFonts: z.ZodCatch>>; defaultOpenAllTags: z.ZodCatch>>; expandAllModelSections: z.ZodCatch>>; expandAllResponses: z.ZodCatch>>; tagsSorter: z.ZodOptional, z.ZodFunction, z.ZodNumber>]>>; operationsSorter: z.ZodOptional, z.ZodLiteral<"method">, z.ZodFunction, z.ZodNumber>]>>; orderSchemaPropertiesBy: z.ZodCatch, z.ZodLiteral<"preserve">]>>>>; orderRequiredPropertiesFirst: z.ZodCatch>>; }, z.core.$strip>; /** * Pure configuration without the sources * * @deprecated Remove this once the types have been fully migrated */ export type ApiReferenceConfigurationRaw = Omit, // Remove deprecated attributes // Remove deprecated attributes 'proxy' | 'spec' | 'authentication' | 'showToolbar'> & { authentication?: AuthenticationConfiguration; }; /** * Configuration for the Scalar Api Reference integrations * * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\ * for the configuration that includes the sources for you OpenAPI documents */ export type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & { /** @deprecated * This type now refers to the base configuration that does not include the sources. * Use the type `ApiReferenceConfigurationWithSource` instead. */ url?: SourceConfiguration['url']; /** @deprecated * This type now refers to the base configuration that does not include the sources. * Use the type `ApiReferenceConfigurationWithSource` instead. */ content?: SourceConfiguration['content']; }; /** Migrate the configuration through a transform */ /** Configuration for the Api Reference */ export declare const apiReferenceConfigurationWithSourceSchema: ZodType & SourceConfiguration>; /** * User facing configuration that includes the document source configuration */ export type ApiReferenceConfigurationWithSource = Omit, 'proxy' | 'spec' | 'authentication' | 'showToolbar'> & { authentication?: AuthenticationConfiguration; }; /** * Configuration for a single config with multiple sources * The configuration will be shared between the documents */ export type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & { sources: SourceConfiguration[]; }; /** Configuration for multiple Api References */ export type AnyApiReferenceConfiguration = Partial | Partial | Partial[] | Partial[]; /** Typeguard to check to narrow the configs to the one with sources */ export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial; //# sourceMappingURL=api-reference-configuration.d.ts.map