Skip to content

Commit

Permalink
Merge pull request #85 from dubinc/speakeasy-sdk-regen-1737332783
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate 0.17.4
  • Loading branch information
devkiran authored Jan 20, 2025
2 parents 98c55f9 + 630ad5e commit 4a5ba6b
Show file tree
Hide file tree
Showing 17 changed files with 314 additions and 218 deletions.
340 changes: 172 additions & 168 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 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.3
version: 0.17.4
additionalDependencies:
dev: {}
main: {}
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.9
speakeasyVersion: 1.469.2
sources:
dub:
sourceNamespace: dub
sourceRevisionDigest: sha256:a8bc05b0060aca3195d0dce6b4014115e5187e3b78ac72a2dc81dd4dcf08de21
sourceBlobDigest: sha256:3a497f2adc2e94717c3da9975cb28e719879942f74434e18ffe44db7b99adc7b
sourceRevisionDigest: sha256:33028dac84aee152518fd36dce0917089a9c59c717c93fa6565bb5638269becb
sourceBlobDigest: sha256:660d4fa9d96caa5f1f4f33c7691ee0f4591252d54a05ac54c049d9d6fc8f282d
tags:
- latest
- speakeasy-sdk-regen-1737073531
- speakeasy-sdk-regen-1737332783
- 0.0.1
targets:
my-first-target:
source: dub
sourceNamespace: dub
sourceRevisionDigest: sha256:a8bc05b0060aca3195d0dce6b4014115e5187e3b78ac72a2dc81dd4dcf08de21
sourceBlobDigest: sha256:3a497f2adc2e94717c3da9975cb28e719879942f74434e18ffe44db7b99adc7b
sourceRevisionDigest: sha256:33028dac84aee152518fd36dce0917089a9c59c717c93fa6565bb5638269becb
sourceBlobDigest: sha256:660d4fa9d96caa5f1f4f33c7691ee0f4591252d54a05ac54c049d9d6fc8f282d
codeSamplesNamespace: code-samples-python-my-first-target
codeSamplesRevisionDigest: sha256:10bb1467c970f1ece9dd5ab4f1bd8540471ef70d179ce483d68b4c207b1ae4d6
codeSamplesRevisionDigest: sha256:a18b5f68dc57dd7b43932f2b1d6fdd45681b2cfe24fade8edb8e7297c952c2fc
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ asyncio.run(main())
### [customers](docs/sdks/customers/README.md)

