From f9d34a82ffc12400c2fc2946d1174613ca936e54 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 30 Aug 2024 21:04:09 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.385.0 --- .speakeasy/gen.lock | 120 +-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 52 +- RELEASES.md | 12 +- codeSamples.yaml | 314 +++---- ...{salesbrowsers.md => analyticsbrowsers.md} | 8 +- docs/models/components/analyticscities.md | 13 + ...escountry.md => analyticscitiescountry.md} | 2 +- docs/models/components/analyticscount.md | 11 + ...alescountries.md => analyticscountries.md} | 11 +- .../{salesdevices.md => analyticsdevices.md} | 8 +- docs/models/components/analyticsos.md | 12 + ...{salesreferers.md => analyticsreferers.md} | 8 +- ...estimeseries.md => analyticstimeseries.md} | 8 +- ...{salestoplinks.md => analyticstoplinks.md} | 8 +- docs/models/components/analyticstopurls.md | 12 + docs/models/components/city.md | 8 + docs/models/components/clickevent.md | 23 + docs/models/components/clickevents.md | 22 - docs/models/components/clicksbrowsers.md | 9 - docs/models/components/clickscities.md | 10 - docs/models/components/clickscitiescountry.md | 259 ------ docs/models/components/clickscount.md | 8 - docs/models/components/clickscountries.md | 9 - docs/models/components/clicksdevices.md | 9 - docs/models/components/clicksos.md | 9 - docs/models/components/clicksreferers.md | 9 - docs/models/components/clickstimeseries.md | 9 - docs/models/components/clickstoplinks.md | 15 - docs/models/components/clickstopurls.md | 9 - docs/models/components/event.md | 8 + docs/models/components/leadevent.md | 28 + docs/models/components/leadeventevent.md | 8 + docs/models/components/leadsbrowsers.md | 9 - docs/models/components/leadscities.md | 10 - docs/models/components/leadscitiescountry.md | 259 ------ docs/models/components/leadscount.md | 8 - docs/models/components/leadscountries.md | 9 - .../components/leadscountriescountry.md | 259 ------ docs/models/components/leadsdevices.md | 9 - docs/models/components/leadsos.md | 9 - docs/models/components/leadsreferers.md | 9 - docs/models/components/leadstimeseries.md | 9 - docs/models/components/leadstoplinks.md | 15 - docs/models/components/leadstopurls.md | 9 - docs/models/components/saleevent.md | 31 + docs/models/components/saleeventevent.md | 8 + docs/models/components/salescities.md | 11 - docs/models/components/salescount.md | 9 - .../components/salescountriescountry.md | 259 ------ docs/models/components/salesos.md | 10 - docs/models/components/salestopurls.md | 10 - docs/models/operations/click.md | 20 + docs/models/operations/customer.md | 11 + docs/models/operations/geo.md | 259 ++++++ docs/models/operations/link.md | 45 + .../operations/listeventsresponsebody.md | 25 + .../retrieveanalyticsresponsebody.md | 160 +--- docs/models/operations/sale.md | 11 + docs/models/operations/sortby.md | 3 +- .../operations/trackleadresponsebody.md | 15 +- docs/models/operations/tracksaleclick.md | 20 + docs/models/operations/tracksalecustomer.md | 11 + docs/models/operations/tracksalegeo.md | 259 ++++++ docs/models/operations/tracksalelink.md | 45 + .../operations/tracksaleresponsebody.md | 16 +- docs/sdks/events/README.md | 2 +- poetry.lock | 31 +- pylintrc | 6 +- pyproject.toml | 3 +- src/dub/events.py | 12 +- src/dub/models/components/__init__.py | 46 +- .../models/components/analyticsbrowsers.py | 34 + .../{salescities.py => analyticscities.py} | 30 +- src/dub/models/components/analyticscount.py | 30 + ...alescountries.py => analyticscountries.py} | 35 +- src/dub/models/components/analyticsdevices.py | 34 + src/dub/models/components/analyticsos.py | 34 + .../models/components/analyticsreferers.py | 34 + .../models/components/analyticstimeseries.py | 34 + ...{salestoplinks.py => analyticstoplinks.py} | 24 +- src/dub/models/components/analyticstopurls.py | 34 + .../{clickevents.py => clickevent.py} | 15 +- src/dub/models/components/clicksbrowsers.py | 20 - src/dub/models/components/clickscities.py | 278 ------ src/dub/models/components/clickscount.py | 16 - src/dub/models/components/clickscountries.py | 274 ------ src/dub/models/components/clicksdevices.py | 20 - src/dub/models/components/clicksos.py | 20 - src/dub/models/components/clicksreferers.py | 20 - src/dub/models/components/clickstimeseries.py | 20 - src/dub/models/components/clickstoplinks.py | 46 - src/dub/models/components/clickstopurls.py | 20 - src/dub/models/components/leadevent.py | 86 ++ src/dub/models/components/leadsbrowsers.py | 20 - src/dub/models/components/leadscities.py | 278 ------ src/dub/models/components/leadscount.py | 16 - src/dub/models/components/leadscountries.py | 274 ------ src/dub/models/components/leadsdevices.py | 20 - src/dub/models/components/leadsos.py | 20 - src/dub/models/components/leadsreferers.py | 20 - src/dub/models/components/leadstimeseries.py | 20 - src/dub/models/components/leadstoplinks.py | 46 - src/dub/models/components/leadstopurls.py | 20 - src/dub/models/components/saleevent.py | 93 ++ src/dub/models/components/salesbrowsers.py | 24 - src/dub/models/components/salescount.py | 20 - src/dub/models/components/salesdevices.py | 24 - src/dub/models/components/salesos.py | 24 - src/dub/models/components/salesreferers.py | 24 - src/dub/models/components/salestimeseries.py | 24 - src/dub/models/components/salestopurls.py | 24 - src/dub/models/operations/__init__.py | 8 +- src/dub/models/operations/listevents.py | 13 +- .../models/operations/retrieveanalytics.py | 6 +- src/dub/models/operations/tracklead.py | 774 ++++++++++++++++- src/dub/models/operations/tracksale.py | 800 +++++++++++++++++- src/dub/sdkconfiguration.py | 6 +- src/dub/utils/security.py | 15 +- 120 files changed, 3281 insertions(+), 3507 deletions(-) rename docs/models/components/{salesbrowsers.md => analyticsbrowsers.md} (51%) create mode 100644 docs/models/components/analyticscities.md rename docs/models/components/{salescitiescountry.md => analyticscitiescountry.md} (99%) create mode 100644 docs/models/components/analyticscount.md rename docs/models/components/{salescountries.md => analyticscountries.md} (51%) rename docs/models/components/{salesdevices.md => analyticsdevices.md} (51%) create mode 100644 docs/models/components/analyticsos.md rename docs/models/components/{salesreferers.md => analyticsreferers.md} (53%) rename docs/models/components/{salestimeseries.md => analyticstimeseries.md} (50%) rename docs/models/components/{salestoplinks.md => analyticstoplinks.md} (78%) create mode 100644 docs/models/components/analyticstopurls.md create mode 100644 docs/models/components/city.md create mode 100644 docs/models/components/clickevent.md delete mode 100644 docs/models/components/clickevents.md delete mode 100644 docs/models/components/clicksbrowsers.md delete mode 100644 docs/models/components/clickscities.md delete mode 100644 docs/models/components/clickscitiescountry.md delete mode 100644 docs/models/components/clickscount.md delete mode 100644 docs/models/components/clickscountries.md delete mode 100644 docs/models/components/clicksdevices.md delete mode 100644 docs/models/components/clicksos.md delete mode 100644 docs/models/components/clicksreferers.md delete mode 100644 docs/models/components/clickstimeseries.md delete mode 100644 docs/models/components/clickstoplinks.md delete mode 100644 docs/models/components/clickstopurls.md create mode 100644 docs/models/components/event.md create mode 100644 docs/models/components/leadevent.md create mode 100644 docs/models/components/leadeventevent.md delete mode 100644 docs/models/components/leadsbrowsers.md delete mode 100644 docs/models/components/leadscities.md delete mode 100644 docs/models/components/leadscitiescountry.md delete mode 100644 docs/models/components/leadscount.md delete mode 100644 docs/models/components/leadscountries.md delete mode 100644 docs/models/components/leadscountriescountry.md delete mode 100644 docs/models/components/leadsdevices.md delete mode 100644 docs/models/components/leadsos.md delete mode 100644 docs/models/components/leadsreferers.md delete mode 100644 docs/models/components/leadstimeseries.md delete mode 100644 docs/models/components/leadstoplinks.md delete mode 100644 docs/models/components/leadstopurls.md create mode 100644 docs/models/components/saleevent.md create mode 100644 docs/models/components/saleeventevent.md delete mode 100644 docs/models/components/salescities.md delete mode 100644 docs/models/components/salescount.md delete mode 100644 docs/models/components/salescountriescountry.md delete mode 100644 docs/models/components/salesos.md delete mode 100644 docs/models/components/salestopurls.md create mode 100644 docs/models/operations/click.md create mode 100644 docs/models/operations/customer.md create mode 100644 docs/models/operations/geo.md create mode 100644 docs/models/operations/link.md create mode 100644 docs/models/operations/listeventsresponsebody.md create mode 100644 docs/models/operations/sale.md create mode 100644 docs/models/operations/tracksaleclick.md create mode 100644 docs/models/operations/tracksalecustomer.md create mode 100644 docs/models/operations/tracksalegeo.md create mode 100644 docs/models/operations/tracksalelink.md create mode 100644 src/dub/models/components/analyticsbrowsers.py rename src/dub/models/components/{salescities.py => analyticscities.py} (84%) create mode 100644 src/dub/models/components/analyticscount.py rename src/dub/models/components/{salescountries.py => analyticscountries.py} (83%) create mode 100644 src/dub/models/components/analyticsdevices.py create mode 100644 src/dub/models/components/analyticsos.py create mode 100644 src/dub/models/components/analyticsreferers.py create mode 100644 src/dub/models/components/analyticstimeseries.py rename src/dub/models/components/{salestoplinks.py => analyticstoplinks.py} (68%) create mode 100644 src/dub/models/components/analyticstopurls.py rename src/dub/models/components/{clickevents.py => clickevent.py} (84%) delete mode 100644 src/dub/models/components/clicksbrowsers.py delete mode 100644 src/dub/models/components/clickscities.py delete mode 100644 src/dub/models/components/clickscount.py delete mode 100644 src/dub/models/components/clickscountries.py delete mode 100644 src/dub/models/components/clicksdevices.py delete mode 100644 src/dub/models/components/clicksos.py delete mode 100644 src/dub/models/components/clicksreferers.py delete mode 100644 src/dub/models/components/clickstimeseries.py delete mode 100644 src/dub/models/components/clickstoplinks.py delete mode 100644 src/dub/models/components/clickstopurls.py create mode 100644 src/dub/models/components/leadevent.py delete mode 100644 src/dub/models/components/leadsbrowsers.py delete mode 100644 src/dub/models/components/leadscities.py delete mode 100644 src/dub/models/components/leadscount.py delete mode 100644 src/dub/models/components/leadscountries.py delete mode 100644 src/dub/models/components/leadsdevices.py delete mode 100644 src/dub/models/components/leadsos.py delete mode 100644 src/dub/models/components/leadsreferers.py delete mode 100644 src/dub/models/components/leadstimeseries.py delete mode 100644 src/dub/models/components/leadstoplinks.py delete mode 100644 src/dub/models/components/leadstopurls.py create mode 100644 src/dub/models/components/saleevent.py delete mode 100644 src/dub/models/components/salesbrowsers.py delete mode 100644 src/dub/models/components/salescount.py delete mode 100644 src/dub/models/components/salesdevices.py delete mode 100644 src/dub/models/components/salesos.py delete mode 100644 src/dub/models/components/salesreferers.py delete mode 100644 src/dub/models/components/salestimeseries.py delete mode 100644 src/dub/models/components/salestopurls.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4d4081d..33bfc78 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: eed7a2ad5cc93c07aac35e5c6d536a9a + docChecksum: 721d398075627f52145125ad6074cef5 docVersion: 0.0.1 - speakeasyVersion: 1.379.0 - generationVersion: 2.404.3 - releaseVersion: 0.7.2 - configChecksum: ec7d256a42c27d14e1b6541b5adaf784 + speakeasyVersion: 1.385.0 + generationVersion: 2.407.2 + releaseVersion: 0.7.3 + configChecksum: 3b18df936d28dda94b2d523af0561037 repoURL: https://github.com/dubinc/dub-python.git installationURL: https://github.com/dubinc/dub-python.git published: true @@ -14,7 +14,7 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.2 - core: 5.4.1 + core: 5.4.2 defaultEnabledRetries: 0.2.0 deprecations: 3.0.0 envVarSecurityUsage: 0.3.1 @@ -102,39 +102,21 @@ generatedFiles: - src/dub/models/components/linkschema.py - src/dub/models/components/tagschema.py - src/dub/models/components/linkgeotargeting.py - - src/dub/models/components/clickscount.py - - src/dub/models/components/clickstimeseries.py - - src/dub/models/components/clickscountries.py - - src/dub/models/components/clickscities.py - - src/dub/models/components/clicksdevices.py - - src/dub/models/components/clicksbrowsers.py - - src/dub/models/components/clicksos.py - - src/dub/models/components/clicksreferers.py - - src/dub/models/components/clickstoplinks.py - - src/dub/models/components/clickstopurls.py - - src/dub/models/components/leadscount.py - - src/dub/models/components/leadstimeseries.py - - src/dub/models/components/leadscountries.py - - src/dub/models/components/leadscities.py - - src/dub/models/components/leadsdevices.py - - src/dub/models/components/leadsbrowsers.py - - src/dub/models/components/leadsos.py - - src/dub/models/components/leadsreferers.py - - src/dub/models/components/leadstoplinks.py - - src/dub/models/components/leadstopurls.py - - src/dub/models/components/salescount.py - - src/dub/models/components/salestimeseries.py - - src/dub/models/components/salescountries.py - - src/dub/models/components/salescities.py - - src/dub/models/components/salesdevices.py - - src/dub/models/components/salesbrowsers.py - - src/dub/models/components/salesos.py - - src/dub/models/components/salesreferers.py - - src/dub/models/components/salestoplinks.py - - src/dub/models/components/salestopurls.py + - src/dub/models/components/analyticscount.py + - src/dub/models/components/analyticstimeseries.py + - src/dub/models/components/analyticscountries.py + - src/dub/models/components/analyticscities.py + - src/dub/models/components/analyticsdevices.py + - src/dub/models/components/analyticsbrowsers.py + - src/dub/models/components/analyticsos.py + - src/dub/models/components/analyticsreferers.py + - src/dub/models/components/analyticstoplinks.py + - src/dub/models/components/analyticstopurls.py - src/dub/models/components/countrycode.py - src/dub/models/components/continentcode.py - - src/dub/models/components/clickevents.py + - src/dub/models/components/clickevent.py + - src/dub/models/components/leadevent.py + - src/dub/models/components/saleevent.py - src/dub/models/components/workspaceschema.py - src/dub/models/components/domainschema.py - src/dub/models/components/security.py @@ -193,6 +175,7 @@ generatedFiles: - docs/models/operations/order.md - docs/models/operations/sortby.md - docs/models/operations/listeventsrequest.md + - docs/models/operations/listeventsresponsebody.md - docs/models/operations/getworkspacerequest.md - docs/models/operations/updateworkspacerequestbody.md - docs/models/operations/updateworkspacerequest.md @@ -209,9 +192,18 @@ 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/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 @@ -222,45 +214,27 @@ generatedFiles: - docs/models/components/color.md - docs/models/components/tagschema.md - docs/models/components/linkgeotargeting.md - - docs/models/components/clickscount.md - - docs/models/components/clickstimeseries.md + - docs/models/components/analyticscount.md + - docs/models/components/analyticstimeseries.md - docs/models/components/country.md - - docs/models/components/clickscountries.md - - docs/models/components/clickscitiescountry.md - - docs/models/components/clickscities.md - - docs/models/components/clicksdevices.md - - docs/models/components/clicksbrowsers.md - - docs/models/components/clicksos.md - - docs/models/components/clicksreferers.md - - docs/models/components/clickstoplinks.md - - docs/models/components/clickstopurls.md - - docs/models/components/leadscount.md - - docs/models/components/leadstimeseries.md - - docs/models/components/leadscountriescountry.md - - docs/models/components/leadscountries.md - - docs/models/components/leadscitiescountry.md - - docs/models/components/leadscities.md - - docs/models/components/leadsdevices.md - - docs/models/components/leadsbrowsers.md - - docs/models/components/leadsos.md - - docs/models/components/leadsreferers.md - - docs/models/components/leadstoplinks.md - - docs/models/components/leadstopurls.md - - docs/models/components/salescount.md - - docs/models/components/salestimeseries.md - - docs/models/components/salescountriescountry.md - - docs/models/components/salescountries.md - - docs/models/components/salescitiescountry.md - - docs/models/components/salescities.md - - docs/models/components/salesdevices.md - - docs/models/components/salesbrowsers.md - - docs/models/components/salesos.md - - docs/models/components/salesreferers.md - - docs/models/components/salestoplinks.md - - docs/models/components/salestopurls.md + - docs/models/components/city.md + - docs/models/components/analyticscountries.md + - docs/models/components/analyticscitiescountry.md + - docs/models/components/analyticscities.md + - docs/models/components/analyticsdevices.md + - docs/models/components/analyticsbrowsers.md + - docs/models/components/analyticsos.md + - docs/models/components/analyticsreferers.md + - docs/models/components/analyticstoplinks.md + - docs/models/components/analyticstopurls.md - docs/models/components/countrycode.md - docs/models/components/continentcode.md - - docs/models/components/clickevents.md + - docs/models/components/event.md + - docs/models/components/clickevent.md + - docs/models/components/leadeventevent.md + - docs/models/components/leadevent.md + - docs/models/components/saleeventevent.md + - docs/models/components/saleevent.md - docs/models/components/plan.md - docs/models/components/role.md - docs/models/components/users.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 38e021f..a8e5891 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 0.7.2 + version: 0.7.3 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3e07e70..f6f0cd9 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.379.0 +speakeasyVersion: 1.385.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:e10814e50c3c1f0975ae3fed112f231098dbb3173bb3d9ed4929511d3613f0cf - sourceBlobDigest: sha256:3a81fc537fb05c2a31c52cf7e4abad9cb5bfc861a162d0482c689c9561ad7bf4 + sourceRevisionDigest: sha256:f816d7cf91b05b49137970295afd49f9866e253e8bbc0e350b5f838dd7df244a + sourceBlobDigest: sha256:97dc3ab7247b0c882ab6f2652378b2b0ca20809d7ec993cb89dd174d476d205e tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:e10814e50c3c1f0975ae3fed112f231098dbb3173bb3d9ed4929511d3613f0cf - sourceBlobDigest: sha256:3a81fc537fb05c2a31c52cf7e4abad9cb5bfc861a162d0482c689c9561ad7bf4 + sourceRevisionDigest: sha256:f816d7cf91b05b49137970295afd49f9866e253e8bbc0e350b5f838dd7df244a + sourceBlobDigest: sha256:97dc3ab7247b0c882ab6f2652378b2b0ca20809d7ec993cb89dd174d476d205e codeSamplesNamespace: code-samples-python-my-first-target - codeSamplesRevisionDigest: sha256:0bbaac304f4d738b2f96acfbfe3890648fbf9bdc4243724b0bc759b93226eb2c + codeSamplesRevisionDigest: sha256:b2224aa374e16c0196cd79bedf7aeee7a6425256de6824d2886b242c239c790d outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index b3780ba..6386060 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,45 @@ Learn more about the Dub.co Python SDK in the [official documentation](https://dub.co/docs/sdks/python/overview). + +## Summary + +Dub.co API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs. + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [IDE Support](#ide-support) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [Pagination](#pagination) +* [Retries](#retries) +* [Error Handling](#error-handling) +* [Server Selection](#server-selection) +* [Custom HTTP Client](#custom-http-client) +* [Authentication](#authentication) +* [Debugging](#debugging) + + ## SDK Installation -PIP +The SDK can be installed with either *pip* or *poetry* package managers. + +### PIP + +*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line. + ```bash pip install dub ``` -Poetry +### Poetry + +*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies. + ```bash poetry add dub ``` @@ -215,31 +245,31 @@ try: }) except errors.BadRequest as e: - # handle exception + # handle e.data: errors.BadRequestData raise(e) except errors.Unauthorized as e: - # handle exception + # handle e.data: errors.UnauthorizedData raise(e) except errors.Forbidden as e: - # handle exception + # handle e.data: errors.ForbiddenData raise(e) except errors.NotFound as e: - # handle exception + # handle e.data: errors.NotFoundData raise(e) except errors.Conflict as e: - # handle exception + # handle e.data: errors.ConflictData raise(e) except errors.InviteExpired as e: - # handle exception + # handle e.data: errors.InviteExpiredData raise(e) except errors.UnprocessableEntity as e: - # handle exception + # handle e.data: errors.UnprocessableEntityData raise(e) except errors.RateLimitExceeded as e: - # handle exception + # handle e.data: errors.RateLimitExceededData raise(e) except errors.InternalServerError as e: - # handle exception + # handle e.data: errors.InternalServerErrorData raise(e) except errors.SDKError as e: # handle exception diff --git a/RELEASES.md b/RELEASES.md index 1c6d3f8..1dfd82c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -286,4 +286,14 @@ Based on: ### Generated - [python v0.7.2] . ### Releases -- [PyPI v0.7.2] https://pypi.org/project/dub/0.7.2 - . \ No newline at end of file +- [PyPI v0.7.2] https://pypi.org/project/dub/0.7.2 - . + +## 2024-08-30 21:02:52 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.385.0 (2.407.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.7.3] . +### Releases +- [PyPI v0.7.3] https://pypi.org/project/dub/0.7.3 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 0ec0456..a742bc7 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"]["/track/lead"]["post"] + - target: $["paths"]["/links"]["get"] update: x-codeSamples: - lang: python - label: trackLead + label: getLinks source: |- from dub import Dub @@ -16,20 +16,23 @@ actions: ) - res = s.track.lead(request={ - "click_id": "", - "event_name": "Sign up", - "customer_id": "", + res = s.links.list(request={ + "page": 1, + "page_size": 50, }) if res is not None: - # handle response - pass - - target: $["paths"]["/links/upsert"]["put"] + while True: + # handle items + + res = res.Next() + if res is None: + break + - target: $["paths"]["/links/bulk"]["post"] update: x-codeSamples: - lang: python - label: upsertLink + label: bulkCreateLinks source: |- from dub import Dub @@ -38,22 +41,24 @@ actions: ) - res = s.links.upsert(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}"]["delete"] + - target: $["paths"]["/links/bulk"]["patch"] update: x-codeSamples: - lang: python - label: deleteLink + label: bulkUpdateLinks source: |- from dub import Dub @@ -62,16 +67,24 @@ actions: ) - res = s.links.delete(link_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"]["/links/{linkId}"]["patch"] + - target: $["paths"]["/qr"]["get"] update: x-codeSamples: - lang: python - label: updateLink + label: getQRCode source: |- from dub import Dub @@ -80,22 +93,18 @@ actions: ) - res = s.links.update(link_id="", request_body={ - "url": "https://google.com", - "external_id": "123456", - "tag_ids": [ - "clux0rgak00011...", - ], + res = s.qr_codes.get(request={ + "url": "https://brief-micronutrient.org", }) if res is not None: # handle response pass - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: x-codeSamples: - lang: python - label: bulkCreateLinks + label: getWorkspace source: |- from dub import Dub @@ -104,24 +113,18 @@ actions: ) - res = s.links.create_many(request=[ - { - "url": "https://google.com", - "external_id": "123456", - "tag_ids": [ - "clux0rgak00011...", - ], - }, - ]) + res = s.workspaces.get(request={ + "id_or_slug": "", + }) if res is not None: # handle response pass - - target: $["paths"]["/links/bulk"]["patch"] + - target: $["paths"]["/track/lead"]["post"] update: x-codeSamples: - lang: python - label: bulkUpdateLinks + label: trackLead source: |- from dub import Dub @@ -130,44 +133,44 @@ actions: ) - res = s.links.update_many(request={ - "link_ids": [ - "", - ], - "data": { - "url": "https://google.com", - "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"]["/workspaces/{idOrSlug}"]["get"] + - target: $["paths"]["/track/sale"]["post"] update: x-codeSamples: - lang: python - label: getWorkspace + label: trackSale source: |- from dub import Dub + from dub.models import operations s = Dub( token="DUB_API_KEY", ) - res = s.workspaces.get(request={ - "id_or_slug": "", + 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"]["/workspaces/{idOrSlug}"]["patch"] + - target: $["paths"]["/links"]["post"] update: x-codeSamples: - lang: python - label: updateWorkspace + label: createLink source: |- from dub import Dub @@ -176,16 +179,20 @@ actions: ) - res = s.workspaces.update(id_or_slug="") + 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"]["/qr"]["get"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: x-codeSamples: - lang: python - label: getQRCode + label: updateLink source: |- from dub import Dub @@ -194,18 +201,22 @@ actions: ) - res = s.qr_codes.get(request={ - "url": "https://brief-micronutrient.org", + 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"]["/tags"]["get"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] update: x-codeSamples: - lang: python - label: getTags + label: updateWorkspace source: |- from dub import Dub @@ -214,16 +225,16 @@ actions: ) - res = s.tags.list() + res = s.workspaces.update(id_or_slug="") if res is not None: # handle response pass - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/tags"]["get"] update: x-codeSamples: - lang: python - label: createTag + label: getTags source: |- from dub import Dub @@ -232,16 +243,16 @@ actions: ) - res = s.tags.create() + res = s.tags.list() if res is not None: # handle response pass - - target: $["paths"]["/domains"]["get"] + - target: $["paths"]["/domains"]["post"] update: x-codeSamples: - lang: python - label: listDomains + label: createDomain source: |- from dub import Dub @@ -250,47 +261,44 @@ actions: ) - res = s.domains.list(request={ - "page": 1, - "page_size": 50, + 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: - while True: - # handle items - - res = res.Next() - if res is None: - break - - target: $["paths"]["/track/sale"]["post"] + # handle response + pass + - target: $["paths"]["/domains/{slug}"]["patch"] update: x-codeSamples: - lang: python - label: trackSale + label: updateDomain 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.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"]["/links"]["post"] + - target: $["paths"]["/links/info"]["get"] update: x-codeSamples: - lang: python - label: createLink + label: getLinkInfo source: |- from dub import Dub @@ -299,20 +307,19 @@ actions: ) - res = s.links.create(request={ - "url": "https://google.com", - "external_id": "123456", - "tag_ids": "[\"clux0rgak00011...\"]", + res = s.links.get(request={ + "link_id": "clux0rgak00011...", + "external_id": "ext_123456", }) if res is not None: # handle response pass - - target: $["paths"]["/links"]["get"] + - target: $["paths"]["/tags/{id}"]["patch"] update: x-codeSamples: - lang: python - label: getLinks + label: updateTag source: |- from dub import Dub @@ -321,23 +328,16 @@ actions: ) - res = s.links.list(request={ - "page": 1, - "page_size": 50, - }) + res = s.tags.update(id="") if res is not None: - while True: - # handle items - - res = res.Next() - if res is None: - break - - target: $["paths"]["/links/count"]["get"] + # handle response + pass + - target: $["paths"]["/track/customer"]["post"] update: x-codeSamples: - lang: python - label: getLinksCount + label: trackCustomer source: |- from dub import Dub @@ -346,16 +346,16 @@ actions: ) - res = s.links.count() + res = s.track.customer() if res is not None: # handle response pass - - target: $["paths"]["/links/info"]["get"] + - target: $["paths"]["/domains/{slug}"]["delete"] update: x-codeSamples: - lang: python - label: getLinkInfo + label: deleteDomain source: |- from dub import Dub @@ -364,19 +364,16 @@ actions: ) - res = s.links.get(request={ - "link_id": "clux0rgak00011...", - "external_id": "ext_123456", - }) + res = s.domains.delete(slug="acme.com") if res is not None: # handle response pass - - target: $["paths"]["/analytics"]["get"] + - target: $["paths"]["/links/upsert"]["put"] update: x-codeSamples: - lang: python - label: retrieveAnalytics + label: upsertLink source: |- from dub import Dub @@ -385,23 +382,22 @@ actions: ) - res = s.analytics.retrieve(request={ - "timezone": "America/New_York", - "city": "New York", - "device": "Desktop", - "browser": "Chrome", - "os": "Windows", - "referer": "google.com", + res = s.links.upsert(request={ + "url": "https://google.com", + "external_id": "123456", + "tag_ids": [ + "clux0rgak00011...", + ], }) if res is not None: # handle response pass - - target: $["paths"]["/events"]["get"] + - target: $["paths"]["/links/count"]["get"] update: x-codeSamples: - lang: python - label: listEvents + label: getLinksCount source: |- from dub import Dub @@ -410,23 +406,16 @@ actions: ) - res = s.events.list(request={ - "timezone": "America/New_York", - "city": "New York", - "device": "Desktop", - "browser": "Chrome", - "os": "Windows", - "referer": "google.com", - }) + res = s.links.count() if res is not None: # handle response pass - - target: $["paths"]["/domains/{slug}"]["delete"] + - target: $["paths"]["/links/{linkId}"]["delete"] update: x-codeSamples: - lang: python - label: deleteDomain + label: deleteLink source: |- from dub import Dub @@ -435,16 +424,16 @@ actions: ) - res = s.domains.delete(slug="acme.com") + res = s.links.delete(link_id="") if res is not None: # handle response pass - - target: $["paths"]["/tags/{id}"]["patch"] + - target: $["paths"]["/analytics"]["get"] update: x-codeSamples: - lang: python - label: updateTag + label: retrieveAnalytics source: |- from dub import Dub @@ -453,16 +442,23 @@ actions: ) - res = s.tags.update(id="") + 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"]["/domains"]["post"] + - target: $["paths"]["/events"]["get"] update: x-codeSamples: - lang: python - label: createDomain + label: listEvents source: |- from dub import Dub @@ -471,21 +467,23 @@ 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.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"]["/domains/{slug}"]["patch"] + - target: $["paths"]["/tags"]["post"] update: x-codeSamples: - lang: python - label: updateDomain + label: createTag source: |- from dub import Dub @@ -494,21 +492,16 @@ 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.tags.create() if res is not None: # handle response pass - - target: $["paths"]["/track/customer"]["post"] + - target: $["paths"]["/domains"]["get"] update: x-codeSamples: - lang: python - label: trackCustomer + label: listDomains source: |- from dub import Dub @@ -517,11 +510,18 @@ actions: ) - res = s.track.customer() + res = s.domains.list(request={ + "page": 1, + "page_size": 50, + }) if res is not None: - # handle response - pass + while True: + # handle items + + res = res.Next() + if res is None: + break - target: $["paths"]["/metatags"]["get"] update: x-codeSamples: diff --git a/docs/models/components/salesbrowsers.md b/docs/models/components/analyticsbrowsers.md similarity index 51% rename from docs/models/components/salesbrowsers.md rename to docs/models/components/analyticsbrowsers.md index f3ff974..40d31b4 100644 --- a/docs/models/components/salesbrowsers.md +++ b/docs/models/components/analyticsbrowsers.md @@ -1,4 +1,4 @@ -# SalesBrowsers +# AnalyticsBrowsers ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | `browser` | *str* | :heavy_check_mark: | The name of the browser | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this browser | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this browser | \ No newline at end of file +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this browser | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this browser | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this browser | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this browser | \ No newline at end of file diff --git a/docs/models/components/analyticscities.md b/docs/models/components/analyticscities.md new file mode 100644 index 0000000..ab42c97 --- /dev/null +++ b/docs/models/components/analyticscities.md @@ -0,0 +1,13 @@ +# AnalyticsCities + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `city` | *str* | :heavy_check_mark: | The name of the city | +| `country` | [components.AnalyticsCitiesCountry](../../models/components/analyticscitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this city | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this city | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this city | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this city | \ No newline at end of file diff --git a/docs/models/components/salescitiescountry.md b/docs/models/components/analyticscitiescountry.md similarity index 99% rename from docs/models/components/salescitiescountry.md rename to docs/models/components/analyticscitiescountry.md index 9392903..c65752c 100644 --- a/docs/models/components/salescitiescountry.md +++ b/docs/models/components/analyticscitiescountry.md @@ -1,4 +1,4 @@ -# SalesCitiesCountry +# AnalyticsCitiesCountry The 2-letter country code of the city: https://d.to/geo diff --git a/docs/models/components/analyticscount.md b/docs/models/components/analyticscount.md new file mode 100644 index 0000000..b4545de --- /dev/null +++ b/docs/models/components/analyticscount.md @@ -0,0 +1,11 @@ +# AnalyticsCount + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The total number of clicks | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The total number of leads | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The total number of sales | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales | \ No newline at end of file diff --git a/docs/models/components/salescountries.md b/docs/models/components/analyticscountries.md similarity index 51% rename from docs/models/components/salescountries.md rename to docs/models/components/analyticscountries.md index 80b111a..053347b 100644 --- a/docs/models/components/salescountries.md +++ b/docs/models/components/analyticscountries.md @@ -1,10 +1,13 @@ -# SalesCountries +# AnalyticsCountries ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [components.SalesCountriesCountry](../../models/components/salescountriescountry.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this country | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this country | \ No newline at end of file +| `country` | [components.Country](../../models/components/country.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | +| `city` | [Optional[components.City]](../../models/components/city.md) | :heavy_minus_sign: | N/A | +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this country | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this country | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this country | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this country | \ No newline at end of file diff --git a/docs/models/components/salesdevices.md b/docs/models/components/analyticsdevices.md similarity index 51% rename from docs/models/components/salesdevices.md rename to docs/models/components/analyticsdevices.md index accb0d6..34cefe5 100644 --- a/docs/models/components/salesdevices.md +++ b/docs/models/components/analyticsdevices.md @@ -1,4 +1,4 @@ -# SalesDevices +# AnalyticsDevices ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | `device` | *str* | :heavy_check_mark: | The name of the device | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this device | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this device | \ No newline at end of file +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this device | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this device | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this device | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this device | \ No newline at end of file diff --git a/docs/models/components/analyticsos.md b/docs/models/components/analyticsos.md new file mode 100644 index 0000000..5ebba01 --- /dev/null +++ b/docs/models/components/analyticsos.md @@ -0,0 +1,12 @@ +# AnalyticsOS + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `os` | *str* | :heavy_check_mark: | The name of the OS | +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this OS | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this OS | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this OS | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this OS | \ No newline at end of file diff --git a/docs/models/components/salesreferers.md b/docs/models/components/analyticsreferers.md similarity index 53% rename from docs/models/components/salesreferers.md rename to docs/models/components/analyticsreferers.md index 565a5dc..144784b 100644 --- a/docs/models/components/salesreferers.md +++ b/docs/models/components/analyticsreferers.md @@ -1,4 +1,4 @@ -# SalesReferers +# AnalyticsReferers ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `referer` | *str* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this referer | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this referer | \ No newline at end of file +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this referer | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this referer | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this referer | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this referer | \ No newline at end of file diff --git a/docs/models/components/salestimeseries.md b/docs/models/components/analyticstimeseries.md similarity index 50% rename from docs/models/components/salestimeseries.md rename to docs/models/components/analyticstimeseries.md index ae19fe0..7b60d9c 100644 --- a/docs/models/components/salestimeseries.md +++ b/docs/models/components/analyticstimeseries.md @@ -1,4 +1,4 @@ -# SalesTimeseries +# AnalyticsTimeseries ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | `start` | *str* | :heavy_check_mark: | The starting timestamp of the interval | -| `sales` | *float* | :heavy_check_mark: | The number of sales in the interval | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales in the interval | \ No newline at end of file +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks in the interval | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads in the interval | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales in the interval | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales in the interval | \ No newline at end of file diff --git a/docs/models/components/salestoplinks.md b/docs/models/components/analyticstoplinks.md similarity index 78% rename from docs/models/components/salestoplinks.md rename to docs/models/components/analyticstoplinks.md index 6e211dd..a8e8a4b 100644 --- a/docs/models/components/salestoplinks.md +++ b/docs/models/components/analyticstoplinks.md @@ -1,4 +1,4 @@ -# SalesTopLinks +# AnalyticsTopLinks ## Fields @@ -12,5 +12,7 @@ | `short_link` | *str* | :heavy_check_mark: | The short link URL | | `url` | *str* | :heavy_check_mark: | The destination URL of the short link | | `created_at` | *str* | :heavy_check_mark: | The creation timestamp of the short link | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this link | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this link | \ No newline at end of file +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this link | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this link | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this link | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this link | \ No newline at end of file diff --git a/docs/models/components/analyticstopurls.md b/docs/models/components/analyticstopurls.md new file mode 100644 index 0000000..71127ec --- /dev/null +++ b/docs/models/components/analyticstopurls.md @@ -0,0 +1,12 @@ +# AnalyticsTopUrls + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `url` | *str* | :heavy_check_mark: | The destination URL | +| `clicks` | *Optional[float]* | :heavy_minus_sign: | The number of clicks from this URL | +| `leads` | *Optional[float]* | :heavy_minus_sign: | The number of leads from this URL | +| `sales` | *Optional[float]* | :heavy_minus_sign: | The number of sales from this URL | +| `sale_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of sales from this URL | \ No newline at end of file diff --git a/docs/models/components/city.md b/docs/models/components/city.md new file mode 100644 index 0000000..b053324 --- /dev/null +++ b/docs/models/components/city.md @@ -0,0 +1,8 @@ +# City + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `WILDCARD_` | * | \ No newline at end of file diff --git a/docs/models/components/clickevent.md b/docs/models/components/clickevent.md new file mode 100644 index 0000000..4ce6bbb --- /dev/null +++ b/docs/models/components/clickevent.md @@ -0,0 +1,23 @@ +# ClickEvent + + +## 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 diff --git a/docs/models/components/clickevents.md b/docs/models/components/clickevents.md deleted file mode 100644 index 4c04714..0000000 --- a/docs/models/components/clickevents.md +++ /dev/null @@ -1,22 +0,0 @@ -# ClickEvents - - -## 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 | \ No newline at end of file diff --git a/docs/models/components/clicksbrowsers.md b/docs/models/components/clicksbrowsers.md deleted file mode 100644 index 547f285..0000000 --- a/docs/models/components/clicksbrowsers.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksBrowsers - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `browser` | *str* | :heavy_check_mark: | The name of the browser | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this browser | \ No newline at end of file diff --git a/docs/models/components/clickscities.md b/docs/models/components/clickscities.md deleted file mode 100644 index 5a49f3f..0000000 --- a/docs/models/components/clickscities.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClicksCities - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `city` | *str* | :heavy_check_mark: | The name of the city | -| `country` | [components.ClicksCitiesCountry](../../models/components/clickscitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this city | \ No newline at end of file diff --git a/docs/models/components/clickscitiescountry.md b/docs/models/components/clickscitiescountry.md deleted file mode 100644 index 8774078..0000000 --- a/docs/models/components/clickscitiescountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# ClicksCitiesCountry - -The 2-letter country code of the city: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `AF` | AF | -| `AL` | AL | -| `DZ` | DZ | -| `AS` | AS | -| `AD` | AD | -| `AO` | AO | -| `AI` | AI | -| `AQ` | AQ | -| `AG` | AG | -| `AR` | AR | -| `AM` | AM | -| `AW` | AW | -| `AU` | AU | -| `AT` | AT | -| `AZ` | AZ | -| `BS` | BS | -| `BH` | BH | -| `BD` | BD | -| `BB` | BB | -| `BY` | BY | -| `BE` | BE | -| `BZ` | BZ | -| `BJ` | BJ | -| `BM` | BM | -| `BT` | BT | -| `BO` | BO | -| `BA` | BA | -| `BW` | BW | -| `BV` | BV | -| `BR` | BR | -| `IO` | IO | -| `BN` | BN | -| `BG` | BG | -| `BF` | BF | -| `BI` | BI | -| `KH` | KH | -| `CM` | CM | -| `CA` | CA | -| `CV` | CV | -| `KY` | KY | -| `CF` | CF | -| `TD` | TD | -| `CL` | CL | -| `CN` | CN | -| `CX` | CX | -| `CC` | CC | -| `CO` | CO | -| `KM` | KM | -| `CG` | CG | -| `CD` | CD | -| `CK` | CK | -| `CR` | CR | -| `CI` | CI | -| `HR` | HR | -| `CU` | CU | -| `CY` | CY | -| `CZ` | CZ | -| `DK` | DK | -| `DJ` | DJ | -| `DM` | DM | -| `DO` | DO | -| `EC` | EC | -| `EG` | EG | -| `SV` | SV | -| `GQ` | GQ | -| `ER` | ER | -| `EE` | EE | -| `ET` | ET | -| `FK` | FK | -| `FO` | FO | -| `FJ` | FJ | -| `FI` | FI | -| `FR` | FR | -| `GF` | GF | -| `PF` | PF | -| `TF` | TF | -| `GA` | GA | -| `GM` | GM | -| `GE` | GE | -| `DE` | DE | -| `GH` | GH | -| `GI` | GI | -| `GR` | GR | -| `GL` | GL | -| `GD` | GD | -| `GP` | GP | -| `GU` | GU | -| `GT` | GT | -| `GN` | GN | -| `GW` | GW | -| `GY` | GY | -| `HT` | HT | -| `HM` | HM | -| `VA` | VA | -| `HN` | HN | -| `HK` | HK | -| `HU` | HU | -| `IS` | IS | -| `IN` | IN | -| `ID` | ID | -| `IR` | IR | -| `IQ` | IQ | -| `IE` | IE | -| `IL` | IL | -| `IT` | IT | -| `JM` | JM | -| `JP` | JP | -| `JO` | JO | -| `KZ` | KZ | -| `KE` | KE | -| `KI` | KI | -| `KP` | KP | -| `KR` | KR | -| `KW` | KW | -| `KG` | KG | -| `LA` | LA | -| `LV` | LV | -| `LB` | LB | -| `LS` | LS | -| `LR` | LR | -| `LY` | LY | -| `LI` | LI | -| `LT` | LT | -| `LU` | LU | -| `MO` | MO | -| `MG` | MG | -| `MW` | MW | -| `MY` | MY | -| `MV` | MV | -| `ML` | ML | -| `MT` | MT | -| `MH` | MH | -| `MQ` | MQ | -| `MR` | MR | -| `MU` | MU | -| `YT` | YT | -| `MX` | MX | -| `FM` | FM | -| `MD` | MD | -| `MC` | MC | -| `MN` | MN | -| `MS` | MS | -| `MA` | MA | -| `MZ` | MZ | -| `MM` | MM | -| `NA` | NA | -| `NR` | NR | -| `NP` | NP | -| `NL` | NL | -| `NC` | NC | -| `NZ` | NZ | -| `NI` | NI | -| `NE` | NE | -| `NG` | NG | -| `NU` | NU | -| `NF` | NF | -| `MK` | MK | -| `MP` | MP | -| `NO` | NO | -| `OM` | OM | -| `PK` | PK | -| `PW` | PW | -| `PS` | PS | -| `PA` | PA | -| `PG` | PG | -| `PY` | PY | -| `PE` | PE | -| `PH` | PH | -| `PN` | PN | -| `PL` | PL | -| `PT` | PT | -| `PR` | PR | -| `QA` | QA | -| `RE` | RE | -| `RO` | RO | -| `RU` | RU | -| `RW` | RW | -| `SH` | SH | -| `KN` | KN | -| `LC` | LC | -| `PM` | PM | -| `VC` | VC | -| `WS` | WS | -| `SM` | SM | -| `ST` | ST | -| `SA` | SA | -| `SN` | SN | -| `SC` | SC | -| `SL` | SL | -| `SG` | SG | -| `SK` | SK | -| `SI` | SI | -| `SB` | SB | -| `SO` | SO | -| `ZA` | ZA | -| `GS` | GS | -| `ES` | ES | -| `LK` | LK | -| `SD` | SD | -| `SR` | SR | -| `SJ` | SJ | -| `SZ` | SZ | -| `SE` | SE | -| `CH` | CH | -| `SY` | SY | -| `TW` | TW | -| `TJ` | TJ | -| `TZ` | TZ | -| `TH` | TH | -| `TL` | TL | -| `TG` | TG | -| `TK` | TK | -| `TO` | TO | -| `TT` | TT | -| `TN` | TN | -| `TR` | TR | -| `TM` | TM | -| `TC` | TC | -| `TV` | TV | -| `UG` | UG | -| `UA` | UA | -| `AE` | AE | -| `GB` | GB | -| `US` | US | -| `UM` | UM | -| `UY` | UY | -| `UZ` | UZ | -| `VU` | VU | -| `VE` | VE | -| `VN` | VN | -| `VG` | VG | -| `VI` | VI | -| `WF` | WF | -| `EH` | EH | -| `YE` | YE | -| `ZM` | ZM | -| `ZW` | ZW | -| `AX` | AX | -| `BQ` | BQ | -| `CW` | CW | -| `GG` | GG | -| `IM` | IM | -| `JE` | JE | -| `ME` | ME | -| `BL` | BL | -| `MF` | MF | -| `RS` | RS | -| `SX` | SX | -| `SS` | SS | -| `XK` | XK | \ No newline at end of file diff --git a/docs/models/components/clickscount.md b/docs/models/components/clickscount.md deleted file mode 100644 index cd59d59..0000000 --- a/docs/models/components/clickscount.md +++ /dev/null @@ -1,8 +0,0 @@ -# ClicksCount - - -## Fields - -| Field | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `clicks` | *float* | :heavy_check_mark: | The total number of clicks | \ No newline at end of file diff --git a/docs/models/components/clickscountries.md b/docs/models/components/clickscountries.md deleted file mode 100644 index 5daa29b..0000000 --- a/docs/models/components/clickscountries.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksCountries - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [components.Country](../../models/components/country.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this country | \ No newline at end of file diff --git a/docs/models/components/clicksdevices.md b/docs/models/components/clicksdevices.md deleted file mode 100644 index 5144e33..0000000 --- a/docs/models/components/clicksdevices.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksDevices - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `device` | *str* | :heavy_check_mark: | The name of the device | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this device | \ No newline at end of file diff --git a/docs/models/components/clicksos.md b/docs/models/components/clicksos.md deleted file mode 100644 index 7c82ef9..0000000 --- a/docs/models/components/clicksos.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksOS - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `os` | *str* | :heavy_check_mark: | The name of the OS | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this OS | \ No newline at end of file diff --git a/docs/models/components/clicksreferers.md b/docs/models/components/clicksreferers.md deleted file mode 100644 index deee116..0000000 --- a/docs/models/components/clicksreferers.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksReferers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `referer` | *str* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this referer | \ No newline at end of file diff --git a/docs/models/components/clickstimeseries.md b/docs/models/components/clickstimeseries.md deleted file mode 100644 index 55164da..0000000 --- a/docs/models/components/clickstimeseries.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksTimeseries - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `start` | *str* | :heavy_check_mark: | The starting timestamp of the interval | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks in the interval | \ No newline at end of file diff --git a/docs/models/components/clickstoplinks.md b/docs/models/components/clickstoplinks.md deleted file mode 100644 index c3979e7..0000000 --- a/docs/models/components/clickstoplinks.md +++ /dev/null @@ -1,15 +0,0 @@ -# ClicksTopLinks - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`link`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the short link | -| `id` | *str* | :heavy_check_mark: | The unique ID of the short link | -| `domain` | *str* | :heavy_check_mark: | The domain of the short link | -| `key` | *str* | :heavy_check_mark: | The key of the short link | -| `short_link` | *str* | :heavy_check_mark: | The short link URL | -| `url` | *str* | :heavy_check_mark: | The destination URL of the short link | -| `created_at` | *str* | :heavy_check_mark: | The creation timestamp of the short link | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this link | \ No newline at end of file diff --git a/docs/models/components/clickstopurls.md b/docs/models/components/clickstopurls.md deleted file mode 100644 index 2f35e88..0000000 --- a/docs/models/components/clickstopurls.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksTopUrls - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `url` | *str* | :heavy_check_mark: | The destination URL | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this URL | \ No newline at end of file diff --git a/docs/models/components/event.md b/docs/models/components/event.md new file mode 100644 index 0000000..4e8ec42 --- /dev/null +++ b/docs/models/components/event.md @@ -0,0 +1,8 @@ +# Event + + +## Values + +| Name | Value | +| ------- | ------- | +| `CLICK` | click | \ No newline at end of file diff --git a/docs/models/components/leadevent.md b/docs/models/components/leadevent.md new file mode 100644 index 0000000..895ae12 --- /dev/null +++ b/docs/models/components/leadevent.md @@ -0,0 +1,28 @@ +# LeadEvent + + +## 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 diff --git a/docs/models/components/leadeventevent.md b/docs/models/components/leadeventevent.md new file mode 100644 index 0000000..9f799e8 --- /dev/null +++ b/docs/models/components/leadeventevent.md @@ -0,0 +1,8 @@ +# LeadEventEvent + + +## Values + +| Name | Value | +| ------ | ------ | +| `LEAD` | lead | \ No newline at end of file diff --git a/docs/models/components/leadsbrowsers.md b/docs/models/components/leadsbrowsers.md deleted file mode 100644 index bd03109..0000000 --- a/docs/models/components/leadsbrowsers.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsBrowsers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `browser` | *str* | :heavy_check_mark: | The name of the browser | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this browser | \ No newline at end of file diff --git a/docs/models/components/leadscities.md b/docs/models/components/leadscities.md deleted file mode 100644 index a477d0d..0000000 --- a/docs/models/components/leadscities.md +++ /dev/null @@ -1,10 +0,0 @@ -# LeadsCities - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `city` | *str* | :heavy_check_mark: | The name of the city | -| `country` | [components.LeadsCitiesCountry](../../models/components/leadscitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this city | \ No newline at end of file diff --git a/docs/models/components/leadscitiescountry.md b/docs/models/components/leadscitiescountry.md deleted file mode 100644 index f297440..0000000 --- a/docs/models/components/leadscitiescountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# LeadsCitiesCountry - -The 2-letter country code of the city: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `AF` | AF | -| `AL` | AL | -| `DZ` | DZ | -| `AS` | AS | -| `AD` | AD | -| `AO` | AO | -| `AI` | AI | -| `AQ` | AQ | -| `AG` | AG | -| `AR` | AR | -| `AM` | AM | -| `AW` | AW | -| `AU` | AU | -| `AT` | AT | -| `AZ` | AZ | -| `BS` | BS | -| `BH` | BH | -| `BD` | BD | -| `BB` | BB | -| `BY` | BY | -| `BE` | BE | -| `BZ` | BZ | -| `BJ` | BJ | -| `BM` | BM | -| `BT` | BT | -| `BO` | BO | -| `BA` | BA | -| `BW` | BW | -| `BV` | BV | -| `BR` | BR | -| `IO` | IO | -| `BN` | BN | -| `BG` | BG | -| `BF` | BF | -| `BI` | BI | -| `KH` | KH | -| `CM` | CM | -| `CA` | CA | -| `CV` | CV | -| `KY` | KY | -| `CF` | CF | -| `TD` | TD | -| `CL` | CL | -| `CN` | CN | -| `CX` | CX | -| `CC` | CC | -| `CO` | CO | -| `KM` | KM | -| `CG` | CG | -| `CD` | CD | -| `CK` | CK | -| `CR` | CR | -| `CI` | CI | -| `HR` | HR | -| `CU` | CU | -| `CY` | CY | -| `CZ` | CZ | -| `DK` | DK | -| `DJ` | DJ | -| `DM` | DM | -| `DO` | DO | -| `EC` | EC | -| `EG` | EG | -| `SV` | SV | -| `GQ` | GQ | -| `ER` | ER | -| `EE` | EE | -| `ET` | ET | -| `FK` | FK | -| `FO` | FO | -| `FJ` | FJ | -| `FI` | FI | -| `FR` | FR | -| `GF` | GF | -| `PF` | PF | -| `TF` | TF | -| `GA` | GA | -| `GM` | GM | -| `GE` | GE | -| `DE` | DE | -| `GH` | GH | -| `GI` | GI | -| `GR` | GR | -| `GL` | GL | -| `GD` | GD | -| `GP` | GP | -| `GU` | GU | -| `GT` | GT | -| `GN` | GN | -| `GW` | GW | -| `GY` | GY | -| `HT` | HT | -| `HM` | HM | -| `VA` | VA | -| `HN` | HN | -| `HK` | HK | -| `HU` | HU | -| `IS` | IS | -| `IN` | IN | -| `ID` | ID | -| `IR` | IR | -| `IQ` | IQ | -| `IE` | IE | -| `IL` | IL | -| `IT` | IT | -| `JM` | JM | -| `JP` | JP | -| `JO` | JO | -| `KZ` | KZ | -| `KE` | KE | -| `KI` | KI | -| `KP` | KP | -| `KR` | KR | -| `KW` | KW | -| `KG` | KG | -| `LA` | LA | -| `LV` | LV | -| `LB` | LB | -| `LS` | LS | -| `LR` | LR | -| `LY` | LY | -| `LI` | LI | -| `LT` | LT | -| `LU` | LU | -| `MO` | MO | -| `MG` | MG | -| `MW` | MW | -| `MY` | MY | -| `MV` | MV | -| `ML` | ML | -| `MT` | MT | -| `MH` | MH | -| `MQ` | MQ | -| `MR` | MR | -| `MU` | MU | -| `YT` | YT | -| `MX` | MX | -| `FM` | FM | -| `MD` | MD | -| `MC` | MC | -| `MN` | MN | -| `MS` | MS | -| `MA` | MA | -| `MZ` | MZ | -| `MM` | MM | -| `NA` | NA | -| `NR` | NR | -| `NP` | NP | -| `NL` | NL | -| `NC` | NC | -| `NZ` | NZ | -| `NI` | NI | -| `NE` | NE | -| `NG` | NG | -| `NU` | NU | -| `NF` | NF | -| `MK` | MK | -| `MP` | MP | -| `NO` | NO | -| `OM` | OM | -| `PK` | PK | -| `PW` | PW | -| `PS` | PS | -| `PA` | PA | -| `PG` | PG | -| `PY` | PY | -| `PE` | PE | -| `PH` | PH | -| `PN` | PN | -| `PL` | PL | -| `PT` | PT | -| `PR` | PR | -| `QA` | QA | -| `RE` | RE | -| `RO` | RO | -| `RU` | RU | -| `RW` | RW | -| `SH` | SH | -| `KN` | KN | -| `LC` | LC | -| `PM` | PM | -| `VC` | VC | -| `WS` | WS | -| `SM` | SM | -| `ST` | ST | -| `SA` | SA | -| `SN` | SN | -| `SC` | SC | -| `SL` | SL | -| `SG` | SG | -| `SK` | SK | -| `SI` | SI | -| `SB` | SB | -| `SO` | SO | -| `ZA` | ZA | -| `GS` | GS | -| `ES` | ES | -| `LK` | LK | -| `SD` | SD | -| `SR` | SR | -| `SJ` | SJ | -| `SZ` | SZ | -| `SE` | SE | -| `CH` | CH | -| `SY` | SY | -| `TW` | TW | -| `TJ` | TJ | -| `TZ` | TZ | -| `TH` | TH | -| `TL` | TL | -| `TG` | TG | -| `TK` | TK | -| `TO` | TO | -| `TT` | TT | -| `TN` | TN | -| `TR` | TR | -| `TM` | TM | -| `TC` | TC | -| `TV` | TV | -| `UG` | UG | -| `UA` | UA | -| `AE` | AE | -| `GB` | GB | -| `US` | US | -| `UM` | UM | -| `UY` | UY | -| `UZ` | UZ | -| `VU` | VU | -| `VE` | VE | -| `VN` | VN | -| `VG` | VG | -| `VI` | VI | -| `WF` | WF | -| `EH` | EH | -| `YE` | YE | -| `ZM` | ZM | -| `ZW` | ZW | -| `AX` | AX | -| `BQ` | BQ | -| `CW` | CW | -| `GG` | GG | -| `IM` | IM | -| `JE` | JE | -| `ME` | ME | -| `BL` | BL | -| `MF` | MF | -| `RS` | RS | -| `SX` | SX | -| `SS` | SS | -| `XK` | XK | \ No newline at end of file diff --git a/docs/models/components/leadscount.md b/docs/models/components/leadscount.md deleted file mode 100644 index 1eb7ab4..0000000 --- a/docs/models/components/leadscount.md +++ /dev/null @@ -1,8 +0,0 @@ -# LeadsCount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `leads` | *float* | :heavy_check_mark: | The total number of leads | \ No newline at end of file diff --git a/docs/models/components/leadscountries.md b/docs/models/components/leadscountries.md deleted file mode 100644 index 7f85dba..0000000 --- a/docs/models/components/leadscountries.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsCountries - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [components.LeadsCountriesCountry](../../models/components/leadscountriescountry.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this country | \ No newline at end of file diff --git a/docs/models/components/leadscountriescountry.md b/docs/models/components/leadscountriescountry.md deleted file mode 100644 index 1acc90d..0000000 --- a/docs/models/components/leadscountriescountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# LeadsCountriesCountry - -The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `AF` | AF | -| `AL` | AL | -| `DZ` | DZ | -| `AS` | AS | -| `AD` | AD | -| `AO` | AO | -| `AI` | AI | -| `AQ` | AQ | -| `AG` | AG | -| `AR` | AR | -| `AM` | AM | -| `AW` | AW | -| `AU` | AU | -| `AT` | AT | -| `AZ` | AZ | -| `BS` | BS | -| `BH` | BH | -| `BD` | BD | -| `BB` | BB | -| `BY` | BY | -| `BE` | BE | -| `BZ` | BZ | -| `BJ` | BJ | -| `BM` | BM | -| `BT` | BT | -| `BO` | BO | -| `BA` | BA | -| `BW` | BW | -| `BV` | BV | -| `BR` | BR | -| `IO` | IO | -| `BN` | BN | -| `BG` | BG | -| `BF` | BF | -| `BI` | BI | -| `KH` | KH | -| `CM` | CM | -| `CA` | CA | -| `CV` | CV | -| `KY` | KY | -| `CF` | CF | -| `TD` | TD | -| `CL` | CL | -| `CN` | CN | -| `CX` | CX | -| `CC` | CC | -| `CO` | CO | -| `KM` | KM | -| `CG` | CG | -| `CD` | CD | -| `CK` | CK | -| `CR` | CR | -| `CI` | CI | -| `HR` | HR | -| `CU` | CU | -| `CY` | CY | -| `CZ` | CZ | -| `DK` | DK | -| `DJ` | DJ | -| `DM` | DM | -| `DO` | DO | -| `EC` | EC | -| `EG` | EG | -| `SV` | SV | -| `GQ` | GQ | -| `ER` | ER | -| `EE` | EE | -| `ET` | ET | -| `FK` | FK | -| `FO` | FO | -| `FJ` | FJ | -| `FI` | FI | -| `FR` | FR | -| `GF` | GF | -| `PF` | PF | -| `TF` | TF | -| `GA` | GA | -| `GM` | GM | -| `GE` | GE | -| `DE` | DE | -| `GH` | GH | -| `GI` | GI | -| `GR` | GR | -| `GL` | GL | -| `GD` | GD | -| `GP` | GP | -| `GU` | GU | -| `GT` | GT | -| `GN` | GN | -| `GW` | GW | -| `GY` | GY | -| `HT` | HT | -| `HM` | HM | -| `VA` | VA | -| `HN` | HN | -| `HK` | HK | -| `HU` | HU | -| `IS` | IS | -| `IN` | IN | -| `ID` | ID | -| `IR` | IR | -| `IQ` | IQ | -| `IE` | IE | -| `IL` | IL | -| `IT` | IT | -| `JM` | JM | -| `JP` | JP | -| `JO` | JO | -| `KZ` | KZ | -| `KE` | KE | -| `KI` | KI | -| `KP` | KP | -| `KR` | KR | -| `KW` | KW | -| `KG` | KG | -| `LA` | LA | -| `LV` | LV | -| `LB` | LB | -| `LS` | LS | -| `LR` | LR | -| `LY` | LY | -| `LI` | LI | -| `LT` | LT | -| `LU` | LU | -| `MO` | MO | -| `MG` | MG | -| `MW` | MW | -| `MY` | MY | -| `MV` | MV | -| `ML` | ML | -| `MT` | MT | -| `MH` | MH | -| `MQ` | MQ | -| `MR` | MR | -| `MU` | MU | -| `YT` | YT | -| `MX` | MX | -| `FM` | FM | -| `MD` | MD | -| `MC` | MC | -| `MN` | MN | -| `MS` | MS | -| `MA` | MA | -| `MZ` | MZ | -| `MM` | MM | -| `NA` | NA | -| `NR` | NR | -| `NP` | NP | -| `NL` | NL | -| `NC` | NC | -| `NZ` | NZ | -| `NI` | NI | -| `NE` | NE | -| `NG` | NG | -| `NU` | NU | -| `NF` | NF | -| `MK` | MK | -| `MP` | MP | -| `NO` | NO | -| `OM` | OM | -| `PK` | PK | -| `PW` | PW | -| `PS` | PS | -| `PA` | PA | -| `PG` | PG | -| `PY` | PY | -| `PE` | PE | -| `PH` | PH | -| `PN` | PN | -| `PL` | PL | -| `PT` | PT | -| `PR` | PR | -| `QA` | QA | -| `RE` | RE | -| `RO` | RO | -| `RU` | RU | -| `RW` | RW | -| `SH` | SH | -| `KN` | KN | -| `LC` | LC | -| `PM` | PM | -| `VC` | VC | -| `WS` | WS | -| `SM` | SM | -| `ST` | ST | -| `SA` | SA | -| `SN` | SN | -| `SC` | SC | -| `SL` | SL | -| `SG` | SG | -| `SK` | SK | -| `SI` | SI | -| `SB` | SB | -| `SO` | SO | -| `ZA` | ZA | -| `GS` | GS | -| `ES` | ES | -| `LK` | LK | -| `SD` | SD | -| `SR` | SR | -| `SJ` | SJ | -| `SZ` | SZ | -| `SE` | SE | -| `CH` | CH | -| `SY` | SY | -| `TW` | TW | -| `TJ` | TJ | -| `TZ` | TZ | -| `TH` | TH | -| `TL` | TL | -| `TG` | TG | -| `TK` | TK | -| `TO` | TO | -| `TT` | TT | -| `TN` | TN | -| `TR` | TR | -| `TM` | TM | -| `TC` | TC | -| `TV` | TV | -| `UG` | UG | -| `UA` | UA | -| `AE` | AE | -| `GB` | GB | -| `US` | US | -| `UM` | UM | -| `UY` | UY | -| `UZ` | UZ | -| `VU` | VU | -| `VE` | VE | -| `VN` | VN | -| `VG` | VG | -| `VI` | VI | -| `WF` | WF | -| `EH` | EH | -| `YE` | YE | -| `ZM` | ZM | -| `ZW` | ZW | -| `AX` | AX | -| `BQ` | BQ | -| `CW` | CW | -| `GG` | GG | -| `IM` | IM | -| `JE` | JE | -| `ME` | ME | -| `BL` | BL | -| `MF` | MF | -| `RS` | RS | -| `SX` | SX | -| `SS` | SS | -| `XK` | XK | \ No newline at end of file diff --git a/docs/models/components/leadsdevices.md b/docs/models/components/leadsdevices.md deleted file mode 100644 index 1836eca..0000000 --- a/docs/models/components/leadsdevices.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsDevices - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `device` | *str* | :heavy_check_mark: | The name of the device | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this device | \ No newline at end of file diff --git a/docs/models/components/leadsos.md b/docs/models/components/leadsos.md deleted file mode 100644 index 052a9b7..0000000 --- a/docs/models/components/leadsos.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsOS - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `os` | *str* | :heavy_check_mark: | The name of the OS | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this OS | \ No newline at end of file diff --git a/docs/models/components/leadsreferers.md b/docs/models/components/leadsreferers.md deleted file mode 100644 index 2381bf8..0000000 --- a/docs/models/components/leadsreferers.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsReferers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `referer` | *str* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this referer | \ No newline at end of file diff --git a/docs/models/components/leadstimeseries.md b/docs/models/components/leadstimeseries.md deleted file mode 100644 index 7d0ccec..0000000 --- a/docs/models/components/leadstimeseries.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsTimeseries - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `start` | *str* | :heavy_check_mark: | The starting timestamp of the interval | -| `leads` | *float* | :heavy_check_mark: | The number of leads in the interval | \ No newline at end of file diff --git a/docs/models/components/leadstoplinks.md b/docs/models/components/leadstoplinks.md deleted file mode 100644 index 4d11243..0000000 --- a/docs/models/components/leadstoplinks.md +++ /dev/null @@ -1,15 +0,0 @@ -# LeadsTopLinks - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`link`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the short link | -| `id` | *str* | :heavy_check_mark: | The unique ID of the short link | -| `domain` | *str* | :heavy_check_mark: | The domain of the short link | -| `key` | *str* | :heavy_check_mark: | The key of the short link | -| `short_link` | *str* | :heavy_check_mark: | The short link URL | -| `url` | *str* | :heavy_check_mark: | The destination URL of the short link | -| `created_at` | *str* | :heavy_check_mark: | The creation timestamp of the short link | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this link | \ No newline at end of file diff --git a/docs/models/components/leadstopurls.md b/docs/models/components/leadstopurls.md deleted file mode 100644 index f08ca3b..0000000 --- a/docs/models/components/leadstopurls.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsTopUrls - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `url` | *str* | :heavy_check_mark: | The destination URL | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this URL | \ No newline at end of file diff --git a/docs/models/components/saleevent.md b/docs/models/components/saleevent.md new file mode 100644 index 0000000..3e43027 --- /dev/null +++ b/docs/models/components/saleevent.md @@ -0,0 +1,31 @@ +# SaleEvent + + +## 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 diff --git a/docs/models/components/saleeventevent.md b/docs/models/components/saleeventevent.md new file mode 100644 index 0000000..055f492 --- /dev/null +++ b/docs/models/components/saleeventevent.md @@ -0,0 +1,8 @@ +# SaleEventEvent + + +## Values + +| Name | Value | +| ------ | ------ | +| `SALE` | sale | \ No newline at end of file diff --git a/docs/models/components/salescities.md b/docs/models/components/salescities.md deleted file mode 100644 index f844902..0000000 --- a/docs/models/components/salescities.md +++ /dev/null @@ -1,11 +0,0 @@ -# SalesCities - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `city` | *str* | :heavy_check_mark: | The name of the city | -| `country` | [components.SalesCitiesCountry](../../models/components/salescitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this city | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this city | \ No newline at end of file diff --git a/docs/models/components/salescount.md b/docs/models/components/salescount.md deleted file mode 100644 index 250714d..0000000 --- a/docs/models/components/salescount.md +++ /dev/null @@ -1,9 +0,0 @@ -# SalesCount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `sales` | *float* | :heavy_check_mark: | The total number of sales | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales | \ No newline at end of file diff --git a/docs/models/components/salescountriescountry.md b/docs/models/components/salescountriescountry.md deleted file mode 100644 index 6a3f6e1..0000000 --- a/docs/models/components/salescountriescountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# SalesCountriesCountry - -The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `AF` | AF | -| `AL` | AL | -| `DZ` | DZ | -| `AS` | AS | -| `AD` | AD | -| `AO` | AO | -| `AI` | AI | -| `AQ` | AQ | -| `AG` | AG | -| `AR` | AR | -| `AM` | AM | -| `AW` | AW | -| `AU` | AU | -| `AT` | AT | -| `AZ` | AZ | -| `BS` | BS | -| `BH` | BH | -| `BD` | BD | -| `BB` | BB | -| `BY` | BY | -| `BE` | BE | -| `BZ` | BZ | -| `BJ` | BJ | -| `BM` | BM | -| `BT` | BT | -| `BO` | BO | -| `BA` | BA | -| `BW` | BW | -| `BV` | BV | -| `BR` | BR | -| `IO` | IO | -| `BN` | BN | -| `BG` | BG | -| `BF` | BF | -| `BI` | BI | -| `KH` | KH | -| `CM` | CM | -| `CA` | CA | -| `CV` | CV | -| `KY` | KY | -| `CF` | CF | -| `TD` | TD | -| `CL` | CL | -| `CN` | CN | -| `CX` | CX | -| `CC` | CC | -| `CO` | CO | -| `KM` | KM | -| `CG` | CG | -| `CD` | CD | -| `CK` | CK | -| `CR` | CR | -| `CI` | CI | -| `HR` | HR | -| `CU` | CU | -| `CY` | CY | -| `CZ` | CZ | -| `DK` | DK | -| `DJ` | DJ | -| `DM` | DM | -| `DO` | DO | -| `EC` | EC | -| `EG` | EG | -| `SV` | SV | -| `GQ` | GQ | -| `ER` | ER | -| `EE` | EE | -| `ET` | ET | -| `FK` | FK | -| `FO` | FO | -| `FJ` | FJ | -| `FI` | FI | -| `FR` | FR | -| `GF` | GF | -| `PF` | PF | -| `TF` | TF | -| `GA` | GA | -| `GM` | GM | -| `GE` | GE | -| `DE` | DE | -| `GH` | GH | -| `GI` | GI | -| `GR` | GR | -| `GL` | GL | -| `GD` | GD | -| `GP` | GP | -| `GU` | GU | -| `GT` | GT | -| `GN` | GN | -| `GW` | GW | -| `GY` | GY | -| `HT` | HT | -| `HM` | HM | -| `VA` | VA | -| `HN` | HN | -| `HK` | HK | -| `HU` | HU | -| `IS` | IS | -| `IN` | IN | -| `ID` | ID | -| `IR` | IR | -| `IQ` | IQ | -| `IE` | IE | -| `IL` | IL | -| `IT` | IT | -| `JM` | JM | -| `JP` | JP | -| `JO` | JO | -| `KZ` | KZ | -| `KE` | KE | -| `KI` | KI | -| `KP` | KP | -| `KR` | KR | -| `KW` | KW | -| `KG` | KG | -| `LA` | LA | -| `LV` | LV | -| `LB` | LB | -| `LS` | LS | -| `LR` | LR | -| `LY` | LY | -| `LI` | LI | -| `LT` | LT | -| `LU` | LU | -| `MO` | MO | -| `MG` | MG | -| `MW` | MW | -| `MY` | MY | -| `MV` | MV | -| `ML` | ML | -| `MT` | MT | -| `MH` | MH | -| `MQ` | MQ | -| `MR` | MR | -| `MU` | MU | -| `YT` | YT | -| `MX` | MX | -| `FM` | FM | -| `MD` | MD | -| `MC` | MC | -| `MN` | MN | -| `MS` | MS | -| `MA` | MA | -| `MZ` | MZ | -| `MM` | MM | -| `NA` | NA | -| `NR` | NR | -| `NP` | NP | -| `NL` | NL | -| `NC` | NC | -| `NZ` | NZ | -| `NI` | NI | -| `NE` | NE | -| `NG` | NG | -| `NU` | NU | -| `NF` | NF | -| `MK` | MK | -| `MP` | MP | -| `NO` | NO | -| `OM` | OM | -| `PK` | PK | -| `PW` | PW | -| `PS` | PS | -| `PA` | PA | -| `PG` | PG | -| `PY` | PY | -| `PE` | PE | -| `PH` | PH | -| `PN` | PN | -| `PL` | PL | -| `PT` | PT | -| `PR` | PR | -| `QA` | QA | -| `RE` | RE | -| `RO` | RO | -| `RU` | RU | -| `RW` | RW | -| `SH` | SH | -| `KN` | KN | -| `LC` | LC | -| `PM` | PM | -| `VC` | VC | -| `WS` | WS | -| `SM` | SM | -| `ST` | ST | -| `SA` | SA | -| `SN` | SN | -| `SC` | SC | -| `SL` | SL | -| `SG` | SG | -| `SK` | SK | -| `SI` | SI | -| `SB` | SB | -| `SO` | SO | -| `ZA` | ZA | -| `GS` | GS | -| `ES` | ES | -| `LK` | LK | -| `SD` | SD | -| `SR` | SR | -| `SJ` | SJ | -| `SZ` | SZ | -| `SE` | SE | -| `CH` | CH | -| `SY` | SY | -| `TW` | TW | -| `TJ` | TJ | -| `TZ` | TZ | -| `TH` | TH | -| `TL` | TL | -| `TG` | TG | -| `TK` | TK | -| `TO` | TO | -| `TT` | TT | -| `TN` | TN | -| `TR` | TR | -| `TM` | TM | -| `TC` | TC | -| `TV` | TV | -| `UG` | UG | -| `UA` | UA | -| `AE` | AE | -| `GB` | GB | -| `US` | US | -| `UM` | UM | -| `UY` | UY | -| `UZ` | UZ | -| `VU` | VU | -| `VE` | VE | -| `VN` | VN | -| `VG` | VG | -| `VI` | VI | -| `WF` | WF | -| `EH` | EH | -| `YE` | YE | -| `ZM` | ZM | -| `ZW` | ZW | -| `AX` | AX | -| `BQ` | BQ | -| `CW` | CW | -| `GG` | GG | -| `IM` | IM | -| `JE` | JE | -| `ME` | ME | -| `BL` | BL | -| `MF` | MF | -| `RS` | RS | -| `SX` | SX | -| `SS` | SS | -| `XK` | XK | \ No newline at end of file diff --git a/docs/models/components/salesos.md b/docs/models/components/salesos.md deleted file mode 100644 index 06982e9..0000000 --- a/docs/models/components/salesos.md +++ /dev/null @@ -1,10 +0,0 @@ -# SalesOS - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `os` | *str* | :heavy_check_mark: | The name of the OS | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this OS | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this OS | \ No newline at end of file diff --git a/docs/models/components/salestopurls.md b/docs/models/components/salestopurls.md deleted file mode 100644 index 0134cf2..0000000 --- a/docs/models/components/salestopurls.md +++ /dev/null @@ -1,10 +0,0 @@ -# SalesTopUrls - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `url` | *str* | :heavy_check_mark: | The destination URL | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this URL | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this URL | \ No newline at end of file diff --git a/docs/models/operations/click.md b/docs/models/operations/click.md new file mode 100644 index 0000000..9bdea28 --- /dev/null +++ b/docs/models/operations/click.md @@ -0,0 +1,20 @@ +# Click + + +## 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/customer.md b/docs/models/operations/customer.md new file mode 100644 index 0000000..03be414 --- /dev/null +++ b/docs/models/operations/customer.md @@ -0,0 +1,11 @@ +# Customer + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `email` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `avatar` | *Nullable[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 new file mode 100644 index 0000000..7b08039 --- /dev/null +++ b/docs/models/operations/geo.md @@ -0,0 +1,259 @@ +# 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 new file mode 100644 index 0000000..e147177 --- /dev/null +++ b/docs/models/operations/link.md @@ -0,0 +1,45 @@ +# 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/listeventsresponsebody.md b/docs/models/operations/listeventsresponsebody.md new file mode 100644 index 0000000..5e01a2f --- /dev/null +++ b/docs/models/operations/listeventsresponsebody.md @@ -0,0 +1,25 @@ +# ListEventsResponseBody + +A list of events + + +## Supported Types + +### `List[components.ClickEvent]` + +```python +value: List[components.ClickEvent] = /* values here */ +``` + +### `List[components.LeadEvent]` + +```python +value: List[components.LeadEvent] = /* values here */ +``` + +### `List[components.SaleEvent]` + +```python +value: List[components.SaleEvent] = /* values here */ +``` + diff --git a/docs/models/operations/retrieveanalyticsresponsebody.md b/docs/models/operations/retrieveanalyticsresponsebody.md index e86cc57..9b62fcf 100644 --- a/docs/models/operations/retrieveanalyticsresponsebody.md +++ b/docs/models/operations/retrieveanalyticsresponsebody.md @@ -5,183 +5,63 @@ Analytics data ## Supported Types -### `components.ClicksCount` +### `components.AnalyticsCount` ```python -value: components.ClicksCount = /* values here */ +value: components.AnalyticsCount = /* values here */ ``` -### `List[components.ClicksTimeseries]` +### `List[components.AnalyticsTimeseries]` ```python -value: List[components.ClicksTimeseries] = /* values here */ +value: List[components.AnalyticsTimeseries] = /* values here */ ``` -### `List[components.ClicksCountries]` +### `List[components.AnalyticsCountries]` ```python -value: List[components.ClicksCountries] = /* values here */ +value: List[components.AnalyticsCountries] = /* values here */ ``` -### `List[components.ClicksCities]` +### `List[components.AnalyticsCities]` ```python -value: List[components.ClicksCities] = /* values here */ +value: List[components.AnalyticsCities] = /* values here */ ``` -### `List[components.ClicksDevices]` +### `List[components.AnalyticsDevices]` ```python -value: List[components.ClicksDevices] = /* values here */ +value: List[components.AnalyticsDevices] = /* values here */ ``` -### `List[components.ClicksBrowsers]` +### `List[components.AnalyticsBrowsers]` ```python -value: List[components.ClicksBrowsers] = /* values here */ +value: List[components.AnalyticsBrowsers] = /* values here */ ``` -### `List[components.ClicksOS]` +### `List[components.AnalyticsOS]` ```python -value: List[components.ClicksOS] = /* values here */ +value: List[components.AnalyticsOS] = /* values here */ ``` -### `List[components.ClicksReferers]` +### `List[components.AnalyticsReferers]` ```python -value: List[components.ClicksReferers] = /* values here */ +value: List[components.AnalyticsReferers] = /* values here */ ``` -### `List[components.ClicksTopLinks]` +### `List[components.AnalyticsTopLinks]` ```python -value: List[components.ClicksTopLinks] = /* values here */ +value: List[components.AnalyticsTopLinks] = /* values here */ ``` -### `List[components.ClicksTopUrls]` +### `List[components.AnalyticsTopUrls]` ```python -value: List[components.ClicksTopUrls] = /* values here */ -``` - -### `components.LeadsCount` - -```python -value: components.LeadsCount = /* values here */ -``` - -### `List[components.LeadsTimeseries]` - -```python -value: List[components.LeadsTimeseries] = /* values here */ -``` - -### `List[components.LeadsCountries]` - -```python -value: List[components.LeadsCountries] = /* values here */ -``` - -### `List[components.LeadsCities]` - -```python -value: List[components.LeadsCities] = /* values here */ -``` - -### `List[components.LeadsDevices]` - -```python -value: List[components.LeadsDevices] = /* values here */ -``` - -### `List[components.LeadsBrowsers]` - -```python -value: List[components.LeadsBrowsers] = /* values here */ -``` - -### `List[components.LeadsOS]` - -```python -value: List[components.LeadsOS] = /* values here */ -``` - -### `List[components.LeadsReferers]` - -```python -value: List[components.LeadsReferers] = /* values here */ -``` - -### `List[components.LeadsTopLinks]` - -```python -value: List[components.LeadsTopLinks] = /* values here */ -``` - -### `List[components.LeadsTopUrls]` - -```python -value: List[components.LeadsTopUrls] = /* values here */ -``` - -### `components.SalesCount` - -```python -value: components.SalesCount = /* values here */ -``` - -### `List[components.SalesTimeseries]` - -```python -value: List[components.SalesTimeseries] = /* values here */ -``` - -### `List[components.SalesCountries]` - -```python -value: List[components.SalesCountries] = /* values here */ -``` - -### `List[components.SalesCities]` - -```python -value: List[components.SalesCities] = /* values here */ -``` - -### `List[components.SalesDevices]` - -```python -value: List[components.SalesDevices] = /* values here */ -``` - -### `List[components.SalesBrowsers]` - -```python -value: List[components.SalesBrowsers] = /* values here */ -``` - -### `List[components.SalesOS]` - -```python -value: List[components.SalesOS] = /* values here */ -``` - -### `List[components.SalesReferers]` - -```python -value: List[components.SalesReferers] = /* values here */ -``` - -### `List[components.SalesTopLinks]` - -```python -value: List[components.SalesTopLinks] = /* values here */ -``` - -### `List[components.SalesTopUrls]` - -```python -value: List[components.SalesTopUrls] = /* values here */ +value: List[components.AnalyticsTopUrls] = /* values here */ ``` diff --git a/docs/models/operations/sale.md b/docs/models/operations/sale.md new file mode 100644 index 0000000..0ce7d87 --- /dev/null +++ b/docs/models/operations/sale.md @@ -0,0 +1,11 @@ +# Sale + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `amount` | *float* | :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 diff --git a/docs/models/operations/sortby.md b/docs/models/operations/sortby.md index f617b86..5e87d2c 100644 --- a/docs/models/operations/sortby.md +++ b/docs/models/operations/sortby.md @@ -5,5 +5,4 @@ | Name | Value | | ----------- | ----------- | -| `TIMESTAMP` | timestamp | -| `AMOUNT` | amount | \ No newline at end of file +| `TIMESTAMP` | timestamp | \ No newline at end of file diff --git a/docs/models/operations/trackleadresponsebody.md b/docs/models/operations/trackleadresponsebody.md index 6ac1f31..80315cd 100644 --- a/docs/models/operations/trackleadresponsebody.md +++ b/docs/models/operations/trackleadresponsebody.md @@ -5,12 +5,9 @@ A lead was tracked. ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `click_id` | *str* | :heavy_check_mark: | N/A | -| `event_name` | *str* | :heavy_check_mark: | N/A | -| `customer_id` | *str* | :heavy_check_mark: | N/A | -| `customer_name` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `customer_email` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `customer_avatar` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| 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 diff --git a/docs/models/operations/tracksaleclick.md b/docs/models/operations/tracksaleclick.md new file mode 100644 index 0000000..690ff47 --- /dev/null +++ b/docs/models/operations/tracksaleclick.md @@ -0,0 +1,20 @@ +# 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/tracksalecustomer.md b/docs/models/operations/tracksalecustomer.md new file mode 100644 index 0000000..bd93f7a --- /dev/null +++ b/docs/models/operations/tracksalecustomer.md @@ -0,0 +1,11 @@ +# TrackSaleCustomer + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `email` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `avatar` | *Nullable[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 new file mode 100644 index 0000000..12c5c6c --- /dev/null +++ b/docs/models/operations/tracksalegeo.md @@ -0,0 +1,259 @@ +# 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 new file mode 100644 index 0000000..95b358d --- /dev/null +++ b/docs/models/operations/tracksalelink.md @@ -0,0 +1,45 @@ +# 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 fa50212..2e18a6c 100644 --- a/docs/models/operations/tracksaleresponsebody.md +++ b/docs/models/operations/tracksaleresponsebody.md @@ -5,12 +5,10 @@ A sale was tracked. ## Fields -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `event_name` | *str* | :heavy_check_mark: | N/A | -| `customer_id` | *str* | :heavy_check_mark: | N/A | -| `amount` | *float* | :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 | -| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `event_name` | *str* | :heavy_check_mark: | N/A | +| `customer` | [operations.TrackSaleCustomer](../../models/operations/tracksalecustomer.md) | :heavy_check_mark: | N/A | +| `sale` | [operations.Sale](../../models/operations/sale.md) | :heavy_check_mark: | N/A | +| `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 diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index c45bd67..c3f8d22 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -45,7 +45,7 @@ if res is not None: ### Response -**[List[components.ClickEvents]](../../models/.md)** +**[operations.ListEventsResponseBody](../../models/operations/listeventsresponsebody.md)** ### Errors diff --git a/poetry.lock b/poetry.lock index af2e0a4..52fd08f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -276,17 +276,6 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] -[[package]] -name = "nodeenv" -version = "1.9.1" -description = "Node.js virtual environment builder" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, - {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, -] - [[package]] name = "platformdirs" version = "4.2.2" @@ -456,24 +445,6 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] -[[package]] -name = "pyright" -version = "1.1.374" -description = "Command line wrapper for pyright" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pyright-1.1.374-py3-none-any.whl", hash = "sha256:55752bcf7a3646d293cd76710a983b71e16f6128aab2d42468e6eb7e46c0a70d"}, - {file = "pyright-1.1.374.tar.gz", hash = "sha256:d01b2daf864ba5e0362e56b844984865970d7204158e61eb685e2dab7804cb82"}, -] - -[package.dependencies] -nodeenv = ">=1.6.0" - -[package.extras] -all = ["twine (>=3.4.1)"] -dev = ["twine (>=3.4.1)"] - [[package]] name = "python-dateutil" version = "2.8.2" @@ -572,4 +543,4 @@ typing-extensions = ">=3.7.4" [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "47ddda92eccffe312633b78cc926be3fae0cfb283d29cc7b53adcdf224504721" +content-hash = "3267b24f8a7dfeb0d570e46cc6470014f4b3764a5702e71e685a42fe6ea63147" diff --git a/pylintrc b/pylintrc index e3f8045..aa04b9f 100644 --- a/pylintrc +++ b/pylintrc @@ -191,6 +191,8 @@ good-names=i, os, qr, id, + ip, + ua, af, al, dz, @@ -407,7 +409,6 @@ good-names=i, tc, tv, ug, - ua, ae, gb, us, @@ -436,8 +437,7 @@ good-names=i, rs, sx, ss, - xk, - ip + xk # 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 9fd4d0d..d75b09e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dub" -version = "0.7.2" +version = "0.7.3" description = "Python Client SDK Generated by Speakeasy" authors = ["Speakeasy",] readme = "README-PYPI.md" @@ -28,7 +28,6 @@ typing-inspect = "^0.9.0" [tool.poetry.group.dev.dependencies] mypy = "==1.10.1" pylint = "==3.2.3" -pyright = "==1.1.374" types-python-dateutil = "^2.9.0.20240316" [build-system] diff --git a/src/dub/events.py b/src/dub/events.py index 5bfeac5..476cb60 100644 --- a/src/dub/events.py +++ b/src/dub/events.py @@ -3,9 +3,9 @@ from .basesdk import BaseSDK from dub import utils from dub._hooks import HookContext -from dub.models import components, errors, operations +from dub.models import errors, operations from dub.types import BaseModel, OptionalNullable, UNSET -from typing import Any, List, Optional, Union, cast +from typing import Any, Optional, Union, cast class Events(BaseSDK): @@ -16,7 +16,7 @@ def list( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[List[components.ClickEvents]]: + ) -> Optional[operations.ListEventsResponseBody]: r"""Retrieve a list of events Retrieve a paginated list of events for the authenticated workspace. @@ -76,7 +76,7 @@ def list( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[List[components.ClickEvents]]) + return utils.unmarshal_json(http_res.text, Optional[operations.ListEventsResponseBody]) if utils.match_response(http_res, "400", "application/json"): data = utils.unmarshal_json(http_res.text, errors.BadRequestData) raise errors.BadRequest(data=data) @@ -118,7 +118,7 @@ async def list_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[List[components.ClickEvents]]: + ) -> Optional[operations.ListEventsResponseBody]: r"""Retrieve a list of events Retrieve a paginated list of events for the authenticated workspace. @@ -178,7 +178,7 @@ async def list_async( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[List[components.ClickEvents]]) + return utils.unmarshal_json(http_res.text, Optional[operations.ListEventsResponseBody]) if utils.match_response(http_res, "400", "application/json"): data = utils.unmarshal_json(http_res.text, errors.BadRequestData) raise errors.BadRequest(data=data) diff --git a/src/dub/models/components/__init__.py b/src/dub/models/components/__init__.py index 6fa5802..2ece6da 100644 --- a/src/dub/models/components/__init__.py +++ b/src/dub/models/components/__init__.py @@ -1,43 +1,25 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .clickevents import ClickEvents, ClickEventsTypedDict -from .clicksbrowsers import ClicksBrowsers, ClicksBrowsersTypedDict -from .clickscities import ClicksCities, ClicksCitiesCountry, ClicksCitiesTypedDict -from .clickscount import ClicksCount, ClicksCountTypedDict -from .clickscountries import ClicksCountries, ClicksCountriesTypedDict, Country -from .clicksdevices import ClicksDevices, ClicksDevicesTypedDict -from .clicksos import ClicksOS, ClicksOSTypedDict -from .clicksreferers import ClicksReferers, ClicksReferersTypedDict -from .clickstimeseries import ClicksTimeseries, ClicksTimeseriesTypedDict -from .clickstoplinks import ClicksTopLinks, ClicksTopLinksTypedDict -from .clickstopurls import ClicksTopUrls, ClicksTopUrlsTypedDict +from .analyticsbrowsers import AnalyticsBrowsers, AnalyticsBrowsersTypedDict +from .analyticscities import AnalyticsCities, AnalyticsCitiesCountry, AnalyticsCitiesTypedDict +from .analyticscount import AnalyticsCount, AnalyticsCountTypedDict +from .analyticscountries import AnalyticsCountries, AnalyticsCountriesTypedDict, City, Country +from .analyticsdevices import AnalyticsDevices, AnalyticsDevicesTypedDict +from .analyticsos import AnalyticsOS, AnalyticsOSTypedDict +from .analyticsreferers import AnalyticsReferers, AnalyticsReferersTypedDict +from .analyticstimeseries import AnalyticsTimeseries, AnalyticsTimeseriesTypedDict +from .analyticstoplinks import AnalyticsTopLinks, AnalyticsTopLinksTypedDict +from .analyticstopurls import AnalyticsTopUrls, AnalyticsTopUrlsTypedDict +from .clickevent import ClickEvent, ClickEventTypedDict, Event from .continentcode import ContinentCode from .countrycode import CountryCode from .domainschema import DomainSchema, DomainSchemaTypedDict -from .leadsbrowsers import LeadsBrowsers, LeadsBrowsersTypedDict -from .leadscities import LeadsCities, LeadsCitiesCountry, LeadsCitiesTypedDict -from .leadscount import LeadsCount, LeadsCountTypedDict -from .leadscountries import LeadsCountries, LeadsCountriesCountry, LeadsCountriesTypedDict -from .leadsdevices import LeadsDevices, LeadsDevicesTypedDict -from .leadsos import LeadsOS, LeadsOSTypedDict -from .leadsreferers import LeadsReferers, LeadsReferersTypedDict -from .leadstimeseries import LeadsTimeseries, LeadsTimeseriesTypedDict -from .leadstoplinks import LeadsTopLinks, LeadsTopLinksTypedDict -from .leadstopurls import LeadsTopUrls, LeadsTopUrlsTypedDict +from .leadevent import LeadEvent, LeadEventEvent, LeadEventTypedDict from .linkgeotargeting import LinkGeoTargeting, LinkGeoTargetingTypedDict from .linkschema import Geo, GeoTypedDict, LinkSchema, LinkSchemaTypedDict -from .salesbrowsers import SalesBrowsers, SalesBrowsersTypedDict -from .salescities import SalesCities, SalesCitiesCountry, SalesCitiesTypedDict -from .salescount import SalesCount, SalesCountTypedDict -from .salescountries import SalesCountries, SalesCountriesCountry, SalesCountriesTypedDict -from .salesdevices import SalesDevices, SalesDevicesTypedDict -from .salesos import SalesOS, SalesOSTypedDict -from .salesreferers import SalesReferers, SalesReferersTypedDict -from .salestimeseries import SalesTimeseries, SalesTimeseriesTypedDict -from .salestoplinks import SalesTopLinks, SalesTopLinksTypedDict -from .salestopurls import SalesTopUrls, SalesTopUrlsTypedDict +from .saleevent import SaleEvent, SaleEventEvent, SaleEventTypedDict from .security import Security, SecurityTypedDict from .tagschema import Color, TagSchema, TagSchemaTypedDict from .workspaceschema import Domains, DomainsTypedDict, Plan, Role, Users, UsersTypedDict, WorkspaceSchema, WorkspaceSchemaTypedDict -__all__ = ["ClickEvents", "ClickEventsTypedDict", "ClicksBrowsers", "ClicksBrowsersTypedDict", "ClicksCities", "ClicksCitiesCountry", "ClicksCitiesTypedDict", "ClicksCount", "ClicksCountTypedDict", "ClicksCountries", "ClicksCountriesTypedDict", "ClicksDevices", "ClicksDevicesTypedDict", "ClicksOS", "ClicksOSTypedDict", "ClicksReferers", "ClicksReferersTypedDict", "ClicksTimeseries", "ClicksTimeseriesTypedDict", "ClicksTopLinks", "ClicksTopLinksTypedDict", "ClicksTopUrls", "ClicksTopUrlsTypedDict", "Color", "ContinentCode", "Country", "CountryCode", "DomainSchema", "DomainSchemaTypedDict", "Domains", "DomainsTypedDict", "Geo", "GeoTypedDict", "LeadsBrowsers", "LeadsBrowsersTypedDict", "LeadsCities", "LeadsCitiesCountry", "LeadsCitiesTypedDict", "LeadsCount", "LeadsCountTypedDict", "LeadsCountries", "LeadsCountriesCountry", "LeadsCountriesTypedDict", "LeadsDevices", "LeadsDevicesTypedDict", "LeadsOS", "LeadsOSTypedDict", "LeadsReferers", "LeadsReferersTypedDict", "LeadsTimeseries", "LeadsTimeseriesTypedDict", "LeadsTopLinks", "LeadsTopLinksTypedDict", "LeadsTopUrls", "LeadsTopUrlsTypedDict", "LinkGeoTargeting", "LinkGeoTargetingTypedDict", "LinkSchema", "LinkSchemaTypedDict", "Plan", "Role", "SalesBrowsers", "SalesBrowsersTypedDict", "SalesCities", "SalesCitiesCountry", "SalesCitiesTypedDict", "SalesCount", "SalesCountTypedDict", "SalesCountries", "SalesCountriesCountry", "SalesCountriesTypedDict", "SalesDevices", "SalesDevicesTypedDict", "SalesOS", "SalesOSTypedDict", "SalesReferers", "SalesReferersTypedDict", "SalesTimeseries", "SalesTimeseriesTypedDict", "SalesTopLinks", "SalesTopLinksTypedDict", "SalesTopUrls", "SalesTopUrlsTypedDict", "Security", "SecurityTypedDict", "TagSchema", "TagSchemaTypedDict", "Users", "UsersTypedDict", "WorkspaceSchema", "WorkspaceSchemaTypedDict"] +__all__ = ["AnalyticsBrowsers", "AnalyticsBrowsersTypedDict", "AnalyticsCities", "AnalyticsCitiesCountry", "AnalyticsCitiesTypedDict", "AnalyticsCount", "AnalyticsCountTypedDict", "AnalyticsCountries", "AnalyticsCountriesTypedDict", "AnalyticsDevices", "AnalyticsDevicesTypedDict", "AnalyticsOS", "AnalyticsOSTypedDict", "AnalyticsReferers", "AnalyticsReferersTypedDict", "AnalyticsTimeseries", "AnalyticsTimeseriesTypedDict", "AnalyticsTopLinks", "AnalyticsTopLinksTypedDict", "AnalyticsTopUrls", "AnalyticsTopUrlsTypedDict", "City", "ClickEvent", "ClickEventTypedDict", "Color", "ContinentCode", "Country", "CountryCode", "DomainSchema", "DomainSchemaTypedDict", "Domains", "DomainsTypedDict", "Event", "Geo", "GeoTypedDict", "LeadEvent", "LeadEventEvent", "LeadEventTypedDict", "LinkGeoTargeting", "LinkGeoTargetingTypedDict", "LinkSchema", "LinkSchemaTypedDict", "Plan", "Role", "SaleEvent", "SaleEventEvent", "SaleEventTypedDict", "Security", "SecurityTypedDict", "TagSchema", "TagSchemaTypedDict", "Users", "UsersTypedDict", "WorkspaceSchema", "WorkspaceSchemaTypedDict"] diff --git a/src/dub/models/components/analyticsbrowsers.py b/src/dub/models/components/analyticsbrowsers.py new file mode 100644 index 0000000..5455afe --- /dev/null +++ b/src/dub/models/components/analyticsbrowsers.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsBrowsersTypedDict(TypedDict): + browser: str + r"""The name of the browser""" + clicks: NotRequired[float] + r"""The number of clicks from this browser""" + leads: NotRequired[float] + r"""The number of leads from this browser""" + sales: NotRequired[float] + r"""The number of sales from this browser""" + sale_amount: NotRequired[float] + r"""The total amount of sales from this browser""" + + +class AnalyticsBrowsers(BaseModel): + browser: str + r"""The name of the browser""" + clicks: Optional[float] = 0 + r"""The number of clicks from this browser""" + leads: Optional[float] = 0 + r"""The number of leads from this browser""" + sales: Optional[float] = 0 + r"""The number of sales from this browser""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales from this browser""" + diff --git a/src/dub/models/components/salescities.py b/src/dub/models/components/analyticscities.py similarity index 84% rename from src/dub/models/components/salescities.py rename to src/dub/models/components/analyticscities.py index c7e29f1..d8e7879 100644 --- a/src/dub/models/components/salescities.py +++ b/src/dub/models/components/analyticscities.py @@ -3,10 +3,12 @@ from __future__ import annotations from dub.types import BaseModel from enum import Enum -from typing import TypedDict +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired -class SalesCitiesCountry(str, Enum): +class AnalyticsCitiesCountry(str, Enum): r"""The 2-letter country code of the city: https://d.to/geo""" AF = "AF" AL = "AL" @@ -259,24 +261,32 @@ class SalesCitiesCountry(str, Enum): SS = "SS" XK = "XK" -class SalesCitiesTypedDict(TypedDict): +class AnalyticsCitiesTypedDict(TypedDict): city: str r"""The name of the city""" - country: SalesCitiesCountry + country: AnalyticsCitiesCountry r"""The 2-letter country code of the city: https://d.to/geo""" - sales: float + clicks: NotRequired[float] + r"""The number of clicks from this city""" + leads: NotRequired[float] + r"""The number of leads from this city""" + sales: NotRequired[float] r"""The number of sales from this city""" - amount: float + sale_amount: NotRequired[float] r"""The total amount of sales from this city""" -class SalesCities(BaseModel): +class AnalyticsCities(BaseModel): city: str r"""The name of the city""" - country: SalesCitiesCountry + country: AnalyticsCitiesCountry r"""The 2-letter country code of the city: https://d.to/geo""" - sales: float + clicks: Optional[float] = 0 + r"""The number of clicks from this city""" + leads: Optional[float] = 0 + r"""The number of leads from this city""" + sales: Optional[float] = 0 r"""The number of sales from this city""" - amount: float + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 r"""The total amount of sales from this city""" diff --git a/src/dub/models/components/analyticscount.py b/src/dub/models/components/analyticscount.py new file mode 100644 index 0000000..9e86d85 --- /dev/null +++ b/src/dub/models/components/analyticscount.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsCountTypedDict(TypedDict): + clicks: NotRequired[float] + r"""The total number of clicks""" + leads: NotRequired[float] + r"""The total number of leads""" + sales: NotRequired[float] + r"""The total number of sales""" + sale_amount: NotRequired[float] + r"""The total amount of sales""" + + +class AnalyticsCount(BaseModel): + clicks: Optional[float] = 0 + r"""The total number of clicks""" + leads: Optional[float] = 0 + r"""The total number of leads""" + sales: Optional[float] = 0 + r"""The total number of sales""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales""" + diff --git a/src/dub/models/components/salescountries.py b/src/dub/models/components/analyticscountries.py similarity index 83% rename from src/dub/models/components/salescountries.py rename to src/dub/models/components/analyticscountries.py index 589ea8a..3bd8577 100644 --- a/src/dub/models/components/salescountries.py +++ b/src/dub/models/components/analyticscountries.py @@ -3,10 +3,12 @@ from __future__ import annotations from dub.types import BaseModel from enum import Enum -from typing import TypedDict +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired -class SalesCountriesCountry(str, Enum): +class Country(str, Enum): r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" AF = "AF" AL = "AL" @@ -259,20 +261,33 @@ class SalesCountriesCountry(str, Enum): SS = "SS" XK = "XK" -class SalesCountriesTypedDict(TypedDict): - country: SalesCountriesCountry +class City(str, Enum): + WILDCARD_ = "*" + +class AnalyticsCountriesTypedDict(TypedDict): + country: Country r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - sales: float + city: NotRequired[City] + clicks: NotRequired[float] + r"""The number of clicks from this country""" + leads: NotRequired[float] + r"""The number of leads from this country""" + sales: NotRequired[float] r"""The number of sales from this country""" - amount: float + sale_amount: NotRequired[float] r"""The total amount of sales from this country""" -class SalesCountries(BaseModel): - country: SalesCountriesCountry +class AnalyticsCountries(BaseModel): + country: Country r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - sales: float + city: Optional[City] = City.WILDCARD_ + clicks: Optional[float] = 0 + r"""The number of clicks from this country""" + leads: Optional[float] = 0 + r"""The number of leads from this country""" + sales: Optional[float] = 0 r"""The number of sales from this country""" - amount: float + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 r"""The total amount of sales from this country""" diff --git a/src/dub/models/components/analyticsdevices.py b/src/dub/models/components/analyticsdevices.py new file mode 100644 index 0000000..aedfc03 --- /dev/null +++ b/src/dub/models/components/analyticsdevices.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsDevicesTypedDict(TypedDict): + device: str + r"""The name of the device""" + clicks: NotRequired[float] + r"""The number of clicks from this device""" + leads: NotRequired[float] + r"""The number of leads from this device""" + sales: NotRequired[float] + r"""The number of sales from this device""" + sale_amount: NotRequired[float] + r"""The total amount of sales from this device""" + + +class AnalyticsDevices(BaseModel): + device: str + r"""The name of the device""" + clicks: Optional[float] = 0 + r"""The number of clicks from this device""" + leads: Optional[float] = 0 + r"""The number of leads from this device""" + sales: Optional[float] = 0 + r"""The number of sales from this device""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales from this device""" + diff --git a/src/dub/models/components/analyticsos.py b/src/dub/models/components/analyticsos.py new file mode 100644 index 0000000..3c0ad4a --- /dev/null +++ b/src/dub/models/components/analyticsos.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsOSTypedDict(TypedDict): + os: str + r"""The name of the OS""" + clicks: NotRequired[float] + r"""The number of clicks from this OS""" + leads: NotRequired[float] + r"""The number of leads from this OS""" + sales: NotRequired[float] + r"""The number of sales from this OS""" + sale_amount: NotRequired[float] + r"""The total amount of sales from this OS""" + + +class AnalyticsOS(BaseModel): + os: str + r"""The name of the OS""" + clicks: Optional[float] = 0 + r"""The number of clicks from this OS""" + leads: Optional[float] = 0 + r"""The number of leads from this OS""" + sales: Optional[float] = 0 + r"""The number of sales from this OS""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales from this OS""" + diff --git a/src/dub/models/components/analyticsreferers.py b/src/dub/models/components/analyticsreferers.py new file mode 100644 index 0000000..b61a226 --- /dev/null +++ b/src/dub/models/components/analyticsreferers.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsReferersTypedDict(TypedDict): + referer: str + r"""The name of the referer. If unknown, this will be `(direct)`""" + clicks: NotRequired[float] + r"""The number of clicks from this referer""" + leads: NotRequired[float] + r"""The number of leads from this referer""" + sales: NotRequired[float] + r"""The number of sales from this referer""" + sale_amount: NotRequired[float] + r"""The total amount of sales from this referer""" + + +class AnalyticsReferers(BaseModel): + referer: str + r"""The name of the referer. If unknown, this will be `(direct)`""" + clicks: Optional[float] = 0 + r"""The number of clicks from this referer""" + leads: Optional[float] = 0 + r"""The number of leads from this referer""" + sales: Optional[float] = 0 + r"""The number of sales from this referer""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales from this referer""" + diff --git a/src/dub/models/components/analyticstimeseries.py b/src/dub/models/components/analyticstimeseries.py new file mode 100644 index 0000000..a6f111f --- /dev/null +++ b/src/dub/models/components/analyticstimeseries.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsTimeseriesTypedDict(TypedDict): + start: str + r"""The starting timestamp of the interval""" + clicks: NotRequired[float] + r"""The number of clicks in the interval""" + leads: NotRequired[float] + r"""The number of leads in the interval""" + sales: NotRequired[float] + r"""The number of sales in the interval""" + sale_amount: NotRequired[float] + r"""The total amount of sales in the interval""" + + +class AnalyticsTimeseries(BaseModel): + start: str + r"""The starting timestamp of the interval""" + clicks: Optional[float] = 0 + r"""The number of clicks in the interval""" + leads: Optional[float] = 0 + r"""The number of leads in the interval""" + sales: Optional[float] = 0 + r"""The number of sales in the interval""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales in the interval""" + diff --git a/src/dub/models/components/salestoplinks.py b/src/dub/models/components/analyticstoplinks.py similarity index 68% rename from src/dub/models/components/salestoplinks.py rename to src/dub/models/components/analyticstoplinks.py index e76217c..fe802ce 100644 --- a/src/dub/models/components/salestoplinks.py +++ b/src/dub/models/components/analyticstoplinks.py @@ -3,11 +3,11 @@ from __future__ import annotations from dub.types import BaseModel import pydantic -from typing import TypedDict -from typing_extensions import Annotated +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired -class SalesTopLinksTypedDict(TypedDict): +class AnalyticsTopLinksTypedDict(TypedDict): link: str r"""The unique ID of the short link""" id: str @@ -22,13 +22,17 @@ class SalesTopLinksTypedDict(TypedDict): r"""The destination URL of the short link""" created_at: str r"""The creation timestamp of the short link""" - sales: float + clicks: NotRequired[float] + r"""The number of clicks from this link""" + leads: NotRequired[float] + r"""The number of leads from this link""" + sales: NotRequired[float] r"""The number of sales from this link""" - amount: float + sale_amount: NotRequired[float] r"""The total amount of sales from this link""" -class SalesTopLinks(BaseModel): +class AnalyticsTopLinks(BaseModel): link: Annotated[str, pydantic.Field(deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.")] r"""The unique ID of the short link""" id: str @@ -43,8 +47,12 @@ class SalesTopLinks(BaseModel): r"""The destination URL of the short link""" created_at: Annotated[str, pydantic.Field(alias="createdAt")] r"""The creation timestamp of the short link""" - sales: float + clicks: Optional[float] = 0 + r"""The number of clicks from this link""" + leads: Optional[float] = 0 + r"""The number of leads from this link""" + sales: Optional[float] = 0 r"""The number of sales from this link""" - amount: float + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 r"""The total amount of sales from this link""" diff --git a/src/dub/models/components/analyticstopurls.py b/src/dub/models/components/analyticstopurls.py new file mode 100644 index 0000000..594669e --- /dev/null +++ b/src/dub/models/components/analyticstopurls.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel +import pydantic +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class AnalyticsTopUrlsTypedDict(TypedDict): + url: str + r"""The destination URL""" + clicks: NotRequired[float] + r"""The number of clicks from this URL""" + leads: NotRequired[float] + r"""The number of leads from this URL""" + sales: NotRequired[float] + r"""The number of sales from this URL""" + sale_amount: NotRequired[float] + r"""The total amount of sales from this URL""" + + +class AnalyticsTopUrls(BaseModel): + url: str + r"""The destination URL""" + clicks: Optional[float] = 0 + r"""The number of clicks from this URL""" + leads: Optional[float] = 0 + r"""The number of leads from this URL""" + sales: Optional[float] = 0 + r"""The number of sales from this URL""" + sale_amount: Annotated[Optional[float], pydantic.Field(alias="saleAmount")] = 0 + r"""The total amount of sales from this URL""" + diff --git a/src/dub/models/components/clickevents.py b/src/dub/models/components/clickevent.py similarity index 84% rename from src/dub/models/components/clickevents.py rename to src/dub/models/components/clickevent.py index 03564f1..a05f5f8 100644 --- a/src/dub/models/components/clickevents.py +++ b/src/dub/models/components/clickevent.py @@ -2,11 +2,16 @@ from __future__ import annotations from dub.types import BaseModel, Nullable, UNSET_SENTINEL +from enum import Enum from pydantic import model_serializer -from typing import TypedDict +from typing import Optional, TypedDict +from typing_extensions import NotRequired -class ClickEventsTypedDict(TypedDict): +class Event(str, Enum): + CLICK = "click" + +class ClickEventTypedDict(TypedDict): timestamp: str click_id: str link_id: str @@ -22,9 +27,10 @@ class ClickEventsTypedDict(TypedDict): referer: Nullable[str] ip: Nullable[str] qr: Nullable[float] + event: NotRequired[Event] -class ClickEvents(BaseModel): +class ClickEvent(BaseModel): timestamp: str click_id: str link_id: str @@ -40,10 +46,11 @@ class ClickEvents(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 = [] + optional_fields = ["event"] nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "ip", "qr"] null_default_fields = [] diff --git a/src/dub/models/components/clicksbrowsers.py b/src/dub/models/components/clicksbrowsers.py deleted file mode 100644 index 1fb2513..0000000 --- a/src/dub/models/components/clicksbrowsers.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksBrowsersTypedDict(TypedDict): - browser: str - r"""The name of the browser""" - clicks: float - r"""The number of clicks from this browser""" - - -class ClicksBrowsers(BaseModel): - browser: str - r"""The name of the browser""" - clicks: float - r"""The number of clicks from this browser""" - diff --git a/src/dub/models/components/clickscities.py b/src/dub/models/components/clickscities.py deleted file mode 100644 index 58012e3..0000000 --- a/src/dub/models/components/clickscities.py +++ /dev/null @@ -1,278 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from enum import Enum -from typing import TypedDict - - -class ClicksCitiesCountry(str, Enum): - r"""The 2-letter country code of the city: https://d.to/geo""" - AF = "AF" - AL = "AL" - DZ = "DZ" - AS = "AS" - AD = "AD" - AO = "AO" - AI = "AI" - AQ = "AQ" - AG = "AG" - AR = "AR" - AM = "AM" - AW = "AW" - AU = "AU" - AT = "AT" - AZ = "AZ" - BS = "BS" - BH = "BH" - BD = "BD" - BB = "BB" - BY = "BY" - BE = "BE" - BZ = "BZ" - BJ = "BJ" - BM = "BM" - BT = "BT" - BO = "BO" - BA = "BA" - BW = "BW" - BV = "BV" - BR = "BR" - IO = "IO" - BN = "BN" - BG = "BG" - BF = "BF" - BI = "BI" - KH = "KH" - CM = "CM" - CA = "CA" - CV = "CV" - KY = "KY" - CF = "CF" - TD = "TD" - CL = "CL" - CN = "CN" - CX = "CX" - CC = "CC" - CO = "CO" - KM = "KM" - CG = "CG" - CD = "CD" - CK = "CK" - CR = "CR" - CI = "CI" - HR = "HR" - CU = "CU" - CY = "CY" - CZ = "CZ" - DK = "DK" - DJ = "DJ" - DM = "DM" - DO = "DO" - EC = "EC" - EG = "EG" - SV = "SV" - GQ = "GQ" - ER = "ER" - EE = "EE" - ET = "ET" - FK = "FK" - FO = "FO" - FJ = "FJ" - FI = "FI" - FR = "FR" - GF = "GF" - PF = "PF" - TF = "TF" - GA = "GA" - GM = "GM" - GE = "GE" - DE = "DE" - GH = "GH" - GI = "GI" - GR = "GR" - GL = "GL" - GD = "GD" - GP = "GP" - GU = "GU" - GT = "GT" - GN = "GN" - GW = "GW" - GY = "GY" - HT = "HT" - HM = "HM" - VA = "VA" - HN = "HN" - HK = "HK" - HU = "HU" - IS = "IS" - IN = "IN" - ID = "ID" - IR = "IR" - IQ = "IQ" - IE = "IE" - IL = "IL" - IT = "IT" - JM = "JM" - JP = "JP" - JO = "JO" - KZ = "KZ" - KE = "KE" - KI = "KI" - KP = "KP" - KR = "KR" - KW = "KW" - KG = "KG" - LA = "LA" - LV = "LV" - LB = "LB" - LS = "LS" - LR = "LR" - LY = "LY" - LI = "LI" - LT = "LT" - LU = "LU" - MO = "MO" - MG = "MG" - MW = "MW" - MY = "MY" - MV = "MV" - ML = "ML" - MT = "MT" - MH = "MH" - MQ = "MQ" - MR = "MR" - MU = "MU" - YT = "YT" - MX = "MX" - FM = "FM" - MD = "MD" - MC = "MC" - MN = "MN" - MS = "MS" - MA = "MA" - MZ = "MZ" - MM = "MM" - NA = "NA" - NR = "NR" - NP = "NP" - NL = "NL" - NC = "NC" - NZ = "NZ" - NI = "NI" - NE = "NE" - NG = "NG" - NU = "NU" - NF = "NF" - MK = "MK" - MP = "MP" - NO = "NO" - OM = "OM" - PK = "PK" - PW = "PW" - PS = "PS" - PA = "PA" - PG = "PG" - PY = "PY" - PE = "PE" - PH = "PH" - PN = "PN" - PL = "PL" - PT = "PT" - PR = "PR" - QA = "QA" - RE = "RE" - RO = "RO" - RU = "RU" - RW = "RW" - SH = "SH" - KN = "KN" - LC = "LC" - PM = "PM" - VC = "VC" - WS = "WS" - SM = "SM" - ST = "ST" - SA = "SA" - SN = "SN" - SC = "SC" - SL = "SL" - SG = "SG" - SK = "SK" - SI = "SI" - SB = "SB" - SO = "SO" - ZA = "ZA" - GS = "GS" - ES = "ES" - LK = "LK" - SD = "SD" - SR = "SR" - SJ = "SJ" - SZ = "SZ" - SE = "SE" - CH = "CH" - SY = "SY" - TW = "TW" - TJ = "TJ" - TZ = "TZ" - TH = "TH" - TL = "TL" - TG = "TG" - TK = "TK" - TO = "TO" - TT = "TT" - TN = "TN" - TR = "TR" - TM = "TM" - TC = "TC" - TV = "TV" - UG = "UG" - UA = "UA" - AE = "AE" - GB = "GB" - US = "US" - UM = "UM" - UY = "UY" - UZ = "UZ" - VU = "VU" - VE = "VE" - VN = "VN" - VG = "VG" - VI = "VI" - WF = "WF" - EH = "EH" - YE = "YE" - ZM = "ZM" - ZW = "ZW" - AX = "AX" - BQ = "BQ" - CW = "CW" - GG = "GG" - IM = "IM" - JE = "JE" - ME = "ME" - BL = "BL" - MF = "MF" - RS = "RS" - SX = "SX" - SS = "SS" - XK = "XK" - -class ClicksCitiesTypedDict(TypedDict): - city: str - r"""The name of the city""" - country: ClicksCitiesCountry - r"""The 2-letter country code of the city: https://d.to/geo""" - clicks: float - r"""The number of clicks from this city""" - - -class ClicksCities(BaseModel): - city: str - r"""The name of the city""" - country: ClicksCitiesCountry - r"""The 2-letter country code of the city: https://d.to/geo""" - clicks: float - r"""The number of clicks from this city""" - diff --git a/src/dub/models/components/clickscount.py b/src/dub/models/components/clickscount.py deleted file mode 100644 index 1aa4ade..0000000 --- a/src/dub/models/components/clickscount.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksCountTypedDict(TypedDict): - clicks: float - r"""The total number of clicks""" - - -class ClicksCount(BaseModel): - clicks: float - r"""The total number of clicks""" - diff --git a/src/dub/models/components/clickscountries.py b/src/dub/models/components/clickscountries.py deleted file mode 100644 index 4fea24a..0000000 --- a/src/dub/models/components/clickscountries.py +++ /dev/null @@ -1,274 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from enum import Enum -from typing import TypedDict - - -class Country(str, Enum): - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - AF = "AF" - AL = "AL" - DZ = "DZ" - AS = "AS" - AD = "AD" - AO = "AO" - AI = "AI" - AQ = "AQ" - AG = "AG" - AR = "AR" - AM = "AM" - AW = "AW" - AU = "AU" - AT = "AT" - AZ = "AZ" - BS = "BS" - BH = "BH" - BD = "BD" - BB = "BB" - BY = "BY" - BE = "BE" - BZ = "BZ" - BJ = "BJ" - BM = "BM" - BT = "BT" - BO = "BO" - BA = "BA" - BW = "BW" - BV = "BV" - BR = "BR" - IO = "IO" - BN = "BN" - BG = "BG" - BF = "BF" - BI = "BI" - KH = "KH" - CM = "CM" - CA = "CA" - CV = "CV" - KY = "KY" - CF = "CF" - TD = "TD" - CL = "CL" - CN = "CN" - CX = "CX" - CC = "CC" - CO = "CO" - KM = "KM" - CG = "CG" - CD = "CD" - CK = "CK" - CR = "CR" - CI = "CI" - HR = "HR" - CU = "CU" - CY = "CY" - CZ = "CZ" - DK = "DK" - DJ = "DJ" - DM = "DM" - DO = "DO" - EC = "EC" - EG = "EG" - SV = "SV" - GQ = "GQ" - ER = "ER" - EE = "EE" - ET = "ET" - FK = "FK" - FO = "FO" - FJ = "FJ" - FI = "FI" - FR = "FR" - GF = "GF" - PF = "PF" - TF = "TF" - GA = "GA" - GM = "GM" - GE = "GE" - DE = "DE" - GH = "GH" - GI = "GI" - GR = "GR" - GL = "GL" - GD = "GD" - GP = "GP" - GU = "GU" - GT = "GT" - GN = "GN" - GW = "GW" - GY = "GY" - HT = "HT" - HM = "HM" - VA = "VA" - HN = "HN" - HK = "HK" - HU = "HU" - IS = "IS" - IN = "IN" - ID = "ID" - IR = "IR" - IQ = "IQ" - IE = "IE" - IL = "IL" - IT = "IT" - JM = "JM" - JP = "JP" - JO = "JO" - KZ = "KZ" - KE = "KE" - KI = "KI" - KP = "KP" - KR = "KR" - KW = "KW" - KG = "KG" - LA = "LA" - LV = "LV" - LB = "LB" - LS = "LS" - LR = "LR" - LY = "LY" - LI = "LI" - LT = "LT" - LU = "LU" - MO = "MO" - MG = "MG" - MW = "MW" - MY = "MY" - MV = "MV" - ML = "ML" - MT = "MT" - MH = "MH" - MQ = "MQ" - MR = "MR" - MU = "MU" - YT = "YT" - MX = "MX" - FM = "FM" - MD = "MD" - MC = "MC" - MN = "MN" - MS = "MS" - MA = "MA" - MZ = "MZ" - MM = "MM" - NA = "NA" - NR = "NR" - NP = "NP" - NL = "NL" - NC = "NC" - NZ = "NZ" - NI = "NI" - NE = "NE" - NG = "NG" - NU = "NU" - NF = "NF" - MK = "MK" - MP = "MP" - NO = "NO" - OM = "OM" - PK = "PK" - PW = "PW" - PS = "PS" - PA = "PA" - PG = "PG" - PY = "PY" - PE = "PE" - PH = "PH" - PN = "PN" - PL = "PL" - PT = "PT" - PR = "PR" - QA = "QA" - RE = "RE" - RO = "RO" - RU = "RU" - RW = "RW" - SH = "SH" - KN = "KN" - LC = "LC" - PM = "PM" - VC = "VC" - WS = "WS" - SM = "SM" - ST = "ST" - SA = "SA" - SN = "SN" - SC = "SC" - SL = "SL" - SG = "SG" - SK = "SK" - SI = "SI" - SB = "SB" - SO = "SO" - ZA = "ZA" - GS = "GS" - ES = "ES" - LK = "LK" - SD = "SD" - SR = "SR" - SJ = "SJ" - SZ = "SZ" - SE = "SE" - CH = "CH" - SY = "SY" - TW = "TW" - TJ = "TJ" - TZ = "TZ" - TH = "TH" - TL = "TL" - TG = "TG" - TK = "TK" - TO = "TO" - TT = "TT" - TN = "TN" - TR = "TR" - TM = "TM" - TC = "TC" - TV = "TV" - UG = "UG" - UA = "UA" - AE = "AE" - GB = "GB" - US = "US" - UM = "UM" - UY = "UY" - UZ = "UZ" - VU = "VU" - VE = "VE" - VN = "VN" - VG = "VG" - VI = "VI" - WF = "WF" - EH = "EH" - YE = "YE" - ZM = "ZM" - ZW = "ZW" - AX = "AX" - BQ = "BQ" - CW = "CW" - GG = "GG" - IM = "IM" - JE = "JE" - ME = "ME" - BL = "BL" - MF = "MF" - RS = "RS" - SX = "SX" - SS = "SS" - XK = "XK" - -class ClicksCountriesTypedDict(TypedDict): - country: Country - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - clicks: float - r"""The number of clicks from this country""" - - -class ClicksCountries(BaseModel): - country: Country - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - clicks: float - r"""The number of clicks from this country""" - diff --git a/src/dub/models/components/clicksdevices.py b/src/dub/models/components/clicksdevices.py deleted file mode 100644 index 1d672dd..0000000 --- a/src/dub/models/components/clicksdevices.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksDevicesTypedDict(TypedDict): - device: str - r"""The name of the device""" - clicks: float - r"""The number of clicks from this device""" - - -class ClicksDevices(BaseModel): - device: str - r"""The name of the device""" - clicks: float - r"""The number of clicks from this device""" - diff --git a/src/dub/models/components/clicksos.py b/src/dub/models/components/clicksos.py deleted file mode 100644 index 7476b16..0000000 --- a/src/dub/models/components/clicksos.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksOSTypedDict(TypedDict): - os: str - r"""The name of the OS""" - clicks: float - r"""The number of clicks from this OS""" - - -class ClicksOS(BaseModel): - os: str - r"""The name of the OS""" - clicks: float - r"""The number of clicks from this OS""" - diff --git a/src/dub/models/components/clicksreferers.py b/src/dub/models/components/clicksreferers.py deleted file mode 100644 index e2f66cf..0000000 --- a/src/dub/models/components/clicksreferers.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksReferersTypedDict(TypedDict): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - clicks: float - r"""The number of clicks from this referer""" - - -class ClicksReferers(BaseModel): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - clicks: float - r"""The number of clicks from this referer""" - diff --git a/src/dub/models/components/clickstimeseries.py b/src/dub/models/components/clickstimeseries.py deleted file mode 100644 index 4b1b48a..0000000 --- a/src/dub/models/components/clickstimeseries.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksTimeseriesTypedDict(TypedDict): - start: str - r"""The starting timestamp of the interval""" - clicks: float - r"""The number of clicks in the interval""" - - -class ClicksTimeseries(BaseModel): - start: str - r"""The starting timestamp of the interval""" - clicks: float - r"""The number of clicks in the interval""" - diff --git a/src/dub/models/components/clickstoplinks.py b/src/dub/models/components/clickstoplinks.py deleted file mode 100644 index 820dda5..0000000 --- a/src/dub/models/components/clickstoplinks.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -import pydantic -from typing import TypedDict -from typing_extensions import Annotated - - -class ClicksTopLinksTypedDict(TypedDict): - link: str - r"""The unique ID of the short link""" - id: str - r"""The unique ID of the short link""" - domain: str - r"""The domain of the short link""" - key: str - r"""The key of the short link""" - short_link: str - r"""The short link URL""" - url: str - r"""The destination URL of the short link""" - created_at: str - r"""The creation timestamp of the short link""" - clicks: float - r"""The number of clicks from this link""" - - -class ClicksTopLinks(BaseModel): - link: Annotated[str, pydantic.Field(deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.")] - r"""The unique ID of the short link""" - id: str - r"""The unique ID of the short link""" - domain: str - r"""The domain of the short link""" - key: str - r"""The key of the short link""" - short_link: Annotated[str, pydantic.Field(alias="shortLink")] - r"""The short link URL""" - url: str - r"""The destination URL of the short link""" - created_at: Annotated[str, pydantic.Field(alias="createdAt")] - r"""The creation timestamp of the short link""" - clicks: float - r"""The number of clicks from this link""" - diff --git a/src/dub/models/components/clickstopurls.py b/src/dub/models/components/clickstopurls.py deleted file mode 100644 index 0879003..0000000 --- a/src/dub/models/components/clickstopurls.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class ClicksTopUrlsTypedDict(TypedDict): - url: str - r"""The destination URL""" - clicks: float - r"""The number of clicks from this URL""" - - -class ClicksTopUrls(BaseModel): - url: str - r"""The destination URL""" - clicks: float - r"""The number of clicks from this URL""" - diff --git a/src/dub/models/components/leadevent.py b/src/dub/models/components/leadevent.py new file mode 100644 index 0000000..1d423da --- /dev/null +++ b/src/dub/models/components/leadevent.py @@ -0,0 +1,86 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +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 + + +class LeadEventEvent(str, Enum): + LEAD = "lead" + +class LeadEventTypedDict(TypedDict): + timestamp: str + event_id: str + event_name: str + customer_name: str + customer_email: str + customer_avatar: str + click_id: str + link_id: str + domain: str + key: str + url: str + continent: Nullable[str] + country: Nullable[str] + city: Nullable[str] + device: Nullable[str] + browser: Nullable[str] + os: Nullable[str] + referer: Nullable[str] + qr: Nullable[float] + ip: Nullable[str] + event: NotRequired[LeadEventEvent] + + +class LeadEvent(BaseModel): + timestamp: str + event_id: str + event_name: str + customer_name: str + customer_email: str + customer_avatar: str + click_id: str + link_id: str + domain: str + key: str + url: str + continent: Nullable[str] + country: Nullable[str] + city: Nullable[str] + device: Nullable[str] + browser: Nullable[str] + os: Nullable[str] + 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"] + nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "qr", "ip"] + 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 + diff --git a/src/dub/models/components/leadsbrowsers.py b/src/dub/models/components/leadsbrowsers.py deleted file mode 100644 index 5a027fb..0000000 --- a/src/dub/models/components/leadsbrowsers.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsBrowsersTypedDict(TypedDict): - browser: str - r"""The name of the browser""" - leads: float - r"""The number of leads from this browser""" - - -class LeadsBrowsers(BaseModel): - browser: str - r"""The name of the browser""" - leads: float - r"""The number of leads from this browser""" - diff --git a/src/dub/models/components/leadscities.py b/src/dub/models/components/leadscities.py deleted file mode 100644 index 0d808a0..0000000 --- a/src/dub/models/components/leadscities.py +++ /dev/null @@ -1,278 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from enum import Enum -from typing import TypedDict - - -class LeadsCitiesCountry(str, Enum): - r"""The 2-letter country code of the city: https://d.to/geo""" - AF = "AF" - AL = "AL" - DZ = "DZ" - AS = "AS" - AD = "AD" - AO = "AO" - AI = "AI" - AQ = "AQ" - AG = "AG" - AR = "AR" - AM = "AM" - AW = "AW" - AU = "AU" - AT = "AT" - AZ = "AZ" - BS = "BS" - BH = "BH" - BD = "BD" - BB = "BB" - BY = "BY" - BE = "BE" - BZ = "BZ" - BJ = "BJ" - BM = "BM" - BT = "BT" - BO = "BO" - BA = "BA" - BW = "BW" - BV = "BV" - BR = "BR" - IO = "IO" - BN = "BN" - BG = "BG" - BF = "BF" - BI = "BI" - KH = "KH" - CM = "CM" - CA = "CA" - CV = "CV" - KY = "KY" - CF = "CF" - TD = "TD" - CL = "CL" - CN = "CN" - CX = "CX" - CC = "CC" - CO = "CO" - KM = "KM" - CG = "CG" - CD = "CD" - CK = "CK" - CR = "CR" - CI = "CI" - HR = "HR" - CU = "CU" - CY = "CY" - CZ = "CZ" - DK = "DK" - DJ = "DJ" - DM = "DM" - DO = "DO" - EC = "EC" - EG = "EG" - SV = "SV" - GQ = "GQ" - ER = "ER" - EE = "EE" - ET = "ET" - FK = "FK" - FO = "FO" - FJ = "FJ" - FI = "FI" - FR = "FR" - GF = "GF" - PF = "PF" - TF = "TF" - GA = "GA" - GM = "GM" - GE = "GE" - DE = "DE" - GH = "GH" - GI = "GI" - GR = "GR" - GL = "GL" - GD = "GD" - GP = "GP" - GU = "GU" - GT = "GT" - GN = "GN" - GW = "GW" - GY = "GY" - HT = "HT" - HM = "HM" - VA = "VA" - HN = "HN" - HK = "HK" - HU = "HU" - IS = "IS" - IN = "IN" - ID = "ID" - IR = "IR" - IQ = "IQ" - IE = "IE" - IL = "IL" - IT = "IT" - JM = "JM" - JP = "JP" - JO = "JO" - KZ = "KZ" - KE = "KE" - KI = "KI" - KP = "KP" - KR = "KR" - KW = "KW" - KG = "KG" - LA = "LA" - LV = "LV" - LB = "LB" - LS = "LS" - LR = "LR" - LY = "LY" - LI = "LI" - LT = "LT" - LU = "LU" - MO = "MO" - MG = "MG" - MW = "MW" - MY = "MY" - MV = "MV" - ML = "ML" - MT = "MT" - MH = "MH" - MQ = "MQ" - MR = "MR" - MU = "MU" - YT = "YT" - MX = "MX" - FM = "FM" - MD = "MD" - MC = "MC" - MN = "MN" - MS = "MS" - MA = "MA" - MZ = "MZ" - MM = "MM" - NA = "NA" - NR = "NR" - NP = "NP" - NL = "NL" - NC = "NC" - NZ = "NZ" - NI = "NI" - NE = "NE" - NG = "NG" - NU = "NU" - NF = "NF" - MK = "MK" - MP = "MP" - NO = "NO" - OM = "OM" - PK = "PK" - PW = "PW" - PS = "PS" - PA = "PA" - PG = "PG" - PY = "PY" - PE = "PE" - PH = "PH" - PN = "PN" - PL = "PL" - PT = "PT" - PR = "PR" - QA = "QA" - RE = "RE" - RO = "RO" - RU = "RU" - RW = "RW" - SH = "SH" - KN = "KN" - LC = "LC" - PM = "PM" - VC = "VC" - WS = "WS" - SM = "SM" - ST = "ST" - SA = "SA" - SN = "SN" - SC = "SC" - SL = "SL" - SG = "SG" - SK = "SK" - SI = "SI" - SB = "SB" - SO = "SO" - ZA = "ZA" - GS = "GS" - ES = "ES" - LK = "LK" - SD = "SD" - SR = "SR" - SJ = "SJ" - SZ = "SZ" - SE = "SE" - CH = "CH" - SY = "SY" - TW = "TW" - TJ = "TJ" - TZ = "TZ" - TH = "TH" - TL = "TL" - TG = "TG" - TK = "TK" - TO = "TO" - TT = "TT" - TN = "TN" - TR = "TR" - TM = "TM" - TC = "TC" - TV = "TV" - UG = "UG" - UA = "UA" - AE = "AE" - GB = "GB" - US = "US" - UM = "UM" - UY = "UY" - UZ = "UZ" - VU = "VU" - VE = "VE" - VN = "VN" - VG = "VG" - VI = "VI" - WF = "WF" - EH = "EH" - YE = "YE" - ZM = "ZM" - ZW = "ZW" - AX = "AX" - BQ = "BQ" - CW = "CW" - GG = "GG" - IM = "IM" - JE = "JE" - ME = "ME" - BL = "BL" - MF = "MF" - RS = "RS" - SX = "SX" - SS = "SS" - XK = "XK" - -class LeadsCitiesTypedDict(TypedDict): - city: str - r"""The name of the city""" - country: LeadsCitiesCountry - r"""The 2-letter country code of the city: https://d.to/geo""" - leads: float - r"""The number of leads from this city""" - - -class LeadsCities(BaseModel): - city: str - r"""The name of the city""" - country: LeadsCitiesCountry - r"""The 2-letter country code of the city: https://d.to/geo""" - leads: float - r"""The number of leads from this city""" - diff --git a/src/dub/models/components/leadscount.py b/src/dub/models/components/leadscount.py deleted file mode 100644 index cd8cf13..0000000 --- a/src/dub/models/components/leadscount.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsCountTypedDict(TypedDict): - leads: float - r"""The total number of leads""" - - -class LeadsCount(BaseModel): - leads: float - r"""The total number of leads""" - diff --git a/src/dub/models/components/leadscountries.py b/src/dub/models/components/leadscountries.py deleted file mode 100644 index 65f5883..0000000 --- a/src/dub/models/components/leadscountries.py +++ /dev/null @@ -1,274 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from enum import Enum -from typing import TypedDict - - -class LeadsCountriesCountry(str, Enum): - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - AF = "AF" - AL = "AL" - DZ = "DZ" - AS = "AS" - AD = "AD" - AO = "AO" - AI = "AI" - AQ = "AQ" - AG = "AG" - AR = "AR" - AM = "AM" - AW = "AW" - AU = "AU" - AT = "AT" - AZ = "AZ" - BS = "BS" - BH = "BH" - BD = "BD" - BB = "BB" - BY = "BY" - BE = "BE" - BZ = "BZ" - BJ = "BJ" - BM = "BM" - BT = "BT" - BO = "BO" - BA = "BA" - BW = "BW" - BV = "BV" - BR = "BR" - IO = "IO" - BN = "BN" - BG = "BG" - BF = "BF" - BI = "BI" - KH = "KH" - CM = "CM" - CA = "CA" - CV = "CV" - KY = "KY" - CF = "CF" - TD = "TD" - CL = "CL" - CN = "CN" - CX = "CX" - CC = "CC" - CO = "CO" - KM = "KM" - CG = "CG" - CD = "CD" - CK = "CK" - CR = "CR" - CI = "CI" - HR = "HR" - CU = "CU" - CY = "CY" - CZ = "CZ" - DK = "DK" - DJ = "DJ" - DM = "DM" - DO = "DO" - EC = "EC" - EG = "EG" - SV = "SV" - GQ = "GQ" - ER = "ER" - EE = "EE" - ET = "ET" - FK = "FK" - FO = "FO" - FJ = "FJ" - FI = "FI" - FR = "FR" - GF = "GF" - PF = "PF" - TF = "TF" - GA = "GA" - GM = "GM" - GE = "GE" - DE = "DE" - GH = "GH" - GI = "GI" - GR = "GR" - GL = "GL" - GD = "GD" - GP = "GP" - GU = "GU" - GT = "GT" - GN = "GN" - GW = "GW" - GY = "GY" - HT = "HT" - HM = "HM" - VA = "VA" - HN = "HN" - HK = "HK" - HU = "HU" - IS = "IS" - IN = "IN" - ID = "ID" - IR = "IR" - IQ = "IQ" - IE = "IE" - IL = "IL" - IT = "IT" - JM = "JM" - JP = "JP" - JO = "JO" - KZ = "KZ" - KE = "KE" - KI = "KI" - KP = "KP" - KR = "KR" - KW = "KW" - KG = "KG" - LA = "LA" - LV = "LV" - LB = "LB" - LS = "LS" - LR = "LR" - LY = "LY" - LI = "LI" - LT = "LT" - LU = "LU" - MO = "MO" - MG = "MG" - MW = "MW" - MY = "MY" - MV = "MV" - ML = "ML" - MT = "MT" - MH = "MH" - MQ = "MQ" - MR = "MR" - MU = "MU" - YT = "YT" - MX = "MX" - FM = "FM" - MD = "MD" - MC = "MC" - MN = "MN" - MS = "MS" - MA = "MA" - MZ = "MZ" - MM = "MM" - NA = "NA" - NR = "NR" - NP = "NP" - NL = "NL" - NC = "NC" - NZ = "NZ" - NI = "NI" - NE = "NE" - NG = "NG" - NU = "NU" - NF = "NF" - MK = "MK" - MP = "MP" - NO = "NO" - OM = "OM" - PK = "PK" - PW = "PW" - PS = "PS" - PA = "PA" - PG = "PG" - PY = "PY" - PE = "PE" - PH = "PH" - PN = "PN" - PL = "PL" - PT = "PT" - PR = "PR" - QA = "QA" - RE = "RE" - RO = "RO" - RU = "RU" - RW = "RW" - SH = "SH" - KN = "KN" - LC = "LC" - PM = "PM" - VC = "VC" - WS = "WS" - SM = "SM" - ST = "ST" - SA = "SA" - SN = "SN" - SC = "SC" - SL = "SL" - SG = "SG" - SK = "SK" - SI = "SI" - SB = "SB" - SO = "SO" - ZA = "ZA" - GS = "GS" - ES = "ES" - LK = "LK" - SD = "SD" - SR = "SR" - SJ = "SJ" - SZ = "SZ" - SE = "SE" - CH = "CH" - SY = "SY" - TW = "TW" - TJ = "TJ" - TZ = "TZ" - TH = "TH" - TL = "TL" - TG = "TG" - TK = "TK" - TO = "TO" - TT = "TT" - TN = "TN" - TR = "TR" - TM = "TM" - TC = "TC" - TV = "TV" - UG = "UG" - UA = "UA" - AE = "AE" - GB = "GB" - US = "US" - UM = "UM" - UY = "UY" - UZ = "UZ" - VU = "VU" - VE = "VE" - VN = "VN" - VG = "VG" - VI = "VI" - WF = "WF" - EH = "EH" - YE = "YE" - ZM = "ZM" - ZW = "ZW" - AX = "AX" - BQ = "BQ" - CW = "CW" - GG = "GG" - IM = "IM" - JE = "JE" - ME = "ME" - BL = "BL" - MF = "MF" - RS = "RS" - SX = "SX" - SS = "SS" - XK = "XK" - -class LeadsCountriesTypedDict(TypedDict): - country: LeadsCountriesCountry - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - leads: float - r"""The number of leads from this country""" - - -class LeadsCountries(BaseModel): - country: LeadsCountriesCountry - r"""The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo""" - leads: float - r"""The number of leads from this country""" - diff --git a/src/dub/models/components/leadsdevices.py b/src/dub/models/components/leadsdevices.py deleted file mode 100644 index 1b31ef7..0000000 --- a/src/dub/models/components/leadsdevices.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsDevicesTypedDict(TypedDict): - device: str - r"""The name of the device""" - leads: float - r"""The number of leads from this device""" - - -class LeadsDevices(BaseModel): - device: str - r"""The name of the device""" - leads: float - r"""The number of leads from this device""" - diff --git a/src/dub/models/components/leadsos.py b/src/dub/models/components/leadsos.py deleted file mode 100644 index ac0f8f7..0000000 --- a/src/dub/models/components/leadsos.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsOSTypedDict(TypedDict): - os: str - r"""The name of the OS""" - leads: float - r"""The number of leads from this OS""" - - -class LeadsOS(BaseModel): - os: str - r"""The name of the OS""" - leads: float - r"""The number of leads from this OS""" - diff --git a/src/dub/models/components/leadsreferers.py b/src/dub/models/components/leadsreferers.py deleted file mode 100644 index 8d4597a..0000000 --- a/src/dub/models/components/leadsreferers.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsReferersTypedDict(TypedDict): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - leads: float - r"""The number of leads from this referer""" - - -class LeadsReferers(BaseModel): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - leads: float - r"""The number of leads from this referer""" - diff --git a/src/dub/models/components/leadstimeseries.py b/src/dub/models/components/leadstimeseries.py deleted file mode 100644 index dc05977..0000000 --- a/src/dub/models/components/leadstimeseries.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsTimeseriesTypedDict(TypedDict): - start: str - r"""The starting timestamp of the interval""" - leads: float - r"""The number of leads in the interval""" - - -class LeadsTimeseries(BaseModel): - start: str - r"""The starting timestamp of the interval""" - leads: float - r"""The number of leads in the interval""" - diff --git a/src/dub/models/components/leadstoplinks.py b/src/dub/models/components/leadstoplinks.py deleted file mode 100644 index 78fb958..0000000 --- a/src/dub/models/components/leadstoplinks.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -import pydantic -from typing import TypedDict -from typing_extensions import Annotated - - -class LeadsTopLinksTypedDict(TypedDict): - link: str - r"""The unique ID of the short link""" - id: str - r"""The unique ID of the short link""" - domain: str - r"""The domain of the short link""" - key: str - r"""The key of the short link""" - short_link: str - r"""The short link URL""" - url: str - r"""The destination URL of the short link""" - created_at: str - r"""The creation timestamp of the short link""" - leads: float - r"""The number of leads from this link""" - - -class LeadsTopLinks(BaseModel): - link: Annotated[str, pydantic.Field(deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.")] - r"""The unique ID of the short link""" - id: str - r"""The unique ID of the short link""" - domain: str - r"""The domain of the short link""" - key: str - r"""The key of the short link""" - short_link: Annotated[str, pydantic.Field(alias="shortLink")] - r"""The short link URL""" - url: str - r"""The destination URL of the short link""" - created_at: Annotated[str, pydantic.Field(alias="createdAt")] - r"""The creation timestamp of the short link""" - leads: float - r"""The number of leads from this link""" - diff --git a/src/dub/models/components/leadstopurls.py b/src/dub/models/components/leadstopurls.py deleted file mode 100644 index 60967c7..0000000 --- a/src/dub/models/components/leadstopurls.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class LeadsTopUrlsTypedDict(TypedDict): - url: str - r"""The destination URL""" - leads: float - r"""The number of leads from this URL""" - - -class LeadsTopUrls(BaseModel): - url: str - r"""The destination URL""" - leads: float - r"""The number of leads from this URL""" - diff --git a/src/dub/models/components/saleevent.py b/src/dub/models/components/saleevent.py new file mode 100644 index 0000000..2cfd962 --- /dev/null +++ b/src/dub/models/components/saleevent.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dub.types import BaseModel, Nullable, UNSET_SENTINEL +from enum import Enum +import pydantic +from pydantic import model_serializer +from typing import Optional, TypedDict +from typing_extensions import Annotated, NotRequired + + +class SaleEventEvent(str, Enum): + SALE = "sale" + +class SaleEventTypedDict(TypedDict): + timestamp: str + event_id: str + event_name: str + customer_name: str + customer_email: str + customer_avatar: str + payment_processor: str + invoice_id: str + sale_amount: float + click_id: str + link_id: str + domain: str + key: str + url: str + continent: Nullable[str] + country: Nullable[str] + city: Nullable[str] + device: Nullable[str] + browser: Nullable[str] + os: Nullable[str] + referer: Nullable[str] + qr: Nullable[float] + ip: Nullable[str] + event: NotRequired[SaleEventEvent] + + +class SaleEvent(BaseModel): + timestamp: str + event_id: str + event_name: str + customer_name: str + customer_email: str + customer_avatar: str + payment_processor: str + invoice_id: str + sale_amount: Annotated[float, pydantic.Field(alias="saleAmount")] + click_id: str + link_id: str + domain: str + key: str + url: str + continent: Nullable[str] + country: Nullable[str] + city: Nullable[str] + device: Nullable[str] + browser: Nullable[str] + os: Nullable[str] + 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"] + nullable_fields = ["continent", "country", "city", "device", "browser", "os", "referer", "qr", "ip"] + 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 + diff --git a/src/dub/models/components/salesbrowsers.py b/src/dub/models/components/salesbrowsers.py deleted file mode 100644 index 9718bac..0000000 --- a/src/dub/models/components/salesbrowsers.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesBrowsersTypedDict(TypedDict): - browser: str - r"""The name of the browser""" - sales: float - r"""The number of sales from this browser""" - amount: float - r"""The total amount of sales from this browser""" - - -class SalesBrowsers(BaseModel): - browser: str - r"""The name of the browser""" - sales: float - r"""The number of sales from this browser""" - amount: float - r"""The total amount of sales from this browser""" - diff --git a/src/dub/models/components/salescount.py b/src/dub/models/components/salescount.py deleted file mode 100644 index 8ca0abb..0000000 --- a/src/dub/models/components/salescount.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesCountTypedDict(TypedDict): - sales: float - r"""The total number of sales""" - amount: float - r"""The total amount of sales""" - - -class SalesCount(BaseModel): - sales: float - r"""The total number of sales""" - amount: float - r"""The total amount of sales""" - diff --git a/src/dub/models/components/salesdevices.py b/src/dub/models/components/salesdevices.py deleted file mode 100644 index acb4b6a..0000000 --- a/src/dub/models/components/salesdevices.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesDevicesTypedDict(TypedDict): - device: str - r"""The name of the device""" - sales: float - r"""The number of sales from this device""" - amount: float - r"""The total amount of sales from this device""" - - -class SalesDevices(BaseModel): - device: str - r"""The name of the device""" - sales: float - r"""The number of sales from this device""" - amount: float - r"""The total amount of sales from this device""" - diff --git a/src/dub/models/components/salesos.py b/src/dub/models/components/salesos.py deleted file mode 100644 index ece781b..0000000 --- a/src/dub/models/components/salesos.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesOSTypedDict(TypedDict): - os: str - r"""The name of the OS""" - sales: float - r"""The number of sales from this OS""" - amount: float - r"""The total amount of sales from this OS""" - - -class SalesOS(BaseModel): - os: str - r"""The name of the OS""" - sales: float - r"""The number of sales from this OS""" - amount: float - r"""The total amount of sales from this OS""" - diff --git a/src/dub/models/components/salesreferers.py b/src/dub/models/components/salesreferers.py deleted file mode 100644 index 4eff1b9..0000000 --- a/src/dub/models/components/salesreferers.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesReferersTypedDict(TypedDict): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - sales: float - r"""The number of sales from this referer""" - amount: float - r"""The total amount of sales from this referer""" - - -class SalesReferers(BaseModel): - referer: str - r"""The name of the referer. If unknown, this will be `(direct)`""" - sales: float - r"""The number of sales from this referer""" - amount: float - r"""The total amount of sales from this referer""" - diff --git a/src/dub/models/components/salestimeseries.py b/src/dub/models/components/salestimeseries.py deleted file mode 100644 index 231e513..0000000 --- a/src/dub/models/components/salestimeseries.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesTimeseriesTypedDict(TypedDict): - start: str - r"""The starting timestamp of the interval""" - sales: float - r"""The number of sales in the interval""" - amount: float - r"""The total amount of sales in the interval""" - - -class SalesTimeseries(BaseModel): - start: str - r"""The starting timestamp of the interval""" - sales: float - r"""The number of sales in the interval""" - amount: float - r"""The total amount of sales in the interval""" - diff --git a/src/dub/models/components/salestopurls.py b/src/dub/models/components/salestopurls.py deleted file mode 100644 index aced76a..0000000 --- a/src/dub/models/components/salestopurls.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from dub.types import BaseModel -from typing import TypedDict - - -class SalesTopUrlsTypedDict(TypedDict): - url: str - r"""The destination URL""" - sales: float - r"""The number of sales from this URL""" - amount: float - r"""The total amount of sales from this URL""" - - -class SalesTopUrls(BaseModel): - url: str - r"""The destination URL""" - sales: float - r"""The number of sales from this URL""" - amount: float - r"""The total amount of sales from this URL""" - diff --git a/src/dub/models/operations/__init__.py b/src/dub/models/operations/__init__.py index 4387f87..4bff3cb 100644 --- a/src/dub/models/operations/__init__.py +++ b/src/dub/models/operations/__init__.py @@ -14,15 +14,15 @@ from .getqrcode import GetQRCodeRequest, GetQRCodeRequestTypedDict, Level from .getworkspace import GetWorkspaceRequest, GetWorkspaceRequestTypedDict from .listdomains import ListDomainsRequest, ListDomainsRequestTypedDict, ListDomainsResponse, ListDomainsResponseTypedDict -from .listevents import ListEventsRequest, ListEventsRequestTypedDict, Order, QueryParamEvent, QueryParamInterval, SortBy +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 TrackLeadRequestBody, TrackLeadRequestBodyTypedDict, TrackLeadResponseBody, TrackLeadResponseBodyTypedDict -from .tracksale import PaymentProcessor, TrackSaleRequestBody, TrackSaleRequestBodyTypedDict, TrackSaleResponseBody, TrackSaleResponseBodyTypedDict +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 .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", "Color", "CreateDomainRequestBody", "CreateDomainRequestBodyTypedDict", "CreateLinkRequestBody", "CreateLinkRequestBodyTypedDict", "CreateTagRequestBody", "CreateTagRequestBodyTypedDict", "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", "One", "Order", "PaymentProcessor", "QueryParamEvent", "QueryParamGroupBy", "QueryParamInterval", "QueryParamTagIds", "QueryParamTagIdsTypedDict", "QueryParamTagNames", "QueryParamTagNamesTypedDict", "RequestBody", "RequestBodyTypedDict", "RetrieveAnalyticsRequest", "RetrieveAnalyticsRequestTypedDict", "RetrieveAnalyticsResponseBody", "RetrieveAnalyticsResponseBodyTypedDict", "Sort", "SortBy", "TagIds", "TagIdsTypedDict", "TagNames", "TagNamesTypedDict", "Three", "TrackCustomerRequestBody", "TrackCustomerRequestBodyTypedDict", "TrackCustomerResponseBody", "TrackCustomerResponseBodyTypedDict", "TrackLeadRequestBody", "TrackLeadRequestBodyTypedDict", "TrackLeadResponseBody", "TrackLeadResponseBodyTypedDict", "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", "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"] diff --git a/src/dub/models/operations/listevents.py b/src/dub/models/operations/listevents.py index f4099ed..f5597f3 100644 --- a/src/dub/models/operations/listevents.py +++ b/src/dub/models/operations/listevents.py @@ -1,12 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from dub.models.components import continentcode as components_continentcode, countrycode as components_countrycode +from dub.models.components import clickevent as components_clickevent, continentcode as components_continentcode, countrycode as components_countrycode, leadevent as components_leadevent, saleevent as components_saleevent from dub.types import BaseModel from dub.utils import FieldMetadata, QueryParamMetadata from enum import Enum import pydantic -from typing import Optional, TypedDict +from typing import List, Optional, TypedDict, Union from typing_extensions import Annotated, NotRequired @@ -34,7 +34,6 @@ class Order(str, Enum): class SortBy(str, Enum): TIMESTAMP = "timestamp" - AMOUNT = "amount" class ListEventsRequestTypedDict(TypedDict): event: NotRequired[QueryParamEvent] @@ -129,3 +128,11 @@ class ListEventsRequest(BaseModel): order: Annotated[Optional[Order], FieldMetadata(query=QueryParamMetadata(style="form", explode=True))] = Order.DESC sort_by: Annotated[Optional[SortBy], pydantic.Field(alias="sortBy"), FieldMetadata(query=QueryParamMetadata(style="form", explode=True))] = SortBy.TIMESTAMP + +ListEventsResponseBodyTypedDict = Union[List[components_clickevent.ClickEventTypedDict], List[components_leadevent.LeadEventTypedDict], List[components_saleevent.SaleEventTypedDict]] +r"""A list of events""" + + +ListEventsResponseBody = Union[List[components_clickevent.ClickEvent], List[components_leadevent.LeadEvent], List[components_saleevent.SaleEvent]] +r"""A list of events""" + diff --git a/src/dub/models/operations/retrieveanalytics.py b/src/dub/models/operations/retrieveanalytics.py index 72abb6e..207a2f8 100644 --- a/src/dub/models/operations/retrieveanalytics.py +++ b/src/dub/models/operations/retrieveanalytics.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from dub.models.components import clicksbrowsers as components_clicksbrowsers, clickscities as components_clickscities, clickscount as components_clickscount, clickscountries as components_clickscountries, clicksdevices as components_clicksdevices, clicksos as components_clicksos, clicksreferers as components_clicksreferers, clickstimeseries as components_clickstimeseries, clickstoplinks as components_clickstoplinks, clickstopurls as components_clickstopurls, continentcode as components_continentcode, countrycode as components_countrycode, leadsbrowsers as components_leadsbrowsers, leadscities as components_leadscities, leadscount as components_leadscount, leadscountries as components_leadscountries, leadsdevices as components_leadsdevices, leadsos as components_leadsos, leadsreferers as components_leadsreferers, leadstimeseries as components_leadstimeseries, leadstoplinks as components_leadstoplinks, leadstopurls as components_leadstopurls, salesbrowsers as components_salesbrowsers, salescities as components_salescities, salescount as components_salescount, salescountries as components_salescountries, salesdevices as components_salesdevices, salesos as components_salesos, salesreferers as components_salesreferers, salestimeseries as components_salestimeseries, salestoplinks as components_salestoplinks, salestopurls as components_salestopurls +from dub.models.components import analyticsbrowsers as components_analyticsbrowsers, analyticscities as components_analyticscities, analyticscount as components_analyticscount, analyticscountries as components_analyticscountries, analyticsdevices as components_analyticsdevices, analyticsos as components_analyticsos, analyticsreferers as components_analyticsreferers, analyticstimeseries as components_analyticstimeseries, analyticstoplinks as components_analyticstoplinks, analyticstopurls as components_analyticstopurls, continentcode as components_continentcode, countrycode as components_countrycode from dub.types import BaseModel from dub.utils import FieldMetadata, QueryParamMetadata from enum import Enum @@ -133,10 +133,10 @@ class RetrieveAnalyticsRequest(BaseModel): r"""Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.""" -RetrieveAnalyticsResponseBodyTypedDict = Union[components_leadscount.LeadsCountTypedDict, components_clickscount.ClicksCountTypedDict, components_salescount.SalesCountTypedDict, List[components_leadsdevices.LeadsDevicesTypedDict], List[components_leadsos.LeadsOSTypedDict], List[components_clicksbrowsers.ClicksBrowsersTypedDict], List[components_clicksos.ClicksOSTypedDict], List[components_clicksreferers.ClicksReferersTypedDict], List[components_clickstoplinks.ClicksTopLinksTypedDict], List[components_clickstopurls.ClicksTopUrlsTypedDict], List[components_clickscities.ClicksCitiesTypedDict], List[components_leadstimeseries.LeadsTimeseriesTypedDict], List[components_leadscountries.LeadsCountriesTypedDict], List[components_leadscities.LeadsCitiesTypedDict], List[components_clickscountries.ClicksCountriesTypedDict], List[components_leadsbrowsers.LeadsBrowsersTypedDict], List[components_clicksdevices.ClicksDevicesTypedDict], List[components_leadsreferers.LeadsReferersTypedDict], List[components_leadstoplinks.LeadsTopLinksTypedDict], List[components_leadstopurls.LeadsTopUrlsTypedDict], List[components_clickstimeseries.ClicksTimeseriesTypedDict], List[components_salestimeseries.SalesTimeseriesTypedDict], List[components_salescountries.SalesCountriesTypedDict], List[components_salescities.SalesCitiesTypedDict], List[components_salesdevices.SalesDevicesTypedDict], List[components_salesbrowsers.SalesBrowsersTypedDict], List[components_salesos.SalesOSTypedDict], List[components_salesreferers.SalesReferersTypedDict], List[components_salestoplinks.SalesTopLinksTypedDict], List[components_salestopurls.SalesTopUrlsTypedDict]] +RetrieveAnalyticsResponseBodyTypedDict = Union[components_analyticscount.AnalyticsCountTypedDict, List[components_analyticstimeseries.AnalyticsTimeseriesTypedDict], List[components_analyticscountries.AnalyticsCountriesTypedDict], List[components_analyticscities.AnalyticsCitiesTypedDict], List[components_analyticsdevices.AnalyticsDevicesTypedDict], List[components_analyticsbrowsers.AnalyticsBrowsersTypedDict], List[components_analyticsos.AnalyticsOSTypedDict], List[components_analyticsreferers.AnalyticsReferersTypedDict], List[components_analyticstoplinks.AnalyticsTopLinksTypedDict], List[components_analyticstopurls.AnalyticsTopUrlsTypedDict]] r"""Analytics data""" -RetrieveAnalyticsResponseBody = Union[components_leadscount.LeadsCount, components_clickscount.ClicksCount, components_salescount.SalesCount, List[components_leadsdevices.LeadsDevices], List[components_leadsos.LeadsOS], List[components_clicksbrowsers.ClicksBrowsers], List[components_clicksos.ClicksOS], List[components_clicksreferers.ClicksReferers], List[components_clickstoplinks.ClicksTopLinks], List[components_clickstopurls.ClicksTopUrls], List[components_clickscities.ClicksCities], List[components_leadstimeseries.LeadsTimeseries], List[components_leadscountries.LeadsCountries], List[components_leadscities.LeadsCities], List[components_clickscountries.ClicksCountries], List[components_leadsbrowsers.LeadsBrowsers], List[components_clicksdevices.ClicksDevices], List[components_leadsreferers.LeadsReferers], List[components_leadstoplinks.LeadsTopLinks], List[components_leadstopurls.LeadsTopUrls], List[components_clickstimeseries.ClicksTimeseries], List[components_salestimeseries.SalesTimeseries], List[components_salescountries.SalesCountries], List[components_salescities.SalesCities], List[components_salesdevices.SalesDevices], List[components_salesbrowsers.SalesBrowsers], List[components_salesos.SalesOS], List[components_salesreferers.SalesReferers], List[components_salestoplinks.SalesTopLinks], List[components_salestopurls.SalesTopUrls]] +RetrieveAnalyticsResponseBody = Union[components_analyticscount.AnalyticsCount, List[components_analyticstimeseries.AnalyticsTimeseries], List[components_analyticscountries.AnalyticsCountries], List[components_analyticscities.AnalyticsCities], List[components_analyticsdevices.AnalyticsDevices], List[components_analyticsbrowsers.AnalyticsBrowsers], List[components_analyticsos.AnalyticsOS], List[components_analyticsreferers.AnalyticsReferers], List[components_analyticstoplinks.AnalyticsTopLinks], List[components_analyticstopurls.AnalyticsTopUrls]] r"""Analytics data""" diff --git a/src/dub/models/operations/tracklead.py b/src/dub/models/operations/tracklead.py index f1c2053..4ea2ebb 100644 --- a/src/dub/models/operations/tracklead.py +++ b/src/dub/models/operations/tracklead.py @@ -68,33 +68,749 @@ def serialize_model(self, handler): return m -class TrackLeadResponseBodyTypedDict(TypedDict): - r"""A lead was tracked.""" +class CustomerTypedDict(TypedDict): + id: str + name: Nullable[str] + email: Nullable[str] + avatar: Nullable[str] - click_id: str - event_name: str - customer_id: str - customer_name: Nullable[str] - customer_email: Nullable[str] - customer_avatar: Nullable[str] - metadata: NotRequired[Dict[str, Any]] + +class Customer(BaseModel): + id: str + name: Nullable[str] + email: Nullable[str] + avatar: Nullable[str] + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["name", "email", "avatar"] + null_default_fields = [] -class TrackLeadResponseBody(BaseModel): - r"""A lead was tracked.""" + 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 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 - click_id: Annotated[str, pydantic.Field(alias="clickId")] - event_name: Annotated[str, pydantic.Field(alias="eventName")] - customer_id: Annotated[str, pydantic.Field(alias="customerId")] - customer_name: Annotated[Nullable[str], pydantic.Field(alias="customerName")] - customer_email: Annotated[Nullable[str], pydantic.Field(alias="customerEmail")] - customer_avatar: Annotated[Nullable[str], pydantic.Field(alias="customerAvatar")] - metadata: Optional[Dict[str, Any]] = None + +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 = ["metadata"] - nullable_fields = ["customerName", "customerEmail", "customerAvatar"] + 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) @@ -117,3 +833,21 @@ def serialize_model(self, handler): return m + +class TrackLeadResponseBodyTypedDict(TypedDict): + r"""A lead was tracked.""" + + event_name: str + customer: CustomerTypedDict + click: ClickTypedDict + link: LinkTypedDict + + +class TrackLeadResponseBody(BaseModel): + r"""A lead was tracked.""" + + event_name: Annotated[str, pydantic.Field(alias="eventName")] + customer: Customer + click: Click + link: Link + diff --git a/src/dub/models/operations/tracksale.py b/src/dub/models/operations/tracksale.py index 89e4f6e..226aa22 100644 --- a/src/dub/models/operations/tracksale.py +++ b/src/dub/models/operations/tracksale.py @@ -75,33 +75,789 @@ def serialize_model(self, handler): return m -class TrackSaleResponseBodyTypedDict(TypedDict): - r"""A sale was tracked.""" +class TrackSaleCustomerTypedDict(TypedDict): + id: str + name: Nullable[str] + email: Nullable[str] + avatar: Nullable[str] - event_name: str - customer_id: str + +class TrackSaleCustomer(BaseModel): + id: str + name: Nullable[str] + email: Nullable[str] + avatar: Nullable[str] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["name", "email", "avatar"] + 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 SaleTypedDict(TypedDict): amount: float payment_processor: str invoice_id: Nullable[str] currency: str - metadata: Nullable[Dict[str, Any]] -class TrackSaleResponseBody(BaseModel): - r"""A sale was tracked.""" - - event_name: Annotated[str, pydantic.Field(alias="eventName")] - customer_id: Annotated[str, pydantic.Field(alias="customerId")] +class Sale(BaseModel): amount: float 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", "metadata"] + 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"] null_default_fields = [] serialized = handler(self) @@ -124,3 +880,23 @@ def serialize_model(self, handler): return m + +class TrackSaleResponseBodyTypedDict(TypedDict): + r"""A sale was tracked.""" + + event_name: str + customer: TrackSaleCustomerTypedDict + sale: SaleTypedDict + click: TrackSaleClickTypedDict + link: TrackSaleLinkTypedDict + + +class TrackSaleResponseBody(BaseModel): + r"""A sale was tracked.""" + + 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 6673502..31e2f44 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.2" - gen_version: str = "2.404.3" - user_agent: str = "speakeasy-sdk/python 0.7.2 2.404.3 0.0.1 dub" + 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" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/src/dub/utils/security.py b/src/dub/utils/security.py index aab4cb6..5b6d694 100644 --- a/src/dub/utils/security.py +++ b/src/dub/utils/security.py @@ -42,8 +42,8 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: _parse_security_option(headers, query_params, value) return headers, query_params if metadata.scheme: - # Special case for basic auth which could be a flattened model - if metadata.sub_type == "basic" and not isinstance(value, BaseModel): + # Special case for basic auth or custom auth which could be a flattened model + if metadata.sub_type in ["basic", "custom"] and not isinstance(value, BaseModel): _parse_security_scheme(headers, query_params, metadata, name, security) else: _parse_security_scheme(headers, query_params, metadata, name, value) @@ -80,9 +80,12 @@ def _parse_security_scheme( sub_type = scheme_metadata.sub_type if isinstance(scheme, BaseModel): - if scheme_type == "http" and sub_type == "basic": - _parse_basic_auth_scheme(headers, scheme) - return + if scheme_type == "http": + if sub_type == "basic": + _parse_basic_auth_scheme(headers, scheme) + return + if sub_type == "custom": + return scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields for name in scheme_fields: @@ -131,6 +134,8 @@ def _parse_security_scheme_value( elif scheme_type == "http": if sub_type == "bearer": headers[header_name] = _apply_bearer(value) + elif sub_type == "custom": + return else: raise ValueError("sub type {sub_type} not supported") else: