dub 0.28.1 → 0.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -12
- package/docs/sdks/analytics/README.md +59 -93
- package/docs/sdks/clicks/README.md +579 -0
- package/docs/sdks/domains/README.md +5 -15
- package/docs/sdks/links/README.md +58 -9
- package/docs/sdks/qrcodes/README.md +3 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/domainschema.d.ts +14 -16
- package/models/components/domainschema.d.ts.map +1 -1
- package/models/components/domainschema.js +7 -3
- package/models/components/domainschema.js.map +1 -1
- package/models/components/linkschema.d.ts +7 -291
- package/models/components/linkschema.d.ts.map +1 -1
- package/models/components/linkschema.js +4 -0
- package/models/components/linkschema.js.map +1 -1
- package/models/components/security.d.ts +1 -4
- package/models/components/security.d.ts.map +1 -1
- package/models/components/security.js.map +1 -1
- package/models/components/tagschema.d.ts +24 -9
- package/models/components/tagschema.d.ts.map +1 -1
- package/models/components/tagschema.js +7 -3
- package/models/components/tagschema.js.map +1 -1
- package/models/components/workspaceschema.d.ts +38 -36
- package/models/components/workspaceschema.d.ts.map +1 -1
- package/models/components/workspaceschema.js +14 -6
- package/models/components/workspaceschema.js.map +1 -1
- package/models/errors/badrequest.d.ts +13 -13
- package/models/errors/badrequest.d.ts.map +1 -1
- package/models/errors/badrequest.js +7 -3
- package/models/errors/badrequest.js.map +1 -1
- package/models/errors/conflict.d.ts +13 -13
- package/models/errors/conflict.d.ts.map +1 -1
- package/models/errors/conflict.js +7 -3
- package/models/errors/conflict.js.map +1 -1
- package/models/errors/forbidden.d.ts +13 -13
- package/models/errors/forbidden.d.ts.map +1 -1
- package/models/errors/forbidden.js +7 -3
- package/models/errors/forbidden.js.map +1 -1
- package/models/errors/internalservererror.d.ts +13 -13
- package/models/errors/internalservererror.d.ts.map +1 -1
- package/models/errors/internalservererror.js +7 -3
- package/models/errors/internalservererror.js.map +1 -1
- package/models/errors/inviteexpired.d.ts +13 -13
- package/models/errors/inviteexpired.d.ts.map +1 -1
- package/models/errors/inviteexpired.js +7 -3
- package/models/errors/inviteexpired.js.map +1 -1
- package/models/errors/notfound.d.ts +13 -13
- package/models/errors/notfound.d.ts.map +1 -1
- package/models/errors/notfound.js +7 -3
- package/models/errors/notfound.js.map +1 -1
- package/models/errors/ratelimitexceeded.d.ts +13 -13
- package/models/errors/ratelimitexceeded.d.ts.map +1 -1
- package/models/errors/ratelimitexceeded.js +7 -3
- package/models/errors/ratelimitexceeded.js.map +1 -1
- package/models/errors/unauthorized.d.ts +13 -13
- package/models/errors/unauthorized.d.ts.map +1 -1
- package/models/errors/unauthorized.js +7 -3
- package/models/errors/unauthorized.js.map +1 -1
- package/models/errors/unprocessableentity.d.ts +13 -13
- package/models/errors/unprocessableentity.d.ts.map +1 -1
- package/models/errors/unprocessableentity.js +7 -3
- package/models/errors/unprocessableentity.js.map +1 -1
- package/models/operations/adddomain.d.ts +14 -12
- package/models/operations/adddomain.d.ts.map +1 -1
- package/models/operations/adddomain.js +7 -3
- package/models/operations/adddomain.js.map +1 -1
- package/models/operations/bulkcreatelinks.d.ts +4 -282
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createlink.d.ts +4 -282
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/createtag.d.ts +24 -8
- package/models/operations/createtag.d.ts.map +1 -1
- package/models/operations/createtag.js +7 -3
- package/models/operations/createtag.js.map +1 -1
- package/models/operations/createworkspace.d.ts +1 -6
- package/models/operations/createworkspace.d.ts.map +1 -1
- package/models/operations/createworkspace.js.map +1 -1
- package/models/operations/deletedomain.d.ts +2 -8
- package/models/operations/deletedomain.d.ts.map +1 -1
- package/models/operations/deletedomain.js.map +1 -1
- package/models/operations/deletelink.d.ts +2 -8
- package/models/operations/deletelink.d.ts.map +1 -1
- package/models/operations/deletelink.js.map +1 -1
- package/models/operations/getbrowsersbyclicks.d.ts +922 -0
- package/models/operations/getbrowsersbyclicks.d.ts.map +1 -0
- package/models/operations/{getbrowseranalytics.js → getbrowsersbyclicks.js} +41 -23
- package/models/operations/getbrowsersbyclicks.js.map +1 -0
- package/models/operations/getbrowsersbyclicksdeprecated.d.ts +922 -0
- package/models/operations/getbrowsersbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getbrowsersbyclicksdeprecated.js +423 -0
- package/models/operations/getbrowsersbyclicksdeprecated.js.map +1 -0
- package/models/operations/getcitiesbyclicks.d.ts +1693 -0
- package/models/operations/getcitiesbyclicks.d.ts.map +1 -0
- package/models/operations/{getcityanalytics.js → getcitiesbyclicks.js} +49 -27
- package/models/operations/getcitiesbyclicks.js.map +1 -0
- package/models/operations/getcitiesbyclicksdeprecated.d.ts +1693 -0
- package/models/operations/getcitiesbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getcitiesbyclicksdeprecated.js +688 -0
- package/models/operations/{getcountryanalytics.js.map → getcitiesbyclicksdeprecated.js.map} +1 -1
- package/models/operations/getclickscount.d.ts +903 -0
- package/models/operations/getclickscount.d.ts.map +1 -0
- package/models/operations/{getclicksanalytics.js → getclickscount.js} +34 -16
- package/models/operations/getclickscount.js.map +1 -0
- package/models/operations/getclickscountdeprecated.d.ts +903 -0
- package/models/operations/getclickscountdeprecated.d.ts.map +1 -0
- package/models/operations/getclickscountdeprecated.js +397 -0
- package/models/operations/{getdeviceanalytics.js.map → getclickscountdeprecated.js.map} +1 -1
- package/models/operations/getcountriesbyclicks.d.ts +1688 -0
- package/models/operations/getcountriesbyclicks.d.ts.map +1 -0
- package/models/operations/{getcountryanalytics.js → getcountriesbyclicks.js} +49 -27
- package/models/operations/getcountriesbyclicks.js.map +1 -0
- package/models/operations/getcountriesbyclicksdeprecated.d.ts +1688 -0
- package/models/operations/getcountriesbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getcountriesbyclicksdeprecated.js +684 -0
- package/models/operations/{getcityanalytics.js.map → getcountriesbyclicksdeprecated.js.map} +1 -1
- package/models/operations/getdevicesbyclicks.d.ts +922 -0
- package/models/operations/getdevicesbyclicks.d.ts.map +1 -0
- package/models/operations/{getdeviceanalytics.js → getdevicesbyclicks.js} +41 -23
- package/models/operations/getdevicesbyclicks.js.map +1 -0
- package/models/operations/getdevicesbyclicksdeprecated.d.ts +922 -0
- package/models/operations/getdevicesbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getdevicesbyclicksdeprecated.js +423 -0
- package/models/operations/getdevicesbyclicksdeprecated.js.map +1 -0
- package/models/operations/getlinkinfo.d.ts +1 -7
- package/models/operations/getlinkinfo.d.ts.map +1 -1
- package/models/operations/getlinkinfo.js.map +1 -1
- package/models/operations/getlinks.d.ts +18 -20
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +7 -3
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +25 -24
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js +20 -6
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/getmetatags.d.ts +2 -10
- package/models/operations/getmetatags.d.ts.map +1 -1
- package/models/operations/getmetatags.js.map +1 -1
- package/models/operations/getosbyclicks.d.ts +922 -0
- package/models/operations/getosbyclicks.d.ts.map +1 -0
- package/models/operations/{getosanalytics.js → getosbyclicks.js} +41 -23
- package/models/operations/getosbyclicks.js.map +1 -0
- package/models/operations/getosbyclicksdeprecated.d.ts +922 -0
- package/models/operations/getosbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getosbyclicksdeprecated.js +423 -0
- package/models/operations/getosbyclicksdeprecated.js.map +1 -0
- package/models/operations/getqrcode.d.ts +20 -14
- package/models/operations/getqrcode.d.ts.map +1 -1
- package/models/operations/getqrcode.js +9 -5
- package/models/operations/getqrcode.js.map +1 -1
- package/models/operations/getreferersbyclicks.d.ts +922 -0
- package/models/operations/getreferersbyclicks.d.ts.map +1 -0
- package/models/operations/{getrefereranalytics.js → getreferersbyclicks.js} +41 -23
- package/models/operations/getreferersbyclicks.js.map +1 -0
- package/models/operations/getreferersbyclicksdeprecated.d.ts +922 -0
- package/models/operations/getreferersbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/getreferersbyclicksdeprecated.js +423 -0
- package/models/operations/getreferersbyclicksdeprecated.js.map +1 -0
- package/models/operations/gettags.d.ts +1 -2
- package/models/operations/gettags.d.ts.map +1 -1
- package/models/operations/gettags.js.map +1 -1
- package/models/operations/gettimeseriesbyclicks.d.ts +922 -0
- package/models/operations/gettimeseriesbyclicks.d.ts.map +1 -0
- package/models/operations/{gettimeseriesanalytics.js → gettimeseriesbyclicks.js} +34 -16
- package/models/operations/gettimeseriesbyclicks.js.map +1 -0
- package/models/operations/gettimeseriesbyclicksdeprecated.d.ts +922 -0
- package/models/operations/gettimeseriesbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/gettimeseriesbyclicksdeprecated.js +423 -0
- package/models/operations/gettimeseriesbyclicksdeprecated.js.map +1 -0
- package/models/operations/gettoplinksbyclicks.d.ts +922 -0
- package/models/operations/gettoplinksbyclicks.d.ts.map +1 -0
- package/models/operations/{gettoplinks.js → gettoplinksbyclicks.js} +41 -23
- package/models/operations/gettoplinksbyclicks.js.map +1 -0
- package/models/operations/gettoplinksbyclicksdeprecated.d.ts +922 -0
- package/models/operations/gettoplinksbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/gettoplinksbyclicksdeprecated.js +423 -0
- package/models/operations/gettoplinksbyclicksdeprecated.js.map +1 -0
- package/models/operations/gettopurlsbyclicks.d.ts +922 -0
- package/models/operations/gettopurlsbyclicks.d.ts.map +1 -0
- package/models/operations/{gettopurls.js → gettopurlsbyclicks.js} +41 -23
- package/models/operations/gettopurlsbyclicks.js.map +1 -0
- package/models/operations/gettopurlsbyclicksdeprecated.d.ts +922 -0
- package/models/operations/gettopurlsbyclicksdeprecated.d.ts.map +1 -0
- package/models/operations/gettopurlsbyclicksdeprecated.js +423 -0
- package/models/operations/{getclicksanalytics.js.map → gettopurlsbyclicksdeprecated.js.map} +1 -1
- package/models/operations/getworkspace.d.ts +1 -4
- package/models/operations/getworkspace.d.ts.map +1 -1
- package/models/operations/getworkspace.js.map +1 -1
- package/models/operations/index.d.ts +21 -10
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +21 -10
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdomains.d.ts +1 -2
- package/models/operations/listdomains.d.ts.map +1 -1
- package/models/operations/listdomains.js.map +1 -1
- package/models/operations/setprimarydomain.d.ts +1 -4
- package/models/operations/setprimarydomain.d.ts.map +1 -1
- package/models/operations/setprimarydomain.js.map +1 -1
- package/models/operations/transferdomain.d.ts +2 -9
- package/models/operations/transferdomain.d.ts.map +1 -1
- package/models/operations/transferdomain.js.map +1 -1
- package/models/operations/updatedomain.d.ts +15 -17
- package/models/operations/updatedomain.d.ts.map +1 -1
- package/models/operations/updatedomain.js +7 -3
- package/models/operations/updatedomain.js.map +1 -1
- package/models/operations/updatelink.d.ts +5 -287
- package/models/operations/updatelink.d.ts.map +1 -1
- package/models/operations/updatelink.js.map +1 -1
- package/models/operations/upsertlink.d.ts +655 -0
- package/models/operations/upsertlink.d.ts.map +1 -0
- package/models/operations/upsertlink.js +1179 -0
- package/models/operations/upsertlink.js.map +1 -0
- package/package.json +1 -1
- package/sdk/analytics.d.ts +39 -25
- package/sdk/analytics.d.ts.map +1 -1
- package/sdk/analytics.js +128 -276
- package/sdk/analytics.js.map +1 -1
- package/sdk/clicks.d.ts +87 -0
- package/sdk/clicks.d.ts.map +1 -0
- package/sdk/clicks.js +2355 -0
- package/sdk/clicks.js.map +1 -0
- package/sdk/domains.d.ts +2 -2
- package/sdk/domains.d.ts.map +1 -1
- package/sdk/domains.js +24 -21
- package/sdk/domains.js.map +1 -1
- package/sdk/links.d.ts +13 -6
- package/sdk/links.d.ts.map +1 -1
- package/sdk/links.js +213 -32
- package/sdk/links.js.map +1 -1
- package/sdk/metatags.d.ts +1 -1
- package/sdk/metatags.d.ts.map +1 -1
- package/sdk/metatags.js +5 -4
- package/sdk/metatags.js.map +1 -1
- package/sdk/qrcodes.d.ts +1 -1
- package/sdk/qrcodes.d.ts.map +1 -1
- package/sdk/qrcodes.js +6 -5
- package/sdk/qrcodes.js.map +1 -1
- package/sdk/tags.d.ts +2 -2
- package/sdk/tags.d.ts.map +1 -1
- package/sdk/tags.js +12 -9
- package/sdk/tags.js.map +1 -1
- package/sdk/workspaces.d.ts +2 -2
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +15 -13
- package/sdk/workspaces.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/domainschema.ts +10 -19
- package/src/models/components/linkschema.ts +11 -293
- package/src/models/components/security.ts +1 -5
- package/src/models/components/tagschema.ts +10 -12
- package/src/models/components/workspaceschema.ts +20 -43
- package/src/models/errors/badrequest.ts +11 -17
- package/src/models/errors/conflict.ts +11 -17
- package/src/models/errors/forbidden.ts +11 -17
- package/src/models/errors/internalservererror.ts +11 -19
- package/src/models/errors/inviteexpired.ts +11 -18
- package/src/models/errors/notfound.ts +11 -17
- package/src/models/errors/ratelimitexceeded.ts +11 -19
- package/src/models/errors/unauthorized.ts +11 -18
- package/src/models/errors/unprocessableentity.ts +11 -19
- package/src/models/operations/adddomain.ts +10 -15
- package/src/models/operations/bulkcreatelinks.ts +8 -288
- package/src/models/operations/createlink.ts +8 -288
- package/src/models/operations/createtag.ts +10 -11
- package/src/models/operations/createworkspace.ts +1 -7
- package/src/models/operations/deletedomain.ts +2 -10
- package/src/models/operations/deletelink.ts +2 -10
- package/src/models/operations/{getbrowseranalytics.ts → getbrowsersbyclicks.ts} +59 -57
- package/src/models/operations/getbrowsersbyclicksdeprecated.ts +538 -0
- package/src/models/operations/{getcityanalytics.ts → getcitiesbyclicks.ts} +81 -78
- package/src/models/operations/getcitiesbyclicksdeprecated.ts +814 -0
- package/src/models/operations/{getclicksanalytics.ts → getclickscount.ts} +47 -38
- package/src/models/operations/{gettimeseriesanalytics.ts → getclickscountdeprecated.ts} +95 -128
- package/src/models/operations/{getcountryanalytics.ts → getcountriesbyclicks.ts} +69 -66
- package/src/models/operations/getcountriesbyclicksdeprecated.ts +807 -0
- package/src/models/operations/{getdeviceanalytics.ts → getdevicesbyclicks.ts} +59 -57
- package/src/models/operations/getdevicesbyclicksdeprecated.ts +537 -0
- package/src/models/operations/getlinkinfo.ts +1 -8
- package/src/models/operations/getlinks.ts +16 -27
- package/src/models/operations/getlinkscount.ts +29 -31
- package/src/models/operations/getmetatags.ts +2 -12
- package/src/models/operations/{getosanalytics.ts → getosbyclicks.ts} +55 -57
- package/src/models/operations/getosbyclicksdeprecated.ts +530 -0
- package/src/models/operations/getqrcode.ts +14 -19
- package/src/models/operations/{getrefereranalytics.ts → getreferersbyclicks.ts} +59 -57
- package/src/models/operations/getreferersbyclicksdeprecated.ts +538 -0
- package/src/models/operations/gettags.ts +1 -3
- package/src/models/operations/{gettopurls.ts → gettimeseriesbyclicks.ts} +63 -63
- package/src/models/operations/gettimeseriesbyclicksdeprecated.ts +539 -0
- package/src/models/operations/{gettoplinks.ts → gettoplinksbyclicks.ts} +74 -65
- package/src/models/operations/gettoplinksbyclicksdeprecated.ts +538 -0
- package/src/models/operations/gettopurlsbyclicks.ts +522 -0
- package/src/models/operations/gettopurlsbyclicksdeprecated.ts +537 -0
- package/src/models/operations/getworkspace.ts +1 -5
- package/src/models/operations/index.ts +21 -10
- package/src/models/operations/listdomains.ts +1 -3
- package/src/models/operations/setprimarydomain.ts +1 -5
- package/src/models/operations/transferdomain.ts +2 -11
- package/src/models/operations/updatedomain.ts +11 -22
- package/src/models/operations/updatelink.ts +9 -294
- package/src/models/operations/upsertlink.ts +1796 -0
- package/src/sdk/analytics.ts +160 -350
- package/src/sdk/clicks.ts +2906 -0
- package/src/sdk/domains.ts +24 -21
- package/src/sdk/links.ts +269 -32
- package/src/sdk/metatags.ts +5 -4
- package/src/sdk/qrcodes.ts +6 -5
- package/src/sdk/tags.ts +12 -9
- package/src/sdk/workspaces.ts +15 -13
- package/src/types/enums.ts +16 -0
- package/src/types/index.ts +2 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +11 -0
- package/types/enums.js.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/index.js +3 -1
- package/types/index.js.map +1 -1
- package/models/operations/getbrowseranalytics.d.ts +0 -404
- package/models/operations/getbrowseranalytics.d.ts.map +0 -1
- package/models/operations/getbrowseranalytics.js.map +0 -1
- package/models/operations/getcityanalytics.d.ts +0 -671
- package/models/operations/getcityanalytics.d.ts.map +0 -1
- package/models/operations/getclicksanalytics.d.ts +0 -381
- package/models/operations/getclicksanalytics.d.ts.map +0 -1
- package/models/operations/getcountryanalytics.d.ts +0 -665
- package/models/operations/getcountryanalytics.d.ts.map +0 -1
- package/models/operations/getdeviceanalytics.d.ts +0 -404
- package/models/operations/getdeviceanalytics.d.ts.map +0 -1
- package/models/operations/getosanalytics.d.ts +0 -404
- package/models/operations/getosanalytics.d.ts.map +0 -1
- package/models/operations/getosanalytics.js.map +0 -1
- package/models/operations/getrefereranalytics.d.ts +0 -404
- package/models/operations/getrefereranalytics.d.ts.map +0 -1
- package/models/operations/getrefereranalytics.js.map +0 -1
- package/models/operations/gettimeseriesanalytics.d.ts +0 -404
- package/models/operations/gettimeseriesanalytics.d.ts.map +0 -1
- package/models/operations/gettimeseriesanalytics.js.map +0 -1
- package/models/operations/gettoplinks.d.ts +0 -404
- package/models/operations/gettoplinks.d.ts.map +0 -1
- package/models/operations/gettoplinks.js.map +0 -1
- package/models/operations/gettopurls.d.ts +0 -404
- package/models/operations/gettopurls.d.ts.map +0 -1
- package/models/operations/gettopurls.js.map +0 -1
package/sdk/analytics.js
CHANGED
|
@@ -35,6 +35,7 @@ const schemas$ = __importStar(require("../lib/schemas"));
|
|
|
35
35
|
const sdks_1 = require("../lib/sdks");
|
|
36
36
|
const errors = __importStar(require("../models/errors"));
|
|
37
37
|
const operations = __importStar(require("../models/operations"));
|
|
38
|
+
const clicks_1 = require("./clicks");
|
|
38
39
|
const z = __importStar(require("zod"));
|
|
39
40
|
class Analytics extends sdks_1.ClientSDK {
|
|
40
41
|
constructor(options = {}) {
|
|
@@ -57,221 +58,24 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
57
58
|
this.options$ = { ...options, hooks };
|
|
58
59
|
void this.options$;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @remarks
|
|
64
|
-
* Retrieve the number of clicks for a link, a domain, or the authenticated workspace.
|
|
65
|
-
*/
|
|
66
|
-
async clicks(input, options) {
|
|
67
|
-
const headers$ = new Headers();
|
|
68
|
-
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
69
|
-
headers$.set("Accept", "application/json");
|
|
70
|
-
const payload$ = schemas$.parse(input, (value$) => operations.GetClicksAnalyticsRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
71
|
-
const body$ = null;
|
|
72
|
-
const path$ = this.templateURLComponent("/analytics/clicks")();
|
|
73
|
-
const query$ = [
|
|
74
|
-
enc$.encodeForm("browser", payload$.browser, {
|
|
75
|
-
explode: true,
|
|
76
|
-
charEncoding: "percent",
|
|
77
|
-
}),
|
|
78
|
-
enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
|
|
79
|
-
enc$.encodeForm("country", payload$.country, {
|
|
80
|
-
explode: true,
|
|
81
|
-
charEncoding: "percent",
|
|
82
|
-
}),
|
|
83
|
-
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
84
|
-
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
85
|
-
enc$.encodeForm("externalId", payload$.externalId, {
|
|
86
|
-
explode: true,
|
|
87
|
-
charEncoding: "percent",
|
|
88
|
-
}),
|
|
89
|
-
enc$.encodeForm("interval", payload$.interval, {
|
|
90
|
-
explode: true,
|
|
91
|
-
charEncoding: "percent",
|
|
92
|
-
}),
|
|
93
|
-
enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
|
|
94
|
-
enc$.encodeForm("linkId", payload$.linkId, { explode: true, charEncoding: "percent" }),
|
|
95
|
-
enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
|
|
96
|
-
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
|
97
|
-
explode: true,
|
|
98
|
-
charEncoding: "percent",
|
|
99
|
-
}),
|
|
100
|
-
enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }),
|
|
101
|
-
enc$.encodeForm("referer", payload$.referer, {
|
|
102
|
-
explode: true,
|
|
103
|
-
charEncoding: "percent",
|
|
104
|
-
}),
|
|
105
|
-
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
106
|
-
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
107
|
-
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
108
|
-
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
109
|
-
explode: true,
|
|
110
|
-
charEncoding: "percent",
|
|
111
|
-
}),
|
|
112
|
-
]
|
|
113
|
-
.filter(Boolean)
|
|
114
|
-
.join("&");
|
|
115
|
-
let security$;
|
|
116
|
-
if (typeof this.options$.token === "function") {
|
|
117
|
-
security$ = { token: await this.options$.token() };
|
|
118
|
-
}
|
|
119
|
-
else if (this.options$.token) {
|
|
120
|
-
security$ = { token: this.options$.token };
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
security$ = {};
|
|
124
|
-
}
|
|
125
|
-
const context = {
|
|
126
|
-
operationID: "getClicksAnalytics",
|
|
127
|
-
oAuth2Scopes: [],
|
|
128
|
-
securitySource: this.options$.token,
|
|
129
|
-
};
|
|
130
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
131
|
-
const doOptions = {
|
|
132
|
-
context,
|
|
133
|
-
errorCodes: [
|
|
134
|
-
"400",
|
|
135
|
-
"401",
|
|
136
|
-
"403",
|
|
137
|
-
"404",
|
|
138
|
-
"409",
|
|
139
|
-
"410",
|
|
140
|
-
"422",
|
|
141
|
-
"429",
|
|
142
|
-
"4XX",
|
|
143
|
-
"500",
|
|
144
|
-
"5XX",
|
|
145
|
-
],
|
|
146
|
-
};
|
|
147
|
-
const request = this.createRequest$(context, {
|
|
148
|
-
security: securitySettings$,
|
|
149
|
-
method: "GET",
|
|
150
|
-
path: path$,
|
|
151
|
-
headers: headers$,
|
|
152
|
-
query: query$,
|
|
153
|
-
body: body$,
|
|
154
|
-
}, options);
|
|
155
|
-
const response = await this.do$(request, doOptions);
|
|
156
|
-
const responseFields$ = {
|
|
157
|
-
HttpMeta: {
|
|
158
|
-
Response: response,
|
|
159
|
-
Request: request,
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
if (this.matchResponse(response, 200, "application/json")) {
|
|
163
|
-
const responseBody = await response.json();
|
|
164
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
165
|
-
return z.number().parse(val$);
|
|
166
|
-
}, "Response validation failed");
|
|
167
|
-
return result;
|
|
168
|
-
}
|
|
169
|
-
else if (this.matchResponse(response, 400, "application/json")) {
|
|
170
|
-
const responseBody = await response.json();
|
|
171
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
172
|
-
return errors.BadRequest$.inboundSchema.parse({
|
|
173
|
-
...responseFields$,
|
|
174
|
-
...val$,
|
|
175
|
-
});
|
|
176
|
-
}, "Response validation failed");
|
|
177
|
-
throw result;
|
|
178
|
-
}
|
|
179
|
-
else if (this.matchResponse(response, 401, "application/json")) {
|
|
180
|
-
const responseBody = await response.json();
|
|
181
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
182
|
-
return errors.Unauthorized$.inboundSchema.parse({
|
|
183
|
-
...responseFields$,
|
|
184
|
-
...val$,
|
|
185
|
-
});
|
|
186
|
-
}, "Response validation failed");
|
|
187
|
-
throw result;
|
|
188
|
-
}
|
|
189
|
-
else if (this.matchResponse(response, 403, "application/json")) {
|
|
190
|
-
const responseBody = await response.json();
|
|
191
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
192
|
-
return errors.Forbidden$.inboundSchema.parse({
|
|
193
|
-
...responseFields$,
|
|
194
|
-
...val$,
|
|
195
|
-
});
|
|
196
|
-
}, "Response validation failed");
|
|
197
|
-
throw result;
|
|
198
|
-
}
|
|
199
|
-
else if (this.matchResponse(response, 404, "application/json")) {
|
|
200
|
-
const responseBody = await response.json();
|
|
201
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
202
|
-
return errors.NotFound$.inboundSchema.parse({
|
|
203
|
-
...responseFields$,
|
|
204
|
-
...val$,
|
|
205
|
-
});
|
|
206
|
-
}, "Response validation failed");
|
|
207
|
-
throw result;
|
|
208
|
-
}
|
|
209
|
-
else if (this.matchResponse(response, 409, "application/json")) {
|
|
210
|
-
const responseBody = await response.json();
|
|
211
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
212
|
-
return errors.Conflict$.inboundSchema.parse({
|
|
213
|
-
...responseFields$,
|
|
214
|
-
...val$,
|
|
215
|
-
});
|
|
216
|
-
}, "Response validation failed");
|
|
217
|
-
throw result;
|
|
218
|
-
}
|
|
219
|
-
else if (this.matchResponse(response, 410, "application/json")) {
|
|
220
|
-
const responseBody = await response.json();
|
|
221
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
222
|
-
return errors.InviteExpired$.inboundSchema.parse({
|
|
223
|
-
...responseFields$,
|
|
224
|
-
...val$,
|
|
225
|
-
});
|
|
226
|
-
}, "Response validation failed");
|
|
227
|
-
throw result;
|
|
228
|
-
}
|
|
229
|
-
else if (this.matchResponse(response, 422, "application/json")) {
|
|
230
|
-
const responseBody = await response.json();
|
|
231
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
232
|
-
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
233
|
-
...responseFields$,
|
|
234
|
-
...val$,
|
|
235
|
-
});
|
|
236
|
-
}, "Response validation failed");
|
|
237
|
-
throw result;
|
|
238
|
-
}
|
|
239
|
-
else if (this.matchResponse(response, 429, "application/json")) {
|
|
240
|
-
const responseBody = await response.json();
|
|
241
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
242
|
-
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
243
|
-
...responseFields$,
|
|
244
|
-
...val$,
|
|
245
|
-
});
|
|
246
|
-
}, "Response validation failed");
|
|
247
|
-
throw result;
|
|
248
|
-
}
|
|
249
|
-
else if (this.matchResponse(response, 500, "application/json")) {
|
|
250
|
-
const responseBody = await response.json();
|
|
251
|
-
const result = schemas$.parse(responseBody, (val$) => {
|
|
252
|
-
return errors.InternalServerError$.inboundSchema.parse({
|
|
253
|
-
...responseFields$,
|
|
254
|
-
...val$,
|
|
255
|
-
});
|
|
256
|
-
}, "Response validation failed");
|
|
257
|
-
throw result;
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
const responseBody = await response.text();
|
|
261
|
-
throw new errors.SDKError("Unexpected API response status or content-type", response, responseBody);
|
|
262
|
-
}
|
|
61
|
+
get clicks() {
|
|
62
|
+
var _a;
|
|
63
|
+
return ((_a = this._clicks) !== null && _a !== void 0 ? _a : (this._clicks = new clicks_1.Clicks(this.options$)));
|
|
263
64
|
}
|
|
264
65
|
/**
|
|
265
|
-
* Retrieve timeseries analytics
|
|
66
|
+
* Retrieve timeseries click analytics
|
|
266
67
|
*
|
|
267
68
|
* @remarks
|
|
268
|
-
* Retrieve
|
|
69
|
+
* Retrieve timeseries click analytics for a link, a domain, or the authenticated workspace over a period of time.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.timeseries instead.. Use timeseries instead.
|
|
269
72
|
*/
|
|
270
|
-
async timeseries(
|
|
73
|
+
async timeseries(request, options) {
|
|
74
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
271
75
|
const headers$ = new Headers();
|
|
272
76
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
273
77
|
headers$.set("Accept", "application/json");
|
|
274
|
-
const payload$ = schemas$.parse(input
|
|
78
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetTimeseriesByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
275
79
|
const body$ = null;
|
|
276
80
|
const path$ = this.templateURLComponent("/analytics/timeseries")();
|
|
277
81
|
const query$ = [
|
|
@@ -286,6 +90,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
286
90
|
}),
|
|
287
91
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
288
92
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
93
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
289
94
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
290
95
|
explode: true,
|
|
291
96
|
charEncoding: "percent",
|
|
@@ -307,6 +112,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
307
112
|
charEncoding: "percent",
|
|
308
113
|
}),
|
|
309
114
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
115
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
310
116
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
311
117
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
312
118
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -327,7 +133,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
327
133
|
security$ = {};
|
|
328
134
|
}
|
|
329
135
|
const context = {
|
|
330
|
-
operationID: "
|
|
136
|
+
operationID: "getTimeseriesByClicksDeprecated",
|
|
331
137
|
oAuth2Scopes: [],
|
|
332
138
|
securitySource: this.options$.token,
|
|
333
139
|
};
|
|
@@ -348,7 +154,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
348
154
|
"5XX",
|
|
349
155
|
],
|
|
350
156
|
};
|
|
351
|
-
const request = this.createRequest$(context, {
|
|
157
|
+
const request$ = this.createRequest$(context, {
|
|
352
158
|
security: securitySettings$,
|
|
353
159
|
method: "GET",
|
|
354
160
|
path: path$,
|
|
@@ -356,17 +162,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
356
162
|
query: query$,
|
|
357
163
|
body: body$,
|
|
358
164
|
}, options);
|
|
359
|
-
const response = await this.do$(request
|
|
165
|
+
const response = await this.do$(request$, doOptions);
|
|
360
166
|
const responseFields$ = {
|
|
361
167
|
HttpMeta: {
|
|
362
168
|
Response: response,
|
|
363
|
-
Request: request
|
|
169
|
+
Request: request$,
|
|
364
170
|
},
|
|
365
171
|
};
|
|
366
172
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
367
173
|
const responseBody = await response.json();
|
|
368
174
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
369
|
-
return z
|
|
175
|
+
return z
|
|
176
|
+
.array(operations.GetTimeseriesByClicksDeprecatedResponseBody$.inboundSchema)
|
|
177
|
+
.parse(val$);
|
|
370
178
|
}, "Response validation failed");
|
|
371
179
|
return result;
|
|
372
180
|
}
|
|
@@ -466,16 +274,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
466
274
|
}
|
|
467
275
|
}
|
|
468
276
|
/**
|
|
469
|
-
* Retrieve
|
|
277
|
+
* Retrieve top countries by clicks
|
|
470
278
|
*
|
|
471
279
|
* @remarks
|
|
472
280
|
* Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
|
|
281
|
+
*
|
|
282
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.countries instead.. Use countries instead.
|
|
473
283
|
*/
|
|
474
|
-
async
|
|
284
|
+
async country(request, options) {
|
|
285
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
475
286
|
const headers$ = new Headers();
|
|
476
287
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
477
288
|
headers$.set("Accept", "application/json");
|
|
478
|
-
const payload$ = schemas$.parse(input
|
|
289
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetCountriesByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
479
290
|
const body$ = null;
|
|
480
291
|
const path$ = this.templateURLComponent("/analytics/country")();
|
|
481
292
|
const query$ = [
|
|
@@ -490,6 +301,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
490
301
|
}),
|
|
491
302
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
492
303
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
304
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
493
305
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
494
306
|
explode: true,
|
|
495
307
|
charEncoding: "percent",
|
|
@@ -511,6 +323,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
511
323
|
charEncoding: "percent",
|
|
512
324
|
}),
|
|
513
325
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
326
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
514
327
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
515
328
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
516
329
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -531,7 +344,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
531
344
|
security$ = {};
|
|
532
345
|
}
|
|
533
346
|
const context = {
|
|
534
|
-
operationID: "
|
|
347
|
+
operationID: "getCountriesByClicksDeprecated",
|
|
535
348
|
oAuth2Scopes: [],
|
|
536
349
|
securitySource: this.options$.token,
|
|
537
350
|
};
|
|
@@ -552,7 +365,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
552
365
|
"5XX",
|
|
553
366
|
],
|
|
554
367
|
};
|
|
555
|
-
const request = this.createRequest$(context, {
|
|
368
|
+
const request$ = this.createRequest$(context, {
|
|
556
369
|
security: securitySettings$,
|
|
557
370
|
method: "GET",
|
|
558
371
|
path: path$,
|
|
@@ -560,18 +373,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
560
373
|
query: query$,
|
|
561
374
|
body: body$,
|
|
562
375
|
}, options);
|
|
563
|
-
const response = await this.do$(request
|
|
376
|
+
const response = await this.do$(request$, doOptions);
|
|
564
377
|
const responseFields$ = {
|
|
565
378
|
HttpMeta: {
|
|
566
379
|
Response: response,
|
|
567
|
-
Request: request
|
|
380
|
+
Request: request$,
|
|
568
381
|
},
|
|
569
382
|
};
|
|
570
383
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
571
384
|
const responseBody = await response.json();
|
|
572
385
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
573
386
|
return z
|
|
574
|
-
.array(operations.
|
|
387
|
+
.array(operations.GetCountriesByClicksDeprecatedResponseBody$.inboundSchema)
|
|
575
388
|
.parse(val$);
|
|
576
389
|
}, "Response validation failed");
|
|
577
390
|
return result;
|
|
@@ -672,16 +485,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
672
485
|
}
|
|
673
486
|
}
|
|
674
487
|
/**
|
|
675
|
-
* Retrieve
|
|
488
|
+
* Retrieve top cities by clicks
|
|
676
489
|
*
|
|
677
490
|
* @remarks
|
|
678
491
|
* Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
|
|
492
|
+
*
|
|
493
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.cities instead.. Use cities instead.
|
|
679
494
|
*/
|
|
680
|
-
async
|
|
495
|
+
async city(request, options) {
|
|
496
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
681
497
|
const headers$ = new Headers();
|
|
682
498
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
683
499
|
headers$.set("Accept", "application/json");
|
|
684
|
-
const payload$ = schemas$.parse(input
|
|
500
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetCitiesByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
685
501
|
const body$ = null;
|
|
686
502
|
const path$ = this.templateURLComponent("/analytics/city")();
|
|
687
503
|
const query$ = [
|
|
@@ -696,6 +512,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
696
512
|
}),
|
|
697
513
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
698
514
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
515
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
699
516
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
700
517
|
explode: true,
|
|
701
518
|
charEncoding: "percent",
|
|
@@ -717,6 +534,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
717
534
|
charEncoding: "percent",
|
|
718
535
|
}),
|
|
719
536
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
537
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
720
538
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
721
539
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
722
540
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -737,7 +555,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
737
555
|
security$ = {};
|
|
738
556
|
}
|
|
739
557
|
const context = {
|
|
740
|
-
operationID: "
|
|
558
|
+
operationID: "getCitiesByClicksDeprecated",
|
|
741
559
|
oAuth2Scopes: [],
|
|
742
560
|
securitySource: this.options$.token,
|
|
743
561
|
};
|
|
@@ -758,7 +576,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
758
576
|
"5XX",
|
|
759
577
|
],
|
|
760
578
|
};
|
|
761
|
-
const request = this.createRequest$(context, {
|
|
579
|
+
const request$ = this.createRequest$(context, {
|
|
762
580
|
security: securitySettings$,
|
|
763
581
|
method: "GET",
|
|
764
582
|
path: path$,
|
|
@@ -766,18 +584,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
766
584
|
query: query$,
|
|
767
585
|
body: body$,
|
|
768
586
|
}, options);
|
|
769
|
-
const response = await this.do$(request
|
|
587
|
+
const response = await this.do$(request$, doOptions);
|
|
770
588
|
const responseFields$ = {
|
|
771
589
|
HttpMeta: {
|
|
772
590
|
Response: response,
|
|
773
|
-
Request: request
|
|
591
|
+
Request: request$,
|
|
774
592
|
},
|
|
775
593
|
};
|
|
776
594
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
777
595
|
const responseBody = await response.json();
|
|
778
596
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
779
597
|
return z
|
|
780
|
-
.array(operations.
|
|
598
|
+
.array(operations.GetCitiesByClicksDeprecatedResponseBody$.inboundSchema)
|
|
781
599
|
.parse(val$);
|
|
782
600
|
}, "Response validation failed");
|
|
783
601
|
return result;
|
|
@@ -878,16 +696,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
878
696
|
}
|
|
879
697
|
}
|
|
880
698
|
/**
|
|
881
|
-
* Retrieve
|
|
699
|
+
* Retrieve top devices by clicks
|
|
882
700
|
*
|
|
883
701
|
* @remarks
|
|
884
702
|
* Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.
|
|
703
|
+
*
|
|
704
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.devices instead.. Use devices instead.
|
|
885
705
|
*/
|
|
886
|
-
async
|
|
706
|
+
async device(request, options) {
|
|
707
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
887
708
|
const headers$ = new Headers();
|
|
888
709
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
889
710
|
headers$.set("Accept", "application/json");
|
|
890
|
-
const payload$ = schemas$.parse(input
|
|
711
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetDevicesByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
891
712
|
const body$ = null;
|
|
892
713
|
const path$ = this.templateURLComponent("/analytics/device")();
|
|
893
714
|
const query$ = [
|
|
@@ -902,6 +723,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
902
723
|
}),
|
|
903
724
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
904
725
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
726
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
905
727
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
906
728
|
explode: true,
|
|
907
729
|
charEncoding: "percent",
|
|
@@ -923,6 +745,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
923
745
|
charEncoding: "percent",
|
|
924
746
|
}),
|
|
925
747
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
748
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
926
749
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
927
750
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
928
751
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -943,7 +766,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
943
766
|
security$ = {};
|
|
944
767
|
}
|
|
945
768
|
const context = {
|
|
946
|
-
operationID: "
|
|
769
|
+
operationID: "getDevicesByClicksDeprecated",
|
|
947
770
|
oAuth2Scopes: [],
|
|
948
771
|
securitySource: this.options$.token,
|
|
949
772
|
};
|
|
@@ -964,7 +787,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
964
787
|
"5XX",
|
|
965
788
|
],
|
|
966
789
|
};
|
|
967
|
-
const request = this.createRequest$(context, {
|
|
790
|
+
const request$ = this.createRequest$(context, {
|
|
968
791
|
security: securitySettings$,
|
|
969
792
|
method: "GET",
|
|
970
793
|
path: path$,
|
|
@@ -972,18 +795,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
972
795
|
query: query$,
|
|
973
796
|
body: body$,
|
|
974
797
|
}, options);
|
|
975
|
-
const response = await this.do$(request
|
|
798
|
+
const response = await this.do$(request$, doOptions);
|
|
976
799
|
const responseFields$ = {
|
|
977
800
|
HttpMeta: {
|
|
978
801
|
Response: response,
|
|
979
|
-
Request: request
|
|
802
|
+
Request: request$,
|
|
980
803
|
},
|
|
981
804
|
};
|
|
982
805
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
983
806
|
const responseBody = await response.json();
|
|
984
807
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
985
808
|
return z
|
|
986
|
-
.array(operations.
|
|
809
|
+
.array(operations.GetDevicesByClicksDeprecatedResponseBody$.inboundSchema)
|
|
987
810
|
.parse(val$);
|
|
988
811
|
}, "Response validation failed");
|
|
989
812
|
return result;
|
|
@@ -1084,16 +907,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1084
907
|
}
|
|
1085
908
|
}
|
|
1086
909
|
/**
|
|
1087
|
-
* Retrieve
|
|
910
|
+
* Retrieve top browsers by clicks
|
|
1088
911
|
*
|
|
1089
912
|
* @remarks
|
|
1090
913
|
* Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.
|
|
914
|
+
*
|
|
915
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.browsers instead.. Use browsers instead.
|
|
1091
916
|
*/
|
|
1092
|
-
async
|
|
917
|
+
async browser(request, options) {
|
|
918
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
1093
919
|
const headers$ = new Headers();
|
|
1094
920
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
1095
921
|
headers$.set("Accept", "application/json");
|
|
1096
|
-
const payload$ = schemas$.parse(input
|
|
922
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetBrowsersByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
1097
923
|
const body$ = null;
|
|
1098
924
|
const path$ = this.templateURLComponent("/analytics/browser")();
|
|
1099
925
|
const query$ = [
|
|
@@ -1108,6 +934,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1108
934
|
}),
|
|
1109
935
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
1110
936
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
937
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
1111
938
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
1112
939
|
explode: true,
|
|
1113
940
|
charEncoding: "percent",
|
|
@@ -1129,6 +956,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1129
956
|
charEncoding: "percent",
|
|
1130
957
|
}),
|
|
1131
958
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
959
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
1132
960
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
1133
961
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
1134
962
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -1149,7 +977,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1149
977
|
security$ = {};
|
|
1150
978
|
}
|
|
1151
979
|
const context = {
|
|
1152
|
-
operationID: "
|
|
980
|
+
operationID: "getBrowsersByClicksDeprecated",
|
|
1153
981
|
oAuth2Scopes: [],
|
|
1154
982
|
securitySource: this.options$.token,
|
|
1155
983
|
};
|
|
@@ -1170,7 +998,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1170
998
|
"5XX",
|
|
1171
999
|
],
|
|
1172
1000
|
};
|
|
1173
|
-
const request = this.createRequest$(context, {
|
|
1001
|
+
const request$ = this.createRequest$(context, {
|
|
1174
1002
|
security: securitySettings$,
|
|
1175
1003
|
method: "GET",
|
|
1176
1004
|
path: path$,
|
|
@@ -1178,18 +1006,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1178
1006
|
query: query$,
|
|
1179
1007
|
body: body$,
|
|
1180
1008
|
}, options);
|
|
1181
|
-
const response = await this.do$(request
|
|
1009
|
+
const response = await this.do$(request$, doOptions);
|
|
1182
1010
|
const responseFields$ = {
|
|
1183
1011
|
HttpMeta: {
|
|
1184
1012
|
Response: response,
|
|
1185
|
-
Request: request
|
|
1013
|
+
Request: request$,
|
|
1186
1014
|
},
|
|
1187
1015
|
};
|
|
1188
1016
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1189
1017
|
const responseBody = await response.json();
|
|
1190
1018
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1191
1019
|
return z
|
|
1192
|
-
.array(operations.
|
|
1020
|
+
.array(operations.GetBrowsersByClicksDeprecatedResponseBody$.inboundSchema)
|
|
1193
1021
|
.parse(val$);
|
|
1194
1022
|
}, "Response validation failed");
|
|
1195
1023
|
return result;
|
|
@@ -1290,16 +1118,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1290
1118
|
}
|
|
1291
1119
|
}
|
|
1292
1120
|
/**
|
|
1293
|
-
* Retrieve OS
|
|
1121
|
+
* Retrieve top OS by clicks
|
|
1294
1122
|
*
|
|
1295
1123
|
* @remarks
|
|
1296
1124
|
* Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.
|
|
1125
|
+
*
|
|
1126
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.os instead.. Use os instead.
|
|
1297
1127
|
*/
|
|
1298
|
-
async os(
|
|
1128
|
+
async os(request, options) {
|
|
1129
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
1299
1130
|
const headers$ = new Headers();
|
|
1300
1131
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
1301
1132
|
headers$.set("Accept", "application/json");
|
|
1302
|
-
const payload$ = schemas$.parse(input
|
|
1133
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetOSByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
1303
1134
|
const body$ = null;
|
|
1304
1135
|
const path$ = this.templateURLComponent("/analytics/os")();
|
|
1305
1136
|
const query$ = [
|
|
@@ -1314,6 +1145,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1314
1145
|
}),
|
|
1315
1146
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
1316
1147
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
1148
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
1317
1149
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
1318
1150
|
explode: true,
|
|
1319
1151
|
charEncoding: "percent",
|
|
@@ -1335,6 +1167,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1335
1167
|
charEncoding: "percent",
|
|
1336
1168
|
}),
|
|
1337
1169
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
1170
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
1338
1171
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
1339
1172
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
1340
1173
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -1355,7 +1188,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1355
1188
|
security$ = {};
|
|
1356
1189
|
}
|
|
1357
1190
|
const context = {
|
|
1358
|
-
operationID: "
|
|
1191
|
+
operationID: "getOSByClicksDeprecated",
|
|
1359
1192
|
oAuth2Scopes: [],
|
|
1360
1193
|
securitySource: this.options$.token,
|
|
1361
1194
|
};
|
|
@@ -1376,7 +1209,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1376
1209
|
"5XX",
|
|
1377
1210
|
],
|
|
1378
1211
|
};
|
|
1379
|
-
const request = this.createRequest$(context, {
|
|
1212
|
+
const request$ = this.createRequest$(context, {
|
|
1380
1213
|
security: securitySettings$,
|
|
1381
1214
|
method: "GET",
|
|
1382
1215
|
path: path$,
|
|
@@ -1384,18 +1217,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1384
1217
|
query: query$,
|
|
1385
1218
|
body: body$,
|
|
1386
1219
|
}, options);
|
|
1387
|
-
const response = await this.do$(request
|
|
1220
|
+
const response = await this.do$(request$, doOptions);
|
|
1388
1221
|
const responseFields$ = {
|
|
1389
1222
|
HttpMeta: {
|
|
1390
1223
|
Response: response,
|
|
1391
|
-
Request: request
|
|
1224
|
+
Request: request$,
|
|
1392
1225
|
},
|
|
1393
1226
|
};
|
|
1394
1227
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1395
1228
|
const responseBody = await response.json();
|
|
1396
1229
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1397
1230
|
return z
|
|
1398
|
-
.array(operations.
|
|
1231
|
+
.array(operations.GetOSByClicksDeprecatedResponseBody$.inboundSchema)
|
|
1399
1232
|
.parse(val$);
|
|
1400
1233
|
}, "Response validation failed");
|
|
1401
1234
|
return result;
|
|
@@ -1496,16 +1329,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1496
1329
|
}
|
|
1497
1330
|
}
|
|
1498
1331
|
/**
|
|
1499
|
-
* Retrieve
|
|
1332
|
+
* Retrieve top referers by clicks
|
|
1500
1333
|
*
|
|
1501
1334
|
* @remarks
|
|
1502
1335
|
* Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.
|
|
1336
|
+
*
|
|
1337
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.referers instead.. Use referers instead.
|
|
1503
1338
|
*/
|
|
1504
|
-
async
|
|
1339
|
+
async referer(request, options) {
|
|
1340
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
1505
1341
|
const headers$ = new Headers();
|
|
1506
1342
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
1507
1343
|
headers$.set("Accept", "application/json");
|
|
1508
|
-
const payload$ = schemas$.parse(input
|
|
1344
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetReferersByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
1509
1345
|
const body$ = null;
|
|
1510
1346
|
const path$ = this.templateURLComponent("/analytics/referer")();
|
|
1511
1347
|
const query$ = [
|
|
@@ -1520,6 +1356,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1520
1356
|
}),
|
|
1521
1357
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
1522
1358
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
1359
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
1523
1360
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
1524
1361
|
explode: true,
|
|
1525
1362
|
charEncoding: "percent",
|
|
@@ -1541,6 +1378,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1541
1378
|
charEncoding: "percent",
|
|
1542
1379
|
}),
|
|
1543
1380
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
1381
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
1544
1382
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
1545
1383
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
1546
1384
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -1561,7 +1399,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1561
1399
|
security$ = {};
|
|
1562
1400
|
}
|
|
1563
1401
|
const context = {
|
|
1564
|
-
operationID: "
|
|
1402
|
+
operationID: "getReferersByClicksDeprecated",
|
|
1565
1403
|
oAuth2Scopes: [],
|
|
1566
1404
|
securitySource: this.options$.token,
|
|
1567
1405
|
};
|
|
@@ -1582,7 +1420,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1582
1420
|
"5XX",
|
|
1583
1421
|
],
|
|
1584
1422
|
};
|
|
1585
|
-
const request = this.createRequest$(context, {
|
|
1423
|
+
const request$ = this.createRequest$(context, {
|
|
1586
1424
|
security: securitySettings$,
|
|
1587
1425
|
method: "GET",
|
|
1588
1426
|
path: path$,
|
|
@@ -1590,18 +1428,18 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1590
1428
|
query: query$,
|
|
1591
1429
|
body: body$,
|
|
1592
1430
|
}, options);
|
|
1593
|
-
const response = await this.do$(request
|
|
1431
|
+
const response = await this.do$(request$, doOptions);
|
|
1594
1432
|
const responseFields$ = {
|
|
1595
1433
|
HttpMeta: {
|
|
1596
1434
|
Response: response,
|
|
1597
|
-
Request: request
|
|
1435
|
+
Request: request$,
|
|
1598
1436
|
},
|
|
1599
1437
|
};
|
|
1600
1438
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1601
1439
|
const responseBody = await response.json();
|
|
1602
1440
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1603
1441
|
return z
|
|
1604
|
-
.array(operations.
|
|
1442
|
+
.array(operations.GetReferersByClicksDeprecatedResponseBody$.inboundSchema)
|
|
1605
1443
|
.parse(val$);
|
|
1606
1444
|
}, "Response validation failed");
|
|
1607
1445
|
return result;
|
|
@@ -1702,16 +1540,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1702
1540
|
}
|
|
1703
1541
|
}
|
|
1704
1542
|
/**
|
|
1705
|
-
* Retrieve top links
|
|
1543
|
+
* Retrieve top links by clicks
|
|
1706
1544
|
*
|
|
1707
1545
|
* @remarks
|
|
1708
1546
|
* Retrieve the top links by number of clicks for a domain or the authenticated workspace.
|
|
1547
|
+
*
|
|
1548
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.topLinks instead.. Use topLinks instead.
|
|
1709
1549
|
*/
|
|
1710
|
-
async topLinks(
|
|
1550
|
+
async topLinks(request, options) {
|
|
1551
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
1711
1552
|
const headers$ = new Headers();
|
|
1712
1553
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
1713
1554
|
headers$.set("Accept", "application/json");
|
|
1714
|
-
const payload$ = schemas$.parse(input
|
|
1555
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetTopLinksByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
1715
1556
|
const body$ = null;
|
|
1716
1557
|
const path$ = this.templateURLComponent("/analytics/top_links")();
|
|
1717
1558
|
const query$ = [
|
|
@@ -1726,6 +1567,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1726
1567
|
}),
|
|
1727
1568
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
1728
1569
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
1570
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
1729
1571
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
1730
1572
|
explode: true,
|
|
1731
1573
|
charEncoding: "percent",
|
|
@@ -1747,6 +1589,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1747
1589
|
charEncoding: "percent",
|
|
1748
1590
|
}),
|
|
1749
1591
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
1592
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
1750
1593
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
1751
1594
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
1752
1595
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -1767,7 +1610,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1767
1610
|
security$ = {};
|
|
1768
1611
|
}
|
|
1769
1612
|
const context = {
|
|
1770
|
-
operationID: "
|
|
1613
|
+
operationID: "getTopLinksByClicksDeprecated",
|
|
1771
1614
|
oAuth2Scopes: [],
|
|
1772
1615
|
securitySource: this.options$.token,
|
|
1773
1616
|
};
|
|
@@ -1788,7 +1631,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1788
1631
|
"5XX",
|
|
1789
1632
|
],
|
|
1790
1633
|
};
|
|
1791
|
-
const request = this.createRequest$(context, {
|
|
1634
|
+
const request$ = this.createRequest$(context, {
|
|
1792
1635
|
security: securitySettings$,
|
|
1793
1636
|
method: "GET",
|
|
1794
1637
|
path: path$,
|
|
@@ -1796,17 +1639,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1796
1639
|
query: query$,
|
|
1797
1640
|
body: body$,
|
|
1798
1641
|
}, options);
|
|
1799
|
-
const response = await this.do$(request
|
|
1642
|
+
const response = await this.do$(request$, doOptions);
|
|
1800
1643
|
const responseFields$ = {
|
|
1801
1644
|
HttpMeta: {
|
|
1802
1645
|
Response: response,
|
|
1803
|
-
Request: request
|
|
1646
|
+
Request: request$,
|
|
1804
1647
|
},
|
|
1805
1648
|
};
|
|
1806
1649
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1807
1650
|
const responseBody = await response.json();
|
|
1808
1651
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1809
|
-
return z
|
|
1652
|
+
return z
|
|
1653
|
+
.array(operations.GetTopLinksByClicksDeprecatedResponseBody$.inboundSchema)
|
|
1654
|
+
.parse(val$);
|
|
1810
1655
|
}, "Response validation failed");
|
|
1811
1656
|
return result;
|
|
1812
1657
|
}
|
|
@@ -1906,16 +1751,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1906
1751
|
}
|
|
1907
1752
|
}
|
|
1908
1753
|
/**
|
|
1909
|
-
* Retrieve top URLs
|
|
1754
|
+
* Retrieve top URLs by clicks
|
|
1910
1755
|
*
|
|
1911
1756
|
* @remarks
|
|
1912
1757
|
* Retrieve the top URLs by number of clicks for a given short link.
|
|
1758
|
+
*
|
|
1759
|
+
* @deprecated method: This method is deprecated. Use dub.analytics.clicks.topUrls instead.. Use topUrls instead.
|
|
1913
1760
|
*/
|
|
1914
|
-
async topUrls(
|
|
1761
|
+
async topUrls(request, options) {
|
|
1762
|
+
const input$ = typeof request === "undefined" ? {} : request;
|
|
1915
1763
|
const headers$ = new Headers();
|
|
1916
1764
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
1917
1765
|
headers$.set("Accept", "application/json");
|
|
1918
|
-
const payload$ = schemas$.parse(input
|
|
1766
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.GetTopURLsByClicksDeprecatedRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
1919
1767
|
const body$ = null;
|
|
1920
1768
|
const path$ = this.templateURLComponent("/analytics/top_urls")();
|
|
1921
1769
|
const query$ = [
|
|
@@ -1930,6 +1778,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1930
1778
|
}),
|
|
1931
1779
|
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
|
1932
1780
|
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
|
1781
|
+
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
|
1933
1782
|
enc$.encodeForm("externalId", payload$.externalId, {
|
|
1934
1783
|
explode: true,
|
|
1935
1784
|
charEncoding: "percent",
|
|
@@ -1951,6 +1800,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1951
1800
|
charEncoding: "percent",
|
|
1952
1801
|
}),
|
|
1953
1802
|
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
|
1803
|
+
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
|
1954
1804
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
1955
1805
|
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
|
1956
1806
|
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
|
@@ -1971,7 +1821,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1971
1821
|
security$ = {};
|
|
1972
1822
|
}
|
|
1973
1823
|
const context = {
|
|
1974
|
-
operationID: "
|
|
1824
|
+
operationID: "getTopURLsByClicksDeprecated",
|
|
1975
1825
|
oAuth2Scopes: [],
|
|
1976
1826
|
securitySource: this.options$.token,
|
|
1977
1827
|
};
|
|
@@ -1992,7 +1842,7 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1992
1842
|
"5XX",
|
|
1993
1843
|
],
|
|
1994
1844
|
};
|
|
1995
|
-
const request = this.createRequest$(context, {
|
|
1845
|
+
const request$ = this.createRequest$(context, {
|
|
1996
1846
|
security: securitySettings$,
|
|
1997
1847
|
method: "GET",
|
|
1998
1848
|
path: path$,
|
|
@@ -2000,17 +1850,19 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
2000
1850
|
query: query$,
|
|
2001
1851
|
body: body$,
|
|
2002
1852
|
}, options);
|
|
2003
|
-
const response = await this.do$(request
|
|
1853
|
+
const response = await this.do$(request$, doOptions);
|
|
2004
1854
|
const responseFields$ = {
|
|
2005
1855
|
HttpMeta: {
|
|
2006
1856
|
Response: response,
|
|
2007
|
-
Request: request
|
|
1857
|
+
Request: request$,
|
|
2008
1858
|
},
|
|
2009
1859
|
};
|
|
2010
1860
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
2011
1861
|
const responseBody = await response.json();
|
|
2012
1862
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
2013
|
-
return z
|
|
1863
|
+
return z
|
|
1864
|
+
.array(operations.GetTopURLsByClicksDeprecatedResponseBody$.inboundSchema)
|
|
1865
|
+
.parse(val$);
|
|
2014
1866
|
}, "Response validation failed");
|
|
2015
1867
|
return result;
|
|
2016
1868
|
}
|