// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
    baseUrl: 'http://localhost:8000' | (string & {});
};

/**
 * Serializer for API key response (masked).
 */
export type ApiKey = {
    /**
     * Masked API key
     */
    key: string;
    /**
     * When the key was last regenerated
     */
    reissued_at: string | null;
    /**
     * When the key was created
     */
    created_at: string;
};

/**
 * Serializer for API key regeneration response (full key shown once).
 */
export type ApiKeyRegenerate = {
    /**
     * New API key (shown only once)
     */
    key: string;
    /**
     * When the key was regenerated
     */
    reissued_at: string;
};

/**
 * Serializer for API key response (masked).
 */
export type ApiKeyRequest = {
    /**
     * Masked API key
     */
    key: string;
    /**
     * When the key was last regenerated
     */
    reissued_at: string | null;
    /**
     * When the key was created
     */
    created_at: string;
};

/**
 * Serializer for revealing the current (unrotated) full API key.
 */
export type ApiKeyReveal = {
    /**
     * Full API key (current value, not rotated)
     */
    key: string;
    /**
     * When the key was created
     */
    created_at: string;
    /**
     * When the key was last regenerated
     */
    reissued_at: string | null;
};

/**
 * Serializer for testing an API key.
 */
export type ApiKeyTestRequest = {
    /**
     * API key to test
     */
    key: string;
};

/**
 * Serializer for API key test result.
 */
export type ApiKeyTestResult = {
    /**
     * Whether the key is valid
     */
    valid: boolean;
    /**
     * User ID if valid, null otherwise
     */
    user_id: string | null;
};

/**
 * Response serializer for account deletion.
 */
export type AccountDeleteResponse = {
    /**
     * Whether the account was successfully deleted
     */
    success: boolean;
    /**
     * Human-readable message about the deletion
     */
    message: string;
};

/**
 * Serializer for regenerating backup codes.
 */
export type BackupCodesRegenerateRequest = {
    /**
     * TOTP code for verification
     */
    code: string;
};

/**
 * Response serializer for backup codes regeneration.
 */
export type BackupCodesRegenerateResponse = {
    /**
     * List of new backup codes (save these!)
     */
    backup_codes: Array<string>;
    /**
     * Warning about previous codes being invalidated
     */
    warning: string;
};

/**
 * Serializer for backup codes status.
 */
export type BackupCodesStatus = {
    /**
     * Number of unused backup codes
     */
    remaining_count: number;
    /**
     * Total number of codes generated
     */
    total_generated: number;
    /**
     * Warning if running low on codes
     */
    warning?: string | null;
};

/**
 * Nested serializer for Centrifugo WebSocket connection token.
 */
export type CentrifugoToken = {
    /**
     * JWT token for Centrifugo WebSocket connection
     */
    token: string;
    /**
     * Centrifugo WebSocket URL
     */
    centrifugo_url: string;
    /**
     * Token expiration time (ISO 8601)
     */
    expires_at: string;
    /**
     * List of allowed channels for this user
     */
    channels: Array<string>;
};

/**
 * Serializer for updating user profile.
 */
export type CfgUserUpdateRequest = {
    first_name?: string;
    last_name?: string;
    company?: string;
    phone?: string;
    position?: string;
    language?: string;
    /**
     * IANA timezone name (e.g. 'Asia/Seoul'). Auto-detected from browser via X-Timezone header.
     */
    timezone?: string;
};

/**
 * Serializer for confirming 2FA setup with first code.
 */
export type ConfirmSetupRequest = {
    /**
     * Device ID from setup response
     */
    device_id: string;
    /**
     * 6-digit TOTP code from authenticator app
     */
    code: string;
};

/**
 * Response serializer for setup confirmation.
 */
export type ConfirmSetupResponse = {
    message: string;
    /**
     * List of backup recovery codes (save these!)
     */
    backup_codes: Array<string>;
    /**
     * Warning message about backup codes
     */
    backup_codes_warning: string;
};

/**
 * ConnectionTokenResponse
 *
 * Response model for Centrifugo connection token.
 */
export type ConnectionTokenResponse = {
    /**
     * Token
     *
     * JWT token for Centrifugo connection
     */
    token: string;
    /**
     * Centrifugo Url
     *
     * Centrifugo WebSocket URL
     */
    centrifugo_url: string;
    /**
     * Expires At
     *
     * Token expiration time (ISO 8601)
     */
    expires_at: string;
    /**
     * Channels
     *
     * List of allowed channels
     */
    channels: Array<string>;
};

/**
 * Serializer for listing TOTP devices.
 */
