From 6a0be4086fa03f6a35a83338dbb6eb1ad333fa1d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:28:50 +0530 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.260.6 (#81) Co-authored-by: speakeasybot --- .npmignore | 3 +- .speakeasy/gen.lock | 309 +++--- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- README.md | 51 +- RELEASES.md | 12 +- docs/models/components/badrequest.md | 8 + docs/models/{errors => components}/code.md | 0 .../conflict.md} | 6 +- .../{errors => components}/conflictcode.md | 0 .../{errors => components}/conflicterror.md | 2 +- docs/models/{errors => components}/errort.md | 2 +- .../forbidden.md} | 6 +- .../{errors => components}/forbiddencode.md | 0 .../forbiddenerror.md} | 6 +- docs/models/components/internalservererror.md | 8 + .../internalservererrorcode.md | 0 .../components/internalservererrorerror.md | 10 + .../inviteexpired.md} | 6 +- .../inviteexpiredcode.md | 0 .../inviteexpirederror.md} | 6 +- docs/models/components/notfound.md | 8 + .../{errors => components}/notfoundcode.md | 0 .../{errors => components}/notfounderror.md | 2 +- docs/models/components/ratelimitexceeded.md | 8 + .../ratelimitexceededcode.md | 0 .../components/ratelimitexceedederror.md | 10 + docs/models/components/unauthorized.md | 8 + .../unauthorizedcode.md | 0 docs/models/components/unauthorizederror.md | 10 + docs/models/components/unprocessableentity.md | 8 + .../unprocessableentitycode.md | 0 .../components/unprocessableentityerror.md | 10 + docs/models/errors/badrequest.md | 10 - docs/models/errors/conflict.md | 10 - docs/models/errors/forbidden.md | 10 - docs/models/errors/forbiddenerror.md | 10 - docs/models/errors/internalservererror.md | 10 - .../models/errors/internalservererrorerror.md | 10 - docs/models/errors/notfound.md | 10 - docs/models/errors/unauthorizederror.md | 10 - docs/models/errors/unprocessableentity.md | 10 - .../models/errors/unprocessableentityerror.md | 10 - docs/models/operations/adddomainresponse.md | 2 + .../operations/bulkcreatelinksresponse.md | 2 + docs/models/operations/createlinkresponse.md | 2 + docs/models/operations/createtagresponse.md | 2 + .../operations/createworkspaceresponse.md | 2 + .../models/operations/deletedomainresponse.md | 2 + docs/models/operations/deletelinkresponse.md | 2 + docs/models/operations/editdomainresponse.md | 2 + docs/models/operations/editlinkresponse.md | 2 + .../operations/getbrowseranalyticsrequest.md | 29 +- .../operations/getbrowseranalyticsresponse.md | 2 + .../operations/getcityanalyticsrequest.md | 29 +- .../operations/getcityanalyticsresponse.md | 2 + .../operations/getclicksanalyticsrequest.md | 29 +- .../operations/getclicksanalyticsresponse.md | 2 + .../operations/getcountryanalyticsrequest.md | 29 +- .../operations/getcountryanalyticsresponse.md | 2 + .../operations/getdeviceanalyticsrequest.md | 29 +- .../operations/getdeviceanalyticsresponse.md | 2 + docs/models/operations/getlinkinforesponse.md | 2 + .../operations/getlinkscountresponse.md | 2 + docs/models/operations/getlinksresponse.md | 2 + docs/models/operations/getmetatagsrequest.md | 6 +- .../operations/getmetatagsresponsebody.md | 6 +- .../operations/getosanalyticsrequest.md | 29 +- .../operations/getosanalyticsresponse.md | 2 + docs/models/operations/getqrcoderesponse.md | 2 + .../operations/getrefereranalyticsrequest.md | 29 +- .../operations/getrefereranalyticsresponse.md | 2 + docs/models/operations/gettagsresponse.md | 2 + .../gettimeseriesanalyticsrequest.md | 29 +- .../gettimeseriesanalyticsresponse.md | 2 + docs/models/operations/gettoplinksrequest.md | 29 +- docs/models/operations/gettoplinksresponse.md | 2 + docs/models/operations/gettopurlsrequest.md | 29 +- docs/models/operations/gettopurlsresponse.md | 2 + .../models/operations/getworkspaceresponse.md | 2 + .../operations/getworkspacesresponse.md | 2 + docs/models/operations/listdomainsresponse.md | 2 + .../operations/setprimarydomainresponse.md | 2 + .../operations/transferdomainresponse.md | 2 + docs/sdks/analytics/README.md | 170 +-- docs/sdks/domains/README.md | 102 +- docs/sdks/links/README.md | 119 +-- docs/sdks/metatags/README.md | 4 +- docs/sdks/qrcodes/README.md | 17 +- docs/sdks/tags/README.md | 34 +- docs/sdks/workspaces/README.md | 51 +- jsr.json | 26 + package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 14 +- src/lib/encodings.ts | 22 +- src/lib/http.ts | 14 +- src/lib/sdks.ts | 4 +- src/lib/security.ts | 4 +- src/lib/url.ts | 4 +- .../{errors => components}/badrequest.ts | 56 +- src/models/{errors => components}/conflict.ts | 56 +- .../{errors => components}/forbidden.ts | 56 +- src/models/components/index.ts | 9 + .../internalservererror.ts | 57 +- .../{errors => components}/inviteexpired.ts | 57 +- src/models/{errors => components}/notfound.ts | 56 +- .../ratelimitexceeded.ts | 57 +- src/models/components/tagschema.ts | 2 +- .../{errors => components}/unauthorized.ts | 57 +- .../unprocessableentity.ts | 57 +- src/models/components/workspaceschema.ts | 4 +- src/models/errors/index.ts | 9 - src/models/errors/sdkvalidationerror.ts | 4 +- src/models/operations/adddomain.ts | 68 +- src/models/operations/bulkcreatelinks.ts | 67 ++ src/models/operations/createlink.ts | 64 ++ src/models/operations/createtag.ts | 66 +- src/models/operations/createworkspace.ts | 67 ++ src/models/operations/deletedomain.ts | 64 ++ src/models/operations/deletelink.ts | 64 ++ src/models/operations/editdomain.ts | 69 +- src/models/operations/editlink.ts | 64 ++ src/models/operations/getbrowseranalytics.ts | 110 +- src/models/operations/getcityanalytics.ts | 109 +- src/models/operations/getclicksanalytics.ts | 102 +- src/models/operations/getcountryanalytics.ts | 113 +- src/models/operations/getdeviceanalytics.ts | 110 +- src/models/operations/getlinkinfo.ts | 64 ++ src/models/operations/getlinks.ts | 66 +- src/models/operations/getlinkscount.ts | 70 +- src/models/operations/getmetatags.ts | 39 +- src/models/operations/getosanalytics.ts | 105 +- src/models/operations/getqrcode.ts | 66 +- src/models/operations/getrefereranalytics.ts | 110 +- src/models/operations/gettags.ts | 64 ++ .../operations/gettimeseriesanalytics.ts | 104 +- src/models/operations/gettoplinks.ts | 102 +- src/models/operations/gettopurls.ts | 102 +- src/models/operations/getworkspace.ts | 64 ++ src/models/operations/getworkspaces.ts | 71 ++ src/models/operations/index.ts | 1 + src/models/operations/listdomains.ts | 67 +- src/models/operations/setprimarydomain.ts | 69 +- src/models/operations/transferdomain.ts | 68 +- src/sdk/analytics.ts | 983 ++++-------------- src/sdk/domains.ts | 549 +++------- src/sdk/links.ts | 644 +++--------- src/sdk/metatags.ts | 4 +- src/sdk/qrcodes.ts | 92 +- src/sdk/sdk.ts | 14 +- src/sdk/tags.ts | 184 +--- src/sdk/workspaces.ts | 275 ++--- src/types/blobs.ts | 9 +- src/types/operations.ts | 2 +- src/types/rfcdate.ts | 2 +- 156 files changed, 3654 insertions(+), 3564 deletions(-) create mode 100644 docs/models/components/badrequest.md rename docs/models/{errors => components}/code.md (100%) rename docs/models/{errors/unauthorized.md => components/conflict.md} (69%) rename docs/models/{errors => components}/conflictcode.md (100%) rename docs/models/{errors => components}/conflicterror.md (92%) rename docs/models/{errors => components}/errort.md (96%) rename docs/models/{errors/inviteexpired.md => components/forbidden.md} (74%) rename docs/models/{errors => components}/forbiddencode.md (100%) rename docs/models/{errors/inviteexpirederror.md => components/forbiddenerror.md} (86%) create mode 100644 docs/models/components/internalservererror.md rename docs/models/{errors => components}/internalservererrorcode.md (100%) create mode 100644 docs/models/components/internalservererrorerror.md rename docs/models/{errors/ratelimitexceeded.md => components/inviteexpired.md} (79%) rename docs/models/{errors => components}/inviteexpiredcode.md (100%) rename docs/models/{errors/ratelimitexceedederror.md => components/inviteexpirederror.md} (82%) create mode 100644 docs/models/components/notfound.md rename docs/models/{errors => components}/notfoundcode.md (100%) rename docs/models/{errors => components}/notfounderror.md (92%) create mode 100644 docs/models/components/ratelimitexceeded.md rename docs/models/{errors => components}/ratelimitexceededcode.md (100%) create mode 100644 docs/models/components/ratelimitexceedederror.md create mode 100644 docs/models/components/unauthorized.md rename docs/models/{errors => components}/unauthorizedcode.md (100%) create mode 100644 docs/models/components/unauthorizederror.md create mode 100644 docs/models/components/unprocessableentity.md rename docs/models/{errors => components}/unprocessableentitycode.md (100%) create mode 100644 docs/models/components/unprocessableentityerror.md delete mode 100644 docs/models/errors/badrequest.md delete mode 100644 docs/models/errors/conflict.md delete mode 100644 docs/models/errors/forbidden.md delete mode 100644 docs/models/errors/forbiddenerror.md delete mode 100644 docs/models/errors/internalservererror.md delete mode 100644 docs/models/errors/internalservererrorerror.md delete mode 100644 docs/models/errors/notfound.md delete mode 100644 docs/models/errors/unauthorizederror.md delete mode 100644 docs/models/errors/unprocessableentity.md delete mode 100644 docs/models/errors/unprocessableentityerror.md create mode 100644 docs/models/operations/adddomainresponse.md create mode 100644 docs/models/operations/bulkcreatelinksresponse.md create mode 100644 docs/models/operations/createlinkresponse.md create mode 100644 docs/models/operations/createtagresponse.md create mode 100644 docs/models/operations/createworkspaceresponse.md create mode 100644 docs/models/operations/deletedomainresponse.md create mode 100644 docs/models/operations/deletelinkresponse.md create mode 100644 docs/models/operations/editdomainresponse.md create mode 100644 docs/models/operations/editlinkresponse.md create mode 100644 docs/models/operations/getbrowseranalyticsresponse.md create mode 100644 docs/models/operations/getcityanalyticsresponse.md create mode 100644 docs/models/operations/getclicksanalyticsresponse.md create mode 100644 docs/models/operations/getcountryanalyticsresponse.md create mode 100644 docs/models/operations/getdeviceanalyticsresponse.md create mode 100644 docs/models/operations/getlinkinforesponse.md create mode 100644 docs/models/operations/getlinkscountresponse.md create mode 100644 docs/models/operations/getlinksresponse.md create mode 100644 docs/models/operations/getosanalyticsresponse.md create mode 100644 docs/models/operations/getqrcoderesponse.md create mode 100644 docs/models/operations/getrefereranalyticsresponse.md create mode 100644 docs/models/operations/gettagsresponse.md create mode 100644 docs/models/operations/gettimeseriesanalyticsresponse.md create mode 100644 docs/models/operations/gettoplinksresponse.md create mode 100644 docs/models/operations/gettopurlsresponse.md create mode 100644 docs/models/operations/getworkspaceresponse.md create mode 100644 docs/models/operations/getworkspacesresponse.md create mode 100644 docs/models/operations/listdomainsresponse.md create mode 100644 docs/models/operations/setprimarydomainresponse.md create mode 100644 docs/models/operations/transferdomainresponse.md create mode 100644 jsr.json rename src/models/{errors => components}/badrequest.ts (62%) rename src/models/{errors => components}/conflict.ts (67%) rename src/models/{errors => components}/forbidden.ts (63%) rename src/models/{errors => components}/internalservererror.ts (68%) rename src/models/{errors => components}/inviteexpired.ts (66%) rename src/models/{errors => components}/notfound.ts (69%) rename src/models/{errors => components}/ratelimitexceeded.ts (68%) rename src/models/{errors => components}/unauthorized.ts (64%) rename src/models/{errors => components}/unprocessableentity.ts (67%) create mode 100644 src/models/operations/getworkspaces.ts diff --git a/.npmignore b/.npmignore index e8a556c..709e684 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,4 @@ -/* -/docs/**/*.md +**/* !/**/*.ts !/**/*.js !/**/*.map diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ee8a570..39f2f17 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f28179cc-ef59-426d-9e85-60cec22fc642 management: - docChecksum: 59b2c58aae7e82783142168d3327e8c8 + docChecksum: 9b3afff112a002c5cdcb95800b733810 docVersion: 0.0.1 - speakeasyVersion: 1.257.1 - generationVersion: 2.308.2 - releaseVersion: 0.23.1 - configChecksum: bfc60f1488f62d05649364aba10d384b + speakeasyVersion: 1.260.6 + generationVersion: 2.311.1 + releaseVersion: 0.24.0 + configChecksum: 7295cbecb89a751fe5c558989aade82b repoURL: https://github.com/dubinc/dub-node.git installationURL: https://github.com/dubinc/dub-node published: true @@ -14,7 +14,7 @@ features: typescript: acceptHeaders: 2.81.1 constsAndDefaults: 0.1.5 - core: 3.7.2 + core: 3.8.0 deprecations: 2.81.1 examples: 2.81.3 flattening: 2.81.1 @@ -37,6 +37,7 @@ generatedFiles: - .eslintrc.js - .npmignore - RUNTIMES.md + - jsr.json - package.json - src/lib/base64.ts - src/lib/config.ts @@ -55,19 +56,6 @@ generatedFiles: - src/types/operations.ts - src/types/rfcdate.ts - tsconfig.json - - src/models/components/linkschema.ts - - src/models/components/tagschema.ts - - src/models/components/workspaceschema.ts - - src/models/components/security.ts - - src/models/errors/badrequest.ts - - src/models/errors/unauthorized.ts - - src/models/errors/forbidden.ts - - src/models/errors/notfound.ts - - src/models/errors/conflict.ts - - src/models/errors/inviteexpired.ts - - src/models/errors/unprocessableentity.ts - - src/models/errors/ratelimitexceeded.ts - - src/models/errors/internalservererror.ts - src/models/operations/getlinks.ts - src/models/operations/createlink.ts - src/models/operations/getlinkscount.ts @@ -86,6 +74,7 @@ generatedFiles: - src/models/operations/getrefereranalytics.ts - src/models/operations/gettoplinks.ts - src/models/operations/gettopurls.ts + - src/models/operations/getworkspaces.ts - src/models/operations/createworkspace.ts - src/models/operations/getworkspace.ts - src/models/operations/gettags.ts @@ -97,138 +86,180 @@ generatedFiles: - src/models/operations/setprimarydomain.ts - src/models/operations/transferdomain.ts - src/models/operations/getmetatags.ts + - src/models/components/linkschema.ts + - src/models/components/tagschema.ts + - src/models/components/badrequest.ts + - src/models/components/unauthorized.ts + - src/models/components/forbidden.ts + - src/models/components/notfound.ts + - src/models/components/conflict.ts + - src/models/components/inviteexpired.ts + - src/models/components/unprocessableentity.ts + - src/models/components/ratelimitexceeded.ts + - src/models/components/internalservererror.ts + - src/models/components/workspaceschema.ts + - src/models/components/security.ts - src/models/errors/index.ts - - src/models/components/index.ts - src/models/operations/index.ts + - src/models/components/index.ts + - docs/models/operations/queryparamtagids.md + - docs/models/operations/sort.md + - docs/models/operations/getlinksrequest.md + - docs/models/operations/getlinksresponse.md + - docs/models/operations/tagids.md + - docs/models/operations/geo.md + - docs/models/operations/createlinkrequestbody.md + - docs/models/operations/createlinkresponse.md + - docs/models/operations/getlinkscountqueryparamtagids.md + - docs/models/operations/two.md + - docs/models/operations/one.md + - docs/models/operations/groupby.md + - docs/models/operations/getlinkscountrequest.md + - docs/models/operations/getlinkscountresponse.md + - docs/models/operations/getlinkinforequest.md + - docs/models/operations/getlinkinforesponse.md + - docs/models/operations/editlinktagids.md + - docs/models/operations/editlinkgeo.md + - docs/models/operations/editlinkrequestbody.md + - docs/models/operations/editlinkrequest.md + - docs/models/operations/editlinkresponse.md + - docs/models/operations/deletelinkrequest.md + - docs/models/operations/deletelinkresponsebody.md + - docs/models/operations/deletelinkresponse.md + - docs/models/operations/bulkcreatelinkstagids.md + - docs/models/operations/bulkcreatelinksgeo.md + - docs/models/operations/requestbody.md + - docs/models/operations/bulkcreatelinksresponse.md + - docs/models/operations/level.md + - docs/models/operations/getqrcoderequest.md + - docs/models/operations/getqrcoderesponse.md + - docs/models/operations/interval.md + - docs/models/operations/country.md + - docs/models/operations/getclicksanalyticsrequest.md + - docs/models/operations/getclicksanalyticsresponse.md + - docs/models/operations/queryparaminterval.md + - docs/models/operations/queryparamcountry.md + - docs/models/operations/gettimeseriesanalyticsrequest.md + - docs/models/operations/responsebody.md + - docs/models/operations/gettimeseriesanalyticsresponse.md + - docs/models/operations/getcountryanalyticsqueryparaminterval.md + - docs/models/operations/getcountryanalyticsqueryparamcountry.md + - docs/models/operations/getcountryanalyticsrequest.md + - docs/models/operations/getcountryanalyticscountry.md + - docs/models/operations/getcountryanalyticsresponsebody.md + - docs/models/operations/getcountryanalyticsresponse.md + - docs/models/operations/getcityanalyticsqueryparaminterval.md + - docs/models/operations/getcityanalyticsqueryparamcountry.md + - docs/models/operations/getcityanalyticsrequest.md + - docs/models/operations/getcityanalyticscountry.md + - docs/models/operations/getcityanalyticsresponsebody.md + - docs/models/operations/getcityanalyticsresponse.md + - docs/models/operations/getdeviceanalyticsqueryparaminterval.md + - docs/models/operations/getdeviceanalyticsqueryparamcountry.md + - docs/models/operations/getdeviceanalyticsrequest.md + - docs/models/operations/getdeviceanalyticsresponsebody.md + - docs/models/operations/getdeviceanalyticsresponse.md + - docs/models/operations/getbrowseranalyticsqueryparaminterval.md + - docs/models/operations/getbrowseranalyticsqueryparamcountry.md + - docs/models/operations/getbrowseranalyticsrequest.md + - docs/models/operations/getbrowseranalyticsresponsebody.md + - docs/models/operations/getbrowseranalyticsresponse.md + - docs/models/operations/getosanalyticsqueryparaminterval.md + - docs/models/operations/getosanalyticsqueryparamcountry.md + - docs/models/operations/getosanalyticsrequest.md + - docs/models/operations/getosanalyticsresponsebody.md + - docs/models/operations/getosanalyticsresponse.md + - docs/models/operations/getrefereranalyticsqueryparaminterval.md + - docs/models/operations/getrefereranalyticsqueryparamcountry.md + - docs/models/operations/getrefereranalyticsrequest.md + - docs/models/operations/getrefereranalyticsresponsebody.md + - docs/models/operations/getrefereranalyticsresponse.md + - docs/models/operations/gettoplinksqueryparaminterval.md + - docs/models/operations/gettoplinksqueryparamcountry.md + - docs/models/operations/gettoplinksrequest.md + - docs/models/operations/gettoplinksresponsebody.md + - docs/models/operations/gettoplinksresponse.md + - docs/models/operations/gettopurlsqueryparaminterval.md + - docs/models/operations/gettopurlsqueryparamcountry.md + - docs/models/operations/gettopurlsrequest.md + - docs/models/operations/gettopurlsresponsebody.md + - docs/models/operations/gettopurlsresponse.md + - docs/models/operations/getworkspacesresponse.md + - docs/models/operations/createworkspacerequestbody.md + - docs/models/operations/createworkspaceresponse.md + - docs/models/operations/getworkspacerequest.md + - docs/models/operations/getworkspaceresponse.md + - docs/models/operations/gettagsrequest.md + - docs/models/operations/gettagsresponse.md + - docs/models/operations/color.md + - docs/models/operations/createtagrequestbody.md + - docs/models/operations/createtagresponse.md + - docs/models/operations/listdomainsrequest.md + - docs/models/operations/listdomainstype.md + - docs/models/operations/listdomainsresponsebody.md + - docs/models/operations/listdomainsresponse.md + - docs/models/operations/type.md + - docs/models/operations/adddomainrequestbody.md + - docs/models/operations/adddomaintype.md + - docs/models/operations/adddomainresponsebody.md + - docs/models/operations/adddomainresponse.md + - docs/models/operations/deletedomainrequest.md + - docs/models/operations/deletedomainresponsebody.md + - docs/models/operations/deletedomainresponse.md + - docs/models/operations/editdomaintype.md + - docs/models/operations/editdomainrequestbody.md + - docs/models/operations/editdomainrequest.md + - docs/models/operations/editdomaindomainstype.md + - docs/models/operations/editdomainresponsebody.md + - docs/models/operations/editdomainresponse.md + - docs/models/operations/setprimarydomainrequest.md + - docs/models/operations/setprimarydomaintype.md + - docs/models/operations/setprimarydomainresponsebody.md + - docs/models/operations/setprimarydomainresponse.md + - docs/models/operations/transferdomainrequestbody.md + - docs/models/operations/transferdomainrequest.md + - docs/models/operations/transferdomaintype.md + - docs/models/operations/transferdomainresponsebody.md + - docs/models/operations/transferdomainresponse.md + - docs/models/operations/getmetatagsrequest.md + - docs/models/operations/getmetatagsresponsebody.md - docs/models/components/geo.md - docs/models/components/linkschema.md - docs/models/components/color.md - docs/models/components/tagschema.md + - docs/models/components/code.md + - docs/models/components/errort.md + - docs/models/components/badrequest.md + - docs/models/components/unauthorizedcode.md + - docs/models/components/unauthorizederror.md + - docs/models/components/unauthorized.md + - docs/models/components/forbiddencode.md + - docs/models/components/forbiddenerror.md + - docs/models/components/forbidden.md + - docs/models/components/notfoundcode.md + - docs/models/components/notfounderror.md + - docs/models/components/notfound.md + - docs/models/components/conflictcode.md + - docs/models/components/conflicterror.md + - docs/models/components/conflict.md + - docs/models/components/inviteexpiredcode.md + - docs/models/components/inviteexpirederror.md + - docs/models/components/inviteexpired.md + - docs/models/components/unprocessableentitycode.md + - docs/models/components/unprocessableentityerror.md + - docs/models/components/unprocessableentity.md + - docs/models/components/ratelimitexceededcode.md + - docs/models/components/ratelimitexceedederror.md + - docs/models/components/ratelimitexceeded.md + - docs/models/components/internalservererrorcode.md + - docs/models/components/internalservererrorerror.md + - docs/models/components/internalservererror.md - docs/models/components/plan.md - docs/models/components/role.md - docs/models/components/users.md - docs/models/components/domains.md - docs/models/components/workspaceschema.md - docs/models/components/security.md - - docs/models/errors/code.md - - docs/models/errors/errort.md - - docs/models/errors/badrequest.md - - docs/models/errors/unauthorizedcode.md - - docs/models/errors/unauthorizederror.md - - docs/models/errors/unauthorized.md - - docs/models/errors/forbiddencode.md - - docs/models/errors/forbiddenerror.md - - docs/models/errors/forbidden.md - - docs/models/errors/notfoundcode.md - - docs/models/errors/notfounderror.md - - docs/models/errors/notfound.md - - docs/models/errors/conflictcode.md - - docs/models/errors/conflicterror.md - - docs/models/errors/conflict.md - - docs/models/errors/inviteexpiredcode.md - - docs/models/errors/inviteexpirederror.md - - docs/models/errors/inviteexpired.md - - docs/models/errors/unprocessableentitycode.md - - docs/models/errors/unprocessableentityerror.md - - docs/models/errors/unprocessableentity.md - - docs/models/errors/ratelimitexceededcode.md - - docs/models/errors/ratelimitexceedederror.md - - docs/models/errors/ratelimitexceeded.md - - docs/models/errors/internalservererrorcode.md - - docs/models/errors/internalservererrorerror.md - - docs/models/errors/internalservererror.md - - docs/models/operations/queryparamtagids.md - - docs/models/operations/sort.md - - docs/models/operations/getlinksrequest.md - - docs/models/operations/tagids.md - - docs/models/operations/geo.md - - docs/models/operations/createlinkrequestbody.md - - docs/models/operations/getlinkscountqueryparamtagids.md - - docs/models/operations/two.md - - docs/models/operations/one.md - - docs/models/operations/groupby.md - - docs/models/operations/getlinkscountrequest.md - - docs/models/operations/getlinkinforequest.md - - docs/models/operations/editlinktagids.md - - docs/models/operations/editlinkgeo.md - - docs/models/operations/editlinkrequestbody.md - - docs/models/operations/editlinkrequest.md - - docs/models/operations/deletelinkrequest.md - - docs/models/operations/deletelinkresponsebody.md - - docs/models/operations/bulkcreatelinkstagids.md - - docs/models/operations/bulkcreatelinksgeo.md - - docs/models/operations/requestbody.md - - docs/models/operations/level.md - - docs/models/operations/getqrcoderequest.md - - docs/models/operations/interval.md - - docs/models/operations/country.md - - docs/models/operations/getclicksanalyticsrequest.md - - docs/models/operations/queryparaminterval.md - - docs/models/operations/queryparamcountry.md - - docs/models/operations/gettimeseriesanalyticsrequest.md - - docs/models/operations/responsebody.md - - docs/models/operations/getcountryanalyticsqueryparaminterval.md - - docs/models/operations/getcountryanalyticsqueryparamcountry.md - - docs/models/operations/getcountryanalyticsrequest.md - - docs/models/operations/getcountryanalyticscountry.md - - docs/models/operations/getcountryanalyticsresponsebody.md - - docs/models/operations/getcityanalyticsqueryparaminterval.md - - docs/models/operations/getcityanalyticsqueryparamcountry.md - - docs/models/operations/getcityanalyticsrequest.md - - docs/models/operations/getcityanalyticscountry.md - - docs/models/operations/getcityanalyticsresponsebody.md - - docs/models/operations/getdeviceanalyticsqueryparaminterval.md - - docs/models/operations/getdeviceanalyticsqueryparamcountry.md - - docs/models/operations/getdeviceanalyticsrequest.md - - docs/models/operations/getdeviceanalyticsresponsebody.md - - docs/models/operations/getbrowseranalyticsqueryparaminterval.md - - docs/models/operations/getbrowseranalyticsqueryparamcountry.md - - docs/models/operations/getbrowseranalyticsrequest.md - - docs/models/operations/getbrowseranalyticsresponsebody.md - - docs/models/operations/getosanalyticsqueryparaminterval.md - - docs/models/operations/getosanalyticsqueryparamcountry.md - - docs/models/operations/getosanalyticsrequest.md - - docs/models/operations/getosanalyticsresponsebody.md - - docs/models/operations/getrefereranalyticsqueryparaminterval.md - - docs/models/operations/getrefereranalyticsqueryparamcountry.md - - docs/models/operations/getrefereranalyticsrequest.md - - docs/models/operations/getrefereranalyticsresponsebody.md - - docs/models/operations/gettoplinksqueryparaminterval.md - - docs/models/operations/gettoplinksqueryparamcountry.md - - docs/models/operations/gettoplinksrequest.md - - docs/models/operations/gettoplinksresponsebody.md - - docs/models/operations/gettopurlsqueryparaminterval.md - - docs/models/operations/gettopurlsqueryparamcountry.md - - docs/models/operations/gettopurlsrequest.md - - docs/models/operations/gettopurlsresponsebody.md - - docs/models/operations/createworkspacerequestbody.md - - docs/models/operations/getworkspacerequest.md - - docs/models/operations/gettagsrequest.md - - docs/models/operations/color.md - - docs/models/operations/createtagrequestbody.md - - docs/models/operations/listdomainsrequest.md - - docs/models/operations/listdomainstype.md - - docs/models/operations/listdomainsresponsebody.md - - docs/models/operations/type.md - - docs/models/operations/adddomainrequestbody.md - - docs/models/operations/adddomaintype.md - - docs/models/operations/adddomainresponsebody.md - - docs/models/operations/deletedomainrequest.md - - docs/models/operations/deletedomainresponsebody.md - - docs/models/operations/editdomaintype.md - - docs/models/operations/editdomainrequestbody.md - - docs/models/operations/editdomainrequest.md - - docs/models/operations/editdomaindomainstype.md - - docs/models/operations/editdomainresponsebody.md - - docs/models/operations/setprimarydomainrequest.md - - docs/models/operations/setprimarydomaintype.md - - docs/models/operations/setprimarydomainresponsebody.md - - docs/models/operations/transferdomainrequestbody.md - - docs/models/operations/transferdomainrequest.md - - docs/models/operations/transferdomaintype.md - - docs/models/operations/transferdomainresponsebody.md - - docs/models/operations/getmetatagsrequest.md - - docs/models/operations/getmetatagsresponsebody.md - docs/sdks/dub/README.md - docs/sdks/links/README.md - docs/sdks/qrcodes/README.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8c4b48f..a0d4b20 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.23.1 + version: 0.24.0 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0065184..91eebb7 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.257.1 +speakeasyVersion: 1.260.6 sources: my-first-source: {} targets: diff --git a/README.md b/README.md index c630735..2c41a48 100644 --- a/README.md +++ b/README.md @@ -118,18 +118,9 @@ run(); All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. @@ -158,42 +149,6 @@ async function run() { console.error(err.rawValue); return; } - case err instanceof errors.BadRequest: { - console.error(err); // handle exception - return; - } - case err instanceof errors.Unauthorized: { - console.error(err); // handle exception - return; - } - case err instanceof errors.Forbidden: { - console.error(err); // handle exception - return; - } - case err instanceof errors.NotFound: { - console.error(err); // handle exception - return; - } - case err instanceof errors.Conflict: { - console.error(err); // handle exception - return; - } - case err instanceof errors.InviteExpired: { - console.error(err); // handle exception - return; - } - case err instanceof errors.UnprocessableEntity: { - console.error(err); // handle exception - return; - } - case err instanceof errors.RateLimitExceeded: { - console.error(err); // handle exception - return; - } - case err instanceof errors.InternalServerError: { - console.error(err); // handle exception - return; - } default: { throw err; } diff --git a/RELEASES.md b/RELEASES.md index 580d5e3..b2a9dcd 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -106,4 +106,14 @@ Based on: ### Generated - [typescript v0.23.1] . ### Releases -- [NPM v0.23.1] https://www.npmjs.com/package/dub/v/0.23.1 - . \ No newline at end of file +- [NPM v0.23.1] https://www.npmjs.com/package/dub/v/0.23.1 - . + +## 2024-04-19 01:12:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.260.6 (2.311.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.24.0] . +### Releases +- [NPM v0.24.0] https://www.npmjs.com/package/dub/v/0.24.0 - . \ No newline at end of file diff --git a/docs/models/components/badrequest.md b/docs/models/components/badrequest.md new file mode 100644 index 0000000..7a3fbf7 --- /dev/null +++ b/docs/models/components/badrequest.md @@ -0,0 +1,8 @@ +# BadRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `error` | [components.ErrorT](../../models/components/errort.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/code.md b/docs/models/components/code.md similarity index 100% rename from docs/models/errors/code.md rename to docs/models/components/code.md diff --git a/docs/models/errors/unauthorized.md b/docs/models/components/conflict.md similarity index 69% rename from docs/models/errors/unauthorized.md rename to docs/models/components/conflict.md index 73b3e0a..24f67d7 100644 --- a/docs/models/errors/unauthorized.md +++ b/docs/models/components/conflict.md @@ -1,10 +1,8 @@ -# Unauthorized - -Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. +# Conflict ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `error` | [errors.UnauthorizedError](../../models/errors/unauthorizederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `error` | [components.ConflictError](../../models/components/conflicterror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/conflictcode.md b/docs/models/components/conflictcode.md similarity index 100% rename from docs/models/errors/conflictcode.md rename to docs/models/components/conflictcode.md diff --git a/docs/models/errors/conflicterror.md b/docs/models/components/conflicterror.md similarity index 92% rename from docs/models/errors/conflicterror.md rename to docs/models/components/conflicterror.md index 8434be8..41cfc56 100644 --- a/docs/models/errors/conflicterror.md +++ b/docs/models/components/conflicterror.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [errors.ConflictCode](../../models/errors/conflictcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict | +| `code` | [components.ConflictCode](../../models/components/conflictcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | | `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#conflict | \ No newline at end of file diff --git a/docs/models/errors/errort.md b/docs/models/components/errort.md similarity index 96% rename from docs/models/errors/errort.md rename to docs/models/components/errort.md index b8b44f2..699f395 100644 --- a/docs/models/errors/errort.md +++ b/docs/models/components/errort.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [errors.Code](../../models/errors/code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request | +| `code` | [components.Code](../../models/components/code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | | `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad_request | \ No newline at end of file diff --git a/docs/models/errors/inviteexpired.md b/docs/models/components/forbidden.md similarity index 74% rename from docs/models/errors/inviteexpired.md rename to docs/models/components/forbidden.md index ff6b95d..36ca6c1 100644 --- a/docs/models/errors/inviteexpired.md +++ b/docs/models/components/forbidden.md @@ -1,10 +1,8 @@ -# InviteExpired - -This response is sent when the requested content has been permanently deleted from server, with no forwarding address. +# Forbidden ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `error` | [errors.InviteExpiredError](../../models/errors/inviteexpirederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `error` | [components.ForbiddenError](../../models/components/forbiddenerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/forbiddencode.md b/docs/models/components/forbiddencode.md similarity index 100% rename from docs/models/errors/forbiddencode.md rename to docs/models/components/forbiddencode.md diff --git a/docs/models/errors/inviteexpirederror.md b/docs/models/components/forbiddenerror.md similarity index 86% rename from docs/models/errors/inviteexpirederror.md rename to docs/models/components/forbiddenerror.md index 31f1382..a9a1ece 100644 --- a/docs/models/errors/inviteexpirederror.md +++ b/docs/models/components/forbiddenerror.md @@ -1,10 +1,10 @@ -# InviteExpiredError +# ForbiddenError ## Fields | Field | Type | Required | Description | Example | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `code` | [errors.InviteExpiredCode](../../models/errors/inviteexpiredcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired | +| `code` | [components.ForbiddenCode](../../models/components/forbiddencode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite_expired | \ No newline at end of file +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden | \ No newline at end of file diff --git a/docs/models/components/internalservererror.md b/docs/models/components/internalservererror.md new file mode 100644 index 0000000..e72c4a0 --- /dev/null +++ b/docs/models/components/internalservererror.md @@ -0,0 +1,8 @@ +# InternalServerError + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `error` | [components.InternalServerErrorError](../../models/components/internalservererrorerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/internalservererrorcode.md b/docs/models/components/internalservererrorcode.md similarity index 100% rename from docs/models/errors/internalservererrorcode.md rename to docs/models/components/internalservererrorcode.md diff --git a/docs/models/components/internalservererrorerror.md b/docs/models/components/internalservererrorerror.md new file mode 100644 index 0000000..15fb8a4 --- /dev/null +++ b/docs/models/components/internalservererrorerror.md @@ -0,0 +1,10 @@ +# InternalServerErrorError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `code` | [components.InternalServerErrorCode](../../models/components/internalservererrorcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal_server_error | \ No newline at end of file diff --git a/docs/models/errors/ratelimitexceeded.md b/docs/models/components/inviteexpired.md similarity index 79% rename from docs/models/errors/ratelimitexceeded.md rename to docs/models/components/inviteexpired.md index dcbf2f8..9845a65 100644 --- a/docs/models/errors/ratelimitexceeded.md +++ b/docs/models/components/inviteexpired.md @@ -1,10 +1,8 @@ -# RateLimitExceeded - -The user has sent too many requests in a given amount of time ("rate limiting") +# InviteExpired ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `error` | [errors.RateLimitExceededError](../../models/errors/ratelimitexceedederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `error` | [components.InviteExpiredError](../../models/components/inviteexpirederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/inviteexpiredcode.md b/docs/models/components/inviteexpiredcode.md similarity index 100% rename from docs/models/errors/inviteexpiredcode.md rename to docs/models/components/inviteexpiredcode.md diff --git a/docs/models/errors/ratelimitexceedederror.md b/docs/models/components/inviteexpirederror.md similarity index 82% rename from docs/models/errors/ratelimitexceedederror.md rename to docs/models/components/inviteexpirederror.md index db87525..1cee0f3 100644 --- a/docs/models/errors/ratelimitexceedederror.md +++ b/docs/models/components/inviteexpirederror.md @@ -1,10 +1,10 @@ -# RateLimitExceededError +# InviteExpiredError ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `code` | [errors.RateLimitExceededCode](../../models/errors/ratelimitexceededcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded | +| `code` | [components.InviteExpiredCode](../../models/components/inviteexpiredcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate_limit_exceeded | \ No newline at end of file +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite_expired | \ No newline at end of file diff --git a/docs/models/components/notfound.md b/docs/models/components/notfound.md new file mode 100644 index 0000000..8351c59 --- /dev/null +++ b/docs/models/components/notfound.md @@ -0,0 +1,8 @@ +# NotFound + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `error` | [components.NotFoundError](../../models/components/notfounderror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/notfoundcode.md b/docs/models/components/notfoundcode.md similarity index 100% rename from docs/models/errors/notfoundcode.md rename to docs/models/components/notfoundcode.md diff --git a/docs/models/errors/notfounderror.md b/docs/models/components/notfounderror.md similarity index 92% rename from docs/models/errors/notfounderror.md rename to docs/models/components/notfounderror.md index 340439d..4db64c7 100644 --- a/docs/models/errors/notfounderror.md +++ b/docs/models/components/notfounderror.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [errors.NotFoundCode](../../models/errors/notfoundcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found | +| `code` | [components.NotFoundCode](../../models/components/notfoundcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | | `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not_found | \ No newline at end of file diff --git a/docs/models/components/ratelimitexceeded.md b/docs/models/components/ratelimitexceeded.md new file mode 100644 index 0000000..465a88f --- /dev/null +++ b/docs/models/components/ratelimitexceeded.md @@ -0,0 +1,8 @@ +# RateLimitExceeded + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `error` | [components.RateLimitExceededError](../../models/components/ratelimitexceedederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/ratelimitexceededcode.md b/docs/models/components/ratelimitexceededcode.md similarity index 100% rename from docs/models/errors/ratelimitexceededcode.md rename to docs/models/components/ratelimitexceededcode.md diff --git a/docs/models/components/ratelimitexceedederror.md b/docs/models/components/ratelimitexceedederror.md new file mode 100644 index 0000000..ac10b1a --- /dev/null +++ b/docs/models/components/ratelimitexceedederror.md @@ -0,0 +1,10 @@ +# RateLimitExceededError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `code` | [components.RateLimitExceededCode](../../models/components/ratelimitexceededcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate_limit_exceeded | \ No newline at end of file diff --git a/docs/models/components/unauthorized.md b/docs/models/components/unauthorized.md new file mode 100644 index 0000000..117be97 --- /dev/null +++ b/docs/models/components/unauthorized.md @@ -0,0 +1,8 @@ +# Unauthorized + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `error` | [components.UnauthorizedError](../../models/components/unauthorizederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unauthorizedcode.md b/docs/models/components/unauthorizedcode.md similarity index 100% rename from docs/models/errors/unauthorizedcode.md rename to docs/models/components/unauthorizedcode.md diff --git a/docs/models/components/unauthorizederror.md b/docs/models/components/unauthorizederror.md new file mode 100644 index 0000000..31c2df0 --- /dev/null +++ b/docs/models/components/unauthorizederror.md @@ -0,0 +1,10 @@ +# UnauthorizedError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `code` | [components.UnauthorizedCode](../../models/components/unauthorizedcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized | \ No newline at end of file diff --git a/docs/models/components/unprocessableentity.md b/docs/models/components/unprocessableentity.md new file mode 100644 index 0000000..26eff74 --- /dev/null +++ b/docs/models/components/unprocessableentity.md @@ -0,0 +1,8 @@ +# UnprocessableEntity + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `error` | [components.UnprocessableEntityError](../../models/components/unprocessableentityerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentitycode.md b/docs/models/components/unprocessableentitycode.md similarity index 100% rename from docs/models/errors/unprocessableentitycode.md rename to docs/models/components/unprocessableentitycode.md diff --git a/docs/models/components/unprocessableentityerror.md b/docs/models/components/unprocessableentityerror.md new file mode 100644 index 0000000..d2ebed5 --- /dev/null +++ b/docs/models/components/unprocessableentityerror.md @@ -0,0 +1,10 @@ +# UnprocessableEntityError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `code` | [components.UnprocessableEntityCode](../../models/components/unprocessableentitycode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable_entity | \ No newline at end of file diff --git a/docs/models/errors/badrequest.md b/docs/models/errors/badrequest.md deleted file mode 100644 index fb4f9cd..0000000 --- a/docs/models/errors/badrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# BadRequest - -The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `error` | [errors.ErrorT](../../models/errors/errort.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/conflict.md b/docs/models/errors/conflict.md deleted file mode 100644 index 0d34b80..0000000 --- a/docs/models/errors/conflict.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conflict - -This response is sent when a request conflicts with the current state of the server. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `error` | [errors.ConflictError](../../models/errors/conflicterror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/forbidden.md b/docs/models/errors/forbidden.md deleted file mode 100644 index 1017e84..0000000 --- a/docs/models/errors/forbidden.md +++ /dev/null @@ -1,10 +0,0 @@ -# Forbidden - -The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `error` | [errors.ForbiddenError](../../models/errors/forbiddenerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/forbiddenerror.md b/docs/models/errors/forbiddenerror.md deleted file mode 100644 index 66e5641..0000000 --- a/docs/models/errors/forbiddenerror.md +++ /dev/null @@ -1,10 +0,0 @@ -# ForbiddenError - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [errors.ForbiddenCode](../../models/errors/forbiddencode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden | \ No newline at end of file diff --git a/docs/models/errors/internalservererror.md b/docs/models/errors/internalservererror.md deleted file mode 100644 index 7809e04..0000000 --- a/docs/models/errors/internalservererror.md +++ /dev/null @@ -1,10 +0,0 @@ -# InternalServerError - -The server has encountered a situation it does not know how to handle. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `error` | [errors.InternalServerErrorError](../../models/errors/internalservererrorerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/internalservererrorerror.md b/docs/models/errors/internalservererrorerror.md deleted file mode 100644 index 3568e6d..0000000 --- a/docs/models/errors/internalservererrorerror.md +++ /dev/null @@ -1,10 +0,0 @@ -# InternalServerErrorError - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `code` | [errors.InternalServerErrorCode](../../models/errors/internalservererrorcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal_server_error | \ No newline at end of file diff --git a/docs/models/errors/notfound.md b/docs/models/errors/notfound.md deleted file mode 100644 index 6d228ba..0000000 --- a/docs/models/errors/notfound.md +++ /dev/null @@ -1,10 +0,0 @@ -# NotFound - -The server cannot find the requested resource. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `error` | [errors.NotFoundError](../../models/errors/notfounderror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unauthorizederror.md b/docs/models/errors/unauthorizederror.md deleted file mode 100644 index 705b175..0000000 --- a/docs/models/errors/unauthorizederror.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnauthorizedError - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [errors.UnauthorizedCode](../../models/errors/unauthorizedcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentity.md b/docs/models/errors/unprocessableentity.md deleted file mode 100644 index eeec3f3..0000000 --- a/docs/models/errors/unprocessableentity.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnprocessableEntity - -The request was well-formed but was unable to be followed due to semantic errors. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `error` | [errors.UnprocessableEntityError](../../models/errors/unprocessableentityerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentityerror.md b/docs/models/errors/unprocessableentityerror.md deleted file mode 100644 index 40c7ee9..0000000 --- a/docs/models/errors/unprocessableentityerror.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnprocessableEntityError - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `code` | [errors.UnprocessableEntityCode](../../models/errors/unprocessableentitycode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable_entity | \ No newline at end of file diff --git a/docs/models/operations/adddomainresponse.md b/docs/models/operations/adddomainresponse.md new file mode 100644 index 0000000..a81d806 --- /dev/null +++ b/docs/models/operations/adddomainresponse.md @@ -0,0 +1,2 @@ +# AddDomainResponse + diff --git a/docs/models/operations/bulkcreatelinksresponse.md b/docs/models/operations/bulkcreatelinksresponse.md new file mode 100644 index 0000000..84dff7c --- /dev/null +++ b/docs/models/operations/bulkcreatelinksresponse.md @@ -0,0 +1,2 @@ +# BulkCreateLinksResponse + diff --git a/docs/models/operations/createlinkresponse.md b/docs/models/operations/createlinkresponse.md new file mode 100644 index 0000000..e819154 --- /dev/null +++ b/docs/models/operations/createlinkresponse.md @@ -0,0 +1,2 @@ +# CreateLinkResponse + diff --git a/docs/models/operations/createtagresponse.md b/docs/models/operations/createtagresponse.md new file mode 100644 index 0000000..78381f1 --- /dev/null +++ b/docs/models/operations/createtagresponse.md @@ -0,0 +1,2 @@ +# CreateTagResponse + diff --git a/docs/models/operations/createworkspaceresponse.md b/docs/models/operations/createworkspaceresponse.md new file mode 100644 index 0000000..688ec19 --- /dev/null +++ b/docs/models/operations/createworkspaceresponse.md @@ -0,0 +1,2 @@ +# CreateWorkspaceResponse + diff --git a/docs/models/operations/deletedomainresponse.md b/docs/models/operations/deletedomainresponse.md new file mode 100644 index 0000000..410ff80 --- /dev/null +++ b/docs/models/operations/deletedomainresponse.md @@ -0,0 +1,2 @@ +# DeleteDomainResponse + diff --git a/docs/models/operations/deletelinkresponse.md b/docs/models/operations/deletelinkresponse.md new file mode 100644 index 0000000..837294b --- /dev/null +++ b/docs/models/operations/deletelinkresponse.md @@ -0,0 +1,2 @@ +# DeleteLinkResponse + diff --git a/docs/models/operations/editdomainresponse.md b/docs/models/operations/editdomainresponse.md new file mode 100644 index 0000000..388d901 --- /dev/null +++ b/docs/models/operations/editdomainresponse.md @@ -0,0 +1,2 @@ +# EditDomainResponse + diff --git a/docs/models/operations/editlinkresponse.md b/docs/models/operations/editlinkresponse.md new file mode 100644 index 0000000..9a10aa1 --- /dev/null +++ b/docs/models/operations/editlinkresponse.md @@ -0,0 +1,2 @@ +# EditLinkResponse + diff --git a/docs/models/operations/getbrowseranalyticsrequest.md b/docs/models/operations/getbrowseranalyticsrequest.md index 1c42df3..419bbbe 100644 --- a/docs/models/operations/getbrowseranalyticsrequest.md +++ b/docs/models/operations/getbrowseranalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetBrowserAnalyticsQueryParamCountry](../../models/operations/getbrowseranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetBrowserAnalyticsQueryParamCountry](../../models/operations/getbrowseranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getbrowseranalyticsresponse.md b/docs/models/operations/getbrowseranalyticsresponse.md new file mode 100644 index 0000000..dd045e1 --- /dev/null +++ b/docs/models/operations/getbrowseranalyticsresponse.md @@ -0,0 +1,2 @@ +# GetBrowserAnalyticsResponse + diff --git a/docs/models/operations/getcityanalyticsrequest.md b/docs/models/operations/getcityanalyticsrequest.md index 1bb23cb..c324a54 100644 --- a/docs/models/operations/getcityanalyticsrequest.md +++ b/docs/models/operations/getcityanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetCityAnalyticsQueryParamCountry](../../models/operations/getcityanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetCityAnalyticsQueryParamCountry](../../models/operations/getcityanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticsresponse.md b/docs/models/operations/getcityanalyticsresponse.md new file mode 100644 index 0000000..63be11c --- /dev/null +++ b/docs/models/operations/getcityanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetCityAnalyticsResponse + diff --git a/docs/models/operations/getclicksanalyticsrequest.md b/docs/models/operations/getclicksanalyticsrequest.md index ef3bc13..555605f 100644 --- a/docs/models/operations/getclicksanalyticsrequest.md +++ b/docs/models/operations/getclicksanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getclicksanalyticsresponse.md b/docs/models/operations/getclicksanalyticsresponse.md new file mode 100644 index 0000000..4f6a3f8 --- /dev/null +++ b/docs/models/operations/getclicksanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetClicksAnalyticsResponse + diff --git a/docs/models/operations/getcountryanalyticsrequest.md b/docs/models/operations/getcountryanalyticsrequest.md index 15dcc55..2671a45 100644 --- a/docs/models/operations/getcountryanalyticsrequest.md +++ b/docs/models/operations/getcountryanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetCountryAnalyticsQueryParamCountry](../../models/operations/getcountryanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetCountryAnalyticsQueryParamCountry](../../models/operations/getcountryanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticsresponse.md b/docs/models/operations/getcountryanalyticsresponse.md new file mode 100644 index 0000000..794a3e0 --- /dev/null +++ b/docs/models/operations/getcountryanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetCountryAnalyticsResponse + diff --git a/docs/models/operations/getdeviceanalyticsrequest.md b/docs/models/operations/getdeviceanalyticsrequest.md index 7c7c4e1..b6b188c 100644 --- a/docs/models/operations/getdeviceanalyticsrequest.md +++ b/docs/models/operations/getdeviceanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetDeviceAnalyticsQueryParamCountry](../../models/operations/getdeviceanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetDeviceAnalyticsQueryParamCountry](../../models/operations/getdeviceanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getdeviceanalyticsresponse.md b/docs/models/operations/getdeviceanalyticsresponse.md new file mode 100644 index 0000000..27df118 --- /dev/null +++ b/docs/models/operations/getdeviceanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetDeviceAnalyticsResponse + diff --git a/docs/models/operations/getlinkinforesponse.md b/docs/models/operations/getlinkinforesponse.md new file mode 100644 index 0000000..c2dd4d4 --- /dev/null +++ b/docs/models/operations/getlinkinforesponse.md @@ -0,0 +1,2 @@ +# GetLinkInfoResponse + diff --git a/docs/models/operations/getlinkscountresponse.md b/docs/models/operations/getlinkscountresponse.md new file mode 100644 index 0000000..22b4895 --- /dev/null +++ b/docs/models/operations/getlinkscountresponse.md @@ -0,0 +1,2 @@ +# GetLinksCountResponse + diff --git a/docs/models/operations/getlinksresponse.md b/docs/models/operations/getlinksresponse.md new file mode 100644 index 0000000..cd3ac43 --- /dev/null +++ b/docs/models/operations/getlinksresponse.md @@ -0,0 +1,2 @@ +# GetLinksResponse + diff --git a/docs/models/operations/getmetatagsrequest.md b/docs/models/operations/getmetatagsrequest.md index 06016f7..f2008b4 100644 --- a/docs/models/operations/getmetatagsrequest.md +++ b/docs/models/operations/getmetatagsrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `url` | *string* | :heavy_check_mark: | The URL to retrieve metatags for. | https://dub.co | \ No newline at end of file diff --git a/docs/models/operations/getmetatagsresponsebody.md b/docs/models/operations/getmetatagsresponsebody.md index 2e1682d..a86de82 100644 --- a/docs/models/operations/getmetatagsresponsebody.md +++ b/docs/models/operations/getmetatagsresponsebody.md @@ -7,6 +7,6 @@ The retrieved metatags | Field | Type | Required | Description | Example | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `title` | *string* | :heavy_check_mark: | The meta title tag for the URL | Dub.co - Link Management for Modern Marketing Teams | -| `description` | *string* | :heavy_check_mark: | The meta description tag for the URL | Dub.co is the open-source link management infrastructure ... | -| `image` | *string* | :heavy_check_mark: | The OpenGraph image for the URL | https://assets.dub.co/thumbnail.jpg | \ No newline at end of file +| `title` | *string* | :heavy_check_mark: | The meta title tag for the URL. | Dub.co - Link Management for Modern Marketing Teams | +| `description` | *string* | :heavy_check_mark: | The meta description tag for the URL. | Dub.co is the open-source link management infrastructure ... | +| `image` | *string* | :heavy_check_mark: | The OpenGraph image for the URL. | https://assets.dub.co/thumbnail.jpg | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsrequest.md b/docs/models/operations/getosanalyticsrequest.md index 98d2e38..a4b7b5b 100644 --- a/docs/models/operations/getosanalyticsrequest.md +++ b/docs/models/operations/getosanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetOSAnalyticsQueryParamCountry](../../models/operations/getosanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetOSAnalyticsQueryParamCountry](../../models/operations/getosanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsresponse.md b/docs/models/operations/getosanalyticsresponse.md new file mode 100644 index 0000000..7e38b98 --- /dev/null +++ b/docs/models/operations/getosanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetOSAnalyticsResponse + diff --git a/docs/models/operations/getqrcoderesponse.md b/docs/models/operations/getqrcoderesponse.md new file mode 100644 index 0000000..1597411 --- /dev/null +++ b/docs/models/operations/getqrcoderesponse.md @@ -0,0 +1,2 @@ +# GetQRCodeResponse + diff --git a/docs/models/operations/getrefereranalyticsrequest.md b/docs/models/operations/getrefereranalyticsrequest.md index 9f6e0f3..4905d51 100644 --- a/docs/models/operations/getrefereranalyticsrequest.md +++ b/docs/models/operations/getrefereranalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetRefererAnalyticsQueryParamCountry](../../models/operations/getrefereranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetRefererAnalyticsQueryParamCountry](../../models/operations/getrefereranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getrefereranalyticsresponse.md b/docs/models/operations/getrefereranalyticsresponse.md new file mode 100644 index 0000000..7b6c66e --- /dev/null +++ b/docs/models/operations/getrefereranalyticsresponse.md @@ -0,0 +1,2 @@ +# GetRefererAnalyticsResponse + diff --git a/docs/models/operations/gettagsresponse.md b/docs/models/operations/gettagsresponse.md new file mode 100644 index 0000000..b41dfbc --- /dev/null +++ b/docs/models/operations/gettagsresponse.md @@ -0,0 +1,2 @@ +# GetTagsResponse + diff --git a/docs/models/operations/gettimeseriesanalyticsrequest.md b/docs/models/operations/gettimeseriesanalyticsrequest.md index 8f4078a..a167fa0 100644 --- a/docs/models/operations/gettimeseriesanalyticsrequest.md +++ b/docs/models/operations/gettimeseriesanalyticsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.QueryParamCountry](../../models/operations/queryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.QueryParamCountry](../../models/operations/queryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesanalyticsresponse.md b/docs/models/operations/gettimeseriesanalyticsresponse.md new file mode 100644 index 0000000..016f8b7 --- /dev/null +++ b/docs/models/operations/gettimeseriesanalyticsresponse.md @@ -0,0 +1,2 @@ +# GetTimeseriesAnalyticsResponse + diff --git a/docs/models/operations/gettoplinksrequest.md b/docs/models/operations/gettoplinksrequest.md index 6a2a4fa..8140bfe 100644 --- a/docs/models/operations/gettoplinksrequest.md +++ b/docs/models/operations/gettoplinksrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetTopLinksQueryParamCountry](../../models/operations/gettoplinksqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetTopLinksQueryParamCountry](../../models/operations/gettoplinksqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksresponse.md b/docs/models/operations/gettoplinksresponse.md new file mode 100644 index 0000000..55cb61b --- /dev/null +++ b/docs/models/operations/gettoplinksresponse.md @@ -0,0 +1,2 @@ +# GetTopLinksResponse + diff --git a/docs/models/operations/gettopurlsrequest.md b/docs/models/operations/gettopurlsrequest.md index eb21022..adeac86 100644 --- a/docs/models/operations/gettopurlsrequest.md +++ b/docs/models/operations/gettopurlsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | -| `country` | [operations.GetTopURLsQueryParamCountry](../../models/operations/gettopurlsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | -| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | -| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | -| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | -| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | -| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | -| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | -| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetTopURLsQueryParamCountry](../../models/operations/gettopurlsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsresponse.md b/docs/models/operations/gettopurlsresponse.md new file mode 100644 index 0000000..8114c28 --- /dev/null +++ b/docs/models/operations/gettopurlsresponse.md @@ -0,0 +1,2 @@ +# GetTopURLsResponse + diff --git a/docs/models/operations/getworkspaceresponse.md b/docs/models/operations/getworkspaceresponse.md new file mode 100644 index 0000000..63f6b8a --- /dev/null +++ b/docs/models/operations/getworkspaceresponse.md @@ -0,0 +1,2 @@ +# GetWorkspaceResponse + diff --git a/docs/models/operations/getworkspacesresponse.md b/docs/models/operations/getworkspacesresponse.md new file mode 100644 index 0000000..bb1c5a5 --- /dev/null +++ b/docs/models/operations/getworkspacesresponse.md @@ -0,0 +1,2 @@ +# GetWorkspacesResponse + diff --git a/docs/models/operations/listdomainsresponse.md b/docs/models/operations/listdomainsresponse.md new file mode 100644 index 0000000..3545369 --- /dev/null +++ b/docs/models/operations/listdomainsresponse.md @@ -0,0 +1,2 @@ +# ListDomainsResponse + diff --git a/docs/models/operations/setprimarydomainresponse.md b/docs/models/operations/setprimarydomainresponse.md new file mode 100644 index 0000000..68c8779 --- /dev/null +++ b/docs/models/operations/setprimarydomainresponse.md @@ -0,0 +1,2 @@ +# SetPrimaryDomainResponse + diff --git a/docs/models/operations/transferdomainresponse.md b/docs/models/operations/transferdomainresponse.md new file mode 100644 index 0000000..ae1b61c --- /dev/null +++ b/docs/models/operations/transferdomainresponse.md @@ -0,0 +1,2 @@ +# TransferDomainResponse + diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 29ef96f..d6b077e 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -49,21 +49,12 @@ run(); ### Response -**Promise<[number](../../models/.md)>** +**Promise<[operations.GetClicksAnalyticsResponse](../../models/operations/getclicksanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## timeseries @@ -100,21 +91,12 @@ run(); ### Response -**Promise<[operations.ResponseBody[]](../../models/.md)>** +**Promise<[operations.GetTimeseriesAnalyticsResponse](../../models/operations/gettimeseriesanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## countries @@ -151,21 +133,12 @@ run(); ### Response -**Promise<[operations.GetCountryAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetCountryAnalyticsResponse](../../models/operations/getcountryanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## cities @@ -202,21 +175,12 @@ run(); ### Response -**Promise<[operations.GetCityAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetCityAnalyticsResponse](../../models/operations/getcityanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## devices @@ -253,21 +217,12 @@ run(); ### Response -**Promise<[operations.GetDeviceAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetDeviceAnalyticsResponse](../../models/operations/getdeviceanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## browsers @@ -304,21 +259,12 @@ run(); ### Response -**Promise<[operations.GetBrowserAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetBrowserAnalyticsResponse](../../models/operations/getbrowseranalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## os @@ -355,21 +301,12 @@ run(); ### Response -**Promise<[operations.GetOSAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetOSAnalyticsResponse](../../models/operations/getosanalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## referers @@ -406,21 +343,12 @@ run(); ### Response -**Promise<[operations.GetRefererAnalyticsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetRefererAnalyticsResponse](../../models/operations/getrefereranalyticsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## topLinks @@ -457,21 +385,12 @@ run(); ### Response -**Promise<[operations.GetTopLinksResponseBody[]](../../models/.md)>** +**Promise<[operations.GetTopLinksResponse](../../models/operations/gettoplinksresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## topUrls @@ -508,18 +427,9 @@ run(); ### Response -**Promise<[operations.GetTopURLsResponseBody[]](../../models/.md)>** +**Promise<[operations.GetTopURLsResponse](../../models/operations/gettopurlsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index b4df579..b1a1f8a 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -45,21 +45,12 @@ run(); ### Response -**Promise<[operations.ListDomainsResponseBody[]](../../models/.md)>** +**Promise<[operations.ListDomainsResponse](../../models/operations/listdomainsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## add @@ -98,21 +89,12 @@ run(); ### Response -**Promise<[operations.AddDomainResponseBody](../../models/operations/adddomainresponsebody.md)>** +**Promise<[operations.AddDomainResponse](../../models/operations/adddomainresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## delete @@ -151,21 +133,12 @@ run(); ### Response -**Promise<[operations.DeleteDomainResponseBody](../../models/operations/deletedomainresponsebody.md)>** +**Promise<[operations.DeleteDomainResponse](../../models/operations/deletedomainresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## update @@ -205,21 +178,12 @@ run(); ### Response -**Promise<[operations.EditDomainResponseBody](../../models/operations/editdomainresponsebody.md)>** +**Promise<[operations.EditDomainResponse](../../models/operations/editdomainresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## setPrimary @@ -258,21 +222,12 @@ run(); ### Response -**Promise<[operations.SetPrimaryDomainResponseBody](../../models/operations/setprimarydomainresponsebody.md)>** +**Promise<[operations.SetPrimaryDomainResponse](../../models/operations/setprimarydomainresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## transfer @@ -314,18 +269,9 @@ run(); ### Response -**Promise<[operations.TransferDomainResponseBody](../../models/operations/transferdomainresponsebody.md)>** +**Promise<[operations.TransferDomainResponse](../../models/operations/transferdomainresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 214c612..be52b6c 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -50,21 +50,12 @@ run(); ### Response -**Promise<[components.LinkSchema[]](../../models/.md)>** +**Promise<[operations.GetLinksResponse](../../models/operations/getlinksresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## create @@ -107,21 +98,12 @@ run(); ### Response -**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +**Promise<[operations.CreateLinkResponse](../../models/operations/createlinkresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## count @@ -162,21 +144,12 @@ run(); ### Response -**Promise<[number](../../models/.md)>** +**Promise<[operations.GetLinksCountResponse](../../models/operations/getlinkscountresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## get @@ -216,21 +189,12 @@ run(); ### Response -**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +**Promise<[operations.GetLinkInfoResponse](../../models/operations/getlinkinforesponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## update @@ -277,21 +241,12 @@ run(); ### Response -**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +**Promise<[operations.EditLinkResponse](../../models/operations/editlinkresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## delete @@ -330,21 +285,12 @@ run(); ### Response -**Promise<[operations.DeleteLinkResponseBody](../../models/operations/deletelinkresponsebody.md)>** +**Promise<[operations.DeleteLinkResponse](../../models/operations/deletelinkresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## createMany @@ -389,18 +335,9 @@ run(); ### Response -**Promise<[components.LinkSchema[]](../../models/.md)>** +**Promise<[operations.BulkCreateLinksResponse](../../models/operations/bulkcreatelinksresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index 93dcea7..b5d7195 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -7,7 +7,7 @@ ## get -Retrieve the metatags for a URL +Retrieve the metatags for a URL. ### Example Usage @@ -21,7 +21,7 @@ const dub = new Dub({ async function run() { const result = await dub.metatags.get({ - url: "https://brief-micronutrient.org", + url: "https://dub.co", }); // Handle the result diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index 6197988..704e6e2 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -40,18 +40,9 @@ run(); ### Response -**Promise<[string](../../models/.md)>** +**Promise<[operations.GetQRCodeResponse](../../models/operations/getqrcoderesponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 6b8c563..aa15e88 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -41,21 +41,12 @@ run(); ### Response -**Promise<[components.TagSchema[]](../../models/.md)>** +**Promise<[operations.GetTagsResponse](../../models/operations/gettagsresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## create @@ -94,18 +85,9 @@ run(); ### Response -**Promise<[components.TagSchema](../../models/components/tagschema.md)>** +**Promise<[operations.CreateTagResponse](../../models/operations/createtagresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index 0231d69..788e10a 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -41,21 +41,12 @@ run(); ### Response -**Promise<[components.WorkspaceSchema[]](../../models/.md)>** +**Promise<[operations.GetWorkspacesResponse](../../models/operations/getworkspacesresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## create @@ -95,21 +86,12 @@ run(); ### Response -**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>** +**Promise<[operations.CreateWorkspaceResponse](../../models/operations/createworkspaceresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | ## get @@ -148,18 +130,9 @@ run(); ### Response -**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>** +**Promise<[operations.GetWorkspaceResponse](../../models/operations/getworkspaceresponse.md)>** ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.BadRequest | 400 | application/json | -| errors.Unauthorized | 401 | application/json | -| errors.Forbidden | 403 | application/json | -| errors.NotFound | 404 | application/json | -| errors.Conflict | 409 | application/json | -| errors.InviteExpired | 410 | application/json | -| errors.UnprocessableEntity | 422 | application/json | -| errors.RateLimitExceeded | 429 | application/json | -| errors.InternalServerError | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..1e5d573 --- /dev/null +++ b/jsr.json @@ -0,0 +1,26 @@ + + +{ + "name": "dub", + "version": "0.24.0", + "exports": { + ".": "./src/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models/components": "./src/models/components/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./lib/config": "./src/lib/config.ts", + "./lib/http": "./src/lib/http.ts", + "./lib/retries": "./src/lib/retries.ts", + "./lib/sdks": "./src/lib/sdks.ts", + "./types": "./src/types/index.ts" + }, + "publish": { + "include": [ + "LICENSE", + "README.md", + "RUNTIMES.md", + "USAGE.md", + "src/**/*.ts" + ] + } +} diff --git a/package-lock.json b/package-lock.json index 80ba17b..ffe9489 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.23.1", + "version": "0.24.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.23.1", + "version": "0.24.0", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index a63e0e4..63ebc1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.23.1", + "version": "0.24.0", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 8a2f9c1..91ae120 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -4,7 +4,7 @@ import { HTTPClient } from "./http"; import { RetryConfig } from "./retries"; -import { pathToFunc } from "./url"; +import { Params, pathToFunc } from "./url"; /** * Contains the list of servers available to the SDK @@ -47,7 +47,7 @@ export type SDKOptions = { export function serverURLFromOptions(options: SDKOptions): URL | null { let serverURL = options.serverURL; - const params: Record = {}; + const params: Params = {}; if (!serverURL) { const serverIdx = options.serverIdx ?? 0; @@ -61,10 +61,10 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { return new URL(u); } -export const SDK_METADATA = Object.freeze({ +export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.23.1", - genVersion: "2.308.2", - userAgent: "speakeasy-sdk/typescript 0.23.1 2.308.2 0.0.1 dub", -}); + sdkVersion: "0.24.0", + genVersion: "2.311.1", + userAgent: "speakeasy-sdk/typescript 0.24.0 2.311.1 0.0.1 dub", +} as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 71ce003..2396af7 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -15,7 +15,7 @@ export function encodeMatrix( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) { +): string { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) @@ -65,7 +65,7 @@ export function encodeLabel( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) { +): string { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) @@ -100,7 +100,13 @@ export function encodeLabel( return out; } -function formEncoder(sep: string) { +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string; + +function formEncoder(sep: string): FormEncoder { return ( key: string, value: unknown, @@ -157,7 +163,7 @@ export function encodeBodyForm( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) { +): string { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) @@ -200,7 +206,7 @@ export function encodeDeepObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -) { +): string { if (value == null) { return ""; } @@ -247,7 +253,7 @@ export function encodeJSON( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) { +): string { if (typeof value === "undefined") { return ""; } @@ -265,7 +271,7 @@ export const encodeSimple = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => { +): string => { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) @@ -337,7 +343,7 @@ function serializeValue(value: unknown): string { return `${value}`; } -function jsonReplacer(_: string, value: unknown) { +function jsonReplacer(_: string, value: unknown): unknown { if (value instanceof Uint8Array) { return bytesToBase64(value); } else { diff --git a/src/lib/http.ts b/src/lib/http.ts index 45ef134..ff5525c 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -7,7 +7,7 @@ export type Fetcher = ( init?: RequestInit, ) => Promise; -type Awaitable = T | Promise; +export type Awaitable = T | Promise; const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init); @@ -15,9 +15,9 @@ export interface HTTPClientOptions { fetcher?: Fetcher; } -type BeforeRequestHook = (req: Request) => Awaitable; -type RequestErrorHook = (err: unknown, req: Request) => Awaitable; -type ResponseHook = (res: Response, req: Request) => Awaitable; +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; export class HTTPClient { private fetcher: Fetcher; @@ -100,7 +100,7 @@ export class HTTPClient { | [hook: "beforeRequest", fn: BeforeRequestHook] | [hook: "requestError", fn: RequestErrorHook] | [hook: "response", fn: ResponseHook] - ) { + ): this { let target: unknown[]; if (args[0] === "beforeRequest") { target = this.requestHooks; @@ -120,7 +120,7 @@ export class HTTPClient { return this; } - clone() { + clone(): HTTPClient { const child = new HTTPClient(this.options); child.requestHooks = this.requestHooks.slice(); child.requestErrorHooks = this.requestErrorHooks.slice(); @@ -160,7 +160,7 @@ 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) { diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index e432c07..20c7265 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -40,7 +40,7 @@ export class ClientSDK { this.client = client; } - protected createRequest$(conf: RequestConfig, options?: RequestOptions) { + protected createRequest$(conf: RequestConfig, options?: RequestOptions): Request { const { method, path, query, headers: opHeaders, security } = conf; const base = conf.baseURL ?? this.baseURL; @@ -109,7 +109,7 @@ export class ClientSDK { context: HookContext; errorCodes: number | string | (number | string)[]; } - ) { + ): Promise { const { context, errorCodes } = options; let response = await this.client.request(await this.hooks$.beforeRequest(context, req)); diff --git a/src/lib/security.ts b/src/lib/security.ts index b819443..ae2bdc6 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -169,7 +169,9 @@ function applyBearer( state.headers[spec.fieldName] = value; } -export function resolveGlobalSecurity(security: Partial | null | undefined) { +export function resolveGlobalSecurity( + security: Partial | null | undefined +): SecurityState | null { return resolveSecurity([ { fieldName: "Authorization", diff --git a/src/lib/url.ts b/src/lib/url.ts index 3fc4ecc..df58acb 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -4,10 +4,12 @@ const hasOwn = Object.prototype.hasOwnProperty; +export type Params = Partial>; + export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, -): (params?: Record) => string { +): (params?: Params) => string { const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; return function buildURLPath(params: Record = {}): string { diff --git a/src/models/errors/badrequest.ts b/src/models/components/badrequest.ts similarity index 62% rename from src/models/errors/badrequest.ts rename to src/models/components/badrequest.ts index 041058c..9f4dcb9 100644 --- a/src/models/errors/badrequest.ts +++ b/src/models/components/badrequest.ts @@ -30,39 +30,12 @@ export type ErrorT = { docUrl?: string | undefined; }; -/** - * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). - */ -export type BadRequestData = { +export type BadRequest = { error: ErrorT; }; -/** - * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). - */ -export class BadRequest extends Error { - error: ErrorT; - - /** The original data that was passed to this error instance. */ - data$: BadRequestData; - - constructor(err: BadRequestData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "BadRequest"; - } -} - /** @internal */ -export const Code$ = z.nativeEnum(Code); +export const Code$: z.ZodNativeEnum = z.nativeEnum(Code); /** @internal */ export namespace ErrorT$ { @@ -118,9 +91,9 @@ export namespace BadRequest$ { error: z.lazy(() => ErrorT$.inboundSchema), }) .transform((v) => { - return new BadRequest({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +101,12 @@ export namespace BadRequest$ { }; export const outboundSchema: z.ZodType = z - .instanceof(BadRequest) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => ErrorT$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => ErrorT$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/conflict.ts b/src/models/components/conflict.ts similarity index 67% rename from src/models/errors/conflict.ts rename to src/models/components/conflict.ts index 9f48942..17fb0a7 100644 --- a/src/models/errors/conflict.ts +++ b/src/models/components/conflict.ts @@ -30,39 +30,12 @@ export type ConflictError = { docUrl?: string | undefined; }; -/** - * This response is sent when a request conflicts with the current state of the server. - */ -export type ConflictData = { +export type Conflict = { error: ConflictError; }; -/** - * This response is sent when a request conflicts with the current state of the server. - */ -export class Conflict extends Error { - error: ConflictError; - - /** The original data that was passed to this error instance. */ - data$: ConflictData; - - constructor(err: ConflictData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "Conflict"; - } -} - /** @internal */ -export const ConflictCode$ = z.nativeEnum(ConflictCode); +export const ConflictCode$: z.ZodNativeEnum = z.nativeEnum(ConflictCode); /** @internal */ export namespace ConflictError$ { @@ -118,9 +91,9 @@ export namespace Conflict$ { error: z.lazy(() => ConflictError$.inboundSchema), }) .transform((v) => { - return new Conflict({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +101,12 @@ export namespace Conflict$ { }; export const outboundSchema: z.ZodType = z - .instanceof(Conflict) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => ConflictError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => ConflictError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/forbidden.ts b/src/models/components/forbidden.ts similarity index 63% rename from src/models/errors/forbidden.ts rename to src/models/components/forbidden.ts index 6de1462..04ac9ca 100644 --- a/src/models/errors/forbidden.ts +++ b/src/models/components/forbidden.ts @@ -30,39 +30,12 @@ export type ForbiddenError = { docUrl?: string | undefined; }; -/** - * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. - */ -export type ForbiddenData = { +export type Forbidden = { error: ForbiddenError; }; -/** - * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. - */ -export class Forbidden extends Error { - error: ForbiddenError; - - /** The original data that was passed to this error instance. */ - data$: ForbiddenData; - - constructor(err: ForbiddenData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "Forbidden"; - } -} - /** @internal */ -export const ForbiddenCode$ = z.nativeEnum(ForbiddenCode); +export const ForbiddenCode$: z.ZodNativeEnum = z.nativeEnum(ForbiddenCode); /** @internal */ export namespace ForbiddenError$ { @@ -118,9 +91,9 @@ export namespace Forbidden$ { error: z.lazy(() => ForbiddenError$.inboundSchema), }) .transform((v) => { - return new Forbidden({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +101,12 @@ export namespace Forbidden$ { }; export const outboundSchema: z.ZodType = z - .instanceof(Forbidden) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => ForbiddenError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => ForbiddenError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 385d40d..fc9fe4f 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -2,7 +2,16 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +export * from "./badrequest"; +export * from "./conflict"; +export * from "./forbidden"; +export * from "./internalservererror"; +export * from "./inviteexpired"; export * from "./linkschema"; +export * from "./notfound"; +export * from "./ratelimitexceeded"; export * from "./security"; export * from "./tagschema"; +export * from "./unauthorized"; +export * from "./unprocessableentity"; export * from "./workspaceschema"; diff --git a/src/models/errors/internalservererror.ts b/src/models/components/internalservererror.ts similarity index 68% rename from src/models/errors/internalservererror.ts rename to src/models/components/internalservererror.ts index 9df7162..d27c774 100644 --- a/src/models/errors/internalservererror.ts +++ b/src/models/components/internalservererror.ts @@ -31,39 +31,13 @@ export type InternalServerErrorError = { docUrl?: string | undefined; }; -/** - * The server has encountered a situation it does not know how to handle. - */ -export type InternalServerErrorData = { +export type InternalServerError = { error: InternalServerErrorError; }; -/** - * The server has encountered a situation it does not know how to handle. - */ -export class InternalServerError extends Error { - error: InternalServerErrorError; - - /** The original data that was passed to this error instance. */ - data$: InternalServerErrorData; - - constructor(err: InternalServerErrorData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "InternalServerError"; - } -} - /** @internal */ -export const InternalServerErrorCode$ = z.nativeEnum(InternalServerErrorCode); +export const InternalServerErrorCode$: z.ZodNativeEnum = + z.nativeEnum(InternalServerErrorCode); /** @internal */ export namespace InternalServerErrorError$ { @@ -119,9 +93,9 @@ export namespace InternalServerError$ { error: z.lazy(() => InternalServerErrorError$.inboundSchema), }) .transform((v) => { - return new InternalServerError({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -129,17 +103,12 @@ export namespace InternalServerError$ { }; export const outboundSchema: z.ZodType = z - .instanceof(InternalServerError) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => InternalServerErrorError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => InternalServerErrorError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/inviteexpired.ts b/src/models/components/inviteexpired.ts similarity index 66% rename from src/models/errors/inviteexpired.ts rename to src/models/components/inviteexpired.ts index bd30b14..b33bacf 100644 --- a/src/models/errors/inviteexpired.ts +++ b/src/models/components/inviteexpired.ts @@ -30,39 +30,13 @@ export type InviteExpiredError = { docUrl?: string | undefined; }; -/** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - */ -export type InviteExpiredData = { +export type InviteExpired = { error: InviteExpiredError; }; -/** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - */ -export class InviteExpired extends Error { - error: InviteExpiredError; - - /** The original data that was passed to this error instance. */ - data$: InviteExpiredData; - - constructor(err: InviteExpiredData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "InviteExpired"; - } -} - /** @internal */ -export const InviteExpiredCode$ = z.nativeEnum(InviteExpiredCode); +export const InviteExpiredCode$: z.ZodNativeEnum = + z.nativeEnum(InviteExpiredCode); /** @internal */ export namespace InviteExpiredError$ { @@ -118,9 +92,9 @@ export namespace InviteExpired$ { error: z.lazy(() => InviteExpiredError$.inboundSchema), }) .transform((v) => { - return new InviteExpired({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +102,12 @@ export namespace InviteExpired$ { }; export const outboundSchema: z.ZodType = z - .instanceof(InviteExpired) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => InviteExpiredError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => InviteExpiredError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/notfound.ts b/src/models/components/notfound.ts similarity index 69% rename from src/models/errors/notfound.ts rename to src/models/components/notfound.ts index dec2201..e4e6041 100644 --- a/src/models/errors/notfound.ts +++ b/src/models/components/notfound.ts @@ -30,39 +30,12 @@ export type NotFoundError = { docUrl?: string | undefined; }; -/** - * The server cannot find the requested resource. - */ -export type NotFoundData = { +export type NotFound = { error: NotFoundError; }; -/** - * The server cannot find the requested resource. - */ -export class NotFound extends Error { - error: NotFoundError; - - /** The original data that was passed to this error instance. */ - data$: NotFoundData; - - constructor(err: NotFoundData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "NotFound"; - } -} - /** @internal */ -export const NotFoundCode$ = z.nativeEnum(NotFoundCode); +export const NotFoundCode$: z.ZodNativeEnum = z.nativeEnum(NotFoundCode); /** @internal */ export namespace NotFoundError$ { @@ -118,9 +91,9 @@ export namespace NotFound$ { error: z.lazy(() => NotFoundError$.inboundSchema), }) .transform((v) => { - return new NotFound({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +101,12 @@ export namespace NotFound$ { }; export const outboundSchema: z.ZodType = z - .instanceof(NotFound) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => NotFoundError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => NotFoundError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/ratelimitexceeded.ts b/src/models/components/ratelimitexceeded.ts similarity index 68% rename from src/models/errors/ratelimitexceeded.ts rename to src/models/components/ratelimitexceeded.ts index e648be9..7a379cd 100644 --- a/src/models/errors/ratelimitexceeded.ts +++ b/src/models/components/ratelimitexceeded.ts @@ -31,39 +31,13 @@ export type RateLimitExceededError = { docUrl?: string | undefined; }; -/** - * The user has sent too many requests in a given amount of time ("rate limiting") - */ -export type RateLimitExceededData = { +export type RateLimitExceeded = { error: RateLimitExceededError; }; -/** - * The user has sent too many requests in a given amount of time ("rate limiting") - */ -export class RateLimitExceeded extends Error { - error: RateLimitExceededError; - - /** The original data that was passed to this error instance. */ - data$: RateLimitExceededData; - - constructor(err: RateLimitExceededData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "RateLimitExceeded"; - } -} - /** @internal */ -export const RateLimitExceededCode$ = z.nativeEnum(RateLimitExceededCode); +export const RateLimitExceededCode$: z.ZodNativeEnum = + z.nativeEnum(RateLimitExceededCode); /** @internal */ export namespace RateLimitExceededError$ { @@ -119,9 +93,9 @@ export namespace RateLimitExceeded$ { error: z.lazy(() => RateLimitExceededError$.inboundSchema), }) .transform((v) => { - return new RateLimitExceeded({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -129,17 +103,12 @@ export namespace RateLimitExceeded$ { }; export const outboundSchema: z.ZodType = z - .instanceof(RateLimitExceeded) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => RateLimitExceededError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => RateLimitExceededError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/components/tagschema.ts b/src/models/components/tagschema.ts index bffc65a..f169b37 100644 --- a/src/models/components/tagschema.ts +++ b/src/models/components/tagschema.ts @@ -37,7 +37,7 @@ export type TagSchema = { }; /** @internal */ -export const Color$ = z.nativeEnum(Color); +export const Color$: z.ZodNativeEnum = z.nativeEnum(Color); /** @internal */ export namespace TagSchema$ { diff --git a/src/models/errors/unauthorized.ts b/src/models/components/unauthorized.ts similarity index 64% rename from src/models/errors/unauthorized.ts rename to src/models/components/unauthorized.ts index e9cd1dd..0aea20f 100644 --- a/src/models/errors/unauthorized.ts +++ b/src/models/components/unauthorized.ts @@ -30,39 +30,13 @@ export type UnauthorizedError = { docUrl?: string | undefined; }; -/** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - */ -export type UnauthorizedData = { +export type Unauthorized = { error: UnauthorizedError; }; -/** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - */ -export class Unauthorized extends Error { - error: UnauthorizedError; - - /** The original data that was passed to this error instance. */ - data$: UnauthorizedData; - - constructor(err: UnauthorizedData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "Unauthorized"; - } -} - /** @internal */ -export const UnauthorizedCode$ = z.nativeEnum(UnauthorizedCode); +export const UnauthorizedCode$: z.ZodNativeEnum = + z.nativeEnum(UnauthorizedCode); /** @internal */ export namespace UnauthorizedError$ { @@ -118,9 +92,9 @@ export namespace Unauthorized$ { error: z.lazy(() => UnauthorizedError$.inboundSchema), }) .transform((v) => { - return new Unauthorized({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -128,17 +102,12 @@ export namespace Unauthorized$ { }; export const outboundSchema: z.ZodType = z - .instanceof(Unauthorized) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => UnauthorizedError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => UnauthorizedError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/errors/unprocessableentity.ts b/src/models/components/unprocessableentity.ts similarity index 67% rename from src/models/errors/unprocessableentity.ts rename to src/models/components/unprocessableentity.ts index 058b65f..6d5d2d7 100644 --- a/src/models/errors/unprocessableentity.ts +++ b/src/models/components/unprocessableentity.ts @@ -31,39 +31,13 @@ export type UnprocessableEntityError = { docUrl?: string | undefined; }; -/** - * The request was well-formed but was unable to be followed due to semantic errors. - */ -export type UnprocessableEntityData = { +export type UnprocessableEntity = { error: UnprocessableEntityError; }; -/** - * The request was well-formed but was unable to be followed due to semantic errors. - */ -export class UnprocessableEntity extends Error { - error: UnprocessableEntityError; - - /** The original data that was passed to this error instance. */ - data$: UnprocessableEntityData; - - constructor(err: UnprocessableEntityData) { - super(""); - this.data$ = err; - - this.error = err.error; - - this.message = - "message" in err && typeof err.message === "string" - ? err.message - : "API error occurred"; - - this.name = "UnprocessableEntity"; - } -} - /** @internal */ -export const UnprocessableEntityCode$ = z.nativeEnum(UnprocessableEntityCode); +export const UnprocessableEntityCode$: z.ZodNativeEnum = + z.nativeEnum(UnprocessableEntityCode); /** @internal */ export namespace UnprocessableEntityError$ { @@ -119,9 +93,9 @@ export namespace UnprocessableEntity$ { error: z.lazy(() => UnprocessableEntityError$.inboundSchema), }) .transform((v) => { - return new UnprocessableEntity({ + return { error: v.error, - }); + }; }); export type Outbound = { @@ -129,17 +103,12 @@ export namespace UnprocessableEntity$ { }; export const outboundSchema: z.ZodType = z - .instanceof(UnprocessableEntity) - .transform((v) => v.data$) - .pipe( - z - .object({ - error: z.lazy(() => UnprocessableEntityError$.outboundSchema), - }) - .transform((v) => { - return { - error: v.error, - }; - }) - ); + .object({ + error: z.lazy(() => UnprocessableEntityError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }); } diff --git a/src/models/components/workspaceschema.ts b/src/models/components/workspaceschema.ts index c01db43..6b7ce11 100644 --- a/src/models/components/workspaceschema.ts +++ b/src/models/components/workspaceschema.ts @@ -123,10 +123,10 @@ export type WorkspaceSchema = { }; /** @internal */ -export const Plan$ = z.nativeEnum(Plan); +export const Plan$: z.ZodNativeEnum = z.nativeEnum(Plan); /** @internal */ -export const Role$ = z.nativeEnum(Role); +export const Role$: z.ZodNativeEnum = z.nativeEnum(Role); /** @internal */ export namespace Users$ { diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 6e1e52b..87f62af 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -2,14 +2,5 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./badrequest"; -export * from "./conflict"; -export * from "./forbidden"; -export * from "./internalservererror"; -export * from "./inviteexpired"; -export * from "./notfound"; -export * from "./ratelimitexceeded"; export * from "./sdkerror"; export * from "./sdkvalidationerror"; -export * from "./unauthorized"; -export * from "./unprocessableentity"; diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts index fe38e77..5eb9218 100644 --- a/src/models/errors/sdkvalidationerror.ts +++ b/src/models/errors/sdkvalidationerror.ts @@ -17,7 +17,7 @@ export class SDKValidationError extends Error { this.rawValue = rawValue; } - public override toString() { + public override toString(): string { return `${this.message}: ${this.cause}`; } @@ -26,7 +26,7 @@ export class SDKValidationError extends Error { * is a ZodError or some other recognized error type, otherwise return the * default error message. */ - public pretty() { + public pretty(): string { if (this.cause instanceof z.ZodError) { return `${this.message}\n${formatZodError(this.cause)}`; } else { diff --git a/src/models/operations/adddomain.ts b/src/models/operations/adddomain.ts index 6140981..220a96d 100644 --- a/src/models/operations/adddomain.ts +++ b/src/models/operations/adddomain.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -97,8 +98,20 @@ export type AddDomainResponseBody = { clicks?: number | undefined; }; +export type AddDomainResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | AddDomainResponseBody; + /** @internal */ -export const Type$ = z.nativeEnum(Type); +export const Type$: z.ZodNativeEnum = z.nativeEnum(Type); /** @internal */ export namespace AddDomainRequestBody$ { @@ -162,7 +175,7 @@ export namespace AddDomainRequestBody$ { } /** @internal */ -export const AddDomainType$ = z.nativeEnum(AddDomainType); +export const AddDomainType$: z.ZodNativeEnum = z.nativeEnum(AddDomainType); /** @internal */ export namespace AddDomainResponseBody$ { @@ -242,3 +255,54 @@ export namespace AddDomainResponseBody$ { }; }); } + +/** @internal */ +export namespace AddDomainResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | AddDomainResponseBody$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | AddDomainResponseBody$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.lazy(() => AddDomainResponseBody$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.lazy(() => AddDomainResponseBody$.outboundSchema), + ]); +} diff --git a/src/models/operations/bulkcreatelinks.ts b/src/models/operations/bulkcreatelinks.ts index ffa0272..1175c64 100644 --- a/src/models/operations/bulkcreatelinks.ts +++ b/src/models/operations/bulkcreatelinks.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -350,6 +351,18 @@ export type RequestBody = { geo?: BulkCreateLinksGeo | null | undefined; }; +export type BulkCreateLinksResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; + /** @internal */ export namespace BulkCreateLinksTagIds$ { export type Inbound = string | Array; @@ -2033,3 +2046,57 @@ export namespace RequestBody$ { }; }); } + +/** @internal */ +export namespace BulkCreateLinksResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union( + [ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(components.LinkSchema$.inboundSchema), + ] + ); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(components.LinkSchema$.outboundSchema), + ]); +} diff --git a/src/models/operations/createlink.ts b/src/models/operations/createlink.ts index 03badec..1e6739f 100644 --- a/src/models/operations/createlink.ts +++ b/src/models/operations/createlink.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -350,6 +351,18 @@ export type CreateLinkRequestBody = { geo?: Geo | null | undefined; }; +export type CreateLinkResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.LinkSchema; + /** @internal */ export namespace TagIds$ { export type Inbound = string | Array; @@ -2034,3 +2047,54 @@ export namespace CreateLinkRequestBody$ { }; }); } + +/** @internal */ +export namespace CreateLinkResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.LinkSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.LinkSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.LinkSchema$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.LinkSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/createtag.ts b/src/models/operations/createtag.ts index f42e8ca..edd7a09 100644 --- a/src/models/operations/createtag.ts +++ b/src/models/operations/createtag.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -32,8 +33,20 @@ export type CreateTagRequestBody = { color?: Color | undefined; }; +export type CreateTagResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.TagSchema; + /** @internal */ -export const Color$ = z.nativeEnum(Color); +export const Color$: z.ZodNativeEnum = z.nativeEnum(Color); /** @internal */ export namespace CreateTagRequestBody$ { @@ -71,3 +84,54 @@ export namespace CreateTagRequestBody$ { }; }); } + +/** @internal */ +export namespace CreateTagResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.TagSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.TagSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.TagSchema$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.TagSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/createworkspace.ts b/src/models/operations/createworkspace.ts index 078c090..859c40b 100644 --- a/src/models/operations/createworkspace.ts +++ b/src/models/operations/createworkspace.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type CreateWorkspaceRequestBody = { @@ -10,6 +11,18 @@ export type CreateWorkspaceRequestBody = { domain?: string | undefined; }; +export type CreateWorkspaceResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.WorkspaceSchema; + /** @internal */ export namespace CreateWorkspaceRequestBody$ { export type Inbound = { @@ -52,3 +65,57 @@ export namespace CreateWorkspaceRequestBody$ { }; }); } + +/** @internal */ +export namespace CreateWorkspaceResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.WorkspaceSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.WorkspaceSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union( + [ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.WorkspaceSchema$.inboundSchema, + ] + ); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.WorkspaceSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/deletedomain.ts b/src/models/operations/deletedomain.ts index bdcf63a..358c2da 100644 --- a/src/models/operations/deletedomain.ts +++ b/src/models/operations/deletedomain.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type DeleteDomainRequest = { @@ -21,6 +22,18 @@ export type DeleteDomainResponseBody = { slug: string; }; +export type DeleteDomainResponse = + | DeleteDomainResponseBody + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError; + /** @internal */ export namespace DeleteDomainRequest$ { export type Inbound = { @@ -82,3 +95,54 @@ export namespace DeleteDomainResponseBody$ { }; }); } + +/** @internal */ +export namespace DeleteDomainResponse$ { + export type Inbound = + | DeleteDomainResponseBody$.Inbound + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound; + + export type Outbound = + | DeleteDomainResponseBody$.Outbound + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + z.lazy(() => DeleteDomainResponseBody$.inboundSchema), + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + z.lazy(() => DeleteDomainResponseBody$.outboundSchema), + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + ]); +} diff --git a/src/models/operations/deletelink.ts b/src/models/operations/deletelink.ts index 2128631..37d027f 100644 --- a/src/models/operations/deletelink.ts +++ b/src/models/operations/deletelink.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type DeleteLinkRequest = { @@ -21,6 +22,18 @@ export type DeleteLinkResponseBody = { id: string; }; +export type DeleteLinkResponse = + | DeleteLinkResponseBody + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError; + /** @internal */ export namespace DeleteLinkRequest$ { export type Inbound = { @@ -82,3 +95,54 @@ export namespace DeleteLinkResponseBody$ { }; }); } + +/** @internal */ +export namespace DeleteLinkResponse$ { + export type Inbound = + | DeleteLinkResponseBody$.Inbound + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound; + + export type Outbound = + | DeleteLinkResponseBody$.Outbound + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + z.lazy(() => DeleteLinkResponseBody$.inboundSchema), + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + z.lazy(() => DeleteLinkResponseBody$.outboundSchema), + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + ]); +} diff --git a/src/models/operations/editdomain.ts b/src/models/operations/editdomain.ts index b51a96a..7c4a3a3 100644 --- a/src/models/operations/editdomain.ts +++ b/src/models/operations/editdomain.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -106,8 +107,20 @@ export type EditDomainResponseBody = { clicks?: number | undefined; }; +export type EditDomainResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | EditDomainResponseBody; + /** @internal */ -export const EditDomainType$ = z.nativeEnum(EditDomainType); +export const EditDomainType$: z.ZodNativeEnum = z.nativeEnum(EditDomainType); /** @internal */ export namespace EditDomainRequestBody$ { @@ -208,7 +221,8 @@ export namespace EditDomainRequest$ { } /** @internal */ -export const EditDomainDomainsType$ = z.nativeEnum(EditDomainDomainsType); +export const EditDomainDomainsType$: z.ZodNativeEnum = + z.nativeEnum(EditDomainDomainsType); /** @internal */ export namespace EditDomainResponseBody$ { @@ -288,3 +302,54 @@ export namespace EditDomainResponseBody$ { }; }); } + +/** @internal */ +export namespace EditDomainResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | EditDomainResponseBody$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | EditDomainResponseBody$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.lazy(() => EditDomainResponseBody$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.lazy(() => EditDomainResponseBody$.outboundSchema), + ]); +} diff --git a/src/models/operations/editlink.ts b/src/models/operations/editlink.ts index 09c70cd..32ecc80 100644 --- a/src/models/operations/editlink.ts +++ b/src/models/operations/editlink.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -358,6 +359,18 @@ export type EditLinkRequest = { requestBody?: EditLinkRequestBody | undefined; }; +export type EditLinkResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.LinkSchema; + /** @internal */ export namespace EditLinkTagIds$ { export type Inbound = string | Array; @@ -2079,3 +2092,54 @@ export namespace EditLinkRequest$ { }; }); } + +/** @internal */ +export namespace EditLinkResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.LinkSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.LinkSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.LinkSchema$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.LinkSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/getbrowseranalytics.ts b/src/models/operations/getbrowseranalytics.ts index f9629bb..16b5315 100644 --- a/src/models/operations/getbrowseranalytics.ts +++ b/src/models/operations/getbrowseranalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetBrowserAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetBrowserAnalyticsResponseBody = { @@ -344,15 +349,27 @@ export type GetBrowserAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetBrowserAnalyticsQueryParamInterval$ = z.nativeEnum( - GetBrowserAnalyticsQueryParamInterval -); +export type GetBrowserAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetBrowserAnalyticsQueryParamCountry$ = z.nativeEnum( - GetBrowserAnalyticsQueryParamCountry -); +export const GetBrowserAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetBrowserAnalyticsQueryParamInterval +> = z.nativeEnum(GetBrowserAnalyticsQueryParamInterval); + +/** @internal */ +export const GetBrowserAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetBrowserAnalyticsQueryParamCountry +> = z.nativeEnum(GetBrowserAnalyticsQueryParamCountry); /** @internal */ export namespace GetBrowserAnalyticsRequest$ { @@ -367,8 +384,9 @@ export namespace GetBrowserAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -383,8 +401,9 @@ export namespace GetBrowserAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -398,8 +417,9 @@ export namespace GetBrowserAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -414,8 +434,9 @@ export namespace GetBrowserAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -430,8 +451,9 @@ export namespace GetBrowserAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -445,8 +467,9 @@ export namespace GetBrowserAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -492,3 +515,56 @@ export namespace GetBrowserAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetBrowserAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetBrowserAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetBrowserAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getcityanalytics.ts b/src/models/operations/getcityanalytics.ts index 1917af2..c11f1fc 100644 --- a/src/models/operations/getcityanalytics.ts +++ b/src/models/operations/getcityanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetCityAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; /** @@ -609,11 +614,27 @@ export type GetCityAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetCityAnalyticsQueryParamInterval$ = z.nativeEnum(GetCityAnalyticsQueryParamInterval); +export type GetCityAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetCityAnalyticsQueryParamCountry$ = z.nativeEnum(GetCityAnalyticsQueryParamCountry); +export const GetCityAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetCityAnalyticsQueryParamInterval +> = z.nativeEnum(GetCityAnalyticsQueryParamInterval); + +/** @internal */ +export const GetCityAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetCityAnalyticsQueryParamCountry +> = z.nativeEnum(GetCityAnalyticsQueryParamCountry); /** @internal */ export namespace GetCityAnalyticsRequest$ { @@ -628,8 +649,9 @@ export namespace GetCityAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -644,8 +666,9 @@ export namespace GetCityAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -659,8 +682,9 @@ export namespace GetCityAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -675,8 +699,9 @@ export namespace GetCityAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -691,8 +716,9 @@ export namespace GetCityAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -706,14 +732,16 @@ export namespace GetCityAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } /** @internal */ -export const GetCityAnalyticsCountry$ = z.nativeEnum(GetCityAnalyticsCountry); +export const GetCityAnalyticsCountry$: z.ZodNativeEnum = + z.nativeEnum(GetCityAnalyticsCountry); /** @internal */ export namespace GetCityAnalyticsResponseBody$ { @@ -757,3 +785,56 @@ export namespace GetCityAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetCityAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetCityAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetCityAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getclicksanalytics.ts b/src/models/operations/getclicksanalytics.ts index 98512a3..a90ec12 100644 --- a/src/models/operations/getclicksanalytics.ts +++ b/src/models/operations/getclicksanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -321,21 +322,37 @@ export type GetClicksAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; -/** @internal */ -export const Interval$ = z.nativeEnum(Interval); +export type GetClicksAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | number; /** @internal */ -export const Country$ = z.nativeEnum(Country); +export const Interval$: z.ZodNativeEnum = z.nativeEnum(Interval); + +/** @internal */ +export const Country$: z.ZodNativeEnum = z.nativeEnum(Country); /** @internal */ export namespace GetClicksAnalyticsRequest$ { @@ -350,8 +367,9 @@ export namespace GetClicksAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -366,8 +384,9 @@ export namespace GetClicksAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -381,8 +400,9 @@ export namespace GetClicksAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -397,8 +417,9 @@ export namespace GetClicksAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -413,8 +434,9 @@ export namespace GetClicksAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -428,8 +450,62 @@ export namespace GetClicksAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } + +/** @internal */ +export namespace GetClicksAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | number; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | number; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.number(), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.number(), + ]); +} diff --git a/src/models/operations/getcountryanalytics.ts b/src/models/operations/getcountryanalytics.ts index 37c96e3..0f01aa2 100644 --- a/src/models/operations/getcountryanalytics.ts +++ b/src/models/operations/getcountryanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetCountryAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; /** @@ -605,15 +610,27 @@ export type GetCountryAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetCountryAnalyticsQueryParamInterval$ = z.nativeEnum( - GetCountryAnalyticsQueryParamInterval -); +export type GetCountryAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetCountryAnalyticsQueryParamCountry$ = z.nativeEnum( - GetCountryAnalyticsQueryParamCountry -); +export const GetCountryAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetCountryAnalyticsQueryParamInterval +> = z.nativeEnum(GetCountryAnalyticsQueryParamInterval); + +/** @internal */ +export const GetCountryAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetCountryAnalyticsQueryParamCountry +> = z.nativeEnum(GetCountryAnalyticsQueryParamCountry); /** @internal */ export namespace GetCountryAnalyticsRequest$ { @@ -628,8 +645,9 @@ export namespace GetCountryAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -644,8 +662,9 @@ export namespace GetCountryAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -659,8 +678,9 @@ export namespace GetCountryAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -675,8 +695,9 @@ export namespace GetCountryAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -691,8 +712,9 @@ export namespace GetCountryAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -706,14 +728,16 @@ export namespace GetCountryAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } /** @internal */ -export const GetCountryAnalyticsCountry$ = z.nativeEnum(GetCountryAnalyticsCountry); +export const GetCountryAnalyticsCountry$: z.ZodNativeEnum = + z.nativeEnum(GetCountryAnalyticsCountry); /** @internal */ export namespace GetCountryAnalyticsResponseBody$ { @@ -756,3 +780,56 @@ export namespace GetCountryAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetCountryAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetCountryAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetCountryAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getdeviceanalytics.ts b/src/models/operations/getdeviceanalytics.ts index 5e9fe13..6da6373 100644 --- a/src/models/operations/getdeviceanalytics.ts +++ b/src/models/operations/getdeviceanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetDeviceAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetDeviceAnalyticsResponseBody = { @@ -344,15 +349,27 @@ export type GetDeviceAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetDeviceAnalyticsQueryParamInterval$ = z.nativeEnum( - GetDeviceAnalyticsQueryParamInterval -); +export type GetDeviceAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetDeviceAnalyticsQueryParamCountry$ = z.nativeEnum( - GetDeviceAnalyticsQueryParamCountry -); +export const GetDeviceAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetDeviceAnalyticsQueryParamInterval +> = z.nativeEnum(GetDeviceAnalyticsQueryParamInterval); + +/** @internal */ +export const GetDeviceAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetDeviceAnalyticsQueryParamCountry +> = z.nativeEnum(GetDeviceAnalyticsQueryParamCountry); /** @internal */ export namespace GetDeviceAnalyticsRequest$ { @@ -367,8 +384,9 @@ export namespace GetDeviceAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -383,8 +401,9 @@ export namespace GetDeviceAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -398,8 +417,9 @@ export namespace GetDeviceAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -414,8 +434,9 @@ export namespace GetDeviceAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -430,8 +451,9 @@ export namespace GetDeviceAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -445,8 +467,9 @@ export namespace GetDeviceAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -488,3 +511,56 @@ export namespace GetDeviceAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetDeviceAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetDeviceAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetDeviceAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getlinkinfo.ts b/src/models/operations/getlinkinfo.ts index f924394..bb775c9 100644 --- a/src/models/operations/getlinkinfo.ts +++ b/src/models/operations/getlinkinfo.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type GetLinkInfoRequest = { @@ -12,6 +13,18 @@ export type GetLinkInfoRequest = { key: string; }; +export type GetLinkInfoResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.LinkSchema; + /** @internal */ export namespace GetLinkInfoRequest$ { export type Inbound = { @@ -48,3 +61,54 @@ export namespace GetLinkInfoRequest$ { }; }); } + +/** @internal */ +export namespace GetLinkInfoResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.LinkSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.LinkSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.LinkSchema$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.LinkSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/getlinks.ts b/src/models/operations/getlinks.ts index 0128384..f06da55 100644 --- a/src/models/operations/getlinks.ts +++ b/src/models/operations/getlinks.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -61,6 +62,18 @@ export type GetLinksRequest = { page?: number | undefined; }; +export type GetLinksResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; + /** @internal */ export namespace QueryParamTagIds$ { export type Inbound = string | Array; @@ -77,7 +90,7 @@ export namespace QueryParamTagIds$ { } /** @internal */ -export const Sort$ = z.nativeEnum(Sort); +export const Sort$: z.ZodNativeEnum = z.nativeEnum(Sort); /** @internal */ export namespace GetLinksRequest$ { @@ -157,3 +170,54 @@ export namespace GetLinksRequest$ { }; }); } + +/** @internal */ +export namespace GetLinksResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(components.LinkSchema$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(components.LinkSchema$.outboundSchema), + ]); +} diff --git a/src/models/operations/getlinkscount.ts b/src/models/operations/getlinkscount.ts index 26ac70b..543732a 100644 --- a/src/models/operations/getlinkscount.ts +++ b/src/models/operations/getlinkscount.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -59,6 +60,18 @@ export type GetLinksCountRequest = { groupBy?: One | Two | undefined; }; +export type GetLinksCountResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | number; + /** @internal */ export namespace GetLinksCountQueryParamTagIds$ { export type Inbound = string | Array; @@ -71,10 +84,10 @@ export namespace GetLinksCountQueryParamTagIds$ { } /** @internal */ -export const Two$ = z.nativeEnum(Two); +export const Two$: z.ZodNativeEnum = z.nativeEnum(Two); /** @internal */ -export const One$ = z.nativeEnum(One); +export const One$: z.ZodNativeEnum = z.nativeEnum(One); /** @internal */ export namespace GroupBy$ { @@ -157,3 +170,56 @@ export namespace GetLinksCountRequest$ { }; }); } + +/** @internal */ +export namespace GetLinksCountResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | number; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | number; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.number(), + ]); + export const outboundSchema: z.ZodType = z.union( + [ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.number(), + ] + ); +} diff --git a/src/models/operations/getmetatags.ts b/src/models/operations/getmetatags.ts index 281e195..25ebe94 100644 --- a/src/models/operations/getmetatags.ts +++ b/src/models/operations/getmetatags.ts @@ -5,6 +5,9 @@ import * as z from "zod"; export type GetMetatagsRequest = { + /** + * The URL to retrieve metatags for. + */ url: string; }; @@ -13,17 +16,17 @@ export type GetMetatagsRequest = { */ export type GetMetatagsResponseBody = { /** - * The meta title tag for the URL + * The meta title tag for the URL. */ - title: string; + title: string | null; /** - * The meta description tag for the URL + * The meta description tag for the URL. */ - description: string; + description: string | null; /** - * The OpenGraph image for the URL + * The OpenGraph image for the URL. */ - image: string; + image: string | null; }; /** @internal */ @@ -60,16 +63,16 @@ export namespace GetMetatagsRequest$ { /** @internal */ export namespace GetMetatagsResponseBody$ { export type Inbound = { - title: string; - description: string; - image: string; + title: string | null; + description: string | null; + image: string | null; }; export const inboundSchema: z.ZodType = z .object({ - title: z.string(), - description: z.string(), - image: z.string(), + title: z.nullable(z.string()), + description: z.nullable(z.string()), + image: z.nullable(z.string()), }) .transform((v) => { return { @@ -80,16 +83,16 @@ export namespace GetMetatagsResponseBody$ { }); export type Outbound = { - title: string; - description: string; - image: string; + title: string | null; + description: string | null; + image: string | null; }; export const outboundSchema: z.ZodType = z .object({ - title: z.string(), - description: z.string(), - image: z.string(), + title: z.nullable(z.string()), + description: z.nullable(z.string()), + image: z.nullable(z.string()), }) .transform((v) => { return { diff --git a/src/models/operations/getosanalytics.ts b/src/models/operations/getosanalytics.ts index cb9780c..d78bf04 100644 --- a/src/models/operations/getosanalytics.ts +++ b/src/models/operations/getosanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetOSAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetOSAnalyticsResponseBody = { @@ -344,11 +349,27 @@ export type GetOSAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetOSAnalyticsQueryParamInterval$ = z.nativeEnum(GetOSAnalyticsQueryParamInterval); +export type GetOSAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetOSAnalyticsQueryParamCountry$ = z.nativeEnum(GetOSAnalyticsQueryParamCountry); +export const GetOSAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetOSAnalyticsQueryParamInterval +> = z.nativeEnum(GetOSAnalyticsQueryParamInterval); + +/** @internal */ +export const GetOSAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetOSAnalyticsQueryParamCountry +> = z.nativeEnum(GetOSAnalyticsQueryParamCountry); /** @internal */ export namespace GetOSAnalyticsRequest$ { @@ -363,8 +384,9 @@ export namespace GetOSAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -379,8 +401,9 @@ export namespace GetOSAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -394,8 +417,9 @@ export namespace GetOSAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -410,8 +434,9 @@ export namespace GetOSAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -426,8 +451,9 @@ export namespace GetOSAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -441,8 +467,9 @@ export namespace GetOSAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -483,3 +510,55 @@ export namespace GetOSAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetOSAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetOSAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetOSAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getqrcode.ts b/src/models/operations/getqrcode.ts index 0741e1a..44dabb4 100644 --- a/src/models/operations/getqrcode.ts +++ b/src/models/operations/getqrcode.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -45,8 +46,20 @@ export type GetQRCodeRequest = { includeMargin?: boolean | undefined; }; +export type GetQRCodeResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | string; + /** @internal */ -export const Level$ = z.nativeEnum(Level); +export const Level$: z.ZodNativeEnum = z.nativeEnum(Level); /** @internal */ export namespace GetQRCodeRequest$ { @@ -108,3 +121,54 @@ export namespace GetQRCodeRequest$ { }; }); } + +/** @internal */ +export namespace GetQRCodeResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | string; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | string; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.string(), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.string(), + ]); +} diff --git a/src/models/operations/getrefereranalytics.ts b/src/models/operations/getrefereranalytics.ts index deedee6..d2b5687 100644 --- a/src/models/operations/getrefereranalytics.ts +++ b/src/models/operations/getrefereranalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetRefererAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetRefererAnalyticsResponseBody = { @@ -344,15 +349,27 @@ export type GetRefererAnalyticsResponseBody = { clicks: number; }; -/** @internal */ -export const GetRefererAnalyticsQueryParamInterval$ = z.nativeEnum( - GetRefererAnalyticsQueryParamInterval -); +export type GetRefererAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetRefererAnalyticsQueryParamCountry$ = z.nativeEnum( - GetRefererAnalyticsQueryParamCountry -); +export const GetRefererAnalyticsQueryParamInterval$: z.ZodNativeEnum< + typeof GetRefererAnalyticsQueryParamInterval +> = z.nativeEnum(GetRefererAnalyticsQueryParamInterval); + +/** @internal */ +export const GetRefererAnalyticsQueryParamCountry$: z.ZodNativeEnum< + typeof GetRefererAnalyticsQueryParamCountry +> = z.nativeEnum(GetRefererAnalyticsQueryParamCountry); /** @internal */ export namespace GetRefererAnalyticsRequest$ { @@ -367,8 +384,9 @@ export namespace GetRefererAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -383,8 +401,9 @@ export namespace GetRefererAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -398,8 +417,9 @@ export namespace GetRefererAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -414,8 +434,9 @@ export namespace GetRefererAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -430,8 +451,9 @@ export namespace GetRefererAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -445,8 +467,9 @@ export namespace GetRefererAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -492,3 +515,56 @@ export namespace GetRefererAnalyticsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetRefererAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetRefererAnalyticsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetRefererAnalyticsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/gettags.ts b/src/models/operations/gettags.ts index 8437ccb..a73f67f 100644 --- a/src/models/operations/gettags.ts +++ b/src/models/operations/gettags.ts @@ -2,10 +2,23 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type GetTagsRequest = {}; +export type GetTagsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; + /** @internal */ export namespace GetTagsRequest$ { export type Inbound = {}; @@ -16,3 +29,54 @@ export namespace GetTagsRequest$ { export const outboundSchema: z.ZodType = z.object({}); } + +/** @internal */ +export namespace GetTagsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(components.TagSchema$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(components.TagSchema$.outboundSchema), + ]); +} diff --git a/src/models/operations/gettimeseriesanalytics.ts b/src/models/operations/gettimeseriesanalytics.ts index a7d3c87..a3dbb63 100644 --- a/src/models/operations/gettimeseriesanalytics.ts +++ b/src/models/operations/gettimeseriesanalytics.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -321,14 +322,18 @@ export type GetTimeseriesAnalyticsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type ResponseBody = { @@ -342,11 +347,25 @@ export type ResponseBody = { clicks: number; }; -/** @internal */ -export const QueryParamInterval$ = z.nativeEnum(QueryParamInterval); +export type GetTimeseriesAnalyticsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const QueryParamCountry$ = z.nativeEnum(QueryParamCountry); +export const QueryParamInterval$: z.ZodNativeEnum = + z.nativeEnum(QueryParamInterval); + +/** @internal */ +export const QueryParamCountry$: z.ZodNativeEnum = + z.nativeEnum(QueryParamCountry); /** @internal */ export namespace GetTimeseriesAnalyticsRequest$ { @@ -361,8 +380,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -377,8 +397,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -392,8 +413,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -408,8 +430,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = @@ -425,8 +448,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -440,8 +464,9 @@ export namespace GetTimeseriesAnalyticsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -482,3 +507,56 @@ export namespace ResponseBody$ { }; }); } + +/** @internal */ +export namespace GetTimeseriesAnalyticsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => ResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => ResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/gettoplinks.ts b/src/models/operations/gettoplinks.ts index e2e7d3d..6814f58 100644 --- a/src/models/operations/gettoplinks.ts +++ b/src/models/operations/gettoplinks.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetTopLinksRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetTopLinksResponseBody = { @@ -344,11 +349,25 @@ export type GetTopLinksResponseBody = { clicks: number; }; -/** @internal */ -export const GetTopLinksQueryParamInterval$ = z.nativeEnum(GetTopLinksQueryParamInterval); +export type GetTopLinksResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetTopLinksQueryParamCountry$ = z.nativeEnum(GetTopLinksQueryParamCountry); +export const GetTopLinksQueryParamInterval$: z.ZodNativeEnum = + z.nativeEnum(GetTopLinksQueryParamInterval); + +/** @internal */ +export const GetTopLinksQueryParamCountry$: z.ZodNativeEnum = + z.nativeEnum(GetTopLinksQueryParamCountry); /** @internal */ export namespace GetTopLinksRequest$ { @@ -363,8 +382,9 @@ export namespace GetTopLinksRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -379,8 +399,9 @@ export namespace GetTopLinksRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -394,8 +415,9 @@ export namespace GetTopLinksRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -410,8 +432,9 @@ export namespace GetTopLinksRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -426,8 +449,9 @@ export namespace GetTopLinksRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -441,8 +465,9 @@ export namespace GetTopLinksRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -483,3 +508,54 @@ export namespace GetTopLinksResponseBody$ { }; }); } + +/** @internal */ +export namespace GetTopLinksResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetTopLinksResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetTopLinksResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/gettopurls.ts b/src/models/operations/gettopurls.ts index f56e617..997d84b 100644 --- a/src/models/operations/gettopurls.ts +++ b/src/models/operations/gettopurls.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; /** @@ -323,14 +324,18 @@ export type GetTopURLsRequest = { * The URL to retrieve analytics for. */ url?: string | undefined; - /** - * Whether to exclude the root link from the response. - */ - excludeRoot?: boolean | undefined; /** * The tag ID to retrieve analytics for. */ tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; }; export type GetTopURLsResponseBody = { @@ -344,11 +349,25 @@ export type GetTopURLsResponseBody = { clicks: number; }; -/** @internal */ -export const GetTopURLsQueryParamInterval$ = z.nativeEnum(GetTopURLsQueryParamInterval); +export type GetTopURLsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; /** @internal */ -export const GetTopURLsQueryParamCountry$ = z.nativeEnum(GetTopURLsQueryParamCountry); +export const GetTopURLsQueryParamInterval$: z.ZodNativeEnum = + z.nativeEnum(GetTopURLsQueryParamInterval); + +/** @internal */ +export const GetTopURLsQueryParamCountry$: z.ZodNativeEnum = + z.nativeEnum(GetTopURLsQueryParamCountry); /** @internal */ export namespace GetTopURLsRequest$ { @@ -363,8 +382,9 @@ export namespace GetTopURLsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const inboundSchema: z.ZodType = z @@ -379,8 +399,9 @@ export namespace GetTopURLsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -394,8 +415,9 @@ export namespace GetTopURLsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); @@ -410,8 +432,9 @@ export namespace GetTopURLsRequest$ { os?: string | undefined; referer?: string | undefined; url?: string | undefined; - excludeRoot?: boolean | undefined; tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; }; export const outboundSchema: z.ZodType = z @@ -426,8 +449,9 @@ export namespace GetTopURLsRequest$ { os: z.string().optional(), referer: z.string().optional(), url: z.string().optional(), - excludeRoot: z.boolean().optional(), tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), }) .transform((v) => { return { @@ -441,8 +465,9 @@ export namespace GetTopURLsRequest$ { ...(v.os === undefined ? null : { os: v.os }), ...(v.referer === undefined ? null : { referer: v.referer }), ...(v.url === undefined ? null : { url: v.url }), - ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), }; }); } @@ -483,3 +508,54 @@ export namespace GetTopURLsResponseBody$ { }; }); } + +/** @internal */ +export namespace GetTopURLsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => GetTopURLsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => GetTopURLsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/getworkspace.ts b/src/models/operations/getworkspace.ts index 093102a..253ccdd 100644 --- a/src/models/operations/getworkspace.ts +++ b/src/models/operations/getworkspace.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type GetWorkspaceRequest = { @@ -11,6 +12,18 @@ export type GetWorkspaceRequest = { idOrSlug: string; }; +export type GetWorkspaceResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | components.WorkspaceSchema; + /** @internal */ export namespace GetWorkspaceRequest$ { export type Inbound = { @@ -41,3 +54,54 @@ export namespace GetWorkspaceRequest$ { }; }); } + +/** @internal */ +export namespace GetWorkspaceResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | components.WorkspaceSchema$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | components.WorkspaceSchema$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + components.WorkspaceSchema$.inboundSchema, + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + components.WorkspaceSchema$.outboundSchema, + ]); +} diff --git a/src/models/operations/getworkspaces.ts b/src/models/operations/getworkspaces.ts new file mode 100644 index 0000000..08d1e81 --- /dev/null +++ b/src/models/operations/getworkspaces.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as components from "../components"; +import * as z from "zod"; + +export type GetWorkspacesResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; + +/** @internal */ +export namespace GetWorkspacesResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(components.WorkspaceSchema$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = z.union( + [ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(components.WorkspaceSchema$.outboundSchema), + ] + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 30f9478..c2c74a8 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -28,6 +28,7 @@ export * from "./gettimeseriesanalytics"; export * from "./gettoplinks"; export * from "./gettopurls"; export * from "./getworkspace"; +export * from "./getworkspaces"; export * from "./listdomains"; export * from "./setprimarydomain"; export * from "./transferdomain"; diff --git a/src/models/operations/listdomains.ts b/src/models/operations/listdomains.ts index 54f112f..050bbf7 100644 --- a/src/models/operations/listdomains.ts +++ b/src/models/operations/listdomains.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type ListDomainsRequest = {}; @@ -57,6 +58,18 @@ export type ListDomainsResponseBody = { clicks?: number | undefined; }; +export type ListDomainsResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | Array; + /** @internal */ export namespace ListDomainsRequest$ { export type Inbound = {}; @@ -71,7 +84,8 @@ export namespace ListDomainsRequest$ { } /** @internal */ -export const ListDomainsType$ = z.nativeEnum(ListDomainsType); +export const ListDomainsType$: z.ZodNativeEnum = + z.nativeEnum(ListDomainsType); /** @internal */ export namespace ListDomainsResponseBody$ { @@ -151,3 +165,54 @@ export namespace ListDomainsResponseBody$ { }; }); } + +/** @internal */ +export namespace ListDomainsResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | Array; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | Array; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.array(z.lazy(() => ListDomainsResponseBody$.inboundSchema)), + ]); + export const outboundSchema: z.ZodType = z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.array(z.lazy(() => ListDomainsResponseBody$.outboundSchema)), + ]); +} diff --git a/src/models/operations/setprimarydomain.ts b/src/models/operations/setprimarydomain.ts index f0b2d90..1211448 100644 --- a/src/models/operations/setprimarydomain.ts +++ b/src/models/operations/setprimarydomain.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type SetPrimaryDomainRequest = { @@ -65,6 +66,18 @@ export type SetPrimaryDomainResponseBody = { clicks?: number | undefined; }; +export type SetPrimaryDomainResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | SetPrimaryDomainResponseBody; + /** @internal */ export namespace SetPrimaryDomainRequest$ { export type Inbound = { @@ -97,7 +110,8 @@ export namespace SetPrimaryDomainRequest$ { } /** @internal */ -export const SetPrimaryDomainType$ = z.nativeEnum(SetPrimaryDomainType); +export const SetPrimaryDomainType$: z.ZodNativeEnum = + z.nativeEnum(SetPrimaryDomainType); /** @internal */ export namespace SetPrimaryDomainResponseBody$ { @@ -177,3 +191,56 @@ export namespace SetPrimaryDomainResponseBody$ { }; }); } + +/** @internal */ +export namespace SetPrimaryDomainResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | SetPrimaryDomainResponseBody$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | SetPrimaryDomainResponseBody$.Outbound; + export const inboundSchema: z.ZodType = + z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.lazy(() => SetPrimaryDomainResponseBody$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.lazy(() => SetPrimaryDomainResponseBody$.outboundSchema), + ]); +} diff --git a/src/models/operations/transferdomain.ts b/src/models/operations/transferdomain.ts index 7971bb2..d7780d6 100644 --- a/src/models/operations/transferdomain.ts +++ b/src/models/operations/transferdomain.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ +import * as components from "../components"; import * as z from "zod"; export type TransferDomainRequestBody = { @@ -73,6 +74,18 @@ export type TransferDomainResponseBody = { clicks?: number | undefined; }; +export type TransferDomainResponse = + | components.BadRequest + | components.Unauthorized + | components.Forbidden + | components.NotFound + | components.Conflict + | components.InviteExpired + | components.UnprocessableEntity + | components.RateLimitExceeded + | components.InternalServerError + | TransferDomainResponseBody; + /** @internal */ export namespace TransferDomainRequestBody$ { export type Inbound = { @@ -142,7 +155,8 @@ export namespace TransferDomainRequest$ { } /** @internal */ -export const TransferDomainType$ = z.nativeEnum(TransferDomainType); +export const TransferDomainType$: z.ZodNativeEnum = + z.nativeEnum(TransferDomainType); /** @internal */ export namespace TransferDomainResponseBody$ { @@ -222,3 +236,55 @@ export namespace TransferDomainResponseBody$ { }; }); } + +/** @internal */ +export namespace TransferDomainResponse$ { + export type Inbound = + | components.BadRequest$.Inbound + | components.Unauthorized$.Inbound + | components.Forbidden$.Inbound + | components.NotFound$.Inbound + | components.Conflict$.Inbound + | components.InviteExpired$.Inbound + | components.UnprocessableEntity$.Inbound + | components.RateLimitExceeded$.Inbound + | components.InternalServerError$.Inbound + | TransferDomainResponseBody$.Inbound; + + export type Outbound = + | components.BadRequest$.Outbound + | components.Unauthorized$.Outbound + | components.Forbidden$.Outbound + | components.NotFound$.Outbound + | components.Conflict$.Outbound + | components.InviteExpired$.Outbound + | components.UnprocessableEntity$.Outbound + | components.RateLimitExceeded$.Outbound + | components.InternalServerError$.Outbound + | TransferDomainResponseBody$.Outbound; + export const inboundSchema: z.ZodType = z.union([ + components.BadRequest$.inboundSchema, + components.Unauthorized$.inboundSchema, + components.Forbidden$.inboundSchema, + components.NotFound$.inboundSchema, + components.Conflict$.inboundSchema, + components.InviteExpired$.inboundSchema, + components.UnprocessableEntity$.inboundSchema, + components.RateLimitExceeded$.inboundSchema, + components.InternalServerError$.inboundSchema, + z.lazy(() => TransferDomainResponseBody$.inboundSchema), + ]); + export const outboundSchema: z.ZodType = + z.union([ + components.BadRequest$.outboundSchema, + components.Unauthorized$.outboundSchema, + components.Forbidden$.outboundSchema, + components.NotFound$.outboundSchema, + components.Conflict$.outboundSchema, + components.InviteExpired$.outboundSchema, + components.UnprocessableEntity$.outboundSchema, + components.RateLimitExceeded$.outboundSchema, + components.InternalServerError$.outboundSchema, + z.lazy(() => TransferDomainResponseBody$.outboundSchema), + ]); +} diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index 46a08ee..2ae90ff 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -10,7 +10,6 @@ import * as schemas$ from "../lib/schemas"; import { ClientSDK, RequestOptions } from "../lib/sdks"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; -import * as z from "zod"; export class Analytics extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; @@ -48,7 +47,7 @@ export class Analytics extends ClientSDK { async clicks( input: operations.GetClicksAnalyticsRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -74,10 +73,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -88,10 +83,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -117,22 +114,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -147,19 +129,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.number().parse(val$); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -169,118 +144,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetClicksAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -296,7 +244,7 @@ export class Analytics extends ClientSDK { async timeseries( input: operations.GetTimeseriesAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -322,10 +270,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -336,10 +280,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -365,22 +311,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -395,19 +326,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(operations.ResponseBody$.inboundSchema).parse(val$); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -417,118 +341,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTimeseriesAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -544,7 +441,7 @@ export class Analytics extends ClientSDK { async countries( input: operations.GetCountryAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -570,10 +467,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -584,10 +477,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -613,22 +508,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -643,21 +523,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetCountryAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -667,118 +538,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCountryAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -794,7 +638,7 @@ export class Analytics extends ClientSDK { async cities( input: operations.GetCityAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -820,10 +664,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -834,10 +674,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -863,22 +705,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -893,21 +720,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetCityAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -917,118 +735,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetCityAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1044,7 +835,7 @@ export class Analytics extends ClientSDK { async devices( input: operations.GetDeviceAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -1070,10 +861,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -1084,10 +871,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -1113,22 +902,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1143,21 +917,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetDeviceAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1167,118 +932,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetDeviceAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1294,7 +1032,7 @@ export class Analytics extends ClientSDK { async browsers( input: operations.GetBrowserAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -1320,10 +1058,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -1334,10 +1068,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -1363,22 +1099,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1393,21 +1114,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetBrowserAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1417,118 +1129,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetBrowserAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1544,7 +1229,7 @@ export class Analytics extends ClientSDK { async os( input: operations.GetOSAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -1570,10 +1255,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -1584,10 +1265,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -1613,22 +1296,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1643,21 +1311,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetOSAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1667,118 +1326,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetOSAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1794,7 +1426,7 @@ export class Analytics extends ClientSDK { async referers( input: operations.GetRefererAnalyticsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -1820,10 +1452,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -1834,10 +1462,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -1863,22 +1493,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1893,21 +1508,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z - .array(operations.GetRefererAnalyticsResponseBody$.inboundSchema) - .parse(val$); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1917,118 +1523,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetRefererAnalyticsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -2044,7 +1623,7 @@ export class Analytics extends ClientSDK { async topLinks( input: operations.GetTopLinksRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -2070,10 +1649,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -2084,10 +1659,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -2113,22 +1690,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -2143,19 +1705,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(operations.GetTopLinksResponseBody$.inboundSchema).parse(val$); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -2165,118 +1720,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -2292,7 +1820,7 @@ export class Analytics extends ClientSDK { async topUrls( input: operations.GetTopURLsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -2318,10 +1846,6 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("excludeRoot", payload$.excludeRoot, { - explode: true, - charEncoding: "percent", - }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -2332,10 +1856,12 @@ export class Analytics extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { @@ -2361,22 +1887,7 @@ export class Analytics extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -2391,19 +1902,12 @@ export class Analytics extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(operations.GetTopURLsResponseBody$.inboundSchema).parse(val$); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -2413,118 +1917,91 @@ export class Analytics extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTopURLsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/sdk/domains.ts b/src/sdk/domains.ts index 2dcf60d..b6913c9 100644 --- a/src/sdk/domains.ts +++ b/src/sdk/domains.ts @@ -10,7 +10,6 @@ import * as schemas$ from "../lib/schemas"; import { ClientSDK, RequestOptions } from "../lib/sdks"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; -import * as z from "zod"; export class Domains extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; @@ -48,7 +47,7 @@ export class Domains extends ClientSDK { async list( _input: operations.ListDomainsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -83,22 +82,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -112,19 +96,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(operations.ListDomainsResponseBody$.inboundSchema).parse(val$); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -134,118 +111,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.ListDomainsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -261,7 +211,7 @@ export class Domains extends ClientSDK { async add( input: operations.AddDomainRequestBody | undefined, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -305,22 +255,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -335,19 +270,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - - if (this.matchResponse(response, 200, "application/json")) { + if (this.matchResponse(response, 201, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.AddDomainResponseBody$.inboundSchema.parse(val$); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -357,118 +285,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.AddDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -484,7 +385,7 @@ export class Domains extends ClientSDK { async delete( input: operations.DeleteDomainRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -532,22 +433,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -562,19 +448,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.DeleteDomainResponseBody$.inboundSchema.parse(val$); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -584,118 +463,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -711,7 +563,7 @@ export class Domains extends ClientSDK { async update( input: operations.EditDomainRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -760,22 +612,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -790,19 +627,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.EditDomainResponseBody$.inboundSchema.parse(val$); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -812,118 +642,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -939,7 +742,7 @@ export class Domains extends ClientSDK { async setPrimary( input: operations.SetPrimaryDomainRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -987,22 +790,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1017,19 +805,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.SetPrimaryDomainResponseBody$.inboundSchema.parse(val$); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1039,118 +820,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.SetPrimaryDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1166,7 +920,7 @@ export class Domains extends ClientSDK { async transfer( input: operations.TransferDomainRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -1215,22 +969,7 @@ export class Domains extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1245,19 +984,12 @@ export class Domains extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.TransferDomainResponseBody$.inboundSchema.parse(val$); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1267,118 +999,91 @@ export class Domains extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.TransferDomainResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/sdk/links.ts b/src/sdk/links.ts index 8605c8b..dcd5aef 100644 --- a/src/sdk/links.ts +++ b/src/sdk/links.ts @@ -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 components from "../models/components"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; import * as z from "zod"; @@ -49,7 +48,7 @@ export class Links extends ClientSDK { async list( input: operations.GetLinksRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -106,22 +105,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -136,19 +120,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(components.LinkSchema$.inboundSchema).parse(val$); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -158,118 +135,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -285,7 +235,7 @@ export class Links extends ClientSDK { async create( input: operations.CreateLinkRequestBody | undefined, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -329,22 +279,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -359,19 +294,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return components.LinkSchema$.inboundSchema.parse(val$); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -381,118 +309,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -505,7 +406,10 @@ export class Links extends ClientSDK { * @remarks * Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links. */ - async count(input: operations.GetLinksCountRequest, options?: RequestOptions): Promise { + async count( + input: operations.GetLinksCountRequest, + options?: RequestOptions + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -564,22 +468,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -594,19 +483,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.number().parse(val$); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -616,118 +498,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinksCountResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -743,7 +598,7 @@ export class Links extends ClientSDK { async get( input: operations.GetLinkInfoRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -787,22 +642,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -817,19 +657,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return components.LinkSchema$.inboundSchema.parse(val$); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -839,118 +672,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetLinkInfoResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -967,7 +773,7 @@ export class Links extends ClientSDK { linkId: string, requestBody?: operations.EditLinkRequestBody | undefined, options?: RequestOptions - ): Promise { + ): Promise { const input$: operations.EditLinkRequest = { linkId: linkId, requestBody: requestBody, @@ -1020,22 +826,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1050,19 +841,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return components.LinkSchema$.inboundSchema.parse(val$); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1072,118 +856,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.EditLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1196,10 +953,7 @@ export class Links extends ClientSDK { * @remarks * Delete a link for the authenticated workspace. */ - async delete( - linkId: string, - options?: RequestOptions - ): Promise { + async delete(linkId: string, options?: RequestOptions): Promise { const input$: operations.DeleteLinkRequest = { linkId: linkId, }; @@ -1250,22 +1004,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1280,19 +1019,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return operations.DeleteLinkResponseBody$.inboundSchema.parse(val$); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1302,118 +1034,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.DeleteLinkResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -1429,7 +1134,7 @@ export class Links extends ClientSDK { async createMany( input: Array | undefined, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -1473,22 +1178,7 @@ export class Links extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -1503,19 +1193,12 @@ export class Links extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(components.LinkSchema$.inboundSchema).parse(val$); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -1525,118 +1208,91 @@ export class Links extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.BulkCreateLinksResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/sdk/metatags.ts b/src/sdk/metatags.ts index ec31533..e1645b8 100644 --- a/src/sdk/metatags.ts +++ b/src/sdk/metatags.ts @@ -42,7 +42,7 @@ export class Metatags extends ClientSDK { * Retrieve the metatags for a URL * * @remarks - * Retrieve the metatags for a URL + * Retrieve the metatags for a URL. */ async get( input: operations.GetMetatagsRequest, @@ -82,7 +82,7 @@ export class Metatags extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { context, errorCodes: ["4XX", "5XX"] }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, diff --git a/src/sdk/qrcodes.ts b/src/sdk/qrcodes.ts index 5e8cb67..6605e3e 100644 --- a/src/sdk/qrcodes.ts +++ b/src/sdk/qrcodes.ts @@ -10,7 +10,6 @@ import * as schemas$ from "../lib/schemas"; import { ClientSDK, RequestOptions } from "../lib/sdks"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; -import * as z from "zod"; export enum GetAcceptEnum { applicationJson = "application/json", @@ -53,7 +52,7 @@ export class QRCodes extends ClientSDK { async get( input: operations.GetQRCodeRequest, options?: RequestOptions & { acceptHeaderOverride?: GetAcceptEnum } - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); @@ -104,22 +103,7 @@ export class QRCodes extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -134,19 +118,12 @@ export class QRCodes extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - 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$); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -156,118 +133,91 @@ export class QRCodes extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetQRCodeResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 1b09822..10084ec 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -42,37 +42,37 @@ export class Dub extends ClientSDK { } private _links?: Links; - get links() { + get links(): Links { return (this._links ??= new Links(this.options$)); } private _qrCodes?: QRCodes; - get qrCodes() { + get qrCodes(): QRCodes { return (this._qrCodes ??= new QRCodes(this.options$)); } private _analytics?: Analytics; - get analytics() { + get analytics(): Analytics { return (this._analytics ??= new Analytics(this.options$)); } private _workspaces?: Workspaces; - get workspaces() { + get workspaces(): Workspaces { return (this._workspaces ??= new Workspaces(this.options$)); } private _tags?: Tags; - get tags() { + get tags(): Tags { return (this._tags ??= new Tags(this.options$)); } private _domains?: Domains; - get domains() { + get domains(): Domains { return (this._domains ??= new Domains(this.options$)); } private _metatags?: Metatags; - get metatags() { + get metatags(): Metatags { return (this._metatags ??= new Metatags(this.options$)); } } diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts index a19769e..3ec1338 100644 --- a/src/sdk/tags.ts +++ b/src/sdk/tags.ts @@ -8,10 +8,8 @@ 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 components from "../models/components"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; -import * as z from "zod"; export class Tags extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; @@ -49,7 +47,7 @@ export class Tags extends ClientSDK { async list( _input: operations.GetTagsRequest, options?: RequestOptions - ): Promise> { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -84,22 +82,7 @@ export class Tags extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -113,19 +96,12 @@ export class Tags extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(components.TagSchema$.inboundSchema).parse(val$); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -135,118 +111,91 @@ export class Tags extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetTagsResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -262,7 +211,7 @@ export class Tags extends ClientSDK { async create( input: operations.CreateTagRequestBody | undefined, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -306,22 +255,7 @@ export class Tags extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -336,19 +270,12 @@ export class Tags extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - 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.TagSchema$.inboundSchema.parse(val$); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -358,118 +285,91 @@ export class Tags extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateTagResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/sdk/workspaces.ts b/src/sdk/workspaces.ts index ad6a7ee..4d2fad9 100644 --- a/src/sdk/workspaces.ts +++ b/src/sdk/workspaces.ts @@ -8,10 +8,8 @@ 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 components from "../models/components"; import * as errors from "../models/errors"; import * as operations from "../models/operations"; -import * as z from "zod"; export class Workspaces extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; @@ -46,7 +44,7 @@ export class Workspaces extends ClientSDK { * @remarks * Retrieve a list of workspaces for the authenticated user. */ - async list(options?: RequestOptions): Promise> { + async list(options?: RequestOptions): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -70,22 +68,7 @@ export class Workspaces extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -99,19 +82,12 @@ export class Workspaces extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return z.array(components.WorkspaceSchema$.inboundSchema).parse(val$); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -121,118 +97,91 @@ export class Workspaces extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspacesResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -248,7 +197,7 @@ export class Workspaces extends ClientSDK { async create( input: operations.CreateWorkspaceRequestBody | undefined, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "application/json"); @@ -282,22 +231,7 @@ export class Workspaces extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -312,19 +246,12 @@ export class Workspaces extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return components.WorkspaceSchema$.inboundSchema.parse(val$); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -334,118 +261,91 @@ export class Workspaces extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.CreateWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); @@ -461,7 +361,7 @@ export class Workspaces extends ClientSDK { async get( input: operations.GetWorkspaceRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); @@ -498,22 +398,7 @@ export class Workspaces extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "409", - "410", - "422", - "429", - "4XX", - "500", - "5XX", - ], - }; + const doOptions = { context, errorCodes: [] }; const request = this.createRequest$( { security: securitySettings$, @@ -528,19 +413,12 @@ export class Workspaces extends ClientSDK { const response = await this.do$(request, doOptions); - const responseFields$ = { - HttpMeta: { - Response: response, - Request: request, - }, - }; - if (this.matchResponse(response, 200, "application/json")) { const responseBody = await response.json(); const result = schemas$.parse( responseBody, (val$) => { - return components.WorkspaceSchema$.inboundSchema.parse(val$); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); @@ -550,118 +428,91 @@ export class Workspaces extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return errors.BadRequest$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return 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$, - }); + return operations.GetWorkspaceResponse$.inboundSchema.parse(val$); }, "Response validation failed" ); - throw result; + return result; } else { const responseBody = await response.text(); throw new errors.SDKError("Unexpected API response", response, responseBody); diff --git a/src/types/blobs.ts b/src/types/blobs.ts index 2c21e41..cbb8a57 100644 --- a/src/types/blobs.ts +++ b/src/types/blobs.ts @@ -4,10 +4,11 @@ import * as z from "zod"; -export const blobLikeSchema = z.custom(isBlobLike, { - message: "expected a Blob, File or Blob-like object", - fatal: true, -}); +export const blobLikeSchema: z.ZodType = + z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, + }); export function isBlobLike(val: unknown): val is Blob { if (val instanceof Blob) { diff --git a/src/types/operations.ts b/src/types/operations.ts index 8e38c2f..7f83351 100644 --- a/src/types/operations.ts +++ b/src/types/operations.ts @@ -11,7 +11,7 @@ export type PageIterator = Result & { export function createPageIterator( page: Result & { next: Paginator }, -) { +): { [Symbol.asyncIterator]: () => AsyncIterableIterator } { return { [Symbol.asyncIterator]: async function* paginator() { yield page; diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts index c37d292..e80b693 100644 --- a/src/types/rfcdate.ts +++ b/src/types/rfcdate.ts @@ -10,7 +10,7 @@ export class RFCDate { /** * Creates a new RFCDate instance using today's date. */ - static today() { + static today(): RFCDate { return new RFCDate(new Date()); }