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>
This commit is contained in:
zoo-github-actions-auth[bot]
2024-10-10 16:56:30 -07:00
committed by GitHub
parent fe55464136
commit 79bf86abe7
8 changed files with 1075 additions and 995 deletions

File diff suppressed because it is too large Load Diff

View File

@ -177,6 +177,7 @@ from .modeling_app_individual_subscription_tier import (
from .modeling_app_organization_subscription_tier import (
ModelingAppOrganizationSubscriptionTier,
)
from .modeling_app_share_links import ModelingAppShareLinks
from .modeling_app_subscription_tier import ModelingAppSubscriptionTier
from .modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
from .modeling_cmd import ModelingCmd

View File

@ -1,10 +1,14 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
class CreateShortlinkRequest(BaseModel):
"""Request to create a shortlink."""
restrict_to_org: bool
password: Optional[str] = None
restrict_to_org: bool = False
url: str

View File

@ -0,0 +1,15 @@
from enum import Enum
class ModelingAppShareLinks(str, Enum):
"""The options for sharable links through the modeling app.""" # noqa: E501
"""# Public. """ # noqa: E501
PUBLIC = "public"
"""# Password protected. """ # noqa: E501
PASSWORD_PROTECTED = "password_protected"
"""# Organization only. Links can be made only available to members of the organization. """ # noqa: E501
ORGANIZATION_ONLY = "organization_only"
def __str__(self) -> str:
return str(self.value)

View File

@ -2,6 +2,7 @@ from typing import List, Optional
from pydantic import BaseModel, ConfigDict
from ..models.modeling_app_share_links import ModelingAppShareLinks
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
from ..models.subscription_tier_feature import SubscriptionTierFeature
from ..models.subscription_tier_price import SubscriptionTierPrice
@ -26,6 +27,8 @@ class ModelingAppSubscriptionTier(BaseModel):
price: SubscriptionTierPrice
share_links: Optional[List[ModelingAppShareLinks]] = None
support_tier: SupportTier
training_data_behavior: SubscriptionTrainingDataBehavior

View File

@ -1,9 +1,13 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
class UpdateShortlinkRequest(BaseModel):
"""Request to update a shortlink."""
password: Optional[str] = None
restrict_to_org: bool
model_config = ConfigDict(protected_namespaces=())

View File

@ -2,6 +2,7 @@ from typing import List, Optional
from pydantic import BaseModel, ConfigDict
from ..models.modeling_app_share_links import ModelingAppShareLinks
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
from ..models.subscription_tier_feature import SubscriptionTierFeature
from ..models.subscription_tier_price import SubscriptionTierPrice
@ -26,6 +27,8 @@ class ZooProductSubscription(BaseModel):
price: SubscriptionTierPrice
share_links: Optional[List[ModelingAppShareLinks]] = None
support_tier: SupportTier
training_data_behavior: SubscriptionTrainingDataBehavior

View File

@ -17361,8 +17361,14 @@
"description": "Request to create a shortlink.",
"type": "object",
"properties": {
"password": {
"nullable": true,
"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.",
"type": "string"
},
"restrict_to_org": {
"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.",
"default": false,
"type": "boolean"
},
"url": {
@ -17372,7 +17378,6 @@
}
},
"required": [
"restrict_to_org",
"url"
]
},
@ -21126,6 +21131,32 @@
}
]
},
"ModelingAppShareLinks": {
"description": "The options for sharable links through the modeling app.",
"oneOf": [
{
"description": "Public.",
"type": "string",
"enum": [
"public"
]
},
{
"description": "Password protected.",
"type": "string",
"enum": [
"password_protected"
]
},
{
"description": "Organization only. Links can be made only available to members of the organization.",
"type": "string",
"enum": [
"organization_only"
]
}
]
},
"ModelingAppSubscriptionTier": {
"description": "A subscription tier we offer for the Modeling App.",
"type": "object",
@ -21165,6 +21196,13 @@
}
]
},
"share_links": {
"description": "The options for sharable links through the modeling app.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelingAppShareLinks"
}
},
"support_tier": {
"description": "The support tier the subscription provides.",
"allOf": [
@ -31642,6 +31680,11 @@
"description": "Request to update a shortlink.",
"type": "object",
"properties": {
"password": {
"nullable": true,
"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.",
"type": "string"
},
"restrict_to_org": {
"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.",
"type": "boolean"
@ -32273,6 +32316,13 @@
}
]
},
"share_links": {
"description": "The options for sharable links through the modeling app.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelingAppShareLinks"
}
},
"support_tier": {
"description": "The support tier the subscription provides.",
"allOf": [