diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 33bfc78..84e86fd 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: ab657d60-207e-43a4-8cc8-692a672950ed management: - docChecksum: 721d398075627f52145125ad6074cef5 + docChecksum: e79768bd6535cef0d8d78eefb5ac63e1 docVersion: 0.0.1 - speakeasyVersion: 1.385.0 - generationVersion: 2.407.2 - releaseVersion: 0.7.3 - configChecksum: 3b18df936d28dda94b2d523af0561037 + speakeasyVersion: 1.390.1 + generationVersion: 2.409.0 + releaseVersion: 0.7.4 + configChecksum: bd9f10704d95327b294709d762e7c50f repoURL: https://github.com/dubinc/dub-python.git installationURL: https://github.com/dubinc/dub-python.git published: true @@ -81,6 +81,7 @@ generatedFiles: - src/dub/models/operations/deletelink.py - src/dub/models/operations/updatelink.py - src/dub/models/operations/bulkcreatelinks.py + - src/dub/models/operations/bulkdeletelinks.py - src/dub/models/operations/bulkupdatelinks.py - src/dub/models/operations/upsertlink.py - src/dub/models/operations/getqrcode.py @@ -156,6 +157,8 @@ generatedFiles: - docs/models/operations/bulkcreatelinkstagids.md - docs/models/operations/bulkcreatelinkstagnames.md - docs/models/operations/requestbody.md + - docs/models/operations/bulkdeletelinksrequest.md + - docs/models/operations/bulkdeletelinksresponsebody.md - docs/models/operations/bulkupdatelinkstagids.md - docs/models/operations/bulkupdatelinkstagnames.md - docs/models/operations/data.md @@ -192,18 +195,13 @@ generatedFiles: - docs/models/operations/updatedomainrequestbody.md - docs/models/operations/updatedomainrequest.md - docs/models/operations/trackleadrequestbody.md - - docs/models/operations/customer.md - docs/models/operations/click.md - - docs/models/operations/geo.md - - docs/models/operations/link.md + - docs/models/operations/customer.md - docs/models/operations/trackleadresponsebody.md - docs/models/operations/paymentprocessor.md - docs/models/operations/tracksalerequestbody.md - docs/models/operations/tracksalecustomer.md - docs/models/operations/sale.md - - docs/models/operations/tracksaleclick.md - - docs/models/operations/tracksalegeo.md - - docs/models/operations/tracksalelink.md - docs/models/operations/tracksaleresponsebody.md - docs/models/operations/trackcustomerrequestbody.md - docs/models/operations/trackcustomerresponsebody.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a8e5891..030ee74 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 0.7.3 + version: 0.7.4 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f6f0cd9..93d2ac8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.385.0 +speakeasyVersion: 1.390.1 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:f816d7cf91b05b49137970295afd49f9866e253e8bbc0e350b5f838dd7df244a - sourceBlobDigest: sha256:97dc3ab7247b0c882ab6f2652378b2b0ca20809d7ec993cb89dd174d476d205e + sourceRevisionDigest: sha256:69744ef58fd9c8bb8fbb9610f9628077f705cb3190d323e74b4c16146722b552 + sourceBlobDigest: sha256:610bc7cc5f22ea6d50eef98ab4141f3d1e1bdb00c4f8570a7ec7f0f5716acc08 tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:f816d7cf91b05b49137970295afd49f9866e253e8bbc0e350b5f838dd7df244a - sourceBlobDigest: sha256:97dc3ab7247b0c882ab6f2652378b2b0ca20809d7ec993cb89dd174d476d205e + sourceRevisionDigest: sha256:69744ef58fd9c8bb8fbb9610f9628077f705cb3190d323e74b4c16146722b552 + sourceBlobDigest: sha256:610bc7cc5f22ea6d50eef98ab4141f3d1e1bdb00c4f8570a7ec7f0f5716acc08 codeSamplesNamespace: code-samples-python-my-first-target - codeSamplesRevisionDigest: sha256:b2224aa374e16c0196cd79bedf7aeee7a6425256de6824d2886b242c239c790d + codeSamplesRevisionDigest: sha256:2498f6b904ed0279154e5f14c2f064bb51e0ecd271646e61aa91e462028edcbe outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 6386060..ef1b8a9 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ asyncio.run(main()) * [delete](docs/sdks/links/README.md#delete) - Delete a link * [update](docs/sdks/links/README.md#update) - Update a link * [create_many](docs/sdks/links/README.md#create_many) - Bulk create links +* [delete_many](docs/sdks/links/README.md#delete_many) - Bulk delete links * [update_many](docs/sdks/links/README.md#update_many) - Bulk update links * [upsert](docs/sdks/links/README.md#upsert) - Upsert a link diff --git a/RELEASES.md b/RELEASES.md index 1dfd82c..941b6ec 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -296,4 +296,14 @@ Based on: ### Generated - [python v0.7.3] . ### Releases -- [PyPI v0.7.3] https://pypi.org/project/dub/0.7.3 - . \ No newline at end of file +- [PyPI v0.7.3] https://pypi.org/project/dub/0.7.3 - . + +## 2024-09-04 01:26:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.390.1 (2.409.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.7.4] . +### Releases +- [PyPI v0.7.4] https://pypi.org/project/dub/0.7.4 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index a742bc7..9201344 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for python target version: 0.0.0 actions: - - target: $["paths"]["/links"]["get"] + - target: $["paths"]["/qr"]["get"] update: x-codeSamples: - lang: python - label: getLinks + label: getQRCode source: |- from dub import Dub @@ -16,23 +16,18 @@ actions: ) - res = s.links.list(request={ - "page": 1, - "page_size": 50, + res = s.qr_codes.get(request={ + "url": "https://brief-micronutrient.org", }) if res is not None: - while True: - # handle items - - res = res.Next() - if res is None: - break - - target: $["paths"]["/links/bulk"]["post"] + # handle response + pass + - target: $["paths"]["/track/lead"]["post"] update: x-codeSamples: - lang: python - label: bulkCreateLinks + label: trackLead source: |- from dub import Dub @@ -41,50 +36,44 @@ actions: ) - res = s.links.create_many(request=[ - { - "url": "https://google.com", - "external_id": "123456", - "tag_ids": [ - "clux0rgak00011...", - ], - }, - ]) + res = s.track.lead(request={ + "click_id": "", + "event_name": "Sign up", + "customer_id": "", + }) if res is not None: # handle response pass - - target: $["paths"]["/links/bulk"]["patch"] + - target: $["paths"]["/track/sale"]["post"] update: x-codeSamples: - lang: python - label: bulkUpdateLinks + label: trackSale source: |- from dub import Dub + from dub.models import operations s = Dub( token="DUB_API_KEY", ) - res = s.links.update_many(request={ - "link_ids": [ - "", - ], - "data": { - "url": "https://google.com", - "tag_ids": "[\"clux0rgak00011...\"]", - }, + res = s.track.sale(request={ + "customer_id": "", + "amount": 996500, + "payment_processor": operations.PaymentProcessor.SHOPIFY, + "event_name": "Purchase", }) if res is not None: # handle response pass - - target: $["paths"]["/qr"]["get"] + - target: $["paths"]["/track/customer"]["post"] update: x-codeSamples: - lang: python - label: getQRCode + label: trackCustomer source: |- from dub import Dub @@ -93,18 +82,16 @@ actions: ) - res = s.qr_codes.get(request={ - "url": "https://brief-micronutrient.org", - }) + res = s.track.customer() if res is not None: # handle response pass - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: x-codeSamples: - lang: python - label: getWorkspace + label: updateLink source: |- from dub import Dub @@ -113,18 +100,22 @@ actions: ) - res = s.workspaces.get(request={ - "id_or_slug": "", + res = s.links.update(link_id="", request_body={ + "url": "https://google.com", + "external_id": "123456", + "tag_ids": [ + "clux0rgak00011...", + ], }) if res is not None: # handle response pass - - target: $["paths"]["/track/lead"]["post"] + - target: $["paths"]["/links/bulk"]["patch"] update: x-codeSamples: - lang: python - label: trackLead + label: bulkUpdateLinks source: |- from dub import Dub @@ -133,44 +124,45 @@ actions: ) - res = s.track.lead(request={ - "click_id": "", - "event_name": "Sign up", - "customer_id": "", + res = s.links.update_many(request={ + "link_ids": [ + "", + ], + "data": { + "url": "https://google.com", + "tag_ids": "[\"clux0rgak00011...\"]", + }, }) if res is not None: # handle response pass - - target: $["paths"]["/track/sale"]["post"] + - target: $["paths"]["/links/info"]["get"] update: x-codeSamples: - lang: python - label: trackSale + label: getLinkInfo source: |- from dub import Dub - from dub.models import operations s = Dub( token="DUB_API_KEY", ) - res = s.track.sale(request={ - "customer_id": "", - "amount": 996500, - "payment_processor": operations.PaymentProcessor.SHOPIFY, - "event_name": "Purchase", + res = s.links.get(request={ + "link_id": "clux0rgak00011...", + "external_id": "ext_123456", }) if res is not None: # handle response pass - - target: $["paths"]["/links"]["post"] + - target: $["paths"]["/links/bulk"]["post"] update: x-codeSamples: - lang: python - label: createLink + label: bulkCreateLinks source: |- from dub import Dub @@ -179,20 +171,24 @@ actions: ) - res = s.links.create(request={ - "url": "https://google.com", - "external_id": "123456", - "tag_ids": "[\"clux0rgak00011...\"]", - }) + res = s.links.create_many(request=[ + { + "url": "https://google.com", + "external_id": "123456", + "tag_ids": [ + "clux0rgak00011...", + ], + }, + ]) if res is not None: # handle response pass - - target: $["paths"]["/links/{linkId}"]["patch"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] update: x-codeSamples: - lang: python - label: updateLink + label: updateWorkspace source: |- from dub import Dub @@ -201,22 +197,16 @@ actions: ) - res = s.links.update(link_id="", request_body={ - "url": "https://google.com", - "external_id": "123456", - "tag_ids": [ - "clux0rgak00011...", - ], - }) + res = s.workspaces.update(id_or_slug="") if res is not None: # handle response pass - - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + - target: $["paths"]["/tags/{id}"]["patch"] update: x-codeSamples: - lang: python - label: updateWorkspace + label: updateTag source: |- from dub import Dub @@ -225,16 +215,16 @@ actions: ) - res = s.workspaces.update(id_or_slug="") + res = s.tags.update(id="") if res is not None: # handle response pass - - target: $["paths"]["/tags"]["get"] + - target: $["paths"]["/links"]["post"] update: x-codeSamples: - lang: python - label: getTags + label: createLink source: |- from dub import Dub @@ -243,16 +233,20 @@ actions: ) - res = s.tags.list() + res = s.links.create(request={ + "url": "https://google.com", + "external_id": "123456", + "tag_ids": "[\"clux0rgak00011...\"]", + }) if res is not None: # handle response pass - - target: $["paths"]["/domains"]["post"] + - target: $["paths"]["/links/count"]["get"] update: x-codeSamples: - lang: python - label: createDomain + label: getLinksCount source: |- from dub import Dub @@ -261,21 +255,16 @@ actions: ) - res = s.domains.create(request={ - "slug": "acme.com", - "expired_url": "https://acme.com/expired", - "archived": False, - "placeholder": "https://dub.co/help/article/what-is-dub", - }) + res = s.links.count() if res is not None: # handle response pass - - target: $["paths"]["/domains/{slug}"]["patch"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: x-codeSamples: - lang: python - label: updateDomain + label: getWorkspace source: |- from dub import Dub @@ -284,21 +273,18 @@ actions: ) - res = s.domains.update(slug="acme.com", request_body={ - "slug": "acme.com", - "expired_url": "https://acme.com/expired", - "archived": False, - "placeholder": "https://dub.co/help/article/what-is-dub", + res = s.workspaces.get(request={ + "id_or_slug": "", }) if res is not None: # handle response pass - - target: $["paths"]["/links/info"]["get"] + - target: $["paths"]["/tags"]["post"] update: x-codeSamples: - lang: python - label: getLinkInfo + label: createTag source: |- from dub import Dub @@ -307,19 +293,16 @@ actions: ) - res = s.links.get(request={ - "link_id": "clux0rgak00011...", - "external_id": "ext_123456", - }) + res = s.tags.create() if res is not None: # handle response pass - - target: $["paths"]["/tags/{id}"]["patch"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: x-codeSamples: - lang: python - label: updateTag + label: updateDomain source: |- from dub import Dub @@ -328,16 +311,21 @@ actions: ) - res = s.tags.update(id="") + res = s.domains.update(slug="acme.com", request_body={ + "slug": "acme.com", + "expired_url": "https://acme.com/expired", + "archived": False, + "placeholder": "https://dub.co/help/article/what-is-dub", + }) if res is not None: # handle response pass - - target: $["paths"]["/track/customer"]["post"] + - target: $["paths"]["/metatags"]["get"] update: x-codeSamples: - lang: python - label: trackCustomer + label: getMetatags source: |- from dub import Dub @@ -346,16 +334,18 @@ actions: ) - res = s.track.customer() + res = s.metatags.get(request={ + "url": "https://dub.co", + }) if res is not None: # handle response pass - - target: $["paths"]["/domains/{slug}"]["delete"] + - target: $["paths"]["/links"]["get"] update: x-codeSamples: - lang: python - label: deleteDomain + label: getLinks source: |- from dub import Dub @@ -364,16 +354,48 @@ actions: ) - res = s.domains.delete(slug="acme.com") + res = s.links.list(request={ + "page": 1, + "page_size": 50, + }) + + if res is not None: + while True: + # handle items + + res = res.Next() + if res is None: + break + - target: $["paths"]["/analytics"]["get"] + update: + x-codeSamples: + - lang: python + label: retrieveAnalytics + source: |- + from dub import Dub + + s = Dub( + token="DUB_API_KEY", + ) + + + res = s.analytics.retrieve(request={ + "timezone": "America/New_York", + "city": "New York", + "device": "Desktop", + "browser": "Chrome", + "os": "Windows", + "referer": "google.com", + }) if res is not None: # handle response pass - - target: $["paths"]["/links/upsert"]["put"] + - target: $["paths"]["/links/bulk"]["delete"] update: x-codeSamples: - lang: python - label: upsertLink + label: bulkDeleteLinks source: |- from dub import Dub @@ -382,22 +404,18 @@ actions: ) - res = s.links.upsert(request={ - "url": "https://google.com", - "external_id": "123456", - "tag_ids": [ - "clux0rgak00011...", - ], + res = s.links.delete_many(request={ + "link_ids": "clux0rgak00011...,clux0rgak00022...", }) if res is not None: # handle response pass - - target: $["paths"]["/links/count"]["get"] + - target: $["paths"]["/events"]["get"] update: x-codeSamples: - lang: python - label: getLinksCount + label: listEvents source: |- from dub import Dub @@ -406,16 +424,23 @@ actions: ) - res = s.links.count() + res = s.events.list(request={ + "timezone": "America/New_York", + "city": "New York", + "device": "Desktop", + "browser": "Chrome", + "os": "Windows", + "referer": "google.com", + }) if res is not None: # handle response pass - - target: $["paths"]["/links/{linkId}"]["delete"] + - target: $["paths"]["/tags"]["get"] update: x-codeSamples: - lang: python - label: deleteLink + label: getTags source: |- from dub import Dub @@ -424,16 +449,16 @@ actions: ) - res = s.links.delete(link_id="") + res = s.tags.list() if res is not None: # handle response pass - - target: $["paths"]["/analytics"]["get"] + - target: $["paths"]["/domains"]["get"] update: x-codeSamples: - lang: python - label: retrieveAnalytics + label: listDomains source: |- from dub import Dub @@ -442,23 +467,23 @@ actions: ) - res = s.analytics.retrieve(request={ - "timezone": "America/New_York", - "city": "New York", - "device": "Desktop", - "browser": "Chrome", - "os": "Windows", - "referer": "google.com", + res = s.domains.list(request={ + "page": 1, + "page_size": 50, }) if res is not None: - # handle response - pass - - target: $["paths"]["/events"]["get"] + while True: + # handle items + + res = res.Next() + if res is None: + break + - target: $["paths"]["/domains"]["post"] update: x-codeSamples: - lang: python - label: listEvents + label: createDomain source: |- from dub import Dub @@ -467,23 +492,21 @@ actions: ) - res = s.events.list(request={ - "timezone": "America/New_York", - "city": "New York", - "device": "Desktop", - "browser": "Chrome", - "os": "Windows", - "referer": "google.com", + res = s.domains.create(request={ + "slug": "acme.com", + "expired_url": "https://acme.com/expired", + "archived": False, + "placeholder": "https://dub.co/help/article/what-is-dub", }) if res is not None: # handle response pass - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains/{slug}"]["delete"] update: x-codeSamples: - lang: python - label: createTag + label: deleteDomain source: |- from dub import Dub @@ -492,16 +515,16 @@ actions: ) - res = s.tags.create() + res = s.domains.delete(slug="acme.com") if res is not None: # handle response pass - - target: $["paths"]["/domains"]["get"] + - target: $["paths"]["/links/upsert"]["put"] update: x-codeSamples: - lang: python - label: listDomains + label: upsertLink source: |- from dub import Dub @@ -510,23 +533,22 @@ actions: ) - res = s.domains.list(request={ - "page": 1, - "page_size": 50, + res = s.links.upsert(request={ + "url": "https://google.com", + "external_id": "123456", + "tag_ids": [ + "clux0rgak00011...", + ], }) if res is not None: - while True: - # handle items - - res = res.Next() - if res is None: - break - - target: $["paths"]["/metatags"]["get"] + # handle response + pass + - target: $["paths"]["/links/{linkId}"]["delete"] update: x-codeSamples: - lang: python - label: getMetatags + label: deleteLink source: |- from dub import Dub @@ -535,9 +557,7 @@ actions: ) - res = s.metatags.get(request={ - "url": "https://dub.co", - }) + res = s.links.delete(link_id="") if res is not None: # handle response diff --git a/docs/models/components/clickevent.md b/docs/models/components/clickevent.md index 4ce6bbb..3e24a4c 100644 --- a/docs/models/components/clickevent.md +++ b/docs/models/components/clickevent.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `timestamp` | *str* | :heavy_check_mark: | N/A | -| `click_id` | *str* | :heavy_check_mark: | N/A | -| `link_id` | *str* | :heavy_check_mark: | N/A | -| `domain` | *str* | :heavy_check_mark: | N/A | -| `key` | *str* | :heavy_check_mark: | N/A | -| `url` | *str* | :heavy_check_mark: | N/A | -| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | -| `event` | [Optional[components.Event]](../../models/components/event.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `event` | [components.Event](../../models/components/event.md) | :heavy_check_mark: | N/A | +| `timestamp` | *str* | :heavy_check_mark: | N/A | +| `click_id` | *str* | :heavy_check_mark: | N/A | +| `link_id` | *str* | :heavy_check_mark: | N/A | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `key` | *str* | :heavy_check_mark: | N/A | +| `url` | *str* | :heavy_check_mark: | N/A | +| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/leadevent.md b/docs/models/components/leadevent.md index 895ae12..81aee94 100644 --- a/docs/models/components/leadevent.md +++ b/docs/models/components/leadevent.md @@ -3,26 +3,26 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `timestamp` | *str* | :heavy_check_mark: | N/A | -| `event_id` | *str* | :heavy_check_mark: | N/A | -| `event_name` | *str* | :heavy_check_mark: | N/A | -| `customer_name` | *str* | :heavy_check_mark: | N/A | -| `customer_email` | *str* | :heavy_check_mark: | N/A | -| `customer_avatar` | *str* | :heavy_check_mark: | N/A | -| `click_id` | *str* | :heavy_check_mark: | N/A | -| `link_id` | *str* | :heavy_check_mark: | N/A | -| `domain` | *str* | :heavy_check_mark: | N/A | -| `key` | *str* | :heavy_check_mark: | N/A | -| `url` | *str* | :heavy_check_mark: | N/A | -| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | -| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `event` | [Optional[components.LeadEventEvent]](../../models/components/leadeventevent.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `event` | [components.LeadEventEvent](../../models/components/leadeventevent.md) | :heavy_check_mark: | N/A | +| `timestamp` | *str* | :heavy_check_mark: | N/A | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `event_name` | *str* | :heavy_check_mark: | N/A | +| `customer_name` | *str* | :heavy_check_mark: | N/A | +| `customer_email` | *str* | :heavy_check_mark: | N/A | +| `customer_avatar` | *str* | :heavy_check_mark: | N/A | +| `click_id` | *str* | :heavy_check_mark: | N/A | +| `link_id` | *str* | :heavy_check_mark: | N/A | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `key` | *str* | :heavy_check_mark: | N/A | +| `url` | *str* | :heavy_check_mark: | N/A | +| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/saleevent.md b/docs/models/components/saleevent.md index 3e43027..974d00a 100644 --- a/docs/models/components/saleevent.md +++ b/docs/models/components/saleevent.md @@ -3,29 +3,29 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `timestamp` | *str* | :heavy_check_mark: | N/A | -| `event_id` | *str* | :heavy_check_mark: | N/A | -| `event_name` | *str* | :heavy_check_mark: | N/A | -| `customer_name` | *str* | :heavy_check_mark: | N/A | -| `customer_email` | *str* | :heavy_check_mark: | N/A | -| `customer_avatar` | *str* | :heavy_check_mark: | N/A | -| `payment_processor` | *str* | :heavy_check_mark: | N/A | -| `invoice_id` | *str* | :heavy_check_mark: | N/A | -| `sale_amount` | *float* | :heavy_check_mark: | N/A | -| `click_id` | *str* | :heavy_check_mark: | N/A | -| `link_id` | *str* | :heavy_check_mark: | N/A | -| `domain` | *str* | :heavy_check_mark: | N/A | -| `key` | *str* | :heavy_check_mark: | N/A | -| `url` | *str* | :heavy_check_mark: | N/A | -| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | -| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `event` | [Optional[components.SaleEventEvent]](../../models/components/saleeventevent.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `event` | [components.SaleEventEvent](../../models/components/saleeventevent.md) | :heavy_check_mark: | N/A | +| `timestamp` | *str* | :heavy_check_mark: | N/A | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `event_name` | *str* | :heavy_check_mark: | N/A | +| `customer_name` | *str* | :heavy_check_mark: | N/A | +| `customer_email` | *str* | :heavy_check_mark: | N/A | +| `customer_avatar` | *str* | :heavy_check_mark: | N/A | +| `payment_processor` | *str* | :heavy_check_mark: | N/A | +| `invoice_id` | *str* | :heavy_check_mark: | N/A | +| `sale_amount` | *float* | :heavy_check_mark: | N/A | +| `click_id` | *str* | :heavy_check_mark: | N/A | +| `link_id` | *str* | :heavy_check_mark: | N/A | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `key` | *str* | :heavy_check_mark: | N/A | +| `url` | *str* | :heavy_check_mark: | N/A | +| `continent` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `country` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `city` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `device` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `browser` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `os` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `referer` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `qr` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `ip` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bulkdeletelinksrequest.md b/docs/models/operations/bulkdeletelinksrequest.md new file mode 100644 index 0000000..5965444 --- /dev/null +++ b/docs/models/operations/bulkdeletelinksrequest.md @@ -0,0 +1,8 @@ +# BulkDeleteLinksRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `link_ids` | *str* | :heavy_check_mark: | Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. | clux0rgak00011...,clux0rgak00022... | \ No newline at end of file diff --git a/docs/models/operations/bulkdeletelinksresponsebody.md b/docs/models/operations/bulkdeletelinksresponsebody.md new file mode 100644 index 0000000..a45d6ad --- /dev/null +++ b/docs/models/operations/bulkdeletelinksresponsebody.md @@ -0,0 +1,10 @@ +# BulkDeleteLinksResponseBody + +The deleted links count. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `deleted_count` | *float* | :heavy_check_mark: | The number of links deleted. | \ No newline at end of file diff --git a/docs/models/operations/click.md b/docs/models/operations/click.md index 9bdea28..2f21314 100644 --- a/docs/models/operations/click.md +++ b/docs/models/operations/click.md @@ -5,16 +5,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *str* | :heavy_check_mark: | N/A | -| `ip` | *str* | :heavy_check_mark: | N/A | -| `continent` | *str* | :heavy_check_mark: | N/A | -| `country` | *str* | :heavy_check_mark: | N/A | -| `city` | *str* | :heavy_check_mark: | N/A | -| `device` | *str* | :heavy_check_mark: | N/A | -| `browser` | *str* | :heavy_check_mark: | N/A | -| `os` | *str* | :heavy_check_mark: | N/A | -| `ua` | *str* | :heavy_check_mark: | N/A | -| `bot` | *bool* | :heavy_check_mark: | N/A | -| `qr` | *bool* | :heavy_check_mark: | N/A | -| `referer` | *str* | :heavy_check_mark: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/geo.md b/docs/models/operations/geo.md deleted file mode 100644 index 7b08039..0000000 --- a/docs/models/operations/geo.md +++ /dev/null @@ -1,259 +0,0 @@ -# Geo - -Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `af` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `al` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `as_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ad` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ao` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ai` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `aq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ag` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ar` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `am` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `aw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `au` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `at` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `az` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `be` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ba` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `br` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `io` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ca` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ky` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `td` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `co` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `km` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ck` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ci` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `do` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ec` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `eg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `er` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ee` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `et` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ga` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ge` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `de` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ht` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `va` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `is_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `in_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ir` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `iq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ie` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `il` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `it` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ke` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ki` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `la` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ls` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ly` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `li` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `my` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ml` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `yt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `md` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ms` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ma` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `na` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `np` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ni` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ne` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ng` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `no` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `om` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ps` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `py` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pe` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ph` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `qa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `re` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ro` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ru` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `rw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ws` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `st` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `si` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `so` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `za` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `es` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `se` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ch` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `th` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `to` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ug` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ua` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ae` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `us` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `um` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `uy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `uz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ve` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `wf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `eh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ye` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ax` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `im` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `je` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `me` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `rs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ss` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `xk` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/link.md b/docs/models/operations/link.md deleted file mode 100644 index e147177..0000000 --- a/docs/models/operations/link.md +++ /dev/null @@ -1,45 +0,0 @@ -# Link - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique ID of the short link. | -| `domain` | *str* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | -| `key` | *str* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `external_id` | *Nullable[str]* | :heavy_check_mark: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | -| `url` | *str* | :heavy_check_mark: | The destination URL of the short link. | -| `expires_at` | *Nullable[str]* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | -| `expired_url` | *Nullable[str]* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | -| `password` | *Nullable[str]* | :heavy_check_mark: | The password required to access the destination URL of the short link. | -| `title` | *Nullable[str]* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `image` | *Nullable[str]* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `video` | *Nullable[str]* | :heavy_check_mark: | The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og | -| `ios` | *Nullable[str]* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | -| `android` | *Nullable[str]* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | -| `geo` | [Nullable[operations.Geo]](../../models/operations/geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | -| `comments` | *Nullable[str]* | :heavy_check_mark: | The comments for the short link. | -| `short_link` | *str* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | -| `qr_code` | *str* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | -| `utm_source` | *Nullable[str]* | :heavy_check_mark: | The UTM source of the short link. | -| `utm_medium` | *Nullable[str]* | :heavy_check_mark: | The UTM medium of the short link. | -| `utm_campaign` | *Nullable[str]* | :heavy_check_mark: | The UTM campaign of the short link. | -| `utm_term` | *Nullable[str]* | :heavy_check_mark: | The UTM term of the short link. | -| `utm_content` | *Nullable[str]* | :heavy_check_mark: | The UTM content of the short link. | -| `user_id` | *str* | :heavy_check_mark: | The user ID of the creator of the short link. | -| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID of the short link. | -| `last_clicked` | *Nullable[str]* | :heavy_check_mark: | The date and time when the short link was last clicked. | -| `created_at` | *str* | :heavy_check_mark: | The date and time when the short link was created. | -| `updated_at` | *str* | :heavy_check_mark: | The date and time when the short link was last updated. | -| `track_conversion` | *Optional[bool]* | :heavy_minus_sign: | [BETA] Whether to track conversions for the short link. | -| `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link is archived. | -| `proxy` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | -| `rewrite` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link uses link cloaking. | -| `do_index` | *Optional[bool]* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | -| `public_stats` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | -| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | \ No newline at end of file diff --git a/docs/models/operations/sale.md b/docs/models/operations/sale.md index 0ce7d87..ba512f8 100644 --- a/docs/models/operations/sale.md +++ b/docs/models/operations/sale.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | ------------------- | ------------------- | ------------------- | ------------------- | | `amount` | *float* | :heavy_check_mark: | N/A | +| `currency` | *str* | :heavy_check_mark: | N/A | | `payment_processor` | *str* | :heavy_check_mark: | N/A | | `invoice_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `currency` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/trackleadresponsebody.md b/docs/models/operations/trackleadresponsebody.md index 80315cd..d963382 100644 --- a/docs/models/operations/trackleadresponsebody.md +++ b/docs/models/operations/trackleadresponsebody.md @@ -7,7 +7,5 @@ A lead was tracked. | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `event_name` | *str* | :heavy_check_mark: | N/A | -| `customer` | [operations.Customer](../../models/operations/customer.md) | :heavy_check_mark: | N/A | | `click` | [operations.Click](../../models/operations/click.md) | :heavy_check_mark: | N/A | -| `link` | [operations.Link](../../models/operations/link.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `customer` | [operations.Customer](../../models/operations/customer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksaleclick.md b/docs/models/operations/tracksaleclick.md deleted file mode 100644 index 690ff47..0000000 --- a/docs/models/operations/tracksaleclick.md +++ /dev/null @@ -1,20 +0,0 @@ -# TrackSaleClick - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *str* | :heavy_check_mark: | N/A | -| `ip` | *str* | :heavy_check_mark: | N/A | -| `continent` | *str* | :heavy_check_mark: | N/A | -| `country` | *str* | :heavy_check_mark: | N/A | -| `city` | *str* | :heavy_check_mark: | N/A | -| `device` | *str* | :heavy_check_mark: | N/A | -| `browser` | *str* | :heavy_check_mark: | N/A | -| `os` | *str* | :heavy_check_mark: | N/A | -| `ua` | *str* | :heavy_check_mark: | N/A | -| `bot` | *bool* | :heavy_check_mark: | N/A | -| `qr` | *bool* | :heavy_check_mark: | N/A | -| `referer` | *str* | :heavy_check_mark: | N/A | -| `id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksalegeo.md b/docs/models/operations/tracksalegeo.md deleted file mode 100644 index 12c5c6c..0000000 --- a/docs/models/operations/tracksalegeo.md +++ /dev/null @@ -1,259 +0,0 @@ -# TrackSaleGeo - -Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `af` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `al` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `as_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ad` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ao` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ai` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `aq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ag` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ar` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `am` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `aw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `au` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `at` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `az` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `be` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ba` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `br` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `io` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ca` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ky` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `td` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `co` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `km` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ck` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ci` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `dm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `do` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ec` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `eg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `er` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ee` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `et` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ga` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ge` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `de` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ht` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `va` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `hu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `is_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `in_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ir` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `iq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ie` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `il` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `it` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `jo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ke` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ki` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `la` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ls` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ly` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `li` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mo` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `my` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ml` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `yt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `md` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ms` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ma` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `na` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `np` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ni` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ne` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ng` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `nf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mp` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `no` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `om` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ps` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `py` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pe` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ph` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `qa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `re` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ro` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ru` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `rw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `kn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `pm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ws` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `st` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sa` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `si` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `so` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `za` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `es` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `lk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sd` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `se` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ch` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tj` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `th` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tk` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `to` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tr` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tc` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `tv` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ug` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ua` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ae` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gb` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `us` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `um` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `uy` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `uz` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vu` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ve` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `vi` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `wf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `eh` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ye` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zm` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ax` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bq` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `cw` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `gg` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `im` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `je` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `me` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `bl` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mf` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `rs` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sx` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ss` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `xk` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksalelink.md b/docs/models/operations/tracksalelink.md deleted file mode 100644 index 95b358d..0000000 --- a/docs/models/operations/tracksalelink.md +++ /dev/null @@ -1,45 +0,0 @@ -# TrackSaleLink - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique ID of the short link. | -| `domain` | *str* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | -| `key` | *str* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `external_id` | *Nullable[str]* | :heavy_check_mark: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | -| `url` | *str* | :heavy_check_mark: | The destination URL of the short link. | -| `expires_at` | *Nullable[str]* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | -| `expired_url` | *Nullable[str]* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | -| `password` | *Nullable[str]* | :heavy_check_mark: | The password required to access the destination URL of the short link. | -| `title` | *Nullable[str]* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `image` | *Nullable[str]* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `video` | *Nullable[str]* | :heavy_check_mark: | The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og | -| `ios` | *Nullable[str]* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | -| `android` | *Nullable[str]* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | -| `geo` | [Nullable[operations.TrackSaleGeo]](../../models/operations/tracksalegeo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | -| `comments` | *Nullable[str]* | :heavy_check_mark: | The comments for the short link. | -| `short_link` | *str* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | -| `qr_code` | *str* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | -| `utm_source` | *Nullable[str]* | :heavy_check_mark: | The UTM source of the short link. | -| `utm_medium` | *Nullable[str]* | :heavy_check_mark: | The UTM medium of the short link. | -| `utm_campaign` | *Nullable[str]* | :heavy_check_mark: | The UTM campaign of the short link. | -| `utm_term` | *Nullable[str]* | :heavy_check_mark: | The UTM term of the short link. | -| `utm_content` | *Nullable[str]* | :heavy_check_mark: | The UTM content of the short link. | -| `user_id` | *str* | :heavy_check_mark: | The user ID of the creator of the short link. | -| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID of the short link. | -| `last_clicked` | *Nullable[str]* | :heavy_check_mark: | The date and time when the short link was last clicked. | -| `created_at` | *str* | :heavy_check_mark: | The date and time when the short link was created. | -| `updated_at` | *str* | :heavy_check_mark: | The date and time when the short link was last updated. | -| `track_conversion` | *Optional[bool]* | :heavy_minus_sign: | [BETA] Whether to track conversions for the short link. | -| `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link is archived. | -| `proxy` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | -| `rewrite` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link uses link cloaking. | -| `do_index` | *Optional[bool]* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | -| `public_stats` | *Optional[bool]* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | -| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | \ No newline at end of file diff --git a/docs/models/operations/tracksaleresponsebody.md b/docs/models/operations/tracksaleresponsebody.md index 2e18a6c..dc877f6 100644 --- a/docs/models/operations/tracksaleresponsebody.md +++ b/docs/models/operations/tracksaleresponsebody.md @@ -9,6 +9,4 @@ A sale was tracked. | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `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 | -| `click` | [operations.TrackSaleClick](../../models/operations/tracksaleclick.md) | :heavy_check_mark: | N/A | -| `link` | [operations.TrackSaleLink](../../models/operations/tracksalelink.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `sale` | [operations.Sale](../../models/operations/sale.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index c28d8e0..9d71e92 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -12,6 +12,7 @@ * [delete](#delete) - Delete a link * [update](#update) - Update a link * [create_many](#create_many) - Bulk create links +* [delete_many](#delete_many) - Bulk delete links * [update_many](#update_many) - Bulk update links * [upsert](#upsert) - Upsert a link @@ -388,6 +389,57 @@ if res is not None: | errors.SDKError | 4xx-5xx | */* | +## delete_many + +Bulk delete up to 100 links for the authenticated workspace. + +### Example Usage + +```python +from dub import Dub + +s = Dub( + token="DUB_API_KEY", +) + + +res = s.links.delete_many(request={ + "link_ids": "clux0rgak00011...,clux0rgak00022...", +}) + +if res is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.BulkDeleteLinksRequest](../../models/operations/bulkdeletelinksrequest.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 + +**[operations.BulkDeleteLinksResponseBody](../../models/operations/bulkdeletelinksresponsebody.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + ## update_many Bulk update up to 100 links with the same data for the authenticated workspace. diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 8e27b52..deb0e9f 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -120,7 +120,7 @@ s = Dub( ) -res = s.tags.update(id="") +res = s.tags.update(id="") if res is not None: # handle response diff --git a/pylintrc b/pylintrc index aa04b9f..e3f8045 100644 --- a/pylintrc +++ b/pylintrc @@ -191,8 +191,6 @@ good-names=i, os, qr, id, - ip, - ua, af, al, dz, @@ -409,6 +407,7 @@ good-names=i, tc, tv, ug, + ua, ae, gb, us, @@ -437,7 +436,8 @@ good-names=i, rs, sx, ss, - xk + xk, + ip # Good variable names regexes, separated by a comma. If names match any regex, # they will always be accepted diff --git a/pyproject.toml b/pyproject.toml index d75b09e..4632fbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dub" -version = "0.7.3" +version = "0.7.4" description = "Python Client SDK Generated by Speakeasy" authors = ["Speakeasy",] readme = "README-PYPI.md" diff --git a/src/dub/links.py b/src/dub/links.py index 3101182..c61579e 100644 --- a/src/dub/links.py +++ b/src/dub/links.py @@ -1515,6 +1515,210 @@ async def create_many_async( + def delete_many( + self, *, + request: Union[operations.BulkDeleteLinksRequest, operations.BulkDeleteLinksRequestTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[operations.BulkDeleteLinksResponseBody]: + r"""Bulk delete links + + Bulk delete up to 100 links for the authenticated workspace. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.BulkDeleteLinksRequest) + request = cast(operations.BulkDeleteLinksRequest, request) + + req = self.build_request( + method="DELETE", + path="/links/bulk", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, [ + "429", + "500", + "502", + "503", + "504" + ]) + + http_res = self.do_request( + hook_ctx=HookContext(operation_id="bulkDeleteLinks", oauth2_scopes=[], security_source=self.sdk_configuration.security), + request=req, + error_status_codes=["400","401","403","404","409","410","422","429","4XX","500","5XX"], + retry_config=retry_config + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[operations.BulkDeleteLinksResponseBody]) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.BadRequestData) + raise errors.BadRequest(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData) + raise errors.Unauthorized(data=data) + if utils.match_response(http_res, "403", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.ForbiddenData) + raise errors.Forbidden(data=data) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.NotFoundData) + raise errors.NotFound(data=data) + if utils.match_response(http_res, "409", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.ConflictData) + raise errors.Conflict(data=data) + if utils.match_response(http_res, "410", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.InviteExpiredData) + raise errors.InviteExpired(data=data) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.UnprocessableEntityData) + raise errors.UnprocessableEntity(data=data) + if utils.match_response(http_res, "429", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.RateLimitExceededData) + raise errors.RateLimitExceeded(data=data) + 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"], "*"): + raise errors.SDKError("API error occurred", http_res.status_code, http_res.text, http_res) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError(f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, http_res.text, http_res) + + + + async def delete_many_async( + self, *, + request: Union[operations.BulkDeleteLinksRequest, operations.BulkDeleteLinksRequestTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[operations.BulkDeleteLinksResponseBody]: + r"""Bulk delete links + + Bulk delete up to 100 links for the authenticated workspace. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.BulkDeleteLinksRequest) + request = cast(operations.BulkDeleteLinksRequest, request) + + req = self.build_request( + method="DELETE", + path="/links/bulk", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, [ + "429", + "500", + "502", + "503", + "504" + ]) + + http_res = await self.do_request_async( + hook_ctx=HookContext(operation_id="bulkDeleteLinks", oauth2_scopes=[], security_source=self.sdk_configuration.security), + request=req, + error_status_codes=["400","401","403","404","409","410","422","429","4XX","500","5XX"], + retry_config=retry_config + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[operations.BulkDeleteLinksResponseBody]) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.BadRequestData) + raise errors.BadRequest(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData) + raise errors.Unauthorized(data=data) + if utils.match_response(http_res, "403", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.ForbiddenData) + raise errors.Forbidden(data=data) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.NotFoundData) + raise errors.NotFound(data=data) + if utils.match_response(http_res, "409", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.ConflictData) + raise errors.Conflict(data=data) + if utils.match_response(http_res, "410", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.InviteExpiredData) + raise errors.InviteExpired(data=data) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.UnprocessableEntityData) + raise errors.UnprocessableEntity(data=data) + if utils.match_response(http_res, "429", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.RateLimitExceededData) + raise errors.RateLimitExceeded(data=data) + 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"], "*"): + raise errors.SDKError("API error occurred", http_res.status_code, http_res.text, http_res) + + content_type = http_res.headers.get("Content-Type") + raise errors.SDKError(f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, http_res.text, http_res) + + + def update_many( self, *, request: Optional[Union[operations.BulkUpdateLinksRequestBody, operations.BulkUpdateLinksRequestBodyTypedDict]] = None, diff --git a/src/dub/models/components/clickevent.py b/src/dub/models/components/clickevent.py index a05f5f8..b358b77 100644 --- a/src/dub/models/components/clickevent.py +++ b/src/dub/models/components/clickevent.py @@ -4,14 +4,14 @@ from dub.types import BaseModel, Nullable, UNSET_SENTINEL from enum import Enum from pydantic import model_serializer -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import TypedDict class Event(str, Enum): CLICK = "click" class ClickEventTypedDict(TypedDict): + event: Event timestamp: str click_id: str link_id: str @@ -27,10 +27,10 @@ class ClickEventTypedDict(TypedDict): referer: Nullable[str] ip: Nullable[str] qr: Nullable[float] - event: NotRequired[Event] class ClickEvent(BaseModel): + event: Event timestamp: str click_id: str link_id: str @@ -46,11 +46,10 @@ class ClickEvent(BaseModel): referer: Nullable[str] ip: Nullable[str] qr: Nullable[float] - event: Optional[Event] = Event.CLICK @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["event"] + optional_fields = [] nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "ip", "qr"] null_default_fields = [] diff --git a/src/dub/models/components/leadevent.py b/src/dub/models/components/leadevent.py index 1d423da..37f7d76 100644 --- a/src/dub/models/components/leadevent.py +++ b/src/dub/models/components/leadevent.py @@ -4,14 +4,14 @@ from dub.types import BaseModel, Nullable, UNSET_SENTINEL from enum import Enum from pydantic import model_serializer -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import TypedDict class LeadEventEvent(str, Enum): LEAD = "lead" class LeadEventTypedDict(TypedDict): + event: LeadEventEvent timestamp: str event_id: str event_name: str @@ -32,10 +32,10 @@ class LeadEventTypedDict(TypedDict): referer: Nullable[str] qr: Nullable[float] ip: Nullable[str] - event: NotRequired[LeadEventEvent] class LeadEvent(BaseModel): + event: LeadEventEvent timestamp: str event_id: str event_name: str @@ -56,11 +56,10 @@ class LeadEvent(BaseModel): referer: Nullable[str] qr: Nullable[float] ip: Nullable[str] - event: Optional[LeadEventEvent] = LeadEventEvent.LEAD @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["event"] + optional_fields = [] nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "qr", "ip"] null_default_fields = [] diff --git a/src/dub/models/components/saleevent.py b/src/dub/models/components/saleevent.py index 2cfd962..3bc4657 100644 --- a/src/dub/models/components/saleevent.py +++ b/src/dub/models/components/saleevent.py @@ -5,14 +5,15 @@ from enum import Enum import pydantic from pydantic import model_serializer -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import TypedDict +from typing_extensions import Annotated class SaleEventEvent(str, Enum): SALE = "sale" class SaleEventTypedDict(TypedDict): + event: SaleEventEvent timestamp: str event_id: str event_name: str @@ -36,10 +37,10 @@ class SaleEventTypedDict(TypedDict): referer: Nullable[str] qr: Nullable[float] ip: Nullable[str] - event: NotRequired[SaleEventEvent] class SaleEvent(BaseModel): + event: SaleEventEvent timestamp: str event_id: str event_name: str @@ -63,11 +64,10 @@ class SaleEvent(BaseModel): referer: Nullable[str] qr: Nullable[float] ip: Nullable[str] - event: Optional[SaleEventEvent] = SaleEventEvent.SALE @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["event"] + optional_fields = [] nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "qr", "ip"] null_default_fields = [] diff --git a/src/dub/models/operations/__init__.py b/src/dub/models/operations/__init__.py index 4bff3cb..44ac21d 100644 --- a/src/dub/models/operations/__init__.py +++ b/src/dub/models/operations/__init__.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .bulkcreatelinks import BulkCreateLinksTagIds, BulkCreateLinksTagIdsTypedDict, BulkCreateLinksTagNames, BulkCreateLinksTagNamesTypedDict, RequestBody, RequestBodyTypedDict +from .bulkdeletelinks import BulkDeleteLinksRequest, BulkDeleteLinksRequestTypedDict, BulkDeleteLinksResponseBody, BulkDeleteLinksResponseBodyTypedDict from .bulkupdatelinks import BulkUpdateLinksRequestBody, BulkUpdateLinksRequestBodyTypedDict, BulkUpdateLinksTagIds, BulkUpdateLinksTagIdsTypedDict, BulkUpdateLinksTagNames, BulkUpdateLinksTagNamesTypedDict, Data, DataTypedDict from .createdomain import CreateDomainRequestBody, CreateDomainRequestBodyTypedDict from .createlink import CreateLinkRequestBody, CreateLinkRequestBodyTypedDict, TagIds, TagIdsTypedDict, TagNames, TagNamesTypedDict @@ -17,12 +18,12 @@ from .listevents import ListEventsRequest, ListEventsRequestTypedDict, ListEventsResponseBody, ListEventsResponseBodyTypedDict, Order, QueryParamEvent, QueryParamInterval, SortBy from .retrieveanalytics import Event, Interval, QueryParamGroupBy, RetrieveAnalyticsRequest, RetrieveAnalyticsRequestTypedDict, RetrieveAnalyticsResponseBody, RetrieveAnalyticsResponseBodyTypedDict from .trackcustomer import TrackCustomerRequestBody, TrackCustomerRequestBodyTypedDict, TrackCustomerResponseBody, TrackCustomerResponseBodyTypedDict -from .tracklead import Click, ClickTypedDict, Customer, CustomerTypedDict, Geo, GeoTypedDict, Link, LinkTypedDict, TrackLeadRequestBody, TrackLeadRequestBodyTypedDict, TrackLeadResponseBody, TrackLeadResponseBodyTypedDict -from .tracksale import PaymentProcessor, Sale, SaleTypedDict, TrackSaleClick, TrackSaleClickTypedDict, TrackSaleCustomer, TrackSaleCustomerTypedDict, TrackSaleGeo, TrackSaleGeoTypedDict, TrackSaleLink, TrackSaleLinkTypedDict, TrackSaleRequestBody, TrackSaleRequestBodyTypedDict, TrackSaleResponseBody, TrackSaleResponseBodyTypedDict +from .tracklead import Click, ClickTypedDict, Customer, CustomerTypedDict, TrackLeadRequestBody, TrackLeadRequestBodyTypedDict, TrackLeadResponseBody, TrackLeadResponseBodyTypedDict +from .tracksale import PaymentProcessor, Sale, SaleTypedDict, TrackSaleCustomer, TrackSaleCustomerTypedDict, TrackSaleRequestBody, TrackSaleRequestBodyTypedDict, TrackSaleResponseBody, TrackSaleResponseBodyTypedDict from .updatedomain import UpdateDomainRequest, UpdateDomainRequestBody, UpdateDomainRequestBodyTypedDict, UpdateDomainRequestTypedDict from .updatelink import UpdateLinkRequest, UpdateLinkRequestBody, UpdateLinkRequestBodyTypedDict, UpdateLinkRequestTypedDict, UpdateLinkTagIds, UpdateLinkTagIdsTypedDict, UpdateLinkTagNames, UpdateLinkTagNamesTypedDict from .updatetag import UpdateTagColor, UpdateTagRequest, UpdateTagRequestBody, UpdateTagRequestBodyTypedDict, UpdateTagRequestTypedDict from .updateworkspace import UpdateWorkspaceRequest, UpdateWorkspaceRequestBody, UpdateWorkspaceRequestBodyTypedDict, UpdateWorkspaceRequestTypedDict from .upsertlink import UpsertLinkRequestBody, UpsertLinkRequestBodyTypedDict, UpsertLinkTagIds, UpsertLinkTagIdsTypedDict, UpsertLinkTagNames, UpsertLinkTagNamesTypedDict -__all__ = ["BulkCreateLinksTagIds", "BulkCreateLinksTagIdsTypedDict", "BulkCreateLinksTagNames", "BulkCreateLinksTagNamesTypedDict", "BulkUpdateLinksRequestBody", "BulkUpdateLinksRequestBodyTypedDict", "BulkUpdateLinksTagIds", "BulkUpdateLinksTagIdsTypedDict", "BulkUpdateLinksTagNames", "BulkUpdateLinksTagNamesTypedDict", "Click", "ClickTypedDict", "Color", "CreateDomainRequestBody", "CreateDomainRequestBodyTypedDict", "CreateLinkRequestBody", "CreateLinkRequestBodyTypedDict", "CreateTagRequestBody", "CreateTagRequestBodyTypedDict", "Customer", "CustomerTypedDict", "Data", "DataTypedDict", "DeleteDomainRequest", "DeleteDomainRequestTypedDict", "DeleteDomainResponseBody", "DeleteDomainResponseBodyTypedDict", "DeleteLinkRequest", "DeleteLinkRequestTypedDict", "DeleteLinkResponseBody", "DeleteLinkResponseBodyTypedDict", "Event", "Geo", "GeoTypedDict", "GetLinkInfoRequest", "GetLinkInfoRequestTypedDict", "GetLinksCountQueryParamTagIds", "GetLinksCountQueryParamTagIdsTypedDict", "GetLinksCountQueryParamTagNames", "GetLinksCountQueryParamTagNamesTypedDict", "GetLinksCountRequest", "GetLinksCountRequestTypedDict", "GetLinksRequest", "GetLinksRequestTypedDict", "GetLinksResponse", "GetLinksResponseTypedDict", "GetMetatagsRequest", "GetMetatagsRequestTypedDict", "GetMetatagsResponseBody", "GetMetatagsResponseBodyTypedDict", "GetQRCodeRequest", "GetQRCodeRequestTypedDict", "GetWorkspaceRequest", "GetWorkspaceRequestTypedDict", "GroupBy", "GroupByTypedDict", "Interval", "Level", "Link", "LinkTypedDict", "ListDomainsRequest", "ListDomainsRequestTypedDict", "ListDomainsResponse", "ListDomainsResponseTypedDict", "ListEventsRequest", "ListEventsRequestTypedDict", "ListEventsResponseBody", "ListEventsResponseBodyTypedDict", "One", "Order", "PaymentProcessor", "QueryParamEvent", "QueryParamGroupBy", "QueryParamInterval", "QueryParamTagIds", "QueryParamTagIdsTypedDict", "QueryParamTagNames", "QueryParamTagNamesTypedDict", "RequestBody", "RequestBodyTypedDict", "RetrieveAnalyticsRequest", "RetrieveAnalyticsRequestTypedDict", "RetrieveAnalyticsResponseBody", "RetrieveAnalyticsResponseBodyTypedDict", "Sale", "SaleTypedDict", "Sort", "SortBy", "TagIds", "TagIdsTypedDict", "TagNames", "TagNamesTypedDict", "Three", "TrackCustomerRequestBody", "TrackCustomerRequestBodyTypedDict", "TrackCustomerResponseBody", "TrackCustomerResponseBodyTypedDict", "TrackLeadRequestBody", "TrackLeadRequestBodyTypedDict", "TrackLeadResponseBody", "TrackLeadResponseBodyTypedDict", "TrackSaleClick", "TrackSaleClickTypedDict", "TrackSaleCustomer", "TrackSaleCustomerTypedDict", "TrackSaleGeo", "TrackSaleGeoTypedDict", "TrackSaleLink", "TrackSaleLinkTypedDict", "TrackSaleRequestBody", "TrackSaleRequestBodyTypedDict", "TrackSaleResponseBody", "TrackSaleResponseBodyTypedDict", "Two", "UpdateDomainRequest", "UpdateDomainRequestBody", "UpdateDomainRequestBodyTypedDict", "UpdateDomainRequestTypedDict", "UpdateLinkRequest", "UpdateLinkRequestBody", "UpdateLinkRequestBodyTypedDict", "UpdateLinkRequestTypedDict", "UpdateLinkTagIds", "UpdateLinkTagIdsTypedDict", "UpdateLinkTagNames", "UpdateLinkTagNamesTypedDict", "UpdateTagColor", "UpdateTagRequest", "UpdateTagRequestBody", "UpdateTagRequestBodyTypedDict", "UpdateTagRequestTypedDict", "UpdateWorkspaceRequest", "UpdateWorkspaceRequestBody", "UpdateWorkspaceRequestBodyTypedDict", "UpdateWorkspaceRequestTypedDict", "UpsertLinkRequestBody", "UpsertLinkRequestBodyTypedDict", "UpsertLinkTagIds", "UpsertLinkTagIdsTypedDict", "UpsertLinkTagNames", "UpsertLinkTagNamesTypedDict"] +__all__ = ["BulkCreateLinksTagIds", "BulkCreateLinksTagIdsTypedDict", "BulkCreateLinksTagNames", "BulkCreateLinksTagNamesTypedDict", "BulkDeleteLinksRequest", "BulkDeleteLinksRequestTypedDict", "BulkDeleteLinksResponseBody", "BulkDeleteLinksResponseBodyTypedDict", "BulkUpdateLinksRequestBody", "BulkUpdateLinksRequestBodyTypedDict", "BulkUpdateLinksTagIds", "BulkUpdateLinksTagIdsTypedDict", "BulkUpdateLinksTagNames", "BulkUpdateLinksTagNamesTypedDict", "Click", "ClickTypedDict", "Color", "CreateDomainRequestBody", "CreateDomainRequestBodyTypedDict", "CreateLinkRequestBody", "CreateLinkRequestBodyTypedDict", "CreateTagRequestBody", "CreateTagRequestBodyTypedDict", "Customer", "CustomerTypedDict", "Data", "DataTypedDict", "DeleteDomainRequest", "DeleteDomainRequestTypedDict", "DeleteDomainResponseBody", "DeleteDomainResponseBodyTypedDict", "DeleteLinkRequest", "DeleteLinkRequestTypedDict", "DeleteLinkResponseBody", "DeleteLinkResponseBodyTypedDict", "Event", "GetLinkInfoRequest", "GetLinkInfoRequestTypedDict", "GetLinksCountQueryParamTagIds", "GetLinksCountQueryParamTagIdsTypedDict", "GetLinksCountQueryParamTagNames", "GetLinksCountQueryParamTagNamesTypedDict", "GetLinksCountRequest", "GetLinksCountRequestTypedDict", "GetLinksRequest", "GetLinksRequestTypedDict", "GetLinksResponse", "GetLinksResponseTypedDict", "GetMetatagsRequest", "GetMetatagsRequestTypedDict", "GetMetatagsResponseBody", "GetMetatagsResponseBodyTypedDict", "GetQRCodeRequest", "GetQRCodeRequestTypedDict", "GetWorkspaceRequest", "GetWorkspaceRequestTypedDict", "GroupBy", "GroupByTypedDict", "Interval", "Level", "ListDomainsRequest", "ListDomainsRequestTypedDict", "ListDomainsResponse", "ListDomainsResponseTypedDict", "ListEventsRequest", "ListEventsRequestTypedDict", "ListEventsResponseBody", "ListEventsResponseBodyTypedDict", "One", "Order", "PaymentProcessor", "QueryParamEvent", "QueryParamGroupBy", "QueryParamInterval", "QueryParamTagIds", "QueryParamTagIdsTypedDict", "QueryParamTagNames", "QueryParamTagNamesTypedDict", "RequestBody", "RequestBodyTypedDict", "RetrieveAnalyticsRequest", "RetrieveAnalyticsRequestTypedDict", "RetrieveAnalyticsResponseBody", "RetrieveAnalyticsResponseBodyTypedDict", "Sale", "SaleTypedDict", "Sort", "SortBy", "TagIds", "TagIdsTypedDict", "TagNames", "TagNamesTypedDict", "Three", "TrackCustomerRequestBody", "TrackCustomerRequestBodyTypedDict", "TrackCustomerResponseBody", "TrackCustomerResponseBodyTypedDict", "TrackLeadRequestBody", "TrackLeadRequestBodyTypedDict", "TrackLeadResponseBody", "TrackLeadResponseBodyTypedDict", "TrackSaleCustomer", "TrackSaleCustomerTypedDict", "TrackSaleRequestBody", "TrackSaleRequestBodyTypedDict", "TrackSaleResponseBody", "TrackSaleResponseBodyTypedDict", "Two", "UpdateDomainRequest", "UpdateDomainRequestBody", "UpdateDomainRequestBodyTypedDict", "UpdateDomainRequestTypedDict", "UpdateLinkRequest", "UpdateLinkRequestBody", "UpdateLinkRequestBodyTypedDict", "UpdateLinkRequestTypedDict", "UpdateLinkTagIds", "UpdateLinkTagIdsTypedDict", "UpdateLinkTagNames", "UpdateLinkTagNamesTypedDict", "UpdateTagColor", "UpdateTagRequest", "UpdateTagRequestBody", "UpdateTagRequestBodyTypedDict", "UpdateTagRequestTypedDict", "UpdateWorkspaceRequest", "UpdateWorkspaceRequestBody", "UpdateWorkspaceRequestBodyTypedDict", "UpdateWorkspaceRequestTypedDict", "UpsertLinkRequestBody", "UpsertLinkRequestBodyTypedDict", "UpsertLinkTagIds", "UpsertLinkTagIdsTypedDict", "UpsertLinkTagNames", "UpsertLinkTagNamesTypedDict"] diff --git a/src/dub/models/operations/bulkdeletelinks.py b/src/dub/models/operations/bulkdeletelinks.py new file mode 100644 index 0000000..256f9a8 --- /dev/null +++ b/src/dub/models/operations/bulkdeletelinks.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +from dub.utils import FieldMetadata, QueryParamMetadata +import pydantic +from typing import TypedDict +from typing_extensions import Annotated + + +class BulkDeleteLinksRequestTypedDict(TypedDict): + link_ids: str + r"""Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored.""" + + +class BulkDeleteLinksRequest(BaseModel): + link_ids: Annotated[str, pydantic.Field(alias="linkIds"), FieldMetadata(query=QueryParamMetadata(style="form", explode=True))] + r"""Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored.""" + + +class BulkDeleteLinksResponseBodyTypedDict(TypedDict): + r"""The deleted links count.""" + + deleted_count: float + r"""The number of links deleted.""" + + +class BulkDeleteLinksResponseBody(BaseModel): + r"""The deleted links count.""" + + deleted_count: Annotated[float, pydantic.Field(alias="deletedCount")] + r"""The number of links deleted.""" + diff --git a/src/dub/models/operations/tracklead.py b/src/dub/models/operations/tracklead.py index 4ea2ebb..eae8b7d 100644 --- a/src/dub/models/operations/tracklead.py +++ b/src/dub/models/operations/tracklead.py @@ -4,7 +4,7 @@ from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Any, Dict, Optional, TypedDict +from typing import Any, Dict, TypedDict from typing_extensions import Annotated, NotRequired @@ -32,11 +32,11 @@ class TrackLeadRequestBody(BaseModel): r"""The name of the event to track.""" customer_id: Annotated[str, pydantic.Field(alias="customerId")] r"""This is the unique identifier for the customer in the client's app. This is used to track the customer's journey.""" - customer_name: Annotated[OptionalNullable[str], pydantic.Field(alias="customerName")] = UNSET + customer_name: Annotated[OptionalNullable[str], pydantic.Field(alias="customerName")] = None r"""Name of the customer in the client's app.""" - customer_email: Annotated[OptionalNullable[str], pydantic.Field(alias="customerEmail")] = UNSET + customer_email: Annotated[OptionalNullable[str], pydantic.Field(alias="customerEmail")] = None r"""Email of the customer in the client's app.""" - customer_avatar: Annotated[OptionalNullable[str], pydantic.Field(alias="customerAvatar")] = UNSET + customer_avatar: Annotated[OptionalNullable[str], pydantic.Field(alias="customerAvatar")] = None r"""Avatar of the customer in the client's app.""" metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Additional metadata to be stored with the lead event""" @@ -45,7 +45,7 @@ class TrackLeadRequestBody(BaseModel): def serialize_model(self, handler): optional_fields = ["customerName", "customerEmail", "customerAvatar", "metadata"] nullable_fields = ["customerName", "customerEmail", "customerAvatar", "metadata"] - null_default_fields = [] + null_default_fields = ["customerName", "customerEmail", "customerAvatar"] serialized = handler(self) @@ -68,6 +68,14 @@ def serialize_model(self, handler): return m +class ClickTypedDict(TypedDict): + id: str + + +class Click(BaseModel): + id: str + + class CustomerTypedDict(TypedDict): id: str name: Nullable[str] @@ -108,746 +116,16 @@ def serialize_model(self, handler): return m -class ClickTypedDict(TypedDict): - url: str - ip: str - continent: str - country: str - city: str - device: str - browser: str - os: str - ua: str - bot: bool - qr: bool - referer: str - id: str - - -class Click(BaseModel): - url: str - ip: str - continent: str - country: str - city: str - device: str - browser: str - os: str - ua: str - bot: bool - qr: bool - referer: str - id: str - - -class GeoTypedDict(TypedDict): - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - - af: NotRequired[str] - al: NotRequired[str] - dz: NotRequired[str] - as_: NotRequired[str] - ad: NotRequired[str] - ao: NotRequired[str] - ai: NotRequired[str] - aq: NotRequired[str] - ag: NotRequired[str] - ar: NotRequired[str] - am: NotRequired[str] - aw: NotRequired[str] - au: NotRequired[str] - at: NotRequired[str] - az: NotRequired[str] - bs: NotRequired[str] - bh: NotRequired[str] - bd: NotRequired[str] - bb: NotRequired[str] - by: NotRequired[str] - be: NotRequired[str] - bz: NotRequired[str] - bj: NotRequired[str] - bm: NotRequired[str] - bt: NotRequired[str] - bo: NotRequired[str] - ba: NotRequired[str] - bw: NotRequired[str] - bv: NotRequired[str] - br: NotRequired[str] - io: NotRequired[str] - bn: NotRequired[str] - bg: NotRequired[str] - bf: NotRequired[str] - bi: NotRequired[str] - kh: NotRequired[str] - cm: NotRequired[str] - ca: NotRequired[str] - cv: NotRequired[str] - ky: NotRequired[str] - cf: NotRequired[str] - td: NotRequired[str] - cl: NotRequired[str] - cn: NotRequired[str] - cx: NotRequired[str] - cc: NotRequired[str] - co: NotRequired[str] - km: NotRequired[str] - cg: NotRequired[str] - cd: NotRequired[str] - ck: NotRequired[str] - cr: NotRequired[str] - ci: NotRequired[str] - hr: NotRequired[str] - cu: NotRequired[str] - cy: NotRequired[str] - cz: NotRequired[str] - dk: NotRequired[str] - dj: NotRequired[str] - dm: NotRequired[str] - do: NotRequired[str] - ec: NotRequired[str] - eg: NotRequired[str] - sv: NotRequired[str] - gq: NotRequired[str] - er: NotRequired[str] - ee: NotRequired[str] - et: NotRequired[str] - fk: NotRequired[str] - fo: NotRequired[str] - fj: NotRequired[str] - fi: NotRequired[str] - fr: NotRequired[str] - gf: NotRequired[str] - pf: NotRequired[str] - tf: NotRequired[str] - ga: NotRequired[str] - gm: NotRequired[str] - ge: NotRequired[str] - de: NotRequired[str] - gh: NotRequired[str] - gi: NotRequired[str] - gr: NotRequired[str] - gl: NotRequired[str] - gd: NotRequired[str] - gp: NotRequired[str] - gu: NotRequired[str] - gt: NotRequired[str] - gn: NotRequired[str] - gw: NotRequired[str] - gy: NotRequired[str] - ht: NotRequired[str] - hm: NotRequired[str] - va: NotRequired[str] - hn: NotRequired[str] - hk: NotRequired[str] - hu: NotRequired[str] - is_: NotRequired[str] - in_: NotRequired[str] - id: NotRequired[str] - ir: NotRequired[str] - iq: NotRequired[str] - ie: NotRequired[str] - il: NotRequired[str] - it: NotRequired[str] - jm: NotRequired[str] - jp: NotRequired[str] - jo: NotRequired[str] - kz: NotRequired[str] - ke: NotRequired[str] - ki: NotRequired[str] - kp: NotRequired[str] - kr: NotRequired[str] - kw: NotRequired[str] - kg: NotRequired[str] - la: NotRequired[str] - lv: NotRequired[str] - lb: NotRequired[str] - ls: NotRequired[str] - lr: NotRequired[str] - ly: NotRequired[str] - li: NotRequired[str] - lt: NotRequired[str] - lu: NotRequired[str] - mo: NotRequired[str] - mg: NotRequired[str] - mw: NotRequired[str] - my: NotRequired[str] - mv: NotRequired[str] - ml: NotRequired[str] - mt: NotRequired[str] - mh: NotRequired[str] - mq: NotRequired[str] - mr: NotRequired[str] - mu: NotRequired[str] - yt: NotRequired[str] - mx: NotRequired[str] - fm: NotRequired[str] - md: NotRequired[str] - mc: NotRequired[str] - mn: NotRequired[str] - ms: NotRequired[str] - ma: NotRequired[str] - mz: NotRequired[str] - mm: NotRequired[str] - na: NotRequired[str] - nr: NotRequired[str] - np: NotRequired[str] - nl: NotRequired[str] - nc: NotRequired[str] - nz: NotRequired[str] - ni: NotRequired[str] - ne: NotRequired[str] - ng: NotRequired[str] - nu: NotRequired[str] - nf: NotRequired[str] - mk: NotRequired[str] - mp: NotRequired[str] - no: NotRequired[str] - om: NotRequired[str] - pk: NotRequired[str] - pw: NotRequired[str] - ps: NotRequired[str] - pa: NotRequired[str] - pg: NotRequired[str] - py: NotRequired[str] - pe: NotRequired[str] - ph: NotRequired[str] - pn: NotRequired[str] - pl: NotRequired[str] - pt: NotRequired[str] - pr: NotRequired[str] - qa: NotRequired[str] - re: NotRequired[str] - ro: NotRequired[str] - ru: NotRequired[str] - rw: NotRequired[str] - sh: NotRequired[str] - kn: NotRequired[str] - lc: NotRequired[str] - pm: NotRequired[str] - vc: NotRequired[str] - ws: NotRequired[str] - sm: NotRequired[str] - st: NotRequired[str] - sa: NotRequired[str] - sn: NotRequired[str] - sc: NotRequired[str] - sl: NotRequired[str] - sg: NotRequired[str] - sk: NotRequired[str] - si: NotRequired[str] - sb: NotRequired[str] - so: NotRequired[str] - za: NotRequired[str] - gs: NotRequired[str] - es: NotRequired[str] - lk: NotRequired[str] - sd: NotRequired[str] - sr: NotRequired[str] - sj: NotRequired[str] - sz: NotRequired[str] - se: NotRequired[str] - ch: NotRequired[str] - sy: NotRequired[str] - tw: NotRequired[str] - tj: NotRequired[str] - tz: NotRequired[str] - th: NotRequired[str] - tl: NotRequired[str] - tg: NotRequired[str] - tk: NotRequired[str] - to: NotRequired[str] - tt: NotRequired[str] - tn: NotRequired[str] - tr: NotRequired[str] - tm: NotRequired[str] - tc: NotRequired[str] - tv: NotRequired[str] - ug: NotRequired[str] - ua: NotRequired[str] - ae: NotRequired[str] - gb: NotRequired[str] - us: NotRequired[str] - um: NotRequired[str] - uy: NotRequired[str] - uz: NotRequired[str] - vu: NotRequired[str] - ve: NotRequired[str] - vn: NotRequired[str] - vg: NotRequired[str] - vi: NotRequired[str] - wf: NotRequired[str] - eh: NotRequired[str] - ye: NotRequired[str] - zm: NotRequired[str] - zw: NotRequired[str] - ax: NotRequired[str] - bq: NotRequired[str] - cw: NotRequired[str] - gg: NotRequired[str] - im: NotRequired[str] - je: NotRequired[str] - me: NotRequired[str] - bl: NotRequired[str] - mf: NotRequired[str] - rs: NotRequired[str] - sx: NotRequired[str] - ss: NotRequired[str] - xk: NotRequired[str] - - -class Geo(BaseModel): - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - - af: Annotated[Optional[str], pydantic.Field(alias="AF")] = None - al: Annotated[Optional[str], pydantic.Field(alias="AL")] = None - dz: Annotated[Optional[str], pydantic.Field(alias="DZ")] = None - as_: Annotated[Optional[str], pydantic.Field(alias="AS")] = None - ad: Annotated[Optional[str], pydantic.Field(alias="AD")] = None - ao: Annotated[Optional[str], pydantic.Field(alias="AO")] = None - ai: Annotated[Optional[str], pydantic.Field(alias="AI")] = None - aq: Annotated[Optional[str], pydantic.Field(alias="AQ")] = None - ag: Annotated[Optional[str], pydantic.Field(alias="AG")] = None - ar: Annotated[Optional[str], pydantic.Field(alias="AR")] = None - am: Annotated[Optional[str], pydantic.Field(alias="AM")] = None - aw: Annotated[Optional[str], pydantic.Field(alias="AW")] = None - au: Annotated[Optional[str], pydantic.Field(alias="AU")] = None - at: Annotated[Optional[str], pydantic.Field(alias="AT")] = None - az: Annotated[Optional[str], pydantic.Field(alias="AZ")] = None - bs: Annotated[Optional[str], pydantic.Field(alias="BS")] = None - bh: Annotated[Optional[str], pydantic.Field(alias="BH")] = None - bd: Annotated[Optional[str], pydantic.Field(alias="BD")] = None - bb: Annotated[Optional[str], pydantic.Field(alias="BB")] = None - by: Annotated[Optional[str], pydantic.Field(alias="BY")] = None - be: Annotated[Optional[str], pydantic.Field(alias="BE")] = None - bz: Annotated[Optional[str], pydantic.Field(alias="BZ")] = None - bj: Annotated[Optional[str], pydantic.Field(alias="BJ")] = None - bm: Annotated[Optional[str], pydantic.Field(alias="BM")] = None - bt: Annotated[Optional[str], pydantic.Field(alias="BT")] = None - bo: Annotated[Optional[str], pydantic.Field(alias="BO")] = None - ba: Annotated[Optional[str], pydantic.Field(alias="BA")] = None - bw: Annotated[Optional[str], pydantic.Field(alias="BW")] = None - bv: Annotated[Optional[str], pydantic.Field(alias="BV")] = None - br: Annotated[Optional[str], pydantic.Field(alias="BR")] = None - io: Annotated[Optional[str], pydantic.Field(alias="IO")] = None - bn: Annotated[Optional[str], pydantic.Field(alias="BN")] = None - bg: Annotated[Optional[str], pydantic.Field(alias="BG")] = None - bf: Annotated[Optional[str], pydantic.Field(alias="BF")] = None - bi: Annotated[Optional[str], pydantic.Field(alias="BI")] = None - kh: Annotated[Optional[str], pydantic.Field(alias="KH")] = None - cm: Annotated[Optional[str], pydantic.Field(alias="CM")] = None - ca: Annotated[Optional[str], pydantic.Field(alias="CA")] = None - cv: Annotated[Optional[str], pydantic.Field(alias="CV")] = None - ky: Annotated[Optional[str], pydantic.Field(alias="KY")] = None - cf: Annotated[Optional[str], pydantic.Field(alias="CF")] = None - td: Annotated[Optional[str], pydantic.Field(alias="TD")] = None - cl: Annotated[Optional[str], pydantic.Field(alias="CL")] = None - cn: Annotated[Optional[str], pydantic.Field(alias="CN")] = None - cx: Annotated[Optional[str], pydantic.Field(alias="CX")] = None - cc: Annotated[Optional[str], pydantic.Field(alias="CC")] = None - co: Annotated[Optional[str], pydantic.Field(alias="CO")] = None - km: Annotated[Optional[str], pydantic.Field(alias="KM")] = None - cg: Annotated[Optional[str], pydantic.Field(alias="CG")] = None - cd: Annotated[Optional[str], pydantic.Field(alias="CD")] = None - ck: Annotated[Optional[str], pydantic.Field(alias="CK")] = None - cr: Annotated[Optional[str], pydantic.Field(alias="CR")] = None - ci: Annotated[Optional[str], pydantic.Field(alias="CI")] = None - hr: Annotated[Optional[str], pydantic.Field(alias="HR")] = None - cu: Annotated[Optional[str], pydantic.Field(alias="CU")] = None - cy: Annotated[Optional[str], pydantic.Field(alias="CY")] = None - cz: Annotated[Optional[str], pydantic.Field(alias="CZ")] = None - dk: Annotated[Optional[str], pydantic.Field(alias="DK")] = None - dj: Annotated[Optional[str], pydantic.Field(alias="DJ")] = None - dm: Annotated[Optional[str], pydantic.Field(alias="DM")] = None - do: Annotated[Optional[str], pydantic.Field(alias="DO")] = None - ec: Annotated[Optional[str], pydantic.Field(alias="EC")] = None - eg: Annotated[Optional[str], pydantic.Field(alias="EG")] = None - sv: Annotated[Optional[str], pydantic.Field(alias="SV")] = None - gq: Annotated[Optional[str], pydantic.Field(alias="GQ")] = None - er: Annotated[Optional[str], pydantic.Field(alias="ER")] = None - ee: Annotated[Optional[str], pydantic.Field(alias="EE")] = None - et: Annotated[Optional[str], pydantic.Field(alias="ET")] = None - fk: Annotated[Optional[str], pydantic.Field(alias="FK")] = None - fo: Annotated[Optional[str], pydantic.Field(alias="FO")] = None - fj: Annotated[Optional[str], pydantic.Field(alias="FJ")] = None - fi: Annotated[Optional[str], pydantic.Field(alias="FI")] = None - fr: Annotated[Optional[str], pydantic.Field(alias="FR")] = None - gf: Annotated[Optional[str], pydantic.Field(alias="GF")] = None - pf: Annotated[Optional[str], pydantic.Field(alias="PF")] = None - tf: Annotated[Optional[str], pydantic.Field(alias="TF")] = None - ga: Annotated[Optional[str], pydantic.Field(alias="GA")] = None - gm: Annotated[Optional[str], pydantic.Field(alias="GM")] = None - ge: Annotated[Optional[str], pydantic.Field(alias="GE")] = None - de: Annotated[Optional[str], pydantic.Field(alias="DE")] = None - gh: Annotated[Optional[str], pydantic.Field(alias="GH")] = None - gi: Annotated[Optional[str], pydantic.Field(alias="GI")] = None - gr: Annotated[Optional[str], pydantic.Field(alias="GR")] = None - gl: Annotated[Optional[str], pydantic.Field(alias="GL")] = None - gd: Annotated[Optional[str], pydantic.Field(alias="GD")] = None - gp: Annotated[Optional[str], pydantic.Field(alias="GP")] = None - gu: Annotated[Optional[str], pydantic.Field(alias="GU")] = None - gt: Annotated[Optional[str], pydantic.Field(alias="GT")] = None - gn: Annotated[Optional[str], pydantic.Field(alias="GN")] = None - gw: Annotated[Optional[str], pydantic.Field(alias="GW")] = None - gy: Annotated[Optional[str], pydantic.Field(alias="GY")] = None - ht: Annotated[Optional[str], pydantic.Field(alias="HT")] = None - hm: Annotated[Optional[str], pydantic.Field(alias="HM")] = None - va: Annotated[Optional[str], pydantic.Field(alias="VA")] = None - hn: Annotated[Optional[str], pydantic.Field(alias="HN")] = None - hk: Annotated[Optional[str], pydantic.Field(alias="HK")] = None - hu: Annotated[Optional[str], pydantic.Field(alias="HU")] = None - is_: Annotated[Optional[str], pydantic.Field(alias="IS")] = None - in_: Annotated[Optional[str], pydantic.Field(alias="IN")] = None - id: Annotated[Optional[str], pydantic.Field(alias="ID")] = None - ir: Annotated[Optional[str], pydantic.Field(alias="IR")] = None - iq: Annotated[Optional[str], pydantic.Field(alias="IQ")] = None - ie: Annotated[Optional[str], pydantic.Field(alias="IE")] = None - il: Annotated[Optional[str], pydantic.Field(alias="IL")] = None - it: Annotated[Optional[str], pydantic.Field(alias="IT")] = None - jm: Annotated[Optional[str], pydantic.Field(alias="JM")] = None - jp: Annotated[Optional[str], pydantic.Field(alias="JP")] = None - jo: Annotated[Optional[str], pydantic.Field(alias="JO")] = None - kz: Annotated[Optional[str], pydantic.Field(alias="KZ")] = None - ke: Annotated[Optional[str], pydantic.Field(alias="KE")] = None - ki: Annotated[Optional[str], pydantic.Field(alias="KI")] = None - kp: Annotated[Optional[str], pydantic.Field(alias="KP")] = None - kr: Annotated[Optional[str], pydantic.Field(alias="KR")] = None - kw: Annotated[Optional[str], pydantic.Field(alias="KW")] = None - kg: Annotated[Optional[str], pydantic.Field(alias="KG")] = None - la: Annotated[Optional[str], pydantic.Field(alias="LA")] = None - lv: Annotated[Optional[str], pydantic.Field(alias="LV")] = None - lb: Annotated[Optional[str], pydantic.Field(alias="LB")] = None - ls: Annotated[Optional[str], pydantic.Field(alias="LS")] = None - lr: Annotated[Optional[str], pydantic.Field(alias="LR")] = None - ly: Annotated[Optional[str], pydantic.Field(alias="LY")] = None - li: Annotated[Optional[str], pydantic.Field(alias="LI")] = None - lt: Annotated[Optional[str], pydantic.Field(alias="LT")] = None - lu: Annotated[Optional[str], pydantic.Field(alias="LU")] = None - mo: Annotated[Optional[str], pydantic.Field(alias="MO")] = None - mg: Annotated[Optional[str], pydantic.Field(alias="MG")] = None - mw: Annotated[Optional[str], pydantic.Field(alias="MW")] = None - my: Annotated[Optional[str], pydantic.Field(alias="MY")] = None - mv: Annotated[Optional[str], pydantic.Field(alias="MV")] = None - ml: Annotated[Optional[str], pydantic.Field(alias="ML")] = None - mt: Annotated[Optional[str], pydantic.Field(alias="MT")] = None - mh: Annotated[Optional[str], pydantic.Field(alias="MH")] = None - mq: Annotated[Optional[str], pydantic.Field(alias="MQ")] = None - mr: Annotated[Optional[str], pydantic.Field(alias="MR")] = None - mu: Annotated[Optional[str], pydantic.Field(alias="MU")] = None - yt: Annotated[Optional[str], pydantic.Field(alias="YT")] = None - mx: Annotated[Optional[str], pydantic.Field(alias="MX")] = None - fm: Annotated[Optional[str], pydantic.Field(alias="FM")] = None - md: Annotated[Optional[str], pydantic.Field(alias="MD")] = None - mc: Annotated[Optional[str], pydantic.Field(alias="MC")] = None - mn: Annotated[Optional[str], pydantic.Field(alias="MN")] = None - ms: Annotated[Optional[str], pydantic.Field(alias="MS")] = None - ma: Annotated[Optional[str], pydantic.Field(alias="MA")] = None - mz: Annotated[Optional[str], pydantic.Field(alias="MZ")] = None - mm: Annotated[Optional[str], pydantic.Field(alias="MM")] = None - na: Annotated[Optional[str], pydantic.Field(alias="NA")] = None - nr: Annotated[Optional[str], pydantic.Field(alias="NR")] = None - np: Annotated[Optional[str], pydantic.Field(alias="NP")] = None - nl: Annotated[Optional[str], pydantic.Field(alias="NL")] = None - nc: Annotated[Optional[str], pydantic.Field(alias="NC")] = None - nz: Annotated[Optional[str], pydantic.Field(alias="NZ")] = None - ni: Annotated[Optional[str], pydantic.Field(alias="NI")] = None - ne: Annotated[Optional[str], pydantic.Field(alias="NE")] = None - ng: Annotated[Optional[str], pydantic.Field(alias="NG")] = None - nu: Annotated[Optional[str], pydantic.Field(alias="NU")] = None - nf: Annotated[Optional[str], pydantic.Field(alias="NF")] = None - mk: Annotated[Optional[str], pydantic.Field(alias="MK")] = None - mp: Annotated[Optional[str], pydantic.Field(alias="MP")] = None - no: Annotated[Optional[str], pydantic.Field(alias="NO")] = None - om: Annotated[Optional[str], pydantic.Field(alias="OM")] = None - pk: Annotated[Optional[str], pydantic.Field(alias="PK")] = None - pw: Annotated[Optional[str], pydantic.Field(alias="PW")] = None - ps: Annotated[Optional[str], pydantic.Field(alias="PS")] = None - pa: Annotated[Optional[str], pydantic.Field(alias="PA")] = None - pg: Annotated[Optional[str], pydantic.Field(alias="PG")] = None - py: Annotated[Optional[str], pydantic.Field(alias="PY")] = None - pe: Annotated[Optional[str], pydantic.Field(alias="PE")] = None - ph: Annotated[Optional[str], pydantic.Field(alias="PH")] = None - pn: Annotated[Optional[str], pydantic.Field(alias="PN")] = None - pl: Annotated[Optional[str], pydantic.Field(alias="PL")] = None - pt: Annotated[Optional[str], pydantic.Field(alias="PT")] = None - pr: Annotated[Optional[str], pydantic.Field(alias="PR")] = None - qa: Annotated[Optional[str], pydantic.Field(alias="QA")] = None - re: Annotated[Optional[str], pydantic.Field(alias="RE")] = None - ro: Annotated[Optional[str], pydantic.Field(alias="RO")] = None - ru: Annotated[Optional[str], pydantic.Field(alias="RU")] = None - rw: Annotated[Optional[str], pydantic.Field(alias="RW")] = None - sh: Annotated[Optional[str], pydantic.Field(alias="SH")] = None - kn: Annotated[Optional[str], pydantic.Field(alias="KN")] = None - lc: Annotated[Optional[str], pydantic.Field(alias="LC")] = None - pm: Annotated[Optional[str], pydantic.Field(alias="PM")] = None - vc: Annotated[Optional[str], pydantic.Field(alias="VC")] = None - ws: Annotated[Optional[str], pydantic.Field(alias="WS")] = None - sm: Annotated[Optional[str], pydantic.Field(alias="SM")] = None - st: Annotated[Optional[str], pydantic.Field(alias="ST")] = None - sa: Annotated[Optional[str], pydantic.Field(alias="SA")] = None - sn: Annotated[Optional[str], pydantic.Field(alias="SN")] = None - sc: Annotated[Optional[str], pydantic.Field(alias="SC")] = None - sl: Annotated[Optional[str], pydantic.Field(alias="SL")] = None - sg: Annotated[Optional[str], pydantic.Field(alias="SG")] = None - sk: Annotated[Optional[str], pydantic.Field(alias="SK")] = None - si: Annotated[Optional[str], pydantic.Field(alias="SI")] = None - sb: Annotated[Optional[str], pydantic.Field(alias="SB")] = None - so: Annotated[Optional[str], pydantic.Field(alias="SO")] = None - za: Annotated[Optional[str], pydantic.Field(alias="ZA")] = None - gs: Annotated[Optional[str], pydantic.Field(alias="GS")] = None - es: Annotated[Optional[str], pydantic.Field(alias="ES")] = None - lk: Annotated[Optional[str], pydantic.Field(alias="LK")] = None - sd: Annotated[Optional[str], pydantic.Field(alias="SD")] = None - sr: Annotated[Optional[str], pydantic.Field(alias="SR")] = None - sj: Annotated[Optional[str], pydantic.Field(alias="SJ")] = None - sz: Annotated[Optional[str], pydantic.Field(alias="SZ")] = None - se: Annotated[Optional[str], pydantic.Field(alias="SE")] = None - ch: Annotated[Optional[str], pydantic.Field(alias="CH")] = None - sy: Annotated[Optional[str], pydantic.Field(alias="SY")] = None - tw: Annotated[Optional[str], pydantic.Field(alias="TW")] = None - tj: Annotated[Optional[str], pydantic.Field(alias="TJ")] = None - tz: Annotated[Optional[str], pydantic.Field(alias="TZ")] = None - th: Annotated[Optional[str], pydantic.Field(alias="TH")] = None - tl: Annotated[Optional[str], pydantic.Field(alias="TL")] = None - tg: Annotated[Optional[str], pydantic.Field(alias="TG")] = None - tk: Annotated[Optional[str], pydantic.Field(alias="TK")] = None - to: Annotated[Optional[str], pydantic.Field(alias="TO")] = None - tt: Annotated[Optional[str], pydantic.Field(alias="TT")] = None - tn: Annotated[Optional[str], pydantic.Field(alias="TN")] = None - tr: Annotated[Optional[str], pydantic.Field(alias="TR")] = None - tm: Annotated[Optional[str], pydantic.Field(alias="TM")] = None - tc: Annotated[Optional[str], pydantic.Field(alias="TC")] = None - tv: Annotated[Optional[str], pydantic.Field(alias="TV")] = None - ug: Annotated[Optional[str], pydantic.Field(alias="UG")] = None - ua: Annotated[Optional[str], pydantic.Field(alias="UA")] = None - ae: Annotated[Optional[str], pydantic.Field(alias="AE")] = None - gb: Annotated[Optional[str], pydantic.Field(alias="GB")] = None - us: Annotated[Optional[str], pydantic.Field(alias="US")] = None - um: Annotated[Optional[str], pydantic.Field(alias="UM")] = None - uy: Annotated[Optional[str], pydantic.Field(alias="UY")] = None - uz: Annotated[Optional[str], pydantic.Field(alias="UZ")] = None - vu: Annotated[Optional[str], pydantic.Field(alias="VU")] = None - ve: Annotated[Optional[str], pydantic.Field(alias="VE")] = None - vn: Annotated[Optional[str], pydantic.Field(alias="VN")] = None - vg: Annotated[Optional[str], pydantic.Field(alias="VG")] = None - vi: Annotated[Optional[str], pydantic.Field(alias="VI")] = None - wf: Annotated[Optional[str], pydantic.Field(alias="WF")] = None - eh: Annotated[Optional[str], pydantic.Field(alias="EH")] = None - ye: Annotated[Optional[str], pydantic.Field(alias="YE")] = None - zm: Annotated[Optional[str], pydantic.Field(alias="ZM")] = None - zw: Annotated[Optional[str], pydantic.Field(alias="ZW")] = None - ax: Annotated[Optional[str], pydantic.Field(alias="AX")] = None - bq: Annotated[Optional[str], pydantic.Field(alias="BQ")] = None - cw: Annotated[Optional[str], pydantic.Field(alias="CW")] = None - gg: Annotated[Optional[str], pydantic.Field(alias="GG")] = None - im: Annotated[Optional[str], pydantic.Field(alias="IM")] = None - je: Annotated[Optional[str], pydantic.Field(alias="JE")] = None - me: Annotated[Optional[str], pydantic.Field(alias="ME")] = None - bl: Annotated[Optional[str], pydantic.Field(alias="BL")] = None - mf: Annotated[Optional[str], pydantic.Field(alias="MF")] = None - rs: Annotated[Optional[str], pydantic.Field(alias="RS")] = None - sx: Annotated[Optional[str], pydantic.Field(alias="SX")] = None - ss: Annotated[Optional[str], pydantic.Field(alias="SS")] = None - xk: Annotated[Optional[str], pydantic.Field(alias="XK")] = None - - -class LinkTypedDict(TypedDict): - id: str - r"""The unique ID of the short link.""" - domain: str - r"""The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).""" - key: str - r"""The short link slug. If not provided, a random 7-character slug will be generated.""" - external_id: Nullable[str] - r"""This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter.""" - url: str - r"""The destination URL of the short link.""" - expires_at: Nullable[str] - r"""The date and time when the short link will expire in ISO-8601 format.""" - expired_url: Nullable[str] - r"""The URL to redirect to when the short link has expired.""" - password: Nullable[str] - r"""The password required to access the destination URL of the short link.""" - title: Nullable[str] - r"""The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - description: Nullable[str] - r"""The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - image: Nullable[str] - r"""The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - video: Nullable[str] - r"""The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og""" - ios: Nullable[str] - r"""The iOS destination URL for the short link for iOS device targeting.""" - android: Nullable[str] - r"""The Android destination URL for the short link for Android device targeting.""" - geo: Nullable[GeoTypedDict] - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - comments: Nullable[str] - r"""The comments for the short link.""" - short_link: str - r"""The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).""" - qr_code: str - r"""The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).""" - utm_source: Nullable[str] - r"""The UTM source of the short link.""" - utm_medium: Nullable[str] - r"""The UTM medium of the short link.""" - utm_campaign: Nullable[str] - r"""The UTM campaign of the short link.""" - utm_term: Nullable[str] - r"""The UTM term of the short link.""" - utm_content: Nullable[str] - r"""The UTM content of the short link.""" - user_id: str - r"""The user ID of the creator of the short link.""" - workspace_id: str - r"""The workspace ID of the short link.""" - last_clicked: Nullable[str] - r"""The date and time when the short link was last clicked.""" - created_at: str - r"""The date and time when the short link was created.""" - updated_at: str - r"""The date and time when the short link was last updated.""" - track_conversion: NotRequired[bool] - r"""[BETA] Whether to track conversions for the short link.""" - archived: NotRequired[bool] - r"""Whether the short link is archived.""" - proxy: NotRequired[bool] - r"""Whether the short link uses Custom Social Media Cards feature.""" - rewrite: NotRequired[bool] - r"""Whether the short link uses link cloaking.""" - do_index: NotRequired[bool] - r"""Whether to allow search engines to index the short link.""" - public_stats: NotRequired[bool] - r"""Whether the short link's stats are publicly accessible.""" - clicks: NotRequired[float] - r"""The number of clicks on the short link.""" - leads: NotRequired[float] - r"""[BETA]: The number of leads the short links has generated.""" - sales: NotRequired[float] - r"""[BETA]: The number of sales the short links has generated.""" - sale_amount: NotRequired[float] - r"""[BETA]: The total dollar amount of sales the short links has generated (in cents).""" - - -class Link(BaseModel): - id: str - r"""The unique ID of the short link.""" - domain: str - r"""The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).""" - key: str - r"""The short link slug. If not provided, a random 7-character slug will be generated.""" - external_id: Annotated[Nullable[str], pydantic.Field(alias="externalId")] - r"""This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter.""" - url: str - r"""The destination URL of the short link.""" - expires_at: Annotated[Nullable[str], pydantic.Field(alias="expiresAt")] - r"""The date and time when the short link will expire in ISO-8601 format.""" - expired_url: Annotated[Nullable[str], pydantic.Field(alias="expiredUrl")] - r"""The URL to redirect to when the short link has expired.""" - password: Nullable[str] - r"""The password required to access the destination URL of the short link.""" - title: Nullable[str] - r"""The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - description: Nullable[str] - r"""The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - image: Nullable[str] - r"""The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - video: Nullable[str] - r"""The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og""" - ios: Nullable[str] - r"""The iOS destination URL for the short link for iOS device targeting.""" - android: Nullable[str] - r"""The Android destination URL for the short link for Android device targeting.""" - geo: Nullable[Geo] - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - comments: Nullable[str] - r"""The comments for the short link.""" - short_link: Annotated[str, pydantic.Field(alias="shortLink")] - r"""The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).""" - qr_code: Annotated[str, pydantic.Field(alias="qrCode")] - r"""The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).""" - utm_source: Nullable[str] - r"""The UTM source of the short link.""" - utm_medium: Nullable[str] - r"""The UTM medium of the short link.""" - utm_campaign: Nullable[str] - r"""The UTM campaign of the short link.""" - utm_term: Nullable[str] - r"""The UTM term of the short link.""" - utm_content: Nullable[str] - r"""The UTM content of the short link.""" - user_id: Annotated[str, pydantic.Field(alias="userId")] - r"""The user ID of the creator of the short link.""" - workspace_id: Annotated[str, pydantic.Field(alias="workspaceId")] - r"""The workspace ID of the short link.""" - last_clicked: Annotated[Nullable[str], pydantic.Field(alias="lastClicked")] - r"""The date and time when the short link was last clicked.""" - created_at: Annotated[str, pydantic.Field(alias="createdAt")] - r"""The date and time when the short link was created.""" - updated_at: Annotated[str, pydantic.Field(alias="updatedAt")] - r"""The date and time when the short link was last updated.""" - track_conversion: Annotated[Optional[bool], pydantic.Field(alias="trackConversion")] = False - r"""[BETA] Whether to track conversions for the short link.""" - archived: Optional[bool] = False - r"""Whether the short link is archived.""" - proxy: Optional[bool] = False - r"""Whether the short link uses Custom Social Media Cards feature.""" - rewrite: Optional[bool] = False - r"""Whether the short link uses link cloaking.""" - do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = False - r"""Whether to allow search engines to index the short link.""" - public_stats: Annotated[Optional[bool], pydantic.Field(alias="publicStats")] = False - r"""Whether the short link's stats are publicly accessible.""" - clicks: Optional[float] = 0 - r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 - r"""[BETA]: The number of leads the short links has generated.""" - sales: Optional[float] = 0 - r"""[BETA]: The number of sales the short links has generated.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 - r"""[BETA]: The total dollar amount of sales the short links has generated (in cents).""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["trackConversion", "archived", "proxy", "rewrite", "doIndex", "publicStats", "clicks", "leads", "sales", "saleAmount"] - nullable_fields = ["externalId", "expiresAt", "expiredUrl", "password", "title", "description", "image", "video", "ios", "android", "geo", "comments", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "lastClicked"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = (self.__pydantic_fields_set__.intersection({n}) or k in null_default_fields) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - class TrackLeadResponseBodyTypedDict(TypedDict): r"""A lead was tracked.""" - event_name: str - customer: CustomerTypedDict click: ClickTypedDict - link: LinkTypedDict + customer: CustomerTypedDict class TrackLeadResponseBody(BaseModel): r"""A lead was tracked.""" - event_name: Annotated[str, pydantic.Field(alias="eventName")] - customer: Customer click: Click - link: Link + customer: Customer diff --git a/src/dub/models/operations/tracksale.py b/src/dub/models/operations/tracksale.py index 226aa22..9efc68d 100644 --- a/src/dub/models/operations/tracksale.py +++ b/src/dub/models/operations/tracksale.py @@ -117,747 +117,23 @@ def serialize_model(self, handler): class SaleTypedDict(TypedDict): amount: float + currency: str payment_processor: str invoice_id: Nullable[str] - currency: str + metadata: Nullable[Dict[str, Any]] class Sale(BaseModel): amount: float + currency: str payment_processor: Annotated[str, pydantic.Field(alias="paymentProcessor")] invoice_id: Annotated[Nullable[str], pydantic.Field(alias="invoiceId")] - currency: str + metadata: Nullable[Dict[str, Any]] @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [] - nullable_fields = ["invoiceId"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = (self.__pydantic_fields_set__.intersection({n}) or k in null_default_fields) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class TrackSaleClickTypedDict(TypedDict): - url: str - ip: str - continent: str - country: str - city: str - device: str - browser: str - os: str - ua: str - bot: bool - qr: bool - referer: str - id: str - - -class TrackSaleClick(BaseModel): - url: str - ip: str - continent: str - country: str - city: str - device: str - browser: str - os: str - ua: str - bot: bool - qr: bool - referer: str - id: str - - -class TrackSaleGeoTypedDict(TypedDict): - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - - af: NotRequired[str] - al: NotRequired[str] - dz: NotRequired[str] - as_: NotRequired[str] - ad: NotRequired[str] - ao: NotRequired[str] - ai: NotRequired[str] - aq: NotRequired[str] - ag: NotRequired[str] - ar: NotRequired[str] - am: NotRequired[str] - aw: NotRequired[str] - au: NotRequired[str] - at: NotRequired[str] - az: NotRequired[str] - bs: NotRequired[str] - bh: NotRequired[str] - bd: NotRequired[str] - bb: NotRequired[str] - by: NotRequired[str] - be: NotRequired[str] - bz: NotRequired[str] - bj: NotRequired[str] - bm: NotRequired[str] - bt: NotRequired[str] - bo: NotRequired[str] - ba: NotRequired[str] - bw: NotRequired[str] - bv: NotRequired[str] - br: NotRequired[str] - io: NotRequired[str] - bn: NotRequired[str] - bg: NotRequired[str] - bf: NotRequired[str] - bi: NotRequired[str] - kh: NotRequired[str] - cm: NotRequired[str] - ca: NotRequired[str] - cv: NotRequired[str] - ky: NotRequired[str] - cf: NotRequired[str] - td: NotRequired[str] - cl: NotRequired[str] - cn: NotRequired[str] - cx: NotRequired[str] - cc: NotRequired[str] - co: NotRequired[str] - km: NotRequired[str] - cg: NotRequired[str] - cd: NotRequired[str] - ck: NotRequired[str] - cr: NotRequired[str] - ci: NotRequired[str] - hr: NotRequired[str] - cu: NotRequired[str] - cy: NotRequired[str] - cz: NotRequired[str] - dk: NotRequired[str] - dj: NotRequired[str] - dm: NotRequired[str] - do: NotRequired[str] - ec: NotRequired[str] - eg: NotRequired[str] - sv: NotRequired[str] - gq: NotRequired[str] - er: NotRequired[str] - ee: NotRequired[str] - et: NotRequired[str] - fk: NotRequired[str] - fo: NotRequired[str] - fj: NotRequired[str] - fi: NotRequired[str] - fr: NotRequired[str] - gf: NotRequired[str] - pf: NotRequired[str] - tf: NotRequired[str] - ga: NotRequired[str] - gm: NotRequired[str] - ge: NotRequired[str] - de: NotRequired[str] - gh: NotRequired[str] - gi: NotRequired[str] - gr: NotRequired[str] - gl: NotRequired[str] - gd: NotRequired[str] - gp: NotRequired[str] - gu: NotRequired[str] - gt: NotRequired[str] - gn: NotRequired[str] - gw: NotRequired[str] - gy: NotRequired[str] - ht: NotRequired[str] - hm: NotRequired[str] - va: NotRequired[str] - hn: NotRequired[str] - hk: NotRequired[str] - hu: NotRequired[str] - is_: NotRequired[str] - in_: NotRequired[str] - id: NotRequired[str] - ir: NotRequired[str] - iq: NotRequired[str] - ie: NotRequired[str] - il: NotRequired[str] - it: NotRequired[str] - jm: NotRequired[str] - jp: NotRequired[str] - jo: NotRequired[str] - kz: NotRequired[str] - ke: NotRequired[str] - ki: NotRequired[str] - kp: NotRequired[str] - kr: NotRequired[str] - kw: NotRequired[str] - kg: NotRequired[str] - la: NotRequired[str] - lv: NotRequired[str] - lb: NotRequired[str] - ls: NotRequired[str] - lr: NotRequired[str] - ly: NotRequired[str] - li: NotRequired[str] - lt: NotRequired[str] - lu: NotRequired[str] - mo: NotRequired[str] - mg: NotRequired[str] - mw: NotRequired[str] - my: NotRequired[str] - mv: NotRequired[str] - ml: NotRequired[str] - mt: NotRequired[str] - mh: NotRequired[str] - mq: NotRequired[str] - mr: NotRequired[str] - mu: NotRequired[str] - yt: NotRequired[str] - mx: NotRequired[str] - fm: NotRequired[str] - md: NotRequired[str] - mc: NotRequired[str] - mn: NotRequired[str] - ms: NotRequired[str] - ma: NotRequired[str] - mz: NotRequired[str] - mm: NotRequired[str] - na: NotRequired[str] - nr: NotRequired[str] - np: NotRequired[str] - nl: NotRequired[str] - nc: NotRequired[str] - nz: NotRequired[str] - ni: NotRequired[str] - ne: NotRequired[str] - ng: NotRequired[str] - nu: NotRequired[str] - nf: NotRequired[str] - mk: NotRequired[str] - mp: NotRequired[str] - no: NotRequired[str] - om: NotRequired[str] - pk: NotRequired[str] - pw: NotRequired[str] - ps: NotRequired[str] - pa: NotRequired[str] - pg: NotRequired[str] - py: NotRequired[str] - pe: NotRequired[str] - ph: NotRequired[str] - pn: NotRequired[str] - pl: NotRequired[str] - pt: NotRequired[str] - pr: NotRequired[str] - qa: NotRequired[str] - re: NotRequired[str] - ro: NotRequired[str] - ru: NotRequired[str] - rw: NotRequired[str] - sh: NotRequired[str] - kn: NotRequired[str] - lc: NotRequired[str] - pm: NotRequired[str] - vc: NotRequired[str] - ws: NotRequired[str] - sm: NotRequired[str] - st: NotRequired[str] - sa: NotRequired[str] - sn: NotRequired[str] - sc: NotRequired[str] - sl: NotRequired[str] - sg: NotRequired[str] - sk: NotRequired[str] - si: NotRequired[str] - sb: NotRequired[str] - so: NotRequired[str] - za: NotRequired[str] - gs: NotRequired[str] - es: NotRequired[str] - lk: NotRequired[str] - sd: NotRequired[str] - sr: NotRequired[str] - sj: NotRequired[str] - sz: NotRequired[str] - se: NotRequired[str] - ch: NotRequired[str] - sy: NotRequired[str] - tw: NotRequired[str] - tj: NotRequired[str] - tz: NotRequired[str] - th: NotRequired[str] - tl: NotRequired[str] - tg: NotRequired[str] - tk: NotRequired[str] - to: NotRequired[str] - tt: NotRequired[str] - tn: NotRequired[str] - tr: NotRequired[str] - tm: NotRequired[str] - tc: NotRequired[str] - tv: NotRequired[str] - ug: NotRequired[str] - ua: NotRequired[str] - ae: NotRequired[str] - gb: NotRequired[str] - us: NotRequired[str] - um: NotRequired[str] - uy: NotRequired[str] - uz: NotRequired[str] - vu: NotRequired[str] - ve: NotRequired[str] - vn: NotRequired[str] - vg: NotRequired[str] - vi: NotRequired[str] - wf: NotRequired[str] - eh: NotRequired[str] - ye: NotRequired[str] - zm: NotRequired[str] - zw: NotRequired[str] - ax: NotRequired[str] - bq: NotRequired[str] - cw: NotRequired[str] - gg: NotRequired[str] - im: NotRequired[str] - je: NotRequired[str] - me: NotRequired[str] - bl: NotRequired[str] - mf: NotRequired[str] - rs: NotRequired[str] - sx: NotRequired[str] - ss: NotRequired[str] - xk: NotRequired[str] - - -class TrackSaleGeo(BaseModel): - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - - af: Annotated[Optional[str], pydantic.Field(alias="AF")] = None - al: Annotated[Optional[str], pydantic.Field(alias="AL")] = None - dz: Annotated[Optional[str], pydantic.Field(alias="DZ")] = None - as_: Annotated[Optional[str], pydantic.Field(alias="AS")] = None - ad: Annotated[Optional[str], pydantic.Field(alias="AD")] = None - ao: Annotated[Optional[str], pydantic.Field(alias="AO")] = None - ai: Annotated[Optional[str], pydantic.Field(alias="AI")] = None - aq: Annotated[Optional[str], pydantic.Field(alias="AQ")] = None - ag: Annotated[Optional[str], pydantic.Field(alias="AG")] = None - ar: Annotated[Optional[str], pydantic.Field(alias="AR")] = None - am: Annotated[Optional[str], pydantic.Field(alias="AM")] = None - aw: Annotated[Optional[str], pydantic.Field(alias="AW")] = None - au: Annotated[Optional[str], pydantic.Field(alias="AU")] = None - at: Annotated[Optional[str], pydantic.Field(alias="AT")] = None - az: Annotated[Optional[str], pydantic.Field(alias="AZ")] = None - bs: Annotated[Optional[str], pydantic.Field(alias="BS")] = None - bh: Annotated[Optional[str], pydantic.Field(alias="BH")] = None - bd: Annotated[Optional[str], pydantic.Field(alias="BD")] = None - bb: Annotated[Optional[str], pydantic.Field(alias="BB")] = None - by: Annotated[Optional[str], pydantic.Field(alias="BY")] = None - be: Annotated[Optional[str], pydantic.Field(alias="BE")] = None - bz: Annotated[Optional[str], pydantic.Field(alias="BZ")] = None - bj: Annotated[Optional[str], pydantic.Field(alias="BJ")] = None - bm: Annotated[Optional[str], pydantic.Field(alias="BM")] = None - bt: Annotated[Optional[str], pydantic.Field(alias="BT")] = None - bo: Annotated[Optional[str], pydantic.Field(alias="BO")] = None - ba: Annotated[Optional[str], pydantic.Field(alias="BA")] = None - bw: Annotated[Optional[str], pydantic.Field(alias="BW")] = None - bv: Annotated[Optional[str], pydantic.Field(alias="BV")] = None - br: Annotated[Optional[str], pydantic.Field(alias="BR")] = None - io: Annotated[Optional[str], pydantic.Field(alias="IO")] = None - bn: Annotated[Optional[str], pydantic.Field(alias="BN")] = None - bg: Annotated[Optional[str], pydantic.Field(alias="BG")] = None - bf: Annotated[Optional[str], pydantic.Field(alias="BF")] = None - bi: Annotated[Optional[str], pydantic.Field(alias="BI")] = None - kh: Annotated[Optional[str], pydantic.Field(alias="KH")] = None - cm: Annotated[Optional[str], pydantic.Field(alias="CM")] = None - ca: Annotated[Optional[str], pydantic.Field(alias="CA")] = None - cv: Annotated[Optional[str], pydantic.Field(alias="CV")] = None - ky: Annotated[Optional[str], pydantic.Field(alias="KY")] = None - cf: Annotated[Optional[str], pydantic.Field(alias="CF")] = None - td: Annotated[Optional[str], pydantic.Field(alias="TD")] = None - cl: Annotated[Optional[str], pydantic.Field(alias="CL")] = None - cn: Annotated[Optional[str], pydantic.Field(alias="CN")] = None - cx: Annotated[Optional[str], pydantic.Field(alias="CX")] = None - cc: Annotated[Optional[str], pydantic.Field(alias="CC")] = None - co: Annotated[Optional[str], pydantic.Field(alias="CO")] = None - km: Annotated[Optional[str], pydantic.Field(alias="KM")] = None - cg: Annotated[Optional[str], pydantic.Field(alias="CG")] = None - cd: Annotated[Optional[str], pydantic.Field(alias="CD")] = None - ck: Annotated[Optional[str], pydantic.Field(alias="CK")] = None - cr: Annotated[Optional[str], pydantic.Field(alias="CR")] = None - ci: Annotated[Optional[str], pydantic.Field(alias="CI")] = None - hr: Annotated[Optional[str], pydantic.Field(alias="HR")] = None - cu: Annotated[Optional[str], pydantic.Field(alias="CU")] = None - cy: Annotated[Optional[str], pydantic.Field(alias="CY")] = None - cz: Annotated[Optional[str], pydantic.Field(alias="CZ")] = None - dk: Annotated[Optional[str], pydantic.Field(alias="DK")] = None - dj: Annotated[Optional[str], pydantic.Field(alias="DJ")] = None - dm: Annotated[Optional[str], pydantic.Field(alias="DM")] = None - do: Annotated[Optional[str], pydantic.Field(alias="DO")] = None - ec: Annotated[Optional[str], pydantic.Field(alias="EC")] = None - eg: Annotated[Optional[str], pydantic.Field(alias="EG")] = None - sv: Annotated[Optional[str], pydantic.Field(alias="SV")] = None - gq: Annotated[Optional[str], pydantic.Field(alias="GQ")] = None - er: Annotated[Optional[str], pydantic.Field(alias="ER")] = None - ee: Annotated[Optional[str], pydantic.Field(alias="EE")] = None - et: Annotated[Optional[str], pydantic.Field(alias="ET")] = None - fk: Annotated[Optional[str], pydantic.Field(alias="FK")] = None - fo: Annotated[Optional[str], pydantic.Field(alias="FO")] = None - fj: Annotated[Optional[str], pydantic.Field(alias="FJ")] = None - fi: Annotated[Optional[str], pydantic.Field(alias="FI")] = None - fr: Annotated[Optional[str], pydantic.Field(alias="FR")] = None - gf: Annotated[Optional[str], pydantic.Field(alias="GF")] = None - pf: Annotated[Optional[str], pydantic.Field(alias="PF")] = None - tf: Annotated[Optional[str], pydantic.Field(alias="TF")] = None - ga: Annotated[Optional[str], pydantic.Field(alias="GA")] = None - gm: Annotated[Optional[str], pydantic.Field(alias="GM")] = None - ge: Annotated[Optional[str], pydantic.Field(alias="GE")] = None - de: Annotated[Optional[str], pydantic.Field(alias="DE")] = None - gh: Annotated[Optional[str], pydantic.Field(alias="GH")] = None - gi: Annotated[Optional[str], pydantic.Field(alias="GI")] = None - gr: Annotated[Optional[str], pydantic.Field(alias="GR")] = None - gl: Annotated[Optional[str], pydantic.Field(alias="GL")] = None - gd: Annotated[Optional[str], pydantic.Field(alias="GD")] = None - gp: Annotated[Optional[str], pydantic.Field(alias="GP")] = None - gu: Annotated[Optional[str], pydantic.Field(alias="GU")] = None - gt: Annotated[Optional[str], pydantic.Field(alias="GT")] = None - gn: Annotated[Optional[str], pydantic.Field(alias="GN")] = None - gw: Annotated[Optional[str], pydantic.Field(alias="GW")] = None - gy: Annotated[Optional[str], pydantic.Field(alias="GY")] = None - ht: Annotated[Optional[str], pydantic.Field(alias="HT")] = None - hm: Annotated[Optional[str], pydantic.Field(alias="HM")] = None - va: Annotated[Optional[str], pydantic.Field(alias="VA")] = None - hn: Annotated[Optional[str], pydantic.Field(alias="HN")] = None - hk: Annotated[Optional[str], pydantic.Field(alias="HK")] = None - hu: Annotated[Optional[str], pydantic.Field(alias="HU")] = None - is_: Annotated[Optional[str], pydantic.Field(alias="IS")] = None - in_: Annotated[Optional[str], pydantic.Field(alias="IN")] = None - id: Annotated[Optional[str], pydantic.Field(alias="ID")] = None - ir: Annotated[Optional[str], pydantic.Field(alias="IR")] = None - iq: Annotated[Optional[str], pydantic.Field(alias="IQ")] = None - ie: Annotated[Optional[str], pydantic.Field(alias="IE")] = None - il: Annotated[Optional[str], pydantic.Field(alias="IL")] = None - it: Annotated[Optional[str], pydantic.Field(alias="IT")] = None - jm: Annotated[Optional[str], pydantic.Field(alias="JM")] = None - jp: Annotated[Optional[str], pydantic.Field(alias="JP")] = None - jo: Annotated[Optional[str], pydantic.Field(alias="JO")] = None - kz: Annotated[Optional[str], pydantic.Field(alias="KZ")] = None - ke: Annotated[Optional[str], pydantic.Field(alias="KE")] = None - ki: Annotated[Optional[str], pydantic.Field(alias="KI")] = None - kp: Annotated[Optional[str], pydantic.Field(alias="KP")] = None - kr: Annotated[Optional[str], pydantic.Field(alias="KR")] = None - kw: Annotated[Optional[str], pydantic.Field(alias="KW")] = None - kg: Annotated[Optional[str], pydantic.Field(alias="KG")] = None - la: Annotated[Optional[str], pydantic.Field(alias="LA")] = None - lv: Annotated[Optional[str], pydantic.Field(alias="LV")] = None - lb: Annotated[Optional[str], pydantic.Field(alias="LB")] = None - ls: Annotated[Optional[str], pydantic.Field(alias="LS")] = None - lr: Annotated[Optional[str], pydantic.Field(alias="LR")] = None - ly: Annotated[Optional[str], pydantic.Field(alias="LY")] = None - li: Annotated[Optional[str], pydantic.Field(alias="LI")] = None - lt: Annotated[Optional[str], pydantic.Field(alias="LT")] = None - lu: Annotated[Optional[str], pydantic.Field(alias="LU")] = None - mo: Annotated[Optional[str], pydantic.Field(alias="MO")] = None - mg: Annotated[Optional[str], pydantic.Field(alias="MG")] = None - mw: Annotated[Optional[str], pydantic.Field(alias="MW")] = None - my: Annotated[Optional[str], pydantic.Field(alias="MY")] = None - mv: Annotated[Optional[str], pydantic.Field(alias="MV")] = None - ml: Annotated[Optional[str], pydantic.Field(alias="ML")] = None - mt: Annotated[Optional[str], pydantic.Field(alias="MT")] = None - mh: Annotated[Optional[str], pydantic.Field(alias="MH")] = None - mq: Annotated[Optional[str], pydantic.Field(alias="MQ")] = None - mr: Annotated[Optional[str], pydantic.Field(alias="MR")] = None - mu: Annotated[Optional[str], pydantic.Field(alias="MU")] = None - yt: Annotated[Optional[str], pydantic.Field(alias="YT")] = None - mx: Annotated[Optional[str], pydantic.Field(alias="MX")] = None - fm: Annotated[Optional[str], pydantic.Field(alias="FM")] = None - md: Annotated[Optional[str], pydantic.Field(alias="MD")] = None - mc: Annotated[Optional[str], pydantic.Field(alias="MC")] = None - mn: Annotated[Optional[str], pydantic.Field(alias="MN")] = None - ms: Annotated[Optional[str], pydantic.Field(alias="MS")] = None - ma: Annotated[Optional[str], pydantic.Field(alias="MA")] = None - mz: Annotated[Optional[str], pydantic.Field(alias="MZ")] = None - mm: Annotated[Optional[str], pydantic.Field(alias="MM")] = None - na: Annotated[Optional[str], pydantic.Field(alias="NA")] = None - nr: Annotated[Optional[str], pydantic.Field(alias="NR")] = None - np: Annotated[Optional[str], pydantic.Field(alias="NP")] = None - nl: Annotated[Optional[str], pydantic.Field(alias="NL")] = None - nc: Annotated[Optional[str], pydantic.Field(alias="NC")] = None - nz: Annotated[Optional[str], pydantic.Field(alias="NZ")] = None - ni: Annotated[Optional[str], pydantic.Field(alias="NI")] = None - ne: Annotated[Optional[str], pydantic.Field(alias="NE")] = None - ng: Annotated[Optional[str], pydantic.Field(alias="NG")] = None - nu: Annotated[Optional[str], pydantic.Field(alias="NU")] = None - nf: Annotated[Optional[str], pydantic.Field(alias="NF")] = None - mk: Annotated[Optional[str], pydantic.Field(alias="MK")] = None - mp: Annotated[Optional[str], pydantic.Field(alias="MP")] = None - no: Annotated[Optional[str], pydantic.Field(alias="NO")] = None - om: Annotated[Optional[str], pydantic.Field(alias="OM")] = None - pk: Annotated[Optional[str], pydantic.Field(alias="PK")] = None - pw: Annotated[Optional[str], pydantic.Field(alias="PW")] = None - ps: Annotated[Optional[str], pydantic.Field(alias="PS")] = None - pa: Annotated[Optional[str], pydantic.Field(alias="PA")] = None - pg: Annotated[Optional[str], pydantic.Field(alias="PG")] = None - py: Annotated[Optional[str], pydantic.Field(alias="PY")] = None - pe: Annotated[Optional[str], pydantic.Field(alias="PE")] = None - ph: Annotated[Optional[str], pydantic.Field(alias="PH")] = None - pn: Annotated[Optional[str], pydantic.Field(alias="PN")] = None - pl: Annotated[Optional[str], pydantic.Field(alias="PL")] = None - pt: Annotated[Optional[str], pydantic.Field(alias="PT")] = None - pr: Annotated[Optional[str], pydantic.Field(alias="PR")] = None - qa: Annotated[Optional[str], pydantic.Field(alias="QA")] = None - re: Annotated[Optional[str], pydantic.Field(alias="RE")] = None - ro: Annotated[Optional[str], pydantic.Field(alias="RO")] = None - ru: Annotated[Optional[str], pydantic.Field(alias="RU")] = None - rw: Annotated[Optional[str], pydantic.Field(alias="RW")] = None - sh: Annotated[Optional[str], pydantic.Field(alias="SH")] = None - kn: Annotated[Optional[str], pydantic.Field(alias="KN")] = None - lc: Annotated[Optional[str], pydantic.Field(alias="LC")] = None - pm: Annotated[Optional[str], pydantic.Field(alias="PM")] = None - vc: Annotated[Optional[str], pydantic.Field(alias="VC")] = None - ws: Annotated[Optional[str], pydantic.Field(alias="WS")] = None - sm: Annotated[Optional[str], pydantic.Field(alias="SM")] = None - st: Annotated[Optional[str], pydantic.Field(alias="ST")] = None - sa: Annotated[Optional[str], pydantic.Field(alias="SA")] = None - sn: Annotated[Optional[str], pydantic.Field(alias="SN")] = None - sc: Annotated[Optional[str], pydantic.Field(alias="SC")] = None - sl: Annotated[Optional[str], pydantic.Field(alias="SL")] = None - sg: Annotated[Optional[str], pydantic.Field(alias="SG")] = None - sk: Annotated[Optional[str], pydantic.Field(alias="SK")] = None - si: Annotated[Optional[str], pydantic.Field(alias="SI")] = None - sb: Annotated[Optional[str], pydantic.Field(alias="SB")] = None - so: Annotated[Optional[str], pydantic.Field(alias="SO")] = None - za: Annotated[Optional[str], pydantic.Field(alias="ZA")] = None - gs: Annotated[Optional[str], pydantic.Field(alias="GS")] = None - es: Annotated[Optional[str], pydantic.Field(alias="ES")] = None - lk: Annotated[Optional[str], pydantic.Field(alias="LK")] = None - sd: Annotated[Optional[str], pydantic.Field(alias="SD")] = None - sr: Annotated[Optional[str], pydantic.Field(alias="SR")] = None - sj: Annotated[Optional[str], pydantic.Field(alias="SJ")] = None - sz: Annotated[Optional[str], pydantic.Field(alias="SZ")] = None - se: Annotated[Optional[str], pydantic.Field(alias="SE")] = None - ch: Annotated[Optional[str], pydantic.Field(alias="CH")] = None - sy: Annotated[Optional[str], pydantic.Field(alias="SY")] = None - tw: Annotated[Optional[str], pydantic.Field(alias="TW")] = None - tj: Annotated[Optional[str], pydantic.Field(alias="TJ")] = None - tz: Annotated[Optional[str], pydantic.Field(alias="TZ")] = None - th: Annotated[Optional[str], pydantic.Field(alias="TH")] = None - tl: Annotated[Optional[str], pydantic.Field(alias="TL")] = None - tg: Annotated[Optional[str], pydantic.Field(alias="TG")] = None - tk: Annotated[Optional[str], pydantic.Field(alias="TK")] = None - to: Annotated[Optional[str], pydantic.Field(alias="TO")] = None - tt: Annotated[Optional[str], pydantic.Field(alias="TT")] = None - tn: Annotated[Optional[str], pydantic.Field(alias="TN")] = None - tr: Annotated[Optional[str], pydantic.Field(alias="TR")] = None - tm: Annotated[Optional[str], pydantic.Field(alias="TM")] = None - tc: Annotated[Optional[str], pydantic.Field(alias="TC")] = None - tv: Annotated[Optional[str], pydantic.Field(alias="TV")] = None - ug: Annotated[Optional[str], pydantic.Field(alias="UG")] = None - ua: Annotated[Optional[str], pydantic.Field(alias="UA")] = None - ae: Annotated[Optional[str], pydantic.Field(alias="AE")] = None - gb: Annotated[Optional[str], pydantic.Field(alias="GB")] = None - us: Annotated[Optional[str], pydantic.Field(alias="US")] = None - um: Annotated[Optional[str], pydantic.Field(alias="UM")] = None - uy: Annotated[Optional[str], pydantic.Field(alias="UY")] = None - uz: Annotated[Optional[str], pydantic.Field(alias="UZ")] = None - vu: Annotated[Optional[str], pydantic.Field(alias="VU")] = None - ve: Annotated[Optional[str], pydantic.Field(alias="VE")] = None - vn: Annotated[Optional[str], pydantic.Field(alias="VN")] = None - vg: Annotated[Optional[str], pydantic.Field(alias="VG")] = None - vi: Annotated[Optional[str], pydantic.Field(alias="VI")] = None - wf: Annotated[Optional[str], pydantic.Field(alias="WF")] = None - eh: Annotated[Optional[str], pydantic.Field(alias="EH")] = None - ye: Annotated[Optional[str], pydantic.Field(alias="YE")] = None - zm: Annotated[Optional[str], pydantic.Field(alias="ZM")] = None - zw: Annotated[Optional[str], pydantic.Field(alias="ZW")] = None - ax: Annotated[Optional[str], pydantic.Field(alias="AX")] = None - bq: Annotated[Optional[str], pydantic.Field(alias="BQ")] = None - cw: Annotated[Optional[str], pydantic.Field(alias="CW")] = None - gg: Annotated[Optional[str], pydantic.Field(alias="GG")] = None - im: Annotated[Optional[str], pydantic.Field(alias="IM")] = None - je: Annotated[Optional[str], pydantic.Field(alias="JE")] = None - me: Annotated[Optional[str], pydantic.Field(alias="ME")] = None - bl: Annotated[Optional[str], pydantic.Field(alias="BL")] = None - mf: Annotated[Optional[str], pydantic.Field(alias="MF")] = None - rs: Annotated[Optional[str], pydantic.Field(alias="RS")] = None - sx: Annotated[Optional[str], pydantic.Field(alias="SX")] = None - ss: Annotated[Optional[str], pydantic.Field(alias="SS")] = None - xk: Annotated[Optional[str], pydantic.Field(alias="XK")] = None - - -class TrackSaleLinkTypedDict(TypedDict): - id: str - r"""The unique ID of the short link.""" - domain: str - r"""The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).""" - key: str - r"""The short link slug. If not provided, a random 7-character slug will be generated.""" - external_id: Nullable[str] - r"""This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter.""" - url: str - r"""The destination URL of the short link.""" - expires_at: Nullable[str] - r"""The date and time when the short link will expire in ISO-8601 format.""" - expired_url: Nullable[str] - r"""The URL to redirect to when the short link has expired.""" - password: Nullable[str] - r"""The password required to access the destination URL of the short link.""" - title: Nullable[str] - r"""The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - description: Nullable[str] - r"""The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - image: Nullable[str] - r"""The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - video: Nullable[str] - r"""The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og""" - ios: Nullable[str] - r"""The iOS destination URL for the short link for iOS device targeting.""" - android: Nullable[str] - r"""The Android destination URL for the short link for Android device targeting.""" - geo: Nullable[TrackSaleGeoTypedDict] - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - comments: Nullable[str] - r"""The comments for the short link.""" - short_link: str - r"""The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).""" - qr_code: str - r"""The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).""" - utm_source: Nullable[str] - r"""The UTM source of the short link.""" - utm_medium: Nullable[str] - r"""The UTM medium of the short link.""" - utm_campaign: Nullable[str] - r"""The UTM campaign of the short link.""" - utm_term: Nullable[str] - r"""The UTM term of the short link.""" - utm_content: Nullable[str] - r"""The UTM content of the short link.""" - user_id: str - r"""The user ID of the creator of the short link.""" - workspace_id: str - r"""The workspace ID of the short link.""" - last_clicked: Nullable[str] - r"""The date and time when the short link was last clicked.""" - created_at: str - r"""The date and time when the short link was created.""" - updated_at: str - r"""The date and time when the short link was last updated.""" - track_conversion: NotRequired[bool] - r"""[BETA] Whether to track conversions for the short link.""" - archived: NotRequired[bool] - r"""Whether the short link is archived.""" - proxy: NotRequired[bool] - r"""Whether the short link uses Custom Social Media Cards feature.""" - rewrite: NotRequired[bool] - r"""Whether the short link uses link cloaking.""" - do_index: NotRequired[bool] - r"""Whether to allow search engines to index the short link.""" - public_stats: NotRequired[bool] - r"""Whether the short link's stats are publicly accessible.""" - clicks: NotRequired[float] - r"""The number of clicks on the short link.""" - leads: NotRequired[float] - r"""[BETA]: The number of leads the short links has generated.""" - sales: NotRequired[float] - r"""[BETA]: The number of sales the short links has generated.""" - sale_amount: NotRequired[float] - r"""[BETA]: The total dollar amount of sales the short links has generated (in cents).""" - - -class TrackSaleLink(BaseModel): - id: str - r"""The unique ID of the short link.""" - domain: str - r"""The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).""" - key: str - r"""The short link slug. If not provided, a random 7-character slug will be generated.""" - external_id: Annotated[Nullable[str], pydantic.Field(alias="externalId")] - r"""This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter.""" - url: str - r"""The destination URL of the short link.""" - expires_at: Annotated[Nullable[str], pydantic.Field(alias="expiresAt")] - r"""The date and time when the short link will expire in ISO-8601 format.""" - expired_url: Annotated[Nullable[str], pydantic.Field(alias="expiredUrl")] - r"""The URL to redirect to when the short link has expired.""" - password: Nullable[str] - r"""The password required to access the destination URL of the short link.""" - title: Nullable[str] - r"""The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - description: Nullable[str] - r"""The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - image: Nullable[str] - r"""The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.""" - video: Nullable[str] - r"""The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og""" - ios: Nullable[str] - r"""The iOS destination URL for the short link for iOS device targeting.""" - android: Nullable[str] - r"""The Android destination URL for the short link for Android device targeting.""" - geo: Nullable[TrackSaleGeo] - r"""Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo""" - comments: Nullable[str] - r"""The comments for the short link.""" - short_link: Annotated[str, pydantic.Field(alias="shortLink")] - r"""The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).""" - qr_code: Annotated[str, pydantic.Field(alias="qrCode")] - r"""The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).""" - utm_source: Nullable[str] - r"""The UTM source of the short link.""" - utm_medium: Nullable[str] - r"""The UTM medium of the short link.""" - utm_campaign: Nullable[str] - r"""The UTM campaign of the short link.""" - utm_term: Nullable[str] - r"""The UTM term of the short link.""" - utm_content: Nullable[str] - r"""The UTM content of the short link.""" - user_id: Annotated[str, pydantic.Field(alias="userId")] - r"""The user ID of the creator of the short link.""" - workspace_id: Annotated[str, pydantic.Field(alias="workspaceId")] - r"""The workspace ID of the short link.""" - last_clicked: Annotated[Nullable[str], pydantic.Field(alias="lastClicked")] - r"""The date and time when the short link was last clicked.""" - created_at: Annotated[str, pydantic.Field(alias="createdAt")] - r"""The date and time when the short link was created.""" - updated_at: Annotated[str, pydantic.Field(alias="updatedAt")] - r"""The date and time when the short link was last updated.""" - track_conversion: Annotated[Optional[bool], pydantic.Field(alias="trackConversion")] = False - r"""[BETA] Whether to track conversions for the short link.""" - archived: Optional[bool] = False - r"""Whether the short link is archived.""" - proxy: Optional[bool] = False - r"""Whether the short link uses Custom Social Media Cards feature.""" - rewrite: Optional[bool] = False - r"""Whether the short link uses link cloaking.""" - do_index: Annotated[Optional[bool], pydantic.Field(alias="doIndex")] = False - r"""Whether to allow search engines to index the short link.""" - public_stats: Annotated[Optional[bool], pydantic.Field(alias="publicStats")] = False - r"""Whether the short link's stats are publicly accessible.""" - clicks: Optional[float] = 0 - r"""The number of clicks on the short link.""" - leads: Optional[float] = 0 - r"""[BETA]: The number of leads the short links has generated.""" - sales: Optional[float] = 0 - r"""[BETA]: The number of sales the short links has generated.""" - sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 - r"""[BETA]: The total dollar amount of sales the short links has generated (in cents).""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["trackConversion", "archived", "proxy", "rewrite", "doIndex", "publicStats", "clicks", "leads", "sales", "saleAmount"] - nullable_fields = ["externalId", "expiresAt", "expiredUrl", "password", "title", "description", "image", "video", "ios", "android", "geo", "comments", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "lastClicked"] + nullable_fields = ["invoiceId", "metadata"] null_default_fields = [] serialized = handler(self) @@ -887,8 +163,6 @@ class TrackSaleResponseBodyTypedDict(TypedDict): event_name: str customer: TrackSaleCustomerTypedDict sale: SaleTypedDict - click: TrackSaleClickTypedDict - link: TrackSaleLinkTypedDict class TrackSaleResponseBody(BaseModel): @@ -897,6 +171,4 @@ class TrackSaleResponseBody(BaseModel): event_name: Annotated[str, pydantic.Field(alias="eventName")] customer: TrackSaleCustomer sale: Sale - click: TrackSaleClick - link: TrackSaleLink diff --git a/src/dub/sdkconfiguration.py b/src/dub/sdkconfiguration.py index 31e2f44..0fc77b0 100644 --- a/src/dub/sdkconfiguration.py +++ b/src/dub/sdkconfiguration.py @@ -27,9 +27,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = "python" openapi_doc_version: str = "0.0.1" - sdk_version: str = "0.7.3" - gen_version: str = "2.407.2" - user_agent: str = "speakeasy-sdk/python 0.7.3 2.407.2 0.0.1 dub" + sdk_version: str = "0.7.4" + gen_version: str = "2.409.0" + user_agent: str = "speakeasy-sdk/python 0.7.4 2.409.0 0.0.1 dub" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None