Skip to content

Commit

Permalink
Merge pull request #84 from dubinc/speakeasy-sdk-regen-1737073531
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate 0.17.3
  • Loading branch information
devkiran authored Jan 17, 2025
2 parents 666d54b + 6f599f4 commit 98c55f9
Show file tree
Hide file tree
Showing 27 changed files with 645 additions and 99 deletions.
21 changes: 15 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
lockVersion: 2.0.0
id: ab657d60-207e-43a4-8cc8-692a672950ed
management:
docChecksum: 810d019618d329428080463b7bf165c7
docChecksum: c7226fc27f4fb4b6c492bc7d8bb0ce6d
docVersion: 0.0.1
speakeasyVersion: 1.468.6
generationVersion: 2.493.13
releaseVersion: 0.17.2
configChecksum: 27829e9e655969641d4494982fa8a837
speakeasyVersion: 1.468.9
generationVersion: 2.493.21
releaseVersion: 0.17.3
configChecksum: 57196fc5b5b758adf94f83e6e5eee8ba
repoURL: https://github.com/dubinc/dub-python.git
installationURL: https://github.com/dubinc/dub-python.git
published: true
features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.10.1
core: 5.10.2
defaultEnabledRetries: 0.2.0
deprecations: 3.0.2
enumUnions: 0.1.0
Expand Down Expand Up @@ -221,8 +221,12 @@ generatedFiles:
- docs/models/operations/getmetatagsrequest.md
- docs/models/operations/getmetatagsresponsebody.md
- docs/models/operations/getqrcoderequest.md
- docs/models/operations/gettagsqueryparamsortby.md
- docs/models/operations/gettagsqueryparamsortorder.md
- docs/models/operations/gettagsrequest.md
- docs/models/operations/getworkspacerequest.md
- docs/models/operations/groupby.md
- docs/models/operations/ids.md
- docs/models/operations/interval.md
- docs/models/operations/level.md
- docs/models/operations/link.md
Expand Down Expand Up @@ -380,6 +384,7 @@ generatedFiles:
- src/dub/models/operations/getlinkscount.py
- src/dub/models/operations/getmetatags.py
- src/dub/models/operations/getqrcode.py
- src/dub/models/operations/gettags.py
- src/dub/models/operations/getworkspace.py
- src/dub/models/operations/listdomains.py
- src/dub/models/operations/listevents.py
Expand Down Expand Up @@ -818,6 +823,10 @@ examples:
application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}}
getTags:
speakeasy-default-get-tags:
parameters:
query:
page: 1
pageSize: 50
responses:
"200":
application/json: []
Expand Down
3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 0.17.2
version: 0.17.3
additionalDependencies:
dev: {}
main: {}
Expand All @@ -23,6 +23,7 @@ python:
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
description: Python Client SDK Generated by Speakeasy
enableCustomCodeRegions: false
enumFormat: enum
fixFlags:
responseRequiredSep2024: false
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.468.6
speakeasyVersion: 1.468.9
sources:
dub:
sourceNamespace: dub
sourceRevisionDigest: sha256:9ece271b2b29213d07d843152b55788d12255a77ff95cd936f75a9fc0581d129
sourceBlobDigest: sha256:584f9a57bd02dbf990d2e6a17ba90d848f8ee7e52db00bd30b17a438f35549b2
sourceRevisionDigest: sha256:a8bc05b0060aca3195d0dce6b4014115e5187e3b78ac72a2dc81dd4dcf08de21
sourceBlobDigest: sha256:3a497f2adc2e94717c3da9975cb28e719879942f74434e18ffe44db7b99adc7b
tags:
- latest
- speakeasy-sdk-regen-1736900762
- speakeasy-sdk-regen-1737073531
- 0.0.1
targets:
my-first-target:
source: dub
sourceNamespace: dub
sourceRevisionDigest: sha256:9ece271b2b29213d07d843152b55788d12255a77ff95cd936f75a9fc0581d129
sourceBlobDigest: sha256:584f9a57bd02dbf990d2e6a17ba90d848f8ee7e52db00bd30b17a438f35549b2
sourceRevisionDigest: sha256:a8bc05b0060aca3195d0dce6b4014115e5187e3b78ac72a2dc81dd4dcf08de21
sourceBlobDigest: sha256:3a497f2adc2e94717c3da9975cb28e719879942f74434e18ffe44db7b99adc7b
codeSamplesNamespace: code-samples-python-my-first-target
codeSamplesRevisionDigest: sha256:933161ae498c450f06968155e872818145f6c06c047fc9b93412be00bca2fd20
codeSamplesRevisionDigest: sha256:10bb1467c970f1ece9dd5ab4f1bd8540471ef70d179ce483d68b4c207b1ae4d6
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,4 +746,14 @@ Based on:
### Generated
- [python v0.17.2] .
### Releases
- [PyPI v0.17.2] https://pypi.org/project/dub/0.17.2 - .
- [PyPI v0.17.2] https://pypi.org/project/dub/0.17.2 - .

