Skip to content

Commit 08831fc

Browse files
authored
Merge pull request #163 from clerk/speakeasy-sdk-regen-1753316666
chore: 🐝 Update SDK - Generate 3.1.1
2 parents 11b041b + 3938d2e commit 08831fc

File tree

272 files changed

+11093
-1537
lines changed

Some content is hidden

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

272 files changed

+11093
-1537
lines changed

.speakeasy/gen.lock

Lines changed: 435 additions & 91 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ generation:
1717
oAuth2ClientCredentialsEnabled: true
1818
oAuth2PasswordEnabled: false
1919
python:
20-
version: 3.0.7
20+
version: 3.1.1
2121
additionalDependencies:
2222
dev:
2323
pytest: ^8.3.3

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ speakeasyVersion: 1.558.0
22
sources:
33
clerk-openapi:
44
sourceNamespace: clerk-openapi
5-
sourceRevisionDigest: sha256:5c7e5097d8e72fe09c1509fc7b8c2f3f1dac05a5a0fe9ef940aa706f1a4434c0
6-
sourceBlobDigest: sha256:bc3309ad52f591424626dd319c03a4bce0e5f16a311ace9f4bb339334c666f07
5+
sourceRevisionDigest: sha256:c64e5403e7f758e02ad77ea52bb2ff1fa3f891c65c120e602de3c34fcba59f9a
6+
sourceBlobDigest: sha256:abd75631c09f8ffb26cf357f9b223c79e5dad65ae12bfd68eaf76031177b4f86
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1753230252
10-
- "2025-03-12"
9+
- speakeasy-sdk-regen-1753316666
10+
- "2025-04-10"
1111
targets:
1212
clerk-sdk-python:
1313
source: clerk-openapi
1414
sourceNamespace: clerk-openapi
15-
sourceRevisionDigest: sha256:5c7e5097d8e72fe09c1509fc7b8c2f3f1dac05a5a0fe9ef940aa706f1a4434c0
16-
sourceBlobDigest: sha256:bc3309ad52f591424626dd319c03a4bce0e5f16a311ace9f4bb339334c666f07
15+
sourceRevisionDigest: sha256:c64e5403e7f758e02ad77ea52bb2ff1fa3f891c65c120e602de3c34fcba59f9a
16+
sourceBlobDigest: sha256:abd75631c09f8ffb26cf357f9b223c79e5dad65ae12bfd68eaf76031177b4f86
1717
codeSamplesNamespace: clerk-openapi-python-code-samples
18-
codeSamplesRevisionDigest: sha256:3677a85a856a29dfa3ae10c70df9f1cb342ee0cd11e57fe2ca5c22e78445137a
18+
codeSamplesRevisionDigest: sha256:c673faf9a96541f3c55228d60cf5c1ed0c94f427e3119bf5cdf694cfbdbdd31e
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest
2222
sources:
2323
clerk-openapi:
2424
inputs:
25-
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2025-03-12.yml
25+
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2025-04-10.yml
2626
overlays:
2727
- location: ./examples.yaml
2828
- location: ./fixes.yaml

README.md

Lines changed: 89 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend s
2222
### Versions
2323