export type DeviceList = {
    readonly id: string;
    /**
     * Device name for identification
     */
    readonly name: string;
    /**
     * Primary device used for verification
     */
    readonly is_primary: boolean;
    readonly status: DeviceStatusEnum;
    readonly created_at: string;
    /**
     * When device setup was confirmed
     */
    readonly confirmed_at: string | null;
    /**
     * Last successful verification
     */
    readonly last_used_at: string | null;
};

/**
 * Response serializer for device list endpoint.
 */
export type DeviceListResponse = {
    devices: Array<DeviceList>;
    has_2fa_enabled: boolean;
};

/**
 * * `pending` - Pending Confirmation
 * * `active` - Active
 * * `disabled` - Disabled
 */
export enum DeviceStatusEnum {
    PENDING = 'pending',
    ACTIVE = 'active',
    DISABLED = 'disabled'
}

/**
 * Serializer for completely disabling 2FA.
 */
export type DisableRequest = {
    /**
     * TOTP code for verification
     */
    code: string;
};

/**
 * Request to start OAuth flow.
 */
export type OAuthAuthorizeRequestRequest = {
    /**
     * URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path
     */
    redirect_uri?: string;
    /**
     * Optional source URL for registration tracking
     */
    source_url?: string;
};

/**
 * Response with OAuth authorization URL.
 */
export type OAuthAuthorizeResponse = {
    /**
     * Full URL to redirect user to OAuth provider
     */
    authorization_url: string;
    /**
     * State token for CSRF protection. Store this and verify on callback.
     */
    state: string;
};

/**
 * Request to complete OAuth flow (callback handler).
 */
export type OAuthCallbackRequestRequest = {
    /**
     * Authorization code from OAuth provider callback
     */
    code: string;
    /**
     * State token for CSRF verification (from authorize response)
     */
    state: string;
    /**
     * Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path
     */
    redirect_uri?: string;
};

/**
 * Serializer for OAuth connection info (user-facing).
 */
export type OAuthConnection = {
    readonly id: number;
    /**
     * OAuth provider name (github, google, etc.)
     *
     * * `github` - GitHub
     */
    readonly provider: OAuthProviderEnum;
    readonly provider_display: string;
    /**
     * Username on the OAuth provider platform
     */
    readonly provider_username: string;
    /**
     * Email from OAuth provider (may differ from user.email)
     */
    readonly provider_email: string;
    /**
     * Avatar URL from OAuth provider
     */
    readonly provider_avatar_url: string;
    /**
     * When this OAuth connection was created
     */
    readonly connected_at: string;
    /**
     * Last time this OAuth connection was used for login
     */
    readonly last_login_at: string;
};

/**
 * Request to disconnect OAuth provider.
 */
export type OAuthDisconnectRequestRequest = {
    /**
     * OAuth provider to disconnect
     *
     * * `github` - GitHub
     */
    provider: OAuthProviderEnum;
};

/**
 * Error response for OAuth endpoints.
 */
export type OAuthError = {
    /**
     * Error code
     */
    error: string;
    /**
     * Human-readable error description
     */
    error_description?: string;
};

/**
 * * `github` - GitHub
 */
export enum OAuthProviderEnum {
    GITHUB = 'github'
}

/**
 * Response with available OAuth providers.
 */
export type OAuthProvidersResponse = {
    /**
     * List of available OAuth providers
     */
    providers: Array<{
        [key: string]: unknown;
    }>;
};

/**
 * Response with JWT tokens after OAuth authentication.
 *
 * When 2FA is required:
 * - requires_2fa: True
 * - session_id: UUID of 2FA verification session
 * - access/refresh/user: null
 *
 * When 2FA is not required:
 * - requires_2fa: False
 * - session_id: null
 * - access/refresh/user: populated
 */
export type OAuthTokenResponse = {
    /**
     * True if 2FA verification is required
     */
    requires_2fa?: boolean;
    /**
     * 2FA session ID (only when requires_2fa=True)
     */
    session_id?: string | null;
    /**
     * JWT access token (null when requires_2fa=True)
     */
    access?: string | null;
    /**
     * JWT refresh token (null when requires_2fa=True)
     */
    refresh?: string | null;
    /**
     * Authenticated user info (null when requires_2fa=True)
     */
    user?: {
        [key: string]: unknown;
    } | null;
    /**
     * True if a new user was created during this OAuth flow
     */
    is_new_user?: boolean;
    /**
     * True if a new OAuth connection was created
     */
    is_new_connection?: boolean;
    /**
     * True if user should be prompted to enable 2FA
     */
    should_prompt_2fa?: boolean;
};

