# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T03:32:15+00:00
from __future__ import annotations
from enum import Enum
from typing import Dict, List, Optional
from uuid import UUID
from pydantic import BaseModel, Field
class AccessTokenInfoResponse(BaseModel):
app_id: int
expires_in: int
hub_domain: Optional[str] = None
hub_id: int
scope_to_scope_group_pks: List[int]
scopes: List[str]
token: str
token_type: str
trial_scope_to_scope_group_pks: List[int]
trial_scopes: List[str]
user: Optional[str] = None
user_id: int
class ErrorDetail(BaseModel):
code: Optional[str] = Field(
None, description='The status code associated with the error detail'
)
context: Optional[Dict[str, List[str]]] = Field(
None,
description='Context about the error condition',
examples=[{'missingScopes': ['scope1', 'scope2']}],
)
in_: Optional[str] = Field(
None,
alias='in',
description='The name of the field or parameter in which the error was found.',
)
message: str = Field(
...,
description='A human readable message describing the error along with remediation steps where appropriate',
)
subCategory: Optional[str] = Field(
None,
description='A specific category that contains more specific detail about the error',
)
class RefreshTokenInfoResponse(BaseModel):
client_id: str
hub_domain: Optional[str] = None
hub_id: int
scopes: List[str]
token: str
token_type: str
user: Optional[str] = None
user_id: int
class TokenResponseIF(BaseModel):
access_token: str
expires_in: int
id_token: Optional[str] = None
refresh_token: str
token_type: str
class GrantType(Enum):
authorization_code = 'authorization_code'
refresh_token = 'refresh_token'
class OauthV1TokenPostRequest(BaseModel):
client_id: Optional[str] = None
client_secret: Optional[str] = None
code: Optional[str] = None
grant_type: Optional[GrantType] = None
redirect_uri: Optional[str] = None
refresh_token: Optional[str] = None
class Error(BaseModel):
category: str = Field(..., description='The error category')
context: Optional[Dict[str, List[str]]] = Field(
None,
description='Context about the error condition',
examples=[
{
'invalidPropertyName': ['propertyValue'],
'missingScopes': ['scope1', 'scope2'],
}
],
)
correlationId: UUID = Field(
...,
description='A unique identifier for the request. Include this value with any error reports or support tickets',
examples=['aeb5f871-7f07-4993-9211-075dc63e7cbf'],
)
errors: Optional[List[ErrorDetail]] = Field(
None, description='further information about the error'
)
links: Optional[Dict[str, str]] = Field(
None,
description='A map of link names to associated URIs containing documentation about the error or recommended remediation steps',
)
message: str = Field(
...,
description='A human readable message describing the error along with remediation steps where appropriate',
examples=['An error occurred'],
)
subCategory: Optional[str] = Field(
None,
description='A specific category that contains more specific detail about the error',
)