2424
When the API changes in a way that isn't compatible with older versions, a new version is released.
25-
Each version is identified by its release date, e.g. `2025-03-12`. For more information, please see [Clerk API Versions](https://clerk.com/docs/versioning/available-versions).
25+
Each version is identified by its release date, e.g. `2025-04-10`. For more information, please see [Clerk API Versions](https://clerk.com/docs/versioning/available-versions).
2626

2727
Please see https://clerk.com/docs for more information.
2828

@@ -129,11 +129,16 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
129129
from clerk_backend_api import Clerk
130130

131131

132-
with Clerk() as clerk:
132+
with Clerk(
133+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
134+
) as clerk:
133135

134-
clerk.miscellaneous.get_public_interstitial(frontend_api_query_parameter1="pub_1a2b3c4d", publishable_key="<value>", proxy_url="https://fine-tarragon.info", domain="great-director.net", sign_in_url="https://likable-freckle.net/", use_domain_for_script=False)
136+
res = clerk.email_addresses.get(email_address_id="email_address_id_example")
135137

136-
# Use the SDK ...
138+
assert res is not None
139+
140+
# Handle response
141+
print(res)
137142
```
138143

139144
</br>
@@ -146,11 +151,16 @@ from clerk_backend_api import Clerk
146151

147152
async def main():
148153

149-
async with Clerk() as clerk:
154+
async with Clerk(
155+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
156+
) as clerk:
150157

151-
await clerk.miscellaneous.get_public_interstitial_async(frontend_api_query_parameter1="pub_1a2b3c4d", publishable_key="<value>", proxy_url="https://fine-tarragon.info", domain="great-director.net", sign_in_url="https://likable-freckle.net/", use_domain_for_script=False)
158+
res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example")
152159

153-
# Use the SDK ...
160+
assert res is not None
161+
162+
# Handle response
163+
print(res)
154164

155165
asyncio.run(main())
156166
```
@@ -180,6 +190,27 @@ with Clerk(
180190

181191
# Use the SDK ...
182192

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="[email protected]", first_name="Diana", last_name="Schmidt-Kutch")
208+
209+
assert res is not None
210+
211+
# Handle response
212+
print(res)
213+
183214
```
184215
<!-- End Authentication [security] -->
185216

@@ -246,6 +277,14 @@ def verify_machine_token(request: httpx.Request):
246277
* [create](docs/sdks/allowlistidentifiers/README.md#create) - Add identifier to the allow-list
247278
* [delete](docs/sdks/allowlistidentifiers/README.md#delete) - Delete identifier from allow-list
248279

280+
### [aws_credentials](docs/sdks/awscredentials/README.md)
281+
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
285+
* [delete](docs/sdks/awscredentials/README.md#delete) - Delete an AWS Credential
286+
* [update](docs/sdks/awscredentials/README.md#update) - Update an AWS Credential
287+
249288
### [beta_features](docs/sdks/betafeatures/README.md)
250289

251290
* [update_instance_settings](docs/sdks/betafeatures/README.md#update_instance_settings) - Update instance settings
@@ -321,10 +360,35 @@ def verify_machine_token(request: httpx.Request):
321360
* [update](docs/sdks/jwttemplates/README.md#update) - Update a JWT template
322361
* [delete](docs/sdks/jwttemplates/README.md#delete) - Delete a Template
323362

363+
### [machine_tokens](docs/sdks/machinetokens/README.md)
364+
365+
* [create](docs/sdks/machinetokens/README.md#create) - Create a machine token
366+
367+
### [machines](docs/sdks/machines/README.md)
368+
369+
* [list](docs/sdks/machines/README.md#list) - Get a list of machines for an instance
370+
* [create](docs/sdks/machines/README.md#create) - Create a machine
371+
* [get](docs/sdks/machines/README.md#get) - Retrieve a machine
372+
* [update](docs/sdks/machines/README.md#update) - Update a machine
373+
* [delete](docs/sdks/machines/README.md#delete) - Delete a machine
374+
* [get_secret_key](docs/sdks/machines/README.md#get_secret_key) - Retrieve a machine secret key
375+
* [create_scope](docs/sdks/machines/README.md#create_scope) - Create a machine scope
376+
* [delete_scope](docs/sdks/machines/README.md#delete_scope) - Delete a machine scope
377+
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+
324384
### [miscellaneous](docs/sdks/miscellaneous/README.md)
325385

326386
* [get_public_interstitial](docs/sdks/miscellaneous/README.md#get_public_interstitial) - Returns the markup for the interstitial page
327387

388+
### [oauth_access_tokens](docs/sdks/oauthaccesstokens/README.md)
389+
390+
* [verify](docs/sdks/oauthaccesstokens/README.md#verify) - Verify an OAuth Access Token
391+
328392
### [oauth_applications](docs/sdks/oauthapplicationssdk/README.md)
329393

330394
* [list](docs/sdks/oauthapplicationssdk/README.md#list) - Get a list of OAuth applications for an instance
@@ -340,6 +404,7 @@ def verify_machine_token(request: httpx.Request):
340404
* [list](docs/sdks/organizationdomainssdk/README.md#list) - Get a list of all domains of an organization.
341405
* [update](docs/sdks/organizationdomainssdk/README.md#update) - Update an organization domain.
342406
* [delete](docs/sdks/organizationdomainssdk/README.md#delete) - Remove a domain from an organization.
407+
* [list_all](docs/sdks/organizationdomainssdk/README.md#list_all) - List all organization domains
343408

344409
### [organization_invitations](docs/sdks/organizationinvitationssdk/README.md)
345410

@@ -403,7 +468,6 @@ def verify_machine_token(request: httpx.Request):
403468
* [get](docs/sdks/sessions/README.md#get) - Retrieve a session
404469
* [refresh](docs/sdks/sessions/README.md#refresh) - Refresh a session
405470
* [revoke](docs/sdks/sessions/README.md#revoke) - Revoke a session
406-
* [~~verify~~](docs/sdks/sessions/README.md#verify) - Verify a session :warning: **Deprecated**
407471
* [create_token](docs/sdks/sessions/README.md#create_token) - Create a session token
408472
* [create_token_from_template](docs/sdks/sessions/README.md#create_token_from_template) - Create a session token from a jwt template
409473

@@ -435,6 +499,8 @@ def verify_machine_token(request: httpx.Request):
435499
* [delete](docs/sdks/users/README.md#delete) - Delete a user
436500
* [ban](docs/sdks/users/README.md#ban) - Ban a user
437501
* [unban](docs/sdks/users/README.md#unban) - Unban a user
502+
* [bulk_ban](docs/sdks/users/README.md#bulk_ban) - Ban multiple users
503+
* [bulk_unban](docs/sdks/users/README.md#bulk_unban) - Unban multiple users
438504
* [lock](docs/sdks/users/README.md#lock) - Lock a user
439505
* [unlock](docs/sdks/users/README.md#unlock) - Unlock a user
440506
* [set_profile_image](docs/sdks/users/README.md#set_profile_image) - Set user profile image
@@ -549,12 +615,12 @@ By default, an API error will raise a models.SDKError exception, which has the f
549615
| `.raw_response` | *httpx.Response* | The raw HTTP response |
550616
| `.body` | *str* | The response content |
551617

552-
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 `verify_async` method may raise the following exceptions:
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:
553619

554-
| Error Type | Status Code | Content Type |
555-
| ------------------ | ------------- | ---------------- |
556-
| models.ClerkErrors | 400, 401, 404 | application/json |
557-
| models.SDKError | 4XX, 5XX | \*/\* |
620+
| Error Type | Status Code | Content Type |
621+
| ------------------ | ----------------------- | ---------------- |
622+
| models.ClerkErrors | 400, 401, 403, 404, 422 | application/json |
623+
| models.SDKError | 4XX, 5XX | \*/\* |
558624

559625
### Example
560626

@@ -568,8 +634,10 @@ with Clerk(
568634
res = None
569635
try:
570636

571-
res = clerk.clients.verify(request={
572-
"token": "jwt_token_example",
637+
res = clerk.aws_credentials.create(request={
638+
"access_key_id": "<id>",
639+
"secret_access_key": "<value>",
640+
"user_pool_ids": [],
573641
})
574642

575643
assert res is not None
@@ -699,14 +767,18 @@ The `Clerk` class implements the context manager protocol and registers a finali
699767
from clerk_backend_api import Clerk
700768
def main():
701769

702-
with Clerk() as clerk:
770+
with Clerk(
771+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
772+
) as clerk:
703773
# Rest of application here...
704774

705775

706776
# Or when using async:
707777
async def amain():
708778

709-
async with Clerk() as clerk:
779+
async with Clerk(
780+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
781+
) as clerk:
710782
# Rest of application here...
711783
```
712784
<!-- End Resource Management [resource-management] -->

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,14 @@ Based on:
368368
### Generated
369369
- [python v3.0.7] .
370370
### Releases
371-
- [PyPI v3.0.7] https://pypi.org/project/clerk-backend-api/3.0.7 - .
371+
- [PyPI v3.0.7] https://pypi.org/project/clerk-backend-api/3.0.7 - .
372+
373+
## 2025-07-25 17:56:51
374+
### Changes
375+
Based on:
376+
- OpenAPI Doc
377+
- Speakeasy CLI 1.558.0 (2.623.2) https://github.com/speakeasy-api/speakeasy
378+
### Generated
379+
- [python v3.1.1] .
380+
### Releases
381+
- [PyPI v3.1.1] https://pypi.org/project/clerk-backend-api/3.1.1 - .

USAGE.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
from clerk_backend_api import Clerk
55

66

7-
with Clerk() as clerk:
7+
with Clerk(
8+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
9+
) as clerk:
810

9-
clerk.miscellaneous.get_public_interstitial(frontend_api_query_parameter1="pub_1a2b3c4d", publishable_key="<value>", proxy_url="https://fine-tarragon.info", domain="great-director.net", sign_in_url="https://likable-freckle.net/", use_domain_for_script=False)
11+
res = clerk.email_addresses.get(email_address_id="email_address_id_example")
1012

11-
# Use the SDK ...
13+
assert res is not None
14+
15+
# Handle response
16+
print(res)
1217
```
1318

1419
</br>
@@ -21,11 +26,16 @@ from clerk_backend_api import Clerk
2126

2227
async def main():
2328

24-
async with Clerk() as clerk:
29+
async with Clerk(
30+
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
31+
) as clerk:
32+
33+
res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example")
2534

26-
await clerk.miscellaneous.get_public_interstitial_async(frontend_api_query_parameter1="pub_1a2b3c4d", publishable_key="<value>", proxy_url="https://fine-tarragon.info", domain="great-director.net", sign_in_url="https://likable-freckle.net/", use_domain_for_script=False)
35+
assert res is not None
2736

28-
# Use the SDK ...
37+
# Handle response
38+
print(res)
2939

3040
asyncio.run(main())
3141
```

docs/models/admin.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description | Example |
7-
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
8-
| `status` | [models.AdminVerificationStatus](../models/adminverificationstatus.md) | :heavy_check_mark: | N/A | verified |
9-
| `strategy` | [models.VerificationStrategy](../models/verificationstrategy.md) | :heavy_check_mark: | N/A | admin |
10-
| `attempts` | *Nullable[int]* | :heavy_check_mark: | N/A | 0 |
11-
| `expire_at` | *Nullable[int]* | :heavy_check_mark: | N/A | 1620000000 |
12-
| `verified_at_client` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
6+
| Field | Type | Required | Description |
7+
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
8+
| `object` | [Optional[models.VerificationAdminVerificationObject]](../models/verificationadminverificationobject.md) | :heavy_minus_sign: | N/A |
9+
| `status` | [models.VerificationAdminVerificationStatus](../models/verificationadminverificationstatus.md) | :heavy_check_mark: | N/A |
10+
| `strategy` | [models.VerificationStrategy](../models/verificationstrategy.md) | :heavy_check_mark: | N/A |
11+
| `attempts` | *Nullable[int]* | :heavy_check_mark: | N/A |
12+
| `expire_at` | *Nullable[int]* | :heavy_check_mark: | N/A |
13+
| `verified_at_client` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |

0 commit comments

Comments
 (0)