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

from __future__ import annotations
from .tokentype import TokenType
from moovio_sdk.types import BaseModel
from typing_extensions import TypedDict


class AuthTokenTypedDict(TypedDict):
    token_type: TokenType
    r"""An [RFC 6750](https://www.rfc-editor.org/rfc/rfc6750#section-6.1) token type."""
    access_token: str
    r"""A value passed to the authorization server to gain access to the system."""
    refresh_token: str
    r"""A value passed to the authorization server to obtain a new access token."""
    expires_in: int
    r"""Unix timestamp indicating when this token expires."""
    scope: str
    r"""A space-delimited list of [scopes](https://docs.moov.io/api/authentication/scopes/) that are allowed."""


class AuthToken(BaseModel):
    token_type: TokenType
    r"""An [RFC 6750](https://www.rfc-editor.org/rfc/rfc6750#section-6.1) token type."""

    access_token: str
    r"""A value passed to the authorization server to gain access to the system."""

    refresh_token: str
    r"""A value passed to the authorization server to obtain a new access token."""

    expires_in: int
    r"""Unix timestamp indicating when this token expires."""

    scope: str
    r"""A space-delimited list of [scopes](https://docs.moov.io/api/authentication/scopes/) that are allowed."""
