import type { OAuthConfig, TokenInfo, TokenResponse } from "./types.ts"; export declare function createOAuth(config: OAuthConfig): { /** Generate the authorization URL to redirect users to. */ getAuthorizationUrl(opts?: { scopes?: string[]; state?: string; disableAutoAuth?: boolean; }): string; /** Exchange authorization code for access + refresh tokens. Auth code is valid 10 minutes, single-use. */ exchangeCode(code: string): Promise; /** Refresh access token using a refresh token. Refresh tokens are valid for 1 year. */ refreshToken(refreshToken: string): Promise; /** Revoke an access token. */ revokeToken(accessToken: string): Promise; /** * Inspect an access token to check its scopes and associated account. * Uses app credentials (not the access token in the header). */ getTokenInfo(accessToken: string): Promise; /** * Fetch user profile info using the Business API. * Returns display_name, username, profile_image, follower counts, etc. */ getUserProfile(accessToken: string, businessId: string): Promise>; /** * Full OAuth flow: exchange code -> get tokens + profile in one call. * Access token expires in 24 hours, refresh token in 1 year. */ completeOAuth(code: string): Promise<{ token: TokenResponse; businessId: string; profile: Record; }>; }; //# sourceMappingURL=oauth.d.ts.map