Update api spec (#289)
* 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
8a8cb0ca41
commit
846ed0303c
File diff suppressed because it is too large
Load Diff
@ -4,12 +4,12 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.service_account_token_uuid import ServiceAccountTokenUuid
|
||||
from ...models.service_account_uuid import ServiceAccountUuid
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -50,7 +50,7 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
@ -68,7 +68,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
@ -82,7 +82,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
@ -98,7 +98,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.service_account import ServiceAccount
|
||||
from ...models.service_account_token_uuid import ServiceAccountTokenUuid
|
||||
from ...models.service_account_uuid import ServiceAccountUuid
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -57,7 +57,7 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ServiceAccount, Error]]]:
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ServiceAccount, Error]]:
|
||||
@ -88,7 +88,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ServiceAccount, Error]]]:
|
||||
@ -104,7 +104,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
token: ServiceAccountTokenUuid,
|
||||
token: ServiceAccountUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ServiceAccount, Error]]:
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.session import Session
|
||||
from ...models.session_token_uuid import SessionTokenUuid
|
||||
from ...models.session_uuid import SessionUuid
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
token: SessionTokenUuid,
|
||||
token: SessionUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -55,7 +55,7 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
token: SessionTokenUuid,
|
||||
token: SessionUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
@ -73,7 +73,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
token: SessionTokenUuid,
|
||||
token: SessionUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
@ -86,7 +86,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
token: SessionTokenUuid,
|
||||
token: SessionUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
@ -102,7 +102,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
token: SessionTokenUuid,
|
||||
token: SessionUuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
|
@ -250,8 +250,8 @@ from kittycad.models.privacy_settings import PrivacySettings
|
||||
from kittycad.models.rtc_sdp_type import RtcSdpType
|
||||
from kittycad.models.rtc_session_description import RtcSessionDescription
|
||||
from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate
|
||||
from kittycad.models.service_account_token_uuid import ServiceAccountTokenUuid
|
||||
from kittycad.models.session_token_uuid import SessionTokenUuid
|
||||
from kittycad.models.service_account_uuid import ServiceAccountUuid
|
||||
from kittycad.models.session_uuid import SessionUuid
|
||||
from kittycad.models.source_position import SourcePosition
|
||||
from kittycad.models.source_range import SourceRange
|
||||
from kittycad.models.source_range_prompt import SourceRangePrompt
|
||||
@ -3712,7 +3712,7 @@ def test_get_service_account_for_org():
|
||||
|
||||
result: Optional[Union[ServiceAccount, Error]] = get_service_account_for_org.sync(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
@ -3726,7 +3726,7 @@ def test_get_service_account_for_org():
|
||||
response: Response[Optional[Union[ServiceAccount, Error]]] = (
|
||||
get_service_account_for_org.sync_detailed(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
)
|
||||
|
||||
@ -3742,7 +3742,7 @@ async def test_get_service_account_for_org_async():
|
||||
Union[ServiceAccount, Error]
|
||||
] = await get_service_account_for_org.asyncio(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
@ -3750,7 +3750,7 @@ async def test_get_service_account_for_org_async():
|
||||
Optional[Union[ServiceAccount, Error]]
|
||||
] = await get_service_account_for_org.asyncio_detailed(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
|
||||
@ -3761,7 +3761,7 @@ def test_delete_service_account_for_org():
|
||||
|
||||
result: Optional[Error] = delete_service_account_for_org.sync(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
@ -3774,7 +3774,7 @@ def test_delete_service_account_for_org():
|
||||
# OR if you need more info (e.g. status_code)
|
||||
response: Response[Optional[Error]] = delete_service_account_for_org.sync_detailed(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
|
||||
@ -3787,7 +3787,7 @@ async def test_delete_service_account_for_org_async():
|
||||
|
||||
result: Optional[Error] = await delete_service_account_for_org.asyncio(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
@ -3795,7 +3795,7 @@ async def test_delete_service_account_for_org_async():
|
||||
Optional[Error]
|
||||
] = await delete_service_account_for_org.asyncio_detailed(
|
||||
client=client,
|
||||
token=ServiceAccountTokenUuid("<string>"),
|
||||
token=ServiceAccountUuid("<string>"),
|
||||
)
|
||||
|
||||
|
||||
@ -6360,7 +6360,7 @@ def test_get_session_for_user():
|
||||
|
||||
result: Optional[Union[Session, Error]] = get_session_for_user.sync(
|
||||
client=client,
|
||||
token=SessionTokenUuid("<string>"),
|
||||
token=SessionUuid("<string>"),
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
@ -6374,7 +6374,7 @@ def test_get_session_for_user():
|
||||
response: Response[Optional[Union[Session, Error]]] = (
|
||||
get_session_for_user.sync_detailed(
|
||||
client=client,
|
||||
token=SessionTokenUuid("<string>"),
|
||||
token=SessionUuid("<string>"),
|
||||
)
|
||||
)
|
||||
|
||||
@ -6388,7 +6388,7 @@ async def test_get_session_for_user_async():
|
||||
|
||||
result: Optional[Union[Session, Error]] = await get_session_for_user.asyncio(
|
||||
client=client,
|
||||
token=SessionTokenUuid("<string>"),
|
||||
token=SessionUuid("<string>"),
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
@ -6396,7 +6396,7 @@ async def test_get_session_for_user_async():
|
||||
Optional[Union[Session, Error]]
|
||||
] = await get_session_for_user.asyncio_detailed(
|
||||
client=client,
|
||||
token=SessionTokenUuid("<string>"),
|
||||
token=SessionUuid("<string>"),
|
||||
)
|
||||
|
||||
|
||||
|
@ -250,9 +250,9 @@ from .selection import Selection
|
||||
from .send_object import SendObject
|
||||
from .service_account import ServiceAccount
|
||||
from .service_account_results_page import ServiceAccountResultsPage
|
||||
from .service_account_token_uuid import ServiceAccountTokenUuid
|
||||
from .service_account_uuid import ServiceAccountUuid
|
||||
from .session import Session
|
||||
from .session_token_uuid import SessionTokenUuid
|
||||
from .session_uuid import SessionUuid
|
||||
from .set_background_color import SetBackgroundColor
|
||||
from .set_current_tool_properties import SetCurrentToolProperties
|
||||
from .set_default_system_properties import SetDefaultSystemProperties
|
||||
|
@ -3,7 +3,7 @@ from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.service_account_token_uuid import ServiceAccountTokenUuid
|
||||
from ..models.service_account_uuid import ServiceAccountUuid
|
||||
from ..models.uuid import Uuid
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class ServiceAccount(BaseModel):
|
||||
|
||||
org_id: Uuid
|
||||
|
||||
token: ServiceAccountTokenUuid
|
||||
token: ServiceAccountUuid
|
||||
|
||||
updated_at: datetime.datetime
|
||||
|
||||
|
@ -4,7 +4,7 @@ from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
|
||||
|
||||
class ServiceAccountTokenUuid(str):
|
||||
class ServiceAccountUuid(str):
|
||||
"""An auth token. A uuid with a prefix of svc-"""
|
||||
|
||||
def __str__(self) -> str:
|
@ -2,7 +2,7 @@ import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.session_token_uuid import SessionTokenUuid
|
||||
from ..models.session_uuid import SessionUuid
|
||||
from ..models.uuid import Uuid
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class Session(BaseModel):
|
||||
|
||||
id: Uuid
|
||||
|
||||
session_token: SessionTokenUuid
|
||||
session_token: SessionUuid
|
||||
|
||||
updated_at: datetime.datetime
|
||||
|
||||
|
@ -4,7 +4,7 @@ from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
|
||||
|
||||
class SessionTokenUuid(str):
|
||||
class SessionUuid(str):
|
||||
"""An auth token. A uuid with a prefix of ses-"""
|
||||
|
||||
def __str__(self) -> str:
|
16
spec.json
16
spec.json
@ -7705,7 +7705,7 @@
|
||||
"description": "The service account.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ServiceAccountTokenUuid"
|
||||
"$ref": "#/components/schemas/ServiceAccountUuid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -7784,7 +7784,7 @@
|
||||
"description": "The service account.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ServiceAccountTokenUuid"
|
||||
"$ref": "#/components/schemas/ServiceAccountUuid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -7856,7 +7856,7 @@
|
||||
"description": "The service account.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ServiceAccountTokenUuid"
|
||||
"$ref": "#/components/schemas/ServiceAccountUuid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -12724,7 +12724,7 @@
|
||||
"description": "The API token.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SessionTokenUuid"
|
||||
"$ref": "#/components/schemas/SessionUuid"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -27813,7 +27813,7 @@
|
||||
"description": "The API token itself.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ServiceAccountTokenUuid"
|
||||
"$ref": "#/components/schemas/ServiceAccountUuid"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27854,7 +27854,7 @@
|
||||
"items"
|
||||
]
|
||||
},
|
||||
"ServiceAccountTokenUuid": {
|
||||
"ServiceAccountUuid": {
|
||||
"description": "An auth token. A uuid with a prefix of svc-",
|
||||
"type": "string"
|
||||
},
|
||||
@ -27886,7 +27886,7 @@
|
||||
"description": "The session token.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/SessionTokenUuid"
|
||||
"$ref": "#/components/schemas/SessionUuid"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27914,7 +27914,7 @@
|
||||
"user_id"
|
||||
]
|
||||
},
|
||||
"SessionTokenUuid": {
|
||||
"SessionUuid": {
|
||||
"description": "An auth token. A uuid with a prefix of ses-",
|
||||
"type": "string"
|
||||
},
|
||||
|
Reference in New Issue
Block a user