@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
32 lines • 1.56 kB
TypeScript
import type { WorkspaceStore } from '@scalar/workspace-store/client';
/**
* Loads the default HTTP client from storage and applies it to the workspace.
* Only updates if no default client is already set.
*/
export declare const loadClientFromStorage: (store: WorkspaceStore) => void;
/**
* Checks if a key is a Scalar secret key.
* Secret keys start with 'x-scalar-secret-' prefix.
*/
export declare const isSecretKey: (key: string) => boolean;
/**
* Recursively merges secret values from stored data into the current schema.
* Only merges secrets if the corresponding structure exists in the current schema.
*
* This function walks through both objects in parallel, copying any keys that
* start with 'x-scalar-secret-' from the stored object to the current object,
* but only if the path exists in the current schema.
*
* @param current - The current schema object (source of truth for structure)
* @param stored - The stored object containing secret values to restore
*/
export declare const mergeSecuritySchemas: (current: unknown, stored: unknown, level?: number) => void;
/**
* Loads authentication schemes and selected security settings from local storage.
*
* This function restores both the available security schemes and the user's
* selected security configuration for the active document. It validates that
* the stored schemes still exist in the current document before restoring them.
*/
export declare const loadAuthSchemesFromStorage: (store: WorkspaceStore) => void;
//# sourceMappingURL=load-from-perssistance.d.ts.map