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

from __future__ import annotations
from codat_bankfeeds.models.shared import (
    sourceaccount as shared_sourceaccount,
    sourceaccountv2 as shared_sourceaccountv2,
)
from codat_bankfeeds.types import BaseModel
from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
import pydantic
from typing import List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class ListSourceAccountsRequestTypedDict(TypedDict):
    company_id: str
    r"""Unique identifier for a company."""
    connection_id: str
    r"""Unique identifier for a connection."""


class ListSourceAccountsRequest(BaseModel):
    company_id: Annotated[
        str,
        pydantic.Field(alias="companyId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Unique identifier for a company."""

    connection_id: Annotated[
        str,
        pydantic.Field(alias="connectionId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Unique identifier for a connection."""


ListSourceAccountsResponseBodyTypedDict = TypeAliasType(
    "ListSourceAccountsResponseBodyTypedDict",
    Union[
        List[shared_sourceaccountv2.SourceAccountV2TypedDict],
        List[shared_sourceaccount.SourceAccountTypedDict],
    ],
)
r"""Success"""


ListSourceAccountsResponseBody = TypeAliasType(
    "ListSourceAccountsResponseBody",
    Union[
        List[shared_sourceaccountv2.SourceAccountV2],
        List[shared_sourceaccount.SourceAccount],
    ],
)
r"""Success"""