/**
 * Typed error response for OTP operations.
 *
 * error_code values:
 * - invalid_identifier   — malformed email
 * - cooldown             — too soon after last request (retry_after = seconds)
 * - hourly_limit         — hourly quota exceeded   (retry_after = seconds until reset)
 * - daily_limit          — daily quota exceeded    (retry_after = seconds until reset)
 * - rate_limited         — IP-level rate limit hit (no retry_after)
 * - user_creation_failed — internal error creating account
 * - send_failed          — transport error (email / SMS)
 * - internal_error       — unexpected server error
 */
export type OtpErrorResponse = {
    /**
     * Human-readable error message
     */
    error: string;
    /**
     * Machine-readable error code
     */
    error_code?: string | null;
    /**
     * Seconds until the client may retry (present only for rate-limit errors)
     */
    retry_after?: number | null;
};

/**
 * Serializer for OTP request.
 */
export type OtpRequestRequest = {
    /**
     * Email address for OTP delivery
     */
    identifier: string;
    /**
     * Source URL for tracking registration (e.g., https://my.djangocfg.com)
     */
    source_url?: string;
};

/**
 * OTP request response.
 */
export type OtpRequestResponse = {
    /**
     * Success message
     */
    message: string;
    /**
     * Webmail deep-link for the recipient's provider, or null if the domain is unknown.
     */
    webmail?: WebmailLink | null;
};

/**
 * Serializer for OTP verification.
 */
export type OtpVerifyRequest = {
    /**
     * Email address used for OTP request
     */
    identifier: string;
    otp: string;
    /**
     * Source URL for tracking login (e.g., https://my.djangocfg.com)
     */
    source_url?: string;
};

/**
 * OTP verification response.
 *
 * When 2FA is required:
 * - requires_2fa: True
 * - session_id: UUID of 2FA verification session
 * - refresh/access/user: null
 *
 * When 2FA is not required:
 * - requires_2fa: False
 * - session_id: null
 * - refresh/access/user: populated
 */
export type OtpVerifyResponse = {
    /**
     * Whether 2FA verification is required
     */
    requires_2fa?: boolean;
    /**
     * 2FA session ID (if requires_2fa is True)
     */
    session_id?: string | null;
    /**
     * JWT refresh token (if requires_2fa is False)
     */
    refresh?: string | null;
    /**
     * JWT access token (if requires_2fa is False)
     */
    access?: string | null;
    /**
     * User information (if requires_2fa is False)
     */
    user?: User | null;
    /**
     * Whether user should be prompted to enable 2FA
     */
    should_prompt_2fa?: boolean;
};

/**
 * Serializer for updating user profile.
 */
export type PatchedCfgUserUpdateRequest = {
    first_name?: string;
    last_name?: string;
    company?: string;
    phone?: string;
    position?: string;
    language?: string;
    /**
     * IANA timezone name (e.g. 'Asia/Seoul'). Auto-detected from browser via X-Timezone header.
     */
    timezone?: string;
};

/**
 * Serializer for starting 2FA setup.
 */
export type SetupRequest = {
    /**
     * Device name for identification (e.g., 'My iPhone')
     */
    device_name?: string;
};

/**
 * Response serializer for setup initiation.
 */
export type SetupResponse = {
    /**
     * Device ID to use for confirmation
     */
    device_id: string;
    /**
     * Base32-encoded TOTP secret (for manual entry)
     */
    secret: string;
    /**
     * otpauth:// URI for QR code generation
     */
    provisioning_uri: string;
    /**
     * Base64-encoded QR code image (data URI)
     */
    qr_code_base64: string;
    /**
     * Seconds until setup expires (typically 600 = 10 minutes)
     */
    expires_in: number;
};

export type TokenBlacklistRequest = {
    refresh: string;
};

export type TokenRefresh = {
    readonly access: string;
    refresh: string;
};

export type TokenRefreshRequest = {
    refresh: string;
};

/**
 * User data returned after 2FA verification.
 */
export type TotpVerifyUser = {
    readonly id: number;
    readonly email: string;
    first_name?: string | null;
    last_name?: string | null;
    /**
     * Get user's full name.
     */
    readonly full_name: string;
    /**
     * Get user's initials for avatar fallback.
     */
    readonly initials: string;
    /**
     * Get formatted username for display.
     */
    readonly display_username: string;
    company?: string | null;
    phone?: string | null;
    position?: string | null;
    language?: string | null;
    timezone?: string | null;
    readonly avatar: string | null;
    /**
     * Staff status
     *
     * Designates whether the user can log into this admin site.
     */
    readonly is_staff: boolean;
    /**
     * Superuser status
     *
     * Designates that this user has all permissions without explicitly assigning them.
     */
    readonly is_superuser: boolean;
    readonly date_joined: string;
    readonly last_login: string | null;
    readonly unanswered_messages_count: number;
    readonly api_key: string | null;
};

/**
 * Serializer for user details.
 */
