upgrade pydantic (#266)
* upgrade pydantic Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * update other deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * update other deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * ruff Signed-off-by: Jess Frazelle <github@jessfraz.com> * bump more deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * update Signed-off-by: Jess Frazelle <github@jessfraz.com> * format Signed-off-by: Jess Frazelle <github@jessfraz.com> * bump Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
""" Contains all the data models used in inputs/outputs """
|
||||
"""Contains all the data models used in inputs/outputs"""
|
||||
|
||||
from .account_provider import AccountProvider
|
||||
from .add_org_member import AddOrgMember
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.user_org_role import UserOrgRole
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.unit_angle import UnitAngle
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.annotation_line_end import AnnotationLineEnd
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.annotation_text_alignment_x import AnnotationTextAlignmentX
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ApiCallQueryGroup(BaseModel):
|
||||
"""A response for a query on the API call table that is grouped by something."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.error_code import ErrorCode
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class AppClientInfo(BaseModel):
|
||||
"""Information about a third party app client."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class AuthCallback(BaseModel):
|
||||
"""The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating."""
|
||||
|
||||
|
||||
@ -6,8 +6,7 @@ class Axis(str, Enum):
|
||||
|
||||
See [cglearn.eu] for background reading.
|
||||
|
||||
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1
|
||||
""" # noqa: E501
|
||||
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1""" # noqa: E501
|
||||
|
||||
"""# 'Y' axis. """ # noqa: E501
|
||||
Y = "y"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.axis import Axis
|
||||
|
||||
@ -1,45 +1,32 @@
|
||||
import base64
|
||||
import binascii
|
||||
from typing import Any
|
||||
from typing import Any, Type
|
||||
|
||||
from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
from pydantic_core import core_schema
|
||||
|
||||
|
||||
class Base64Data:
|
||||
def __init__(self, data: bytes):
|
||||
"""
|
||||
Initializes the object.
|
||||
|
||||
If the provided data is already in base64 encoded format, it will store it.
|
||||
If the data is a regular byte string, it will encode and then store it.
|
||||
"""
|
||||
if self.is_base64(data):
|
||||
self._data = str(data, "utf-8")
|
||||
else:
|
||||
encoded = base64.b64encode(data)
|
||||
self._data = str(encoded, "utf-8")
|
||||
|
||||
@staticmethod
|
||||
def is_base64(data: bytes) -> bool:
|
||||
"""Checks if given data is base64 encoded."""
|
||||
try:
|
||||
str_data = str(data, "utf-8")
|
||||
_ = base64.urlsafe_b64decode(str_data.strip("=") + "===")
|
||||
return True
|
||||
except binascii.Error:
|
||||
return False
|
||||
|
||||
def get_encoded(self) -> str:
|
||||
"""Returns the stored base64 encoded data."""
|
||||
return self._data
|
||||
|
||||
def get_decoded(self) -> bytes:
|
||||
"""Returns the decoded byte string."""
|
||||
return base64.urlsafe_b64decode(self._data.strip("=") + "===")
|
||||
|
||||
class Base64Data(bytes):
|
||||
@classmethod
|
||||
def __get_pydantic_core_schema__(
|
||||
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||
) -> CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(cls, handler(bytes))
|
||||
cls, source: Type[Any], handler: GetCoreSchemaHandler
|
||||
) -> core_schema.CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(
|
||||
cls.validate,
|
||||
core_schema.union_schema(
|
||||
[
|
||||
core_schema.str_schema(),
|
||||
core_schema.bytes_schema(),
|
||||
]
|
||||
),
|
||||
serialization=core_schema.plain_serializer_function_ser_schema(
|
||||
cls.serialize
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def validate(cls, v):
|
||||
return base64.urlsafe_b64decode(v.strip("=") + "===")
|
||||
|
||||
@classmethod
|
||||
def serialize(cls, v: "Base64Data") -> bytes:
|
||||
return v
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Union
|
||||
from pydantic import BaseModel, ConfigDict, RootModel
|
||||
|
||||
|
||||
|
||||
class response(BaseModel):
|
||||
"""Response to the modeling command."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class CacheMetadata(BaseModel):
|
||||
"""Metadata about our cache.
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.camera_settings import CameraSettings
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.camera_settings import CameraSettings
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ClientMetrics(BaseModel):
|
||||
"""ClientMetrics contains information regarding the state of the peer."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ClosePath(BaseModel):
|
||||
"""The response from the `ClosePath` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List, Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Cluster(BaseModel):
|
||||
"""Cluster information."""
|
||||
|
||||
|
||||
@ -6,8 +6,7 @@ class CodeLanguage(str, Enum):
|
||||
|
||||
<details><summary>JSON schema</summary>
|
||||
|
||||
```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>
|
||||
""" # noqa: E501
|
||||
```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>""" # noqa: E501
|
||||
|
||||
"""# The `go` programming language. """ # noqa: E501
|
||||
GO = "go"
|
||||
|
||||
@ -10,8 +10,7 @@ class CodeOutput(BaseModel):
|
||||
|
||||
<details><summary>JSON schema</summary>
|
||||
|
||||
```json { \"description\": \"Output of the code being executed.\", \"type\": \"object\", \"properties\": { \"output_files\": { \"description\": \"The contents of the files requested if they were passed.\", \"type\": \"array\", \"items\": { \"$ref\": \"#/components/schemas/OutputFile\" } }, \"stderr\": { \"description\": \"The stderr of the code.\", \"default\": \"\", \"type\": \"string\" }, \"stdout\": { \"description\": \"The stdout of the code.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>
|
||||
"""
|
||||
```json { \"description\": \"Output of the code being executed.\", \"type\": \"object\", \"properties\": { \"output_files\": { \"description\": \"The contents of the files requested if they were passed.\", \"type\": \"array\", \"items\": { \"$ref\": \"#/components/schemas/OutputFile\" } }, \"stderr\": { \"description\": \"The stderr of the code.\", \"default\": \"\", \"type\": \"string\" }, \"stdout\": { \"description\": \"The stdout of the code.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>"""
|
||||
|
||||
output_files: Optional[List[OutputFile]] = None
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Color(BaseModel):
|
||||
"""An RGBA color"""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Dict, Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Coupon(BaseModel):
|
||||
"""The resource representing a Coupon."""
|
||||
|
||||
|
||||
@ -7,8 +7,7 @@ from pydantic_core import CoreSchema, core_schema
|
||||
class Currency(str):
|
||||
"""Currency is the list of supported currencies. Always lowercase.
|
||||
|
||||
This comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>.
|
||||
"""
|
||||
This comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>."""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.curve_type import CurveType
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class DefaultCameraFocusOn(BaseModel):
|
||||
"""The response from the `DefaultCameraFocusOn` command."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.camera_settings import CameraSettings
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.camera_settings import CameraSettings
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.unit_density import UnitDensity
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from .base64data import Base64Data
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.o_auth2_grant_type import OAuth2GrantType
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class DeviceAuthRequestForm(BaseModel):
|
||||
"""The request parameters for the OAuth 2.0 Device Authorization Grant flow."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class DeviceAuthVerifyParams(BaseModel):
|
||||
"""The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.coupon import Coupon
|
||||
|
||||
@ -4,7 +4,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class DiscountCode(BaseModel):
|
||||
"""A discount code for a store."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EmailAuthenticationForm(BaseModel):
|
||||
"""The body of the form for email authentication."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityCircularPattern(BaseModel):
|
||||
"""The response from the `EntityCircularPattern` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityGetAllChildUuids(BaseModel):
|
||||
"""The response from the `EntityGetAllChildUuids` command."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityGetChildUuid(BaseModel):
|
||||
"""The response from the `EntityGetChildUuid` command."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.length_unit import LengthUnit
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityGetNumChildren(BaseModel):
|
||||
"""The response from the `EntityGetNumChildren` command."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityGetParentId(BaseModel):
|
||||
"""The response from the `EntityGetParentId` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityGetSketchPaths(BaseModel):
|
||||
"""The response from the `EntityGetSketchPaths` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityLinearPattern(BaseModel):
|
||||
"""The response from the `EntityLinearPattern` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityLinearPatternTransform(BaseModel):
|
||||
"""The response from the `EntityLinearPatternTransform` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Error(BaseModel):
|
||||
"""Error information from a response."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from .base64data import Base64Data
|
||||
|
||||
@ -10,8 +10,7 @@ from ..models.uuid import Uuid
|
||||
class ExtendedUser(BaseModel):
|
||||
"""Extended user information.
|
||||
|
||||
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp | Stripe
|
||||
"""
|
||||
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp | Stripe"""
|
||||
|
||||
block: Optional[BlockReason] = None
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class FileSystemMetadata(BaseModel):
|
||||
"""Metadata about our file system.
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Gateway(BaseModel):
|
||||
"""Gateway information."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.entity_type import EntityType
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class GetNumObjects(BaseModel):
|
||||
"""The response from the `GetNumObjects` command."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class HighlightSetEntity(BaseModel):
|
||||
"""The response from the `HighlightSetEntity` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List, Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class IceServer(BaseModel):
|
||||
"""Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on <https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer>"""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ImportFile(BaseModel):
|
||||
"""File to import into the current model. If you are sending binary data for a file, be sure to send the WebSocketRequest as binary/bson, not text/json."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ImportFiles(BaseModel):
|
||||
"""Data from importing the files"""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ImportedGeometry(BaseModel):
|
||||
"""Data from importing the files"""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.jetstream_config import JetstreamConfig
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class JetstreamApiStats(BaseModel):
|
||||
"""Jetstream API statistics."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class JetstreamConfig(BaseModel):
|
||||
"""Jetstream configuration."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.jetstream_api_stats import JetstreamApiStats
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class KclCodeCompletionParams(BaseModel):
|
||||
"""Extra params for the completions."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class KclCodeCompletionResponse(BaseModel):
|
||||
"""A response with KCL code completions."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class LeafNode(BaseModel):
|
||||
"""Leaf node information."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Loft(BaseModel):
|
||||
"""The response from the `Loft` command."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.unit_mass import UnitMass
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class MetaClusterInfo(BaseModel):
|
||||
"""Jetstream statistics."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.cache_metadata import CacheMetadata
|
||||
|
||||
@ -6,8 +6,7 @@ class Method(str, Enum):
|
||||
|
||||
This type also contains constants for a number of common HTTP methods such as GET, POST, etc.
|
||||
|
||||
Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.
|
||||
""" # noqa: E501
|
||||
Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.""" # noqa: E501
|
||||
|
||||
"""# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501
|
||||
OPTIONS = "OPTIONS"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.modeling_cmd import ModelingCmd
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class ModelingSessionData(BaseModel):
|
||||
"""Successful Websocket response."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class MouseClick(BaseModel):
|
||||
"""The response from the `MouseClick` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class OAuth2ClientInfo(BaseModel):
|
||||
"""Information about an OAuth 2.0 client."""
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Onboarding(BaseModel):
|
||||
"""Onboarding details"""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class OrgDetails(BaseModel):
|
||||
"""The user-modifiable parts of an organization."""
|
||||
|
||||
|
||||
@ -3,14 +3,12 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class OutputFile(BaseModel):
|
||||
"""Output file contents.
|
||||
|
||||
<details><summary>JSON schema</summary>
|
||||
|
||||
```json { \"description\": \"Output file contents.\", \"type\": \"object\", \"properties\": { \"contents\": { \"description\": \"The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.\", \"type\": \"string\" }, \"name\": { \"description\": \"The name of the file.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>
|
||||
"""
|
||||
```json { \"description\": \"Output file contents.\", \"type\": \"object\", \"properties\": { \"contents\": { \"description\": \"The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.\", \"type\": \"string\" }, \"name\": { \"description\": \"The name of the file.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>"""
|
||||
|
||||
contents: Optional[str] = None
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PathGetCurveUuid(BaseModel):
|
||||
"""The response from the `PathGetCurveUuid` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PathGetCurveUuidsForVertices(BaseModel):
|
||||
"""The response from the `PathGetCurveUuidsForVertices` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PathGetSketchTargetUuid(BaseModel):
|
||||
"""The response from the `PathGetSketchTargetUuid` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PathGetVertexUuids(BaseModel):
|
||||
"""The response from the `PathGetVertexUuids` command."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PaymentIntent(BaseModel):
|
||||
"""A payment intent response."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PaymentMethodCardChecks(BaseModel):
|
||||
"""Card checks."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PerspectiveCameraParameters(BaseModel):
|
||||
"""Defines a perspective view."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.length_unit import LengthUnit
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Point3d(BaseModel):
|
||||
"""A point in 3D space"""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Point4d(BaseModel):
|
||||
"""A point in homogeneous (4D) space"""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Pong(BaseModel):
|
||||
"""The response from the `/ping` endpoint."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class PrivacySettings(BaseModel):
|
||||
"""Privacy settings for an org or user."""
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class RawFile(BaseModel):
|
||||
"""A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json."""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.angle import Angle
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class RtcIceCandidateInit(BaseModel):
|
||||
"""ICECandidateInit is used to serialize ice candidates"""
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.rtc_sdp_type import RtcSdpType
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import List
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class SelectGet(BaseModel):
|
||||
"""The response from the `SelectGet` command."""
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class SelectWithPoint(BaseModel):
|
||||
"""The response from the `SelectWithPoint` command."""
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user