import { Client as AutoGeneratedClient, User } from './gen/client'; export type { Message, Conversation, User, Event } from './gen/client'; type AsyncFunction = (...args: any[]) => Promise; type Simplify = T extends (...args: infer A) => infer R ? (...args: Simplify) => Simplify : T extends Buffer ? Buffer : T extends Promise ? Promise> : T extends object ? T extends infer O ? { [K in keyof O]: Simplify; } : never : T; export type Headers = Record; type CommonClientProps = { timeout?: number; headers?: Headers; debug?: boolean; }; type ApiUrlClientProps = CommonClientProps & { apiUrl: string; }; type WebhookIdClientProps = CommonClientProps & { webhookId: string; baseApiUrl?: string; }; export type ClientProps = ApiUrlClientProps | WebhookIdClientProps; export type ConnectProps = ClientProps & { encryptionKey?: string; userKey?: string; userId?: string; }; export type ClientOperation = Simplify; export type ClientRequests = { [K in ClientOperation]: Parameters[0]; }; export type ClientResponses = { [K in ClientOperation]: Simplify>>; }; export type AuthenticatedOperation = Exclude; export type AuthenticatedClientRequests = Simplify<{ [K in AuthenticatedOperation]: Omit; }>; export type AuthenticatedUser = Simplify;