Update api spec (#310)
This commit is contained in:
committed by
GitHub
parent
7af492c617
commit
299cc3c68a
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@ from typing import Any, Dict, Optional, Union
|
|||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
|
from ...models.enterprise_subscription_tier_price import EnterpriseSubscriptionTierPrice
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.subscription_tier_price import SubscriptionTierPrice
|
|
||||||
from ...models.uuid import Uuid
|
from ...models.uuid import Uuid
|
||||||
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
|
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
@ -12,7 +12,7 @@ from ...types import Response
|
|||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
id: Uuid,
|
id: Uuid,
|
||||||
body: SubscriptionTierPrice,
|
body: EnterpriseSubscriptionTierPrice,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
@ -61,7 +61,7 @@ def _build_response(
|
|||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
id: Uuid,
|
id: Uuid,
|
||||||
body: SubscriptionTierPrice,
|
body: EnterpriseSubscriptionTierPrice,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
||||||
@ -81,7 +81,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
id: Uuid,
|
id: Uuid,
|
||||||
body: SubscriptionTierPrice,
|
body: EnterpriseSubscriptionTierPrice,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||||
@ -96,7 +96,7 @@ def sync(
|
|||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
id: Uuid,
|
id: Uuid,
|
||||||
body: SubscriptionTierPrice,
|
body: EnterpriseSubscriptionTierPrice,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
||||||
@ -114,7 +114,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
id: Uuid,
|
id: Uuid,
|
||||||
body: SubscriptionTierPrice,
|
body: EnterpriseSubscriptionTierPrice,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||||
|
@ -235,6 +235,10 @@ from kittycad.models.code_language import CodeLanguage
|
|||||||
from kittycad.models.create_shortlink_request import CreateShortlinkRequest
|
from kittycad.models.create_shortlink_request import CreateShortlinkRequest
|
||||||
from kittycad.models.created_at_sort_mode import CreatedAtSortMode
|
from kittycad.models.created_at_sort_mode import CreatedAtSortMode
|
||||||
from kittycad.models.email_authentication_form import EmailAuthenticationForm
|
from kittycad.models.email_authentication_form import EmailAuthenticationForm
|
||||||
|
from kittycad.models.enterprise_subscription_tier_price import (
|
||||||
|
EnterpriseSubscriptionTierPrice,
|
||||||
|
OptionPerUser,
|
||||||
|
)
|
||||||
from kittycad.models.event import Event, OptionModelingAppEvent
|
from kittycad.models.event import Event, OptionModelingAppEvent
|
||||||
from kittycad.models.file_export_format import FileExportFormat
|
from kittycad.models.file_export_format import FileExportFormat
|
||||||
from kittycad.models.file_import_format import FileImportFormat
|
from kittycad.models.file_import_format import FileImportFormat
|
||||||
@ -265,7 +269,6 @@ from kittycad.models.source_position import SourcePosition
|
|||||||
from kittycad.models.source_range import SourceRange
|
from kittycad.models.source_range import SourceRange
|
||||||
from kittycad.models.source_range_prompt import SourceRangePrompt
|
from kittycad.models.source_range_prompt import SourceRangePrompt
|
||||||
from kittycad.models.store_coupon_params import StoreCouponParams
|
from kittycad.models.store_coupon_params import StoreCouponParams
|
||||||
from kittycad.models.subscription_tier_price import OptionPerUser, SubscriptionTierPrice
|
|
||||||
from kittycad.models.text_to_cad_create_body import TextToCadCreateBody
|
from kittycad.models.text_to_cad_create_body import TextToCadCreateBody
|
||||||
from kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody
|
from kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody
|
||||||
from kittycad.models.unit_angle import UnitAngle
|
from kittycad.models.unit_angle import UnitAngle
|
||||||
@ -3976,7 +3979,7 @@ def test_update_enterprise_pricing_for_org():
|
|||||||
update_enterprise_pricing_for_org.sync(
|
update_enterprise_pricing_for_org.sync(
|
||||||
client=client,
|
client=client,
|
||||||
id=Uuid("<string>"),
|
id=Uuid("<string>"),
|
||||||
body=SubscriptionTierPrice(
|
body=EnterpriseSubscriptionTierPrice(
|
||||||
OptionPerUser(
|
OptionPerUser(
|
||||||
interval=PlanInterval.DAY,
|
interval=PlanInterval.DAY,
|
||||||
price=3.14,
|
price=3.14,
|
||||||
@ -3997,7 +4000,7 @@ def test_update_enterprise_pricing_for_org():
|
|||||||
update_enterprise_pricing_for_org.sync_detailed(
|
update_enterprise_pricing_for_org.sync_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
id=Uuid("<string>"),
|
id=Uuid("<string>"),
|
||||||
body=SubscriptionTierPrice(
|
body=EnterpriseSubscriptionTierPrice(
|
||||||
OptionPerUser(
|
OptionPerUser(
|
||||||
interval=PlanInterval.DAY,
|
interval=PlanInterval.DAY,
|
||||||
price=3.14,
|
price=3.14,
|
||||||
@ -4019,7 +4022,7 @@ async def test_update_enterprise_pricing_for_org_async():
|
|||||||
] = await update_enterprise_pricing_for_org.asyncio(
|
] = await update_enterprise_pricing_for_org.asyncio(
|
||||||
client=client,
|
client=client,
|
||||||
id=Uuid("<string>"),
|
id=Uuid("<string>"),
|
||||||
body=SubscriptionTierPrice(
|
body=EnterpriseSubscriptionTierPrice(
|
||||||
OptionPerUser(
|
OptionPerUser(
|
||||||
interval=PlanInterval.DAY,
|
interval=PlanInterval.DAY,
|
||||||
price=3.14,
|
price=3.14,
|
||||||
@ -4033,7 +4036,7 @@ async def test_update_enterprise_pricing_for_org_async():
|
|||||||
] = await update_enterprise_pricing_for_org.asyncio_detailed(
|
] = await update_enterprise_pricing_for_org.asyncio_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
id=Uuid("<string>"),
|
id=Uuid("<string>"),
|
||||||
body=SubscriptionTierPrice(
|
body=EnterpriseSubscriptionTierPrice(
|
||||||
OptionPerUser(
|
OptionPerUser(
|
||||||
interval=PlanInterval.DAY,
|
interval=PlanInterval.DAY,
|
||||||
price=3.14,
|
price=3.14,
|
||||||
|
@ -85,6 +85,7 @@ from .empty import Empty
|
|||||||
from .enable_dry_run import EnableDryRun
|
from .enable_dry_run import EnableDryRun
|
||||||
from .enable_sketch_mode import EnableSketchMode
|
from .enable_sketch_mode import EnableSketchMode
|
||||||
from .engine_util_evaluate_path import EngineUtilEvaluatePath
|
from .engine_util_evaluate_path import EngineUtilEvaluatePath
|
||||||
|
from .enterprise_subscription_tier_price import EnterpriseSubscriptionTierPrice
|
||||||
from .entity_circular_pattern import EntityCircularPattern
|
from .entity_circular_pattern import EntityCircularPattern
|
||||||
from .entity_fade import EntityFade
|
from .entity_fade import EntityFade
|
||||||
from .entity_get_all_child_uuids import EntityGetAllChildUuids
|
from .entity_get_all_child_uuids import EntityGetAllChildUuids
|
||||||
|
41
kittycad/models/enterprise_subscription_tier_price.py
Normal file
41
kittycad/models/enterprise_subscription_tier_price.py
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
from typing import Literal, Union
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
||||||
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
from ..models.plan_interval import PlanInterval
|
||||||
|
|
||||||
|
|
||||||
|
class OptionFlat(BaseModel):
|
||||||
|
"""A flat price that we publicly list."""
|
||||||
|
|
||||||
|
interval: PlanInterval
|
||||||
|
|
||||||
|
price: float
|
||||||
|
|
||||||
|
type: Literal["flat"] = "flat"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class OptionPerUser(BaseModel):
|
||||||
|
"""A per user price that we publicly list."""
|
||||||
|
|
||||||
|
interval: PlanInterval
|
||||||
|
|
||||||
|
price: float
|
||||||
|
|
||||||
|
type: Literal["per_user"] = "per_user"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
EnterpriseSubscriptionTierPrice = RootModel[
|
||||||
|
Annotated[
|
||||||
|
Union[
|
||||||
|
OptionFlat,
|
||||||
|
OptionPerUser,
|
||||||
|
],
|
||||||
|
Field(discriminator="type"),
|
||||||
|
]
|
||||||
|
]
|
69
spec.json
69
spec.json
@ -8227,7 +8227,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/SubscriptionTierPrice"
|
"$ref": "#/components/schemas/EnterpriseSubscriptionTierPrice"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -17999,6 +17999,73 @@
|
|||||||
"pos"
|
"pos"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"EnterpriseSubscriptionTierPrice": {
|
||||||
|
"description": "The price for an enterprise subscription.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "A flat price that we publicly list.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"interval": {
|
||||||
|
"description": "The interval the price is charged.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PlanInterval"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"price": {
|
||||||
|
"title": "double",
|
||||||
|
"description": "The price.",
|
||||||
|
"type": "number",
|
||||||
|
"format": "money-usd"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"flat"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"interval",
|
||||||
|
"price",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "A per user price that we publicly list.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"interval": {
|
||||||
|
"description": "The interval the price is charged.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PlanInterval"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"price": {
|
||||||
|
"title": "double",
|
||||||
|
"description": "The price.",
|
||||||
|
"type": "number",
|
||||||
|
"format": "money-usd"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"per_user"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"interval",
|
||||||
|
"price",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"EntityCircularPattern": {
|
"EntityCircularPattern": {
|
||||||
"description": "The response from the `EntityCircularPattern` command.",
|
"description": "The response from the `EntityCircularPattern` command.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
Reference in New Issue
Block a user