export { i as Codegen } from './index-h66Vq9dK.mjs'; export { i as DevServer } from './index-BsafLP-a.mjs'; export { i as Nest } from './index-tqmYsTUn.mjs'; import React, { ReactNode } from 'react'; import { R as RpcAuthPolicy, b as RpcInvocationRequest, c as RpcInvocationResponse, a as RpcManifest, d as RpcMethodManifest, e as RpcParameterManifest, f as RpcServiceManifest } from './types-CQ_aexOX.mjs'; export { d as WextsCodegenError, W as WextsError, e as WextsErrorOptions, a as WextsRpcError, b as WextsRuntimeError, c as WextsSecurityError, f as formatWextsError } from './errors-D545UvXf.mjs'; import './decorators-vBopODtr.mjs'; interface FusionConfig { [key: string]: any; } declare class ConfigLoader { private config; private configDir; constructor(configDir?: string); /** * Load configuration from file or environment */ load(key: string, defaultValue?: any): any; /** * Set configuration value */ set(key: string, value: any): void; /** * Get all configuration */ getAll(): FusionConfig; /** * Parse environment value (handles JSON strings) */ private parseEnvValue; } declare const config: ConfigLoader; declare function load(key: string, defaultValue?: any): any; declare enum LogLevel { DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3 } interface LoggerOptions { level?: LogLevel; prefix?: string; timestamp?: boolean; } declare class Logger { private level; private prefix; private timestamp; constructor(options?: LoggerOptions); private formatMessage; debug(...args: any[]): void; info(...args: any[]): void; warn(...args: any[]): void; error(...args: any[]): void; success(...args: any[]): void; } declare const logger: Logger; declare function createLogger(options: LoggerOptions): Logger; declare class FileSystem { /** * Read file as string */ readFile(filePath: string, encoding?: BufferEncoding): Promise; /** * Write file */ writeFile(filePath: string, content: string): Promise; /** * Read JSON file */ readJSON(filePath: string): Promise; /** * Write JSON file */ writeJSON(filePath: string, data: any, pretty?: boolean): Promise; /** * Check if file/directory exists */ exists(filePath: string): Promise; /** * Ensure directory exists (create if not) */ ensureDir(dirPath: string): Promise; /** * Copy file */ copyFile(src: string, dest: string): Promise; /** * Read directory */ readDir(dirPath: string): Promise; } declare const filesystem: FileSystem; declare class ProcessManager { /** * Setup process error handlers */ static initialize(): void; /** * Graceful shutdown helper */ static shutdown(cleanup: () => Promise): Promise; } declare class FusionError extends Error { code?: string | undefined; constructor(message: string, code?: string | undefined); } declare class ConfigError extends FusionError { constructor(message: string); } declare class ValidationError extends FusionError { constructor(message: string); } declare class APIError extends FusionError { statusCode?: number | undefined; constructor(message: string, statusCode?: number | undefined); } type index$5_APIError = APIError; declare const index$5_APIError: typeof APIError; type index$5_ConfigError = ConfigError; declare const index$5_ConfigError: typeof ConfigError; type index$5_ConfigLoader = ConfigLoader; declare const index$5_ConfigLoader: typeof ConfigLoader; type index$5_FileSystem = FileSystem; declare const index$5_FileSystem: typeof FileSystem; type index$5_FusionConfig = FusionConfig; type index$5_FusionError = FusionError; declare const index$5_FusionError: typeof FusionError; type index$5_LogLevel = LogLevel; declare const index$5_LogLevel: typeof LogLevel; type index$5_Logger = Logger; declare const index$5_Logger: typeof Logger; type index$5_LoggerOptions = LoggerOptions; type index$5_ProcessManager = ProcessManager; declare const index$5_ProcessManager: typeof ProcessManager; type index$5_ValidationError = ValidationError; declare const index$5_ValidationError: typeof ValidationError; declare const index$5_config: typeof config; declare const index$5_createLogger: typeof createLogger; declare const index$5_filesystem: typeof filesystem; declare const index$5_load: typeof load; declare const index$5_logger: typeof logger; declare namespace index$5 { export { index$5_APIError as APIError, index$5_ConfigError as ConfigError, index$5_ConfigLoader as ConfigLoader, index$5_FileSystem as FileSystem, type index$5_FusionConfig as FusionConfig, index$5_FusionError as FusionError, index$5_LogLevel as LogLevel, index$5_Logger as Logger, type index$5_LoggerOptions as LoggerOptions, index$5_ProcessManager as ProcessManager, index$5_ValidationError as ValidationError, index$5_config as config, index$5_createLogger as createLogger, index$5_filesystem as filesystem, index$5_load as load, index$5_logger as logger }; } declare const loader: { load: () => {}; }; declare const index$4_loader: typeof loader; declare namespace index$4 { export { index$4_loader as loader }; } declare const server: { start: () => void; }; declare const index$3_server: typeof server; declare namespace index$3 { export { index$3_server as server }; } interface ScaffoldOptions { projectName: string; template: 'monorepo' | 'api' | 'web'; packageManager?: 'npm' | 'pnpm' | 'yarn'; } /** * @deprecated Use the `wexts create` CLI and `examples/hello-rpc` canonical scaffold instead. */ declare class ProjectScaffolder { scaffold(options: ScaffoldOptions): Promise; private createMonorepo; private createNestJSApp; private createNextJSApp; } type index$2_ProjectScaffolder = ProjectScaffolder; declare const index$2_ProjectScaffolder: typeof ProjectScaffolder; type index$2_ScaffoldOptions = ScaffoldOptions; declare namespace index$2 { export { index$2_ProjectScaffolder as ProjectScaffolder, type index$2_ScaffoldOptions as ScaffoldOptions }; } declare class FusionFetcher { private baseUrl; constructor(baseUrl?: string); private request; get(path: string): Promise; post(path: string, body: any): Promise; put(path: string, body: any): Promise; delete(path: string): Promise; } type WextsRpcClient = Record Promise>>; interface FusionContextType { client: FusionFetcher; wexts: WextsRpcClient; } interface FusionProviderProps { children: ReactNode; baseUrl?: string; rpcBaseUrl?: string; rpcClient?: object; } /** * FusionProvider - Provides API client to React components * Usage: * ```tsx * * * * ``` */ declare function FusionProvider({ children, baseUrl, rpcBaseUrl, rpcClient }: FusionProviderProps): React.JSX.Element; /** * useFusion hook - Access API client in components * Usage: * ```tsx * const { client } = useFusion(); * const data = await client.get('/users'); * ``` */ declare function useFusion(): FusionContextType; declare function useWexts(): TClient; interface AuthUser { id: string; email: string; name?: string; } interface UseAuthReturn { user: AuthUser | null; loading: boolean; login: (email: string, password: string) => Promise; logout: () => Promise; isAuthenticated: boolean; } /** * useAuth hook - Authentication state management * Usage: * ```tsx * const { user, login, logout, isAuthenticated } = useAuth(); * ``` */ declare function useAuth(): UseAuthReturn; type index$1_AuthUser = AuthUser; declare const index$1_FusionProvider: typeof FusionProvider; type index$1_FusionProviderProps = FusionProviderProps; type index$1_UseAuthReturn = UseAuthReturn; declare const index$1_useAuth: typeof useAuth; declare const index$1_useFusion: typeof useFusion; declare const index$1_useWexts: typeof useWexts; declare namespace index$1 { export { type index$1_AuthUser as AuthUser, index$1_FusionProvider as FusionProvider, type index$1_FusionProviderProps as FusionProviderProps, type index$1_UseAuthReturn as UseAuthReturn, index$1_useAuth as useAuth, index$1_useFusion as useFusion, index$1_useWexts as useWexts }; } declare const index_RpcAuthPolicy: typeof RpcAuthPolicy; declare const index_RpcInvocationRequest: typeof RpcInvocationRequest; declare const index_RpcInvocationResponse: typeof RpcInvocationResponse; declare const index_RpcManifest: typeof RpcManifest; declare const index_RpcMethodManifest: typeof RpcMethodManifest; declare const index_RpcParameterManifest: typeof RpcParameterManifest; declare const index_RpcServiceManifest: typeof RpcServiceManifest; declare namespace index { export { index_RpcAuthPolicy as RpcAuthPolicy, index_RpcInvocationRequest as RpcInvocationRequest, index_RpcInvocationResponse as RpcInvocationResponse, index_RpcManifest as RpcManifest, index_RpcMethodManifest as RpcMethodManifest, index_RpcParameterManifest as RpcParameterManifest, index_RpcServiceManifest as RpcServiceManifest }; } interface User { id: string; email: string; name?: string; } interface Todo { id: string; title: string; completed: boolean; } export { index$4 as Config, index$5 as Core, index$2 as CreateFusion, index$3 as Insight, index$1 as Next, index as Rpc, type Todo, type User };