* [list](docs/sdks/customers/README.md#list) - Retrieve a list of customers
* [create](docs/sdks/customers/README.md#create) - Create a customer
* [~~create~~](docs/sdks/customers/README.md#create) - Create a customer :warning: **Deprecated**
* [get](docs/sdks/customers/README.md#get) - Retrieve a customer
* [update](docs/sdks/customers/README.md#update) - Update a customer
* [delete](docs/sdks/customers/README.md#delete) - Delete a customer
Expand Down Expand Up @@ -542,12 +542,17 @@ return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from dub import Dub
from dub.models import operations

with Dub(
token="DUB_API_KEY",
) as dub:

res = dub.links.list(request={
"show_archived": True,
"with_tags": True,
"sort_by": operations.SortBy.CREATED_AT,
"sort_order": operations.SortOrder.DESC,
"page": 1,
"page_size": 50,
})
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,4 +756,14 @@ Based on:
### Generated
- [python v0.17.3] .
### Releases
- [PyPI v0.17.3] https://pypi.org/project/dub/0.17.3 - .
- [PyPI v0.17.3] https://pypi.org/project/dub/0.17.3 - .

## 2025-01-20 00:26:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.469.2 (2.493.23) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.17.4] .
### Releases
- [PyPI v0.17.4] https://pypi.org/project/dub/0.17.4 - .
59 changes: 40 additions & 19 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ actions:
label: retrieveAnalytics
source: |-
from dub import Dub
from dub.models import operations
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.analytics.retrieve(request={
"event": operations.Event.CLICKS,
"group_by": operations.QueryParamGroupBy.COUNT,
"timezone": "America/New_York",
"city": "New York",
"device": "Desktop",
Expand Down Expand Up @@ -45,24 +48,6 @@ actions:
assert res is not None
# Handle response
print(res)
- target: $["paths"]["/customers"]["post"]
update:
x-codeSamples:
- lang: python
label: createCustomer
source: |-
from dub import Dub
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.customers.create()
assert res is not None
# Handle response
print(res)
- target: $["paths"]["/customers/{id}"]["delete"]
Expand Down Expand Up @@ -136,6 +121,7 @@ actions:
) as dub:
res = dub.domains.list(request={
"archived": True,
"page": 1,
"page_size": 50,
})
Expand Down Expand Up @@ -217,19 +203,26 @@ actions:
label: listEvents
source: |-
from dub import Dub
from dub.models import operations
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.events.list(request={
"event": operations.QueryParamEvent.CLICKS,
"interval": operations.QueryParamInterval.TWENTY_FOURH,
"timezone": "America/New_York",
"city": "New York",
"device": "Desktop",
"browser": "Chrome",
"os": "Windows",
"referer": "google.com",
"referer_url": "https://dub.co/blog",
"page": 1,
"limit": 100,
"sort_order": operations.QueryParamSortOrder.DESC,
"sort_by": operations.QueryParamSortBy.TIMESTAMP,
})
assert res is not None
Expand All @@ -243,12 +236,17 @@ actions:
label: getLinks
source: |-
from dub import Dub
from dub.models import operations
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.links.list(request={
"show_archived": True,
"with_tags": True,
"sort_by": operations.SortBy.CREATED_AT,
"sort_order": operations.SortOrder.DESC,
"page": 1,
"page_size": 50,
})
Expand Down Expand Up @@ -374,7 +372,10 @@ actions:
token="DUB_API_KEY",
) as dub:
res = dub.links.count(request={})
res = dub.links.count(request={
"show_archived": True,
"with_tags": True,
})
assert res is not None
Expand Down Expand Up @@ -494,13 +495,21 @@ actions:
label: getQRCode
source: |-
from dub import Dub
from dub.models import operations
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.qr_codes.get(request={
"url": "https://normal-making.name",
"size": 600,
"level": operations.Level.L,
"fg_color": "#000000",
"bg_color": "#FFFFFF",
"hide_logo": True,
"margin": 2,
"include_margin": True,
})
assert res is not None
Expand All @@ -514,12 +523,15 @@ actions:
label: getTags
source: |-
from dub import Dub
from dub.models import operations
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.tags.list(request={
"sort_by": operations.GetTagsQueryParamSortBy.NAME,
"sort_order": operations.GetTagsQueryParamSortOrder.ASC,
"page": 1,
"page_size": 50,
})
Expand Down Expand Up @@ -615,6 +627,11 @@ actions:
res = dub.track.lead(request={
"click_id": "<id>",
"event_name": "Sign up",
"external_id": "",
"customer_id": None,
"customer_name": None,
"customer_email": None,
"customer_avatar": None,
})
assert res is not None
Expand All @@ -635,9 +652,13 @@ actions:
) as dub:
res = dub.track.sale(request={
"external_id": "",
"customer_id": None,
"amount": 996500,
"payment_processor": operations.PaymentProcessor.PADDLE,
"event_name": "Purchase",
"invoice_id": None,
"currency": "usd",
})
assert res is not None
Expand Down
3 changes: 3 additions & 0 deletions docs/sdks/analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ Retrieve analytics for a link, a domain, or the authenticated workspace. The res

```python
from dub import Dub
from dub.models import operations

with Dub(
token="DUB_API_KEY",
) as dub:

res = dub.analytics.retrieve(request={
"event": operations.Event.CLICKS,
"group_by": operations.QueryParamGroupBy.COUNT,
"timezone": "America/New_York",
"city": "New York",
"device": "Desktop",
Expand Down
8 changes: 5 additions & 3 deletions docs/sdks/customers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
### Available Operations

* [list](#list) - Retrieve a list of customers
* [create](#create) - Create a customer
* [~~create~~](#create) - Create a customer :warning: **Deprecated**
* [get](#get) - Retrieve a customer
* [update](#update) - Update a customer
* [delete](#delete) - Delete a customer
Expand Down Expand Up @@ -59,9 +59,11 @@ with Dub(
| errors.InternalServerError | 500 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |

## create
## ~~create~~

Create a customer for the authenticated workspace.
[Deprecated]: Customer creation can only be done via tracking a lead event. Use the /track/lead endpoint instead.

> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
### Example Usage

Expand Down
1 change: 1 addition & 0 deletions docs/sdks/domains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ with Dub(
) as dub:

res = dub.domains.list(request={
"archived": True,
"page": 1,
"page_size": 50,
})
Expand Down
7 changes: 7 additions & 0 deletions docs/sdks/events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@ Retrieve a paginated list of events for the authenticated workspace.

```python
from dub import Dub
from dub.models import operations

with Dub(
token="DUB_API_KEY",
) as dub:

res = dub.events.list(request={
"event": operations.QueryParamEvent.CLICKS,
"interval": operations.QueryParamInterval.TWENTY_FOURH,
"timezone": "America/New_York",
"city": "New York",
"device": "Desktop",
"browser": "Chrome",
"os": "Windows",
"referer": "google.com",
"referer_url": "https://dub.co/blog",
"page": 1,
"limit": 100,
"sort_order": operations.QueryParamSortOrder.DESC,
"sort_by": operations.QueryParamSortBy.TIMESTAMP,
})

assert res is not None
Expand Down
Loading

0 comments on commit 4a5ba6b

Please sign in to comment.