/** * Raw callback parameters from OAuth redirect * Contains all query parameters returned by the OAuth provider */ type OAuthCallbackParams = Record; /** * Default OAuth result with standard code and state */ interface OAuthResult { code: string; state?: string; } /** * OAuth configuration options */ interface OAuthConfig { oauthUrl: string; redirectUrl: string; additionalParameters?: Record; /** * Optional transformer to convert raw callback params to desired type * If not provided, returns all callback params as-is (typed as T) */ transformCallback?: (params: OAuthCallbackParams) => T; } /** * OAuth client interface with generic result type * @template T - The type returned from authorize(), defaults to OAuthResult */ interface OAuthClient { authorize(): Promise; } declare class WebOAuthClient implements OAuthClient { private config; constructor(config: OAuthConfig); authorize(): Promise; private checkForCallback; private buildOAuthUrl; private generateState; } declare function createOAuthClient(config: OAuthConfig): OAuthClient; export { type OAuthCallbackParams, type OAuthClient, type OAuthConfig, type OAuthResult, WebOAuthClient, createOAuthClient };