export type User = {
    readonly id: number;
    readonly email: string;
    first_name?: string | null;
    last_name?: string | null;
    /**
     * Get user's full name.
     */
    readonly full_name: string;
    /**
     * Get user's initials for avatar fallback.
     */
    readonly initials: string;
    /**
     * Get formatted username for display.
     */
    readonly display_username: string;
    company?: string | null;
    phone?: string | null;
    position?: string | null;
    language?: string | null;
    timezone?: string | null;
    readonly avatar: string | null;
    /**
     * Staff status
     *
     * Designates whether the user can log into this admin site.
     */
    readonly is_staff: boolean;
    /**
     * Superuser status
     *
     * Designates that this user has all permissions without explicitly assigning them.
     */
    readonly is_superuser: boolean;
    readonly date_joined: string;
    readonly last_login: string | null;
    readonly unanswered_messages_count: number;
    readonly centrifugo: CentrifugoToken | null;
    readonly api_key: string | null;
};

/**
 * Serializer for backup code verification during login.
 */
export type VerifyBackupRequest = {
    /**
     * 2FA session ID from login response
     */
    session_id: string;
    /**
     * 8-character backup recovery code
     */
    backup_code: string;
};

/**
 * Serializer for TOTP code verification during login.
 */
export type VerifyRequest = {
    /**
     * 2FA session ID from login response
     */
    session_id: string;
    /**
     * 6-digit TOTP code from authenticator app
     */
    code: string;
};

/**
 * Response serializer for successful 2FA verification.
 */
export type VerifyResponse = {
    message: string;
    /**
     * JWT access token
     */
    access_token: string;
    /**
     * JWT refresh token
     */
    refresh_token: string;
    /**
     * User profile data
     */
    user: TotpVerifyUser;
    /**
     * Number of remaining backup codes (if backup code was used)
     */
    remaining_backup_codes?: number;
    /**
     * Warning message (e.g., low backup codes)
     */
    warning?: string;
};

/**
 * Deep-link that opens the user's webmail on a search for our login email.
 *
 * Present only when the recipient's email domain maps to a known webmail
 * provider (Gmail, Outlook, Mail.ru, Yandex, iCloud, …). For unknown/corporate
 * domains this whole object is null and the frontend shows no button.
 */
export type WebmailLink = {
    /**
     * Provider slug (e.g. 'gmail', 'outlook', 'mail_ru'). Also selects the brand icon on the frontend.
     *
     * * `gmail` - gmail
     * * `outlook` - outlook
     * * `yahoo` - yahoo
     * * `icloud` - icloud
     * * `proton` - proton
     * * `zoho` - zoho
     * * `aol` - aol
     * * `fastmail` - fastmail
     * * `gmx` - gmx
     * * `mailcom` - mailcom
     * * `mail_ru` - mail_ru
     * * `yandex` - yandex
     * * `rambler` - rambler
     * * `qq` - qq
     * * `netease` - netease
     * * `sina` - sina
     * * `aliyun` - aliyun
     * * `naver` - naver
     * * `daum` - daum
     * * `web_de` - web_de
     * * `tonline` - tonline
     * * `seznam` - seznam
     * * `wp_pl` - wp_pl
     * * `o2_pl` - o2_pl
     * * `interia` - interia
     * * `libero` - libero
     * * `virgilio` - virgilio
     * * `orange` - orange
     * * `laposte` - laposte
     * * `free_fr` - free_fr
     * * `sfr` - sfr
     */
    provider: WebmailLinkProviderEnum;
    /**
     * Human-facing provider name, e.g. 'Gmail'.
     */
    provider_name: string;
    /**
     * Absolute URL to open in a new tab (a sender-filtered search, or the inbox as fallback).
     */
    url: string;
    /**
     * True if the URL opens a search filtered to our sender; False if it only opens the inbox.
     */
    is_search: boolean;
};

/**
 * * `gmail` - gmail
 * * `outlook` - outlook
 * * `yahoo` - yahoo
 * * `icloud` - icloud
 * * `proton` - proton
 * * `zoho` - zoho
 * * `aol` - aol
 * * `fastmail` - fastmail
 * * `gmx` - gmx
 * * `mailcom` - mailcom
 * * `mail_ru` - mail_ru
 * * `yandex` - yandex
 * * `rambler` - rambler
 * * `qq` - qq
 * * `netease` - netease
 * * `sina` - sina
 * * `aliyun` - aliyun
 * * `naver` - naver
 * * `daum` - daum
 * * `web_de` - web_de
 * * `tonline` - tonline
 * * `seznam` - seznam
 * * `wp_pl` - wp_pl
 * * `o2_pl` - o2_pl
 * * `interia` - interia
 * * `libero` - libero
 * * `virgilio` - virgilio
 * * `orange` - orange
 * * `laposte` - laposte
 * * `free_fr` - free_fr
 * * `sfr` - sfr
 */
