/** * OAuth-related types */ /** * OAuth grant type */ export type OAuthGrantType = 'authorization_code' | 'refresh_token'; /** * Obtain/refresh token parameters */ export interface OAuthTokenParams { /** Client ID */ client_id: string; /** Client secret */ client_secret: string; /** Grant type */ grant_type: OAuthGrantType; /** Authorization code (required if grant_type is 'authorization_code') */ code?: string; /** Refresh token (required if grant_type is 'refresh_token') */ refresh_token?: string; } /** * OAuth token response */ export interface OAuthTokenData { /** Access token */ access_token: string; /** Refresh token */ refresh_token: string; /** Token expiration in seconds */ expires_in: number; } /** * Revoke token parameters */ export interface RevokeTokenParams { /** Client ID */ client_id: string; /** Client secret */ client_secret: string; /** Token to revoke (access or refresh token) */ token: string; }