node-apis
Version:
🚀 Advanced TypeScript API generator with clean architecture, comprehensive testing, and automatic formatting. Generate production-ready Node.js APIs with complete integration test suites.
104 lines • 3.02 kB
TypeScript
/**
* Configuration management service
*/
import { Config, SupportedFramework, SupportedApiStyle, DatabaseConfig, ConfigValidationResult, InitConfigOptions, ConfigUpdateOptions } from '../types/config.types';
/**
* Gets the config file path
*/
export declare const getConfigPath: ({ configPath, baseDir, }?: {
configPath?: string;
baseDir?: string;
}) => string;
/**
* Checks if config file exists
*/
export declare const configExists: ({ configPath, }?: {
configPath?: string;
}) => Promise<boolean>;
/**
* Loads configuration from file
*/
export declare const loadConfig: ({ configPath, }?: {
configPath?: string;
}) => Promise<Config | null>;
/**
* Saves configuration to file
*/
export declare const saveConfig: ({ config, configPath, options, }: {
config: Config;
configPath?: string;
options?: ConfigUpdateOptions;
}) => Promise<void>;
/**
* Gets the configured framework
*/
export declare const getFramework: ({ configPath, }?: {
configPath?: string;
}) => Promise<SupportedFramework | null>;
/**
* Gets the configured API style
*/
export declare const getApiStyle: ({ configPath, }?: {
configPath?: string;
}) => Promise<SupportedApiStyle | null>;
/**
* Sets the framework in config
*/
export declare const setFramework: ({ framework, configPath, }: {
framework: SupportedFramework;
configPath?: string;
}) => Promise<void>;
/**
* Sets the API style in config
*/
export declare const setApiStyle: ({ apiStyle, configPath, }: {
apiStyle: SupportedApiStyle;
configPath?: string;
}) => Promise<void>;
/**
* Sets the default tRPC style preference in config (deprecated - use setApiStyle)
*/
export declare const setTrpcStyle: ({ trpcStyle, configPath, }: {
trpcStyle: boolean;
configPath?: string;
}) => Promise<void>;
/**
* Gets database configuration
*/
export declare const getDatabaseConfig: ({ configPath, }?: {
configPath?: string;
}) => Promise<DatabaseConfig | null>;
/**
* Sets database configuration
*/
export declare const setDatabaseConfig: ({ databaseConfig, configPath, }: {
databaseConfig: DatabaseConfig;
configPath?: string;
}) => Promise<void>;
/**
* Initializes a new config file
*/
export declare const initializeConfig: ({ framework, force, configPath, }?: InitConfigOptions & {
configPath?: string;
}) => Promise<Config>;
/**
* Validates configuration object
*/
export declare const validateConfig: ({ config }: {
config: any;
}) => ConfigValidationResult;
/**
* Gets the effective framework (from config, CLI option, or default)
*/
export declare const getEffectiveFramework: ({ cliFramework, configPath, }?: {
cliFramework?: string;
configPath?: string;
}) => Promise<SupportedFramework>;
/**
* Gets the effective API style (from config, CLI option, or default)
*/
export declare const getEffectiveApiStyle: ({ cliApiStyle, configPath, }?: {
cliApiStyle?: string;
configPath?: string;
}) => Promise<SupportedApiStyle>;
//# sourceMappingURL=config.service.d.ts.map