## 2025-01-17 00:25:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.468.9 (2.493.21) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.17.3] .
### Releases
- [PyPI v0.17.3] https://pypi.org/project/dub/0.17.3 - .
5 changes: 4 additions & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ actions:
token="DUB_API_KEY",
) as dub:
res = dub.tags.list()
res = dub.tags.list(request={
"page": 1,
"page_size": 50,
})
assert res is not None
Expand Down
11 changes: 11 additions & 0 deletions docs/models/operations/gettagsqueryparamsortby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GetTagsQueryParamSortBy

The field to sort the tags by.


## Values

| Name | Value |
| ------------ | ------------ |
| `NAME` | name |
| `CREATED_AT` | createdAt |
11 changes: 11 additions & 0 deletions docs/models/operations/gettagsqueryparamsortorder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GetTagsQueryParamSortOrder

The order to sort the tags by.


## Values

| Name | Value |
| ------ | ------ |
| `ASC` | asc |
| `DESC` | desc |
13 changes: 13 additions & 0 deletions docs/models/operations/gettagsrequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# GetTagsRequest


## Fields

| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `sort_by` | [Optional[operations.GetTagsQueryParamSortBy]](../../models/operations/gettagsqueryparamsortby.md) | :heavy_minus_sign: | The field to sort the tags by. | |
| `sort_order` | [Optional[operations.GetTagsQueryParamSortOrder]](../../models/operations/gettagsqueryparamsortorder.md) | :heavy_minus_sign: | The order to sort the tags by. | |
| `search` | *Optional[str]* | :heavy_minus_sign: | The search term to filter the tags by. | |
| `ids` | [Optional[operations.Ids]](../../models/operations/ids.md) | :heavy_minus_sign: | IDs of tags to filter by. | |
| `page` | *Optional[float]* | :heavy_minus_sign: | The page number for pagination. | 1 |
| `page_size` | *Optional[float]* | :heavy_minus_sign: | The number of items per page. | 50 |
19 changes: 19 additions & 0 deletions docs/models/operations/ids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ids

IDs of tags to filter by.


## Supported Types

### `str`

```python
value: str = /* values here */
```

### `List[str]`

```python
value: List[str] = /* values here */
```

10 changes: 5 additions & 5 deletions docs/models/operations/tracksaleresponsebody.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ A sale was tracked.

## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `event_name` | *str* | :heavy_check_mark: | N/A |
| `customer` | [operations.TrackSaleCustomer](../../models/operations/tracksalecustomer.md) | :heavy_check_mark: | N/A |
| `sale` | [operations.Sale](../../models/operations/sale.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `event_name` | *str* | :heavy_check_mark: | N/A |
| `customer` | [Nullable[operations.TrackSaleCustomer]](../../models/operations/tracksalecustomer.md) | :heavy_check_mark: | N/A |
| `sale` | [Nullable[operations.Sale]](../../models/operations/sale.md) | :heavy_check_mark: | N/A |
12 changes: 8 additions & 4 deletions docs/sdks/tags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ with Dub(
token="DUB_API_KEY",
) as dub:

res = dub.tags.list()
res = dub.tags.list(request={
"page": 1,
"page_size": 50,
})

assert res is not None

Expand All @@ -82,9 +85,10 @@ with Dub(

### Parameters

| Parameter | Type | Required | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `request` | [operations.GetTagsRequest](../../models/operations/gettagsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |

### Response

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dub"
version = "0.17.2"
version = "0.17.3"
description = "Python Client SDK Generated by Speakeasy"
authors = [{ name = "Speakeasy" },]
readme = "README-PYPI.md"
Expand Down
6 changes: 3 additions & 3 deletions src/dub/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "dub"
__version__: str = "0.17.2"
__version__: str = "0.17.3"
__openapi_doc_version__: str = "0.0.1"
__gen_version__: str = "2.493.13"
__user_agent__: str = "speakeasy-sdk/python 0.17.2 2.493.13 0.0.1 dub"
__gen_version__: str = "2.493.21"
__user_agent__: str = "speakeasy-sdk/python 0.17.3 2.493.21 0.0.1 dub"

try:
if __package__ is not None:
Expand Down
14 changes: 12 additions & 2 deletions src/dub/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ def retrieve(
if utils.match_response(http_res, "500", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.InternalServerErrorData)
raise errors.InternalServerError(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
)
if utils.match_response(http_res, "5XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
Expand Down Expand Up @@ -250,7 +255,12 @@ async def retrieve_async(
if utils.match_response(http_res, "500", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.InternalServerErrorData)
raise errors.InternalServerError(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
)
if utils.match_response(http_res, "5XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
Expand Down
Loading

0 comments on commit 98c55f9

Please sign in to comment.