"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .apikey import APIKey, APIKeyTypedDict
from factify.types import BaseModel
from typing_extensions import TypedDict


class CreateAPIKeyResponseTypedDict(TypedDict):
    r"""CreateApiKeyResponse contains the newly created API key and its secret."""

    api_key: APIKeyTypedDict
    r"""ApiKey represents an authentication credential for programmatic API access."""
    secret: str
    r"""The API key secret. This is only returned once and cannot be retrieved later.
    Format: ffy_{env}_{base32_uuid7}{base62_random}
    - env: \"prod\" or \"test\" 
    - base32_uuid7: 26 chars (TypeID base32 alphabet: 0-9a-hjkmnp-tv-z)
    - base62_random: 43 chars (0-9A-Za-z)
    Store this value securely - it will not be shown again.
    SECURITY WARNING: This field must NEVER be logged. Handlers must redact secrets from all logs.
    """


class CreateAPIKeyResponse(BaseModel):
    r"""CreateApiKeyResponse contains the newly created API key and its secret."""

    api_key: APIKey
    r"""ApiKey represents an authentication credential for programmatic API access."""

    secret: str
    r"""The API key secret. This is only returned once and cannot be retrieved later.
    Format: ffy_{env}_{base32_uuid7}{base62_random}
    - env: \"prod\" or \"test\" 
    - base32_uuid7: 26 chars (TypeID base32 alphabet: 0-9a-hjkmnp-tv-z)
    - base62_random: 43 chars (0-9A-Za-z)
    Store this value securely - it will not be shown again.
    SECURITY WARNING: This field must NEVER be logged. Handlers must redact secrets from all logs.
    """
