import { n as ServiceHandle, t as ServiceClientOptions } from "../service-rpc-BugpSF7V.mjs"; //#region src/custom/custom-client.d.ts /** Registered name (`CustomService::CustomServiceName`). */ declare const CUSTOM_SERVICE_NAME = "CustomService"; type CustomClientOptions = ServiceClientOptions; declare function isCustomAvailable(options?: CustomClientOptions): boolean; declare function openCustom(options?: CustomClientOptions): ServiceHandle; declare function closeCustom(handle: ServiceHandle, options?: CustomClientOptions): void; /** Invoke a dynamically registered function on CustomService. */ declare function callCustomFunction(handle: ServiceHandle, functionName: string, params?: Record, options?: CustomClientOptions): T; //#endregion //#region src/custom/custom.d.ts type CustomModuleOptions = CustomClientOptions; /** * Inject a mock RPC host and reset the cached service handle (vitest / Node only). * * @param options - Client options, typically `{ host }` from `@brookesia/service/hosts/custom` */ declare function configure(options: CustomModuleOptions): void; declare const custom: { /** @returns `true` when CustomService is registered (firmware must link it) */available(): boolean; /** Release the Custom service binding. */ close(): void; /** * Invoke a function registered at runtime on the device. * * Function names and parameter schemas are defined by firmware via * `CustomService::register_function` — there is no fixed API list. * * @param functionName - Registered RPC function name * @param params - JSON-serializable argument object * @returns Parsed return value (type parameter is caller-side only) * * @example * const sum = custom.call('add', { a: 1, b: 2 }); */ call(functionName: string, params?: Record): T; }; //#endregion export { CUSTOM_SERVICE_NAME, type CustomClientOptions, type ServiceHandle as CustomHandle, callCustomFunction, closeCustom, configure, custom as default, isCustomAvailable, openCustom }; //# sourceMappingURL=index.d.mts.map