Skip to content

Commit

Permalink
Merge pull request #87 from dubinc/speakeasy-sdk-regen-1738023957
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate 0.17.6
  • Loading branch information
devkiran authored Jan 28, 2025
2 parents efb1bb6 + 642a7de commit 0832404
Show file tree
Hide file tree
Showing 22 changed files with 1,473 additions and 22 deletions.
48 changes: 41 additions & 7 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: 46f65792e2db963b01085754a661b72a
docChecksum: adaa2bd5ce5c9f12fb83c88e3ea2c2e0
docVersion: 0.0.1
speakeasyVersion: 1.470.1
generationVersion: 2.493.34
releaseVersion: 0.17.5
configChecksum: 810e8a736a429b3bbc3102b1a899e20d
speakeasyVersion: 1.476.2
generationVersion: 2.495.1
releaseVersion: 0.17.6
configChecksum: 76afab60228b07ea042ea77f14266c47
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.4
core: 5.10.5
defaultEnabledRetries: 0.2.0
deprecations: 3.0.2
enumUnions: 0.1.0
Expand Down Expand Up @@ -178,6 +178,7 @@ generatedFiles:
- docs/models/operations/bulkupdatelinkstagnames.md
- docs/models/operations/click.md
- docs/models/operations/color.md
- docs/models/operations/country.md
- docs/models/operations/createcustomerdiscount.md
- docs/models/operations/createcustomerinterval.md
- docs/models/operations/createcustomerlink.md
Expand All @@ -189,6 +190,12 @@ generatedFiles:
- docs/models/operations/createembedtokenrequestbody.md
- docs/models/operations/createembedtokenresponsebody.md
- docs/models/operations/createlinkrequestbody.md
- docs/models/operations/createpartnerdiscount.md
- docs/models/operations/createpartnerinterval.md
- docs/models/operations/createpartnerlink.md
- docs/models/operations/createpartnerrequestbody.md
- docs/models/operations/createpartnerresponsebody.md
- docs/models/operations/createpartnertype.md
- docs/models/operations/createtagrequestbody.md
- docs/models/operations/customer.md
- docs/models/operations/data.md
Expand Down Expand Up @@ -256,6 +263,7 @@ generatedFiles:
- docs/models/operations/sort.md
- docs/models/operations/sortby.md
- docs/models/operations/sortorder.md
- docs/models/operations/status.md
- docs/models/operations/tagids.md
- docs/models/operations/tagnames.md
- docs/models/operations/three.md
Expand Down Expand Up @@ -298,6 +306,7 @@ generatedFiles:
- docs/sdks/events/README.md
- docs/sdks/links/README.md
- docs/sdks/metatags/README.md
- docs/sdks/partners/README.md
- docs/sdks/qrcodes/README.md
- docs/sdks/tags/README.md
- docs/sdks/track/README.md
Expand Down Expand Up @@ -372,6 +381,7 @@ generatedFiles:
- src/dub/models/operations/createdomain.py
- src/dub/models/operations/createembedtoken.py
- src/dub/models/operations/createlink.py
- src/dub/models/operations/createpartner.py
- src/dub/models/operations/createtag.py
- src/dub/models/operations/deletecustomer.py
- src/dub/models/operations/deletedomain.py
Expand All @@ -397,6 +407,7 @@ generatedFiles:
- src/dub/models/operations/updatetag.py
- src/dub/models/operations/updateworkspace.py
- src/dub/models/operations/upsertlink.py
- src/dub/partners.py
- src/dub/py.typed
- src/dub/qr_codes.py
- src/dub/sdk.py
Expand Down Expand Up @@ -740,7 +751,7 @@ examples:
sortBy: "timestamp"
responses:
"200":
application/json: [{"event": "sale", "eventId": "<id>", "eventName": "<value>", "link": {"id": "<id>", "domain": "remorseful-concentration.biz", "key": "<key>", "url": "https://primary-paintwork.com/", "externalId": "<id>", "tenantId": "<id>", "expiresAt": "1760244354683", "expiredUrl": "https://black-poetry.name/", "password": "COyVtOrvIw1vLIJ", "title": "<value>", "description": "despite er boom however when uh-huh", "image": "https://picsum.photos/seed/T1tZJLp1EG/3827/3109", "video": "https://loremflickr.com/2420/1632?lock=7470650813503352", "ios": "<value>", "android": "<id>", "geo": {}, "tagId": "<id>", "tags": [{"id": "<id>", "name": "<value>", "color": "green"}], "webhookIds": [], "comments": "tenement commonly softly boo massive sorrowful", "shortLink": "https://dense-custom.info/", "qrCode": "https://alive-lid.biz", "utm_source": "<value>", "utm_medium": "<value>", "utm_campaign": "<value>", "utm_term": "<value>", "utm_content": "<value>", "userId": "<id>", "workspaceId": "<id>", "clicks": 0, "lastClicked": "<value>", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1725657166246", "updatedAt": "1737530794245", "projectId": "<id>", "programId": "<id>"}, "click": {"id": "<id>", "url": "https://utilized-quit.net/", "country": "Togo", "city": "Cormiermouth", "region": "<value>", "continent": "North America", "device": "Mobile", "browser": "Chrome", "os": "Chrome OS", "referer": "gummy-cope.net", "refererUrl": "https://prickly-bourgeoisie.info/", "ip": "69bd:53cd:cebc:ac4b:d1e8:50e8:ee59:b0b3"}, "customer": {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "1736412710711"}, "sale": {"amount": 625809, "invoiceId": null, "paymentProcessor": "stripe"}, "saleAmount": 1401.42, "invoice_id": "<id>", "payment_processor": "<value>", "click_id": "<id>", "link_id": "<id>", "domain": "unruly-allegation.name", "key": "<key>", "url": "https://fortunate-swim.info/", "continent": "Australia", "country": "Cook Islands", "city": "South Harryburgh", "device": "Mobile", "browser": "Safari", "os": "WebOS", "qr": 1523.03, "ip": "caf5:04dc:da9e:67cc:af3b:8caf:afbe:e39c"}, {"event": "sale", "eventId": "<id>", "eventName": "<value>", "link": {"id": "<id>", "domain": "right-window.biz", "key": "<key>", "url": "https://physical-experience.org/", "externalId": "<id>", "tenantId": "<id>", "expiresAt": "1748935708293", "expiredUrl": "https://indelible-birdbath.net", "password": "4yMlkCXkK5ppW3u", "title": "<value>", "description": "terribly gosh facilitate in", "image": "https://loremflickr.com/2596/954?lock=8527955982122580", "video": "https://loremflickr.com/3336/742?lock=2177640289466521", "ios": "<value>", "android": "<id>", "geo": {}, "tagId": "<id>", "tags": [{"id": "<id>", "name": "<value>", "color": "red"}, {"id": "<id>", "name": "<value>", "color": "pink"}, {"id": "<id>", "name": "<value>", "color": "pink"}], "webhookIds": ["<value>", "<value>", "<value>"], "comments": "up so pro pish clear-cut an mid aw disconnection which wetly typeface usable underneath putrefy ah aha", "shortLink": "https://knowledgeable-season.info", "qrCode": "https://nimble-individual.biz/", "utm_source": "<value>", "utm_medium": "<value>", "utm_campaign": "<value>", "utm_term": "<value>", "utm_content": "<value>", "userId": "<id>", "workspaceId": "<id>", "clicks": 0, "lastClicked": "<value>", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1736151431987", "updatedAt": "1737536515452", "projectId": "<id>", "programId": "<id>"}, "click": {"id": "<id>", "url": "https://perfumed-marketplace.com/", "country": "Burundi", "city": "Stockton", "region": "<value>", "continent": "Asia", "device": "Desktop", "browser": "Chrome", "os": "Symbian", "referer": "well-off-hygienic.org", "refererUrl": "https://ripe-ceramic.org", "ip": "eebc:cce9:cecf:ebeb:dfd9:15f2:a0cc:a3b1"}, "customer": {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "1720512376809"}, "sale": {"amount": 443316, "invoiceId": null, "paymentProcessor": "paddle"}, "saleAmount": 2634.98, "invoice_id": "<id>", "payment_processor": "<value>", "click_id": "<id>", "link_id": "<id>", "domain": "next-cricket.biz", "key": "<key>", "url": "https://repentant-rust.name/", "continent": "Australia", "country": "Saint Helena", "city": "Luettgenfort", "device": "Mobile", "browser": "Safari", "os": "Chrome OS", "qr": 4390.32, "ip": "54.229.114.129"}]
application/json: [{"event": "sale", "eventId": "<id>", "eventName": "<value>", "link": {"id": "<id>", "domain": "remorseful-concentration.biz", "key": "<key>", "url": "https://primary-paintwork.com/", "externalId": "<id>", "tenantId": "<id>", "expiresAt": "1760676380392", "expiredUrl": "https://black-poetry.name/", "password": "COyVtOrvIw1vLIJ", "title": "<value>", "description": "despite er boom however when uh-huh", "image": "https://picsum.photos/seed/T1tZJLp1EG/3827/3109", "video": "https://loremflickr.com/2420/1632?lock=7470650813503352", "ios": "<value>", "android": "<id>", "geo": {}, "tagId": "<id>", "tags": [{"id": "<id>", "name": "<value>", "color": "green"}], "webhookIds": [], "comments": "tenement commonly softly boo massive sorrowful", "shortLink": "https://dense-custom.info/", "qrCode": "https://alive-lid.biz", "utm_source": "<value>", "utm_medium": "<value>", "utm_campaign": "<value>", "utm_term": "<value>", "utm_content": "<value>", "userId": "<id>", "workspaceId": "<id>", "clicks": 0, "lastClicked": "<value>", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1726089191938", "updatedAt": "1737962819937", "projectId": "<id>", "programId": "<id>"}, "click": {"id": "<id>", "url": "https://utilized-quit.net/", "country": "Togo", "city": "Cormiermouth", "region": "<value>", "continent": "North America", "device": "Mobile", "browser": "Chrome", "os": "Chrome OS", "referer": "gummy-cope.net", "refererUrl": "https://prickly-bourgeoisie.info/", "ip": "69bd:53cd:cebc:ac4b:d1e8:50e8:ee59:b0b3"}, "customer": {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "1736844736398"}, "sale": {"amount": 625809, "invoiceId": null, "paymentProcessor": "stripe"}, "saleAmount": 1401.42, "invoice_id": "<id>", "payment_processor": "<value>", "click_id": "<id>", "link_id": "<id>", "domain": "unruly-allegation.name", "key": "<key>", "url": "https://fortunate-swim.info/", "continent": "Australia", "country": "Cook Islands", "city": "South Harryburgh", "device": "Mobile", "browser": "Safari", "os": "WebOS", "qr": 1523.03, "ip": "caf5:04dc:da9e:67cc:af3b:8caf:afbe:e39c"}, {"event": "sale", "eventId": "<id>", "eventName": "<value>", "link": {"id": "<id>", "domain": "right-window.biz", "key": "<key>", "url": "https://physical-experience.org/", "externalId": "<id>", "tenantId": "<id>", "expiresAt": "1749367733981", "expiredUrl": "https://indelible-birdbath.net", "password": "4yMlkCXkK5ppW3u", "title": "<value>", "description": "terribly gosh facilitate in", "image": "https://loremflickr.com/2596/954?lock=8527955982122580", "video": "https://loremflickr.com/3336/742?lock=2177640289466521", "ios": "<value>", "android": "<id>", "geo": {}, "tagId": "<id>", "tags": [{"id": "<id>", "name": "<value>", "color": "red"}, {"id": "<id>", "name": "<value>", "color": "pink"}, {"id": "<id>", "name": "<value>", "color": "pink"}], "webhookIds": ["<value>", "<value>", "<value>"], "comments": "up so pro pish clear-cut an mid aw disconnection which wetly typeface usable underneath putrefy ah aha", "shortLink": "https://knowledgeable-season.info", "qrCode": "https://nimble-individual.biz/", "utm_source": "<value>", "utm_medium": "<value>", "utm_campaign": "<value>", "utm_term": "<value>", "utm_content": "<value>", "userId": "<id>", "workspaceId": "<id>", "clicks": 0, "lastClicked": "<value>", "leads": 0, "sales": 0, "saleAmount": 0, "createdAt": "1736583457676", "updatedAt": "1737968541140", "projectId": "<id>", "programId": "<id>"}, "click": {"id": "<id>", "url": "https://perfumed-marketplace.com/", "country": "Burundi", "city": "Stockton", "region": "<value>", "continent": "Asia", "device": "Desktop", "browser": "Chrome", "os": "Symbian", "referer": "well-off-hygienic.org", "refererUrl": "https://ripe-ceramic.org", "ip": "eebc:cce9:cecf:ebeb:dfd9:15f2:a0cc:a3b1"}, "customer": {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "1720944402498"}, "sale": {"amount": 443316, "invoiceId": null, "paymentProcessor": "paddle"}, "saleAmount": 2634.98, "invoice_id": "<id>", "payment_processor": "<value>", "click_id": "<id>", "link_id": "<id>", "domain": "next-cricket.biz", "key": "<key>", "url": "https://repentant-rust.name/", "continent": "Australia", "country": "Saint Helena", "city": "Luettgenfort", "device": "Mobile", "browser": "Safari", "os": "Chrome OS", "qr": 4390.32, "ip": "54.229.114.129"}]
"400":
application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}}
"401":
Expand Down Expand Up @@ -1262,5 +1273,28 @@ examples:
responses:
"200":
application/json: {"title": "Dub.co - Link Management for Modern Marketing Teams", "description": "Dub.co is the open-source link management infrastructure ...", "image": "https://assets.dub.co/thumbnail.jpg"}
createPartner:
speakeasy-default-create-partner:
responses:
"201":
application/json: {"id": "<id>", "name": "<value>", "email": "[email protected]", "image": "https://loremflickr.com/1/679?lock=7139282333236917", "country": "Slovenia", "bio": "<value>", "stripeConnectId": "<id>", "payoutsEnabled": false, "createdAt": "1730216834868", "updatedAt": "1738020291210", "status": "pending", "link": {"id": "<id>", "shortLink": "https://agile-defendant.biz/", "domain": "better-fedora.biz", "key": "<key>", "url": "https://calculating-pearl.info/", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0}, "commissionAmount": 365.21, "earnings": 6216.36}
"400":
application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}}
"401":
application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}}
"403":
application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}}
"404":
application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}}
"409":
application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}}
"410":
application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}}
"422":
application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}}
"429":
application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}}
"500":
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"}}
examplesVersion: 1.0.0
generatedTests: {}
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.5
version: 0.17.6
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.470.1
speakeasyVersion: 1.476.2
sources:
dub:
sourceNamespace: dub
sourceRevisionDigest: sha256:93a5e94a40880d8527e465a02bb30c4ebe52517fb10fe58a6b9e8e091320c011
sourceBlobDigest: sha256:18f3a33ef84b5de90ccf0b29ec0d4090b791afbf99993a6b1d4639da8557e109
sourceRevisionDigest: sha256:d0215719422224afc544444887e1ca3ebab1681cc96ff801e7a85bb6316979ea
sourceBlobDigest: sha256:f2236df729a5c20b05e8fb43dfa79946a81213977809849ddbe0c92f5249fbab
tags:
- latest
- speakeasy-sdk-regen-1737591929
- speakeasy-sdk-regen-1738023957
- 0.0.1
targets:
my-first-target:
source: dub
sourceNamespace: dub
sourceRevisionDigest: sha256:93a5e94a40880d8527e465a02bb30c4ebe52517fb10fe58a6b9e8e091320c011
sourceBlobDigest: sha256:18f3a33ef84b5de90ccf0b29ec0d4090b791afbf99993a6b1d4639da8557e109
sourceRevisionDigest: sha256:d0215719422224afc544444887e1ca3ebab1681cc96ff801e7a85bb6316979ea
sourceBlobDigest: sha256:f2236df729a5c20b05e8fb43dfa79946a81213977809849ddbe0c92f5249fbab
codeSamplesNamespace: code-samples-python-my-first-target
codeSamplesRevisionDigest: sha256:f02ba70690a51425ddba18a1fe67c7ce6a097e66239b41ad8ef230551072f17f
codeSamplesRevisionDigest: sha256:5252f5f3689b1c527330ba05aeca7fc44463a3ddc77e9db9470d1f9269af5783
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Dub.co API: Dub is link management infrastructure for companies to create market
* [Authentication](#authentication)
* [Retries](#retries)
* [Pagination](#pagination)
* [Resource Management](#resource-management)
* [Debugging](#debugging)
* [IDE Support](#ide-support)
* [Development](#development)
Expand All @@ -39,6 +40,11 @@ Dub.co API: Dub is link management infrastructure for companies to create market
<!-- Start SDK Installation [installation] -->
## SDK Installation

> [!NOTE]
> **Python version upgrade policy**
>
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
The SDK can be installed with either *pip* or *poetry* package managers.

### PIP
Expand Down Expand Up @@ -219,6 +225,10 @@ asyncio.run(main())

* [get](docs/sdks/metatags/README.md#get) - Retrieve the metatags for a URL

### [partners](docs/sdks/partners/README.md)

* [create](docs/sdks/partners/README.md#create) - Create a new partner

### [qr_codes](docs/sdks/qrcodes/README.md)

* [get](docs/sdks/qrcodes/README.md#get) - Retrieve a QR code
Expand Down Expand Up @@ -565,6 +575,31 @@ with Dub(
```
<!-- End Pagination [pagination] -->

<!-- Start Resource Management [resource-management] -->
## Resource Management

The `Dub` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.

[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers

```python
from dub import Dub
def main():
with Dub(
token="DUB_API_KEY",
) as dub:
# Rest of application here...


# Or when using async:
async def amain():
async with Dub(
token="DUB_API_KEY",
) as dub:
# Rest of application here...
```
<!-- End Resource Management [resource-management] -->

<!-- Start Debugging [debug] -->
## Debugging

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -776,4 +776,14 @@ Based on:
### Generated
- [python v0.17.5] .
### Releases
- [PyPI v0.17.5] https://pypi.org/project/dub/0.17.5 - .
- [PyPI v0.17.5] https://pypi.org/project/dub/0.17.5 - .

## 2025-01-28 00:25:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.476.2 (2.495.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.17.6] .
### Releases
- [PyPI v0.17.6] https://pypi.org/project/dub/0.17.6 - .
18 changes: 18 additions & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,24 @@ actions:
assert res is not None
# Handle response
print(res)
- target: $["paths"]["/partners"]["post"]
update:
x-codeSamples:
- lang: python
label: createPartner
source: |-
from dub import Dub
with Dub(
token="DUB_API_KEY",
) as dub:
res = dub.partners.create()
assert res is not None
# Handle response
print(res)
- target: $["paths"]["/qr"]["get"]
Expand Down
Loading

0 comments on commit 0832404

Please sign in to comment.