Skip to content

Commit 79bf86a

Browse files
Update api spec (#302)
* 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 fe55464 commit 79bf86a

File tree

8 files changed

+476
-396
lines changed

8 files changed

+476
-396
lines changed

kittycad.py.patch.json

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

kittycad/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
from .modeling_app_organization_subscription_tier import (
178178
ModelingAppOrganizationSubscriptionTier,
179179
)
180+
from .modeling_app_share_links import ModelingAppShareLinks
180181
from .modeling_app_subscription_tier import ModelingAppSubscriptionTier
181182
from .modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
182183
from .modeling_cmd import ModelingCmd

kittycad/models/create_shortlink_request.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
from typing import Optional
2+
13
from pydantic import BaseModel, ConfigDict
24

35

46
class CreateShortlinkRequest(BaseModel):
57
"""Request to create a shortlink."""
68

7-
restrict_to_org: bool
9+
password: Optional[str] = None
10+
11+
restrict_to_org: bool = False
812

913
url: str
1014

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from enum import Enum
2+
3+
4+
class ModelingAppShareLinks(str, Enum):
5+
"""The options for sharable links through the modeling app.""" # noqa: E501
6+
7+
"""# Public. """ # noqa: E501
8+
PUBLIC = "public"
9+
"""# Password protected. """ # noqa: E501
10+
PASSWORD_PROTECTED = "password_protected"
11+
"""# Organization only. Links can be made only available to members of the organization. """ # noqa: E501
12+
ORGANIZATION_ONLY = "organization_only"
13+
14+
def __str__(self) -> str:
15+
return str(self.value)

kittycad/models/modeling_app_subscription_tier.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict
44

5+
from ..models.modeling_app_share_links import ModelingAppShareLinks
56
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
67
from ..models.subscription_tier_feature import SubscriptionTierFeature
78
from ..models.subscription_tier_price import SubscriptionTierPrice
@@ -26,6 +27,8 @@ class ModelingAppSubscriptionTier(BaseModel):
2627

2728
price: SubscriptionTierPrice
2829

30+
share_links: Optional[List[ModelingAppShareLinks]] = None
31+
2932
support_tier: SupportTier
3033

3134
training_data_behavior: SubscriptionTrainingDataBehavior
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
from typing import Optional
2+
13
from pydantic import BaseModel, ConfigDict
24

35

46
class UpdateShortlinkRequest(BaseModel):
57
"""Request to update a shortlink."""
68

9+
password: Optional[str] = None
10+
711
restrict_to_org: bool
812

913
model_config = ConfigDict(protected_namespaces=())

kittycad/models/zoo_product_subscription.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict
44

5+
from ..models.modeling_app_share_links import ModelingAppShareLinks
56
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
67
from ..models.subscription_tier_feature import SubscriptionTierFeature
78
from ..models.subscription_tier_price import SubscriptionTierPrice
@@ -26,6 +27,8 @@ class ZooProductSubscription(BaseModel):
2627

2728
price: SubscriptionTierPrice
2829

30+
share_links: Optional[List[ModelingAppShareLinks]] = None
31+
2932
support_tier: SupportTier
3033

3134
training_data_behavior: SubscriptionTrainingDataBehavior

spec.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17361,8 +17361,14 @@
1736117361
"description": "Request to create a shortlink.",
1736217362
"type": "object",
1736317363
"properties": {
17364+
"password": {
17365+
"nullable": true,
17366+
"description": "The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.",
17367+
"type": "string"
17368+
},
1736417369
"restrict_to_org": {
1736517370
"description": "If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail.",
17371+
"default": false,
1736617372
"type": "boolean"
1736717373
},
1736817374
"url": {
@@ -17372,7 +17378,6 @@
1737217378
}
1737317379
},
1737417380
"required": [
17375-
"restrict_to_org",
1737617381
"url"
1737717382
]
1737817383
},
@@ -21126,6 +21131,32 @@
2112621131
}
2112721132
]
2112821133
},
21134+
"ModelingAppShareLinks": {
21135+
"description": "The options for sharable links through the modeling app.",
21136+
"oneOf": [
21137+
{
21138+
"description": "Public.",
21139+
"type": "string",
21140+
"enum": [
21141+
"public"
21142+
]
21143+
},
21144+
{
21145+
"description": "Password protected.",
21146+
"type": "string",
21147+
"enum": [
21148+
"password_protected"
21149+
]
21150+
},
21151+
{
21152+
"description": "Organization only. Links can be made only available to members of the organization.",
21153+
"type": "string",
21154+
"enum": [
21155+
"organization_only"
21156+
]
21157+
}
21158+
]
21159+
},
2112921160
"ModelingAppSubscriptionTier": {
2113021161
"description": "A subscription tier we offer for the Modeling App.",
2113121162
"type": "object",
@@ -21165,6 +21196,13 @@
2116521196
}
2116621197
]
2116721198
},
21199+
"share_links": {
21200+
"description": "The options for sharable links through the modeling app.",
21201+
"type": "array",
21202+
"items": {
21203+
"$ref": "#/components/schemas/ModelingAppShareLinks"
21204+
}
21205+
},
2116821206
"support_tier": {
2116921207
"description": "The support tier the subscription provides.",
2117021208
"allOf": [
@@ -31642,6 +31680,11 @@
3164231680
"description": "Request to update a shortlink.",
3164331681
"type": "object",
3164431682
"properties": {
31683+
"password": {
31684+
"nullable": true,
31685+
"description": "The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.",
31686+
"type": "string"
31687+
},
3164531688
"restrict_to_org": {
3164631689
"description": "If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail.",
3164731690
"type": "boolean"
@@ -32273,6 +32316,13 @@
3227332316
}
3227432317
]
3227532318
},
32319+
"share_links": {
32320+
"description": "The options for sharable links through the modeling app.",
32321+
"type": "array",
32322+
"items": {
32323+
"$ref": "#/components/schemas/ModelingAppShareLinks"
32324+
}
32325+
},
3227632326
"support_tier": {
3227732327
"description": "The support tier the subscription provides.",
3227832328
"allOf": [

0 commit comments

Comments
 (0)