UNPKG

api

Version:

Magical SDK generation from an OpenAPI definition 🪄

23 lines • 1.01 kB
import type Storage from '../storage.js'; import type CodeGenerator from './codegenerator.js'; import type Oas from 'oas'; export declare const SupportedLanguages: { readonly JS: "js"; }; type ObjectValues<T> = T[keyof T]; export type SupportedLanguage = ObjectValues<typeof SupportedLanguages>; export interface InstallerOptions { /** * Will initiate a dry run install process. Used for simulating installations within a unit test. */ dryRun?: boolean; /** * Used for stubbing out the logger that we use within the installation process so it can be * easily introspected without having to mock out `console.*`. */ logger?: (msg: string) => void; } export declare function codegenFactory(language: SupportedLanguage, spec: Oas, specPath: string, identifier: string): CodeGenerator; export declare function uninstallerFactory(language: SupportedLanguage, storage: Storage, opts?: InstallerOptions): Promise<void>; export {}; //# sourceMappingURL=factory.d.ts.map