# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Dict, Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from .._types import SequenceNotStr

__all__ = ["DataIngestParams", "Data", "DataID", "DataUnionMember1", "Schema"]


class DataIngestParams(TypedDict, total=False):
    data: Required[Data]
    """Single object or array of objects to ingest"""

    schema: Dict[str, Schema]
    """Schema mapping field names to their content type definitions.

    Use this to specify which fields contain URLs that should be processed (images,
    videos, or websites).
    """


class DataIDTyped(TypedDict, total=False):
    id: Required[str]
    """Unique identifier for this data object"""


DataID: TypeAlias = Union[DataIDTyped, Dict[str, Union[str, float, bool, SequenceNotStr[str], None]]]


class DataUnionMember1Typed(TypedDict, total=False):
    id: Required[str]
    """Unique identifier for this data object"""


DataUnionMember1: TypeAlias = Union[
    DataUnionMember1Typed, Dict[str, Union[str, float, bool, SequenceNotStr[str], None]]
]

Data: TypeAlias = Union[DataID, Iterable[DataUnionMember1]]


class Schema(TypedDict, total=False):
    content_type: Literal["image_url", "video_url", "website_url"]
    """The type of content (image_url, video_url, or website_url)"""
