Skip to content

Commit 41b1134

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.601.0
1 parent aad201d commit 41b1134

File tree

146 files changed

+3040
-7984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3040
-7984
lines changed

.speakeasy/gen.lock

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

.speakeasy/gen.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ generation:
1616
auth:
1717
oAuth2ClientCredentialsEnabled: true
1818
oAuth2PasswordEnabled: false
19+
tests:
20+
generateTests: true
21+
generateNewTests: false
22+
skipResponseBodyAssertions: false
1923
python:
20-
version: 3.1.11
24+
version: 3.2.0
2125
additionalDependencies:
2226
dev:
2327
pytest: ^8.3.3
@@ -27,7 +31,7 @@ python:
2731
author: Clerk
2832
authors:
2933
- Clerk
30-
baseErrorName: ClerkError
34+
baseErrorName: ClerkBaseError
3135
clientServerStatusCodesAsErrors: true
3236
defaultErrorName: SDKError
3337
description: Python Client SDK for clerk.dev
@@ -51,6 +55,7 @@ python:
5155
methodArguments: infer-optional-args
5256
moduleName: ""
5357
outputModelSuffix: output
58+
packageManager: poetry
5459
packageName: clerk-backend-api
5560
pytestFilterWarnings: []
5661
pytestTimeout: 0

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.558.0
1+
speakeasyVersion: 1.601.0
22
sources:
33
clerk-openapi:
44
sourceNamespace: clerk-openapi
5-
sourceRevisionDigest: sha256:963bc6106095281c3bec686e2a7a1e912a9a02259009ef8dfcbf12bdedcd2a28
6-
sourceBlobDigest: sha256:abd75631c09f8ffb26cf357f9b223c79e5dad65ae12bfd68eaf76031177b4f86
5+
sourceRevisionDigest: sha256:f66a9218442dca8d1de2ee424c0a746d702f6651e844a41fc55a86b2bbe77f8f
6+
sourceBlobDigest: sha256:c1bc1108432caeb6a8b1f3a37e5a8ec1928896a89509d35673c90dd12eed865f
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1753881156
9+
- speakeasy-sdk-regen-1753921443
1010
- "2025-04-10"
1111
targets:
1212
clerk-sdk-python:
1313
source: clerk-openapi
1414
sourceNamespace: clerk-openapi
15-
sourceRevisionDigest: sha256:963bc6106095281c3bec686e2a7a1e912a9a02259009ef8dfcbf12bdedcd2a28
16-
sourceBlobDigest: sha256:abd75631c09f8ffb26cf357f9b223c79e5dad65ae12bfd68eaf76031177b4f86
15+
sourceRevisionDigest: sha256:f66a9218442dca8d1de2ee424c0a746d702f6651e844a41fc55a86b2bbe77f8f
16+
sourceBlobDigest: sha256:c1bc1108432caeb6a8b1f3a37e5a8ec1928896a89509d35673c90dd12eed865f
1717
codeSamplesNamespace: clerk-openapi-python-code-samples
18-
codeSamplesRevisionDigest: sha256:2e7552c02fbf9f697e9f86142457abc5fb8cfbce9c1a8ffa3a2edf3030c9058c
18+
codeSamplesRevisionDigest: sha256:1697c45cd473bfeec9c9af8cef9df5aa33496bce278cdf7e73d843f78caaf80b
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 62 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ More information about the API can be found at https://clerk.com/docs
5959
>
6060
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
6161
62-
The SDK can be installed with either *pip* or *poetry* package managers.
62+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
63+
64+
### uv
65+
66+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
67+
68+
```bash
69+
uv add clerk-backend-api
70+
```
6371

6472
### PIP
6573

