mirror of
https://github.com/LukeHagar/dub-node.git
synced 2025-12-06 04:19:37 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.1 (#110)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
committed by
GitHub
parent
46730b1c0d
commit
9e5a1351bd
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: f28179cc-ef59-426d-9e85-60cec22fc642
|
||||
management:
|
||||
docChecksum: 325f4eff71e08b965879b29076b63bb6
|
||||
docChecksum: e93bbcff56bcb0510ebfb526412ef8a9
|
||||
docVersion: 0.0.1
|
||||
speakeasyVersion: 1.294.0
|
||||
generationVersion: 2.333.3
|
||||
releaseVersion: 0.29.6
|
||||
configChecksum: 3f9a0bc54abf62009e85b3c1e8c5bb7e
|
||||
speakeasyVersion: 1.295.1
|
||||
generationVersion: 2.335.5
|
||||
releaseVersion: 0.29.7
|
||||
configChecksum: 4ed5347cd2de9537850aed0492bdace8
|
||||
repoURL: https://github.com/dubinc/dub-node.git
|
||||
installationURL: https://github.com/dubinc/dub-node
|
||||
published: true
|
||||
@@ -14,7 +14,7 @@ features:
|
||||
typescript:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.5
|
||||
core: 3.9.4
|
||||
core: 3.9.6
|
||||
deprecations: 2.81.1
|
||||
examples: 2.81.4
|
||||
flattening: 2.81.1
|
||||
@@ -49,6 +49,7 @@ generatedFiles:
|
||||
- src/lib/config.ts
|
||||
- src/lib/encodings.ts
|
||||
- src/lib/http.ts
|
||||
- src/lib/primitives.ts
|
||||
- src/lib/retries.ts
|
||||
- src/lib/schemas.ts
|
||||
- src/lib/sdks.ts
|
||||
@@ -172,102 +173,138 @@ generatedFiles:
|
||||
- docs/models/errors/internalservererrorcode.md
|
||||
- docs/models/errors/internalservererrorerror.md
|
||||
- docs/models/errors/internalservererror.md
|
||||
- docs/models/operations/getlinksglobals.md
|
||||
- docs/models/operations/queryparamtagids.md
|
||||
- docs/models/operations/queryparamtagnames.md
|
||||
- docs/models/operations/sort.md
|
||||
- docs/models/operations/getlinksrequest.md
|
||||
- docs/models/operations/createlinkglobals.md
|
||||
- docs/models/operations/tagids.md
|
||||
- docs/models/operations/tagnames.md
|
||||
- docs/models/operations/createlinkrequestbody.md
|
||||
- docs/models/operations/getlinkscountglobals.md
|
||||
- docs/models/operations/getlinkscountqueryparamtagids.md
|
||||
- docs/models/operations/getlinkscountqueryparamtagnames.md
|
||||
- docs/models/operations/two.md
|
||||
- docs/models/operations/one.md
|
||||
- docs/models/operations/groupby.md
|
||||
- docs/models/operations/getlinkscountrequest.md
|
||||
- docs/models/operations/getlinkinfoglobals.md
|
||||
- docs/models/operations/getlinkinforequest.md
|
||||
- docs/models/operations/deletelinkglobals.md
|
||||
- docs/models/operations/deletelinkrequest.md
|
||||
- docs/models/operations/deletelinkresponsebody.md
|
||||
- docs/models/operations/updatelinkglobals.md
|
||||
- docs/models/operations/updatelinktagids.md
|
||||
- docs/models/operations/updatelinktagnames.md
|
||||
- docs/models/operations/updatelinkrequestbody.md
|
||||
- docs/models/operations/updatelinkrequest.md
|
||||
- docs/models/operations/bulkcreatelinksglobals.md
|
||||
- docs/models/operations/bulkcreatelinkstagids.md
|
||||
- docs/models/operations/bulkcreatelinkstagnames.md
|
||||
- docs/models/operations/requestbody.md
|
||||
- docs/models/operations/upsertlinkglobals.md
|
||||
- docs/models/operations/upsertlinktagids.md
|
||||
- docs/models/operations/upsertlinktagnames.md
|
||||
- docs/models/operations/upsertlinkrequestbody.md
|
||||
- docs/models/operations/level.md
|
||||
- docs/models/operations/getqrcoderequest.md
|
||||
- docs/models/operations/gettimeseriesbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/gettimeseriesbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/gettimeseriesbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/getcountriesbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getcountriesbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getcitiesbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getcitiesbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getdevicesbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getdevicesbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getdevicesbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/getbrowsersbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getbrowsersbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getbrowsersbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/getosbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getosbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getosbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getosbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/getreferersbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getreferersbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/getreferersbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/gettoplinksbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/gettoplinksbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/gettoplinksbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/gettopurlsbyclicksdeprecatedglobals.md
|
||||
- docs/models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/gettopurlsbyclicksdeprecatedrequest.md
|
||||
- docs/models/operations/gettopurlsbyclicksdeprecatedresponsebody.md
|
||||
- docs/models/operations/getclickscountglobals.md
|
||||
- docs/models/operations/interval.md
|
||||
- docs/models/operations/getclickscountrequest.md
|
||||
- docs/models/operations/gettimeseriesbyclicksglobals.md
|
||||
- docs/models/operations/queryparaminterval.md
|
||||
- docs/models/operations/gettimeseriesbyclicksrequest.md
|
||||
- docs/models/operations/responsebody.md
|
||||
- docs/models/operations/getcountriesbyclicksglobals.md
|
||||
- docs/models/operations/getcountriesbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getcountriesbyclicksrequest.md
|
||||
- docs/models/operations/getcitiesbyclicksglobals.md
|
||||
- docs/models/operations/getcitiesbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getcitiesbyclicksrequest.md
|
||||
- docs/models/operations/getdevicesbyclicksglobals.md
|
||||
- docs/models/operations/getdevicesbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getdevicesbyclicksrequest.md
|
||||
- docs/models/operations/getdevicesbyclicksresponsebody.md
|
||||
- docs/models/operations/getbrowsersbyclicksglobals.md
|
||||
- docs/models/operations/getbrowsersbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getbrowsersbyclicksrequest.md
|
||||
- docs/models/operations/getbrowsersbyclicksresponsebody.md
|
||||
- docs/models/operations/getosbyclicksglobals.md
|
||||
- docs/models/operations/getosbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getosbyclicksrequest.md
|
||||
- docs/models/operations/getosbyclicksresponsebody.md
|
||||
- docs/models/operations/getreferersbyclicksglobals.md
|
||||
- docs/models/operations/getreferersbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/getreferersbyclicksrequest.md
|
||||
- docs/models/operations/getreferersbyclicksresponsebody.md
|
||||
- docs/models/operations/gettoplinksbyclicksglobals.md
|
||||
- docs/models/operations/gettoplinksbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/gettoplinksbyclicksrequest.md
|
||||
- docs/models/operations/gettoplinksbyclicksresponsebody.md
|
||||
- docs/models/operations/gettopurlsbyclicksglobals.md
|
||||
- docs/models/operations/gettopurlsbyclicksqueryparaminterval.md
|
||||
- docs/models/operations/gettopurlsbyclicksrequest.md
|
||||
- docs/models/operations/gettopurlsbyclicksresponsebody.md
|
||||
- docs/models/operations/getclickscountdeprecatedglobals.md
|
||||
- docs/models/operations/getclickscountdeprecatedqueryparaminterval.md
|
||||
- docs/models/operations/getclickscountdeprecatedrequest.md
|
||||
- docs/models/operations/createworkspacerequestbody.md
|
||||
- docs/models/operations/getworkspacerequest.md
|
||||
- docs/models/operations/gettagsglobals.md
|
||||
- docs/models/operations/gettagsrequest.md
|
||||
- docs/models/operations/createtagglobals.md
|
||||
- docs/models/operations/color.md
|
||||
- docs/models/operations/createtagrequestbody.md
|
||||
- docs/models/operations/listdomainsglobals.md
|
||||
- docs/models/operations/listdomainsrequest.md
|
||||
- docs/models/operations/adddomainglobals.md
|
||||
- docs/models/operations/type.md
|
||||
- docs/models/operations/adddomainrequestbody.md
|
||||
- docs/models/operations/deletedomainglobals.md
|
||||
- docs/models/operations/deletedomainrequest.md
|
||||
- docs/models/operations/deletedomainresponsebody.md
|
||||
- docs/models/operations/updatedomainglobals.md
|
||||
- docs/models/operations/updatedomaintype.md
|
||||
- docs/models/operations/updatedomainrequestbody.md
|
||||
- docs/models/operations/updatedomainrequest.md
|
||||
- docs/models/operations/setprimarydomainglobals.md
|
||||
- docs/models/operations/setprimarydomainrequest.md
|
||||
- docs/models/operations/transferdomainglobals.md
|
||||
- docs/models/operations/transferdomainrequestbody.md
|
||||
- docs/models/operations/transferdomainrequest.md
|
||||
- docs/models/operations/trackleadrequestbody.md
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.29.6
|
||||
version: 0.29.7
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
speakeasyVersion: 1.294.0
|
||||
speakeasyVersion: 1.295.1
|
||||
sources:
|
||||
my-first-source:
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:a8dbb050648ecdd7c081fc10c24e1657ea1f9c4c30692ec7581df4165a09e1cc
|
||||
sourceBlobDigest: sha256:b7a1bc6bcfcd424e1bfc546ae100c1014fdc24191489e840493a620c14854846
|
||||
sourceRevisionDigest: sha256:fbe8d2192ee0b7d442465a2d1a264828b3313d7d1102542c7b23e8c9a0efbd99
|
||||
sourceBlobDigest: sha256:558b0b47fb3271ba27cf7602071f28473b8a42ca78e5f663f09fd3bd4a426e3e
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
my-first-target:
|
||||
source: my-first-source
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:a8dbb050648ecdd7c081fc10c24e1657ea1f9c4c30692ec7581df4165a09e1cc
|
||||
sourceBlobDigest: sha256:b7a1bc6bcfcd424e1bfc546ae100c1014fdc24191489e840493a620c14854846
|
||||
sourceRevisionDigest: sha256:fbe8d2192ee0b7d442465a2d1a264828b3313d7d1102542c7b23e8c9a0efbd99
|
||||
sourceBlobDigest: sha256:558b0b47fb3271ba27cf7602071f28473b8a42ca78e5f663f09fd3bd4a426e3e
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -317,3 +317,13 @@ Based on:
|
||||
- [typescript v0.29.6] .
|
||||
### Releases
|
||||
- [NPM v0.29.6] https://www.npmjs.com/package/dub/v/0.29.6 - .
|
||||
|
||||
## 2024-05-23 01:15:27
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.29.7] .
|
||||
### Releases
|
||||
- [NPM v0.29.7] https://www.npmjs.com/package/dub/v/0.29.7 - .
|
||||
1484
codeSamples.yaml
1484
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
9
docs/models/operations/adddomainglobals.md
Normal file
9
docs/models/operations/adddomainglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# AddDomainGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/bulkcreatelinksglobals.md
Normal file
9
docs/models/operations/bulkcreatelinksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# BulkCreateLinksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/createlinkglobals.md
Normal file
9
docs/models/operations/createlinkglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# CreateLinkGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/createtagglobals.md
Normal file
9
docs/models/operations/createtagglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# CreateTagGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/deletedomainglobals.md
Normal file
9
docs/models/operations/deletedomainglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# DeleteDomainGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/deletelinkglobals.md
Normal file
9
docs/models/operations/deletelinkglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# DeleteLinkGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetBrowsersByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getbrowsersbyclicksglobals.md
Normal file
9
docs/models/operations/getbrowsersbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetBrowsersByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCitiesByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getcitiesbyclicksglobals.md
Normal file
9
docs/models/operations/getcitiesbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetCitiesByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetClicksCountDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getclickscountglobals.md
Normal file
9
docs/models/operations/getclickscountglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetClicksCountGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCountriesByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getcountriesbyclicksglobals.md
Normal file
9
docs/models/operations/getcountriesbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetCountriesByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetDevicesByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getdevicesbyclicksglobals.md
Normal file
9
docs/models/operations/getdevicesbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetDevicesByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getlinkinfoglobals.md
Normal file
9
docs/models/operations/getlinkinfoglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetLinkInfoGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getlinkscountglobals.md
Normal file
9
docs/models/operations/getlinkscountglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetLinksCountGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getlinksglobals.md
Normal file
9
docs/models/operations/getlinksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetLinksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getosbyclicksdeprecatedglobals.md
Normal file
9
docs/models/operations/getosbyclicksdeprecatedglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetOSByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getosbyclicksglobals.md
Normal file
9
docs/models/operations/getosbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetOSByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetReferersByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/getreferersbyclicksglobals.md
Normal file
9
docs/models/operations/getreferersbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetReferersByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/gettagsglobals.md
Normal file
9
docs/models/operations/gettagsglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTagsGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetTimeseriesByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/gettimeseriesbyclicksglobals.md
Normal file
9
docs/models/operations/gettimeseriesbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTimeseriesByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetTopLinksByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/gettoplinksbyclicksglobals.md
Normal file
9
docs/models/operations/gettoplinksbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTopLinksByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetTopURLsByClicksDeprecatedGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/gettopurlsbyclicksglobals.md
Normal file
9
docs/models/operations/gettopurlsbyclicksglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTopURLsByClicksGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/listdomainsglobals.md
Normal file
9
docs/models/operations/listdomainsglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ListDomainsGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/setprimarydomainglobals.md
Normal file
9
docs/models/operations/setprimarydomainglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# SetPrimaryDomainGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/transferdomainglobals.md
Normal file
9
docs/models/operations/transferdomainglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# TransferDomainGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/updatedomainglobals.md
Normal file
9
docs/models/operations/updatedomainglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpdateDomainGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/updatelinkglobals.md
Normal file
9
docs/models/operations/updatelinkglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpdateLinkGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/upsertlinkglobals.md
Normal file
9
docs/models/operations/upsertlinkglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpsertLinkGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
@@ -50,7 +50,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetTimeseriesByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetTimeseriesByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -103,7 +103,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.ClicksByCountry[]](../../models/.md)>**
|
||||
**Promise\<[components.ClicksByCountry[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -156,7 +156,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.ClicksByCities[]](../../models/.md)>**
|
||||
**Promise\<[components.ClicksByCities[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -209,7 +209,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetDevicesByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetDevicesByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -262,7 +262,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetBrowsersByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetBrowsersByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -315,7 +315,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetOSByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetOSByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -368,7 +368,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetReferersByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetReferersByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -421,7 +421,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetTopLinksByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetTopLinksByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -474,7 +474,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetTopURLsByClicksDeprecatedResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetTopURLsByClicksDeprecatedResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -50,7 +50,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[number](../../models/.md)>**
|
||||
**Promise\<[number](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -101,7 +101,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.ResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.ResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -152,7 +152,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.ClicksByCountry[]](../../models/.md)>**
|
||||
**Promise\<[components.ClicksByCountry[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -203,7 +203,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.ClicksByCities[]](../../models/.md)>**
|
||||
**Promise\<[components.ClicksByCities[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -254,7 +254,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetDevicesByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetDevicesByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -305,7 +305,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetBrowsersByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetBrowsersByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -356,7 +356,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetOSByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetOSByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -407,7 +407,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetReferersByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetReferersByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -458,7 +458,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetTopLinksByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetTopLinksByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -509,7 +509,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetTopURLsByClicksResponseBody[]](../../models/.md)>**
|
||||
**Promise\<[operations.GetTopURLsByClicksResponseBody[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -562,7 +562,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[number](../../models/.md)>**
|
||||
**Promise\<[number](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -45,7 +45,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.DomainSchema[]](../../models/.md)>**
|
||||
**Promise\<[components.DomainSchema[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -98,7 +98,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.DomainSchema](../../models/components/domainschema.md)>**
|
||||
**Promise\<[components.DomainSchema](../../models/components/domainschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -149,7 +149,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.DeleteDomainResponseBody](../../models/operations/deletedomainresponsebody.md)>**
|
||||
**Promise\<[operations.DeleteDomainResponseBody](../../models/operations/deletedomainresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -201,7 +201,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.DomainSchema](../../models/components/domainschema.md)>**
|
||||
**Promise\<[components.DomainSchema](../../models/components/domainschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -252,7 +252,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.DomainSchema](../../models/components/domainschema.md)>**
|
||||
**Promise\<[components.DomainSchema](../../models/components/domainschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -306,7 +306,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.DomainSchema](../../models/components/domainschema.md)>**
|
||||
**Promise\<[components.DomainSchema](../../models/components/domainschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -47,7 +47,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema[]](../../models/.md)>**
|
||||
**Promise\<[components.LinkSchema[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -100,7 +100,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema](../../models/components/linkschema.md)>**
|
||||
**Promise\<[components.LinkSchema](../../models/components/linkschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -151,7 +151,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[number](../../models/.md)>**
|
||||
**Promise\<[number](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -202,7 +202,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema](../../models/components/linkschema.md)>**
|
||||
**Promise\<[components.LinkSchema](../../models/components/linkschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -253,7 +253,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.DeleteLinkResponseBody](../../models/operations/deletelinkresponsebody.md)>**
|
||||
**Promise\<[operations.DeleteLinkResponseBody](../../models/operations/deletelinkresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -307,7 +307,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema](../../models/components/linkschema.md)>**
|
||||
**Promise\<[components.LinkSchema](../../models/components/linkschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -362,7 +362,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema[]](../../models/.md)>**
|
||||
**Promise\<[components.LinkSchema[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -415,7 +415,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.LinkSchema](../../models/components/linkschema.md)>**
|
||||
**Promise\<[components.LinkSchema](../../models/components/linkschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -42,7 +42,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetMetatagsResponseBody](../../models/operations/getmetatagsresponsebody.md)>**
|
||||
**Promise\<[operations.GetMetatagsResponseBody](../../models/operations/getmetatagsresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -42,7 +42,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[string](../../models/.md)>**
|
||||
**Promise\<[string](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -41,7 +41,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.TagSchema[]](../../models/.md)>**
|
||||
**Promise\<[components.TagSchema[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -94,7 +94,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.TagSchema](../../models/components/tagschema.md)>**
|
||||
**Promise\<[components.TagSchema](../../models/components/tagschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -46,7 +46,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.TrackLeadResponseBody](../../models/operations/trackleadresponsebody.md)>**
|
||||
**Promise\<[operations.TrackLeadResponseBody](../../models/operations/trackleadresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -102,7 +102,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.TrackSaleResponseBody](../../models/operations/tracksaleresponsebody.md)>**
|
||||
**Promise\<[operations.TrackSaleResponseBody](../../models/operations/tracksaleresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -155,7 +155,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.TrackCustomerResponseBody](../../models/operations/trackcustomerresponsebody.md)>**
|
||||
**Promise\<[operations.TrackCustomerResponseBody](../../models/operations/trackcustomerresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
@@ -41,7 +41,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.WorkspaceSchema[]](../../models/.md)>**
|
||||
**Promise\<[components.WorkspaceSchema[]](../../models/.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -95,7 +95,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>**
|
||||
**Promise\<[components.WorkspaceSchema](../../models/components/workspaceschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -148,7 +148,7 @@ run();
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>**
|
||||
**Promise\<[components.WorkspaceSchema](../../models/components/workspaceschema.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.6",
|
||||
"version": "0.29.7",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./models/errors": "./src/models/errors/index.ts",
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.6",
|
||||
"version": "0.29.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dub",
|
||||
"version": "0.29.6",
|
||||
"version": "0.29.7",
|
||||
"devDependencies": {
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@types/node": "^20.12.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.6",
|
||||
"version": "0.29.7",
|
||||
"author": "Dub",
|
||||
"main": "./index.js",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
||||
export const SDK_METADATA = {
|
||||
language: "typescript",
|
||||
openapiDocVersion: "0.0.1",
|
||||
sdkVersion: "0.29.6",
|
||||
genVersion: "2.333.3",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.6 2.333.3 0.0.1 dub",
|
||||
sdkVersion: "0.29.7",
|
||||
genVersion: "2.335.5",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.7 2.335.5 0.0.1 dub",
|
||||
} as const;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import { bytesToBase64 } from "./base64";
|
||||
import { isPlainObject } from "./primitives";
|
||||
|
||||
export class EncodingError extends Error {
|
||||
constructor(message: string) {
|
||||
@@ -321,12 +322,6 @@ function explode(key: string, value: unknown): [string, unknown][] {
|
||||
}
|
||||
}
|
||||
|
||||
function isPlainObject(value: unknown): value is object {
|
||||
if (typeof value !== "object" || value == null) return false;
|
||||
const proto = Object.getPrototypeOf(value);
|
||||
return proto === null || proto === Object.prototype;
|
||||
}
|
||||
|
||||
function serializeValue(value: unknown): string {
|
||||
if (value === null) {
|
||||
return "null";
|
||||
|
||||
645
src/lib/http.ts
645
src/lib/http.ts
@@ -2,38 +2,40 @@
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export type Fetcher = (
|
||||
input: RequestInfo | URL,
|
||||
init?: RequestInit,
|
||||
) => Promise<Response>;
|
||||
import { never as znever } from "zod";
|
||||
import { parse } from "./schemas";
|
||||
import { isPlainObject } from "./primitives";
|
||||
import * as errors from "../models/errors";
|
||||
|
||||
export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
||||
|
||||
export type Awaitable<T> = T | Promise<T>;
|
||||
|
||||
const DEFAULT_FETCHER: Fetcher = (input, init) => {
|
||||
// If input is a Request and init is undefined, Bun will discard the method,
|
||||
// headers, body and other options that were set on the request object.
|
||||
// Node.js and browers would ignore an undefined init value. This check is
|
||||
// therefore needed for interop with Bun.
|
||||
if (init == null) {
|
||||
return fetch(input);
|
||||
} else {
|
||||
return fetch(input, init);
|
||||
}
|
||||
// If input is a Request and init is undefined, Bun will discard the method,
|
||||
// headers, body and other options that were set on the request object.
|
||||
// Node.js and browers would ignore an undefined init value. This check is
|
||||
// therefore needed for interop with Bun.
|
||||
if (init == null) {
|
||||
return fetch(input);
|
||||
} else {
|
||||
return fetch(input, init);
|
||||
}
|
||||
};
|
||||
|
||||
export type RequestInput = {
|
||||
/**
|
||||
* The URL the request will use.
|
||||
*/
|
||||
url: URL;
|
||||
/**
|
||||
* Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
|
||||
*/
|
||||
options?: RequestInit | undefined;
|
||||
/**
|
||||
* The URL the request will use.
|
||||
*/
|
||||
url: URL;
|
||||
/**
|
||||
* Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
|
||||
*/
|
||||
options?: RequestInit | undefined;
|
||||
};
|
||||
|
||||
export interface HTTPClientOptions {
|
||||
fetcher?: Fetcher;
|
||||
fetcher?: Fetcher;
|
||||
}
|
||||
|
||||
export type BeforeRequestHook = (req: Request) => Awaitable<Request | void>;
|
||||
@@ -41,223 +43,466 @@ export type RequestErrorHook = (err: unknown, req: Request) => Awaitable<void>;
|
||||
export type ResponseHook = (res: Response, req: Request) => Awaitable<void>;
|
||||
|
||||
export class HTTPClient {
|
||||
private fetcher: Fetcher;
|
||||
private requestHooks: BeforeRequestHook[] = [];
|
||||
private requestErrorHooks: RequestErrorHook[] = [];
|
||||
private responseHooks: ResponseHook[] = [];
|
||||
private fetcher: Fetcher;
|
||||
private requestHooks: BeforeRequestHook[] = [];
|
||||
private requestErrorHooks: RequestErrorHook[] = [];
|
||||
private responseHooks: ResponseHook[] = [];
|
||||
|
||||
constructor(private options: HTTPClientOptions = {}) {
|
||||
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
||||
}
|
||||
|
||||
async request(request: Request): Promise<Response> {
|
||||
let req = request;
|
||||
for (const hook of this.requestHooks) {
|
||||
const nextRequest = await hook(req);
|
||||
if (nextRequest) {
|
||||
req = nextRequest;
|
||||
}
|
||||
constructor(private options: HTTPClientOptions = {}) {
|
||||
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await this.fetcher(req);
|
||||
async request(request: Request): Promise<Response> {
|
||||
let req = request;
|
||||
for (const hook of this.requestHooks) {
|
||||
const nextRequest = await hook(req);
|
||||
if (nextRequest) {
|
||||
req = nextRequest;
|
||||
}
|
||||
}
|
||||
|
||||
for (const hook of this.responseHooks) {
|
||||
await hook(res, req);
|
||||
}
|
||||
try {
|
||||
const res = await this.fetcher(req);
|
||||
|
||||
return res;
|
||||
} catch (err) {
|
||||
for (const hook of this.requestErrorHooks) {
|
||||
await hook(err, req);
|
||||
}
|
||||
for (const hook of this.responseHooks) {
|
||||
await hook(res, req);
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
} catch (err) {
|
||||
for (const hook of this.requestErrorHooks) {
|
||||
await hook(err, req);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a hook that is called before a request is made. The hook function
|
||||
* can mutate the request or return a new request. This may be useful to add
|
||||
* additional information to request such as request IDs and tracing headers.
|
||||
*/
|
||||
addHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
||||
/**
|
||||
* Registers a hook that is called when a request cannot be made due to a
|
||||
* network error.
|
||||
*/
|
||||
addHook(hook: "requestError", fn: RequestErrorHook): this;
|
||||
/**
|
||||
* Registers a hook that is called when a response has been received from the
|
||||
* server.
|
||||
*/
|
||||
addHook(hook: "response", fn: ResponseHook): this;
|
||||
addHook(
|
||||
...args:
|
||||
| [hook: "beforeRequest", fn: BeforeRequestHook]
|
||||
| [hook: "requestError", fn: RequestErrorHook]
|
||||
| [hook: "response", fn: ResponseHook]
|
||||
) {
|
||||
if (args[0] === "beforeRequest") {
|
||||
this.requestHooks.push(args[1]);
|
||||
} else if (args[0] === "requestError") {
|
||||
this.requestErrorHooks.push(args[1]);
|
||||
} else if (args[0] === "response") {
|
||||
this.responseHooks.push(args[1]);
|
||||
} else {
|
||||
throw new Error(`Invalid hook type: ${args[0]}`);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "requestError", fn: RequestErrorHook): this;
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "response", fn: ResponseHook): this;
|
||||
removeHook(
|
||||
...args:
|
||||
| [hook: "beforeRequest", fn: BeforeRequestHook]
|
||||
| [hook: "requestError", fn: RequestErrorHook]
|
||||
| [hook: "response", fn: ResponseHook]
|
||||
): this {
|
||||
let target: unknown[];
|
||||
if (args[0] === "beforeRequest") {
|
||||
target = this.requestHooks;
|
||||
} else if (args[0] === "requestError") {
|
||||
target = this.requestErrorHooks;
|
||||
} else if (args[0] === "response") {
|
||||
target = this.responseHooks;
|
||||
} else {
|
||||
throw new Error(`Invalid hook type: ${args[0]}`);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
const index = target.findIndex((v) => v === args[1]);
|
||||
if (index >= 0) {
|
||||
target.splice(index, 1);
|
||||
/**
|
||||
* Registers a hook that is called before a request is made. The hook function
|
||||
* can mutate the request or return a new request. This may be useful to add
|
||||
* additional information to request such as request IDs and tracing headers.
|
||||
*/
|
||||
addHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
||||
/**
|
||||
* Registers a hook that is called when a request cannot be made due to a
|
||||
* network error.
|
||||
*/
|
||||
addHook(hook: "requestError", fn: RequestErrorHook): this;
|
||||
/**
|
||||
* Registers a hook that is called when a response has been received from the
|
||||
* server.
|
||||
*/
|
||||
addHook(hook: "response", fn: ResponseHook): this;
|
||||
addHook(
|
||||
...args:
|
||||
| [hook: "beforeRequest", fn: BeforeRequestHook]
|
||||
| [hook: "requestError", fn: RequestErrorHook]
|
||||
| [hook: "response", fn: ResponseHook]
|
||||
) {
|
||||
if (args[0] === "beforeRequest") {
|
||||
this.requestHooks.push(args[1]);
|
||||
} else if (args[0] === "requestError") {
|
||||
this.requestErrorHooks.push(args[1]);
|
||||
} else if (args[0] === "response") {
|
||||
this.responseHooks.push(args[1]);
|
||||
} else {
|
||||
throw new Error(`Invalid hook type: ${args[0]}`);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "requestError", fn: RequestErrorHook): this;
|
||||
/** Removes a hook that was previously registered with `addHook`. */
|
||||
removeHook(hook: "response", fn: ResponseHook): this;
|
||||
removeHook(
|
||||
...args:
|
||||
| [hook: "beforeRequest", fn: BeforeRequestHook]
|
||||
| [hook: "requestError", fn: RequestErrorHook]
|
||||
| [hook: "response", fn: ResponseHook]
|
||||
): this {
|
||||
let target: unknown[];
|
||||
if (args[0] === "beforeRequest") {
|
||||
target = this.requestHooks;
|
||||
} else if (args[0] === "requestError") {
|
||||
target = this.requestErrorHooks;
|
||||
} else if (args[0] === "response") {
|
||||
target = this.responseHooks;
|
||||
} else {
|
||||
throw new Error(`Invalid hook type: ${args[0]}`);
|
||||
}
|
||||
|
||||
clone(): HTTPClient {
|
||||
const child = new HTTPClient(this.options);
|
||||
child.requestHooks = this.requestHooks.slice();
|
||||
child.requestErrorHooks = this.requestErrorHooks.slice();
|
||||
child.responseHooks = this.responseHooks.slice();
|
||||
const index = target.findIndex((v) => v === args[1]);
|
||||
if (index >= 0) {
|
||||
target.splice(index, 1);
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
clone(): HTTPClient {
|
||||
const child = new HTTPClient(this.options);
|
||||
child.requestHooks = this.requestHooks.slice();
|
||||
child.requestErrorHooks = this.requestErrorHooks.slice();
|
||||
child.responseHooks = this.responseHooks.slice();
|
||||
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
export type StatusCodePredicate = number | string | (number | string)[];
|
||||
|
||||
// A semicolon surrounded by optional whitespace characters is used to separate
|
||||
// segments in a media type string.
|
||||
const mediaParamSeparator = /\s*;\s*/g;
|
||||
|
||||
function matchContentType(response: Response, pattern: string): boolean {
|
||||
// `*` is a special case which means anything is acceptable.
|
||||
if (pattern === "*") {
|
||||
return true;
|
||||
}
|
||||
|
||||
let contentType =
|
||||
response.headers.get("content-type")?.trim() || "application/octet-stream";
|
||||
contentType = contentType.toLowerCase();
|
||||
|
||||
const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator);
|
||||
const [wantType = "", ...wantParams] = wantParts;
|
||||
|
||||
if (wantType.split("/").length !== 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const gotParts = contentType.split(mediaParamSeparator);
|
||||
const [gotType = "", ...gotParams] = gotParts;
|
||||
|
||||
const [type = "", subtype = ""] = gotType.split("/");
|
||||
if (!type || !subtype) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
wantType !== "*/*" &&
|
||||
gotType !== wantType &&
|
||||
`${type}/*` !== wantType &&
|
||||
`*/${subtype}` !== wantType
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gotParams.length < wantParams.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const params = new Set(gotParams);
|
||||
for (const wantParam of wantParams) {
|
||||
if (!params.has(wantParam)) {
|
||||
return false;
|
||||
// `*` is a special case which means anything is acceptable.
|
||||
if (pattern === "*") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
let contentType = response.headers.get("content-type")?.trim() || "application/octet-stream";
|
||||
contentType = contentType.toLowerCase();
|
||||
|
||||
const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator);
|
||||
const [wantType = "", ...wantParams] = wantParts;
|
||||
|
||||
if (wantType.split("/").length !== 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const gotParts = contentType.split(mediaParamSeparator);
|
||||
const [gotType = "", ...gotParams] = gotParts;
|
||||
|
||||
const [type = "", subtype = ""] = gotType.split("/");
|
||||
if (!type || !subtype) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
wantType !== "*/*" &&
|
||||
gotType !== wantType &&
|
||||
`${type}/*` !== wantType &&
|
||||
`*/${subtype}` !== wantType
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gotParams.length < wantParams.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const params = new Set(gotParams);
|
||||
for (const wantParam of wantParams) {
|
||||
if (!params.has(wantParam)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const codeRangeRE = new RegExp("^[0-9]xx$", "i");
|
||||
|
||||
export function matchStatusCode(
|
||||
response: Response,
|
||||
codes: number | string | (number | string)[],
|
||||
): boolean {
|
||||
const actual = `${response.status}`;
|
||||
const expectedCodes = Array.isArray(codes) ? codes : [codes];
|
||||
if (!expectedCodes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return expectedCodes.some((ec) => {
|
||||
const code = `${ec}`;
|
||||
|
||||
if (code === "default") {
|
||||
return true;
|
||||
export function matchStatusCode(response: Response, codes: StatusCodePredicate): boolean {
|
||||
const actual = `${response.status}`;
|
||||
const expectedCodes = Array.isArray(codes) ? codes : [codes];
|
||||
if (!expectedCodes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!codeRangeRE.test(`${code}`)) {
|
||||
return code === actual;
|
||||
}
|
||||
return expectedCodes.some((ec) => {
|
||||
const code = `${ec}`;
|
||||
|
||||
const expectFamily = code.charAt(0);
|
||||
if (!expectFamily) {
|
||||
throw new Error("Invalid status code range");
|
||||
}
|
||||
if (code === "default") {
|
||||
return true;
|
||||
}
|
||||
|
||||
const actualFamily = actual.charAt(0);
|
||||
if (!actualFamily) {
|
||||
throw new Error(`Invalid response status code: ${actual}`);
|
||||
}
|
||||
if (!codeRangeRE.test(`${code}`)) {
|
||||
return code === actual;
|
||||
}
|
||||
|
||||
return actualFamily === expectFamily;
|
||||
});
|
||||
const expectFamily = code.charAt(0);
|
||||
if (!expectFamily) {
|
||||
throw new Error("Invalid status code range");
|
||||
}
|
||||
|
||||
const actualFamily = actual.charAt(0);
|
||||
if (!actualFamily) {
|
||||
throw new Error(`Invalid response status code: ${actual}`);
|
||||
}
|
||||
|
||||
return actualFamily === expectFamily;
|
||||
});
|
||||
}
|
||||
|
||||
export function matchResponse(
|
||||
response: Response,
|
||||
code: number | string | (number | string)[],
|
||||
contentTypePattern: string,
|
||||
response: Response,
|
||||
code: StatusCodePredicate,
|
||||
contentTypePattern: string
|
||||
): boolean {
|
||||
return (
|
||||
matchStatusCode(response, code) &&
|
||||
matchContentType(response, contentTypePattern)
|
||||
);
|
||||
return matchStatusCode(response, code) && matchContentType(response, contentTypePattern);
|
||||
}
|
||||
|
||||
const headerValRE = /, */;
|
||||
export function unpackHeaders(headers: Headers): Record<string, string[]> {
|
||||
const out: Record<string, string[]> = {};
|
||||
const out: Record<string, string[]> = {};
|
||||
|
||||
for (const [k, v] of headers.entries()) {
|
||||
out[k] = v.split(headerValRE);
|
||||
}
|
||||
for (const [k, v] of headers.entries()) {
|
||||
out[k] = v.split(headerValRE);
|
||||
}
|
||||
|
||||
return out;
|
||||
return out;
|
||||
}
|
||||
|
||||
type ResponseMatcherSchema<T> =
|
||||
| { parse: (data: unknown) => T }
|
||||
| { inboundSchema: { parse: (data: unknown) => T } };
|
||||
|
||||
type SerializationMethod = "sse" | "json" | "rawBytes" | "rawStream" | "text" | "void" | "fail";
|
||||
|
||||
const defaultContentTypes: Record<SerializationMethod, string> = {
|
||||
sse: "text/event-stream",
|
||||
json: "application/json",
|
||||
rawBytes: "application/octet-stream",
|
||||
rawStream: "application/octet-stream",
|
||||
text: "text/plain",
|
||||
void: "",
|
||||
fail: "",
|
||||
};
|
||||
|
||||
type ResponsePredicateMatch<Result> = {
|
||||
method: SerializationMethod;
|
||||
codes: StatusCodePredicate;
|
||||
ctype: string;
|
||||
schema: ResponseMatcherSchema<Result | Error>;
|
||||
hdrs: boolean;
|
||||
key: string | undefined;
|
||||
err: boolean;
|
||||
fail: boolean;
|
||||
};
|
||||
|
||||
type ResponsePredicateOptions = {
|
||||
/** Content type to match on. */
|
||||
ctype?: string;
|
||||
/** Pass HTTP headers to deserializer. */
|
||||
hdrs?: boolean;
|
||||
} & (
|
||||
| {
|
||||
/** The result key to store the deserialized value into. */
|
||||
key?: string;
|
||||
fail?: never;
|
||||
err?: never;
|
||||
}
|
||||
| {
|
||||
/** Indicates the matched response must throw the built-in error. */
|
||||
fail: true;
|
||||
key?: never;
|
||||
err?: never;
|
||||
}
|
||||
| {
|
||||
/** Indicates the matched response is a custom error. */
|
||||
err: true;
|
||||
key?: never;
|
||||
fail?: never;
|
||||
}
|
||||
);
|
||||
|
||||
export class ResponseMatcher<Result> {
|
||||
private predicates: ResponsePredicateMatch<Result>[] = [];
|
||||
|
||||
#any<T extends Result | Error>(
|
||||
method: SerializationMethod,
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: ResponsePredicateOptions
|
||||
) {
|
||||
const ctype = opts?.ctype || defaultContentTypes[method];
|
||||
const hdrs = !!opts?.hdrs;
|
||||
const key = opts?.key;
|
||||
const err = !!opts?.err;
|
||||
const fail = !!opts?.fail;
|
||||
this.predicates.push({
|
||||
method,
|
||||
codes,
|
||||
ctype,
|
||||
schema,
|
||||
hdrs,
|
||||
key,
|
||||
err,
|
||||
fail,
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
json<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: ResponsePredicateOptions
|
||||
): this {
|
||||
return this.#any("json", codes, schema, opts);
|
||||
}
|
||||
bytes<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: ResponsePredicateOptions
|
||||
): this {
|
||||
return this.#any("rawBytes", codes, schema, opts);
|
||||
}
|
||||
stream<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: ResponsePredicateOptions
|
||||
): this {
|
||||
return this.#any("rawStream", codes, schema, opts);
|
||||
}
|
||||
text<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: ResponsePredicateOptions
|
||||
): this {
|
||||
return this.#any("text", codes, schema, opts);
|
||||
}
|
||||
sse<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: Omit<ResponsePredicateOptions, "err" | "fail">
|
||||
): this {
|
||||
return this.#any("sse", codes, schema, opts);
|
||||
}
|
||||
void<T extends Result | Error>(
|
||||
codes: StatusCodePredicate,
|
||||
schema: ResponseMatcherSchema<T>,
|
||||
opts?: Pick<ResponsePredicateOptions, "hdrs">
|
||||
): this {
|
||||
return this.#any("void", codes, schema, opts);
|
||||
}
|
||||
fail(codes: StatusCodePredicate): this {
|
||||
return this.#any("fail", codes, znever(), { fail: true });
|
||||
}
|
||||
|
||||
async match(
|
||||
response: Response,
|
||||
// flat
|
||||
options?: {
|
||||
resultKey?: string;
|
||||
extraFields?: Record<string, unknown>;
|
||||
}
|
||||
): Promise<[result: Result, rawData: unknown]> {
|
||||
let pred: ResponsePredicateMatch<Result> | undefined;
|
||||
for (const predicate of this.predicates) {
|
||||
const { codes, ctype } = predicate;
|
||||
if (ctype && matchResponse(response, codes, ctype)) {
|
||||
pred = predicate;
|
||||
break;
|
||||
} else if (!ctype && matchStatusCode(response, codes)) {
|
||||
pred = predicate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pred == null) {
|
||||
const responseBody = await response.text();
|
||||
throw new errors.SDKError(
|
||||
"Unexpected API response status or content-type",
|
||||
response,
|
||||
responseBody
|
||||
);
|
||||
}
|
||||
|
||||
const { method, schema } = pred;
|
||||
|
||||
let raw: unknown;
|
||||
switch (method) {
|
||||
case "json":
|
||||
raw = await response.json();
|
||||
break;
|
||||
case "rawBytes":
|
||||
raw = await response.arrayBuffer();
|
||||
break;
|
||||
case "rawStream":
|
||||
raw = response.body;
|
||||
break;
|
||||
case "text":
|
||||
raw = await response.text();
|
||||
break;
|
||||
case "sse":
|
||||
raw = response.body;
|
||||
break;
|
||||
case "void":
|
||||
raw = await discardResponseBody(response);
|
||||
break;
|
||||
case "fail":
|
||||
raw = await response.text();
|
||||
break;
|
||||
default:
|
||||
method satisfies never;
|
||||
throw new Error(`Unsupported response type: ${method}`);
|
||||
}
|
||||
|
||||
const resultKey = pred.key || options?.resultKey;
|
||||
let data: unknown;
|
||||
if (pred.fail) {
|
||||
throw new errors.SDKError(
|
||||
"API error occurred",
|
||||
response,
|
||||
typeof raw === "string" ? raw : ""
|
||||
);
|
||||
} else if (pred.err) {
|
||||
data = {
|
||||
...options?.extraFields,
|
||||
...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
|
||||
...(isPlainObject(raw) ? raw : null),
|
||||
};
|
||||
} else if (resultKey) {
|
||||
data = {
|
||||
...options?.extraFields,
|
||||
...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
|
||||
[resultKey]: raw,
|
||||
};
|
||||
} else if (pred.hdrs) {
|
||||
data = {
|
||||
...options?.extraFields,
|
||||
...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
|
||||
...(isPlainObject(raw) ? raw : null),
|
||||
};
|
||||
} else {
|
||||
data = raw;
|
||||
}
|
||||
|
||||
const parser = "inboundSchema" in schema ? schema.inboundSchema : schema;
|
||||
const body = parse(data, (v: unknown) => parser.parse(v), "Response validation failed");
|
||||
|
||||
if (body instanceof Error) {
|
||||
throw body;
|
||||
}
|
||||
|
||||
return [body, raw];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Discards the response body to free up resources.
|
||||
*
|
||||
* To learn why this is need, see the undici docs:
|
||||
* https://undici.nodejs.org/#/?id=garbage-collection
|
||||
*/
|
||||
export async function discardResponseBody(res: Response) {
|
||||
const reader = res.body?.getReader();
|
||||
if (reader == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let done = false;
|
||||
while (!done) {
|
||||
const res = await reader.read();
|
||||
done = res.done;
|
||||
}
|
||||
} finally {
|
||||
reader.releaseLock();
|
||||
}
|
||||
}
|
||||
|
||||
9
src/lib/primitives.ts
Normal file
9
src/lib/primitives.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export function isPlainObject(value: unknown): value is object {
|
||||
if (typeof value !== "object" || value == null) return false;
|
||||
const proto = Object.getPrototypeOf(value);
|
||||
return proto === null || proto === Object.prototype;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { HTTPClient, matchResponse, matchStatusCode, unpackHeaders } from "./http";
|
||||
import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http";
|
||||
import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security";
|
||||
import { pathToFunc } from "./url";
|
||||
import { encodeForm } from "./encodings";
|
||||
@@ -123,7 +123,7 @@ export class ClientSDK {
|
||||
|
||||
let response = await this.client.request(await this.hooks$.beforeRequest(context, req));
|
||||
|
||||
if (this.matchStatusCode(response, errorCodes)) {
|
||||
if (matchStatusCode(response, errorCodes)) {
|
||||
const result = await this.hooks$.afterError(context, response, null);
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
@@ -136,10 +136,9 @@ export class ClientSDK {
|
||||
return response;
|
||||
}
|
||||
|
||||
protected unpackHeaders = unpackHeaders;
|
||||
|
||||
protected matchStatusCode = matchStatusCode;
|
||||
protected matchResponse = matchResponse;
|
||||
protected matcher<Result>(): ResponseMatcher<Result> {
|
||||
return new ResponseMatcher<Result>();
|
||||
}
|
||||
|
||||
protected templateURLComponent = pathToFunc;
|
||||
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type AddDomainGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The type of redirect to use for this domain.
|
||||
*/
|
||||
@@ -48,6 +56,38 @@ export type AddDomainRequestBody = {
|
||||
placeholder?: string | null | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace AddDomainGlobals$ {
|
||||
export const inboundSchema: z.ZodType<AddDomainGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddDomainGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace Type$ {
|
||||
export const inboundSchema = z.nativeEnum(Type);
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type BulkCreateLinksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The unique IDs of the tags assigned to the short link.
|
||||
*/
|
||||
@@ -112,6 +120,38 @@ export type RequestBody = {
|
||||
geo?: components.LinkGeoTargeting | null | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace BulkCreateLinksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<BulkCreateLinksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace BulkCreateLinksTagIds$ {
|
||||
export const inboundSchema: z.ZodType<BulkCreateLinksTagIds, z.ZodTypeDef, unknown> = z.union([
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type CreateLinkGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The unique IDs of the tags assigned to the short link.
|
||||
*/
|
||||
@@ -112,6 +120,38 @@ export type CreateLinkRequestBody = {
|
||||
geo?: components.LinkGeoTargeting | null | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace CreateLinkGlobals$ {
|
||||
export const inboundSchema: z.ZodType<CreateLinkGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace TagIds$ {
|
||||
export const inboundSchema: z.ZodType<TagIds, z.ZodTypeDef, unknown> = z.union([
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type CreateTagGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
||||
*/
|
||||
@@ -33,6 +41,38 @@ export type CreateTagRequestBody = {
|
||||
color?: Color | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace CreateTagGlobals$ {
|
||||
export const inboundSchema: z.ZodType<CreateTagGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace Color$ {
|
||||
export const inboundSchema = z.nativeEnum(Color);
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type DeleteDomainGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type DeleteDomainRequest = {
|
||||
/**
|
||||
* The domain name.
|
||||
@@ -21,6 +29,38 @@ export type DeleteDomainResponseBody = {
|
||||
slug: string;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace DeleteDomainGlobals$ {
|
||||
export const inboundSchema: z.ZodType<DeleteDomainGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace DeleteDomainRequest$ {
|
||||
export const inboundSchema: z.ZodType<DeleteDomainRequest, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type DeleteLinkGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type DeleteLinkRequest = {
|
||||
/**
|
||||
* The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.
|
||||
@@ -21,6 +29,38 @@ export type DeleteLinkResponseBody = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace DeleteLinkGlobals$ {
|
||||
export const inboundSchema: z.ZodType<DeleteLinkGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace DeleteLinkRequest$ {
|
||||
export const inboundSchema: z.ZodType<DeleteLinkRequest, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetBrowsersByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,38 @@ export type GetBrowsersByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetBrowsersByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetBrowsersByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBrowsersByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetBrowsersByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetBrowsersByClicksQueryParamInterval);
|
||||
@@ -122,7 +162,7 @@ export namespace GetBrowsersByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetBrowsersByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetBrowsersByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +182,7 @@ export namespace GetBrowsersByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +203,7 @@ export namespace GetBrowsersByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -184,7 +224,7 @@ export namespace GetBrowsersByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetBrowsersByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetBrowsersByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -204,7 +244,7 @@ export namespace GetBrowsersByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetBrowsersByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetBrowsersByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetBrowsersByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetBrowsersByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetBrowsersByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetBrowsersByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetBrowsersByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,7 +174,7 @@ export namespace GetBrowsersByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetBrowsersByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetBrowsersByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -146,7 +194,7 @@ export namespace GetBrowsersByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -167,7 +215,7 @@ export namespace GetBrowsersByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -192,8 +240,7 @@ export namespace GetBrowsersByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetBrowsersByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetBrowsersByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -213,7 +260,7 @@ export namespace GetBrowsersByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetCitiesByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -97,6 +105,38 @@ export type GetCitiesByClicksRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCitiesByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetCitiesByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCitiesByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCitiesByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetCitiesByClicksQueryParamInterval);
|
||||
@@ -111,7 +151,7 @@ export namespace GetCitiesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCitiesByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetCitiesByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -131,7 +171,7 @@ export namespace GetCitiesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -152,7 +192,7 @@ export namespace GetCitiesByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -173,7 +213,7 @@ export namespace GetCitiesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCitiesByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetCitiesByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -193,7 +233,7 @@ export namespace GetCitiesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetCitiesByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -97,6 +105,46 @@ export type GetCitiesByClicksDeprecatedRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCitiesByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetCitiesByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetCitiesByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCitiesByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetCitiesByClicksDeprecatedQueryParamInterval);
|
||||
@@ -115,7 +163,7 @@ export namespace GetCitiesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCitiesByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetCitiesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -135,7 +183,7 @@ export namespace GetCitiesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -156,7 +204,7 @@ export namespace GetCitiesByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -181,7 +229,7 @@ export namespace GetCitiesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCitiesByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetCitiesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -201,7 +249,7 @@ export namespace GetCitiesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetClicksCountGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -95,6 +103,38 @@ export type GetClicksCountRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetClicksCountGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetClicksCountGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetClicksCountGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace Interval$ {
|
||||
export const inboundSchema = z.nativeEnum(Interval);
|
||||
@@ -109,7 +149,7 @@ export namespace GetClicksCountRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: Interval$.inboundSchema.default("24h"),
|
||||
interval: Interval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -129,7 +169,7 @@ export namespace GetClicksCountRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -150,7 +190,7 @@ export namespace GetClicksCountRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -171,7 +211,7 @@ export namespace GetClicksCountRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: Interval$.outboundSchema.default("24h"),
|
||||
interval: Interval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -191,7 +231,7 @@ export namespace GetClicksCountRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetClicksCountDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -97,6 +105,43 @@ export type GetClicksCountDeprecatedRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetClicksCountDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetClicksCountDeprecatedGlobals, z.ZodTypeDef, unknown> =
|
||||
z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetClicksCountDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetClicksCountDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetClicksCountDeprecatedQueryParamInterval);
|
||||
@@ -112,7 +157,7 @@ export namespace GetClicksCountDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetClicksCountDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetClicksCountDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -132,7 +177,7 @@ export namespace GetClicksCountDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -153,7 +198,7 @@ export namespace GetClicksCountDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -178,7 +223,7 @@ export namespace GetClicksCountDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetClicksCountDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetClicksCountDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -198,7 +243,7 @@ export namespace GetClicksCountDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetCountriesByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -97,6 +105,38 @@ export type GetCountriesByClicksRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCountriesByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetCountriesByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCountriesByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCountriesByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetCountriesByClicksQueryParamInterval);
|
||||
@@ -111,7 +151,7 @@ export namespace GetCountriesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCountriesByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetCountriesByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -131,7 +171,7 @@ export namespace GetCountriesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -152,7 +192,7 @@ export namespace GetCountriesByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -173,7 +213,7 @@ export namespace GetCountriesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetCountriesByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetCountriesByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -193,7 +233,7 @@ export namespace GetCountriesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetCountriesByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -97,6 +105,46 @@ export type GetCountriesByClicksDeprecatedRequest = {
|
||||
root?: boolean | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCountriesByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetCountriesByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetCountriesByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetCountriesByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetCountriesByClicksDeprecatedQueryParamInterval);
|
||||
@@ -115,8 +163,7 @@ export namespace GetCountriesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetCountriesByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetCountriesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -136,7 +183,7 @@ export namespace GetCountriesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -157,7 +204,7 @@ export namespace GetCountriesByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -182,8 +229,7 @@ export namespace GetCountriesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetCountriesByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetCountriesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -203,7 +249,7 @@ export namespace GetCountriesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetDevicesByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,38 @@ export type GetDevicesByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetDevicesByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetDevicesByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDevicesByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetDevicesByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetDevicesByClicksQueryParamInterval);
|
||||
@@ -122,7 +162,7 @@ export namespace GetDevicesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetDevicesByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetDevicesByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +182,7 @@ export namespace GetDevicesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +203,7 @@ export namespace GetDevicesByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -184,7 +224,7 @@ export namespace GetDevicesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetDevicesByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetDevicesByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -204,7 +244,7 @@ export namespace GetDevicesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetDevicesByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetDevicesByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetDevicesByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetDevicesByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetDevicesByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetDevicesByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetDevicesByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,7 +174,7 @@ export namespace GetDevicesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetDevicesByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetDevicesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -146,7 +194,7 @@ export namespace GetDevicesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -167,7 +215,7 @@ export namespace GetDevicesByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -192,7 +240,7 @@ export namespace GetDevicesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetDevicesByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetDevicesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -212,7 +260,7 @@ export namespace GetDevicesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetLinkInfoGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type GetLinkInfoRequest = {
|
||||
domain?: string | undefined;
|
||||
/**
|
||||
@@ -20,6 +28,38 @@ export type GetLinkInfoRequest = {
|
||||
externalId?: string | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLinkInfoGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetLinkInfoGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLinkInfoRequest$ {
|
||||
export const inboundSchema: z.ZodType<GetLinkInfoRequest, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetLinksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The tag IDs to filter the links by.
|
||||
*/
|
||||
@@ -71,6 +79,38 @@ export type GetLinksRequest = {
|
||||
page?: number | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLinksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetLinksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace QueryParamTagIds$ {
|
||||
export const inboundSchema: z.ZodType<QueryParamTagIds, z.ZodTypeDef, unknown> = z.union([
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetLinksCountGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The tag IDs to filter the links by.
|
||||
*/
|
||||
@@ -69,6 +77,38 @@ export type GetLinksCountRequest = {
|
||||
groupBy?: One | Two | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLinksCountGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetLinksCountGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLinksCountQueryParamTagIds$ {
|
||||
export const inboundSchema: z.ZodType<GetLinksCountQueryParamTagIds, z.ZodTypeDef, unknown> =
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetOSByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -106,6 +114,38 @@ export type GetOSByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetOSByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetOSByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetOSByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetOSByClicksQueryParamInterval);
|
||||
@@ -120,7 +160,7 @@ export namespace GetOSByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetOSByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetOSByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -140,7 +180,7 @@ export namespace GetOSByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -161,7 +201,7 @@ export namespace GetOSByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -182,7 +222,7 @@ export namespace GetOSByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetOSByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetOSByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -202,7 +242,7 @@ export namespace GetOSByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetOSByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,39 @@ export type GetOSByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetOSByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetOSByClicksDeprecatedGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSByClicksDeprecatedGlobals> =
|
||||
z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetOSByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetOSByClicksDeprecatedQueryParamInterval);
|
||||
@@ -122,7 +163,7 @@ export namespace GetOSByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetOSByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetOSByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +183,7 @@ export namespace GetOSByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +204,7 @@ export namespace GetOSByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -185,7 +226,7 @@ export namespace GetOSByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetOSByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetOSByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -205,7 +246,7 @@ export namespace GetOSByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetReferersByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,38 @@ export type GetReferersByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetReferersByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetReferersByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetReferersByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetReferersByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetReferersByClicksQueryParamInterval);
|
||||
@@ -122,7 +162,7 @@ export namespace GetReferersByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetReferersByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetReferersByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +182,7 @@ export namespace GetReferersByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +203,7 @@ export namespace GetReferersByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -184,7 +224,7 @@ export namespace GetReferersByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetReferersByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetReferersByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -204,7 +244,7 @@ export namespace GetReferersByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetReferersByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetReferersByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetReferersByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetReferersByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetReferersByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetReferersByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetReferersByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,7 +174,7 @@ export namespace GetReferersByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetReferersByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetReferersByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -146,7 +194,7 @@ export namespace GetReferersByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -167,7 +215,7 @@ export namespace GetReferersByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -192,8 +240,7 @@ export namespace GetReferersByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetReferersByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetReferersByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -213,7 +260,7 @@ export namespace GetReferersByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -4,8 +4,48 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTagsGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type GetTagsRequest = {};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTagsGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetTagsGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTagsGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTagsRequest$ {
|
||||
export const inboundSchema: z.ZodType<GetTagsRequest, z.ZodTypeDef, unknown> = z.object({});
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTimeseriesByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -106,6 +114,38 @@ export type ResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTimeseriesByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetTimeseriesByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTimeseriesByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace QueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(QueryParamInterval);
|
||||
@@ -120,7 +160,7 @@ export namespace GetTimeseriesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: QueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: QueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -140,7 +180,7 @@ export namespace GetTimeseriesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -161,7 +201,7 @@ export namespace GetTimeseriesByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -182,7 +222,7 @@ export namespace GetTimeseriesByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: QueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: QueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -202,7 +242,7 @@ export namespace GetTimeseriesByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTimeseriesByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetTimeseriesByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTimeseriesByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetTimeseriesByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetTimeseriesByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTimeseriesByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetTimeseriesByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,8 +174,7 @@ export namespace GetTimeseriesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetTimeseriesByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetTimeseriesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -147,7 +194,7 @@ export namespace GetTimeseriesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -168,7 +215,7 @@ export namespace GetTimeseriesByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -193,8 +240,7 @@ export namespace GetTimeseriesByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetTimeseriesByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetTimeseriesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -214,7 +260,7 @@ export namespace GetTimeseriesByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTopLinksByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,38 @@ export type GetTopLinksByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopLinksByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetTopLinksByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopLinksByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopLinksByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetTopLinksByClicksQueryParamInterval);
|
||||
@@ -122,7 +162,7 @@ export namespace GetTopLinksByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopLinksByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetTopLinksByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +182,7 @@ export namespace GetTopLinksByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +203,7 @@ export namespace GetTopLinksByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -184,7 +224,7 @@ export namespace GetTopLinksByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopLinksByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetTopLinksByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -204,7 +244,7 @@ export namespace GetTopLinksByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTopLinksByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetTopLinksByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopLinksByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetTopLinksByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetTopLinksByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopLinksByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetTopLinksByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,7 +174,7 @@ export namespace GetTopLinksByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopLinksByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetTopLinksByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -146,7 +194,7 @@ export namespace GetTopLinksByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -167,7 +215,7 @@ export namespace GetTopLinksByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -192,8 +240,7 @@ export namespace GetTopLinksByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval:
|
||||
GetTopLinksByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetTopLinksByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -213,7 +260,7 @@ export namespace GetTopLinksByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTopURLsByClicksGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,38 @@ export type GetTopURLsByClicksResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopURLsByClicksGlobals$ {
|
||||
export const inboundSchema: z.ZodType<GetTopURLsByClicksGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTopURLsByClicksGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopURLsByClicksQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetTopURLsByClicksQueryParamInterval);
|
||||
@@ -122,7 +162,7 @@ export namespace GetTopURLsByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopURLsByClicksQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetTopURLsByClicksQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -142,7 +182,7 @@ export namespace GetTopURLsByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -163,7 +203,7 @@ export namespace GetTopURLsByClicksRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -184,7 +224,7 @@ export namespace GetTopURLsByClicksRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopURLsByClicksQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetTopURLsByClicksQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -204,7 +244,7 @@ export namespace GetTopURLsByClicksRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -6,6 +6,14 @@ import { ClosedEnum } from "../../types";
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type GetTopURLsByClicksDeprecatedGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h.
|
||||
*/
|
||||
@@ -108,6 +116,46 @@ export type GetTopURLsByClicksDeprecatedResponseBody = {
|
||||
clicks: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopURLsByClicksDeprecatedGlobals$ {
|
||||
export const inboundSchema: z.ZodType<
|
||||
GetTopURLsByClicksDeprecatedGlobals,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<
|
||||
Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetTopURLsByClicksDeprecatedGlobals
|
||||
> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetTopURLsByClicksDeprecatedQueryParamInterval$ {
|
||||
export const inboundSchema = z.nativeEnum(GetTopURLsByClicksDeprecatedQueryParamInterval);
|
||||
@@ -126,7 +174,7 @@ export namespace GetTopURLsByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.inboundSchema.default("24h"),
|
||||
interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.inboundSchema.optional(),
|
||||
@@ -146,7 +194,7 @@ export namespace GetTopURLsByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
@@ -167,7 +215,7 @@ export namespace GetTopURLsByClicksDeprecatedRequest$ {
|
||||
key?: string | undefined;
|
||||
linkId?: string | undefined;
|
||||
externalId?: string | undefined;
|
||||
interval: string;
|
||||
interval?: string | undefined;
|
||||
start?: string | undefined;
|
||||
end?: string | undefined;
|
||||
country?: string | undefined;
|
||||
@@ -192,7 +240,7 @@ export namespace GetTopURLsByClicksDeprecatedRequest$ {
|
||||
key: z.string().optional(),
|
||||
linkId: z.string().optional(),
|
||||
externalId: z.string().optional(),
|
||||
interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.outboundSchema.default("24h"),
|
||||
interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
country: components.CountryCode$.outboundSchema.optional(),
|
||||
@@ -212,7 +260,7 @@ export namespace GetTopURLsByClicksDeprecatedRequest$ {
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.linkId === undefined ? null : { linkId: v.linkId }),
|
||||
...(v.externalId === undefined ? null : { externalId: v.externalId }),
|
||||
interval: v.interval,
|
||||
...(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 }),
|
||||
|
||||
@@ -4,8 +4,48 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type ListDomainsGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type ListDomainsRequest = {};
|
||||
|
||||
/** @internal */
|
||||
export namespace ListDomainsGlobals$ {
|
||||
export const inboundSchema: z.ZodType<ListDomainsGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace ListDomainsRequest$ {
|
||||
export const inboundSchema: z.ZodType<ListDomainsRequest, z.ZodTypeDef, unknown> = z.object({});
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type SetPrimaryDomainGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type SetPrimaryDomainRequest = {
|
||||
/**
|
||||
* The domain name.
|
||||
@@ -11,6 +19,38 @@ export type SetPrimaryDomainRequest = {
|
||||
slug: string;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace SetPrimaryDomainGlobals$ {
|
||||
export const inboundSchema: z.ZodType<SetPrimaryDomainGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace SetPrimaryDomainRequest$ {
|
||||
export const inboundSchema: z.ZodType<SetPrimaryDomainRequest, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type TransferDomainGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type TransferDomainRequestBody = {
|
||||
/**
|
||||
* The ID of the new workspace to transfer the domain to.
|
||||
@@ -19,6 +27,38 @@ export type TransferDomainRequest = {
|
||||
requestBody?: TransferDomainRequestBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace TransferDomainGlobals$ {
|
||||
export const inboundSchema: z.ZodType<TransferDomainGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace TransferDomainRequestBody$ {
|
||||
export const inboundSchema: z.ZodType<TransferDomainRequestBody, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type UpdateDomainGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The type of redirect to use for this domain.
|
||||
*/
|
||||
@@ -56,6 +64,38 @@ export type UpdateDomainRequest = {
|
||||
requestBody?: UpdateDomainRequestBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace UpdateDomainGlobals$ {
|
||||
export const inboundSchema: z.ZodType<UpdateDomainGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace UpdateDomainType$ {
|
||||
export const inboundSchema = z.nativeEnum(UpdateDomainType);
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type UpdateLinkGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The unique IDs of the tags assigned to the short link.
|
||||
*/
|
||||
@@ -120,6 +128,38 @@ export type UpdateLinkRequest = {
|
||||
requestBody?: UpdateLinkRequestBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace UpdateLinkGlobals$ {
|
||||
export const inboundSchema: z.ZodType<UpdateLinkGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace UpdateLinkTagIds$ {
|
||||
export const inboundSchema: z.ZodType<UpdateLinkTagIds, z.ZodTypeDef, unknown> = z.union([
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import * as components from "../components";
|
||||
import * as z from "zod";
|
||||
|
||||
export type UpsertLinkGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The unique IDs of the tags assigned to the short link.
|
||||
*/
|
||||
@@ -112,6 +120,38 @@ export type UpsertLinkRequestBody = {
|
||||
geo?: components.LinkGeoTargeting | null | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace UpsertLinkGlobals$ {
|
||||
export const inboundSchema: z.ZodType<UpsertLinkGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace UpsertLinkTagIds$ {
|
||||
export const inboundSchema: z.ZodType<UpsertLinkTagIds, z.ZodTypeDef, unknown> = z.union([
|
||||
|
||||
1428
src/sdk/analytics.ts
1428
src/sdk/analytics.ts
File diff suppressed because it is too large
Load Diff
1715
src/sdk/clicks.ts
1715
src/sdk/clicks.ts
File diff suppressed because it is too large
Load Diff
@@ -117,147 +117,24 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
HttpMeta: { Response: response, Request: request$ },
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return z.array(components.DomainSchema$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<Array<components.DomainSchema>>()
|
||||
.json(200, z.array(components.DomainSchema$.inboundSchema))
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,147 +223,24 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
HttpMeta: { Response: response, Request: request$ },
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 201, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return components.DomainSchema$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<components.DomainSchema>()
|
||||
.json(201, components.DomainSchema$)
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -581,147 +335,24 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
HttpMeta: { Response: response, Request: request$ },
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return operations.DeleteDomainResponseBody$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<operations.DeleteDomainResponseBody>()
|
||||
.json(200, operations.DeleteDomainResponseBody$)
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -819,147 +450,24 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
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.DomainSchema$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<components.DomainSchema>()
|
||||
.json(200, components.DomainSchema$)
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1051,147 +559,24 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
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.DomainSchema$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<components.DomainSchema>()
|
||||
.json(200, components.DomainSchema$)
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1289,146 +674,23 @@ export class Domains extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
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.DomainSchema$.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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<components.DomainSchema>()
|
||||
.json(200, components.DomainSchema$)
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
}
|
||||
|
||||
1240
src/sdk/links.ts
1240
src/sdk/links.ts
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,6 @@ import * as enc$ from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
import * as errors from "../models/errors";
|
||||
import * as operations from "../models/operations";
|
||||
|
||||
export class Metatags extends ClientSDK {
|
||||
@@ -99,23 +98,11 @@ export class Metatags extends ClientSDK {
|
||||
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return operations.GetMetatagsResponseBody$.inboundSchema.parse(val$);
|
||||
},
|
||||
"Response validation failed"
|
||||
);
|
||||
return result;
|
||||
} else {
|
||||
const responseBody = await response.text();
|
||||
throw new errors.SDKError(
|
||||
"Unexpected API response status or content-type",
|
||||
response,
|
||||
responseBody
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<operations.GetMetatagsResponseBody>()
|
||||
.json(200, operations.GetMetatagsResponseBody$)
|
||||
.fail(["4XX", "5XX"])
|
||||
.match(response);
|
||||
|
||||
return result$;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,146 +127,23 @@ export class QRCodes extends ClientSDK {
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
HttpMeta: {
|
||||
Response: response,
|
||||
Request: request$,
|
||||
},
|
||||
HttpMeta: { Response: response, Request: request$ },
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "image/png")) {
|
||||
const responseBody = await response.text();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return z.string().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
|
||||
);
|
||||
}
|
||||
const [result$] = await this.matcher<string>()
|
||||
.text(200, z.string(), { ctype: "image/png" })
|
||||
.json(400, errors.BadRequest$, { err: true })
|
||||
.json(401, errors.Unauthorized$, { err: true })
|
||||
.json(403, errors.Forbidden$, { err: true })
|
||||
.json(404, errors.NotFound$, { err: true })
|
||||
.json(409, errors.Conflict$, { err: true })
|
||||
.json(410, errors.InviteExpired$, { err: true })
|
||||
.json(422, errors.UnprocessableEntity$, { err: true })
|
||||
.json(429, errors.RateLimitExceeded$, { err: true })
|
||||
.fail(["4XX", "5XX"])
|
||||
.json(500, errors.InternalServerError$, { err: true })
|
||||
.match(response, { extraFields: responseFields$ });
|
||||
|
||||
return result$;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user