/** * Custom implementation of the consent client interface. * This client uses provided handlers instead of making HTTP requests. * */ import type { ConsentManagerInterface, IdentifyUserRequestBody, IdentifyUserResponse, InitResponse, SetConsentRequestBody, SetConsentResponse } from '../client-interface'; import type { FetchOptions, ResponseContext } from '../types'; import type { CustomClientOptions, EndpointHandler } from './types'; /** * Custom implementation of the consent client interface. * Uses provided handlers instead of making HTTP requests. * * @remarks * v2.0: Subject-centric API. Use setConsent for all consent operations. */ export declare class CustomClient implements ConsentManagerInterface { /** * Custom endpoint handlers * @internal */ private endpointHandlers; /** * Dynamic endpoint handlers for custom paths * @internal */ private dynamicHandlers; /** * Creates a new custom client instance. * * @param options - Configuration options for the client */ constructor(options: CustomClientOptions); /** * Checks if a consent banner should be shown. */ init(options?: FetchOptions): Promise>; /** * Sets consent preferences for a subject. * * @remarks * v2.0: This uses the subject endpoint handler. */ setConsent(options?: FetchOptions): Promise>; /** * Links an external user ID to a subject. * * @remarks * v2.0: Uses identifyUser endpoint handler if provided, otherwise falls back to $fetch. */ identifyUser(options: FetchOptions): Promise>; /** * Registers a dynamic endpoint handler */ registerHandler(path: string, handler: EndpointHandler): void; /** * Makes a custom API request to any endpoint. */ $fetch(path: string, options?: FetchOptions): Promise>; } export type { CustomClientOptions, EndpointHandler, EndpointHandlers, } from './types';