Skip to content

Commit c7d06ca

Browse files
authored
Merge pull request #61 from clerk/speakeasy-sdk-regen-1732580417
chore: 🐝 Update SDK - Generate 1.4.0
2 parents 8027ad1 + 3fc47a8 commit c7d06ca

File tree

90 files changed

+1877
-1943
lines changed

Some content is hidden

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

90 files changed

+1877
-1943
lines changed

.speakeasy/gen.lock

Lines changed: 10 additions & 10 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
@@ -13,7 +13,7 @@ generation:
1313
oAuth2ClientCredentialsEnabled: true
1414
oAuth2PasswordEnabled: false
1515
python:
16-
version: 1.3.1
16+
version: 1.4.0
1717
additionalDependencies:
1818
dev:
1919
pytest: ^8.3.3

.speakeasy/workflow.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
speakeasyVersion: 1.438.0
1+
speakeasyVersion: 1.448.0
22
sources:
33
clerk-openapi:
44
sourceNamespace: clerk-openapi
5-
sourceRevisionDigest: sha256:e89d3d42646d1804adab2c71e3590848a232acd0a6e18e1bddbdacbbebd22c57
6-
sourceBlobDigest: sha256:44d33d8984dd639bbff908aee705242bc26fc9fcd380c4b3f355f419767172b2
5+
sourceRevisionDigest: sha256:c28f47287a7b4933285aff49a199931d37e8e7e8ce75e88468140f95f284e331
6+
sourceBlobDigest: sha256:d20d10387a61e374eef4ee2b380b1e3798c4d43a1fa1d085fe3782672234d708
77
tags:
88
- latest
9-
- main
9+
- speakeasy-sdk-regen-1732580417
10+
- v1
1011
targets:
1112
clerk-sdk-python:
1213
source: clerk-openapi
1314
sourceNamespace: clerk-openapi
14-
sourceRevisionDigest: sha256:e89d3d42646d1804adab2c71e3590848a232acd0a6e18e1bddbdacbbebd22c57
15-
sourceBlobDigest: sha256:44d33d8984dd639bbff908aee705242bc26fc9fcd380c4b3f355f419767172b2
16-
codeSamplesNamespace: clerk-openapi-code-samples
17-
codeSamplesRevisionDigest: sha256:451997437b6cb4252f6235d61551d71e090c734b87e291437dcb200d975e8b2d
15+
sourceRevisionDigest: sha256:c28f47287a7b4933285aff49a199931d37e8e7e8ce75e88468140f95f284e331
16+
sourceBlobDigest: sha256:d20d10387a61e374eef4ee2b380b1e3798c4d43a1fa1d085fe3782672234d708
17+
codeSamplesNamespace: clerk-openapi-python-code-samples
18+
codeSamplesRevisionDigest: sha256:dbd857b062cde8a584b23d94a7d5f2187513871d02a8e8b16c0d114dcfab9c61
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest
@@ -38,5 +39,5 @@ workflow:
3839
token: $pypi_token
3940
codeSamples:
4041
registry:
41-
location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi-code-samples
42+
location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi-python-code-samples
4243
blocking: false

.speakeasy/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ targets:
2020
token: $pypi_token
2121
codeSamples:
2222
registry:
23-
location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi-code-samples
23+
location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi-python-code-samples
2424
blocking: false

README.md

Lines changed: 57 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
8888
# Synchronous Example
8989
from clerk_backend_api import Clerk
9090

91-
s = Clerk(
91+
with Clerk(
9292
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
93-
)
93+
) as s:
94+
res = s.email_addresses.get(email_address_id="email_address_id_example")
9495