export enum WebmailLinkProviderEnum {
    GMAIL = 'gmail',
    OUTLOOK = 'outlook',
    YAHOO = 'yahoo',
    ICLOUD = 'icloud',
    PROTON = 'proton',
    ZOHO = 'zoho',
    AOL = 'aol',
    FASTMAIL = 'fastmail',
    GMX = 'gmx',
    MAILCOM = 'mailcom',
    MAIL_RU = 'mail_ru',
    YANDEX = 'yandex',
    RAMBLER = 'rambler',
    QQ = 'qq',
    NETEASE = 'netease',
    SINA = 'sina',
    ALIYUN = 'aliyun',
    NAVER = 'naver',
    DAUM = 'daum',
    WEB_DE = 'web_de',
    TONLINE = 'tonline',
    SEZNAM = 'seznam',
    WP_PL = 'wp_pl',
    O2_PL = 'o2_pl',
    INTERIA = 'interia',
    LIBERO = 'libero',
    VIRGILIO = 'virgilio',
    ORANGE = 'orange',
    LAPOSTE = 'laposte',
    FREE_FR = 'free_fr',
    SFR = 'sfr'
}

export type CfgAccountsOauthConnectionsResponse200AutoRef = Array<OAuthConnection>;

export type CfgAccountsOauthDisconnectResponse200AutoRef = {
    message?: string;
};

/**
 * 2FA disabled successfully
 */
export type CfgTotpDisableResponse200AutoRef = unknown;

/**
 * Response serializer for device list endpoint.
 */
export type DeviceListResponseWritable = {
    devices: Array<unknown>;
    has_2fa_enabled: boolean;
};

/**
 * OTP verification response.
 *
 * When 2FA is required:
 * - requires_2fa: True
 * - session_id: UUID of 2FA verification session
 * - refresh/access/user: null
 *
 * When 2FA is not required:
 * - requires_2fa: False
 * - session_id: null
 * - refresh/access/user: populated
 */
export type OtpVerifyResponseWritable = {
    /**
     * Whether 2FA verification is required
     */
    requires_2fa?: boolean;
    /**
     * 2FA session ID (if requires_2fa is True)
     */
    session_id?: string | null;
    /**
     * JWT refresh token (if requires_2fa is False)
     */
    refresh?: string | null;
    /**
     * JWT access token (if requires_2fa is False)
     */
    access?: string | null;
    /**
     * User information (if requires_2fa is False)
     */
    user?: UserWritable | null;
    /**
     * Whether user should be prompted to enable 2FA
     */
    should_prompt_2fa?: boolean;
};

export type TokenRefreshWritable = {
    refresh: string;
};

/**
 * User data returned after 2FA verification.
 */
export type TotpVerifyUserWritable = {
    first_name?: string | null;
    last_name?: string | null;
    company?: string | null;
    phone?: string | null;
    position?: string | null;
    language?: string | null;
    timezone?: string | null;
};

/**
 * Serializer for user details.
 */
export type UserWritable = {
    first_name?: string | null;
    last_name?: string | null;
    company?: string | null;
    phone?: string | null;
    position?: string | null;
    language?: string | null;
    timezone?: string | null;
};

/**
 * Response serializer for successful 2FA verification.
 */
export type VerifyResponseWritable = {
    message: string;
    /**
     * JWT access token
     */
    access_token: string;
    /**
     * JWT refresh token
     */
    refresh_token: string;
    /**
     * User profile data
     */
    user: TotpVerifyUserWritable;
    /**
     * Number of remaining backup codes (if backup code was used)
     */
    remaining_backup_codes?: number;
    /**
     * Warning message (e.g., low backup codes)
     */
    warning?: string;
};

export type CfgAccountsApiKeyRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/accounts/api-key/';
};

