From 00473482a62885bc5ba8749d633bd73696688276 Mon Sep 17 00:00:00 2001 From: cloudpdf-sdk-bot Date: Tue, 3 Nov 2026 11:48:17 +0000 Subject: [PATCH] chore: generate CloudPDF Python SDK 3.0.0a21 --- .fern/metadata.json | 4 +- cloudpdf-generation.json | 8 +- pyproject.toml | 2 +- reference.md | 86 ++++++++++ src/cloudpdf/__init__.py | 21 +++ src/cloudpdf/core/client_wrapper.py | 4 +- src/cloudpdf/tenants/client.py | 96 +++++++++++ src/cloudpdf/tenants/raw_client.py | 161 ++++++++++++++++++ src/cloudpdf/types/__init__.py | 21 +++ src/cloudpdf/types/tenant_feature.py | 21 +++ src/cloudpdf/types/tenant_feature_stopped.py | 5 + .../types/tenants_create200response_tenant.py | 2 + .../types/tenants_get200response_tenant.py | 2 + .../tenants_list200response_tenants_item.py | 2 + .../types/tenants_update200response.py | 20 +++ .../types/tenants_update200response_tenant.py | 30 ++++ ...tenants_update200response_tenant_status.py | 5 + .../types/tenants_update400response.py | 5 + .../types/tenants_update404response.py | 5 + 19 files changed, 491 insertions(+), 9 deletions(-) create mode 100644 src/cloudpdf/types/tenant_feature.py create mode 100644 src/cloudpdf/types/tenant_feature_stopped.py create mode 100644 src/cloudpdf/types/tenants_update200response.py create mode 100644 src/cloudpdf/types/tenants_update200response_tenant.py create mode 100644 src/cloudpdf/types/tenants_update200response_tenant_status.py create mode 100644 src/cloudpdf/types/tenants_update400response.py create mode 100644 src/cloudpdf/types/tenants_update404response.py diff --git a/.fern/metadata.json b/.fern/metadata.json index f4d3ea9..3f04b02 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -7,9 +7,9 @@ "client_class_name": "CloudPDFClient", "environment_class_name": "CloudPDFEnvironment" }, - "originGitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3", + "originGitCommit": "3283147ded32fc15c426768f75557a4d95943d84", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0a20", + "requestedVersion": "3.0.0a21", "ciProvider": "github" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 7dc68e2..e883168 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "python", - "canonicalVersion": "3.0.0-next.20", - "sdkVersion": "3.0.0a20", + "canonicalVersion": "3.0.0-next.21", + "sdkVersion": "3.0.0a21", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "47d739acb956ce8ba0c3990117e505be2e9406038d9e0cd1729608921a40b2d9", - "gitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3", + "openapiSha256": "f85648401f5c683a32e2b50acc3d753df9f4ce06df8492e5d2b599beceb0e788", + "gitCommit": "3283147ded32fc15c426768f75557a4d95943d84", "gitCommitIsDirty": false }, "fern": { diff --git a/pyproject.toml b/pyproject.toml index fa5dd48..30913e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "cloudpdf" -version = "3.0.0a20" +version = "3.0.0a21" description = "The official Python SDK for the CloudPDF API." readme = "README.md" authors = ["CloudPDF "] diff --git a/reference.md b/reference.md index 7a297c7..0f2cfc4 100644 --- a/reference.md +++ b/reference.md @@ -1684,6 +1684,92 @@ client.tenants.delete( + + + + +
client.tenants.update(...) -> TenantsUpdate200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from cloudpdf import CloudPDFClient, TenantFeature +from cloudpdf.environment import CloudPDFEnvironment + +client = CloudPDFClient( + token="", + environment=CloudPDFEnvironment.SAAS, +) + +client.tenants.update( + tenant_id="tenantId", + features=[ + TenantFeature( + id="id", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `str` + +
+
+ +
+
+ +**features:** `typing.List[TenantFeature]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/src/cloudpdf/__init__.py b/src/cloudpdf/__init__.py index 98ab693..9a480c7 100644 --- a/src/cloudpdf/__init__.py +++ b/src/cloudpdf/__init__.py @@ -2114,6 +2114,8 @@ PdfLinkTarget_Uri, PdfPageActions, ResolvedFontRun, + TenantFeature, + TenantFeatureStopped, TenantsCreate200Response, TenantsCreate200ResponseTenant, TenantsCreate200ResponseTenantStatus, @@ -2129,6 +2131,11 @@ TenantsList400Response, TenantsResumeResponse, TenantsSuspendResponse, + TenantsUpdate200Response, + TenantsUpdate200ResponseTenant, + TenantsUpdate200ResponseTenantStatus, + TenantsUpdate400Response, + TenantsUpdate404Response, TenantsUsage200Response, TenantsUsage200ResponseMetrics, TenantsUsage400Response, @@ -4382,6 +4389,8 @@ "PdfLinkTarget_Uri": ".types", "PdfPageActions": ".types", "ResolvedFontRun": ".types", + "TenantFeature": ".types", + "TenantFeatureStopped": ".types", "TenantsCreate200Response": ".types", "TenantsCreate200ResponseTenant": ".types", "TenantsCreate200ResponseTenantStatus": ".types", @@ -4397,6 +4406,11 @@ "TenantsList400Response": ".types", "TenantsResumeResponse": ".types", "TenantsSuspendResponse": ".types", + "TenantsUpdate200Response": ".types", + "TenantsUpdate200ResponseTenant": ".types", + "TenantsUpdate200ResponseTenantStatus": ".types", + "TenantsUpdate400Response": ".types", + "TenantsUpdate404Response": ".types", "TenantsUsage200Response": ".types", "TenantsUsage200ResponseMetrics": ".types", "TenantsUsage400Response": ".types", @@ -6629,6 +6643,8 @@ def __dir__(): "PdfLinkTarget_Uri", "PdfPageActions", "ResolvedFontRun", + "TenantFeature", + "TenantFeatureStopped", "TenantsCreate200Response", "TenantsCreate200ResponseTenant", "TenantsCreate200ResponseTenantStatus", @@ -6644,6 +6660,11 @@ def __dir__(): "TenantsList400Response", "TenantsResumeResponse", "TenantsSuspendResponse", + "TenantsUpdate200Response", + "TenantsUpdate200ResponseTenant", + "TenantsUpdate200ResponseTenantStatus", + "TenantsUpdate400Response", + "TenantsUpdate404Response", "TenantsUsage200Response", "TenantsUsage200ResponseMetrics", "TenantsUsage400Response", diff --git a/src/cloudpdf/core/client_wrapper.py b/src/cloudpdf/core/client_wrapper.py index 0a6dd79..54d0b40 100644 --- a/src/cloudpdf/core/client_wrapper.py +++ b/src/cloudpdf/core/client_wrapper.py @@ -33,12 +33,12 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "cloudpdf/3.0.0a20", + "User-Agent": "cloudpdf/3.0.0a21", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "cloudpdf", - "X-Fern-SDK-Version": "3.0.0a20", + "X-Fern-SDK-Version": "3.0.0a21", **(self.get_custom_headers() or {}), } token = self._get_token() diff --git a/src/cloudpdf/tenants/client.py b/src/cloudpdf/tenants/client.py index 1428534..efa2848 100644 --- a/src/cloudpdf/tenants/client.py +++ b/src/cloudpdf/tenants/client.py @@ -4,9 +4,11 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.tenant_feature import TenantFeature from ..types.tenants_create200response import TenantsCreate200Response from ..types.tenants_get200response import TenantsGet200Response from ..types.tenants_list200response import TenantsList200Response +from ..types.tenants_update200response import TenantsUpdate200Response from ..types.tenants_usage200response import TenantsUsage200Response from .raw_client import AsyncRawTenantsClient, RawTenantsClient @@ -152,6 +154,49 @@ def delete(self, tenant_id: str, *, request_options: typing.Optional[RequestOpti _response = self._raw_client.delete(tenant_id, request_options=request_options) return _response.data + def update( + self, + tenant_id: str, + *, + features: typing.Sequence[TenantFeature], + request_options: typing.Optional[RequestOptions] = None, + ) -> TenantsUpdate200Response: + """ + A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds. + + Parameters + ---------- + tenant_id : str + + features : typing.Sequence[TenantFeature] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TenantsUpdate200Response + OK + + Examples + -------- + from cloudpdf import CloudPDFClient, TenantFeature + + client = CloudPDFClient( + token="YOUR_TOKEN", + ) + client.tenants.update( + tenant_id="tenantId", + features=[ + TenantFeature( + id="id", + ) + ], + ) + """ + _response = self._raw_client.update(tenant_id, features=features, request_options=request_options) + return _response.data + def resume(self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Parameters @@ -427,6 +472,57 @@ async def main() -> None: _response = await self._raw_client.delete(tenant_id, request_options=request_options) return _response.data + async def update( + self, + tenant_id: str, + *, + features: typing.Sequence[TenantFeature], + request_options: typing.Optional[RequestOptions] = None, + ) -> TenantsUpdate200Response: + """ + A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds. + + Parameters + ---------- + tenant_id : str + + features : typing.Sequence[TenantFeature] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + TenantsUpdate200Response + OK + + Examples + -------- + import asyncio + + from cloudpdf import AsyncCloudPDFClient, TenantFeature + + client = AsyncCloudPDFClient( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.tenants.update( + tenant_id="tenantId", + features=[ + TenantFeature( + id="id", + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update(tenant_id, features=features, request_options=request_options) + return _response.data + async def resume(self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ Parameters diff --git a/src/cloudpdf/tenants/raw_client.py b/src/cloudpdf/tenants/raw_client.py index abb768a..7525b90 100644 --- a/src/cloudpdf/tenants/raw_client.py +++ b/src/cloudpdf/tenants/raw_client.py @@ -10,11 +10,14 @@ from ..core.parse_error import ParsingError from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata from ..errors.bad_request_error import BadRequestError from ..errors.not_found_error import NotFoundError +from ..types.tenant_feature import TenantFeature from ..types.tenants_create200response import TenantsCreate200Response from ..types.tenants_get200response import TenantsGet200Response from ..types.tenants_list200response import TenantsList200Response +from ..types.tenants_update200response import TenantsUpdate200Response from ..types.tenants_usage200response import TenantsUsage200Response from pydantic import ValidationError @@ -242,6 +245,85 @@ def delete(self, tenant_id: str, *, request_options: typing.Optional[RequestOpti ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def update( + self, + tenant_id: str, + *, + features: typing.Sequence[TenantFeature], + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[TenantsUpdate200Response]: + """ + A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds. + + Parameters + ---------- + tenant_id : str + + features : typing.Sequence[TenantFeature] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[TenantsUpdate200Response] + OK + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/tenants/{encode_path_param(tenant_id)}", + method="PATCH", + json={ + "features": convert_and_respect_annotation_metadata( + object_=features, annotation=typing.Sequence[TenantFeature], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TenantsUpdate200Response, + parse_obj_as( + type_=TenantsUpdate200Response, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def resume(self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ Parameters @@ -637,6 +719,85 @@ async def delete( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def update( + self, + tenant_id: str, + *, + features: typing.Sequence[TenantFeature], + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[TenantsUpdate200Response]: + """ + A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds. + + Parameters + ---------- + tenant_id : str + + features : typing.Sequence[TenantFeature] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[TenantsUpdate200Response] + OK + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/tenants/{encode_path_param(tenant_id)}", + method="PATCH", + json={ + "features": convert_and_respect_annotation_metadata( + object_=features, annotation=typing.Sequence[TenantFeature], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TenantsUpdate200Response, + parse_obj_as( + type_=TenantsUpdate200Response, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def resume( self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: diff --git a/src/cloudpdf/types/__init__.py b/src/cloudpdf/types/__init__.py index ff10871..419471d 100644 --- a/src/cloudpdf/types/__init__.py +++ b/src/cloudpdf/types/__init__.py @@ -2863,6 +2863,8 @@ from .pdf_link_target_writable_uri import PdfLinkTargetWritableUri from .pdf_page_actions import PdfPageActions from .resolved_font_run import ResolvedFontRun + from .tenant_feature import TenantFeature + from .tenant_feature_stopped import TenantFeatureStopped from .tenants_create200response import TenantsCreate200Response from .tenants_create200response_tenant import TenantsCreate200ResponseTenant from .tenants_create200response_tenant_status import TenantsCreate200ResponseTenantStatus @@ -2878,6 +2880,11 @@ from .tenants_list400response import TenantsList400Response from .tenants_resume_response import TenantsResumeResponse from .tenants_suspend_response import TenantsSuspendResponse + from .tenants_update200response import TenantsUpdate200Response + from .tenants_update200response_tenant import TenantsUpdate200ResponseTenant + from .tenants_update200response_tenant_status import TenantsUpdate200ResponseTenantStatus + from .tenants_update400response import TenantsUpdate400Response + from .tenants_update404response import TenantsUpdate404Response from .tenants_usage200response import TenantsUsage200Response from .tenants_usage200response_metrics import TenantsUsage200ResponseMetrics from .tenants_usage400response import TenantsUsage400Response @@ -5033,6 +5040,8 @@ "PdfLinkTarget_Uri": ".pdf_link_target", "PdfPageActions": ".pdf_page_actions", "ResolvedFontRun": ".resolved_font_run", + "TenantFeature": ".tenant_feature", + "TenantFeatureStopped": ".tenant_feature_stopped", "TenantsCreate200Response": ".tenants_create200response", "TenantsCreate200ResponseTenant": ".tenants_create200response_tenant", "TenantsCreate200ResponseTenantStatus": ".tenants_create200response_tenant_status", @@ -5048,6 +5057,11 @@ "TenantsList400Response": ".tenants_list400response", "TenantsResumeResponse": ".tenants_resume_response", "TenantsSuspendResponse": ".tenants_suspend_response", + "TenantsUpdate200Response": ".tenants_update200response", + "TenantsUpdate200ResponseTenant": ".tenants_update200response_tenant", + "TenantsUpdate200ResponseTenantStatus": ".tenants_update200response_tenant_status", + "TenantsUpdate400Response": ".tenants_update400response", + "TenantsUpdate404Response": ".tenants_update404response", "TenantsUsage200Response": ".tenants_usage200response", "TenantsUsage200ResponseMetrics": ".tenants_usage200response_metrics", "TenantsUsage400Response": ".tenants_usage400response", @@ -7225,6 +7239,8 @@ def __dir__(): "PdfLinkTarget_Uri", "PdfPageActions", "ResolvedFontRun", + "TenantFeature", + "TenantFeatureStopped", "TenantsCreate200Response", "TenantsCreate200ResponseTenant", "TenantsCreate200ResponseTenantStatus", @@ -7240,6 +7256,11 @@ def __dir__(): "TenantsList400Response", "TenantsResumeResponse", "TenantsSuspendResponse", + "TenantsUpdate200Response", + "TenantsUpdate200ResponseTenant", + "TenantsUpdate200ResponseTenantStatus", + "TenantsUpdate400Response", + "TenantsUpdate404Response", "TenantsUsage200Response", "TenantsUsage200ResponseMetrics", "TenantsUsage400Response", diff --git a/src/cloudpdf/types/tenant_feature.py b/src/cloudpdf/types/tenant_feature.py new file mode 100644 index 0000000..6c5ad36 --- /dev/null +++ b/src/cloudpdf/types/tenant_feature.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .tenant_feature_stopped import TenantFeatureStopped + + +class TenantFeature(UniversalBaseModel): + id: str + stopped: typing.Optional[TenantFeatureStopped] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/cloudpdf/types/tenant_feature_stopped.py b/src/cloudpdf/types/tenant_feature_stopped.py new file mode 100644 index 0000000..69107c1 --- /dev/null +++ b/src/cloudpdf/types/tenant_feature_stopped.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TenantFeatureStopped = typing.Union[typing.Literal["cap"], typing.Any] diff --git a/src/cloudpdf/types/tenants_create200response_tenant.py b/src/cloudpdf/types/tenants_create200response_tenant.py index 535f830..24646cc 100644 --- a/src/cloudpdf/types/tenants_create200response_tenant.py +++ b/src/cloudpdf/types/tenants_create200response_tenant.py @@ -6,6 +6,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .tenant_feature import TenantFeature from .tenants_create200response_tenant_status import TenantsCreate200ResponseTenantStatus @@ -16,6 +17,7 @@ class TenantsCreate200ResponseTenant(UniversalBaseModel): bool, FieldMetadata(alias="autoProvisioned"), pydantic.Field(alias="autoProvisioned") ] status: typing.Optional[TenantsCreate200ResponseTenantStatus] = None + features: typing.Optional[typing.List[TenantFeature]] = None created_at: typing_extensions.Annotated[float, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")] if IS_PYDANTIC_V2: diff --git a/src/cloudpdf/types/tenants_get200response_tenant.py b/src/cloudpdf/types/tenants_get200response_tenant.py index 38c276d..5d4c596 100644 --- a/src/cloudpdf/types/tenants_get200response_tenant.py +++ b/src/cloudpdf/types/tenants_get200response_tenant.py @@ -6,6 +6,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .tenant_feature import TenantFeature from .tenants_get200response_tenant_status import TenantsGet200ResponseTenantStatus @@ -16,6 +17,7 @@ class TenantsGet200ResponseTenant(UniversalBaseModel): bool, FieldMetadata(alias="autoProvisioned"), pydantic.Field(alias="autoProvisioned") ] status: typing.Optional[TenantsGet200ResponseTenantStatus] = None + features: typing.Optional[typing.List[TenantFeature]] = None created_at: typing_extensions.Annotated[float, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")] if IS_PYDANTIC_V2: diff --git a/src/cloudpdf/types/tenants_list200response_tenants_item.py b/src/cloudpdf/types/tenants_list200response_tenants_item.py index 8ac17c9..54dfc64 100644 --- a/src/cloudpdf/types/tenants_list200response_tenants_item.py +++ b/src/cloudpdf/types/tenants_list200response_tenants_item.py @@ -6,6 +6,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .tenant_feature import TenantFeature from .tenants_list200response_tenants_item_status import TenantsList200ResponseTenantsItemStatus @@ -16,6 +17,7 @@ class TenantsList200ResponseTenantsItem(UniversalBaseModel): bool, FieldMetadata(alias="autoProvisioned"), pydantic.Field(alias="autoProvisioned") ] status: typing.Optional[TenantsList200ResponseTenantsItemStatus] = None + features: typing.Optional[typing.List[TenantFeature]] = None created_at: typing_extensions.Annotated[float, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")] if IS_PYDANTIC_V2: diff --git a/src/cloudpdf/types/tenants_update200response.py b/src/cloudpdf/types/tenants_update200response.py new file mode 100644 index 0000000..836fa85 --- /dev/null +++ b/src/cloudpdf/types/tenants_update200response.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .tenants_update200response_tenant import TenantsUpdate200ResponseTenant + + +class TenantsUpdate200Response(UniversalBaseModel): + tenant: TenantsUpdate200ResponseTenant + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/cloudpdf/types/tenants_update200response_tenant.py b/src/cloudpdf/types/tenants_update200response_tenant.py new file mode 100644 index 0000000..943afea --- /dev/null +++ b/src/cloudpdf/types/tenants_update200response_tenant.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .tenant_feature import TenantFeature +from .tenants_update200response_tenant_status import TenantsUpdate200ResponseTenantStatus + + +class TenantsUpdate200ResponseTenant(UniversalBaseModel): + id: str + name: str + auto_provisioned: typing_extensions.Annotated[ + bool, FieldMetadata(alias="autoProvisioned"), pydantic.Field(alias="autoProvisioned") + ] + status: typing.Optional[TenantsUpdate200ResponseTenantStatus] = None + features: typing.Optional[typing.List[TenantFeature]] = None + created_at: typing_extensions.Annotated[float, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/cloudpdf/types/tenants_update200response_tenant_status.py b/src/cloudpdf/types/tenants_update200response_tenant_status.py new file mode 100644 index 0000000..78078ce --- /dev/null +++ b/src/cloudpdf/types/tenants_update200response_tenant_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TenantsUpdate200ResponseTenantStatus = typing.Union[typing.Literal["active", "suspended"], typing.Any] diff --git a/src/cloudpdf/types/tenants_update400response.py b/src/cloudpdf/types/tenants_update400response.py new file mode 100644 index 0000000..38662d4 --- /dev/null +++ b/src/cloudpdf/types/tenants_update400response.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .admin_error_payload import AdminErrorPayload + +TenantsUpdate400Response = AdminErrorPayload diff --git a/src/cloudpdf/types/tenants_update404response.py b/src/cloudpdf/types/tenants_update404response.py new file mode 100644 index 0000000..8b67a7a --- /dev/null +++ b/src/cloudpdf/types/tenants_update404response.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .admin_error_payload import AdminErrorPayload + +TenantsUpdate404Response = AdminErrorPayload