import type { Secret } from "../secret.js"; import type { CloudflareAccountId } from "./account-id.js"; /** * Authentication options for Cloudflare API */ export interface CloudflareAuthOptions { /** * API Key to use with API Key */ apiKey?: Secret; /** * API Token to use with API Key */ apiToken?: Secret; /** * Email to use with API Key * If not provided, will attempt to discover from Cloudflare API */ email?: string; } export interface CloudflareAccount { name: string; id: CloudflareAccountId; type: "standard" | "zero_rating" | "full_control"; settings: { enforce_twofactor: boolean; api_access_enabled: null; access_approval_expiry: null; abuse_contact_email: null; }; legacy_flags: { enterprise_zone_quota: { maximum: number; current: number; available: number; }; }; } export interface CloudflareUserInfo { apiToken?: Secret; apiKey?: Secret; email: string; username: string; accounts: CloudflareAccount[]; organizations: CloudflareOrganization[]; tokenPermissions: string[] | undefined; first_name: string | null; last_name: string | null; telephone: string | null; country: string | null; zipcode: string | null; two_factor_authentication_enabled: boolean; two_factor_authentication_locked: boolean; has_pro_zones: boolean; has_business_zones: boolean; has_enterprise_zones: boolean; suspended: boolean; betas: string[]; } export interface CloudflareOrganization { id: string; name: string; status: string; permissions: string[]; roles: string[]; } export declare function getCloudflareUserInfo(options: CloudflareAuthOptions): Promise; export declare function getCloudflareAuthHeaders(options?: CloudflareAuthOptions): Promise>; //# sourceMappingURL=auth.d.ts.map