dub 0.24.0 → 0.24.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 +62 -10
- package/docs/sdks/analytics/README.md +130 -40
- package/docs/sdks/domains/README.md +114 -44
- package/docs/sdks/links/README.md +100 -28
- package/docs/sdks/qrcodes/README.md +13 -4
- package/docs/sdks/tags/README.md +26 -8
- package/docs/sdks/workspaces/README.md +39 -12
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/domainschema.d.ts +80 -0
- package/models/components/domainschema.d.ts.map +1 -0
- package/models/components/domainschema.js +94 -0
- package/models/components/domainschema.js.map +1 -0
- package/models/components/index.d.ts +1 -9
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -9
- package/models/components/index.js.map +1 -1
- package/models/{components → errors}/badrequest.d.ts +13 -1
- package/models/errors/badrequest.d.ts.map +1 -0
- package/models/{components → errors}/badrequest.js +23 -4
- package/models/errors/badrequest.js.map +1 -0
- package/models/{components → errors}/conflict.d.ts +13 -1
- package/models/errors/conflict.d.ts.map +1 -0
- package/models/{components → errors}/conflict.js +23 -4
- package/models/errors/conflict.js.map +1 -0
- package/models/{components → errors}/forbidden.d.ts +13 -1
- package/models/errors/forbidden.d.ts.map +1 -0
- package/models/{components → errors}/forbidden.js +23 -4
- package/models/errors/forbidden.js.map +1 -0
- package/models/errors/index.d.ts +9 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +9 -0
- package/models/errors/index.js.map +1 -1
- package/models/{components → errors}/internalservererror.d.ts +13 -1
- package/models/errors/internalservererror.d.ts.map +1 -0
- package/models/{components → errors}/internalservererror.js +23 -4
- package/models/errors/internalservererror.js.map +1 -0
- package/models/{components → errors}/inviteexpired.d.ts +13 -1
- package/models/errors/inviteexpired.d.ts.map +1 -0
- package/models/{components → errors}/inviteexpired.js +23 -4
- package/models/errors/inviteexpired.js.map +1 -0
- package/models/{components → errors}/notfound.d.ts +13 -1
- package/models/errors/notfound.d.ts.map +1 -0
- package/models/{components → errors}/notfound.js +23 -4
- package/models/errors/notfound.js.map +1 -0
- package/models/{components → errors}/ratelimitexceeded.d.ts +13 -1
- package/models/errors/ratelimitexceeded.d.ts.map +1 -0
- package/models/{components → errors}/ratelimitexceeded.js +23 -4
- package/models/errors/ratelimitexceeded.js.map +1 -0
- package/models/{components → errors}/unauthorized.d.ts +13 -1
- package/models/errors/unauthorized.d.ts.map +1 -0
- package/models/{components → errors}/unauthorized.js +23 -4
- package/models/errors/unauthorized.js.map +1 -0
- package/models/{components → errors}/unprocessableentity.d.ts +13 -1
- package/models/errors/unprocessableentity.d.ts.map +1 -0
- package/models/{components → errors}/unprocessableentity.js +23 -4
- package/models/errors/unprocessableentity.js.map +1 -0
- package/models/operations/adddomain.d.ts +0 -90
- package/models/operations/adddomain.d.ts.map +1 -1
- package/models/operations/adddomain.js +1 -93
- package/models/operations/adddomain.js.map +1 -1
- package/models/operations/bulkcreatelinks.d.ts +17 -9
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js +11 -30
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createlink.d.ts +17 -9
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js +17 -30
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/createtag.d.ts +0 -9
- package/models/operations/createtag.d.ts.map +1 -1
- package/models/operations/createtag.js +1 -30
- package/models/operations/createtag.js.map +1 -1
- package/models/operations/createworkspace.d.ts +0 -9
- package/models/operations/createworkspace.d.ts.map +1 -1
- package/models/operations/createworkspace.js +1 -30
- package/models/operations/createworkspace.js.map +1 -1
- package/models/operations/deletedomain.d.ts +0 -9
- package/models/operations/deletedomain.d.ts.map +1 -1
- package/models/operations/deletedomain.js +1 -30
- package/models/operations/deletedomain.js.map +1 -1
- package/models/operations/deletelink.d.ts +0 -9
- package/models/operations/deletelink.d.ts.map +1 -1
- package/models/operations/deletelink.js +1 -30
- package/models/operations/deletelink.js.map +1 -1
- package/models/operations/editdomain.d.ts +0 -90
- package/models/operations/editdomain.d.ts.map +1 -1
- package/models/operations/editdomain.js +1 -93
- package/models/operations/editdomain.js.map +1 -1
- package/models/operations/editlink.d.ts +17 -9
- package/models/operations/editlink.d.ts.map +1 -1
- package/models/operations/editlink.js +17 -30
- package/models/operations/editlink.js.map +1 -1
- package/models/operations/getbrowseranalytics.d.ts +0 -9
- package/models/operations/getbrowseranalytics.d.ts.map +1 -1
- package/models/operations/getbrowseranalytics.js +1 -30
- package/models/operations/getbrowseranalytics.js.map +1 -1
- package/models/operations/getcityanalytics.d.ts +0 -9
- package/models/operations/getcityanalytics.d.ts.map +1 -1
- package/models/operations/getcityanalytics.js +1 -30
- package/models/operations/getcityanalytics.js.map +1 -1
- package/models/operations/getclicksanalytics.d.ts +0 -9
- package/models/operations/getclicksanalytics.d.ts.map +1 -1
- package/models/operations/getclicksanalytics.js +1 -30
- package/models/operations/getclicksanalytics.js.map +1 -1
- package/models/operations/getcountryanalytics.d.ts +0 -9
- package/models/operations/getcountryanalytics.d.ts.map +1 -1
- package/models/operations/getcountryanalytics.js +1 -30
- package/models/operations/getcountryanalytics.js.map +1 -1
- package/models/operations/getdeviceanalytics.d.ts +0 -9
- package/models/operations/getdeviceanalytics.d.ts.map +1 -1
- package/models/operations/getdeviceanalytics.js +1 -30
- package/models/operations/getdeviceanalytics.js.map +1 -1
- package/models/operations/getlinkinfo.d.ts +0 -9
- package/models/operations/getlinkinfo.d.ts.map +1 -1
- package/models/operations/getlinkinfo.js +1 -30
- package/models/operations/getlinkinfo.js.map +1 -1
- package/models/operations/getlinks.d.ts +17 -9
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +17 -30
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +17 -9
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js +11 -30
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/getosanalytics.d.ts +0 -9
- package/models/operations/getosanalytics.d.ts.map +1 -1
- package/models/operations/getosanalytics.js +1 -30
- package/models/operations/getosanalytics.js.map +1 -1
- package/models/operations/getqrcode.d.ts +0 -9
- package/models/operations/getqrcode.d.ts.map +1 -1
- package/models/operations/getqrcode.js +1 -30
- package/models/operations/getqrcode.js.map +1 -1
- package/models/operations/getrefereranalytics.d.ts +0 -9
- package/models/operations/getrefereranalytics.d.ts.map +1 -1
- package/models/operations/getrefereranalytics.js +1 -30
- package/models/operations/getrefereranalytics.js.map +1 -1
- package/models/operations/gettags.d.ts +0 -9
- package/models/operations/gettags.d.ts.map +1 -1
- package/models/operations/gettags.js +1 -30
- package/models/operations/gettags.js.map +1 -1
- package/models/operations/gettimeseriesanalytics.d.ts +0 -9
- package/models/operations/gettimeseriesanalytics.d.ts.map +1 -1
- package/models/operations/gettimeseriesanalytics.js +1 -30
- package/models/operations/gettimeseriesanalytics.js.map +1 -1
- package/models/operations/gettoplinks.d.ts +0 -9
- package/models/operations/gettoplinks.d.ts.map +1 -1
- package/models/operations/gettoplinks.js +1 -30
- package/models/operations/gettoplinks.js.map +1 -1
- package/models/operations/gettopurls.d.ts +0 -9
- package/models/operations/gettopurls.d.ts.map +1 -1
- package/models/operations/gettopurls.js +1 -30
- package/models/operations/gettopurls.js.map +1 -1
- package/models/operations/getworkspace.d.ts +0 -9
- package/models/operations/getworkspace.d.ts.map +1 -1
- package/models/operations/getworkspace.js +1 -30
- package/models/operations/getworkspace.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdomains.d.ts +0 -87
- package/models/operations/listdomains.d.ts.map +1 -1
- package/models/operations/listdomains.js +1 -93
- package/models/operations/listdomains.js.map +1 -1
- package/models/operations/setprimarydomain.d.ts +0 -90
- package/models/operations/setprimarydomain.d.ts.map +1 -1
- package/models/operations/setprimarydomain.js +1 -93
- package/models/operations/setprimarydomain.js.map +1 -1
- package/models/operations/transferdomain.d.ts +0 -90
- package/models/operations/transferdomain.d.ts.map +1 -1
- package/models/operations/transferdomain.js +1 -93
- package/models/operations/transferdomain.js.map +1 -1
- package/package.json +1 -1
- package/sdk/analytics.d.ts +10 -10
- package/sdk/analytics.d.ts.map +1 -1
- package/sdk/analytics.js +693 -200
- package/sdk/analytics.js.map +1 -1
- package/sdk/domains.d.ts +7 -6
- package/sdk/domains.d.ts.map +1 -1
- package/sdk/domains.js +422 -124
- package/sdk/domains.js.map +1 -1
- package/sdk/links.d.ts +8 -7
- package/sdk/links.d.ts.map +1 -1
- package/sdk/links.js +485 -140
- package/sdk/links.js.map +1 -1
- package/sdk/metatags.js +1 -1
- 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 +69 -20
- package/sdk/qrcodes.js.map +1 -1
- package/sdk/tags.d.ts +3 -2
- package/sdk/tags.d.ts.map +1 -1
- package/sdk/tags.js +138 -40
- package/sdk/tags.js.map +1 -1
- package/sdk/workspaces.d.ts +4 -3
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +206 -60
- package/sdk/workspaces.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/domainschema.ts +138 -0
- package/src/models/components/index.ts +1 -9
- package/src/models/{components → errors}/badrequest.ts +43 -11
- package/src/models/{components → errors}/conflict.ts +43 -11
- package/src/models/{components → errors}/forbidden.ts +43 -11
- package/src/models/errors/index.ts +9 -0
- package/src/models/{components → errors}/internalservererror.ts +43 -11
- package/src/models/{components → errors}/inviteexpired.ts +43 -11
- package/src/models/{components → errors}/notfound.ts +43 -11
- package/src/models/{components → errors}/ratelimitexceeded.ts +43 -11
- package/src/models/{components → errors}/unauthorized.ts +43 -11
- package/src/models/{components → errors}/unprocessableentity.ts +43 -11
- package/src/models/operations/adddomain.ts +0 -200
- package/src/models/operations/bulkcreatelinks.ts +27 -67
- package/src/models/operations/createlink.ts +30 -64
- package/src/models/operations/createtag.ts +0 -64
- package/src/models/operations/createworkspace.ts +0 -67
- package/src/models/operations/deletedomain.ts +0 -64
- package/src/models/operations/deletelink.ts +0 -64
- package/src/models/operations/editdomain.ts +0 -202
- package/src/models/operations/editlink.ts +30 -64
- package/src/models/operations/getbrowseranalytics.ts +0 -66
- package/src/models/operations/getcityanalytics.ts +0 -66
- package/src/models/operations/getclicksanalytics.ts +0 -66
- package/src/models/operations/getcountryanalytics.ts +0 -66
- package/src/models/operations/getdeviceanalytics.ts +0 -66
- package/src/models/operations/getlinkinfo.ts +0 -64
- package/src/models/operations/getlinks.ts +30 -64
- package/src/models/operations/getlinkscount.ts +29 -66
- package/src/models/operations/getosanalytics.ts +0 -65
- package/src/models/operations/getqrcode.ts +0 -64
- package/src/models/operations/getrefereranalytics.ts +0 -66
- package/src/models/operations/gettags.ts +0 -64
- package/src/models/operations/gettimeseriesanalytics.ts +0 -66
- package/src/models/operations/gettoplinks.ts +0 -64
- package/src/models/operations/gettopurls.ts +0 -64
- package/src/models/operations/getworkspace.ts +0 -64
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/listdomains.ts +0 -198
- package/src/models/operations/setprimarydomain.ts +0 -203
- package/src/models/operations/transferdomain.ts +0 -202
- package/src/sdk/analytics.ts +713 -210
- package/src/sdk/domains.ts +436 -130
- package/src/sdk/links.ts +502 -150
- package/src/sdk/metatags.ts +1 -1
- package/src/sdk/qrcodes.ts +71 -21
- package/src/sdk/tags.ts +142 -42
- package/src/sdk/workspaces.ts +212 -63
- package/models/components/badrequest.d.ts.map +0 -1
- package/models/components/badrequest.js.map +0 -1
- package/models/components/conflict.d.ts.map +0 -1
- package/models/components/conflict.js.map +0 -1
- package/models/components/forbidden.d.ts.map +0 -1
- package/models/components/forbidden.js.map +0 -1
- package/models/components/internalservererror.d.ts.map +0 -1
- package/models/components/internalservererror.js.map +0 -1
- package/models/components/inviteexpired.d.ts.map +0 -1
- package/models/components/inviteexpired.js.map +0 -1
- package/models/components/notfound.d.ts.map +0 -1
- package/models/components/notfound.js.map +0 -1
- package/models/components/ratelimitexceeded.d.ts.map +0 -1
- package/models/components/ratelimitexceeded.js.map +0 -1
- package/models/components/unauthorized.d.ts.map +0 -1
- package/models/components/unauthorized.js.map +0 -1
- package/models/components/unprocessableentity.d.ts.map +0 -1
- package/models/components/unprocessableentity.js.map +0 -1
- package/models/operations/getworkspaces.d.ts +0 -11
- package/models/operations/getworkspaces.d.ts.map +0 -1
- package/models/operations/getworkspaces.js +0 -60
- package/models/operations/getworkspaces.js.map +0 -1
- package/src/models/operations/getworkspaces.ts +0 -71
package/src/sdk/analytics.ts
CHANGED
|
@@ -10,6 +10,7 @@ import * as schemas$ from "../lib/schemas";
|
|
|
10
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
|
11
11
|
import * as errors from "../models/errors";
|
|
12
12
|
import * as operations from "../models/operations";
|
|
13
|
+
import * as z from "zod";
|
|
13
14
|
|
|
14
15
|
export class Analytics extends ClientSDK {
|
|
15
16
|
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
|
@@ -47,7 +48,7 @@ export class Analytics extends ClientSDK {
|
|
|
47
48
|
async clicks(
|
|
48
49
|
input: operations.GetClicksAnalyticsRequest,
|
|
49
50
|
options?: RequestOptions
|
|
50
|
-
): Promise<
|
|
51
|
+
): Promise<number> {
|
|
51
52
|
const headers$ = new Headers();
|
|
52
53
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
53
54
|
headers$.set("Accept", "application/json");
|
|
@@ -114,7 +115,22 @@ export class Analytics extends ClientSDK {
|
|
|
114
115
|
};
|
|
115
116
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
116
117
|
|
|
117
|
-
const doOptions = {
|
|
118
|
+
const doOptions = {
|
|
119
|
+
context,
|
|
120
|
+
errorCodes: [
|
|
121
|
+
"400",
|
|
122
|
+
"401",
|
|
123
|
+
"403",
|
|
124
|
+
"404",
|
|
125
|
+
"409",
|
|
126
|
+
"410",
|
|
127
|
+
"422",
|
|
128
|
+
"429",
|
|
129
|
+
"4XX",
|
|
130
|
+
"500",
|
|
131
|
+
"5XX",
|
|
132
|
+
],
|
|
133
|
+
};
|
|
118
134
|
const request = this.createRequest$(
|
|
119
135
|
{
|
|
120
136
|
security: securitySettings$,
|
|
@@ -129,12 +145,19 @@ export class Analytics extends ClientSDK {
|
|
|
129
145
|
|
|
130
146
|
const response = await this.do$(request, doOptions);
|
|
131
147
|
|
|
148
|
+
const responseFields$ = {
|
|
149
|
+
HttpMeta: {
|
|
150
|
+
Response: response,
|
|
151
|
+
Request: request,
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
132
155
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
133
156
|
const responseBody = await response.json();
|
|
134
157
|
const result = schemas$.parse(
|
|
135
158
|
responseBody,
|
|
136
159
|
(val$) => {
|
|
137
|
-
return
|
|
160
|
+
return z.number().parse(val$);
|
|
138
161
|
},
|
|
139
162
|
"Response validation failed"
|
|
140
163
|
);
|
|
@@ -144,91 +167,118 @@ export class Analytics extends ClientSDK {
|
|
|
144
167
|
const result = schemas$.parse(
|
|
145
168
|
responseBody,
|
|
146
169
|
(val$) => {
|
|
147
|
-
return
|
|
170
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
171
|
+
...responseFields$,
|
|
172
|
+
...val$,
|
|
173
|
+
});
|
|
148
174
|
},
|
|
149
175
|
"Response validation failed"
|
|
150
176
|
);
|
|
151
|
-
|
|
177
|
+
throw result;
|
|
152
178
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
153
179
|
const responseBody = await response.json();
|
|
154
180
|
const result = schemas$.parse(
|
|
155
181
|
responseBody,
|
|
156
182
|
(val$) => {
|
|
157
|
-
return
|
|
183
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
184
|
+
...responseFields$,
|
|
185
|
+
...val$,
|
|
186
|
+
});
|
|
158
187
|
},
|
|
159
188
|
"Response validation failed"
|
|
160
189
|
);
|
|
161
|
-
|
|
190
|
+
throw result;
|
|
162
191
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
163
192
|
const responseBody = await response.json();
|
|
164
193
|
const result = schemas$.parse(
|
|
165
194
|
responseBody,
|
|
166
195
|
(val$) => {
|
|
167
|
-
return
|
|
196
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
197
|
+
...responseFields$,
|
|
198
|
+
...val$,
|
|
199
|
+
});
|
|
168
200
|
},
|
|
169
201
|
"Response validation failed"
|
|
170
202
|
);
|
|
171
|
-
|
|
203
|
+
throw result;
|
|
172
204
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
173
205
|
const responseBody = await response.json();
|
|
174
206
|
const result = schemas$.parse(
|
|
175
207
|
responseBody,
|
|
176
208
|
(val$) => {
|
|
177
|
-
return
|
|
209
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
210
|
+
...responseFields$,
|
|
211
|
+
...val$,
|
|
212
|
+
});
|
|
178
213
|
},
|
|
179
214
|
"Response validation failed"
|
|
180
215
|
);
|
|
181
|
-
|
|
216
|
+
throw result;
|
|
182
217
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
183
218
|
const responseBody = await response.json();
|
|
184
219
|
const result = schemas$.parse(
|
|
185
220
|
responseBody,
|
|
186
221
|
(val$) => {
|
|
187
|
-
return
|
|
222
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
223
|
+
...responseFields$,
|
|
224
|
+
...val$,
|
|
225
|
+
});
|
|
188
226
|
},
|
|
189
227
|
"Response validation failed"
|
|
190
228
|
);
|
|
191
|
-
|
|
229
|
+
throw result;
|
|
192
230
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
193
231
|
const responseBody = await response.json();
|
|
194
232
|
const result = schemas$.parse(
|
|
195
233
|
responseBody,
|
|
196
234
|
(val$) => {
|
|
197
|
-
return
|
|
235
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
236
|
+
...responseFields$,
|
|
237
|
+
...val$,
|
|
238
|
+
});
|
|
198
239
|
},
|
|
199
240
|
"Response validation failed"
|
|
200
241
|
);
|
|
201
|
-
|
|
242
|
+
throw result;
|
|
202
243
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
203
244
|
const responseBody = await response.json();
|
|
204
245
|
const result = schemas$.parse(
|
|
205
246
|
responseBody,
|
|
206
247
|
(val$) => {
|
|
207
|
-
return
|
|
248
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
249
|
+
...responseFields$,
|
|
250
|
+
...val$,
|
|
251
|
+
});
|
|
208
252
|
},
|
|
209
253
|
"Response validation failed"
|
|
210
254
|
);
|
|
211
|
-
|
|
255
|
+
throw result;
|
|
212
256
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
213
257
|
const responseBody = await response.json();
|
|
214
258
|
const result = schemas$.parse(
|
|
215
259
|
responseBody,
|
|
216
260
|
(val$) => {
|
|
217
|
-
return
|
|
261
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
262
|
+
...responseFields$,
|
|
263
|
+
...val$,
|
|
264
|
+
});
|
|
218
265
|
},
|
|
219
266
|
"Response validation failed"
|
|
220
267
|
);
|
|
221
|
-
|
|
268
|
+
throw result;
|
|
222
269
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
223
270
|
const responseBody = await response.json();
|
|
224
271
|
const result = schemas$.parse(
|
|
225
272
|
responseBody,
|
|
226
273
|
(val$) => {
|
|
227
|
-
return
|
|
274
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
275
|
+
...responseFields$,
|
|
276
|
+
...val$,
|
|
277
|
+
});
|
|
228
278
|
},
|
|
229
279
|
"Response validation failed"
|
|
230
280
|
);
|
|
231
|
-
|
|
281
|
+
throw result;
|
|
232
282
|
} else {
|
|
233
283
|
const responseBody = await response.text();
|
|
234
284
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -244,7 +294,7 @@ export class Analytics extends ClientSDK {
|
|
|
244
294
|
async timeseries(
|
|
245
295
|
input: operations.GetTimeseriesAnalyticsRequest,
|
|
246
296
|
options?: RequestOptions
|
|
247
|
-
): Promise<operations.
|
|
297
|
+
): Promise<Array<operations.ResponseBody>> {
|
|
248
298
|
const headers$ = new Headers();
|
|
249
299
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
250
300
|
headers$.set("Accept", "application/json");
|
|
@@ -311,7 +361,22 @@ export class Analytics extends ClientSDK {
|
|
|
311
361
|
};
|
|
312
362
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
313
363
|
|
|
314
|
-
const doOptions = {
|
|
364
|
+
const doOptions = {
|
|
365
|
+
context,
|
|
366
|
+
errorCodes: [
|
|
367
|
+
"400",
|
|
368
|
+
"401",
|
|
369
|
+
"403",
|
|
370
|
+
"404",
|
|
371
|
+
"409",
|
|
372
|
+
"410",
|
|
373
|
+
"422",
|
|
374
|
+
"429",
|
|
375
|
+
"4XX",
|
|
376
|
+
"500",
|
|
377
|
+
"5XX",
|
|
378
|
+
],
|
|
379
|
+
};
|
|
315
380
|
const request = this.createRequest$(
|
|
316
381
|
{
|
|
317
382
|
security: securitySettings$,
|
|
@@ -326,12 +391,19 @@ export class Analytics extends ClientSDK {
|
|
|
326
391
|
|
|
327
392
|
const response = await this.do$(request, doOptions);
|
|
328
393
|
|
|
394
|
+
const responseFields$ = {
|
|
395
|
+
HttpMeta: {
|
|
396
|
+
Response: response,
|
|
397
|
+
Request: request,
|
|
398
|
+
},
|
|
399
|
+
};
|
|
400
|
+
|
|
329
401
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
330
402
|
const responseBody = await response.json();
|
|
331
403
|
const result = schemas$.parse(
|
|
332
404
|
responseBody,
|
|
333
405
|
(val$) => {
|
|
334
|
-
return operations.
|
|
406
|
+
return z.array(operations.ResponseBody$.inboundSchema).parse(val$);
|
|
335
407
|
},
|
|
336
408
|
"Response validation failed"
|
|
337
409
|
);
|
|
@@ -341,91 +413,118 @@ export class Analytics extends ClientSDK {
|
|
|
341
413
|
const result = schemas$.parse(
|
|
342
414
|
responseBody,
|
|
343
415
|
(val$) => {
|
|
344
|
-
return
|
|
416
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
417
|
+
...responseFields$,
|
|
418
|
+
...val$,
|
|
419
|
+
});
|
|
345
420
|
},
|
|
346
421
|
"Response validation failed"
|
|
347
422
|
);
|
|
348
|
-
|
|
423
|
+
throw result;
|
|
349
424
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
350
425
|
const responseBody = await response.json();
|
|
351
426
|
const result = schemas$.parse(
|
|
352
427
|
responseBody,
|
|
353
428
|
(val$) => {
|
|
354
|
-
return
|
|
429
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
430
|
+
...responseFields$,
|
|
431
|
+
...val$,
|
|
432
|
+
});
|
|
355
433
|
},
|
|
356
434
|
"Response validation failed"
|
|
357
435
|
);
|
|
358
|
-
|
|
436
|
+
throw result;
|
|
359
437
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
360
438
|
const responseBody = await response.json();
|
|
361
439
|
const result = schemas$.parse(
|
|
362
440
|
responseBody,
|
|
363
441
|
(val$) => {
|
|
364
|
-
return
|
|
442
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
443
|
+
...responseFields$,
|
|
444
|
+
...val$,
|
|
445
|
+
});
|
|
365
446
|
},
|
|
366
447
|
"Response validation failed"
|
|
367
448
|
);
|
|
368
|
-
|
|
449
|
+
throw result;
|
|
369
450
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
370
451
|
const responseBody = await response.json();
|
|
371
452
|
const result = schemas$.parse(
|
|
372
453
|
responseBody,
|
|
373
454
|
(val$) => {
|
|
374
|
-
return
|
|
455
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
456
|
+
...responseFields$,
|
|
457
|
+
...val$,
|
|
458
|
+
});
|
|
375
459
|
},
|
|
376
460
|
"Response validation failed"
|
|
377
461
|
);
|
|
378
|
-
|
|
462
|
+
throw result;
|
|
379
463
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
380
464
|
const responseBody = await response.json();
|
|
381
465
|
const result = schemas$.parse(
|
|
382
466
|
responseBody,
|
|
383
467
|
(val$) => {
|
|
384
|
-
return
|
|
468
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
469
|
+
...responseFields$,
|
|
470
|
+
...val$,
|
|
471
|
+
});
|
|
385
472
|
},
|
|
386
473
|
"Response validation failed"
|
|
387
474
|
);
|
|
388
|
-
|
|
475
|
+
throw result;
|
|
389
476
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
390
477
|
const responseBody = await response.json();
|
|
391
478
|
const result = schemas$.parse(
|
|
392
479
|
responseBody,
|
|
393
480
|
(val$) => {
|
|
394
|
-
return
|
|
481
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
482
|
+
...responseFields$,
|
|
483
|
+
...val$,
|
|
484
|
+
});
|
|
395
485
|
},
|
|
396
486
|
"Response validation failed"
|
|
397
487
|
);
|
|
398
|
-
|
|
488
|
+
throw result;
|
|
399
489
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
400
490
|
const responseBody = await response.json();
|
|
401
491
|
const result = schemas$.parse(
|
|
402
492
|
responseBody,
|
|
403
493
|
(val$) => {
|
|
404
|
-
return
|
|
494
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
495
|
+
...responseFields$,
|
|
496
|
+
...val$,
|
|
497
|
+
});
|
|
405
498
|
},
|
|
406
499
|
"Response validation failed"
|
|
407
500
|
);
|
|
408
|
-
|
|
501
|
+
throw result;
|
|
409
502
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
410
503
|
const responseBody = await response.json();
|
|
411
504
|
const result = schemas$.parse(
|
|
412
505
|
responseBody,
|
|
413
506
|
(val$) => {
|
|
414
|
-
return
|
|
507
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
508
|
+
...responseFields$,
|
|
509
|
+
...val$,
|
|
510
|
+
});
|
|
415
511
|
},
|
|
416
512
|
"Response validation failed"
|
|
417
513
|
);
|
|
418
|
-
|
|
514
|
+
throw result;
|
|
419
515
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
420
516
|
const responseBody = await response.json();
|
|
421
517
|
const result = schemas$.parse(
|
|
422
518
|
responseBody,
|
|
423
519
|
(val$) => {
|
|
424
|
-
return
|
|
520
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
521
|
+
...responseFields$,
|
|
522
|
+
...val$,
|
|
523
|
+
});
|
|
425
524
|
},
|
|
426
525
|
"Response validation failed"
|
|
427
526
|
);
|
|
428
|
-
|
|
527
|
+
throw result;
|
|
429
528
|
} else {
|
|
430
529
|
const responseBody = await response.text();
|
|
431
530
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -441,7 +540,7 @@ export class Analytics extends ClientSDK {
|
|
|
441
540
|
async countries(
|
|
442
541
|
input: operations.GetCountryAnalyticsRequest,
|
|
443
542
|
options?: RequestOptions
|
|
444
|
-
): Promise<operations.
|
|
543
|
+
): Promise<Array<operations.GetCountryAnalyticsResponseBody>> {
|
|
445
544
|
const headers$ = new Headers();
|
|
446
545
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
447
546
|
headers$.set("Accept", "application/json");
|
|
@@ -508,7 +607,22 @@ export class Analytics extends ClientSDK {
|
|
|
508
607
|
};
|
|
509
608
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
510
609
|
|
|
511
|
-
const doOptions = {
|
|
610
|
+
const doOptions = {
|
|
611
|
+
context,
|
|
612
|
+
errorCodes: [
|
|
613
|
+
"400",
|
|
614
|
+
"401",
|
|
615
|
+
"403",
|
|
616
|
+
"404",
|
|
617
|
+
"409",
|
|
618
|
+
"410",
|
|
619
|
+
"422",
|
|
620
|
+
"429",
|
|
621
|
+
"4XX",
|
|
622
|
+
"500",
|
|
623
|
+
"5XX",
|
|
624
|
+
],
|
|
625
|
+
};
|
|
512
626
|
const request = this.createRequest$(
|
|
513
627
|
{
|
|
514
628
|
security: securitySettings$,
|
|
@@ -523,12 +637,21 @@ export class Analytics extends ClientSDK {
|
|
|
523
637
|
|
|
524
638
|
const response = await this.do$(request, doOptions);
|
|
525
639
|
|
|
640
|
+
const responseFields$ = {
|
|
641
|
+
HttpMeta: {
|
|
642
|
+
Response: response,
|
|
643
|
+
Request: request,
|
|
644
|
+
},
|
|
645
|
+
};
|
|
646
|
+
|
|
526
647
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
527
648
|
const responseBody = await response.json();
|
|
528
649
|
const result = schemas$.parse(
|
|
529
650
|
responseBody,
|
|
530
651
|
(val$) => {
|
|
531
|
-
return
|
|
652
|
+
return z
|
|
653
|
+
.array(operations.GetCountryAnalyticsResponseBody$.inboundSchema)
|
|
654
|
+
.parse(val$);
|
|
532
655
|
},
|
|
533
656
|
"Response validation failed"
|
|
534
657
|
);
|
|
@@ -538,91 +661,118 @@ export class Analytics extends ClientSDK {
|
|
|
538
661
|
const result = schemas$.parse(
|
|
539
662
|
responseBody,
|
|
540
663
|
(val$) => {
|
|
541
|
-
return
|
|
664
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
665
|
+
...responseFields$,
|
|
666
|
+
...val$,
|
|
667
|
+
});
|
|
542
668
|
},
|
|
543
669
|
"Response validation failed"
|
|
544
670
|
);
|
|
545
|
-
|
|
671
|
+
throw result;
|
|
546
672
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
547
673
|
const responseBody = await response.json();
|
|
548
674
|
const result = schemas$.parse(
|
|
549
675
|
responseBody,
|
|
550
676
|
(val$) => {
|
|
551
|
-
return
|
|
677
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
678
|
+
...responseFields$,
|
|
679
|
+
...val$,
|
|
680
|
+
});
|
|
552
681
|
},
|
|
553
682
|
"Response validation failed"
|
|
554
683
|
);
|
|
555
|
-
|
|
684
|
+
throw result;
|
|
556
685
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
557
686
|
const responseBody = await response.json();
|
|
558
687
|
const result = schemas$.parse(
|
|
559
688
|
responseBody,
|
|
560
689
|
(val$) => {
|
|
561
|
-
return
|
|
690
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
691
|
+
...responseFields$,
|
|
692
|
+
...val$,
|
|
693
|
+
});
|
|
562
694
|
},
|
|
563
695
|
"Response validation failed"
|
|
564
696
|
);
|
|
565
|
-
|
|
697
|
+
throw result;
|
|
566
698
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
567
699
|
const responseBody = await response.json();
|
|
568
700
|
const result = schemas$.parse(
|
|
569
701
|
responseBody,
|
|
570
702
|
(val$) => {
|
|
571
|
-
return
|
|
703
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
704
|
+
...responseFields$,
|
|
705
|
+
...val$,
|
|
706
|
+
});
|
|
572
707
|
},
|
|
573
708
|
"Response validation failed"
|
|
574
709
|
);
|
|
575
|
-
|
|
710
|
+
throw result;
|
|
576
711
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
577
712
|
const responseBody = await response.json();
|
|
578
713
|
const result = schemas$.parse(
|
|
579
714
|
responseBody,
|
|
580
715
|
(val$) => {
|
|
581
|
-
return
|
|
716
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
717
|
+
...responseFields$,
|
|
718
|
+
...val$,
|
|
719
|
+
});
|
|
582
720
|
},
|
|
583
721
|
"Response validation failed"
|
|
584
722
|
);
|
|
585
|
-
|
|
723
|
+
throw result;
|
|
586
724
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
587
725
|
const responseBody = await response.json();
|
|
588
726
|
const result = schemas$.parse(
|
|
589
727
|
responseBody,
|
|
590
728
|
(val$) => {
|
|
591
|
-
return
|
|
729
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
730
|
+
...responseFields$,
|
|
731
|
+
...val$,
|
|
732
|
+
});
|
|
592
733
|
},
|
|
593
734
|
"Response validation failed"
|
|
594
735
|
);
|
|
595
|
-
|
|
736
|
+
throw result;
|
|
596
737
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
597
738
|
const responseBody = await response.json();
|
|
598
739
|
const result = schemas$.parse(
|
|
599
740
|
responseBody,
|
|
600
741
|
(val$) => {
|
|
601
|
-
return
|
|
742
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
743
|
+
...responseFields$,
|
|
744
|
+
...val$,
|
|
745
|
+
});
|
|
602
746
|
},
|
|
603
747
|
"Response validation failed"
|
|
604
748
|
);
|
|
605
|
-
|
|
749
|
+
throw result;
|
|
606
750
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
607
751
|
const responseBody = await response.json();
|
|
608
752
|
const result = schemas$.parse(
|
|
609
753
|
responseBody,
|
|
610
754
|
(val$) => {
|
|
611
|
-
return
|
|
755
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
756
|
+
...responseFields$,
|
|
757
|
+
...val$,
|
|
758
|
+
});
|
|
612
759
|
},
|
|
613
760
|
"Response validation failed"
|
|
614
761
|
);
|
|
615
|
-
|
|
762
|
+
throw result;
|
|
616
763
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
617
764
|
const responseBody = await response.json();
|
|
618
765
|
const result = schemas$.parse(
|
|
619
766
|
responseBody,
|
|
620
767
|
(val$) => {
|
|
621
|
-
return
|
|
768
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
769
|
+
...responseFields$,
|
|
770
|
+
...val$,
|
|
771
|
+
});
|
|
622
772
|
},
|
|
623
773
|
"Response validation failed"
|
|
624
774
|
);
|
|
625
|
-
|
|
775
|
+
throw result;
|
|
626
776
|
} else {
|
|
627
777
|
const responseBody = await response.text();
|
|
628
778
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -638,7 +788,7 @@ export class Analytics extends ClientSDK {
|
|
|
638
788
|
async cities(
|
|
639
789
|
input: operations.GetCityAnalyticsRequest,
|
|
640
790
|
options?: RequestOptions
|
|
641
|
-
): Promise<operations.
|
|
791
|
+
): Promise<Array<operations.GetCityAnalyticsResponseBody>> {
|
|
642
792
|
const headers$ = new Headers();
|
|
643
793
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
644
794
|
headers$.set("Accept", "application/json");
|
|
@@ -705,7 +855,22 @@ export class Analytics extends ClientSDK {
|
|
|
705
855
|
};
|
|
706
856
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
707
857
|
|
|
708
|
-
const doOptions = {
|
|
858
|
+
const doOptions = {
|
|
859
|
+
context,
|
|
860
|
+
errorCodes: [
|
|
861
|
+
"400",
|
|
862
|
+
"401",
|
|
863
|
+
"403",
|
|
864
|
+
"404",
|
|
865
|
+
"409",
|
|
866
|
+
"410",
|
|
867
|
+
"422",
|
|
868
|
+
"429",
|
|
869
|
+
"4XX",
|
|
870
|
+
"500",
|
|
871
|
+
"5XX",
|
|
872
|
+
],
|
|
873
|
+
};
|
|
709
874
|
const request = this.createRequest$(
|
|
710
875
|
{
|
|
711
876
|
security: securitySettings$,
|
|
@@ -720,12 +885,21 @@ export class Analytics extends ClientSDK {
|
|
|
720
885
|
|
|
721
886
|
const response = await this.do$(request, doOptions);
|
|
722
887
|
|
|
888
|
+
const responseFields$ = {
|
|
889
|
+
HttpMeta: {
|
|
890
|
+
Response: response,
|
|
891
|
+
Request: request,
|
|
892
|
+
},
|
|
893
|
+
};
|
|
894
|
+
|
|
723
895
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
724
896
|
const responseBody = await response.json();
|
|
725
897
|
const result = schemas$.parse(
|
|
726
898
|
responseBody,
|
|
727
899
|
(val$) => {
|
|
728
|
-
return
|
|
900
|
+
return z
|
|
901
|
+
.array(operations.GetCityAnalyticsResponseBody$.inboundSchema)
|
|
902
|
+
.parse(val$);
|
|
729
903
|
},
|
|
730
904
|
"Response validation failed"
|
|
731
905
|
);
|
|
@@ -735,91 +909,118 @@ export class Analytics extends ClientSDK {
|
|
|
735
909
|
const result = schemas$.parse(
|
|
736
910
|
responseBody,
|
|
737
911
|
(val$) => {
|
|
738
|
-
return
|
|
912
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
913
|
+
...responseFields$,
|
|
914
|
+
...val$,
|
|
915
|
+
});
|
|
739
916
|
},
|
|
740
917
|
"Response validation failed"
|
|
741
918
|
);
|
|
742
|
-
|
|
919
|
+
throw result;
|
|
743
920
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
744
921
|
const responseBody = await response.json();
|
|
745
922
|
const result = schemas$.parse(
|
|
746
923
|
responseBody,
|
|
747
924
|
(val$) => {
|
|
748
|
-
return
|
|
925
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
926
|
+
...responseFields$,
|
|
927
|
+
...val$,
|
|
928
|
+
});
|
|
749
929
|
},
|
|
750
930
|
"Response validation failed"
|
|
751
931
|
);
|
|
752
|
-
|
|
932
|
+
throw result;
|
|
753
933
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
754
934
|
const responseBody = await response.json();
|
|
755
935
|
const result = schemas$.parse(
|
|
756
936
|
responseBody,
|
|
757
937
|
(val$) => {
|
|
758
|
-
return
|
|
938
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
939
|
+
...responseFields$,
|
|
940
|
+
...val$,
|
|
941
|
+
});
|
|
759
942
|
},
|
|
760
943
|
"Response validation failed"
|
|
761
944
|
);
|
|
762
|
-
|
|
945
|
+
throw result;
|
|
763
946
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
764
947
|
const responseBody = await response.json();
|
|
765
948
|
const result = schemas$.parse(
|
|
766
949
|
responseBody,
|
|
767
950
|
(val$) => {
|
|
768
|
-
return
|
|
951
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
952
|
+
...responseFields$,
|
|
953
|
+
...val$,
|
|
954
|
+
});
|
|
769
955
|
},
|
|
770
956
|
"Response validation failed"
|
|
771
957
|
);
|
|
772
|
-
|
|
958
|
+
throw result;
|
|
773
959
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
774
960
|
const responseBody = await response.json();
|
|
775
961
|
const result = schemas$.parse(
|
|
776
962
|
responseBody,
|
|
777
963
|
(val$) => {
|
|
778
|
-
return
|
|
964
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
965
|
+
...responseFields$,
|
|
966
|
+
...val$,
|
|
967
|
+
});
|
|
779
968
|
},
|
|
780
969
|
"Response validation failed"
|
|
781
970
|
);
|
|
782
|
-
|
|
971
|
+
throw result;
|
|
783
972
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
784
973
|
const responseBody = await response.json();
|
|
785
974
|
const result = schemas$.parse(
|
|
786
975
|
responseBody,
|
|
787
976
|
(val$) => {
|
|
788
|
-
return
|
|
977
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
978
|
+
...responseFields$,
|
|
979
|
+
...val$,
|
|
980
|
+
});
|
|
789
981
|
},
|
|
790
982
|
"Response validation failed"
|
|
791
983
|
);
|
|
792
|
-
|
|
984
|
+
throw result;
|
|
793
985
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
794
986
|
const responseBody = await response.json();
|
|
795
987
|
const result = schemas$.parse(
|
|
796
988
|
responseBody,
|
|
797
989
|
(val$) => {
|
|
798
|
-
return
|
|
990
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
991
|
+
...responseFields$,
|
|
992
|
+
...val$,
|
|
993
|
+
});
|
|
799
994
|
},
|
|
800
995
|
"Response validation failed"
|
|
801
996
|
);
|
|
802
|
-
|
|
997
|
+
throw result;
|
|
803
998
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
804
999
|
const responseBody = await response.json();
|
|
805
1000
|
const result = schemas$.parse(
|
|
806
1001
|
responseBody,
|
|
807
1002
|
(val$) => {
|
|
808
|
-
return
|
|
1003
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1004
|
+
...responseFields$,
|
|
1005
|
+
...val$,
|
|
1006
|
+
});
|
|
809
1007
|
},
|
|
810
1008
|
"Response validation failed"
|
|
811
1009
|
);
|
|
812
|
-
|
|
1010
|
+
throw result;
|
|
813
1011
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
814
1012
|
const responseBody = await response.json();
|
|
815
1013
|
const result = schemas$.parse(
|
|
816
1014
|
responseBody,
|
|
817
1015
|
(val$) => {
|
|
818
|
-
return
|
|
1016
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1017
|
+
...responseFields$,
|
|
1018
|
+
...val$,
|
|
1019
|
+
});
|
|
819
1020
|
},
|
|
820
1021
|
"Response validation failed"
|
|
821
1022
|
);
|
|
822
|
-
|
|
1023
|
+
throw result;
|
|
823
1024
|
} else {
|
|
824
1025
|
const responseBody = await response.text();
|
|
825
1026
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -835,7 +1036,7 @@ export class Analytics extends ClientSDK {
|
|
|
835
1036
|
async devices(
|
|
836
1037
|
input: operations.GetDeviceAnalyticsRequest,
|
|
837
1038
|
options?: RequestOptions
|
|
838
|
-
): Promise<operations.
|
|
1039
|
+
): Promise<Array<operations.GetDeviceAnalyticsResponseBody>> {
|
|
839
1040
|
const headers$ = new Headers();
|
|
840
1041
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
841
1042
|
headers$.set("Accept", "application/json");
|
|
@@ -902,7 +1103,22 @@ export class Analytics extends ClientSDK {
|
|
|
902
1103
|
};
|
|
903
1104
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
904
1105
|
|
|
905
|
-
const doOptions = {
|
|
1106
|
+
const doOptions = {
|
|
1107
|
+
context,
|
|
1108
|
+
errorCodes: [
|
|
1109
|
+
"400",
|
|
1110
|
+
"401",
|
|
1111
|
+
"403",
|
|
1112
|
+
"404",
|
|
1113
|
+
"409",
|
|
1114
|
+
"410",
|
|
1115
|
+
"422",
|
|
1116
|
+
"429",
|
|
1117
|
+
"4XX",
|
|
1118
|
+
"500",
|
|
1119
|
+
"5XX",
|
|
1120
|
+
],
|
|
1121
|
+
};
|
|
906
1122
|
const request = this.createRequest$(
|
|
907
1123
|
{
|
|
908
1124
|
security: securitySettings$,
|
|
@@ -917,12 +1133,21 @@ export class Analytics extends ClientSDK {
|
|
|
917
1133
|
|
|
918
1134
|
const response = await this.do$(request, doOptions);
|
|
919
1135
|
|
|
1136
|
+
const responseFields$ = {
|
|
1137
|
+
HttpMeta: {
|
|
1138
|
+
Response: response,
|
|
1139
|
+
Request: request,
|
|
1140
|
+
},
|
|
1141
|
+
};
|
|
1142
|
+
|
|
920
1143
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
921
1144
|
const responseBody = await response.json();
|
|
922
1145
|
const result = schemas$.parse(
|
|
923
1146
|
responseBody,
|
|
924
1147
|
(val$) => {
|
|
925
|
-
return
|
|
1148
|
+
return z
|
|
1149
|
+
.array(operations.GetDeviceAnalyticsResponseBody$.inboundSchema)
|
|
1150
|
+
.parse(val$);
|
|
926
1151
|
},
|
|
927
1152
|
"Response validation failed"
|
|
928
1153
|
);
|
|
@@ -932,91 +1157,118 @@ export class Analytics extends ClientSDK {
|
|
|
932
1157
|
const result = schemas$.parse(
|
|
933
1158
|
responseBody,
|
|
934
1159
|
(val$) => {
|
|
935
|
-
return
|
|
1160
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1161
|
+
...responseFields$,
|
|
1162
|
+
...val$,
|
|
1163
|
+
});
|
|
936
1164
|
},
|
|
937
1165
|
"Response validation failed"
|
|
938
1166
|
);
|
|
939
|
-
|
|
1167
|
+
throw result;
|
|
940
1168
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
941
1169
|
const responseBody = await response.json();
|
|
942
1170
|
const result = schemas$.parse(
|
|
943
1171
|
responseBody,
|
|
944
1172
|
(val$) => {
|
|
945
|
-
return
|
|
1173
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1174
|
+
...responseFields$,
|
|
1175
|
+
...val$,
|
|
1176
|
+
});
|
|
946
1177
|
},
|
|
947
1178
|
"Response validation failed"
|
|
948
1179
|
);
|
|
949
|
-
|
|
1180
|
+
throw result;
|
|
950
1181
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
951
1182
|
const responseBody = await response.json();
|
|
952
1183
|
const result = schemas$.parse(
|
|
953
1184
|
responseBody,
|
|
954
1185
|
(val$) => {
|
|
955
|
-
return
|
|
1186
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1187
|
+
...responseFields$,
|
|
1188
|
+
...val$,
|
|
1189
|
+
});
|
|
956
1190
|
},
|
|
957
1191
|
"Response validation failed"
|
|
958
1192
|
);
|
|
959
|
-
|
|
1193
|
+
throw result;
|
|
960
1194
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
961
1195
|
const responseBody = await response.json();
|
|
962
1196
|
const result = schemas$.parse(
|
|
963
1197
|
responseBody,
|
|
964
1198
|
(val$) => {
|
|
965
|
-
return
|
|
1199
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1200
|
+
...responseFields$,
|
|
1201
|
+
...val$,
|
|
1202
|
+
});
|
|
966
1203
|
},
|
|
967
1204
|
"Response validation failed"
|
|
968
1205
|
);
|
|
969
|
-
|
|
1206
|
+
throw result;
|
|
970
1207
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
971
1208
|
const responseBody = await response.json();
|
|
972
1209
|
const result = schemas$.parse(
|
|
973
1210
|
responseBody,
|
|
974
1211
|
(val$) => {
|
|
975
|
-
return
|
|
1212
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1213
|
+
...responseFields$,
|
|
1214
|
+
...val$,
|
|
1215
|
+
});
|
|
976
1216
|
},
|
|
977
1217
|
"Response validation failed"
|
|
978
1218
|
);
|
|
979
|
-
|
|
1219
|
+
throw result;
|
|
980
1220
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
981
1221
|
const responseBody = await response.json();
|
|
982
1222
|
const result = schemas$.parse(
|
|
983
1223
|
responseBody,
|
|
984
1224
|
(val$) => {
|
|
985
|
-
return
|
|
1225
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1226
|
+
...responseFields$,
|
|
1227
|
+
...val$,
|
|
1228
|
+
});
|
|
986
1229
|
},
|
|
987
1230
|
"Response validation failed"
|
|
988
1231
|
);
|
|
989
|
-
|
|
1232
|
+
throw result;
|
|
990
1233
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
991
1234
|
const responseBody = await response.json();
|
|
992
1235
|
const result = schemas$.parse(
|
|
993
1236
|
responseBody,
|
|
994
1237
|
(val$) => {
|
|
995
|
-
return
|
|
1238
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1239
|
+
...responseFields$,
|
|
1240
|
+
...val$,
|
|
1241
|
+
});
|
|
996
1242
|
},
|
|
997
1243
|
"Response validation failed"
|
|
998
1244
|
);
|
|
999
|
-
|
|
1245
|
+
throw result;
|
|
1000
1246
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1001
1247
|
const responseBody = await response.json();
|
|
1002
1248
|
const result = schemas$.parse(
|
|
1003
1249
|
responseBody,
|
|
1004
1250
|
(val$) => {
|
|
1005
|
-
return
|
|
1251
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1252
|
+
...responseFields$,
|
|
1253
|
+
...val$,
|
|
1254
|
+
});
|
|
1006
1255
|
},
|
|
1007
1256
|
"Response validation failed"
|
|
1008
1257
|
);
|
|
1009
|
-
|
|
1258
|
+
throw result;
|
|
1010
1259
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1011
1260
|
const responseBody = await response.json();
|
|
1012
1261
|
const result = schemas$.parse(
|
|
1013
1262
|
responseBody,
|
|
1014
1263
|
(val$) => {
|
|
1015
|
-
return
|
|
1264
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1265
|
+
...responseFields$,
|
|
1266
|
+
...val$,
|
|
1267
|
+
});
|
|
1016
1268
|
},
|
|
1017
1269
|
"Response validation failed"
|
|
1018
1270
|
);
|
|
1019
|
-
|
|
1271
|
+
throw result;
|
|
1020
1272
|
} else {
|
|
1021
1273
|
const responseBody = await response.text();
|
|
1022
1274
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -1032,7 +1284,7 @@ export class Analytics extends ClientSDK {
|
|
|
1032
1284
|
async browsers(
|
|
1033
1285
|
input: operations.GetBrowserAnalyticsRequest,
|
|
1034
1286
|
options?: RequestOptions
|
|
1035
|
-
): Promise<operations.
|
|
1287
|
+
): Promise<Array<operations.GetBrowserAnalyticsResponseBody>> {
|
|
1036
1288
|
const headers$ = new Headers();
|
|
1037
1289
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
1038
1290
|
headers$.set("Accept", "application/json");
|
|
@@ -1099,7 +1351,22 @@ export class Analytics extends ClientSDK {
|
|
|
1099
1351
|
};
|
|
1100
1352
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1101
1353
|
|
|
1102
|
-
const doOptions = {
|
|
1354
|
+
const doOptions = {
|
|
1355
|
+
context,
|
|
1356
|
+
errorCodes: [
|
|
1357
|
+
"400",
|
|
1358
|
+
"401",
|
|
1359
|
+
"403",
|
|
1360
|
+
"404",
|
|
1361
|
+
"409",
|
|
1362
|
+
"410",
|
|
1363
|
+
"422",
|
|
1364
|
+
"429",
|
|
1365
|
+
"4XX",
|
|
1366
|
+
"500",
|
|
1367
|
+
"5XX",
|
|
1368
|
+
],
|
|
1369
|
+
};
|
|
1103
1370
|
const request = this.createRequest$(
|
|
1104
1371
|
{
|
|
1105
1372
|
security: securitySettings$,
|
|
@@ -1114,12 +1381,21 @@ export class Analytics extends ClientSDK {
|
|
|
1114
1381
|
|
|
1115
1382
|
const response = await this.do$(request, doOptions);
|
|
1116
1383
|
|
|
1384
|
+
const responseFields$ = {
|
|
1385
|
+
HttpMeta: {
|
|
1386
|
+
Response: response,
|
|
1387
|
+
Request: request,
|
|
1388
|
+
},
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1117
1391
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1118
1392
|
const responseBody = await response.json();
|
|
1119
1393
|
const result = schemas$.parse(
|
|
1120
1394
|
responseBody,
|
|
1121
1395
|
(val$) => {
|
|
1122
|
-
return
|
|
1396
|
+
return z
|
|
1397
|
+
.array(operations.GetBrowserAnalyticsResponseBody$.inboundSchema)
|
|
1398
|
+
.parse(val$);
|
|
1123
1399
|
},
|
|
1124
1400
|
"Response validation failed"
|
|
1125
1401
|
);
|
|
@@ -1129,91 +1405,118 @@ export class Analytics extends ClientSDK {
|
|
|
1129
1405
|
const result = schemas$.parse(
|
|
1130
1406
|
responseBody,
|
|
1131
1407
|
(val$) => {
|
|
1132
|
-
return
|
|
1408
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1409
|
+
...responseFields$,
|
|
1410
|
+
...val$,
|
|
1411
|
+
});
|
|
1133
1412
|
},
|
|
1134
1413
|
"Response validation failed"
|
|
1135
1414
|
);
|
|
1136
|
-
|
|
1415
|
+
throw result;
|
|
1137
1416
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
1138
1417
|
const responseBody = await response.json();
|
|
1139
1418
|
const result = schemas$.parse(
|
|
1140
1419
|
responseBody,
|
|
1141
1420
|
(val$) => {
|
|
1142
|
-
return
|
|
1421
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1422
|
+
...responseFields$,
|
|
1423
|
+
...val$,
|
|
1424
|
+
});
|
|
1143
1425
|
},
|
|
1144
1426
|
"Response validation failed"
|
|
1145
1427
|
);
|
|
1146
|
-
|
|
1428
|
+
throw result;
|
|
1147
1429
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
1148
1430
|
const responseBody = await response.json();
|
|
1149
1431
|
const result = schemas$.parse(
|
|
1150
1432
|
responseBody,
|
|
1151
1433
|
(val$) => {
|
|
1152
|
-
return
|
|
1434
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1435
|
+
...responseFields$,
|
|
1436
|
+
...val$,
|
|
1437
|
+
});
|
|
1153
1438
|
},
|
|
1154
1439
|
"Response validation failed"
|
|
1155
1440
|
);
|
|
1156
|
-
|
|
1441
|
+
throw result;
|
|
1157
1442
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
1158
1443
|
const responseBody = await response.json();
|
|
1159
1444
|
const result = schemas$.parse(
|
|
1160
1445
|
responseBody,
|
|
1161
1446
|
(val$) => {
|
|
1162
|
-
return
|
|
1447
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1448
|
+
...responseFields$,
|
|
1449
|
+
...val$,
|
|
1450
|
+
});
|
|
1163
1451
|
},
|
|
1164
1452
|
"Response validation failed"
|
|
1165
1453
|
);
|
|
1166
|
-
|
|
1454
|
+
throw result;
|
|
1167
1455
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
1168
1456
|
const responseBody = await response.json();
|
|
1169
1457
|
const result = schemas$.parse(
|
|
1170
1458
|
responseBody,
|
|
1171
1459
|
(val$) => {
|
|
1172
|
-
return
|
|
1460
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1461
|
+
...responseFields$,
|
|
1462
|
+
...val$,
|
|
1463
|
+
});
|
|
1173
1464
|
},
|
|
1174
1465
|
"Response validation failed"
|
|
1175
1466
|
);
|
|
1176
|
-
|
|
1467
|
+
throw result;
|
|
1177
1468
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
1178
1469
|
const responseBody = await response.json();
|
|
1179
1470
|
const result = schemas$.parse(
|
|
1180
1471
|
responseBody,
|
|
1181
1472
|
(val$) => {
|
|
1182
|
-
return
|
|
1473
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1474
|
+
...responseFields$,
|
|
1475
|
+
...val$,
|
|
1476
|
+
});
|
|
1183
1477
|
},
|
|
1184
1478
|
"Response validation failed"
|
|
1185
1479
|
);
|
|
1186
|
-
|
|
1480
|
+
throw result;
|
|
1187
1481
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
1188
1482
|
const responseBody = await response.json();
|
|
1189
1483
|
const result = schemas$.parse(
|
|
1190
1484
|
responseBody,
|
|
1191
1485
|
(val$) => {
|
|
1192
|
-
return
|
|
1486
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1487
|
+
...responseFields$,
|
|
1488
|
+
...val$,
|
|
1489
|
+
});
|
|
1193
1490
|
},
|
|
1194
1491
|
"Response validation failed"
|
|
1195
1492
|
);
|
|
1196
|
-
|
|
1493
|
+
throw result;
|
|
1197
1494
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1198
1495
|
const responseBody = await response.json();
|
|
1199
1496
|
const result = schemas$.parse(
|
|
1200
1497
|
responseBody,
|
|
1201
1498
|
(val$) => {
|
|
1202
|
-
return
|
|
1499
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1500
|
+
...responseFields$,
|
|
1501
|
+
...val$,
|
|
1502
|
+
});
|
|
1203
1503
|
},
|
|
1204
1504
|
"Response validation failed"
|
|
1205
1505
|
);
|
|
1206
|
-
|
|
1506
|
+
throw result;
|
|
1207
1507
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1208
1508
|
const responseBody = await response.json();
|
|
1209
1509
|
const result = schemas$.parse(
|
|
1210
1510
|
responseBody,
|
|
1211
1511
|
(val$) => {
|
|
1212
|
-
return
|
|
1512
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1513
|
+
...responseFields$,
|
|
1514
|
+
...val$,
|
|
1515
|
+
});
|
|
1213
1516
|
},
|
|
1214
1517
|
"Response validation failed"
|
|
1215
1518
|
);
|
|
1216
|
-
|
|
1519
|
+
throw result;
|
|
1217
1520
|
} else {
|
|
1218
1521
|
const responseBody = await response.text();
|
|
1219
1522
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -1229,7 +1532,7 @@ export class Analytics extends ClientSDK {
|
|
|
1229
1532
|
async os(
|
|
1230
1533
|
input: operations.GetOSAnalyticsRequest,
|
|
1231
1534
|
options?: RequestOptions
|
|
1232
|
-
): Promise<operations.
|
|
1535
|
+
): Promise<Array<operations.GetOSAnalyticsResponseBody>> {
|
|
1233
1536
|
const headers$ = new Headers();
|
|
1234
1537
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
1235
1538
|
headers$.set("Accept", "application/json");
|
|
@@ -1296,7 +1599,22 @@ export class Analytics extends ClientSDK {
|
|
|
1296
1599
|
};
|
|
1297
1600
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1298
1601
|
|
|
1299
|
-
const doOptions = {
|
|
1602
|
+
const doOptions = {
|
|
1603
|
+
context,
|
|
1604
|
+
errorCodes: [
|
|
1605
|
+
"400",
|
|
1606
|
+
"401",
|
|
1607
|
+
"403",
|
|
1608
|
+
"404",
|
|
1609
|
+
"409",
|
|
1610
|
+
"410",
|
|
1611
|
+
"422",
|
|
1612
|
+
"429",
|
|
1613
|
+
"4XX",
|
|
1614
|
+
"500",
|
|
1615
|
+
"5XX",
|
|
1616
|
+
],
|
|
1617
|
+
};
|
|
1300
1618
|
const request = this.createRequest$(
|
|
1301
1619
|
{
|
|
1302
1620
|
security: securitySettings$,
|
|
@@ -1311,12 +1629,21 @@ export class Analytics extends ClientSDK {
|
|
|
1311
1629
|
|
|
1312
1630
|
const response = await this.do$(request, doOptions);
|
|
1313
1631
|
|
|
1632
|
+
const responseFields$ = {
|
|
1633
|
+
HttpMeta: {
|
|
1634
|
+
Response: response,
|
|
1635
|
+
Request: request,
|
|
1636
|
+
},
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1314
1639
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1315
1640
|
const responseBody = await response.json();
|
|
1316
1641
|
const result = schemas$.parse(
|
|
1317
1642
|
responseBody,
|
|
1318
1643
|
(val$) => {
|
|
1319
|
-
return
|
|
1644
|
+
return z
|
|
1645
|
+
.array(operations.GetOSAnalyticsResponseBody$.inboundSchema)
|
|
1646
|
+
.parse(val$);
|
|
1320
1647
|
},
|
|
1321
1648
|
"Response validation failed"
|
|
1322
1649
|
);
|
|
@@ -1326,91 +1653,118 @@ export class Analytics extends ClientSDK {
|
|
|
1326
1653
|
const result = schemas$.parse(
|
|
1327
1654
|
responseBody,
|
|
1328
1655
|
(val$) => {
|
|
1329
|
-
return
|
|
1656
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1657
|
+
...responseFields$,
|
|
1658
|
+
...val$,
|
|
1659
|
+
});
|
|
1330
1660
|
},
|
|
1331
1661
|
"Response validation failed"
|
|
1332
1662
|
);
|
|
1333
|
-
|
|
1663
|
+
throw result;
|
|
1334
1664
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
1335
1665
|
const responseBody = await response.json();
|
|
1336
1666
|
const result = schemas$.parse(
|
|
1337
1667
|
responseBody,
|
|
1338
1668
|
(val$) => {
|
|
1339
|
-
return
|
|
1669
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1670
|
+
...responseFields$,
|
|
1671
|
+
...val$,
|
|
1672
|
+
});
|
|
1340
1673
|
},
|
|
1341
1674
|
"Response validation failed"
|
|
1342
1675
|
);
|
|
1343
|
-
|
|
1676
|
+
throw result;
|
|
1344
1677
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
1345
1678
|
const responseBody = await response.json();
|
|
1346
1679
|
const result = schemas$.parse(
|
|
1347
1680
|
responseBody,
|
|
1348
1681
|
(val$) => {
|
|
1349
|
-
return
|
|
1682
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1683
|
+
...responseFields$,
|
|
1684
|
+
...val$,
|
|
1685
|
+
});
|
|
1350
1686
|
},
|
|
1351
1687
|
"Response validation failed"
|
|
1352
1688
|
);
|
|
1353
|
-
|
|
1689
|
+
throw result;
|
|
1354
1690
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
1355
1691
|
const responseBody = await response.json();
|
|
1356
1692
|
const result = schemas$.parse(
|
|
1357
1693
|
responseBody,
|
|
1358
1694
|
(val$) => {
|
|
1359
|
-
return
|
|
1695
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1696
|
+
...responseFields$,
|
|
1697
|
+
...val$,
|
|
1698
|
+
});
|
|
1360
1699
|
},
|
|
1361
1700
|
"Response validation failed"
|
|
1362
1701
|
);
|
|
1363
|
-
|
|
1702
|
+
throw result;
|
|
1364
1703
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
1365
1704
|
const responseBody = await response.json();
|
|
1366
1705
|
const result = schemas$.parse(
|
|
1367
1706
|
responseBody,
|
|
1368
1707
|
(val$) => {
|
|
1369
|
-
return
|
|
1708
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1709
|
+
...responseFields$,
|
|
1710
|
+
...val$,
|
|
1711
|
+
});
|
|
1370
1712
|
},
|
|
1371
1713
|
"Response validation failed"
|
|
1372
1714
|
);
|
|
1373
|
-
|
|
1715
|
+
throw result;
|
|
1374
1716
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
1375
1717
|
const responseBody = await response.json();
|
|
1376
1718
|
const result = schemas$.parse(
|
|
1377
1719
|
responseBody,
|
|
1378
1720
|
(val$) => {
|
|
1379
|
-
return
|
|
1721
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1722
|
+
...responseFields$,
|
|
1723
|
+
...val$,
|
|
1724
|
+
});
|
|
1380
1725
|
},
|
|
1381
1726
|
"Response validation failed"
|
|
1382
1727
|
);
|
|
1383
|
-
|
|
1728
|
+
throw result;
|
|
1384
1729
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
1385
1730
|
const responseBody = await response.json();
|
|
1386
1731
|
const result = schemas$.parse(
|
|
1387
1732
|
responseBody,
|
|
1388
1733
|
(val$) => {
|
|
1389
|
-
return
|
|
1734
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1735
|
+
...responseFields$,
|
|
1736
|
+
...val$,
|
|
1737
|
+
});
|
|
1390
1738
|
},
|
|
1391
1739
|
"Response validation failed"
|
|
1392
1740
|
);
|
|
1393
|
-
|
|
1741
|
+
throw result;
|
|
1394
1742
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1395
1743
|
const responseBody = await response.json();
|
|
1396
1744
|
const result = schemas$.parse(
|
|
1397
1745
|
responseBody,
|
|
1398
1746
|
(val$) => {
|
|
1399
|
-
return
|
|
1747
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1748
|
+
...responseFields$,
|
|
1749
|
+
...val$,
|
|
1750
|
+
});
|
|
1400
1751
|
},
|
|
1401
1752
|
"Response validation failed"
|
|
1402
1753
|
);
|
|
1403
|
-
|
|
1754
|
+
throw result;
|
|
1404
1755
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1405
1756
|
const responseBody = await response.json();
|
|
1406
1757
|
const result = schemas$.parse(
|
|
1407
1758
|
responseBody,
|
|
1408
1759
|
(val$) => {
|
|
1409
|
-
return
|
|
1760
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1761
|
+
...responseFields$,
|
|
1762
|
+
...val$,
|
|
1763
|
+
});
|
|
1410
1764
|
},
|
|
1411
1765
|
"Response validation failed"
|
|
1412
1766
|
);
|
|
1413
|
-
|
|
1767
|
+
throw result;
|
|
1414
1768
|
} else {
|
|
1415
1769
|
const responseBody = await response.text();
|
|
1416
1770
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -1426,7 +1780,7 @@ export class Analytics extends ClientSDK {
|
|
|
1426
1780
|
async referers(
|
|
1427
1781
|
input: operations.GetRefererAnalyticsRequest,
|
|
1428
1782
|
options?: RequestOptions
|
|
1429
|
-
): Promise<operations.
|
|
1783
|
+
): Promise<Array<operations.GetRefererAnalyticsResponseBody>> {
|
|
1430
1784
|
const headers$ = new Headers();
|
|
1431
1785
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
1432
1786
|
headers$.set("Accept", "application/json");
|
|
@@ -1493,7 +1847,22 @@ export class Analytics extends ClientSDK {
|
|
|
1493
1847
|
};
|
|
1494
1848
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1495
1849
|
|
|
1496
|
-
const doOptions = {
|
|
1850
|
+
const doOptions = {
|
|
1851
|
+
context,
|
|
1852
|
+
errorCodes: [
|
|
1853
|
+
"400",
|
|
1854
|
+
"401",
|
|
1855
|
+
"403",
|
|
1856
|
+
"404",
|
|
1857
|
+
"409",
|
|
1858
|
+
"410",
|
|
1859
|
+
"422",
|
|
1860
|
+
"429",
|
|
1861
|
+
"4XX",
|
|
1862
|
+
"500",
|
|
1863
|
+
"5XX",
|
|
1864
|
+
],
|
|
1865
|
+
};
|
|
1497
1866
|
const request = this.createRequest$(
|
|
1498
1867
|
{
|
|
1499
1868
|
security: securitySettings$,
|
|
@@ -1508,12 +1877,21 @@ export class Analytics extends ClientSDK {
|
|
|
1508
1877
|
|
|
1509
1878
|
const response = await this.do$(request, doOptions);
|
|
1510
1879
|
|
|
1880
|
+
const responseFields$ = {
|
|
1881
|
+
HttpMeta: {
|
|
1882
|
+
Response: response,
|
|
1883
|
+
Request: request,
|
|
1884
|
+
},
|
|
1885
|
+
};
|
|
1886
|
+
|
|
1511
1887
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1512
1888
|
const responseBody = await response.json();
|
|
1513
1889
|
const result = schemas$.parse(
|
|
1514
1890
|
responseBody,
|
|
1515
1891
|
(val$) => {
|
|
1516
|
-
return
|
|
1892
|
+
return z
|
|
1893
|
+
.array(operations.GetRefererAnalyticsResponseBody$.inboundSchema)
|
|
1894
|
+
.parse(val$);
|
|
1517
1895
|
},
|
|
1518
1896
|
"Response validation failed"
|
|
1519
1897
|
);
|
|
@@ -1523,91 +1901,118 @@ export class Analytics extends ClientSDK {
|
|
|
1523
1901
|
const result = schemas$.parse(
|
|
1524
1902
|
responseBody,
|
|
1525
1903
|
(val$) => {
|
|
1526
|
-
return
|
|
1904
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1905
|
+
...responseFields$,
|
|
1906
|
+
...val$,
|
|
1907
|
+
});
|
|
1527
1908
|
},
|
|
1528
1909
|
"Response validation failed"
|
|
1529
1910
|
);
|
|
1530
|
-
|
|
1911
|
+
throw result;
|
|
1531
1912
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
1532
1913
|
const responseBody = await response.json();
|
|
1533
1914
|
const result = schemas$.parse(
|
|
1534
1915
|
responseBody,
|
|
1535
1916
|
(val$) => {
|
|
1536
|
-
return
|
|
1917
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1918
|
+
...responseFields$,
|
|
1919
|
+
...val$,
|
|
1920
|
+
});
|
|
1537
1921
|
},
|
|
1538
1922
|
"Response validation failed"
|
|
1539
1923
|
);
|
|
1540
|
-
|
|
1924
|
+
throw result;
|
|
1541
1925
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
1542
1926
|
const responseBody = await response.json();
|
|
1543
1927
|
const result = schemas$.parse(
|
|
1544
1928
|
responseBody,
|
|
1545
1929
|
(val$) => {
|
|
1546
|
-
return
|
|
1930
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1931
|
+
...responseFields$,
|
|
1932
|
+
...val$,
|
|
1933
|
+
});
|
|
1547
1934
|
},
|
|
1548
1935
|
"Response validation failed"
|
|
1549
1936
|
);
|
|
1550
|
-
|
|
1937
|
+
throw result;
|
|
1551
1938
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
1552
1939
|
const responseBody = await response.json();
|
|
1553
1940
|
const result = schemas$.parse(
|
|
1554
1941
|
responseBody,
|
|
1555
1942
|
(val$) => {
|
|
1556
|
-
return
|
|
1943
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1944
|
+
...responseFields$,
|
|
1945
|
+
...val$,
|
|
1946
|
+
});
|
|
1557
1947
|
},
|
|
1558
1948
|
"Response validation failed"
|
|
1559
1949
|
);
|
|
1560
|
-
|
|
1950
|
+
throw result;
|
|
1561
1951
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
1562
1952
|
const responseBody = await response.json();
|
|
1563
1953
|
const result = schemas$.parse(
|
|
1564
1954
|
responseBody,
|
|
1565
1955
|
(val$) => {
|
|
1566
|
-
return
|
|
1956
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1957
|
+
...responseFields$,
|
|
1958
|
+
...val$,
|
|
1959
|
+
});
|
|
1567
1960
|
},
|
|
1568
1961
|
"Response validation failed"
|
|
1569
1962
|
);
|
|
1570
|
-
|
|
1963
|
+
throw result;
|
|
1571
1964
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
1572
1965
|
const responseBody = await response.json();
|
|
1573
1966
|
const result = schemas$.parse(
|
|
1574
1967
|
responseBody,
|
|
1575
1968
|
(val$) => {
|
|
1576
|
-
return
|
|
1969
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1970
|
+
...responseFields$,
|
|
1971
|
+
...val$,
|
|
1972
|
+
});
|
|
1577
1973
|
},
|
|
1578
1974
|
"Response validation failed"
|
|
1579
1975
|
);
|
|
1580
|
-
|
|
1976
|
+
throw result;
|
|
1581
1977
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
1582
1978
|
const responseBody = await response.json();
|
|
1583
1979
|
const result = schemas$.parse(
|
|
1584
1980
|
responseBody,
|
|
1585
1981
|
(val$) => {
|
|
1586
|
-
return
|
|
1982
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1983
|
+
...responseFields$,
|
|
1984
|
+
...val$,
|
|
1985
|
+
});
|
|
1587
1986
|
},
|
|
1588
1987
|
"Response validation failed"
|
|
1589
1988
|
);
|
|
1590
|
-
|
|
1989
|
+
throw result;
|
|
1591
1990
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1592
1991
|
const responseBody = await response.json();
|
|
1593
1992
|
const result = schemas$.parse(
|
|
1594
1993
|
responseBody,
|
|
1595
1994
|
(val$) => {
|
|
1596
|
-
return
|
|
1995
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1996
|
+
...responseFields$,
|
|
1997
|
+
...val$,
|
|
1998
|
+
});
|
|
1597
1999
|
},
|
|
1598
2000
|
"Response validation failed"
|
|
1599
2001
|
);
|
|
1600
|
-
|
|
2002
|
+
throw result;
|
|
1601
2003
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1602
2004
|
const responseBody = await response.json();
|
|
1603
2005
|
const result = schemas$.parse(
|
|
1604
2006
|
responseBody,
|
|
1605
2007
|
(val$) => {
|
|
1606
|
-
return
|
|
2008
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
2009
|
+
...responseFields$,
|
|
2010
|
+
...val$,
|
|
2011
|
+
});
|
|
1607
2012
|
},
|
|
1608
2013
|
"Response validation failed"
|
|
1609
2014
|
);
|
|
1610
|
-
|
|
2015
|
+
throw result;
|
|
1611
2016
|
} else {
|
|
1612
2017
|
const responseBody = await response.text();
|
|
1613
2018
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -1623,7 +2028,7 @@ export class Analytics extends ClientSDK {
|
|
|
1623
2028
|
async topLinks(
|
|
1624
2029
|
input: operations.GetTopLinksRequest,
|
|
1625
2030
|
options?: RequestOptions
|
|
1626
|
-
): Promise<operations.
|
|
2031
|
+
): Promise<Array<operations.GetTopLinksResponseBody>> {
|
|
1627
2032
|
const headers$ = new Headers();
|
|
1628
2033
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
1629
2034
|
headers$.set("Accept", "application/json");
|
|
@@ -1690,7 +2095,22 @@ export class Analytics extends ClientSDK {
|
|
|
1690
2095
|
};
|
|
1691
2096
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1692
2097
|
|
|
1693
|
-
const doOptions = {
|
|
2098
|
+
const doOptions = {
|
|
2099
|
+
context,
|
|
2100
|
+
errorCodes: [
|
|
2101
|
+
"400",
|
|
2102
|
+
"401",
|
|
2103
|
+
"403",
|
|
2104
|
+
"404",
|
|
2105
|
+
"409",
|
|
2106
|
+
"410",
|
|
2107
|
+
"422",
|
|
2108
|
+
"429",
|
|
2109
|
+
"4XX",
|
|
2110
|
+
"500",
|
|
2111
|
+
"5XX",
|
|
2112
|
+
],
|
|
2113
|
+
};
|
|
1694
2114
|
const request = this.createRequest$(
|
|
1695
2115
|
{
|
|
1696
2116
|
security: securitySettings$,
|
|
@@ -1705,12 +2125,19 @@ export class Analytics extends ClientSDK {
|
|
|
1705
2125
|
|
|
1706
2126
|
const response = await this.do$(request, doOptions);
|
|
1707
2127
|
|
|
2128
|
+
const responseFields$ = {
|
|
2129
|
+
HttpMeta: {
|
|
2130
|
+
Response: response,
|
|
2131
|
+
Request: request,
|
|
2132
|
+
},
|
|
2133
|
+
};
|
|
2134
|
+
|
|
1708
2135
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1709
2136
|
const responseBody = await response.json();
|
|
1710
2137
|
const result = schemas$.parse(
|
|
1711
2138
|
responseBody,
|
|
1712
2139
|
(val$) => {
|
|
1713
|
-
return operations.
|
|
2140
|
+
return z.array(operations.GetTopLinksResponseBody$.inboundSchema).parse(val$);
|
|
1714
2141
|
},
|
|
1715
2142
|
"Response validation failed"
|
|
1716
2143
|
);
|
|
@@ -1720,91 +2147,118 @@ export class Analytics extends ClientSDK {
|
|
|
1720
2147
|
const result = schemas$.parse(
|
|
1721
2148
|
responseBody,
|
|
1722
2149
|
(val$) => {
|
|
1723
|
-
return
|
|
2150
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
2151
|
+
...responseFields$,
|
|
2152
|
+
...val$,
|
|
2153
|
+
});
|
|
1724
2154
|
},
|
|
1725
2155
|
"Response validation failed"
|
|
1726
2156
|
);
|
|
1727
|
-
|
|
2157
|
+
throw result;
|
|
1728
2158
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
1729
2159
|
const responseBody = await response.json();
|
|
1730
2160
|
const result = schemas$.parse(
|
|
1731
2161
|
responseBody,
|
|
1732
2162
|
(val$) => {
|
|
1733
|
-
return
|
|
2163
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
2164
|
+
...responseFields$,
|
|
2165
|
+
...val$,
|
|
2166
|
+
});
|
|
1734
2167
|
},
|
|
1735
2168
|
"Response validation failed"
|
|
1736
2169
|
);
|
|
1737
|
-
|
|
2170
|
+
throw result;
|
|
1738
2171
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
1739
2172
|
const responseBody = await response.json();
|
|
1740
2173
|
const result = schemas$.parse(
|
|
1741
2174
|
responseBody,
|
|
1742
2175
|
(val$) => {
|
|
1743
|
-
return
|
|
2176
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
2177
|
+
...responseFields$,
|
|
2178
|
+
...val$,
|
|
2179
|
+
});
|
|
1744
2180
|
},
|
|
1745
2181
|
"Response validation failed"
|
|
1746
2182
|
);
|
|
1747
|
-
|
|
2183
|
+
throw result;
|
|
1748
2184
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
1749
2185
|
const responseBody = await response.json();
|
|
1750
2186
|
const result = schemas$.parse(
|
|
1751
2187
|
responseBody,
|
|
1752
2188
|
(val$) => {
|
|
1753
|
-
return
|
|
2189
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
2190
|
+
...responseFields$,
|
|
2191
|
+
...val$,
|
|
2192
|
+
});
|
|
1754
2193
|
},
|
|
1755
2194
|
"Response validation failed"
|
|
1756
2195
|
);
|
|
1757
|
-
|
|
2196
|
+
throw result;
|
|
1758
2197
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
1759
2198
|
const responseBody = await response.json();
|
|
1760
2199
|
const result = schemas$.parse(
|
|
1761
2200
|
responseBody,
|
|
1762
2201
|
(val$) => {
|
|
1763
|
-
return
|
|
2202
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
2203
|
+
...responseFields$,
|
|
2204
|
+
...val$,
|
|
2205
|
+
});
|
|
1764
2206
|
},
|
|
1765
2207
|
"Response validation failed"
|
|
1766
2208
|
);
|
|
1767
|
-
|
|
2209
|
+
throw result;
|
|
1768
2210
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
1769
2211
|
const responseBody = await response.json();
|
|
1770
2212
|
const result = schemas$.parse(
|
|
1771
2213
|
responseBody,
|
|
1772
2214
|
(val$) => {
|
|
1773
|
-
return
|
|
2215
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
2216
|
+
...responseFields$,
|
|
2217
|
+
...val$,
|
|
2218
|
+
});
|
|
1774
2219
|
},
|
|
1775
2220
|
"Response validation failed"
|
|
1776
2221
|
);
|
|
1777
|
-
|
|
2222
|
+
throw result;
|
|
1778
2223
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
1779
2224
|
const responseBody = await response.json();
|
|
1780
2225
|
const result = schemas$.parse(
|
|
1781
2226
|
responseBody,
|
|
1782
2227
|
(val$) => {
|
|
1783
|
-
return
|
|
2228
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
2229
|
+
...responseFields$,
|
|
2230
|
+
...val$,
|
|
2231
|
+
});
|
|
1784
2232
|
},
|
|
1785
2233
|
"Response validation failed"
|
|
1786
2234
|
);
|
|
1787
|
-
|
|
2235
|
+
throw result;
|
|
1788
2236
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1789
2237
|
const responseBody = await response.json();
|
|
1790
2238
|
const result = schemas$.parse(
|
|
1791
2239
|
responseBody,
|
|
1792
2240
|
(val$) => {
|
|
1793
|
-
return
|
|
2241
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
2242
|
+
...responseFields$,
|
|
2243
|
+
...val$,
|
|
2244
|
+
});
|
|
1794
2245
|
},
|
|
1795
2246
|
"Response validation failed"
|
|
1796
2247
|
);
|
|
1797
|
-
|
|
2248
|
+
throw result;
|
|
1798
2249
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1799
2250
|
const responseBody = await response.json();
|
|
1800
2251
|
const result = schemas$.parse(
|
|
1801
2252
|
responseBody,
|
|
1802
2253
|
(val$) => {
|
|
1803
|
-
return
|
|
2254
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
2255
|
+
...responseFields$,
|
|
2256
|
+
...val$,
|
|
2257
|
+
});
|
|
1804
2258
|
},
|
|
1805
2259
|
"Response validation failed"
|
|
1806
2260
|
);
|
|
1807
|
-
|
|
2261
|
+
throw result;
|
|
1808
2262
|
} else {
|
|
1809
2263
|
const responseBody = await response.text();
|
|
1810
2264
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
|
@@ -1820,7 +2274,7 @@ export class Analytics extends ClientSDK {
|
|
|
1820
2274
|
async topUrls(
|
|
1821
2275
|
input: operations.GetTopURLsRequest,
|
|
1822
2276
|
options?: RequestOptions
|
|
1823
|
-
): Promise<operations.
|
|
2277
|
+
): Promise<Array<operations.GetTopURLsResponseBody>> {
|
|
1824
2278
|
const headers$ = new Headers();
|
|
1825
2279
|
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
1826
2280
|
headers$.set("Accept", "application/json");
|
|
@@ -1887,7 +2341,22 @@ export class Analytics extends ClientSDK {
|
|
|
1887
2341
|
};
|
|
1888
2342
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1889
2343
|
|
|
1890
|
-
const doOptions = {
|
|
2344
|
+
const doOptions = {
|
|
2345
|
+
context,
|
|
2346
|
+
errorCodes: [
|
|
2347
|
+
"400",
|
|
2348
|
+
"401",
|
|
2349
|
+
"403",
|
|
2350
|
+
"404",
|
|
2351
|
+
"409",
|
|
2352
|
+
"410",
|
|
2353
|
+
"422",
|
|
2354
|
+
"429",
|
|
2355
|
+
"4XX",
|
|
2356
|
+
"500",
|
|
2357
|
+
"5XX",
|
|
2358
|
+
],
|
|
2359
|
+
};
|
|
1891
2360
|
const request = this.createRequest$(
|
|
1892
2361
|
{
|
|
1893
2362
|
security: securitySettings$,
|
|
@@ -1902,12 +2371,19 @@ export class Analytics extends ClientSDK {
|
|
|
1902
2371
|
|
|
1903
2372
|
const response = await this.do$(request, doOptions);
|
|
1904
2373
|
|
|
2374
|
+
const responseFields$ = {
|
|
2375
|
+
HttpMeta: {
|
|
2376
|
+
Response: response,
|
|
2377
|
+
Request: request,
|
|
2378
|
+
},
|
|
2379
|
+
};
|
|
2380
|
+
|
|
1905
2381
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1906
2382
|
const responseBody = await response.json();
|
|
1907
2383
|
const result = schemas$.parse(
|
|
1908
2384
|
responseBody,
|
|
1909
2385
|
(val$) => {
|
|
1910
|
-
return operations.
|
|
2386
|
+
return z.array(operations.GetTopURLsResponseBody$.inboundSchema).parse(val$);
|
|
1911
2387
|
},
|
|
1912
2388
|
"Response validation failed"
|
|
1913
2389
|
);
|
|
@@ -1917,91 +2393,118 @@ export class Analytics extends ClientSDK {
|
|
|
1917
2393
|
const result = schemas$.parse(
|
|
1918
2394
|
responseBody,
|
|
1919
2395
|
(val$) => {
|
|
1920
|
-
return
|
|
2396
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
2397
|
+
...responseFields$,
|
|
2398
|
+
...val$,
|
|
2399
|
+
});
|
|
1921
2400
|
},
|
|
1922
2401
|
"Response validation failed"
|
|
1923
2402
|
);
|
|
1924
|
-
|
|
2403
|
+
throw result;
|
|
1925
2404
|
} else if (this.matchResponse(response, 401, "application/json")) {
|
|
1926
2405
|
const responseBody = await response.json();
|
|
1927
2406
|
const result = schemas$.parse(
|
|
1928
2407
|
responseBody,
|
|
1929
2408
|
(val$) => {
|
|
1930
|
-
return
|
|
2409
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
2410
|
+
...responseFields$,
|
|
2411
|
+
...val$,
|
|
2412
|
+
});
|
|
1931
2413
|
},
|
|
1932
2414
|
"Response validation failed"
|
|
1933
2415
|
);
|
|
1934
|
-
|
|
2416
|
+
throw result;
|
|
1935
2417
|
} else if (this.matchResponse(response, 403, "application/json")) {
|
|
1936
2418
|
const responseBody = await response.json();
|
|
1937
2419
|
const result = schemas$.parse(
|
|
1938
2420
|
responseBody,
|
|
1939
2421
|
(val$) => {
|
|
1940
|
-
return
|
|
2422
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
2423
|
+
...responseFields$,
|
|
2424
|
+
...val$,
|
|
2425
|
+
});
|
|
1941
2426
|
},
|
|
1942
2427
|
"Response validation failed"
|
|
1943
2428
|
);
|
|
1944
|
-
|
|
2429
|
+
throw result;
|
|
1945
2430
|
} else if (this.matchResponse(response, 404, "application/json")) {
|
|
1946
2431
|
const responseBody = await response.json();
|
|
1947
2432
|
const result = schemas$.parse(
|
|
1948
2433
|
responseBody,
|
|
1949
2434
|
(val$) => {
|
|
1950
|
-
return
|
|
2435
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
2436
|
+
...responseFields$,
|
|
2437
|
+
...val$,
|
|
2438
|
+
});
|
|
1951
2439
|
},
|
|
1952
2440
|
"Response validation failed"
|
|
1953
2441
|
);
|
|
1954
|
-
|
|
2442
|
+
throw result;
|
|
1955
2443
|
} else if (this.matchResponse(response, 409, "application/json")) {
|
|
1956
2444
|
const responseBody = await response.json();
|
|
1957
2445
|
const result = schemas$.parse(
|
|
1958
2446
|
responseBody,
|
|
1959
2447
|
(val$) => {
|
|
1960
|
-
return
|
|
2448
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
2449
|
+
...responseFields$,
|
|
2450
|
+
...val$,
|
|
2451
|
+
});
|
|
1961
2452
|
},
|
|
1962
2453
|
"Response validation failed"
|
|
1963
2454
|
);
|
|
1964
|
-
|
|
2455
|
+
throw result;
|
|
1965
2456
|
} else if (this.matchResponse(response, 410, "application/json")) {
|
|
1966
2457
|
const responseBody = await response.json();
|
|
1967
2458
|
const result = schemas$.parse(
|
|
1968
2459
|
responseBody,
|
|
1969
2460
|
(val$) => {
|
|
1970
|
-
return
|
|
2461
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
2462
|
+
...responseFields$,
|
|
2463
|
+
...val$,
|
|
2464
|
+
});
|
|
1971
2465
|
},
|
|
1972
2466
|
"Response validation failed"
|
|
1973
2467
|
);
|
|
1974
|
-
|
|
2468
|
+
throw result;
|
|
1975
2469
|
} else if (this.matchResponse(response, 422, "application/json")) {
|
|
1976
2470
|
const responseBody = await response.json();
|
|
1977
2471
|
const result = schemas$.parse(
|
|
1978
2472
|
responseBody,
|
|
1979
2473
|
(val$) => {
|
|
1980
|
-
return
|
|
2474
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
2475
|
+
...responseFields$,
|
|
2476
|
+
...val$,
|
|
2477
|
+
});
|
|
1981
2478
|
},
|
|
1982
2479
|
"Response validation failed"
|
|
1983
2480
|
);
|
|
1984
|
-
|
|
2481
|
+
throw result;
|
|
1985
2482
|
} else if (this.matchResponse(response, 429, "application/json")) {
|
|
1986
2483
|
const responseBody = await response.json();
|
|
1987
2484
|
const result = schemas$.parse(
|
|
1988
2485
|
responseBody,
|
|
1989
2486
|
(val$) => {
|
|
1990
|
-
return
|
|
2487
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
2488
|
+
...responseFields$,
|
|
2489
|
+
...val$,
|
|
2490
|
+
});
|
|
1991
2491
|
},
|
|
1992
2492
|
"Response validation failed"
|
|
1993
2493
|
);
|
|
1994
|
-
|
|
2494
|
+
throw result;
|
|
1995
2495
|
} else if (this.matchResponse(response, 500, "application/json")) {
|
|
1996
2496
|
const responseBody = await response.json();
|
|
1997
2497
|
const result = schemas$.parse(
|
|
1998
2498
|
responseBody,
|
|
1999
2499
|
(val$) => {
|
|
2000
|
-
return
|
|
2500
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
2501
|
+
...responseFields$,
|
|
2502
|
+
...val$,
|
|
2503
|
+
});
|
|
2001
2504
|
},
|
|
2002
2505
|
"Response validation failed"
|
|
2003
2506
|
);
|
|
2004
|
-
|
|
2507
|
+
throw result;
|
|
2005
2508
|
} else {
|
|
2006
2509
|
const responseBody = await response.text();
|
|
2007
2510
|
throw new errors.SDKError("Unexpected API response", response, responseBody);
|