export type CfgAccountsApiKeyRetrieveErrors = {
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsApiKeyRetrieveResponses = {
    200: ApiKey;
};

export type CfgAccountsApiKeyRetrieveResponse = CfgAccountsApiKeyRetrieveResponses[keyof CfgAccountsApiKeyRetrieveResponses];

export type CfgAccountsApiKeyRegenerateCreateData = {
    body: ApiKeyRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/api-key/regenerate/';
};

export type CfgAccountsApiKeyRegenerateCreateErrors = {
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsApiKeyRegenerateCreateResponses = {
    200: ApiKeyRegenerate;
};

export type CfgAccountsApiKeyRegenerateCreateResponse = CfgAccountsApiKeyRegenerateCreateResponses[keyof CfgAccountsApiKeyRegenerateCreateResponses];

export type CfgAccountsApiKeyRevealCreateData = {
    body: ApiKeyRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/api-key/reveal/';
};

export type CfgAccountsApiKeyRevealCreateErrors = {
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsApiKeyRevealCreateResponses = {
    200: ApiKeyReveal;
};

export type CfgAccountsApiKeyRevealCreateResponse = CfgAccountsApiKeyRevealCreateResponses[keyof CfgAccountsApiKeyRevealCreateResponses];

export type CfgAccountsApiKeyTestCreateData = {
    body: ApiKeyTestRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/api-key/test/';
};

export type CfgAccountsApiKeyTestCreateResponses = {
    200: ApiKeyTestResult;
};

export type CfgAccountsApiKeyTestCreateResponse = CfgAccountsApiKeyTestCreateResponses[keyof CfgAccountsApiKeyTestCreateResponses];

export type CfgAccountsOauthConnectionsListData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/accounts/oauth/connections/';
};

export type CfgAccountsOauthConnectionsListResponses = {
    200: CfgAccountsOauthConnectionsResponse200AutoRef;
};

export type CfgAccountsOauthConnectionsListResponse = CfgAccountsOauthConnectionsListResponses[keyof CfgAccountsOauthConnectionsListResponses];

export type CfgAccountsOauthDisconnectCreateData = {
    body: OAuthDisconnectRequestRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/oauth/disconnect/';
};

export type CfgAccountsOauthDisconnectCreateErrors = {
    400: OAuthError;
    404: OAuthError;
};

export type CfgAccountsOauthDisconnectCreateError = CfgAccountsOauthDisconnectCreateErrors[keyof CfgAccountsOauthDisconnectCreateErrors];

export type CfgAccountsOauthDisconnectCreateResponses = {
    200: CfgAccountsOauthDisconnectResponse200AutoRef;
};

export type CfgAccountsOauthDisconnectCreateResponse = CfgAccountsOauthDisconnectCreateResponses[keyof CfgAccountsOauthDisconnectCreateResponses];

export type CfgAccountsOauthGithubAuthorizeCreateData = {
    body?: OAuthAuthorizeRequestRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/oauth/github/authorize/';
};

export type CfgAccountsOauthGithubAuthorizeCreateErrors = {
    503: OAuthError;
};

export type CfgAccountsOauthGithubAuthorizeCreateError = CfgAccountsOauthGithubAuthorizeCreateErrors[keyof CfgAccountsOauthGithubAuthorizeCreateErrors];

export type CfgAccountsOauthGithubAuthorizeCreateResponses = {
    200: OAuthAuthorizeResponse;
};

export type CfgAccountsOauthGithubAuthorizeCreateResponse = CfgAccountsOauthGithubAuthorizeCreateResponses[keyof CfgAccountsOauthGithubAuthorizeCreateResponses];

export type CfgAccountsOauthGithubCallbackCreateData = {
    body: OAuthCallbackRequestRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/oauth/github/callback/';
};

export type CfgAccountsOauthGithubCallbackCreateErrors = {
    400: OAuthError;
};

export type CfgAccountsOauthGithubCallbackCreateError = CfgAccountsOauthGithubCallbackCreateErrors[keyof CfgAccountsOauthGithubCallbackCreateErrors];

export type CfgAccountsOauthGithubCallbackCreateResponses = {
    200: OAuthTokenResponse;
};

export type CfgAccountsOauthGithubCallbackCreateResponse = CfgAccountsOauthGithubCallbackCreateResponses[keyof CfgAccountsOauthGithubCallbackCreateResponses];

export type CfgAccountsOauthProvidersRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/accounts/oauth/providers/';
};

export type CfgAccountsOauthProvidersRetrieveResponses = {
    200: OAuthProvidersResponse;
};

export type CfgAccountsOauthProvidersRetrieveResponse = CfgAccountsOauthProvidersRetrieveResponses[keyof CfgAccountsOauthProvidersRetrieveResponses];

export type CfgAccountsOtpRequestCreateData = {
    body: OtpRequestRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/otp/request/';
};

export type CfgAccountsOtpRequestCreateErrors = {
    400: OtpErrorResponse;
    429: OtpErrorResponse;
    500: OtpErrorResponse;
};

export type CfgAccountsOtpRequestCreateError = CfgAccountsOtpRequestCreateErrors[keyof CfgAccountsOtpRequestCreateErrors];

export type CfgAccountsOtpRequestCreateResponses = {
    200: OtpRequestResponse;
};

export type CfgAccountsOtpRequestCreateResponse = CfgAccountsOtpRequestCreateResponses[keyof CfgAccountsOtpRequestCreateResponses];

export type CfgAccountsOtpVerifyCreateData = {
    body: OtpVerifyRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/otp/verify/';
};

export type CfgAccountsOtpVerifyCreateErrors = {
    401: OtpErrorResponse;
    429: OtpErrorResponse;
};

export type CfgAccountsOtpVerifyCreateError = CfgAccountsOtpVerifyCreateErrors[keyof CfgAccountsOtpVerifyCreateErrors];

export type CfgAccountsOtpVerifyCreateResponses = {
    200: OtpVerifyResponse;
};

export type CfgAccountsOtpVerifyCreateResponse = CfgAccountsOtpVerifyCreateResponses[keyof CfgAccountsOtpVerifyCreateResponses];

export type CfgAccountsProfileRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/';
};

