# Generated by ariadne-codegen
# Source: ./documents

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ArcadeProviders,
    AuthenticationServiceTypes,
    ConnectorTypes,
    EntityState,
    IntegrationServiceTypes,
    MCPServerTypes,
    OAuthProviders,
    UserTypes,
)


class GetUser(BaseModel):
    user: Optional["GetUserUser"]


class GetUserUser(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    modified_date: Optional[Any] = Field(alias="modifiedDate")
    relevance: Optional[float]
    owner: "GetUserUserOwner"
    state: EntityState
    type: Optional[UserTypes]
    identifier: str
    description: Optional[str]
    connectors: Optional[list[Optional["GetUserUserConnectors"]]]
    personas: Optional[list[Optional["GetUserUserPersonas"]]]
    quota: Optional["GetUserUserQuota"]
    credits: Optional[Any]
    last_credits_date: Optional[Any] = Field(alias="lastCreditsDate")
    accumulated_credits: Optional[Any] = Field(alias="accumulatedCredits")


class GetUserUserOwner(BaseModel):
    id: str


class GetUserUserConnectors(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ConnectorTypes]
    authentication: Optional["GetUserUserConnectorsAuthentication"]
    integration: Optional["GetUserUserConnectorsIntegration"]


class GetUserUserConnectorsAuthentication(BaseModel):
    type: AuthenticationServiceTypes
    token: Optional[str]
    api_key: Optional[str] = Field(alias="apiKey")
    microsoft: Optional["GetUserUserConnectorsAuthenticationMicrosoft"]
    google: Optional["GetUserUserConnectorsAuthenticationGoogle"]
    oauth: Optional["GetUserUserConnectorsAuthenticationOauth"]
    arcade: Optional["GetUserUserConnectorsAuthenticationArcade"]


class GetUserUserConnectorsAuthenticationMicrosoft(BaseModel):
    tenant_id: str = Field(alias="tenantId")
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")


class GetUserUserConnectorsAuthenticationGoogle(BaseModel):
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")


class GetUserUserConnectorsAuthenticationOauth(BaseModel):
    provider: OAuthProviders
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")
    refresh_token: str = Field(alias="refreshToken")
    redirect_uri: Optional[str] = Field(alias="redirectUri")
    metadata: Optional[str]


class GetUserUserConnectorsAuthenticationArcade(BaseModel):
    authorization_id: str = Field(alias="authorizationId")
    provider: ArcadeProviders
    metadata: Optional[str]


class GetUserUserConnectorsIntegration(BaseModel):
    type: IntegrationServiceTypes
    uri: Optional[str]
    slack: Optional["GetUserUserConnectorsIntegrationSlack"]
    email: Optional["GetUserUserConnectorsIntegrationEmail"]
    twitter: Optional["GetUserUserConnectorsIntegrationTwitter"]
    mcp: Optional["GetUserUserConnectorsIntegrationMcp"]


class GetUserUserConnectorsIntegrationSlack(BaseModel):
    token: str
    channel: str


class GetUserUserConnectorsIntegrationEmail(BaseModel):
    from_: str = Field(alias="from")
    subject: str
    to: list[str]


class GetUserUserConnectorsIntegrationTwitter(BaseModel):
    consumer_key: str = Field(alias="consumerKey")
    consumer_secret: str = Field(alias="consumerSecret")
    access_token_key: str = Field(alias="accessTokenKey")
    access_token_secret: str = Field(alias="accessTokenSecret")


class GetUserUserConnectorsIntegrationMcp(BaseModel):
    token: Optional[str]
    type: MCPServerTypes


class GetUserUserPersonas(BaseModel):
    id: str
    name: str
    state: EntityState
    identifier: Optional[str]
    platform: Optional[str]
    display_name: Optional[str] = Field(alias="displayName")
    timezone: Optional[str]
    role: Optional[str]
    instructions: Optional[str]
    facts: Optional[list["GetUserUserPersonasFacts"]]


class GetUserUserPersonasFacts(BaseModel):
    id: Optional[str]
    text: Optional[str]


class GetUserUserQuota(BaseModel):
    credits: Optional[int]


GetUser.model_rebuild()
GetUserUser.model_rebuild()
GetUserUserConnectors.model_rebuild()
GetUserUserConnectorsAuthentication.model_rebuild()
GetUserUserConnectorsIntegration.model_rebuild()
GetUserUserPersonas.model_rebuild()
