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

from __future__ import annotations
from .accesstokencredentials import (
    AccessTokenCredentials,
    AccessTokenCredentialsTypedDict,
)
from .slackdata import SlackData, SlackDataTypedDict
import pydantic
from pydantic.functional_validators import AfterValidator
from ragie.types import BaseModel
from ragie.utils import validate_const
from typing import Literal
from typing_extensions import Annotated, TypedDict


class AuthenticatorSlackConnectionTypedDict(TypedDict):
    data: SlackDataTypedDict
    user_email: str
    r"""The email of the Slack account this is for"""
    credentials: AccessTokenCredentialsTypedDict
    provider: Literal["slack"]


class AuthenticatorSlackConnection(BaseModel):
    data: SlackData

    user_email: str
    r"""The email of the Slack account this is for"""

    credentials: AccessTokenCredentials

    PROVIDER: Annotated[
        Annotated[Literal["slack"], AfterValidator(validate_const("slack"))],
        pydantic.Field(alias="provider"),
    ] = "slack"
