dub 0.26.1__tar.gz → 0.26.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dub-0.26.1 → dub-0.26.3}/PKG-INFO +6 -2
- {dub-0.26.1 → dub-0.26.3}/README-PYPI.md +5 -1
- {dub-0.26.1 → dub-0.26.3}/pyproject.toml +1 -1
- {dub-0.26.1 → dub-0.26.3}/src/dub/_version.py +3 -3
- {dub-0.26.1 → dub-0.26.3}/src/dub/domains.py +602 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/partnerenrolledevent.py +8 -3
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/__init__.py +34 -0
- dub-0.26.3/src/dub/models/operations/checkdomainstatus.py +83 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createpartner.py +8 -3
- dub-0.26.3/src/dub/models/operations/registerdomain.py +70 -0
- {dub-0.26.1 → dub-0.26.3}/LICENSE +0 -0
- {dub-0.26.1 → dub-0.26.3}/py.typed +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/_hooks/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/_hooks/registration.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/_hooks/sdkhooks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/_hooks/types.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/analytics.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/basesdk.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/commissions.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/customers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/embed_tokens.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/events.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/folders.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/httpclient.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/links.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsbrowsers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticscities.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticscontinents.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticscount.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticscountries.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsdevices.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsos.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsreferers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsrefererurls.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticsregions.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticstimeseries.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticstoplinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticstopurls.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/analyticstriggers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/clickevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/continentcode.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/countrycode.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/domainschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/folderschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/leadcreatedevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/leadevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/linkclickedevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/linkerrorschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/linkgeotargeting.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/linkschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/linkwebhookevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/partneranalyticscount.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/partneranalyticstimeseries.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/partneranalyticstoplinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/salecreatedevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/saleevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/security.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/tagschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/webhookevent.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/components/workspaceschema.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/badrequest.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/conflict.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/forbidden.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/internalservererror.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/inviteexpired.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/notfound.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/ratelimitexceeded.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/sdkerror.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/unauthorized.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/errors/unprocessableentity.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/bulkcreatelinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/bulkdeletelinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/bulkupdatelinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createcustomer.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createdomain.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createfolder.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createlink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createpartnerlink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createreferralsembedtoken.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/createtag.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/deletecustomer.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/deletedomain.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/deletefolder.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/deletelink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/deletetag.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getcustomer.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getcustomers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getlinkinfo.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getlinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getlinkscount.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getqrcode.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/gettags.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/getworkspace.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/listcommissions.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/listdomains.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/listevents.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/listfolders.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/retrieveanalytics.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/retrievelinks.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/retrievepartneranalytics.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/tracklead.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/tracksale.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatecommission.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatecustomer.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatedomain.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatefolder.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatelink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updatetag.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/updateworkspace.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/upsertlink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/models/operations/upsertpartnerlink.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/partners.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/py.typed +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/qr_codes.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/sdk.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/sdkconfiguration.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/tags.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/track.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/types/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/types/basemodel.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/__init__.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/annotations.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/datetimes.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/enums.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/eventstreaming.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/forms.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/headers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/logger.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/metadata.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/queryparams.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/requestbodies.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/retries.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/security.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/serializers.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/url.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/utils/values.py +0 -0
- {dub-0.26.1 → dub-0.26.3}/src/dub/workspaces.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dub
|
|
3
|
-
Version: 0.26.
|
|
3
|
+
Version: 0.26.3
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -296,6 +296,8 @@ asyncio.run(main())
|
|
|
296
296
|
* [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#list) - Retrieve a list of domains
|
|
297
297
|
* [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#update) - Update a domain
|
|
298
298
|
* [delete](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#delete) - Delete a domain
|
|
299
|
+
* [register](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#register) - Register a domain
|
|
300
|
+
* [check_status](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#check_status) - Check the availability of one or more domains
|
|
299
301
|
|
|
300
302
|
|
|
301
303
|
### [embed_tokens](https://github.com/dubinc/dub-python/blob/master/docs/sdks/embedtokens/README.md)
|
|
@@ -718,7 +720,9 @@ with Dub(
|
|
|
718
720
|
token="DUB_API_KEY",
|
|
719
721
|
) as d_client:
|
|
720
722
|
|
|
721
|
-
res = d_client.links.list(request={
|
|
723
|
+
res = d_client.links.list(request={
|
|
724
|
+
"page_size": 50,
|
|
725
|
+
})
|
|
722
726
|
|
|
723
727
|
while res is not None:
|
|
724
728
|
# Handle items
|
|
@@ -278,6 +278,8 @@ asyncio.run(main())
|
|
|
278
278
|
* [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#list) - Retrieve a list of domains
|
|
279
279
|
* [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#update) - Update a domain
|
|
280
280
|
* [delete](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#delete) - Delete a domain
|
|
281
|
+
* [register](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#register) - Register a domain
|
|
282
|
+
* [check_status](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#check_status) - Check the availability of one or more domains
|
|
281
283
|
|
|
282
284
|
|
|
283
285
|
### [embed_tokens](https://github.com/dubinc/dub-python/blob/master/docs/sdks/embedtokens/README.md)
|
|
@@ -700,7 +702,9 @@ with Dub(
|
|
|
700
702
|
token="DUB_API_KEY",
|
|
701
703
|
) as d_client:
|
|
702
704
|
|
|
703
|
-
res = d_client.links.list(request={
|
|
705
|
+
res = d_client.links.list(request={
|
|
706
|
+
"page_size": 50,
|
|
707
|
+
})
|
|
704
708
|
|
|
705
709
|
while res is not None:
|
|
706
710
|
# Handle items
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "dub"
|
|
6
|
-
__version__: str = "0.26.
|
|
6
|
+
__version__: str = "0.26.3"
|
|
7
7
|
__openapi_doc_version__: str = "0.0.1"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.26.
|
|
8
|
+
__gen_version__: str = "2.620.2"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.26.3 2.620.2 0.0.1 dub"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -1265,3 +1265,605 @@ class Domains(BaseSDK):
|
|
|
1265
1265
|
http_res_text,
|
|
1266
1266
|
http_res,
|
|
1267
1267
|
)
|
|
1268
|
+
|
|
1269
|
+
def register(
|
|
1270
|
+
self,
|
|
1271
|
+
*,
|
|
1272
|
+
request: Optional[
|
|
1273
|
+
Union[
|
|
1274
|
+
operations.RegisterDomainRequestBody,
|
|
1275
|
+
operations.RegisterDomainRequestBodyTypedDict,
|
|
1276
|
+
]
|
|
1277
|
+
] = None,
|
|
1278
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1279
|
+
server_url: Optional[str] = None,
|
|
1280
|
+
timeout_ms: Optional[int] = None,
|
|
1281
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1282
|
+
) -> Optional[operations.RegisterDomainResponseBody]:
|
|
1283
|
+
r"""Register a domain
|
|
1284
|
+
|
|
1285
|
+
Register a domain for the authenticated workspace. Only available for Enterprise Plans.
|
|
1286
|
+
|
|
1287
|
+
:param request: The request object to send.
|
|
1288
|
+
:param retries: Override the default retry configuration for this method
|
|
1289
|
+
:param server_url: Override the default server URL for this method
|
|
1290
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1291
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1292
|
+
"""
|
|
1293
|
+
base_url = None
|
|
1294
|
+
url_variables = None
|
|
1295
|
+
if timeout_ms is None:
|
|
1296
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1297
|
+
|
|
1298
|
+
if server_url is not None:
|
|
1299
|
+
base_url = server_url
|
|
1300
|
+
else:
|
|
1301
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1302
|
+
|
|
1303
|
+
if not isinstance(request, BaseModel):
|
|
1304
|
+
request = utils.unmarshal(
|
|
1305
|
+
request, Optional[operations.RegisterDomainRequestBody]
|
|
1306
|
+
)
|
|
1307
|
+
request = cast(Optional[operations.RegisterDomainRequestBody], request)
|
|
1308
|
+
|
|
1309
|
+
req = self._build_request(
|
|
1310
|
+
method="POST",
|
|
1311
|
+
path="/domains/register",
|
|
1312
|
+
base_url=base_url,
|
|
1313
|
+
url_variables=url_variables,
|
|
1314
|
+
request=request,
|
|
1315
|
+
request_body_required=False,
|
|
1316
|
+
request_has_path_params=False,
|
|
1317
|
+
request_has_query_params=True,
|
|
1318
|
+
user_agent_header="user-agent",
|
|
1319
|
+
accept_header_value="application/json",
|
|
1320
|
+
http_headers=http_headers,
|
|
1321
|
+
security=self.sdk_configuration.security,
|
|
1322
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1323
|
+
request,
|
|
1324
|
+
False,
|
|
1325
|
+
True,
|
|
1326
|
+
"json",
|
|
1327
|
+
Optional[operations.RegisterDomainRequestBody],
|
|
1328
|
+
),
|
|
1329
|
+
timeout_ms=timeout_ms,
|
|
1330
|
+
)
|
|
1331
|
+
|
|
1332
|
+
if retries == UNSET:
|
|
1333
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1334
|
+
retries = self.sdk_configuration.retry_config
|
|
1335
|
+
|
|
1336
|
+
retry_config = None
|
|
1337
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1338
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1339
|
+
|
|
1340
|
+
http_res = self.do_request(
|
|
1341
|
+
hook_ctx=HookContext(
|
|
1342
|
+
config=self.sdk_configuration,
|
|
1343
|
+
base_url=base_url or "",
|
|
1344
|
+
operation_id="registerDomain",
|
|
1345
|
+
oauth2_scopes=[],
|
|
1346
|
+
security_source=self.sdk_configuration.security,
|
|
1347
|
+
),
|
|
1348
|
+
request=req,
|
|
1349
|
+
error_status_codes=[
|
|
1350
|
+
"400",
|
|
1351
|
+
"401",
|
|
1352
|
+
"403",
|
|
1353
|
+
"404",
|
|
1354
|
+
"409",
|
|
1355
|
+
"410",
|
|
1356
|
+
"422",
|
|
1357
|
+
"429",
|
|
1358
|
+
"4XX",
|
|
1359
|
+
"500",
|
|
1360
|
+
"5XX",
|
|
1361
|
+
],
|
|
1362
|
+
retry_config=retry_config,
|
|
1363
|
+
)
|
|
1364
|
+
|
|
1365
|
+
response_data: Any = None
|
|
1366
|
+
if utils.match_response(http_res, "201", "application/json"):
|
|
1367
|
+
return utils.unmarshal_json(
|
|
1368
|
+
http_res.text, Optional[operations.RegisterDomainResponseBody]
|
|
1369
|
+
)
|
|
1370
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
1371
|
+
response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
|
|
1372
|
+
raise errors.BadRequest(data=response_data)
|
|
1373
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
1374
|
+
response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
|
|
1375
|
+
raise errors.Unauthorized(data=response_data)
|
|
1376
|
+
if utils.match_response(http_res, "403", "application/json"):
|
|
1377
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
|
|
1378
|
+
raise errors.Forbidden(data=response_data)
|
|
1379
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
1380
|
+
response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
|
|
1381
|
+
raise errors.NotFound(data=response_data)
|
|
1382
|
+
if utils.match_response(http_res, "409", "application/json"):
|
|
1383
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
|
|
1384
|
+
raise errors.Conflict(data=response_data)
|
|
1385
|
+
if utils.match_response(http_res, "410", "application/json"):
|
|
1386
|
+
response_data = utils.unmarshal_json(
|
|
1387
|
+
http_res.text, errors.InviteExpiredData
|
|
1388
|
+
)
|
|
1389
|
+
raise errors.InviteExpired(data=response_data)
|
|
1390
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
1391
|
+
response_data = utils.unmarshal_json(
|
|
1392
|
+
http_res.text, errors.UnprocessableEntityData
|
|
1393
|
+
)
|
|
1394
|
+
raise errors.UnprocessableEntity(data=response_data)
|
|
1395
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
1396
|
+
response_data = utils.unmarshal_json(
|
|
1397
|
+
http_res.text, errors.RateLimitExceededData
|
|
1398
|
+
)
|
|
1399
|
+
raise errors.RateLimitExceeded(data=response_data)
|
|
1400
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1401
|
+
response_data = utils.unmarshal_json(
|
|
1402
|
+
http_res.text, errors.InternalServerErrorData
|
|
1403
|
+
)
|
|
1404
|
+
raise errors.InternalServerError(data=response_data)
|
|
1405
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1406
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1407
|
+
raise errors.SDKError(
|
|
1408
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1409
|
+
)
|
|
1410
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1411
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1412
|
+
raise errors.SDKError(
|
|
1413
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1414
|
+
)
|
|
1415
|
+
|
|
1416
|
+
content_type = http_res.headers.get("Content-Type")
|
|
1417
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1418
|
+
raise errors.SDKError(
|
|
1419
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1420
|
+
http_res.status_code,
|
|
1421
|
+
http_res_text,
|
|
1422
|
+
http_res,
|
|
1423
|
+
)
|
|
1424
|
+
|
|
1425
|
+
async def register_async(
|
|
1426
|
+
self,
|
|
1427
|
+
*,
|
|
1428
|
+
request: Optional[
|
|
1429
|
+
Union[
|
|
1430
|
+
operations.RegisterDomainRequestBody,
|
|
1431
|
+
operations.RegisterDomainRequestBodyTypedDict,
|
|
1432
|
+
]
|
|
1433
|
+
] = None,
|
|
1434
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1435
|
+
server_url: Optional[str] = None,
|
|
1436
|
+
timeout_ms: Optional[int] = None,
|
|
1437
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1438
|
+
) -> Optional[operations.RegisterDomainResponseBody]:
|
|
1439
|
+
r"""Register a domain
|
|
1440
|
+
|
|
1441
|
+
Register a domain for the authenticated workspace. Only available for Enterprise Plans.
|
|
1442
|
+
|
|
1443
|
+
:param request: The request object to send.
|
|
1444
|
+
:param retries: Override the default retry configuration for this method
|
|
1445
|
+
:param server_url: Override the default server URL for this method
|
|
1446
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1447
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1448
|
+
"""
|
|
1449
|
+
base_url = None
|
|
1450
|
+
url_variables = None
|
|
1451
|
+
if timeout_ms is None:
|
|
1452
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1453
|
+
|
|
1454
|
+
if server_url is not None:
|
|
1455
|
+
base_url = server_url
|
|
1456
|
+
else:
|
|
1457
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1458
|
+
|
|
1459
|
+
if not isinstance(request, BaseModel):
|
|
1460
|
+
request = utils.unmarshal(
|
|
1461
|
+
request, Optional[operations.RegisterDomainRequestBody]
|
|
1462
|
+
)
|
|
1463
|
+
request = cast(Optional[operations.RegisterDomainRequestBody], request)
|
|
1464
|
+
|
|
1465
|
+
req = self._build_request_async(
|
|
1466
|
+
method="POST",
|
|
1467
|
+
path="/domains/register",
|
|
1468
|
+
base_url=base_url,
|
|
1469
|
+
url_variables=url_variables,
|
|
1470
|
+
request=request,
|
|
1471
|
+
request_body_required=False,
|
|
1472
|
+
request_has_path_params=False,
|
|
1473
|
+
request_has_query_params=True,
|
|
1474
|
+
user_agent_header="user-agent",
|
|
1475
|
+
accept_header_value="application/json",
|
|
1476
|
+
http_headers=http_headers,
|
|
1477
|
+
security=self.sdk_configuration.security,
|
|
1478
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1479
|
+
request,
|
|
1480
|
+
False,
|
|
1481
|
+
True,
|
|
1482
|
+
"json",
|
|
1483
|
+
Optional[operations.RegisterDomainRequestBody],
|
|
1484
|
+
),
|
|
1485
|
+
timeout_ms=timeout_ms,
|
|
1486
|
+
)
|
|
1487
|
+
|
|
1488
|
+
if retries == UNSET:
|
|
1489
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1490
|
+
retries = self.sdk_configuration.retry_config
|
|
1491
|
+
|
|
1492
|
+
retry_config = None
|
|
1493
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1494
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1495
|
+
|
|
1496
|
+
http_res = await self.do_request_async(
|
|
1497
|
+
hook_ctx=HookContext(
|
|
1498
|
+
config=self.sdk_configuration,
|
|
1499
|
+
base_url=base_url or "",
|
|
1500
|
+
operation_id="registerDomain",
|
|
1501
|
+
oauth2_scopes=[],
|
|
1502
|
+
security_source=self.sdk_configuration.security,
|
|
1503
|
+
),
|
|
1504
|
+
request=req,
|
|
1505
|
+
error_status_codes=[
|
|
1506
|
+
"400",
|
|
1507
|
+
"401",
|
|
1508
|
+
"403",
|
|
1509
|
+
"404",
|
|
1510
|
+
"409",
|
|
1511
|
+
"410",
|
|
1512
|
+
"422",
|
|
1513
|
+
"429",
|
|
1514
|
+
"4XX",
|
|
1515
|
+
"500",
|
|
1516
|
+
"5XX",
|
|
1517
|
+
],
|
|
1518
|
+
retry_config=retry_config,
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
response_data: Any = None
|
|
1522
|
+
if utils.match_response(http_res, "201", "application/json"):
|
|
1523
|
+
return utils.unmarshal_json(
|
|
1524
|
+
http_res.text, Optional[operations.RegisterDomainResponseBody]
|
|
1525
|
+
)
|
|
1526
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
1527
|
+
response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
|
|
1528
|
+
raise errors.BadRequest(data=response_data)
|
|
1529
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
1530
|
+
response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
|
|
1531
|
+
raise errors.Unauthorized(data=response_data)
|
|
1532
|
+
if utils.match_response(http_res, "403", "application/json"):
|
|
1533
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
|
|
1534
|
+
raise errors.Forbidden(data=response_data)
|
|
1535
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
1536
|
+
response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
|
|
1537
|
+
raise errors.NotFound(data=response_data)
|
|
1538
|
+
if utils.match_response(http_res, "409", "application/json"):
|
|
1539
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
|
|
1540
|
+
raise errors.Conflict(data=response_data)
|
|
1541
|
+
if utils.match_response(http_res, "410", "application/json"):
|
|
1542
|
+
response_data = utils.unmarshal_json(
|
|
1543
|
+
http_res.text, errors.InviteExpiredData
|
|
1544
|
+
)
|
|
1545
|
+
raise errors.InviteExpired(data=response_data)
|
|
1546
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
1547
|
+
response_data = utils.unmarshal_json(
|
|
1548
|
+
http_res.text, errors.UnprocessableEntityData
|
|
1549
|
+
)
|
|
1550
|
+
raise errors.UnprocessableEntity(data=response_data)
|
|
1551
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
1552
|
+
response_data = utils.unmarshal_json(
|
|
1553
|
+
http_res.text, errors.RateLimitExceededData
|
|
1554
|
+
)
|
|
1555
|
+
raise errors.RateLimitExceeded(data=response_data)
|
|
1556
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1557
|
+
response_data = utils.unmarshal_json(
|
|
1558
|
+
http_res.text, errors.InternalServerErrorData
|
|
1559
|
+
)
|
|
1560
|
+
raise errors.InternalServerError(data=response_data)
|
|
1561
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1562
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1563
|
+
raise errors.SDKError(
|
|
1564
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1565
|
+
)
|
|
1566
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1567
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1568
|
+
raise errors.SDKError(
|
|
1569
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1570
|
+
)
|
|
1571
|
+
|
|
1572
|
+
content_type = http_res.headers.get("Content-Type")
|
|
1573
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1574
|
+
raise errors.SDKError(
|
|
1575
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1576
|
+
http_res.status_code,
|
|
1577
|
+
http_res_text,
|
|
1578
|
+
http_res,
|
|
1579
|
+
)
|
|
1580
|
+
|
|
1581
|
+
def check_status(
|
|
1582
|
+
self,
|
|
1583
|
+
*,
|
|
1584
|
+
request: Union[
|
|
1585
|
+
operations.CheckDomainStatusRequest,
|
|
1586
|
+
operations.CheckDomainStatusRequestTypedDict,
|
|
1587
|
+
],
|
|
1588
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1589
|
+
server_url: Optional[str] = None,
|
|
1590
|
+
timeout_ms: Optional[int] = None,
|
|
1591
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1592
|
+
) -> Optional[List[operations.CheckDomainStatusResponseBody]]:
|
|
1593
|
+
r"""Check the availability of one or more domains
|
|
1594
|
+
|
|
1595
|
+
Check if a domain name is available for purchase. You can check multiple domains at once.
|
|
1596
|
+
|
|
1597
|
+
:param request: The request object to send.
|
|
1598
|
+
:param retries: Override the default retry configuration for this method
|
|
1599
|
+
:param server_url: Override the default server URL for this method
|
|
1600
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1601
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1602
|
+
"""
|
|
1603
|
+
base_url = None
|
|
1604
|
+
url_variables = None
|
|
1605
|
+
if timeout_ms is None:
|
|
1606
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1607
|
+
|
|
1608
|
+
if server_url is not None:
|
|
1609
|
+
base_url = server_url
|
|
1610
|
+
else:
|
|
1611
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1612
|
+
|
|
1613
|
+
if not isinstance(request, BaseModel):
|
|
1614
|
+
request = utils.unmarshal(request, operations.CheckDomainStatusRequest)
|
|
1615
|
+
request = cast(operations.CheckDomainStatusRequest, request)
|
|
1616
|
+
|
|
1617
|
+
req = self._build_request(
|
|
1618
|
+
method="GET",
|
|
1619
|
+
path="/domains/status",
|
|
1620
|
+
base_url=base_url,
|
|
1621
|
+
url_variables=url_variables,
|
|
1622
|
+
request=request,
|
|
1623
|
+
request_body_required=False,
|
|
1624
|
+
request_has_path_params=False,
|
|
1625
|
+
request_has_query_params=True,
|
|
1626
|
+
user_agent_header="user-agent",
|
|
1627
|
+
accept_header_value="application/json",
|
|
1628
|
+
http_headers=http_headers,
|
|
1629
|
+
security=self.sdk_configuration.security,
|
|
1630
|
+
timeout_ms=timeout_ms,
|
|
1631
|
+
)
|
|
1632
|
+
|
|
1633
|
+
if retries == UNSET:
|
|
1634
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1635
|
+
retries = self.sdk_configuration.retry_config
|
|
1636
|
+
|
|
1637
|
+
retry_config = None
|
|
1638
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1639
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1640
|
+
|
|
1641
|
+
http_res = self.do_request(
|
|
1642
|
+
hook_ctx=HookContext(
|
|
1643
|
+
config=self.sdk_configuration,
|
|
1644
|
+
base_url=base_url or "",
|
|
1645
|
+
operation_id="checkDomainStatus",
|
|
1646
|
+
oauth2_scopes=[],
|
|
1647
|
+
security_source=self.sdk_configuration.security,
|
|
1648
|
+
),
|
|
1649
|
+
request=req,
|
|
1650
|
+
error_status_codes=[
|
|
1651
|
+
"400",
|
|
1652
|
+
"401",
|
|
1653
|
+
"403",
|
|
1654
|
+
"404",
|
|
1655
|
+
"409",
|
|
1656
|
+
"410",
|
|
1657
|
+
"422",
|
|
1658
|
+
"429",
|
|
1659
|
+
"4XX",
|
|
1660
|
+
"500",
|
|
1661
|
+
"5XX",
|
|
1662
|
+
],
|
|
1663
|
+
retry_config=retry_config,
|
|
1664
|
+
)
|
|
1665
|
+
|
|
1666
|
+
response_data: Any = None
|
|
1667
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1668
|
+
return utils.unmarshal_json(
|
|
1669
|
+
http_res.text, Optional[List[operations.CheckDomainStatusResponseBody]]
|
|
1670
|
+
)
|
|
1671
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
1672
|
+
response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
|
|
1673
|
+
raise errors.BadRequest(data=response_data)
|
|
1674
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
1675
|
+
response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
|
|
1676
|
+
raise errors.Unauthorized(data=response_data)
|
|
1677
|
+
if utils.match_response(http_res, "403", "application/json"):
|
|
1678
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
|
|
1679
|
+
raise errors.Forbidden(data=response_data)
|
|
1680
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
1681
|
+
response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
|
|
1682
|
+
raise errors.NotFound(data=response_data)
|
|
1683
|
+
if utils.match_response(http_res, "409", "application/json"):
|
|
1684
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
|
|
1685
|
+
raise errors.Conflict(data=response_data)
|
|
1686
|
+
if utils.match_response(http_res, "410", "application/json"):
|
|
1687
|
+
response_data = utils.unmarshal_json(
|
|
1688
|
+
http_res.text, errors.InviteExpiredData
|
|
1689
|
+
)
|
|
1690
|
+
raise errors.InviteExpired(data=response_data)
|
|
1691
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
1692
|
+
response_data = utils.unmarshal_json(
|
|
1693
|
+
http_res.text, errors.UnprocessableEntityData
|
|
1694
|
+
)
|
|
1695
|
+
raise errors.UnprocessableEntity(data=response_data)
|
|
1696
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
1697
|
+
response_data = utils.unmarshal_json(
|
|
1698
|
+
http_res.text, errors.RateLimitExceededData
|
|
1699
|
+
)
|
|
1700
|
+
raise errors.RateLimitExceeded(data=response_data)
|
|
1701
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1702
|
+
response_data = utils.unmarshal_json(
|
|
1703
|
+
http_res.text, errors.InternalServerErrorData
|
|
1704
|
+
)
|
|
1705
|
+
raise errors.InternalServerError(data=response_data)
|
|
1706
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1707
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1708
|
+
raise errors.SDKError(
|
|
1709
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1710
|
+
)
|
|
1711
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1712
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1713
|
+
raise errors.SDKError(
|
|
1714
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1715
|
+
)
|
|
1716
|
+
|
|
1717
|
+
content_type = http_res.headers.get("Content-Type")
|
|
1718
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1719
|
+
raise errors.SDKError(
|
|
1720
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1721
|
+
http_res.status_code,
|
|
1722
|
+
http_res_text,
|
|
1723
|
+
http_res,
|
|
1724
|
+
)
|
|
1725
|
+
|
|
1726
|
+
async def check_status_async(
|
|
1727
|
+
self,
|
|
1728
|
+
*,
|
|
1729
|
+
request: Union[
|
|
1730
|
+
operations.CheckDomainStatusRequest,
|
|
1731
|
+
operations.CheckDomainStatusRequestTypedDict,
|
|
1732
|
+
],
|
|
1733
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1734
|
+
server_url: Optional[str] = None,
|
|
1735
|
+
timeout_ms: Optional[int] = None,
|
|
1736
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1737
|
+
) -> Optional[List[operations.CheckDomainStatusResponseBody]]:
|
|
1738
|
+
r"""Check the availability of one or more domains
|
|
1739
|
+
|
|
1740
|
+
Check if a domain name is available for purchase. You can check multiple domains at once.
|
|
1741
|
+
|
|
1742
|
+
:param request: The request object to send.
|
|
1743
|
+
:param retries: Override the default retry configuration for this method
|
|
1744
|
+
:param server_url: Override the default server URL for this method
|
|
1745
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1746
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1747
|
+
"""
|
|
1748
|
+
base_url = None
|
|
1749
|
+
url_variables = None
|
|
1750
|
+
if timeout_ms is None:
|
|
1751
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1752
|
+
|
|
1753
|
+
if server_url is not None:
|
|
1754
|
+
base_url = server_url
|
|
1755
|
+
else:
|
|
1756
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1757
|
+
|
|
1758
|
+
if not isinstance(request, BaseModel):
|
|
1759
|
+
request = utils.unmarshal(request, operations.CheckDomainStatusRequest)
|
|
1760
|
+
request = cast(operations.CheckDomainStatusRequest, request)
|
|
1761
|
+
|
|
1762
|
+
req = self._build_request_async(
|
|
1763
|
+
method="GET",
|
|
1764
|
+
path="/domains/status",
|
|
1765
|
+
base_url=base_url,
|
|
1766
|
+
url_variables=url_variables,
|
|
1767
|
+
request=request,
|
|
1768
|
+
request_body_required=False,
|
|
1769
|
+
request_has_path_params=False,
|
|
1770
|
+
request_has_query_params=True,
|
|
1771
|
+
user_agent_header="user-agent",
|
|
1772
|
+
accept_header_value="application/json",
|
|
1773
|
+
http_headers=http_headers,
|
|
1774
|
+
security=self.sdk_configuration.security,
|
|
1775
|
+
timeout_ms=timeout_ms,
|
|
1776
|
+
)
|
|
1777
|
+
|
|
1778
|
+
if retries == UNSET:
|
|
1779
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1780
|
+
retries = self.sdk_configuration.retry_config
|
|
1781
|
+
|
|
1782
|
+
retry_config = None
|
|
1783
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1784
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1785
|
+
|
|
1786
|
+
http_res = await self.do_request_async(
|
|
1787
|
+
hook_ctx=HookContext(
|
|
1788
|
+
config=self.sdk_configuration,
|
|
1789
|
+
base_url=base_url or "",
|
|
1790
|
+
operation_id="checkDomainStatus",
|
|
1791
|
+
oauth2_scopes=[],
|
|
1792
|
+
security_source=self.sdk_configuration.security,
|
|
1793
|
+
),
|
|
1794
|
+
request=req,
|
|
1795
|
+
error_status_codes=[
|
|
1796
|
+
"400",
|
|
1797
|
+
"401",
|
|
1798
|
+
"403",
|
|
1799
|
+
"404",
|
|
1800
|
+
"409",
|
|
1801
|
+
"410",
|
|
1802
|
+
"422",
|
|
1803
|
+
"429",
|
|
1804
|
+
"4XX",
|
|
1805
|
+
"500",
|
|
1806
|
+
"5XX",
|
|
1807
|
+
],
|
|
1808
|
+
retry_config=retry_config,
|
|
1809
|
+
)
|
|
1810
|
+
|
|
1811
|
+
response_data: Any = None
|
|
1812
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1813
|
+
return utils.unmarshal_json(
|
|
1814
|
+
http_res.text, Optional[List[operations.CheckDomainStatusResponseBody]]
|
|
1815
|
+
)
|
|
1816
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
1817
|
+
response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
|
|
1818
|
+
raise errors.BadRequest(data=response_data)
|
|
1819
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
1820
|
+
response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
|
|
1821
|
+
raise errors.Unauthorized(data=response_data)
|
|
1822
|
+
if utils.match_response(http_res, "403", "application/json"):
|
|
1823
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
|
|
1824
|
+
raise errors.Forbidden(data=response_data)
|
|
1825
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
1826
|
+
response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
|
|
1827
|
+
raise errors.NotFound(data=response_data)
|
|
1828
|
+
if utils.match_response(http_res, "409", "application/json"):
|
|
1829
|
+
response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
|
|
1830
|
+
raise errors.Conflict(data=response_data)
|
|
1831
|
+
if utils.match_response(http_res, "410", "application/json"):
|
|
1832
|
+
response_data = utils.unmarshal_json(
|
|
1833
|
+
http_res.text, errors.InviteExpiredData
|
|
1834
|
+
)
|
|
1835
|
+
raise errors.InviteExpired(data=response_data)
|
|
1836
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
1837
|
+
response_data = utils.unmarshal_json(
|
|
1838
|
+
http_res.text, errors.UnprocessableEntityData
|
|
1839
|
+
)
|
|
1840
|
+
raise errors.UnprocessableEntity(data=response_data)
|
|
1841
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
1842
|
+
response_data = utils.unmarshal_json(
|
|
1843
|
+
http_res.text, errors.RateLimitExceededData
|
|
1844
|
+
)
|
|
1845
|
+
raise errors.RateLimitExceeded(data=response_data)
|
|
1846
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1847
|
+
response_data = utils.unmarshal_json(
|
|
1848
|
+
http_res.text, errors.InternalServerErrorData
|
|
1849
|
+
)
|
|
1850
|
+
raise errors.InternalServerError(data=response_data)
|
|
1851
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1852
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1853
|
+
raise errors.SDKError(
|
|
1854
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1855
|
+
)
|
|
1856
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1857
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1858
|
+
raise errors.SDKError(
|
|
1859
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1860
|
+
)
|
|
1861
|
+
|
|
1862
|
+
content_type = http_res.headers.get("Content-Type")
|
|
1863
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1864
|
+
raise errors.SDKError(
|
|
1865
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1866
|
+
http_res.status_code,
|
|
1867
|
+
http_res_text,
|
|
1868
|
+
http_res,
|
|
1869
|
+
)
|