UNPKG

gensx

Version:
47 lines 1.39 kB
export interface AuthConfig { token: string; org: string; apiBaseUrl: string; consoleBaseUrl: string; } export interface CliState { hasCompletedFirstTimeSetup: boolean; lastLoginAt?: string; } interface ConfigFileFormat { api?: { token?: string; org?: string; baseUrl?: string; }; console?: { baseUrl?: string; }; state?: Partial<CliState>; } export declare function getConfigPaths(): { configDir: string; configFile: string; }; export declare function getAuth(): Promise<AuthConfig | null>; export declare function getState(): Promise<CliState>; export declare function saveAuth(auth: Pick<AuthConfig, "token" | "org"> | null): Promise<void>; export declare function saveState(state: Partial<CliState>): Promise<void>; export declare function readConfig(): Promise<{ config: { api: { baseUrl: string; token?: string; org?: string; }; console: { baseUrl: string; }; }; state: CliState; }>; export declare function saveConfig(auth: AuthConfig | null, state?: Partial<CliState>): Promise<void>; export declare function resolveApiBaseUrl(config?: ConfigFileFormat): Promise<string>; export declare function resolveAppBaseUrl(config?: ConfigFileFormat): Promise<string>; export {}; //# sourceMappingURL=config.d.ts.map