95-
res = s.email_addresses.get(email_address_id="email_address_id_example")
96-
97-
if res is not None:
98-
# handle response
99-
pass
96+
if res is not None:
97+
# handle response
98+
pass
10099
```
101100

102101
</br>
@@ -108,13 +107,14 @@ import asyncio
108107
from clerk_backend_api import Clerk
109108

110109
async def main():
111-
s = Clerk(
110+
async with Clerk(
112111
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
113-
)
114-
res = await s.email_addresses.get_async(email_address_id="email_address_id_example")
115-
if res is not None:
116-
# handle response
117-
pass
112+
) as s:
113+
res = await s.email_addresses.get_async(email_address_id="email_address_id_example")
114+
115+
if res is not None:
116+
# handle response
117+
pass
118118

119119
asyncio.run(main())
120120
```
@@ -365,19 +365,18 @@ Certain SDK methods accept file objects as part of a request body or multi-part
365365
```python
366366
from clerk_backend_api import Clerk
367367

368-
s = Clerk(
368+
with Clerk(
369369
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
370-
)
371-
372-
res = s.users.set_profile_image(user_id="usr_test123", file={
373-
"file_name": "example.file",
374-
"content": open("example.file", "rb"),
375-
"content_type": "<value>",
376-
})
370+
) as s:
371+
res = s.users.set_profile_image(user_id="usr_test123", file={
372+
"file_name": "example.file",
373+
"content": open("example.file", "rb"),
374+
"content_type": "<value>",
375+
})
377376

378-
if res is not None:
379-
# handle response
380-
pass
377+
if res is not None:
378+
# handle response
379+
pass
381380

382381
```
383382
<!-- End File uploads [file-upload] -->
@@ -392,12 +391,11 @@ To change the default retry strategy for a single API call, simply provide a `Re
392391
from clerk.utils import BackoffStrategy, RetryConfig
393392
from clerk_backend_api import Clerk
394393

395-
s = Clerk()
396-
397-
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d",
398-
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
394+
with Clerk() as s:
395+
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d",
396+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
399397

400-
# Use the SDK ...
398+
# Use the SDK ...
401399

402400
```
403401

@@ -406,13 +404,12 @@ If you'd like to override the default retry strategy for all operations that sup
406404
from clerk.utils import BackoffStrategy, RetryConfig
407405
from clerk_backend_api import Clerk
408406

409-
s = Clerk(
407+
with Clerk(
410408
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
411-
)
412-
413-
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
409+
) as s:
410+
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
414411

415-
# Use the SDK ...
412+
# Use the SDK ...
416413

417414
```
418415
<!-- End Retries [retries] -->
@@ -443,26 +440,25 @@ When custom error responses are specified for an operation, the SDK may also rai
443440
```python
444441
from clerk_backend_api import Clerk, models
445442

446-
s = Clerk(
443+
with Clerk(
447444
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
448-
)
449-
450-
res = None
451-
try:
452-
res = s.clients.verify(request={
453-
"token": "jwt_token_example",
454-
})
455-
456-
if res is not None:
457-
# handle response
458-
pass
459-
460-
except models.ClerkErrors as e:
461-
# handle e.data: models.ClerkErrorsData
462-
raise(e)
463-
except models.SDKError as e:
464-
# handle exception
465-
raise(e)
445+
) as s:
446+
res = None
447+
try:
448+
res = s.clients.verify(request={
449+
"token": "jwt_token_example",
450+
})
451+
452+
if res is not None:
453+
# handle response
454+
pass
455+
456+
except models.ClerkErrors as e:
457+
# handle e.data: models.ClerkErrorsData
458+
raise(e)
459+
except models.SDKError as e:
460+
# handle exception
461+
raise(e)
466462
```
467463
<!-- End Error Handling [errors] -->
468464

@@ -475,13 +471,12 @@ The default server can also be overridden globally by passing a URL to the `serv
475471
```python
476472
from clerk_backend_api import Clerk
477473

478-
s = Clerk(
474+
with Clerk(
479475
server_url="https://api.clerk.com/v1",
480-
)
481-
482-
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
476+
) as s:
477+
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
483478

484-
# Use the SDK ...
479+
# Use the SDK ...
485480

486481
```
487482
<!-- End Server Selection [server] -->
@@ -582,13 +577,12 @@ To authenticate with the API the `bearer_auth` parameter must be set when initia
582577
```python
583578
from clerk_backend_api import Clerk
584579

585-
s = Clerk(
580+
with Clerk(
586581
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
587-
)
588-
589-
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
582+
) as s:
583+
s.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")
590584

591-
# Use the SDK ...
585+
# Use the SDK ...
592586

593587
```
594588
<!-- End Authentication [security] -->

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,14 @@ Based on:
188188
### Generated
189189
- [python v1.3.1] .
190190
### Releases
191-
- [PyPI v1.3.1] https://pypi.org/project/clerk-backend-api/1.3.1 - .
191+
- [PyPI v1.3.1] https://pypi.org/project/clerk-backend-api/1.3.1 - .
192+
193+
## 2024-11-27 14:15:09
194+
### Changes
195+
Based on:
196+
- OpenAPI Doc
197+
- Speakeasy CLI 1.448.0 (2.466.0) https://github.com/speakeasy-api/speakeasy
198+
### Generated
199+
- [python v1.4.0] .
200+
### Releases
201+
- [PyPI v1.4.0] https://pypi.org/project/clerk-backend-api/1.4.0 - .

