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

from __future__ import annotations
from .accesstokencredentials import (
    AccessTokenCredentials,
    AccessTokenCredentialsTypedDict,
)
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 AuthenticatorNotionConnectionTypedDict(TypedDict):
    workspace_id: str
    workspace_name: str
    user_email: str
    r"""The email of the Notion account this is for"""
    credentials: AccessTokenCredentialsTypedDict
    provider: Literal["notion"]


class AuthenticatorNotionConnection(BaseModel):
    workspace_id: str

    workspace_name: str

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

    credentials: AccessTokenCredentials

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