import { type AccessContext, type ObjStringDict, OAuth2AuthCodePKCE } from '@kittycad/oauth2-auth-code-pkce'; export interface ClientOptions { token?: string; baseUrl?: string; fetch?: typeof fetch; clientId?: string; redirectUrl?: string; scopes?: string[]; onAccessTokenExpiry?: (refreshAccessToken: () => Promise) => Promise; onInvalidGrant?: (refreshAuthCodeOrRefreshToken: () => Promise) => void; } export declare class Client { token?: string; baseUrl?: string; fetch?: typeof fetch; clientId?: string; redirectUrl?: string; scopes?: string[]; onAccessTokenExpiry?: (refreshAccessToken: () => Promise) => Promise; onInvalidGrant?: (refreshAuthCodeOrRefreshToken: () => Promise) => void; oauth2?: OAuth2AuthCodePKCE; constructor(tokenOrOpts?: string | ClientOptions); authorize(oneTimeParams?: ObjStringDict): Promise; isReturningFromAuthServer(): Promise; getAccessToken(): Promise; resetOAuth2(): void; private createOAuth2Client; private updateTokenFromAccessContext; } /** * Build a URL query string from a map of params, skipping undefined values. * Arrays append multiple entries with the same key. Returns '' when empty. */ export declare function buildQuery(params: Record): string; /** * Build an application/x-www-form-urlencoded body from a params map, * skipping undefined and expanding arrays as repeated keys. */ export declare function buildForm(params: Record): URLSearchParams; //# sourceMappingURL=client.d.ts.map