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

from __future__ import annotations
from .documentrole import DocumentRole
from .updatedocumentaccessresponse import (
    UpdateDocumentAccessResponse,
    UpdateDocumentAccessResponseTypedDict,
)
from factify.types import BaseModel
from factify.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List
from typing_extensions import Annotated, TypedDict


class UpdateDocumentAccessUpdateDocumentAccessRequestTypedDict(TypedDict):
    r"""UpdateDocumentAccessRequest updates a single recipient's role."""

    document_role: DocumentRole


class UpdateDocumentAccessUpdateDocumentAccessRequest(BaseModel):
    r"""UpdateDocumentAccessRequest updates a single recipient's role."""

    document_role: DocumentRole


class UpdateDocumentAccessRequestTypedDict(TypedDict):
    document_id: str
    r"""Document ID."""
    recipient_id: str
    r"""Recipient ID (TypeID: user_xxx or bot_xxx)."""
    body: UpdateDocumentAccessUpdateDocumentAccessRequestTypedDict


class UpdateDocumentAccessRequest(BaseModel):
    document_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Document ID."""

    recipient_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Recipient ID (TypeID: user_xxx or bot_xxx)."""

    body: Annotated[
        UpdateDocumentAccessUpdateDocumentAccessRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class UpdateDocumentAccessResponseResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: UpdateDocumentAccessResponseTypedDict


class UpdateDocumentAccessResponseResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: UpdateDocumentAccessResponse
