Update api spec (#293)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cde3af8385
commit
d5448c9e2f
@ -48,6 +48,8 @@ from .color import Color
|
||||
from .connection import Connection
|
||||
from .country_code import CountryCode
|
||||
from .coupon import Coupon
|
||||
from .create_shortlink_request import CreateShortlinkRequest
|
||||
from .create_shortlink_response import CreateShortlinkResponse
|
||||
from .created_at_sort_mode import CreatedAtSortMode
|
||||
from .currency import Currency
|
||||
from .curve_get_control_points import CurveGetControlPoints
|
||||
@ -261,6 +263,8 @@ from .set_scene_units import SetSceneUnits
|
||||
from .set_selection_filter import SetSelectionFilter
|
||||
from .set_selection_type import SetSelectionType
|
||||
from .set_tool import SetTool
|
||||
from .shortlink import Shortlink
|
||||
from .shortlink_results_page import ShortlinkResultsPage
|
||||
from .sketch_mode_disable import SketchModeDisable
|
||||
from .solid2d_add_hole import Solid2dAddHole
|
||||
from .solid3d_fillet_edge import Solid3dFilletEdge
|
||||
@ -324,6 +328,7 @@ from .unit_volume_conversion import UnitVolumeConversion
|
||||
from .update_annotation import UpdateAnnotation
|
||||
from .update_member_to_org_body import UpdateMemberToOrgBody
|
||||
from .update_payment_balance import UpdatePaymentBalance
|
||||
from .update_shortlink_request import UpdateShortlinkRequest
|
||||
from .update_user import UpdateUser
|
||||
from .user import User
|
||||
from .user_org_info import UserOrgInfo
|
||||
|
||||
11
kittycad/models/create_shortlink_request.py
Normal file
11
kittycad/models/create_shortlink_request.py
Normal file
@ -0,0 +1,11 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class CreateShortlinkRequest(BaseModel):
|
||||
"""Request to create a shortlink."""
|
||||
|
||||
restrict_to_org: bool
|
||||
|
||||
url: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
11
kittycad/models/create_shortlink_response.py
Normal file
11
kittycad/models/create_shortlink_response.py
Normal file
@ -0,0 +1,11 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class CreateShortlinkResponse(BaseModel):
|
||||
"""Response from creating a shortlink."""
|
||||
|
||||
key: str
|
||||
|
||||
url: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
30
kittycad/models/shortlink.py
Normal file
30
kittycad/models/shortlink.py
Normal file
@ -0,0 +1,30 @@
|
||||
import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
|
||||
|
||||
class Shortlink(BaseModel):
|
||||
"""A short url."""
|
||||
|
||||
created_at: datetime.datetime
|
||||
|
||||
id: Uuid
|
||||
|
||||
key: str
|
||||
|
||||
org_id: Optional[Uuid] = None
|
||||
|
||||
password_hash: Optional[str] = None
|
||||
|
||||
restrict_to_org: bool = False
|
||||
|
||||
updated_at: datetime.datetime
|
||||
|
||||
user_id: Uuid
|
||||
|
||||
value: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
15
kittycad/models/shortlink_results_page.py
Normal file
15
kittycad/models/shortlink_results_page.py
Normal file
@ -0,0 +1,15 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.shortlink import Shortlink
|
||||
|
||||
|
||||
class ShortlinkResultsPage(BaseModel):
|
||||
"""A single page of results"""
|
||||
|
||||
items: List[Shortlink]
|
||||
|
||||
next_page: Optional[str] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
9
kittycad/models/update_shortlink_request.py
Normal file
9
kittycad/models/update_shortlink_request.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class UpdateShortlinkRequest(BaseModel):
|
||||
"""Request to update a shortlink."""
|
||||
|
||||
restrict_to_org: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
Reference in New Issue
Block a user