USAGE.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
# Synchronous Example
44
from clerk_backend_api import Clerk
55

6-
s = Clerk(
6+
with Clerk(
77
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
8-
)
8+
) as s:
9+
res = s.email_addresses.get(email_address_id="email_address_id_example")
910

10-
res = s.email_addresses.get(email_address_id="email_address_id_example")
11-
12-
if res is not None:
13-
# handle response
14-
pass
11+
if res is not None:
12+
# handle response
13+
pass
1514
```
1615

1716
</br>
@@ -23,13 +22,14 @@ import asyncio
2322
from clerk_backend_api import Clerk
2423

2524
async def main():
26-
s = Clerk(
25+
async with Clerk(
2726
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
28-
)
29-
res = await s.email_addresses.get_async(email_address_id="email_address_id_example")
30-
if res is not None:
31-
# handle response
32-
pass
27+
) as s:
28+
res = await s.email_addresses.get_async(email_address_id="email_address_id_example")
29+
30+
if res is not None:
31+
# handle response
32+
pass
3333

3434
asyncio.run(main())
3535
```

docs/models/ticketverificationstrategy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55

66
| Name | Value |
77
| -------- | -------- |
8-
| `TICKET` | ticket |
8+
| `TICKET` | ticket |
9+
| `SAML` | saml |

docs/models/updateemailaddressrequest.md

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

44
## Fields
55

6-
| Field | Type | Required | Description | Example |
7-
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
8-
| `email_address_id` | *str* | :heavy_check_mark: | The ID of the email address to update | email_address_id_example |
9-
| `request_body` | [Optional[models.UpdateEmailAddressRequestBody]](../models/updateemailaddressrequestbody.md) | :heavy_minus_sign: | N/A | |
6+
| Field | Type | Required | Description | Example |
7+
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
8+
| `email_address_id` | *str* | :heavy_check_mark: | The ID of the email address to update | email_address_id_example |
9+
| `request_body` | [models.UpdateEmailAddressRequestBody](../models/updateemailaddressrequestbody.md) | :heavy_check_mark: | N/A | |

docs/models/updatejwttemplaterequest.md

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

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
8-
| `template_id` | *str* | :heavy_check_mark: | The ID of the JWT template to update |
9-
| `request_body` | [Optional[models.UpdateJWTTemplateRequestBody]](../models/updatejwttemplaterequestbody.md) | :heavy_minus_sign: | N/A |
6+
| Field | Type | Required | Description |
7+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
8+
| `template_id` | *str* | :heavy_check_mark: | The ID of the JWT template to update |
9+
| `request_body` | [models.UpdateJWTTemplateRequestBody](../models/updatejwttemplaterequestbody.md) | :heavy_check_mark: | N/A |

0 commit comments

Comments
 (0)