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

from __future__ import annotations
from .sourceaccount import SourceAccount, SourceAccountTypedDict
from codat_bankfeeds.types import BaseModel
import pydantic
from typing import Optional, TypedDict
from typing_extensions import Annotated, NotRequired


class SourceAccountWebhookPayloadTypedDict(TypedDict):
    company_id: NotRequired[str]
    r"""Unique identifier for your SMB in Codat."""
    connection_id: NotRequired[str]
    r"""Unique identifier for a company's data connection."""
    source_account: NotRequired[SourceAccountTypedDict]
    r"""The target bank account in a supported accounting software for ingestion into a bank feed."""


class SourceAccountWebhookPayload(BaseModel):
    company_id: Annotated[Optional[str], pydantic.Field(alias="companyId")] = None
    r"""Unique identifier for your SMB in Codat."""

    connection_id: Annotated[Optional[str], pydantic.Field(alias="connectionId")] = None
    r"""Unique identifier for a company's data connection."""

    source_account: Annotated[
        Optional[SourceAccount], pydantic.Field(alias="sourceAccount")
    ] = None
    r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
