UNPKG

@energica-city/shared-amplify-utils

Version:

Shared utilities for AWS Amplify projects

34 lines 884 B
/** * Singleton manager for AWS Amplify client instances. * Assumes Amplify.configure() has already been called. */ export declare class ClientManager { private readonly clientKey; private static instances; private client; private initPromise; private constructor(); static getInstance(clientKey?: string): ClientManager; /** * Initialize the client by generating it from Amplify. */ initialize<T extends Record<string, unknown>>(): Promise<void>; /** * Get the initialized client. */ getClient<T>(): Promise<T>; /** * Check if client is initialized. */ isInitialized(): boolean; /** * Reset this client instance. */ reset(): void; /** * Reset all client instances. */ static resetAll(): void; private generateClient; } //# sourceMappingURL=ClientManager.d.ts.map