export type CfgAccountsProfileRetrieveErrors = {
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfileRetrieveResponses = {
    200: User;
};

export type CfgAccountsProfileRetrieveResponse = CfgAccountsProfileRetrieveResponses[keyof CfgAccountsProfileRetrieveResponses];

export type CfgAccountsProfileAvatarCreateData = {
    body?: {
        /**
         * Avatar image file (JPEG, PNG, GIF, WebP, max 5MB)
         */
        avatar: Blob | File;
    };
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/avatar/';
};

export type CfgAccountsProfileAvatarCreateErrors = {
    /**
     * Invalid file or validation error.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfileAvatarCreateResponses = {
    200: User;
};

export type CfgAccountsProfileAvatarCreateResponse = CfgAccountsProfileAvatarCreateResponses[keyof CfgAccountsProfileAvatarCreateResponses];

export type CfgAccountsProfileDeleteCreateData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/delete/';
};

export type CfgAccountsProfileDeleteCreateErrors = {
    /**
     * Account is already deleted.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfileDeleteCreateResponses = {
    200: AccountDeleteResponse;
};

export type CfgAccountsProfileDeleteCreateResponse = CfgAccountsProfileDeleteCreateResponses[keyof CfgAccountsProfileDeleteCreateResponses];

export type CfgAccountsProfilePartialPartialUpdateData = {
    body?: PatchedCfgUserUpdateRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/partial/';
};

export type CfgAccountsProfilePartialPartialUpdateErrors = {
    /**
     * Invalid data provided.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfilePartialPartialUpdateResponses = {
    200: User;
};

export type CfgAccountsProfilePartialPartialUpdateResponse = CfgAccountsProfilePartialPartialUpdateResponses[keyof CfgAccountsProfilePartialPartialUpdateResponses];

export type CfgAccountsProfilePartialUpdateData = {
    body?: CfgUserUpdateRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/partial/';
};

export type CfgAccountsProfilePartialUpdateErrors = {
    /**
     * Invalid data provided.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfilePartialUpdateResponses = {
    200: User;
};

export type CfgAccountsProfilePartialUpdateResponse = CfgAccountsProfilePartialUpdateResponses[keyof CfgAccountsProfilePartialUpdateResponses];

export type CfgAccountsProfileUpdatePartialUpdateData = {
    body?: PatchedCfgUserUpdateRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/update/';
};

export type CfgAccountsProfileUpdatePartialUpdateErrors = {
    /**
     * Invalid data provided.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfileUpdatePartialUpdateResponses = {
    200: User;
};

export type CfgAccountsProfileUpdatePartialUpdateResponse = CfgAccountsProfileUpdatePartialUpdateResponses[keyof CfgAccountsProfileUpdatePartialUpdateResponses];

export type CfgAccountsProfileUpdateUpdateData = {
    body?: CfgUserUpdateRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/profile/update/';
};

export type CfgAccountsProfileUpdateUpdateErrors = {
    /**
     * Invalid data provided.
     */
    400: unknown;
    /**
     * Authentication credentials were not provided.
     */
    401: unknown;
};

export type CfgAccountsProfileUpdateUpdateResponses = {
    200: User;
};

export type CfgAccountsProfileUpdateUpdateResponse = CfgAccountsProfileUpdateUpdateResponses[keyof CfgAccountsProfileUpdateUpdateResponses];

export type CfgAccountsTokenBlacklistCreateData = {
    body: TokenBlacklistRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/token/blacklist/';
};

export type CfgAccountsTokenBlacklistCreateResponses = {
    /**
     * No response body
     */
    200: unknown;
};

export type CfgAccountsTokenRefreshCreateData = {
    body: TokenRefreshRequest;
    path?: never;
    query?: never;
    url: '/cfg/accounts/token/refresh/';
};

export type CfgAccountsTokenRefreshCreateResponses = {
    200: TokenRefresh;
};

export type CfgAccountsTokenRefreshCreateResponse = CfgAccountsTokenRefreshCreateResponses[keyof CfgAccountsTokenRefreshCreateResponses];

export type CfgCentrifugoAuthTokenRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/centrifugo/auth/token/';
};

