Skip to content

Commit cf383e2

Browse files
Update api spec (#444)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 26cc03e commit cf383e2

22 files changed

+534
-1858
lines changed

kittycad.py.patch.json

Lines changed: 420 additions & 428 deletions
Large diffs are not rendered by default.

kittycad/api/meta/get_metadata.py

Lines changed: 0 additions & 109 deletions
This file was deleted.

kittycad/api/meta/internal_get_api_token_for_discord_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def sync(
7878
) -> Optional[Union[ApiToken, Error]]:
7979
"""This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
8080
81-
You must be a Zoo employee to use this endpoint.""" # noqa: E501
81+
You must be a Zoo admin to use this endpoint.""" # noqa: E501
8282

8383
return sync_detailed(
8484
discord_id=discord_id,
@@ -109,7 +109,7 @@ async def asyncio(
109109
) -> Optional[Union[ApiToken, Error]]:
110110
"""This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
111111
112-
You must be a Zoo employee to use this endpoint.""" # noqa: E501
112+
You must be a Zoo admin to use this endpoint.""" # noqa: E501
113113

114114
return (
115115
await asyncio_detailed(

kittycad/api/orgs/update_enterprise_pricing_for_org.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def sync(
8585
*,
8686
client: Client,
8787
) -> Optional[Union[ZooProductSubscriptions, Error]]:
88-
"""You must be a Zoo employee to perform this request.""" # noqa: E501
88+
"""You must be a Zoo admin to perform this request.""" # noqa: E501
8989

9090
return sync_detailed(
9191
id=id,
@@ -118,7 +118,7 @@ async def asyncio(
118118
*,
119119
client: Client,
120120
) -> Optional[Union[ZooProductSubscriptions, Error]]:
121-
"""You must be a Zoo employee to perform this request.""" # noqa: E501
121+
"""You must be a Zoo admin to perform this request.""" # noqa: E501
122122

123123
return (
124124
await asyncio_detailed(

kittycad/api/users/get_user.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ def sync(
7979
) -> Optional[Union[User, Error]]:
8080
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
8181
82-
Alternatively, to get information about the authenticated user, use `/user` endpoint.
83-
84-
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
82+
Alternatively, to get information about the authenticated user, use `/user` endpoint.""" # noqa: E501
8583

8684
return sync_detailed(
8785
id=id,
@@ -112,9 +110,7 @@ async def asyncio(
112110
) -> Optional[Union[User, Error]]:
113111
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
114112
115-
Alternatively, to get information about the authenticated user, use `/user` endpoint.
116-
117-
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
113+
Alternatively, to get information about the authenticated user, use `/user` endpoint.""" # noqa: E501
118114

119115
return (
120116
await asyncio_detailed(

kittycad/api/users/get_user_extended.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def sync(
8181
) -> Optional[Union[ExtendedUser, Error]]:
8282
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
8383
84-
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
85-
86-
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
84+
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.""" # noqa: E501
8785

8886
return sync_detailed(
8987
id=id,
@@ -114,9 +112,7 @@ async def asyncio(
114112
) -> Optional[Union[ExtendedUser, Error]]:
115113
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
116114
117-
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
118-
119-
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
115+
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.""" # noqa: E501
120116

121117
return (
122118
await asyncio_detailed(

kittycad/examples_test.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
create_debug_uploads,
4949
create_event,
5050
get_ipinfo,
51-
get_metadata,
5251
get_pricing_subscriptions,
5352
get_schema,
5453
internal_get_api_token_for_discord_user,
@@ -194,7 +193,6 @@
194193
IpAddrInfo,
195194
KclCodeCompletionResponse,
196195
KclModel,
197-
Metadata,
198196
MlPrompt,
199197
MlPromptResultsPage,
200198
Onboarding,
@@ -351,47 +349,6 @@ async def test_get_schema_async():
351349
)
352350

353351

354-
@pytest.mark.skip
355-
def test_get_metadata():
356-
# Create our client.
357-
client = ClientFromEnv()
358-
359-
result: Optional[Union[Metadata, Error]] = get_metadata.sync(
360-
client=client,
361-
)
362-
363-
if isinstance(result, Error) or result is None:
364-
print(result)
365-
raise Exception("Error in response")
366-
367-
body: Metadata = result
368-
print(body)
369-
370-
# OR if you need more info (e.g. status_code)
371-
response: Response[Optional[Union[Metadata, Error]]] = get_metadata.sync_detailed(
372-
client=client,
373-
)
374-
375-
376-
# OR run async
377-
@pytest.mark.asyncio
378-
@pytest.mark.skip
379-
async def test_get_metadata_async():
380-
# Create our client.
381-
client = ClientFromEnv()
382-
383-
result: Optional[Union[Metadata, Error]] = await get_metadata.asyncio(
384-
client=client,
385-
)
386-
387-
# OR run async with more info
388-
response: Response[
389-
Optional[Union[Metadata, Error]]
390-
] = await get_metadata.asyncio_detailed(
391-
client=client,
392-
)
393-
394-
395352
@pytest.mark.skip
396353
def test_get_ipinfo():
397354
# Create our client.

kittycad/models/__init__.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from .boolean_intersection import BooleanIntersection
3838
from .boolean_subtract import BooleanSubtract
3939
from .boolean_union import BooleanUnion
40-
from .cache_metadata import CacheMetadata
4140
from .camera_drag_end import CameraDragEnd
4241
from .camera_drag_interaction_type import CameraDragInteractionType
4342
from .camera_drag_move import CameraDragMove
@@ -49,14 +48,12 @@
4948
from .center_of_mass import CenterOfMass
5049
from .client_metrics import ClientMetrics
5150
from .close_path import ClosePath
52-
from .cluster import Cluster
5351
from .code_language import CodeLanguage
5452
from .code_option import CodeOption
5553
from .code_output import CodeOutput
5654
from .color import Color
5755
from .complementary_edges import ComplementaryEdges
5856
from .component_transform import ComponentTransform
59-
from .connection import Connection
6057
from .country_code import CountryCode
6158
from .coupon import Coupon
6259
from .create_shortlink_request import CreateShortlinkRequest
@@ -122,7 +119,6 @@
122119
from .entity_mirror_across_edge import EntityMirrorAcrossEdge
123120
from .entity_set_opacity import EntitySetOpacity
124121
from .entity_type import EntityType
125-
from .environment import Environment
126122
from .error import Error
127123
from .error_code import ErrorCode
128124
from .event import Event
@@ -151,9 +147,7 @@
151147
from .file_import_format import FileImportFormat
152148
from .file_mass import FileMass
153149
from .file_surface_area import FileSurfaceArea
154-
from .file_system_metadata import FileSystemMetadata
155150
from .file_volume import FileVolume
156-
from .gateway import Gateway
157151
from .get_entity_type import GetEntityType
158152
from .get_num_objects import GetNumObjects
159153
from .get_sketch_mode_plane import GetSketchModePlane
@@ -178,23 +172,16 @@
178172
from .invoice_line_item import InvoiceLineItem
179173
from .invoice_status import InvoiceStatus
180174
from .ip_addr_info import IpAddrInfo
181-
from .jetstream import Jetstream
182-
from .jetstream_api_stats import JetstreamApiStats
183-
from .jetstream_config import JetstreamConfig
184-
from .jetstream_stats import JetstreamStats
185175
from .kcl_code_completion_params import KclCodeCompletionParams
186176
from .kcl_code_completion_request import KclCodeCompletionRequest
187177
from .kcl_code_completion_response import KclCodeCompletionResponse
188178
from .kcl_model import KclModel
189-
from .leaf_node import LeafNode
190179
from .length_unit import LengthUnit
191180
from .loft import Loft
192181
from .make_axes_gizmo import MakeAxesGizmo
193182
from .make_offset_path import MakeOffsetPath
194183
from .make_plane import MakePlane
195184
from .mass import Mass
196-
from .meta_cluster_info import MetaClusterInfo
197-
from .metadata import Metadata
198185
from .method import Method
199186
from .ml_feedback import MlFeedback
200187
from .ml_prompt import MlPrompt

kittycad/models/cache_metadata.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

kittycad/models/cluster.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)