import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'; import type { OAuthFlowDeviceAuthorizationSecret } from '@scalar/workspace-store/request-example'; import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'; import type { CustomFetch } from '../../../../v2/blocks/operation-block/helpers/send-request.js'; import { type OAuth2Tokens } from './oauth.js'; /** Information the user needs to approve a device without exposing the device code. */ export type DeviceAuthorizationPrompt = { userCode: string; verificationUri: string; verificationUriComplete?: string; }; /** Device flow UI and cancellation hooks. */ export type DeviceAuthorizationOptions = { onPrompt: (prompt: DeviceAuthorizationPrompt) => void; signal: AbortSignal; }; /** Performs the RFC8628 device grant, respecting expiry, pending responses, and polling backoff. */ export declare const authorizeDevice: (flow: OAuthFlowDeviceAuthorizationSecret, scopes: string[], server: ServerObject | null, proxyUrl: string, environment: Record, customFetch?: CustomFetch, options?: DeviceAuthorizationOptions) => Promise>; //# sourceMappingURL=oauth-device-authorization.d.ts.map