Skip to content

Commit 9f23848

Browse files
authored
Merge pull request #454 from hookdeck/speakeasy-sdk-regen-1753978509
chore: 🐝 Update SDK - Generate OUTPOST-PYTHON 0.3.0
2 parents 589eefd + 31f97b5 commit 9f23848

Some content is hidden

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

59 files changed

+3073
-2932
lines changed

.speakeasy/workflow.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sources:
66
sourceBlobDigest: sha256:3b1cd63370e0cf368a2049eaa26c9f94cd94a929de42592f8488adb5a6a3f182
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1753978184
9+
- speakeasy-sdk-regen-1753978509
1010
- 0.0.1
1111
targets:
1212
outpost-go:
@@ -19,10 +19,10 @@ targets:
1919
outpost-python:
2020
source: Outpost API
2121
sourceNamespace: outpost-api
22-
sourceRevisionDigest: sha256:047e65379e25b7a1c0ac341f9173042f4704658590dd689b41085d3f3777fbcf
23-
sourceBlobDigest: sha256:6b2da637ba05af9973197a916e59dedc050a6ea79d39d6be15166bf3ee049bed
22+
sourceRevisionDigest: sha256:837897b6e2774d7ba547d9616639367bfce651d53d84190c3ee0cd32cee7e8b1
23+
sourceBlobDigest: sha256:3b1cd63370e0cf368a2049eaa26c9f94cd94a929de42592f8488adb5a6a3f182
2424
codeSamplesNamespace: outpost-api-python-code-samples
25-
codeSamplesRevisionDigest: sha256:9335d969f40d76fbb4be74c0e614cd97d8d5fac6739009b877f612b648ff8777
25+
codeSamplesRevisionDigest: sha256:c28bb1c6bd595fb3b1353dc6cdc672fa0f11c518f0bf85dcc12c5c02ad35fcc3
2626
outpost-ts:
2727
source: Outpost API
2828
sourceNamespace: outpost-api