export type CfgCentrifugoAuthTokenRetrieveErrors = {
    /**
     * Unauthorized - authentication required
     */
    401: unknown;
    /**
     * Server error
     */
    500: unknown;
};

export type CfgCentrifugoAuthTokenRetrieveResponses = {
    200: ConnectionTokenResponse;
};

export type CfgCentrifugoAuthTokenRetrieveResponse = CfgCentrifugoAuthTokenRetrieveResponses[keyof CfgCentrifugoAuthTokenRetrieveResponses];

export type CfgTotpBackupCodesRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/totp/backup-codes/';
};

export type CfgTotpBackupCodesRetrieveResponses = {
    200: BackupCodesStatus;
};

export type CfgTotpBackupCodesRetrieveResponse = CfgTotpBackupCodesRetrieveResponses[keyof CfgTotpBackupCodesRetrieveResponses];

export type CfgTotpBackupCodesRegenerateCreateData = {
    body: BackupCodesRegenerateRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/backup-codes/regenerate/';
};

export type CfgTotpBackupCodesRegenerateCreateErrors = {
    /**
     * Invalid code or 2FA not enabled
     */
    400: unknown;
};

export type CfgTotpBackupCodesRegenerateCreateResponses = {
    200: BackupCodesRegenerateResponse;
};

export type CfgTotpBackupCodesRegenerateCreateResponse = CfgTotpBackupCodesRegenerateCreateResponses[keyof CfgTotpBackupCodesRegenerateCreateResponses];

export type CfgTotpDevicesRetrieveData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/cfg/totp/devices/';
};

export type CfgTotpDevicesRetrieveResponses = {
    200: DeviceListResponse;
};

export type CfgTotpDevicesRetrieveResponse = CfgTotpDevicesRetrieveResponses[keyof CfgTotpDevicesRetrieveResponses];

export type CfgTotpDevicesDestroyData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/cfg/totp/devices/{id}/';
};

export type CfgTotpDevicesDestroyResponses = {
    /**
     * No response body
     */
    204: void;
};

export type CfgTotpDevicesDestroyResponse = CfgTotpDevicesDestroyResponses[keyof CfgTotpDevicesDestroyResponses];

export type CfgTotpDisableCreateData = {
    body: DisableRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/disable/';
};

export type CfgTotpDisableCreateErrors = {
    /**
     * Invalid code
     */
    400: unknown;
};

export type CfgTotpDisableCreateResponses = {
    200: CfgTotpDisableResponse200AutoRef;
};

export type CfgTotpDisableCreateResponse = CfgTotpDisableCreateResponses[keyof CfgTotpDisableCreateResponses];

export type CfgTotpSetupCreateData = {
    body?: SetupRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/setup/';
};

export type CfgTotpSetupCreateErrors = {
    /**
     * 2FA already enabled or invalid request
     */
    400: unknown;
};

export type CfgTotpSetupCreateResponses = {
    200: SetupResponse;
};

export type CfgTotpSetupCreateResponse = CfgTotpSetupCreateResponses[keyof CfgTotpSetupCreateResponses];

export type CfgTotpSetupConfirmCreateData = {
    body: ConfirmSetupRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/setup/confirm/';
};

export type CfgTotpSetupConfirmCreateErrors = {
    /**
     * Invalid code or setup expired
     */
    400: unknown;
};

export type CfgTotpSetupConfirmCreateResponses = {
    200: ConfirmSetupResponse;
};

export type CfgTotpSetupConfirmCreateResponse = CfgTotpSetupConfirmCreateResponses[keyof CfgTotpSetupConfirmCreateResponses];

export type CfgTotpVerifyCreateData = {
    body: VerifyRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/verify/';
};

export type CfgTotpVerifyCreateErrors = {
    /**
     * Invalid code or session
     */
    400: unknown;
    /**
     * Too many attempts
     */
    403: unknown;
};

export type CfgTotpVerifyCreateResponses = {
    200: VerifyResponse;
};

export type CfgTotpVerifyCreateResponse = CfgTotpVerifyCreateResponses[keyof CfgTotpVerifyCreateResponses];

export type CfgTotpVerifyBackupCreateData = {
    body: VerifyBackupRequest;
    path?: never;
    query?: never;
    url: '/cfg/totp/verify/backup/';
};

export type CfgTotpVerifyBackupCreateErrors = {
    /**
     * Invalid backup code or session
     */
    400: unknown;
};

export type CfgTotpVerifyBackupCreateResponses = {
    200: VerifyResponse;
};

export type CfgTotpVerifyBackupCreateResponse = CfgTotpVerifyBackupCreateResponses[keyof CfgTotpVerifyBackupCreateResponses];
