Merge pull request #104 from dubinc/speakeasy-sdk-regen-1715536326

chore: 🐝 Update SDK - Generate
This commit is contained in:
Steven Tey
2024-05-12 21:02:08 +03:00
committed by GitHub
60 changed files with 3591 additions and 571 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f28179cc-ef59-426d-9e85-60cec22fc642
management:
docChecksum: c38ab49043c57320aee33ca443a1c66b
docChecksum: 98ca9bc4e949829ec5b766834b0ad8c5
docVersion: 0.0.1
speakeasyVersion: 1.284.0
speakeasyVersion: 1.286.0
generationVersion: 2.326.3
releaseVersion: 0.29.0
configChecksum: 0905076054c076f5c1185ecc3a5d9945
releaseVersion: 0.29.1
configChecksum: 6f6d30c5a12a247a1c1897cfaf975279
repoURL: https://github.com/dubinc/dub-node.git
installationURL: https://github.com/dubinc/dub-node
published: true
@@ -81,6 +81,7 @@ generatedFiles:
- src/models/operations/deletelink.ts
- src/models/operations/updatelink.ts
- src/models/operations/bulkcreatelinks.ts
- src/models/operations/upsertlink.ts
- src/models/operations/getqrcode.ts
- src/models/operations/getclicksanalytics.ts
- src/models/operations/gettimeseriesanalytics.ts
@@ -171,6 +172,10 @@ generatedFiles:
- docs/models/operations/bulkcreatelinkstagnames.md
- docs/models/operations/bulkcreatelinksgeo.md
- docs/models/operations/requestbody.md
- docs/models/operations/upsertlinktagids.md
- docs/models/operations/upsertlinktagnames.md
- docs/models/operations/upsertlinkgeo.md
- docs/models/operations/upsertlinkrequestbody.md
- docs/models/operations/level.md
- docs/models/operations/getqrcoderequest.md
- docs/models/operations/interval.md

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.29.0
version: 0.29.1
additionalDependencies:
dependencies: {}
devDependencies:

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.285.1
speakeasyVersion: 1.286.0
sources:
my-first-source:
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:f649bbfd443ab1f410f772b0cc1a8fd4f3ca6491b1662c55d9ba732b67d1c809
sourceBlobDigest: sha256:b76d35f06695399d6328570e0db59823fd95024783e73330503db724e7656537
sourceRevisionDigest: sha256:ad02d35bb4135d56025bfdc45e8bc727dca8d374bb5b2fe4719807a8daa5a00f
sourceBlobDigest: sha256:55f6456f8fe9211e115022e8d60509a48bec957c9d004192c4746749b46ffd89
tags:
- latest
- main
@@ -11,8 +11,8 @@ targets:
my-first-target:
source: my-first-source
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:f649bbfd443ab1f410f772b0cc1a8fd4f3ca6491b1662c55d9ba732b67d1c809
sourceBlobDigest: sha256:b76d35f06695399d6328570e0db59823fd95024783e73330503db724e7656537
sourceRevisionDigest: sha256:ad02d35bb4135d56025bfdc45e8bc727dca8d374bb5b2fe4719807a8daa5a00f
sourceBlobDigest: sha256:55f6456f8fe9211e115022e8d60509a48bec957c9d004192c4746749b46ffd89
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0

View File