sdks/outpost-python/.speakeasy/gen.lock

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: da774284-22d9-4b6c-bb26-1c3fc9f2c7ee
33
management:
4-
docChecksum: 9d08f718ce55c534f292ba05af3425db
4+
docChecksum: 3d3f028a2fdd56804d9ae8a2d95a414b
55
docVersion: 0.0.1
6-
speakeasyVersion: 1.548.1
7-
generationVersion: 2.605.0
8-
releaseVersion: 0.2.0
9-
configChecksum: 69ffbd3cdb2c5ff26968adc0dac0491c
6+
speakeasyVersion: 1.594.0
7+
generationVersion: 2.670.1
8+
releaseVersion: 0.3.0
9+
configChecksum: 3b13091ed8addea8fde7b0db3bd41f0b
1010
repoURL: https://github.com/hookdeck/outpost.git
1111
repoSubDirectory: sdks/outpost-python
1212
installationURL: https://github.com/hookdeck/outpost.git#subdirectory=sdks/outpost-python
@@ -15,7 +15,7 @@ features:
1515
python:
1616
additionalDependencies: 1.0.0
1717
additionalProperties: 1.0.1
18-
core: 5.18.1
18+
core: 5.19.5
1919
defaultEnabledRetries: 0.2.0
2020
enumUnions: 0.1.0
2121
envVarSecurityUsage: 0.3.2
@@ -30,11 +30,10 @@ features:
3030
nullables: 1.0.1
3131
responseFormat: 1.0.1
3232
retries: 3.0.2
33-
sdkHooks: 1.0.1
33+
sdkHooks: 1.1.0
3434
unions: 3.0.4
3535
generatedFiles:
3636
- .gitattributes
37-
- .python-version
3837
- .vscode/settings.json
3938
- USAGE.md
4039
- docs/errors/badrequesterror.md
@@ -47,6 +46,8 @@ generatedFiles:
4746
- docs/models/awskinesiscredentials.md
4847
- docs/models/awssqsconfig.md
4948
- docs/models/awssqscredentials.md
49+
- docs/models/azureservicebusconfig.md
50+
- docs/models/azureservicebuscredentials.md
5051
- docs/models/createtenantdestinationglobals.md
5152
- docs/models/createtenantdestinationrequest.md
5253
- docs/models/deletetenantdestinationglobals.md
@@ -59,11 +60,15 @@ generatedFiles:
5960
- docs/models/destinationawskinesistype.md
6061
- docs/models/destinationawssqs.md
6162
- docs/models/destinationawssqstype.md
63+
- docs/models/destinationazureservicebus.md
64+
- docs/models/destinationazureservicebustype.md
6265
- docs/models/destinationcreate.md
6366
- docs/models/destinationcreateawskinesis.md
6467
- docs/models/destinationcreateawskinesistype.md
6568
- docs/models/destinationcreateawssqs.md
6669
- docs/models/destinationcreateawssqstype.md
70+
- docs/models/destinationcreateazureservicebus.md
71+
- docs/models/destinationcreateazureservicebustype.md
6772
- docs/models/destinationcreatehookdeck.md
6873
- docs/models/destinationcreatehookdecktype.md
6974
- docs/models/destinationcreaterabbitmq.md
@@ -129,6 +134,7 @@ generatedFiles:
129134
- docs/models/listtenanttopicsrequest.md
130135
- docs/models/portalredirect.md
131136
- docs/models/publishrequest.md
137+
- docs/models/publishresponse.md
132138
- docs/models/rabbitmqconfig.md
133139
- docs/models/rabbitmqcredentials.md
134140
- docs/models/retrytenanteventglobals.md
@@ -177,8 +183,11 @@ generatedFiles:
177183
- src/outpost_sdk/errors/apierror.py
178184
- src/outpost_sdk/errors/badrequest_error.py
179185
- src/outpost_sdk/errors/internalservererror.py
186+
- src/outpost_sdk/errors/no_response_error.py
180187
- src/outpost_sdk/errors/notfound_error.py
188+
- src/outpost_sdk/errors/outposterror.py
181189
- src/outpost_sdk/errors/ratelimited_error.py
190+
- src/outpost_sdk/errors/responsevalidationerror.py
182191
- src/outpost_sdk/errors/timeout_error.py
183192
- src/outpost_sdk/errors/unauthorized_error.py
184193
- src/outpost_sdk/events.py
@@ -189,16 +198,20 @@ generatedFiles:
189198
- src/outpost_sdk/models/awskinesiscredentials.py
190199
- src/outpost_sdk/models/awssqsconfig.py
191200
- src/outpost_sdk/models/awssqscredentials.py
201+
- src/outpost_sdk/models/azureservicebusconfig.py
202+
- src/outpost_sdk/models/azureservicebuscredentials.py
192203
- src/outpost_sdk/models/createtenantdestinationop.py
193204
- src/outpost_sdk/models/deletetenantdestinationop.py
194205
- src/outpost_sdk/models/deletetenantop.py
195206
- src/outpost_sdk/models/deliveryattempt.py
196207
- src/outpost_sdk/models/destination.py
197208
- src/outpost_sdk/models/destinationawskinesis.py
198209
- src/outpost_sdk/models/destinationawssqs.py
210+
- src/outpost_sdk/models/destinationazureservicebus.py
199211
- src/outpost_sdk/models/destinationcreate.py
200212
- src/outpost_sdk/models/destinationcreateawskinesis.py
201213
- src/outpost_sdk/models/destinationcreateawssqs.py
214+
- src/outpost_sdk/models/destinationcreateazureservicebus.py
202215
- src/outpost_sdk/models/destinationcreatehookdeck.py
203216
- src/outpost_sdk/models/destinationcreaterabbitmq.py
204217
- src/outpost_sdk/models/destinationcreatewebhook.py
@@ -235,6 +248,7 @@ generatedFiles:
235248
- src/outpost_sdk/models/listtenanttopicsop.py
236249
- src/outpost_sdk/models/portalredirect.py
237250
- src/outpost_sdk/models/publishrequest.py
251+
- src/outpost_sdk/models/publishresponse.py
238252
- src/outpost_sdk/models/rabbitmqconfig.py
239253
- src/outpost_sdk/models/rabbitmqcredentials.py
240254
- src/outpost_sdk/models/retrytenanteventop.py
@@ -271,6 +285,7 @@ generatedFiles:
271285
- src/outpost_sdk/utils/retries.py
272286
- src/outpost_sdk/utils/security.py
273287
- src/outpost_sdk/utils/serializers.py
288+
- src/outpost_sdk/utils/unmarshal_json_response.py
274289
- src/outpost_sdk/utils/url.py
275290
- src/outpost_sdk/utils/values.py
276291
examples:
@@ -378,7 +393,7 @@ examples:
378393
application/json: {"topics": "*", "config": {"server_url": "localhost:5672", "exchange": "my-exchange", "tls": "false"}, "credentials": {"username": "guest", "password": "guest"}}
379394
responses:
380395
"200":
381-
application/json: {"id": "des_kns_xyz", "type": "aws_kinesis", "topics": ["user.created", "user.updated"], "disabled_at": null, "created_at": "2024-03-10T15:30:00Z", "config": {"stream_name": "production-events", "region": "eu-west-1"}, "credentials": {"key": "AKIAIOSFODNN7EXAMPLE", "secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}}
396+
application/json: {"id": "des_webhook_123", "type": "webhook", "topics": ["user.created"], "disabled_at": null, "created_at": "2024-02-15T10:00:00Z", "config": {"url": "https://my-service.com/webhook/new-handler"}, "credentials": {"secret": "whsec_abc123def456", "previous_secret": "whsec_prev789xyz012", "previous_secret_invalid_at": "2024-02-16T10:00:00Z"}}
382397
deleteTenantDestination:
383398
SuccessExample:
384399
parameters:
@@ -431,6 +446,8 @@ examples:
431446
application/json: {}
432447
"511":
433448
application/json: {}
449+
"202":
450+
application/json: {"id": "evt_abc123xyz789"}
434451
listTenantDestinationTypeSchemas:
435452
DestinationTypesExample:
436453
parameters:

sdks/outpost-python/.speakeasy/gen.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ generation:
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample
7+
sdkInitStyle: constructor
78
useClassNamesForArrayFields: true
89
fixes:
910
nameResolutionDec2023: true
@@ -15,13 +16,18 @@ generation:
1516
auth:
1617
oAuth2ClientCredentialsEnabled: true
1718
oAuth2PasswordEnabled: true
19+
tests:
20+
generateTests: true
21+
generateNewTests: false
22+
skipResponseBodyAssertions: false
1823
python:
19-
version: 0.2.0
24+
version: 0.3.0
2025
additionalDependencies:
2126
dev: {}
2227
main: {}
2328
authors:
2429
- Speakeasy
30+
baseErrorName: OutpostError
2531
clientServerStatusCodesAsErrors: true
2632
defaultErrorName: APIError
2733
description: Python Client SDK Generated by Speakeasy.

sdks/outpost-python/README.md

Lines changed: 50 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,13 @@ from outpost_sdk import Outpost, models
255255

256256

257257
with Outpost(
258+
tenant_id="<id>",
258259
security=models.Security(
259260
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
260261
),
261262
) as outpost:
262263

263-
res = outpost.tenants.upsert(tenant_id="<id>")
264+
res = outpost.tenants.upsert()
264265

265266
# Handle response
266267
print(res)
@@ -310,35 +311,18 @@ with Outpost(
310311
<!-- Start Error Handling [errors] -->
311312
## Error Handling
312313

313-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
314-
315-
By default, an API error will raise a errors.APIError exception, which has the following properties:
316-
317-
| Property | Type | Description |
318-
|-----------------|------------------|-----------------------|
319-
| `.status_code` | *int* | The HTTP status code |
320-
| `.message` | *str* | The error message |
321-
| `.raw_response` | *httpx.Response* | The raw HTTP response |
322-
| `.body` | *str* | The response content |
323-
324-
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 `check_async` method may raise the following exceptions:
325-
326-
| Error Type | Status Code | Content Type |
327-
| -------------------------- | ---------------------------- | ---------------- |
328-
| errors.NotFoundError | 404 | application/json |
329-
| errors.UnauthorizedError | 401, 403, 407 | application/json |
330-
| errors.TimeoutErrorT | 408 | application/json |
331-
| errors.RateLimitedError | 429 | application/json |
332-
| errors.BadRequestError | 400, 413, 414, 415, 422, 431 | application/json |
333-
| errors.TimeoutErrorT | 504 | application/json |
334-
| errors.NotFoundError | 501, 505 | application/json |
335-
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
336-
| errors.BadRequestError | 510 | application/json |
337-
| errors.UnauthorizedError | 511 | application/json |
338-
| errors.APIError | 4XX, 5XX | \*/\* |
314+
[`OutpostError`](./src/outpost_sdk/errors/outposterror.py) is the base class for all HTTP error responses. It has the following properties:
339315

340-
### Example
316+
| Property | Type | Description |
317+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
318+
| `err.message` | `str` | Error message |
319+
| `err.status_code` | `int` | HTTP response status code eg `404` |
320+
| `err.headers` | `httpx.Headers` | HTTP response headers |
321+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
322+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
323+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
341324

325+
### Example
342326
```python
343327
from outpost_sdk import Outpost, errors
344328

@@ -352,40 +336,45 @@ with Outpost() as outpost:
352336
# Handle response
353337
print(res)
354338

355-
except errors.NotFoundError as e:
356-
# handle e.data: errors.NotFoundErrorData
357-
raise(e)
358-
except errors.UnauthorizedError as e:
359-
# handle e.data: errors.UnauthorizedErrorData
360-
raise(e)
361-
except errors.TimeoutErrorT as e:
362-
# handle e.data: errors.TimeoutErrorTData
363-
raise(e)
364-
except errors.RateLimitedError as e:
365-
# handle e.data: errors.RateLimitedErrorData
366-
raise(e)
367-
except errors.BadRequestError as e:
368-
# handle e.data: errors.BadRequestErrorData
369-
raise(e)
370-
except errors.TimeoutErrorT as e:
371-
# handle e.data: errors.TimeoutErrorTData
372-
raise(e)
373-
except errors.NotFoundError as e:
374-
# handle e.data: errors.NotFoundErrorData
375-
raise(e)
376-
except errors.InternalServerError as e:
377-
# handle e.data: errors.InternalServerErrorData
378-
raise(e)
379-
except errors.BadRequestError as e:
380-
# handle e.data: errors.BadRequestErrorData
381-
raise(e)
382-
except errors.UnauthorizedError as e:
383-
# handle e.data: errors.UnauthorizedErrorData
384-
raise(e)
385-
except errors.APIError as e:
386-
# handle exception
387-
raise(e)
339+
340+
except errors.OutpostError as e:
341+
# The base class for HTTP error responses
342+
print(e.message)
343+
print(e.status_code)
344+
print(e.body)
345+
print(e.headers)
346+
print(e.raw_response)
347+
348+
# Depending on the method different errors may be thrown
349+
if isinstance(e, errors.NotFoundError):
350+
print(e.data.message) # Optional[str]
351+
print(e.data.additional_properties) # Optional[Dict[str, Any]]
388352
```
353+
354+
### Error Classes
355+
**Primary errors:**
356+
* [`OutpostError`](./src/outpost_sdk/errors/outposterror.py): The base class for HTTP error responses.
357+
* [`BadRequestError`](./src/outpost_sdk/errors/badrequesterror.py): A collection of codes that generally means the end user got something wrong in making the request.
358+
* [`UnauthorizedError`](./src/outpost_sdk/errors/unauthorizederror.py): A collection of codes that generally means the client was not authenticated correctly for the request they want to make.
359+
* [`NotFoundError`](./src/outpost_sdk/errors/notfounderror.py): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing.
360+
* [`TimeoutErrorT`](./src/outpost_sdk/errors/timeouterrort.py): Timeouts occurred with the request.
361+
* [`RateLimitedError`](./src/outpost_sdk/errors/ratelimitederror.py): Status codes relating to the client being rate limited by the server. Status code `429`.
362+
* [`InternalServerError`](./src/outpost_sdk/errors/internalservererror.py): A collection of status codes that generally mean the server failed in an unexpected way.
363+
364+
<details><summary>Less common errors (5)</summary>
365+
366+
<br />
367+
368+
**Network errors:**
369+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
370+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
371+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
372+
373+
374+
**Inherit from [`OutpostError`](./src/outpost_sdk/errors/outposterror.py)**:
375+
* [`ResponseValidationError`](./src/outpost_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
376+
377+
</details>
389378
<!-- End Error Handling [errors] -->
390379

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

sdks/outpost-python/RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ Based on:
1818
### Generated
1919
- [python v0.2.0] sdks/outpost-python
2020
### Releases
21-
- [PyPI v0.2.0] https://pypi.org/project/outpost_sdk/0.2.0 - sdks/outpost-python
21+
- [PyPI v0.2.0] https://pypi.org/project/outpost_sdk/0.2.0 - sdks/outpost-python
22+
23+
## 2025-07-31 16:14:53
24+
### Changes
25+
Based on:
26+
- OpenAPI Doc
27+
- Speakeasy CLI 1.594.0 (2.670.1) https://github.com/speakeasy-api/speakeasy
28+
### Generated
29+
- [python v0.3.0] sdks/outpost-python
30+
### Releases
31+
- [PyPI v0.3.0] https://pypi.org/project/outpost_sdk/0.3.0 - sdks/outpost-python
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# AzureServiceBusConfig
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description | Example |
7+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
8+
| `name` | *str* | :heavy_check_mark: | The name of the Azure Service Bus queue or topic to publish messages to. | my-queue-or-topic |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# AzureServiceBusCredentials
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description | Example |
7+
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
8+
| `connection_string` | *str* | :heavy_check_mark: | The connection string for the Azure Service Bus namespace. | Endpoint=sb://namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=abc123 |

sdks/outpost-python/docs/models/destination.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ value: models.DestinationHookdeck = /* values here */
3333
value: models.DestinationAWSKinesis = /* values here */
3434
```
3535

36+
### `models.DestinationAzureServiceBus`
37+
38+
```python
39+
value: models.DestinationAzureServiceBus = /* values here */
40+
```
41+

0 commit comments

Comments
 (0)