@@ -143,7 +151,7 @@ with Clerk(
143151

144152
</br>
145153

146-
The same SDK client can also be used to make asychronous requests by importing asyncio.
154+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
147155
```python
148156
# Asynchronous Example
149157
import asyncio
@@ -190,27 +198,6 @@ with Clerk(
190198

191199
# Use the SDK ...
192200

193-
```
194-
195-
### Per-Operation Security Schemes
196-
197-
Some operations in this SDK require the security scheme to be specified at the request level. For example:
198-
```python
199-
import clerk_backend_api
200-
from clerk_backend_api import Clerk
201-
202-
203-
with Clerk() as clerk:
204-
205-
res = clerk.management.upsert_user(security=clerk_backend_api.ManagementUpsertUserSecurity(
206-
management_token="<YOUR_BEARER_TOKEN_HERE>",
207-
), email_address="Roger_OReilly-Dibbert10@hotmail.com", first_name="Diana", last_name="Schmidt-Kutch")
208-
209-
assert res is not None
210-
211-
# Handle response
212-
print(res)
213-
214201
```
215202
<!-- End Authentication [security] -->
216203

@@ -279,9 +266,6 @@ def verify_machine_token(request: httpx.Request):
279266

280267
### [aws_credentials](docs/sdks/awscredentials/README.md)
281268

282-
* [list](docs/sdks/awscredentials/README.md#list) - List all AWS Credentials
283-
* [create](docs/sdks/awscredentials/README.md#create) - Create an AWS Credential
284-
* [get](docs/sdks/awscredentials/README.md#get) - Retrieve an AWS Credential
285269
* [delete](docs/sdks/awscredentials/README.md#delete) - Delete an AWS Credential
286270
* [update](docs/sdks/awscredentials/README.md#update) - Update an AWS Credential
287271

@@ -303,6 +287,10 @@ def verify_machine_token(request: httpx.Request):
303287
* [verify](docs/sdks/clients/README.md#verify) - Verify a client
304288
* [get](docs/sdks/clients/README.md#get) - Get a client
305289

290+
### [commerce](docs/sdks/commerce/README.md)
291+
292+
* [list_plans](docs/sdks/commerce/README.md#list_plans) - List all commerce plans
293+
306294
### [domains](docs/sdks/domainssdk/README.md)
307295

308296
* [list](docs/sdks/domainssdk/README.md#list) - List all instance domains
@@ -360,10 +348,6 @@ def verify_machine_token(request: httpx.Request):
360348
* [update](docs/sdks/jwttemplates/README.md#update) - Update a JWT template
361349
* [delete](docs/sdks/jwttemplates/README.md#delete) - Delete a Template
362350

363-
### [machine_tokens](docs/sdks/machinetokens/README.md)
364-
365-
* [create](docs/sdks/machinetokens/README.md#create) - Create a machine token
366-
367351
### [machines](docs/sdks/machines/README.md)
368352

369353
* [list](docs/sdks/machines/README.md#list) - Get a list of machines for an instance
@@ -375,12 +359,6 @@ def verify_machine_token(request: httpx.Request):
375359
* [create_scope](docs/sdks/machines/README.md#create_scope) - Create a machine scope
376360
* [delete_scope](docs/sdks/machines/README.md#delete_scope) - Delete a machine scope
377361

378-
### [management](docs/sdks/management/README.md)
379-
380-
* [upsert_user](docs/sdks/management/README.md#upsert_user) - Upsert a user
381-
* [create_organization](docs/sdks/management/README.md#create_organization) - Create an organization
382-
* [create_application](docs/sdks/management/README.md#create_application) - Create an application (instance)
383-
384362
### [miscellaneous](docs/sdks/miscellaneous/README.md)
385363

386364
* [get_public_interstitial](docs/sdks/miscellaneous/README.md#get_public_interstitial) - Returns the markup for the interstitial page
@@ -604,27 +582,20 @@ with Clerk(
604582
<!-- Start Error Handling [errors] -->
605583
## Error Handling
606584

607-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
608-
609-
By default, an API error will raise a models.SDKError exception, which has the following properties:
585+
[`ClerkBaseError`](./src/clerk_backend_api/models/clerkbaseerror.py) is the base class for all HTTP error responses. It has the following properties:
610586

611-
| Property | Type | Description |
612-
|-----------------|------------------|-----------------------|
613-
| `.status_code` | *int* | The HTTP status code |
614-
| `.message` | *str* | The error message |
615-
| `.raw_response` | *httpx.Response* | The raw HTTP response |
616-
| `.body` | *str* | The response content |
617-
618-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:
619-
620-
| Error Type | Status Code | Content Type |
621-
| ------------------ | ----------------------- | ---------------- |
622-
| models.ClerkErrors | 400, 401, 403, 404, 422 | application/json |
623-
| models.SDKError | 4XX, 5XX | \*/\* |
587+
| Property | Type | Description |
588+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
589+
| `err.message` | `str` | Error message |
590+
| `err.status_code` | `int` | HTTP response status code eg `404` |
591+
| `err.headers` | `httpx.Headers` | HTTP response headers |
592+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
593+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
594+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
624595

625596
### Example
626-
627597
```python
598+
import clerk_backend_api
628599
from clerk_backend_api import Clerk, models
629600

630601

@@ -634,24 +605,51 @@ with Clerk(
634605
res = None
635606
try:
636607

637-
res = clerk.aws_credentials.create(request={
638-
"access_key_id": "<id>",
639-
"secret_access_key": "<value>",
640-
"user_pool_ids": [],
641-
})
608+
res = clerk.aws_credentials.delete(id="<id>")
642609

643610
assert res is not None
644611

645612
# Handle response
646613
print(res)
647614

648-
except models.ClerkErrors as e:
649-
# handle e.data: models.ClerkErrorsData
650-
raise(e)
651-
except models.SDKError as e:
652-
# handle exception
653-
raise(e)
615+
616+
except models.ClerkBaseError as e:
617+
# The base class for HTTP error responses
618+
print(e.message)
619+
print(e.status_code)
620+
print(e.body)
621+
print(e.headers)
622+
print(e.raw_response)
623+
624+
# Depending on the method different errors may be thrown
625+
if isinstance(e, models.ClerkErrors):
626+
print(e.data.errors) # List[clerk_backend_api.ClerkError]
627+
print(e.data.meta) # Optional[clerk_backend_api.ClerkErrorsMeta]
654628
```
629+
630+
### Error Classes
631+
**Primary errors:**
632+
* [`ClerkBaseError`](./src/clerk_backend_api/models/clerkbaseerror.py): The base class for HTTP error responses.
633+
* [`ClerkErrors`](./src/clerk_backend_api/models/clerkerrors.py): Request was not successful. *
634+
635+
<details><summary>Less common errors (7)</summary>
636+
637+
<br />
638+
639+
**Network errors:**
640+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
641+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
642+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
643+
644+
645+
**Inherit from [`ClerkBaseError`](./src/clerk_backend_api/models/clerkbaseerror.py)**:
646+
* [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 146 methods.*
647+
* [`VerifyOAuthAccessTokenOauthAccessTokensResponseResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 146 methods.*
648+
* [`ResponseValidationError`](./src/clerk_backend_api/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
649+
650+
</details>
651+
652+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
655653
<!-- End Error Handling [errors] -->
656654

657655
<!-- Start Server Selection [server] -->

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,14 @@ Based on:
428428
### Generated
429429
- [python v3.1.11] .
430430
### Releases
431-
- [PyPI v3.1.11] https://pypi.org/project/clerk-backend-api/3.1.11 - .
431+
- [PyPI v3.1.11] https://pypi.org/project/clerk-backend-api/3.1.11 - .
432+
433+
## 2025-08-12 00:22:45
434+
### Changes
435+
Based on:
436+
- OpenAPI Doc
437+
- Speakeasy CLI 1.601.0 (2.680.0) https://github.com/speakeasy-api/speakeasy
438+
### Generated
439+
- [python v3.2.0] .
440+
### Releases
441+
- [PyPI v3.2.0] https://pypi.org/project/clerk-backend-api/3.2.0 - .

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ with Clerk(
1818

1919
</br>
2020

21-
The same SDK client can also be used to make asychronous requests by importing asyncio.
21+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
2222
```python
2323
# Asynchronous Example
2424
import asyncio
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CommerceMoneyResponse
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
8+
| `amount` | *int* | :heavy_check_mark: | The amount in cents. |
9+
| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). |
10+
| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). |
11+
| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). |

0 commit comments

Comments
 (0)