@@ -36,7 +36,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
### Example
### Example 1
```typescript
import { Dub } from "dub";
@@ -57,6 +57,29 @@ async function run() {
run();
```
### Example 2
```typescript
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.upsert({
url: "https://google/com",
});
// Handle the result
console.log(result);
}
run();
```
<!-- End SDK Example Usage [usage] -->
@@ -72,6 +95,7 @@ run();
* [delete](docs/sdks/links/README.md#delete) - Delete a link
* [update](docs/sdks/links/README.md#update) - Update a link
* [createMany](docs/sdks/links/README.md#createmany) - Bulk create links
* [upsert](docs/sdks/links/README.md#upsert) - Upsert a link
### [qrCodes](docs/sdks/qrcodes/README.md)

View File

@@ -256,4 +256,14 @@ Based on:
### Generated
- [typescript v0.29.0] .
### Releases
- [NPM v0.29.0] https://www.npmjs.com/package/dub/v/0.29.0 - .
- [NPM v0.29.0] https://www.npmjs.com/package/dub/v/0.29.0 - .
## 2024-05-12 17:52:03
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.286.0 (2.326.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.29.1] .
### Releases
- [NPM v0.29.1] https://www.npmjs.com/package/dub/v/0.29.1 - .

View File

@@ -18,5 +18,26 @@ async function run() {
run();
```
```typescript
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.upsert({
url: "https://google/com",
});
// Handle the result
console.log(result);
}
run();
```
<!-- End SDK Example Usage [usage] -->

File diff suppressed because it is too large Load Diff

View File

@@ -7,4 +7,4 @@
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `code` | [errors.Code](../../models/errors/code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad_request |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad-request |

View File

@@ -7,4 +7,4 @@
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `code` | [errors.InternalServerErrorCode](../../models/errors/internalservererrorcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal_server_error |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal-server_error |

View File

@@ -7,4 +7,4 @@
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `code` | [errors.InviteExpiredCode](../../models/errors/inviteexpiredcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite_expired |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite-expired |

View File

@@ -7,4 +7,4 @@
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `code` | [errors.NotFoundCode](../../models/errors/notfoundcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not_found |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not-found |

View File

@@ -7,4 +7,4 @@
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `code` | [errors.RateLimitExceededCode](../../models/errors/ratelimitexceededcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate_limit_exceeded |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate-limit_exceeded |

View File

@@ -7,4 +7,4 @@
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `code` | [errors.UnprocessableEntityCode](../../models/errors/unprocessableentitycode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity |
| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable_entity |
| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable-entity |

View File

@@ -1,6 +1,6 @@
# GetBrowserAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetBrowserAnalyticsQueryParamCountry](../../models/operations/getbrowseranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetCityAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetCityAnalyticsQueryParamCountry](../../models/operations/getcityanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetCountryAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetCountryAnalyticsQueryParamCountry](../../models/operations/getcountryanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetDeviceAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetDeviceAnalyticsQueryParamCountry](../../models/operations/getdeviceanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetOSAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetOSAnalyticsQueryParamCountry](../../models/operations/getosanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `url` | *string* | :heavy_minus_sign: | The URL to generate a QR code for. Defaults to `https://dub.co` if not provided. |
| `url` | *string* | :heavy_check_mark: | The URL to generate a QR code for. |
| `size` | *number* | :heavy_minus_sign: | The size of the QR code in pixels. Defaults to `600` if not provided. |
| `level` | [operations.Level](../../models/operations/level.md) | :heavy_minus_sign: | The level of error correction to use for the QR code. Defaults to `L` if not provided. |
| `fgColor` | *string* | :heavy_minus_sign: | The foreground color of the QR code in hex format. Defaults to `#000000` if not provided. |

View File

@@ -1,6 +1,6 @@
# GetRefererAnalyticsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetRefererAnalyticsQueryParamCountry](../../models/operations/getrefereranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.QueryParamCountry](../../models/operations/queryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetTopLinksQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetTopLinksQueryParamCountry](../../models/operations/gettoplinksqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# GetTopURLsQueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -9,7 +9,9 @@
| `key` | *string* | :heavy_minus_sign: | The short link slug. |
| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. |
| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. |
| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. |
| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. |
| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. |
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. |
| `country` | [operations.GetTopURLsQueryParamCountry](../../models/operations/gettopurlsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. |

View File

@@ -1,6 +1,6 @@
# Interval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -1,6 +1,6 @@
# QueryParamInterval
The interval to retrieve analytics for.
The interval to retrieve analytics for. Takes precedence over start and end.
## Values
@@ -12,4 +12,6 @@ The interval to retrieve analytics for.
| `Sevend` | 7d |
| `Thirtyd` | 30d |
| `Ninetyd` | 90d |
| `Ytd` | ytd |
| `Oney` | 1y |
| `All` | all |

View File

@@ -0,0 +1,259 @@
# UpsertLinkGeo
Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `af` | *string* | :heavy_minus_sign: | N/A |
| `al` | *string* | :heavy_minus_sign: | N/A |
| `dz` | *string* | :heavy_minus_sign: | N/A |
| `as` | *string* | :heavy_minus_sign: | N/A |
| `ad` | *string* | :heavy_minus_sign: | N/A |
| `ao` | *string* | :heavy_minus_sign: | N/A |
| `ai` | *string* | :heavy_minus_sign: | N/A |
| `aq` | *string* | :heavy_minus_sign: | N/A |
| `ag` | *string* | :heavy_minus_sign: | N/A |
| `ar` | *string* | :heavy_minus_sign: | N/A |
| `am` | *string* | :heavy_minus_sign: | N/A |
| `aw` | *string* | :heavy_minus_sign: | N/A |
| `au` | *string* | :heavy_minus_sign: | N/A |
| `at` | *string* | :heavy_minus_sign: | N/A |
| `az` | *string* | :heavy_minus_sign: | N/A |
| `bs` | *string* | :heavy_minus_sign: | N/A |
| `bh` | *string* | :heavy_minus_sign: | N/A |
| `bd` | *string* | :heavy_minus_sign: | N/A |
| `bb` | *string* | :heavy_minus_sign: | N/A |
| `by` | *string* | :heavy_minus_sign: | N/A |
| `be` | *string* | :heavy_minus_sign: | N/A |
| `bz` | *string* | :heavy_minus_sign: | N/A |
| `bj` | *string* | :heavy_minus_sign: | N/A |
| `bm` | *string* | :heavy_minus_sign: | N/A |
| `bt` | *string* | :heavy_minus_sign: | N/A |
| `bo` | *string* | :heavy_minus_sign: | N/A |
| `ba` | *string* | :heavy_minus_sign: | N/A |
| `bw` | *string* | :heavy_minus_sign: | N/A |
| `bv` | *string* | :heavy_minus_sign: | N/A |
| `br` | *string* | :heavy_minus_sign: | N/A |
| `io` | *string* | :heavy_minus_sign: | N/A |
| `bn` | *string* | :heavy_minus_sign: | N/A |
| `bg` | *string* | :heavy_minus_sign: | N/A |
| `bf` | *string* | :heavy_minus_sign: | N/A |
| `bi` | *string* | :heavy_minus_sign: | N/A |
| `kh` | *string* | :heavy_minus_sign: | N/A |
| `cm` | *string* | :heavy_minus_sign: | N/A |
| `ca` | *string* | :heavy_minus_sign: | N/A |
| `cv` | *string* | :heavy_minus_sign: | N/A |
| `ky` | *string* | :heavy_minus_sign: | N/A |
| `cf` | *string* | :heavy_minus_sign: | N/A |
| `td` | *string* | :heavy_minus_sign: | N/A |
| `cl` | *string* | :heavy_minus_sign: | N/A |
| `cn` | *string* | :heavy_minus_sign: | N/A |
| `cx` | *string* | :heavy_minus_sign: | N/A |
| `cc` | *string* | :heavy_minus_sign: | N/A |
| `co` | *string* | :heavy_minus_sign: | N/A |
| `km` | *string* | :heavy_minus_sign: | N/A |
| `cg` | *string* | :heavy_minus_sign: | N/A |
| `cd` | *string* | :heavy_minus_sign: | N/A |
| `ck` | *string* | :heavy_minus_sign: | N/A |
| `cr` | *string* | :heavy_minus_sign: | N/A |
| `ci` | *string* | :heavy_minus_sign: | N/A |
| `hr` | *string* | :heavy_minus_sign: | N/A |
| `cu` | *string* | :heavy_minus_sign: | N/A |
| `cy` | *string* | :heavy_minus_sign: | N/A |
| `cz` | *string* | :heavy_minus_sign: | N/A |
| `dk` | *string* | :heavy_minus_sign: | N/A |
| `dj` | *string* | :heavy_minus_sign: | N/A |
| `dm` | *string* | :heavy_minus_sign: | N/A |
| `do` | *string* | :heavy_minus_sign: | N/A |
| `ec` | *string* | :heavy_minus_sign: | N/A |
| `eg` | *string* | :heavy_minus_sign: | N/A |
| `sv` | *string* | :heavy_minus_sign: | N/A |
| `gq` | *string* | :heavy_minus_sign: | N/A |
| `er` | *string* | :heavy_minus_sign: | N/A |
| `ee` | *string* | :heavy_minus_sign: | N/A |
| `et` | *string* | :heavy_minus_sign: | N/A |
| `fk` | *string* | :heavy_minus_sign: | N/A |
| `fo` | *string* | :heavy_minus_sign: | N/A |
| `fj` | *string* | :heavy_minus_sign: | N/A |
| `fi` | *string* | :heavy_minus_sign: | N/A |
| `fr` | *string* | :heavy_minus_sign: | N/A |
| `gf` | *string* | :heavy_minus_sign: | N/A |
| `pf` | *string* | :heavy_minus_sign: | N/A |
| `tf` | *string* | :heavy_minus_sign: | N/A |
| `ga` | *string* | :heavy_minus_sign: | N/A |
| `gm` | *string* | :heavy_minus_sign: | N/A |
| `ge` | *string* | :heavy_minus_sign: | N/A |
| `de` | *string* | :heavy_minus_sign: | N/A |
| `gh` | *string* | :heavy_minus_sign: | N/A |
| `gi` | *string* | :heavy_minus_sign: | N/A |
| `gr` | *string* | :heavy_minus_sign: | N/A |
| `gl` | *string* | :heavy_minus_sign: | N/A |
| `gd` | *string* | :heavy_minus_sign: | N/A |
| `gp` | *string* | :heavy_minus_sign: | N/A |
| `gu` | *string* | :heavy_minus_sign: | N/A |
| `gt` | *string* | :heavy_minus_sign: | N/A |
| `gn` | *string* | :heavy_minus_sign: | N/A |
| `gw` | *string* | :heavy_minus_sign: | N/A |
| `gy` | *string* | :heavy_minus_sign: | N/A |
| `ht` | *string* | :heavy_minus_sign: | N/A |
| `hm` | *string* | :heavy_minus_sign: | N/A |
| `va` | *string* | :heavy_minus_sign: | N/A |
| `hn` | *string* | :heavy_minus_sign: | N/A |
| `hk` | *string* | :heavy_minus_sign: | N/A |
| `hu` | *string* | :heavy_minus_sign: | N/A |
| `is` | *string* | :heavy_minus_sign: | N/A |
| `in` | *string* | :heavy_minus_sign: | N/A |
| `id` | *string* | :heavy_minus_sign: | N/A |
| `ir` | *string* | :heavy_minus_sign: | N/A |
| `iq` | *string* | :heavy_minus_sign: | N/A |
| `ie` | *string* | :heavy_minus_sign: | N/A |
| `il` | *string* | :heavy_minus_sign: | N/A |
| `it` | *string* | :heavy_minus_sign: | N/A |
| `jm` | *string* | :heavy_minus_sign: | N/A |
| `jp` | *string* | :heavy_minus_sign: | N/A |
| `jo` | *string* | :heavy_minus_sign: | N/A |
| `kz` | *string* | :heavy_minus_sign: | N/A |
| `ke` | *string* | :heavy_minus_sign: | N/A |
| `ki` | *string* | :heavy_minus_sign: | N/A |
| `kp` | *string* | :heavy_minus_sign: | N/A |
| `kr` | *string* | :heavy_minus_sign: | N/A |
| `kw` | *string* | :heavy_minus_sign: | N/A |
| `kg` | *string* | :heavy_minus_sign: | N/A |
| `la` | *string* | :heavy_minus_sign: | N/A |
| `lv` | *string* | :heavy_minus_sign: | N/A |
| `lb` | *string* | :heavy_minus_sign: | N/A |
| `ls` | *string* | :heavy_minus_sign: | N/A |
| `lr` | *string* | :heavy_minus_sign: | N/A |
| `ly` | *string* | :heavy_minus_sign: | N/A |
| `li` | *string* | :heavy_minus_sign: | N/A |
| `lt` | *string* | :heavy_minus_sign: | N/A |
| `lu` | *string* | :heavy_minus_sign: | N/A |
| `mo` | *string* | :heavy_minus_sign: | N/A |
| `mg` | *string* | :heavy_minus_sign: | N/A |
| `mw` | *string* | :heavy_minus_sign: | N/A |
| `my` | *string* | :heavy_minus_sign: | N/A |
| `mv` | *string* | :heavy_minus_sign: | N/A |
| `ml` | *string* | :heavy_minus_sign: | N/A |
| `mt` | *string* | :heavy_minus_sign: | N/A |
| `mh` | *string* | :heavy_minus_sign: | N/A |
| `mq` | *string* | :heavy_minus_sign: | N/A |
| `mr` | *string* | :heavy_minus_sign: | N/A |
| `mu` | *string* | :heavy_minus_sign: | N/A |
| `yt` | *string* | :heavy_minus_sign: | N/A |
| `mx` | *string* | :heavy_minus_sign: | N/A |
| `fm` | *string* | :heavy_minus_sign: | N/A |
| `md` | *string* | :heavy_minus_sign: | N/A |
| `mc` | *string* | :heavy_minus_sign: | N/A |
| `mn` | *string* | :heavy_minus_sign: | N/A |
| `ms` | *string* | :heavy_minus_sign: | N/A |
| `ma` | *string* | :heavy_minus_sign: | N/A |
| `mz` | *string* | :heavy_minus_sign: | N/A |
| `mm` | *string* | :heavy_minus_sign: | N/A |
| `na` | *string* | :heavy_minus_sign: | N/A |
| `nr` | *string* | :heavy_minus_sign: | N/A |
| `np` | *string* | :heavy_minus_sign: | N/A |
| `nl` | *string* | :heavy_minus_sign: | N/A |
| `nc` | *string* | :heavy_minus_sign: | N/A |
| `nz` | *string* | :heavy_minus_sign: | N/A |
| `ni` | *string* | :heavy_minus_sign: | N/A |
| `ne` | *string* | :heavy_minus_sign: | N/A |
| `ng` | *string* | :heavy_minus_sign: | N/A |
| `nu` | *string* | :heavy_minus_sign: | N/A |
| `nf` | *string* | :heavy_minus_sign: | N/A |
| `mk` | *string* | :heavy_minus_sign: | N/A |
| `mp` | *string* | :heavy_minus_sign: | N/A |
| `no` | *string* | :heavy_minus_sign: | N/A |
| `om` | *string* | :heavy_minus_sign: | N/A |
| `pk` | *string* | :heavy_minus_sign: | N/A |
| `pw` | *string* | :heavy_minus_sign: | N/A |
| `ps` | *string* | :heavy_minus_sign: | N/A |
| `pa` | *string* | :heavy_minus_sign: | N/A |
| `pg` | *string* | :heavy_minus_sign: | N/A |
| `py` | *string* | :heavy_minus_sign: | N/A |
| `pe` | *string* | :heavy_minus_sign: | N/A |
| `ph` | *string* | :heavy_minus_sign: | N/A |
| `pn` | *string* | :heavy_minus_sign: | N/A |
| `pl` | *string* | :heavy_minus_sign: | N/A |
| `pt` | *string* | :heavy_minus_sign: | N/A |
| `pr` | *string* | :heavy_minus_sign: | N/A |
| `qa` | *string* | :heavy_minus_sign: | N/A |
| `re` | *string* | :heavy_minus_sign: | N/A |
| `ro` | *string* | :heavy_minus_sign: | N/A |
| `ru` | *string* | :heavy_minus_sign: | N/A |
| `rw` | *string* | :heavy_minus_sign: | N/A |
| `sh` | *string* | :heavy_minus_sign: | N/A |
| `kn` | *string* | :heavy_minus_sign: | N/A |
| `lc` | *string* | :heavy_minus_sign: | N/A |
| `pm` | *string* | :heavy_minus_sign: | N/A |
| `vc` | *string* | :heavy_minus_sign: | N/A |
| `ws` | *string* | :heavy_minus_sign: | N/A |
| `sm` | *string* | :heavy_minus_sign: | N/A |
| `st` | *string* | :heavy_minus_sign: | N/A |
| `sa` | *string* | :heavy_minus_sign: | N/A |
| `sn` | *string* | :heavy_minus_sign: | N/A |
| `sc` | *string* | :heavy_minus_sign: | N/A |
| `sl` | *string* | :heavy_minus_sign: | N/A |
| `sg` | *string* | :heavy_minus_sign: | N/A |
| `sk` | *string* | :heavy_minus_sign: | N/A |
| `si` | *string* | :heavy_minus_sign: | N/A |
| `sb` | *string* | :heavy_minus_sign: | N/A |
| `so` | *string* | :heavy_minus_sign: | N/A |
| `za` | *string* | :heavy_minus_sign: | N/A |
| `gs` | *string* | :heavy_minus_sign: | N/A |
| `es` | *string* | :heavy_minus_sign: | N/A |
| `lk` | *string* | :heavy_minus_sign: | N/A |
| `sd` | *string* | :heavy_minus_sign: | N/A |
| `sr` | *string* | :heavy_minus_sign: | N/A |
| `sj` | *string* | :heavy_minus_sign: | N/A |
| `sz` | *string* | :heavy_minus_sign: | N/A |
| `se` | *string* | :heavy_minus_sign: | N/A |
| `ch` | *string* | :heavy_minus_sign: | N/A |
| `sy` | *string* | :heavy_minus_sign: | N/A |
| `tw` | *string* | :heavy_minus_sign: | N/A |
| `tj` | *string* | :heavy_minus_sign: | N/A |
| `tz` | *string* | :heavy_minus_sign: | N/A |
| `th` | *string* | :heavy_minus_sign: | N/A |
| `tl` | *string* | :heavy_minus_sign: | N/A |
| `tg` | *string* | :heavy_minus_sign: | N/A |
| `tk` | *string* | :heavy_minus_sign: | N/A |
| `to` | *string* | :heavy_minus_sign: | N/A |
| `tt` | *string* | :heavy_minus_sign: | N/A |
| `tn` | *string* | :heavy_minus_sign: | N/A |
| `tr` | *string* | :heavy_minus_sign: | N/A |
| `tm` | *string* | :heavy_minus_sign: | N/A |
| `tc` | *string* | :heavy_minus_sign: | N/A |
| `tv` | *string* | :heavy_minus_sign: | N/A |
| `ug` | *string* | :heavy_minus_sign: | N/A |
| `ua` | *string* | :heavy_minus_sign: | N/A |
| `ae` | *string* | :heavy_minus_sign: | N/A |
| `gb` | *string* | :heavy_minus_sign: | N/A |
| `us` | *string* | :heavy_minus_sign: | N/A |
| `um` | *string* | :heavy_minus_sign: | N/A |
| `uy` | *string* | :heavy_minus_sign: | N/A |
| `uz` | *string* | :heavy_minus_sign: | N/A |
| `vu` | *string* | :heavy_minus_sign: | N/A |
| `ve` | *string* | :heavy_minus_sign: | N/A |
| `vn` | *string* | :heavy_minus_sign: | N/A |
| `vg` | *string* | :heavy_minus_sign: | N/A |
| `vi` | *string* | :heavy_minus_sign: | N/A |
| `wf` | *string* | :heavy_minus_sign: | N/A |
| `eh` | *string* | :heavy_minus_sign: | N/A |
| `ye` | *string* | :heavy_minus_sign: | N/A |
| `zm` | *string* | :heavy_minus_sign: | N/A |
| `zw` | *string* | :heavy_minus_sign: | N/A |
| `ax` | *string* | :heavy_minus_sign: | N/A |
| `bq` | *string* | :heavy_minus_sign: | N/A |
| `cw` | *string* | :heavy_minus_sign: | N/A |
| `gg` | *string* | :heavy_minus_sign: | N/A |
| `im` | *string* | :heavy_minus_sign: | N/A |
| `je` | *string* | :heavy_minus_sign: | N/A |
| `me` | *string* | :heavy_minus_sign: | N/A |
| `bl` | *string* | :heavy_minus_sign: | N/A |
| `mf` | *string* | :heavy_minus_sign: | N/A |
| `rs` | *string* | :heavy_minus_sign: | N/A |
| `sx` | *string* | :heavy_minus_sign: | N/A |
| `ss` | *string* | :heavy_minus_sign: | N/A |
| `xk` | *string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,29 @@
# UpsertLinkRequestBody
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | https://google/com |
| `domain` | *string* | :heavy_minus_sign: | 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` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | |
| `externalId` | *string* | :heavy_minus_sign: | 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. | 123456 |
| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | |
| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | |
| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | |
| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>The unique ID of the tag assigned to the short link. This field is deprecated use `tagIds` instead. | |
| `tagIds` | *operations.UpsertLinkTagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [<br/>"clux0rgak00011..."<br/>] |
| `tagNames` | *operations.UpsertLinkTagNames* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | |
| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. | |
| `expiresAt` | *string* | :heavy_minus_sign: | The date and time when the short link will expire at. | |
| `expiredUrl` | *string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | |
| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. | |
| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | |
| `title` | *string* | :heavy_minus_sign: | 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` | *string* | :heavy_minus_sign: | 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` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | |
| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | |
| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | |
| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | |
| `geo` | [operations.UpsertLinkGeo](../../models/operations/upsertlinkgeo.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | |

View File

@@ -0,0 +1,4 @@
# UpsertLinkTagIds
The unique IDs of the tags assigned to the short link.

View File

@@ -0,0 +1,4 @@
# UpsertLinkTagNames
The unique name of the tags assigned to the short link (case insensitive).

View File

@@ -10,6 +10,7 @@
* [delete](#delete) - Delete a link
* [update](#update) - Update a link
* [createMany](#createmany) - Bulk create links
* [upsert](#upsert) - Upsert a link
## list
@@ -270,7 +271,7 @@ run();
## update
Update a link for the authenticated workspace.
Update a link for the authenticated workspace. If there's no change, returns as is.
### Example Usage
@@ -376,3 +377,56 @@ run();
| errors.RateLimitExceeded | 429 | application/json |
| errors.InternalServerError | 500 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## upsert
Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, returns as is if there's no change, or update it. Otherwise, a new link will be created.
### Example Usage
```typescript
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.upsert({
url: "https://google/com",
});
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.UpsertLinkRequestBody](../../models/operations/upsertlinkrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
### Response
**Promise<[components.LinkSchema](../../models/components/linkschema.md)>**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------- | -------------------------- | -------------------------- |
| errors.BadRequest | 400 | application/json |
| errors.Unauthorized | 401 | application/json |
| errors.Forbidden | 403 | application/json |
| errors.NotFound | 404 | application/json |
| errors.Conflict | 409 | application/json |
| errors.InviteExpired | 410 | application/json |
| errors.UnprocessableEntity | 422 | application/json |
| errors.RateLimitExceeded | 429 | application/json |
| errors.InternalServerError | 500 | application/json |
| errors.SDKError | 4xx-5xx | */* |

View File

@@ -20,7 +20,9 @@ const dub = new Dub({
});
async function run() {
const result = await dub.qrCodes.get({});
const result = await dub.qrCodes.get({
url: "https://brief-micronutrient.org",
});
// Handle the result
console.log(result)

View File

@@ -2,7 +2,7 @@
{
"name": "dub",
"version": "0.29.0",
"version": "0.29.1",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "dub",
"version": "0.29.0",
"version": "0.29.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dub",
"version": "0.29.0",
"version": "0.29.1",
"devDependencies": {
"@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7",

View File

@@ -1,6 +1,6 @@
{
"name": "dub",
"version": "0.29.0",
"version": "0.29.1",
"author": "Dub",
"main": "./index.js",
"sideEffects": false,

View File

@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.1",
sdkVersion: "0.29.0",
sdkVersion: "0.29.1",
genVersion: "2.326.3",
userAgent: "speakeasy-sdk/typescript 0.29.0 2.326.3 0.0.1 dub",
userAgent: "speakeasy-sdk/typescript 0.29.1 2.326.3 0.0.1 dub",
} as const;

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetBrowserAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetBrowserAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetBrowserAnalyticsQueryParamInterval =
(typeof GetBrowserAnalyticsQueryParamInterval)[keyof typeof GetBrowserAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetBrowserAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -374,6 +384,8 @@ export namespace GetBrowserAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetBrowserAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -393,6 +405,8 @@ export namespace GetBrowserAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetBrowserAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetBrowserAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -411,6 +425,8 @@ export namespace GetBrowserAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -430,6 +446,8 @@ export namespace GetBrowserAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetBrowserAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetBrowserAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -449,6 +467,8 @@ export namespace GetBrowserAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetBrowserAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetBrowserAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -467,6 +487,8 @@ export namespace GetBrowserAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetCityAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetCityAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetCityAnalyticsQueryParamInterval =
(typeof GetCityAnalyticsQueryParamInterval)[keyof typeof GetCityAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetCityAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetCityAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -639,6 +649,8 @@ export namespace GetCityAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetCityAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetCityAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -658,6 +670,8 @@ export namespace GetCityAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetCityAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetCityAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -676,6 +690,8 @@ export namespace GetCityAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -695,6 +711,8 @@ export namespace GetCityAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetCityAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetCityAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -714,6 +732,8 @@ export namespace GetCityAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetCityAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetCityAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -732,6 +752,8 @@ export namespace GetCityAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const Interval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const Interval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type Interval = (typeof Interval)[keyof typeof Interval];
@@ -298,9 +300,17 @@ export type GetClicksAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: Interval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -357,6 +367,8 @@ export namespace GetClicksAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: Interval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: Country | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -376,6 +388,8 @@ export namespace GetClicksAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: Interval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: Country$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -394,6 +408,8 @@ export namespace GetClicksAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -413,6 +429,8 @@ export namespace GetClicksAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: Interval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: Country | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -432,6 +450,8 @@ export namespace GetClicksAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: Interval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: Country$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -450,6 +470,8 @@ export namespace GetClicksAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetCountryAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetCountryAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetCountryAnalyticsQueryParamInterval =
(typeof GetCountryAnalyticsQueryParamInterval)[keyof typeof GetCountryAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetCountryAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetCountryAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -635,6 +645,8 @@ export namespace GetCountryAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetCountryAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetCountryAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -654,6 +666,8 @@ export namespace GetCountryAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetCountryAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetCountryAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -672,6 +686,8 @@ export namespace GetCountryAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -691,6 +707,8 @@ export namespace GetCountryAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetCountryAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetCountryAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -710,6 +728,8 @@ export namespace GetCountryAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetCountryAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetCountryAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -728,6 +748,8 @@ export namespace GetCountryAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetDeviceAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetDeviceAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetDeviceAnalyticsQueryParamInterval =
(typeof GetDeviceAnalyticsQueryParamInterval)[keyof typeof GetDeviceAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetDeviceAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -374,6 +384,8 @@ export namespace GetDeviceAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetDeviceAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -393,6 +405,8 @@ export namespace GetDeviceAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetDeviceAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetDeviceAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -411,6 +425,8 @@ export namespace GetDeviceAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -430,6 +446,8 @@ export namespace GetDeviceAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetDeviceAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetDeviceAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -449,6 +467,8 @@ export namespace GetDeviceAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetDeviceAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetDeviceAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -467,6 +487,8 @@ export namespace GetDeviceAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetOSAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetOSAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetOSAnalyticsQueryParamInterval =
(typeof GetOSAnalyticsQueryParamInterval)[keyof typeof GetOSAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetOSAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetOSAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -374,6 +384,8 @@ export namespace GetOSAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetOSAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetOSAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -393,6 +405,8 @@ export namespace GetOSAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetOSAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetOSAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -411,6 +425,8 @@ export namespace GetOSAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -430,6 +446,8 @@ export namespace GetOSAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetOSAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetOSAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -449,6 +467,8 @@ export namespace GetOSAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetOSAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetOSAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -467,6 +487,8 @@ export namespace GetOSAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -20,9 +20,9 @@ export type Level = (typeof Level)[keyof typeof Level];
export type GetQRCodeRequest = {
/**
* The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.
* The URL to generate a QR code for.
*/
url?: string | undefined;
url: string;
/**
* The size of the QR code in pixels. Defaults to `600` if not provided.
*/
@@ -51,7 +51,7 @@ export const Level$: z.ZodNativeEnum<typeof Level> = z.nativeEnum(Level);
/** @internal */
export namespace GetQRCodeRequest$ {
export type Inbound = {
url?: string | undefined;
url: string;
size?: number | undefined;
level?: Level | undefined;
fgColor?: string | undefined;
@@ -61,7 +61,7 @@ export namespace GetQRCodeRequest$ {
export const inboundSchema: z.ZodType<GetQRCodeRequest, z.ZodTypeDef, Inbound> = z
.object({
url: z.string().default("https://dub.co"),
url: z.string(),
size: z.number().default(600),
level: Level$.default("L"),
fgColor: z.string().default("#000000"),
@@ -90,7 +90,7 @@ export namespace GetQRCodeRequest$ {
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetQRCodeRequest> = z
.object({
url: z.string().default("https://dub.co"),
url: z.string(),
size: z.number().default(600),
level: Level$.default("L"),
fgColor: z.string().default("#000000"),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetRefererAnalyticsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetRefererAnalyticsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetRefererAnalyticsQueryParamInterval =
(typeof GetRefererAnalyticsQueryParamInterval)[keyof typeof GetRefererAnalyticsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetRefererAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetRefererAnalyticsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -374,6 +384,8 @@ export namespace GetRefererAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetRefererAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetRefererAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -393,6 +405,8 @@ export namespace GetRefererAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetRefererAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetRefererAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -411,6 +425,8 @@ export namespace GetRefererAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -430,6 +446,8 @@ export namespace GetRefererAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetRefererAnalyticsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetRefererAnalyticsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -449,6 +467,8 @@ export namespace GetRefererAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetRefererAnalyticsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetRefererAnalyticsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -467,6 +487,8 @@ export namespace GetRefererAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const QueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const QueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type QueryParamInterval = (typeof QueryParamInterval)[keyof typeof QueryParamInterval];
@@ -298,9 +300,17 @@ export type GetTimeseriesAnalyticsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: QueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -370,6 +380,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: QueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: QueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -389,6 +401,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: QueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: QueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -407,6 +421,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -426,6 +442,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: QueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: QueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -446,6 +464,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: QueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: QueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -464,6 +484,8 @@ export namespace GetTimeseriesAnalyticsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetTopLinksQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetTopLinksQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetTopLinksQueryParamInterval =
(typeof GetTopLinksQueryParamInterval)[keyof typeof GetTopLinksQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetTopLinksRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetTopLinksQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -372,6 +382,8 @@ export namespace GetTopLinksRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetTopLinksQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetTopLinksQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -391,6 +403,8 @@ export namespace GetTopLinksRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetTopLinksQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetTopLinksQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -409,6 +423,8 @@ export namespace GetTopLinksRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -428,6 +444,8 @@ export namespace GetTopLinksRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetTopLinksQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetTopLinksQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -447,6 +465,8 @@ export namespace GetTopLinksRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetTopLinksQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetTopLinksQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -465,6 +485,8 @@ export namespace GetTopLinksRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -5,7 +5,7 @@
import * as z from "zod";
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export const GetTopURLsQueryParamInterval = {
Oneh: "1h",
@@ -13,10 +13,12 @@ export const GetTopURLsQueryParamInterval = {
Sevend: "7d",
Thirtyd: "30d",
Ninetyd: "90d",
Ytd: "ytd",
Oney: "1y",
All: "all",
} as const;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
export type GetTopURLsQueryParamInterval =
(typeof GetTopURLsQueryParamInterval)[keyof typeof GetTopURLsQueryParamInterval];
@@ -300,9 +302,17 @@ export type GetTopURLsRequest = {
*/
externalId?: string | undefined;
/**
* The interval to retrieve analytics for.
* The interval to retrieve analytics for. Takes precedence over start and end.
*/
interval?: GetTopURLsQueryParamInterval | undefined;
/**
* The start date and time when to retrieve analytics from.
*/
start?: string | undefined;
/**
* The end date and time when to retrieve analytics from. If not provided, defaults to the current date.
*/
end?: string | undefined;
/**
* The country to retrieve analytics for.
*/
@@ -372,6 +382,8 @@ export namespace GetTopURLsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetTopURLsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetTopURLsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -391,6 +403,8 @@ export namespace GetTopURLsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetTopURLsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetTopURLsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -409,6 +423,8 @@ export namespace GetTopURLsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
@@ -428,6 +444,8 @@ export namespace GetTopURLsRequest$ {
linkId?: string | undefined;
externalId?: string | undefined;
interval?: GetTopURLsQueryParamInterval | undefined;
start?: string | undefined;
end?: string | undefined;
country?: GetTopURLsQueryParamCountry | undefined;
city?: string | undefined;
device?: string | undefined;
@@ -447,6 +465,8 @@ export namespace GetTopURLsRequest$ {
linkId: z.string().optional(),
externalId: z.string().optional(),
interval: GetTopURLsQueryParamInterval$.optional(),
start: z.string().optional(),
end: z.string().optional(),
country: GetTopURLsQueryParamCountry$.optional(),
city: z.string().optional(),
device: z.string().optional(),
@@ -465,6 +485,8 @@ export namespace GetTopURLsRequest$ {
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),

View File

@@ -31,3 +31,4 @@ export * from "./setprimarydomain";
export * from "./transferdomain";
export * from "./updatedomain";
export * from "./updatelink";
export * from "./upsertlink";

File diff suppressed because it is too large Load Diff

View File

@@ -75,6 +75,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -96,6 +97,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -332,6 +334,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -353,6 +356,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -589,6 +593,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -610,6 +615,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -848,6 +854,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -869,6 +876,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -1107,6 +1115,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -1128,6 +1137,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -1366,6 +1376,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -1387,6 +1398,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -1625,6 +1637,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -1646,6 +1659,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -1884,6 +1898,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -1905,6 +1920,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -2143,6 +2159,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -2164,6 +2181,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
@@ -2400,6 +2418,7 @@ export class Analytics extends ClientSDK {
}),
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("externalId", payload$.externalId, {
explode: true,
charEncoding: "percent",
@@ -2421,6 +2440,7 @@ export class Analytics extends ClientSDK {
charEncoding: "percent",
}),
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {

View File

@@ -1236,7 +1236,7 @@ export class Links extends ClientSDK {
* Update a link
*
* @remarks
* Update a link for the authenticated workspace.
* Update a link for the authenticated workspace. If there's no change, returns as is.
*/
async update(
linkId: string,
@@ -1698,4 +1698,233 @@ export class Links extends ClientSDK {
);
}
}
/**
* Upsert a link
*
* @remarks
* Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, returns as is if there's no change, or update it. Otherwise, a new link will be created.
*/
async upsert(
request?: operations.UpsertLinkRequestBody | undefined,
options?: RequestOptions
): Promise<components.LinkSchema> {
const input$ = request;
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Content-Type", "application/json");
headers$.set("Accept", "application/json");
const payload$ = schemas$.parse(
input$,
(value$) => operations.UpsertLinkRequestBody$.outboundSchema.optional().parse(value$),
"Input validation failed"
);
const body$ =
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
const path$ = this.templateURLComponent("/links/upsert")();
const query$ = [
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
explode: true,
charEncoding: "percent",
}),
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
explode: true,
charEncoding: "percent",
}),
]
.filter(Boolean)
.join("&");
let security$;
if (typeof this.options$.token === "function") {
security$ = { token: await this.options$.token() };
} else if (this.options$.token) {
security$ = { token: this.options$.token };
} else {
security$ = {};
}
const context = {
operationID: "upsertLink",
oAuth2Scopes: [],
securitySource: this.options$.token,
};
const securitySettings$ = this.resolveGlobalSecurity(security$);
const doOptions = {
context,
errorCodes: [
"400",
"401",
"403",
"404",
"409",
"410",
"422",
"429",
"4XX",
"500",
"5XX",
],
};
const request$ = this.createRequest$(
context,
{
security: securitySettings$,
method: "PUT",
path: path$,
headers: headers$,
query: query$,
body: body$,
},
options
);
const response = await this.do$(request$, doOptions);
const responseFields$ = {
HttpMeta: {
Response: response,
Request: request$,
},
};
if (this.matchResponse(response, 200, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return components.LinkSchema$.inboundSchema.parse(val$);
},
"Response validation failed"
);
return result;
} else if (this.matchResponse(response, 400, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.BadRequest$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 401, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.Unauthorized$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 403, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.Forbidden$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 404, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.NotFound$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 409, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.Conflict$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 410, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.InviteExpired$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 422, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.UnprocessableEntity$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 429, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.RateLimitExceeded$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else if (this.matchResponse(response, 500, "application/json")) {
const responseBody = await response.json();
const result = schemas$.parse(
responseBody,
(val$) => {
return errors.InternalServerError$.inboundSchema.parse({
...responseFields$,
...val$,
});
},
"Response validation failed"
);
throw result;
} else {
const responseBody = await response.text();
throw new errors.SDKError(
"Unexpected API response status or content-type",
response,
responseBody
);
}
}
}

View File

@@ -45,11 +45,8 @@ export class QRCodes extends ClientSDK {
* @remarks
* Retrieve a QR code for a link.
*/
async get(
request?: operations.GetQRCodeRequest | undefined,
options?: RequestOptions
): Promise<string> {
const input$ = typeof request === "undefined" ? {} : request;
async get(request: operations.GetQRCodeRequest, options?: RequestOptions): Promise<string> {
const input$ = request;
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Accept", "image/png");