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/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 z = __importStar(require("zod"));
|
|
38
39
|
class Analytics extends sdks_1.ClientSDK {
|
|
39
40
|
constructor(options = {}) {
|
|
40
41
|
const opt = options;
|
|
@@ -122,7 +123,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
122
123
|
securitySource: this.options$.token,
|
|
123
124
|
};
|
|
124
125
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
125
|
-
const doOptions = {
|
|
126
|
+
const doOptions = {
|
|
127
|
+
context,
|
|
128
|
+
errorCodes: [
|
|
129
|
+
"400",
|
|
130
|
+
"401",
|
|
131
|
+
"403",
|
|
132
|
+
"404",
|
|
133
|
+
"409",
|
|
134
|
+
"410",
|
|
135
|
+
"422",
|
|
136
|
+
"429",
|
|
137
|
+
"4XX",
|
|
138
|
+
"500",
|
|
139
|
+
"5XX",
|
|
140
|
+
],
|
|
141
|
+
};
|
|
126
142
|
const request = this.createRequest$({
|
|
127
143
|
security: securitySettings$,
|
|
128
144
|
method: "GET",
|
|
@@ -132,75 +148,108 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
132
148
|
body: body$,
|
|
133
149
|
}, options);
|
|
134
150
|
const response = await this.do$(request, doOptions);
|
|
151
|
+
const responseFields$ = {
|
|
152
|
+
HttpMeta: {
|
|
153
|
+
Response: response,
|
|
154
|
+
Request: request,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
135
157
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
136
158
|
const responseBody = await response.json();
|
|
137
159
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
138
|
-
return
|
|
160
|
+
return z.number().parse(val$);
|
|
139
161
|
}, "Response validation failed");
|
|
140
162
|
return result;
|
|
141
163
|
}
|
|
142
164
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
143
165
|
const responseBody = await response.json();
|
|
144
166
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
145
|
-
return
|
|
167
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
168
|
+
...responseFields$,
|
|
169
|
+
...val$,
|
|
170
|
+
});
|
|
146
171
|
}, "Response validation failed");
|
|
147
|
-
|
|
172
|
+
throw result;
|
|
148
173
|
}
|
|
149
174
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
150
175
|
const responseBody = await response.json();
|
|
151
176
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
152
|
-
return
|
|
177
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
178
|
+
...responseFields$,
|
|
179
|
+
...val$,
|
|
180
|
+
});
|
|
153
181
|
}, "Response validation failed");
|
|
154
|
-
|
|
182
|
+
throw result;
|
|
155
183
|
}
|
|
156
184
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
157
185
|
const responseBody = await response.json();
|
|
158
186
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
159
|
-
return
|
|
187
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
188
|
+
...responseFields$,
|
|
189
|
+
...val$,
|
|
190
|
+
});
|
|
160
191
|
}, "Response validation failed");
|
|
161
|
-
|
|
192
|
+
throw result;
|
|
162
193
|
}
|
|
163
194
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
164
195
|
const responseBody = await response.json();
|
|
165
196
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
166
|
-
return
|
|
197
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
198
|
+
...responseFields$,
|
|
199
|
+
...val$,
|
|
200
|
+
});
|
|
167
201
|
}, "Response validation failed");
|
|
168
|
-
|
|
202
|
+
throw result;
|
|
169
203
|
}
|
|
170
204
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
171
205
|
const responseBody = await response.json();
|
|
172
206
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
173
|
-
return
|
|
207
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
208
|
+
...responseFields$,
|
|
209
|
+
...val$,
|
|
210
|
+
});
|
|
174
211
|
}, "Response validation failed");
|
|
175
|
-
|
|
212
|
+
throw result;
|
|
176
213
|
}
|
|
177
214
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
178
215
|
const responseBody = await response.json();
|
|
179
216
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
180
|
-
return
|
|
217
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
218
|
+
...responseFields$,
|
|
219
|
+
...val$,
|
|
220
|
+
});
|
|
181
221
|
}, "Response validation failed");
|
|
182
|
-
|
|
222
|
+
throw result;
|
|
183
223
|
}
|
|
184
224
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
185
225
|
const responseBody = await response.json();
|
|
186
226
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
187
|
-
return
|
|
227
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
228
|
+
...responseFields$,
|
|
229
|
+
...val$,
|
|
230
|
+
});
|
|
188
231
|
}, "Response validation failed");
|
|
189
|
-
|
|
232
|
+
throw result;
|
|
190
233
|
}
|
|
191
234
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
192
235
|
const responseBody = await response.json();
|
|
193
236
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
194
|
-
return
|
|
237
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
238
|
+
...responseFields$,
|
|
239
|
+
...val$,
|
|
240
|
+
});
|
|
195
241
|
}, "Response validation failed");
|
|
196
|
-
|
|
242
|
+
throw result;
|
|
197
243
|
}
|
|
198
244
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
199
245
|
const responseBody = await response.json();
|
|
200
246
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
201
|
-
return
|
|
247
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
248
|
+
...responseFields$,
|
|
249
|
+
...val$,
|
|
250
|
+
});
|
|
202
251
|
}, "Response validation failed");
|
|
203
|
-
|
|
252
|
+
throw result;
|
|
204
253
|
}
|
|
205
254
|
else {
|
|
206
255
|
const responseBody = await response.text();
|
|
@@ -273,7 +322,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
273
322
|
securitySource: this.options$.token,
|
|
274
323
|
};
|
|
275
324
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
276
|
-
const doOptions = {
|
|
325
|
+
const doOptions = {
|
|
326
|
+
context,
|
|
327
|
+
errorCodes: [
|
|
328
|
+
"400",
|
|
329
|
+
"401",
|
|
330
|
+
"403",
|
|
331
|
+
"404",
|
|
332
|
+
"409",
|
|
333
|
+
"410",
|
|
334
|
+
"422",
|
|
335
|
+
"429",
|
|
336
|
+
"4XX",
|
|
337
|
+
"500",
|
|
338
|
+
"5XX",
|
|
339
|
+
],
|
|
340
|
+
};
|
|
277
341
|
const request = this.createRequest$({
|
|
278
342
|
security: securitySettings$,
|
|
279
343
|
method: "GET",
|
|
@@ -283,75 +347,108 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
283
347
|
body: body$,
|
|
284
348
|
}, options);
|
|
285
349
|
const response = await this.do$(request, doOptions);
|
|
350
|
+
const responseFields$ = {
|
|
351
|
+
HttpMeta: {
|
|
352
|
+
Response: response,
|
|
353
|
+
Request: request,
|
|
354
|
+
},
|
|
355
|
+
};
|
|
286
356
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
287
357
|
const responseBody = await response.json();
|
|
288
358
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
289
|
-
return operations.
|
|
359
|
+
return z.array(operations.ResponseBody$.inboundSchema).parse(val$);
|
|
290
360
|
}, "Response validation failed");
|
|
291
361
|
return result;
|
|
292
362
|
}
|
|
293
363
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
294
364
|
const responseBody = await response.json();
|
|
295
365
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
296
|
-
return
|
|
366
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
367
|
+
...responseFields$,
|
|
368
|
+
...val$,
|
|
369
|
+
});
|
|
297
370
|
}, "Response validation failed");
|
|
298
|
-
|
|
371
|
+
throw result;
|
|
299
372
|
}
|
|
300
373
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
301
374
|
const responseBody = await response.json();
|
|
302
375
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
303
|
-
return
|
|
376
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
377
|
+
...responseFields$,
|
|
378
|
+
...val$,
|
|
379
|
+
});
|
|
304
380
|
}, "Response validation failed");
|
|
305
|
-
|
|
381
|
+
throw result;
|
|
306
382
|
}
|
|
307
383
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
308
384
|
const responseBody = await response.json();
|
|
309
385
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
310
|
-
return
|
|
386
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
387
|
+
...responseFields$,
|
|
388
|
+
...val$,
|
|
389
|
+
});
|
|
311
390
|
}, "Response validation failed");
|
|
312
|
-
|
|
391
|
+
throw result;
|
|
313
392
|
}
|
|
314
393
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
315
394
|
const responseBody = await response.json();
|
|
316
395
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
317
|
-
return
|
|
396
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
397
|
+
...responseFields$,
|
|
398
|
+
...val$,
|
|
399
|
+
});
|
|
318
400
|
}, "Response validation failed");
|
|
319
|
-
|
|
401
|
+
throw result;
|
|
320
402
|
}
|
|
321
403
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
322
404
|
const responseBody = await response.json();
|
|
323
405
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
324
|
-
return
|
|
406
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
407
|
+
...responseFields$,
|
|
408
|
+
...val$,
|
|
409
|
+
});
|
|
325
410
|
}, "Response validation failed");
|
|
326
|
-
|
|
411
|
+
throw result;
|
|
327
412
|
}
|
|
328
413
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
329
414
|
const responseBody = await response.json();
|
|
330
415
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
331
|
-
return
|
|
416
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
417
|
+
...responseFields$,
|
|
418
|
+
...val$,
|
|
419
|
+
});
|
|
332
420
|
}, "Response validation failed");
|
|
333
|
-
|
|
421
|
+
throw result;
|
|
334
422
|
}
|
|
335
423
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
336
424
|
const responseBody = await response.json();
|
|
337
425
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
338
|
-
return
|
|
426
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
427
|
+
...responseFields$,
|
|
428
|
+
...val$,
|
|
429
|
+
});
|
|
339
430
|
}, "Response validation failed");
|
|
340
|
-
|
|
431
|
+
throw result;
|
|
341
432
|
}
|
|
342
433
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
343
434
|
const responseBody = await response.json();
|
|
344
435
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
345
|
-
return
|
|
436
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
437
|
+
...responseFields$,
|
|
438
|
+
...val$,
|
|
439
|
+
});
|
|
346
440
|
}, "Response validation failed");
|
|
347
|
-
|
|
441
|
+
throw result;
|
|
348
442
|
}
|
|
349
443
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
350
444
|
const responseBody = await response.json();
|
|
351
445
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
352
|
-
return
|
|
446
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
447
|
+
...responseFields$,
|
|
448
|
+
...val$,
|
|
449
|
+
});
|
|
353
450
|
}, "Response validation failed");
|
|
354
|
-
|
|
451
|
+
throw result;
|
|
355
452
|
}
|
|
356
453
|
else {
|
|
357
454
|
const responseBody = await response.text();
|
|
@@ -424,7 +521,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
424
521
|
securitySource: this.options$.token,
|
|
425
522
|
};
|
|
426
523
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
427
|
-
const doOptions = {
|
|
524
|
+
const doOptions = {
|
|
525
|
+
context,
|
|
526
|
+
errorCodes: [
|
|
527
|
+
"400",
|
|
528
|
+
"401",
|
|
529
|
+
"403",
|
|
530
|
+
"404",
|
|
531
|
+
"409",
|
|
532
|
+
"410",
|
|
533
|
+
"422",
|
|
534
|
+
"429",
|
|
535
|
+
"4XX",
|
|
536
|
+
"500",
|
|
537
|
+
"5XX",
|
|
538
|
+
],
|
|
539
|
+
};
|
|
428
540
|
const request = this.createRequest$({
|
|
429
541
|
security: securitySettings$,
|
|
430
542
|
method: "GET",
|
|
@@ -434,75 +546,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
434
546
|
body: body$,
|
|
435
547
|
}, options);
|
|
436
548
|
const response = await this.do$(request, doOptions);
|
|
549
|
+
const responseFields$ = {
|
|
550
|
+
HttpMeta: {
|
|
551
|
+
Response: response,
|
|
552
|
+
Request: request,
|
|
553
|
+
},
|
|
554
|
+
};
|
|
437
555
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
438
556
|
const responseBody = await response.json();
|
|
439
557
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
440
|
-
return
|
|
558
|
+
return z
|
|
559
|
+
.array(operations.GetCountryAnalyticsResponseBody$.inboundSchema)
|
|
560
|
+
.parse(val$);
|
|
441
561
|
}, "Response validation failed");
|
|
442
562
|
return result;
|
|
443
563
|
}
|
|
444
564
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
445
565
|
const responseBody = await response.json();
|
|
446
566
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
447
|
-
return
|
|
567
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
568
|
+
...responseFields$,
|
|
569
|
+
...val$,
|
|
570
|
+
});
|
|
448
571
|
}, "Response validation failed");
|
|
449
|
-
|
|
572
|
+
throw result;
|
|
450
573
|
}
|
|
451
574
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
452
575
|
const responseBody = await response.json();
|
|
453
576
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
454
|
-
return
|
|
577
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
578
|
+
...responseFields$,
|
|
579
|
+
...val$,
|
|
580
|
+
});
|
|
455
581
|
}, "Response validation failed");
|
|
456
|
-
|
|
582
|
+
throw result;
|
|
457
583
|
}
|
|
458
584
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
459
585
|
const responseBody = await response.json();
|
|
460
586
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
461
|
-
return
|
|
587
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
588
|
+
...responseFields$,
|
|
589
|
+
...val$,
|
|
590
|
+
});
|
|
462
591
|
}, "Response validation failed");
|
|
463
|
-
|
|
592
|
+
throw result;
|
|
464
593
|
}
|
|
465
594
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
466
595
|
const responseBody = await response.json();
|
|
467
596
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
468
|
-
return
|
|
597
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
598
|
+
...responseFields$,
|
|
599
|
+
...val$,
|
|
600
|
+
});
|
|
469
601
|
}, "Response validation failed");
|
|
470
|
-
|
|
602
|
+
throw result;
|
|
471
603
|
}
|
|
472
604
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
473
605
|
const responseBody = await response.json();
|
|
474
606
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
475
|
-
return
|
|
607
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
608
|
+
...responseFields$,
|
|
609
|
+
...val$,
|
|
610
|
+
});
|
|
476
611
|
}, "Response validation failed");
|
|
477
|
-
|
|
612
|
+
throw result;
|
|
478
613
|
}
|
|
479
614
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
480
615
|
const responseBody = await response.json();
|
|
481
616
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
482
|
-
return
|
|
617
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
618
|
+
...responseFields$,
|
|
619
|
+
...val$,
|
|
620
|
+
});
|
|
483
621
|
}, "Response validation failed");
|
|
484
|
-
|
|
622
|
+
throw result;
|
|
485
623
|
}
|
|
486
624
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
487
625
|
const responseBody = await response.json();
|
|
488
626
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
489
|
-
return
|
|
627
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
628
|
+
...responseFields$,
|
|
629
|
+
...val$,
|
|
630
|
+
});
|
|
490
631
|
}, "Response validation failed");
|
|
491
|
-
|
|
632
|
+
throw result;
|
|
492
633
|
}
|
|
493
634
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
494
635
|
const responseBody = await response.json();
|
|
495
636
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
496
|
-
return
|
|
637
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
638
|
+
...responseFields$,
|
|
639
|
+
...val$,
|
|
640
|
+
});
|
|
497
641
|
}, "Response validation failed");
|
|
498
|
-
|
|
642
|
+
throw result;
|
|
499
643
|
}
|
|
500
644
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
501
645
|
const responseBody = await response.json();
|
|
502
646
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
503
|
-
return
|
|
647
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
648
|
+
...responseFields$,
|
|
649
|
+
...val$,
|
|
650
|
+
});
|
|
504
651
|
}, "Response validation failed");
|
|
505
|
-
|
|
652
|
+
throw result;
|
|
506
653
|
}
|
|
507
654
|
else {
|
|
508
655
|
const responseBody = await response.text();
|
|
@@ -575,7 +722,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
575
722
|
securitySource: this.options$.token,
|
|
576
723
|
};
|
|
577
724
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
578
|
-
const doOptions = {
|
|
725
|
+
const doOptions = {
|
|
726
|
+
context,
|
|
727
|
+
errorCodes: [
|
|
728
|
+
"400",
|
|
729
|
+
"401",
|
|
730
|
+
"403",
|
|
731
|
+
"404",
|
|
732
|
+
"409",
|
|
733
|
+
"410",
|
|
734
|
+
"422",
|
|
735
|
+
"429",
|
|
736
|
+
"4XX",
|
|
737
|
+
"500",
|
|
738
|
+
"5XX",
|
|
739
|
+
],
|
|
740
|
+
};
|
|
579
741
|
const request = this.createRequest$({
|
|
580
742
|
security: securitySettings$,
|
|
581
743
|
method: "GET",
|
|
@@ -585,75 +747,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
585
747
|
body: body$,
|
|
586
748
|
}, options);
|
|
587
749
|
const response = await this.do$(request, doOptions);
|
|
750
|
+
const responseFields$ = {
|
|
751
|
+
HttpMeta: {
|
|
752
|
+
Response: response,
|
|
753
|
+
Request: request,
|
|
754
|
+
},
|
|
755
|
+
};
|
|
588
756
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
589
757
|
const responseBody = await response.json();
|
|
590
758
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
591
|
-
return
|
|
759
|
+
return z
|
|
760
|
+
.array(operations.GetCityAnalyticsResponseBody$.inboundSchema)
|
|
761
|
+
.parse(val$);
|
|
592
762
|
}, "Response validation failed");
|
|
593
763
|
return result;
|
|
594
764
|
}
|
|
595
765
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
596
766
|
const responseBody = await response.json();
|
|
597
767
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
598
|
-
return
|
|
768
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
769
|
+
...responseFields$,
|
|
770
|
+
...val$,
|
|
771
|
+
});
|
|
599
772
|
}, "Response validation failed");
|
|
600
|
-
|
|
773
|
+
throw result;
|
|
601
774
|
}
|
|
602
775
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
603
776
|
const responseBody = await response.json();
|
|
604
777
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
605
|
-
return
|
|
778
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
779
|
+
...responseFields$,
|
|
780
|
+
...val$,
|
|
781
|
+
});
|
|
606
782
|
}, "Response validation failed");
|
|
607
|
-
|
|
783
|
+
throw result;
|
|
608
784
|
}
|
|
609
785
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
610
786
|
const responseBody = await response.json();
|
|
611
787
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
612
|
-
return
|
|
788
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
789
|
+
...responseFields$,
|
|
790
|
+
...val$,
|
|
791
|
+
});
|
|
613
792
|
}, "Response validation failed");
|
|
614
|
-
|
|
793
|
+
throw result;
|
|
615
794
|
}
|
|
616
795
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
617
796
|
const responseBody = await response.json();
|
|
618
797
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
619
|
-
return
|
|
798
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
799
|
+
...responseFields$,
|
|
800
|
+
...val$,
|
|
801
|
+
});
|
|
620
802
|
}, "Response validation failed");
|
|
621
|
-
|
|
803
|
+
throw result;
|
|
622
804
|
}
|
|
623
805
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
624
806
|
const responseBody = await response.json();
|
|
625
807
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
626
|
-
return
|
|
808
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
809
|
+
...responseFields$,
|
|
810
|
+
...val$,
|
|
811
|
+
});
|
|
627
812
|
}, "Response validation failed");
|
|
628
|
-
|
|
813
|
+
throw result;
|
|
629
814
|
}
|
|
630
815
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
631
816
|
const responseBody = await response.json();
|
|
632
817
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
633
|
-
return
|
|
818
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
819
|
+
...responseFields$,
|
|
820
|
+
...val$,
|
|
821
|
+
});
|
|
634
822
|
}, "Response validation failed");
|
|
635
|
-
|
|
823
|
+
throw result;
|
|
636
824
|
}
|
|
637
825
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
638
826
|
const responseBody = await response.json();
|
|
639
827
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
640
|
-
return
|
|
828
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
829
|
+
...responseFields$,
|
|
830
|
+
...val$,
|
|
831
|
+
});
|
|
641
832
|
}, "Response validation failed");
|
|
642
|
-
|
|
833
|
+
throw result;
|
|
643
834
|
}
|
|
644
835
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
645
836
|
const responseBody = await response.json();
|
|
646
837
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
647
|
-
return
|
|
838
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
839
|
+
...responseFields$,
|
|
840
|
+
...val$,
|
|
841
|
+
});
|
|
648
842
|
}, "Response validation failed");
|
|
649
|
-
|
|
843
|
+
throw result;
|
|
650
844
|
}
|
|
651
845
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
652
846
|
const responseBody = await response.json();
|
|
653
847
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
654
|
-
return
|
|
848
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
849
|
+
...responseFields$,
|
|
850
|
+
...val$,
|
|
851
|
+
});
|
|
655
852
|
}, "Response validation failed");
|
|
656
|
-
|
|
853
|
+
throw result;
|
|
657
854
|
}
|
|
658
855
|
else {
|
|
659
856
|
const responseBody = await response.text();
|
|
@@ -726,7 +923,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
726
923
|
securitySource: this.options$.token,
|
|
727
924
|
};
|
|
728
925
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
729
|
-
const doOptions = {
|
|
926
|
+
const doOptions = {
|
|
927
|
+
context,
|
|
928
|
+
errorCodes: [
|
|
929
|
+
"400",
|
|
930
|
+
"401",
|
|
931
|
+
"403",
|
|
932
|
+
"404",
|
|
933
|
+
"409",
|
|
934
|
+
"410",
|
|
935
|
+
"422",
|
|
936
|
+
"429",
|
|
937
|
+
"4XX",
|
|
938
|
+
"500",
|
|
939
|
+
"5XX",
|
|
940
|
+
],
|
|
941
|
+
};
|
|
730
942
|
const request = this.createRequest$({
|
|
731
943
|
security: securitySettings$,
|
|
732
944
|
method: "GET",
|
|
@@ -736,75 +948,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
736
948
|
body: body$,
|
|
737
949
|
}, options);
|
|
738
950
|
const response = await this.do$(request, doOptions);
|
|
951
|
+
const responseFields$ = {
|
|
952
|
+
HttpMeta: {
|
|
953
|
+
Response: response,
|
|
954
|
+
Request: request,
|
|
955
|
+
},
|
|
956
|
+
};
|
|
739
957
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
740
958
|
const responseBody = await response.json();
|
|
741
959
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
742
|
-
return
|
|
960
|
+
return z
|
|
961
|
+
.array(operations.GetDeviceAnalyticsResponseBody$.inboundSchema)
|
|
962
|
+
.parse(val$);
|
|
743
963
|
}, "Response validation failed");
|
|
744
964
|
return result;
|
|
745
965
|
}
|
|
746
966
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
747
967
|
const responseBody = await response.json();
|
|
748
968
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
749
|
-
return
|
|
969
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
970
|
+
...responseFields$,
|
|
971
|
+
...val$,
|
|
972
|
+
});
|
|
750
973
|
}, "Response validation failed");
|
|
751
|
-
|
|
974
|
+
throw result;
|
|
752
975
|
}
|
|
753
976
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
754
977
|
const responseBody = await response.json();
|
|
755
978
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
756
|
-
return
|
|
979
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
980
|
+
...responseFields$,
|
|
981
|
+
...val$,
|
|
982
|
+
});
|
|
757
983
|
}, "Response validation failed");
|
|
758
|
-
|
|
984
|
+
throw result;
|
|
759
985
|
}
|
|
760
986
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
761
987
|
const responseBody = await response.json();
|
|
762
988
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
763
|
-
return
|
|
989
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
990
|
+
...responseFields$,
|
|
991
|
+
...val$,
|
|
992
|
+
});
|
|
764
993
|
}, "Response validation failed");
|
|
765
|
-
|
|
994
|
+
throw result;
|
|
766
995
|
}
|
|
767
996
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
768
997
|
const responseBody = await response.json();
|
|
769
998
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
770
|
-
return
|
|
999
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1000
|
+
...responseFields$,
|
|
1001
|
+
...val$,
|
|
1002
|
+
});
|
|
771
1003
|
}, "Response validation failed");
|
|
772
|
-
|
|
1004
|
+
throw result;
|
|
773
1005
|
}
|
|
774
1006
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
775
1007
|
const responseBody = await response.json();
|
|
776
1008
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
777
|
-
return
|
|
1009
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1010
|
+
...responseFields$,
|
|
1011
|
+
...val$,
|
|
1012
|
+
});
|
|
778
1013
|
}, "Response validation failed");
|
|
779
|
-
|
|
1014
|
+
throw result;
|
|
780
1015
|
}
|
|
781
1016
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
782
1017
|
const responseBody = await response.json();
|
|
783
1018
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
784
|
-
return
|
|
1019
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1020
|
+
...responseFields$,
|
|
1021
|
+
...val$,
|
|
1022
|
+
});
|
|
785
1023
|
}, "Response validation failed");
|
|
786
|
-
|
|
1024
|
+
throw result;
|
|
787
1025
|
}
|
|
788
1026
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
789
1027
|
const responseBody = await response.json();
|
|
790
1028
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
791
|
-
return
|
|
1029
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1030
|
+
...responseFields$,
|
|
1031
|
+
...val$,
|
|
1032
|
+
});
|
|
792
1033
|
}, "Response validation failed");
|
|
793
|
-
|
|
1034
|
+
throw result;
|
|
794
1035
|
}
|
|
795
1036
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
796
1037
|
const responseBody = await response.json();
|
|
797
1038
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
798
|
-
return
|
|
1039
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1040
|
+
...responseFields$,
|
|
1041
|
+
...val$,
|
|
1042
|
+
});
|
|
799
1043
|
}, "Response validation failed");
|
|
800
|
-
|
|
1044
|
+
throw result;
|
|
801
1045
|
}
|
|
802
1046
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
803
1047
|
const responseBody = await response.json();
|
|
804
1048
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
805
|
-
return
|
|
1049
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1050
|
+
...responseFields$,
|
|
1051
|
+
...val$,
|
|
1052
|
+
});
|
|
806
1053
|
}, "Response validation failed");
|
|
807
|
-
|
|
1054
|
+
throw result;
|
|
808
1055
|
}
|
|
809
1056
|
else {
|
|
810
1057
|
const responseBody = await response.text();
|
|
@@ -877,7 +1124,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
877
1124
|
securitySource: this.options$.token,
|
|
878
1125
|
};
|
|
879
1126
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
880
|
-
const doOptions = {
|
|
1127
|
+
const doOptions = {
|
|
1128
|
+
context,
|
|
1129
|
+
errorCodes: [
|
|
1130
|
+
"400",
|
|
1131
|
+
"401",
|
|
1132
|
+
"403",
|
|
1133
|
+
"404",
|
|
1134
|
+
"409",
|
|
1135
|
+
"410",
|
|
1136
|
+
"422",
|
|
1137
|
+
"429",
|
|
1138
|
+
"4XX",
|
|
1139
|
+
"500",
|
|
1140
|
+
"5XX",
|
|
1141
|
+
],
|
|
1142
|
+
};
|
|
881
1143
|
const request = this.createRequest$({
|
|
882
1144
|
security: securitySettings$,
|
|
883
1145
|
method: "GET",
|
|
@@ -887,75 +1149,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
887
1149
|
body: body$,
|
|
888
1150
|
}, options);
|
|
889
1151
|
const response = await this.do$(request, doOptions);
|
|
1152
|
+
const responseFields$ = {
|
|
1153
|
+
HttpMeta: {
|
|
1154
|
+
Response: response,
|
|
1155
|
+
Request: request,
|
|
1156
|
+
},
|
|
1157
|
+
};
|
|
890
1158
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
891
1159
|
const responseBody = await response.json();
|
|
892
1160
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
893
|
-
return
|
|
1161
|
+
return z
|
|
1162
|
+
.array(operations.GetBrowserAnalyticsResponseBody$.inboundSchema)
|
|
1163
|
+
.parse(val$);
|
|
894
1164
|
}, "Response validation failed");
|
|
895
1165
|
return result;
|
|
896
1166
|
}
|
|
897
1167
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
898
1168
|
const responseBody = await response.json();
|
|
899
1169
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
900
|
-
return
|
|
1170
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1171
|
+
...responseFields$,
|
|
1172
|
+
...val$,
|
|
1173
|
+
});
|
|
901
1174
|
}, "Response validation failed");
|
|
902
|
-
|
|
1175
|
+
throw result;
|
|
903
1176
|
}
|
|
904
1177
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
905
1178
|
const responseBody = await response.json();
|
|
906
1179
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
907
|
-
return
|
|
1180
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1181
|
+
...responseFields$,
|
|
1182
|
+
...val$,
|
|
1183
|
+
});
|
|
908
1184
|
}, "Response validation failed");
|
|
909
|
-
|
|
1185
|
+
throw result;
|
|
910
1186
|
}
|
|
911
1187
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
912
1188
|
const responseBody = await response.json();
|
|
913
1189
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
914
|
-
return
|
|
1190
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1191
|
+
...responseFields$,
|
|
1192
|
+
...val$,
|
|
1193
|
+
});
|
|
915
1194
|
}, "Response validation failed");
|
|
916
|
-
|
|
1195
|
+
throw result;
|
|
917
1196
|
}
|
|
918
1197
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
919
1198
|
const responseBody = await response.json();
|
|
920
1199
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
921
|
-
return
|
|
1200
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1201
|
+
...responseFields$,
|
|
1202
|
+
...val$,
|
|
1203
|
+
});
|
|
922
1204
|
}, "Response validation failed");
|
|
923
|
-
|
|
1205
|
+
throw result;
|
|
924
1206
|
}
|
|
925
1207
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
926
1208
|
const responseBody = await response.json();
|
|
927
1209
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
928
|
-
return
|
|
1210
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1211
|
+
...responseFields$,
|
|
1212
|
+
...val$,
|
|
1213
|
+
});
|
|
929
1214
|
}, "Response validation failed");
|
|
930
|
-
|
|
1215
|
+
throw result;
|
|
931
1216
|
}
|
|
932
1217
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
933
1218
|
const responseBody = await response.json();
|
|
934
1219
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
935
|
-
return
|
|
1220
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1221
|
+
...responseFields$,
|
|
1222
|
+
...val$,
|
|
1223
|
+
});
|
|
936
1224
|
}, "Response validation failed");
|
|
937
|
-
|
|
1225
|
+
throw result;
|
|
938
1226
|
}
|
|
939
1227
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
940
1228
|
const responseBody = await response.json();
|
|
941
1229
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
942
|
-
return
|
|
1230
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1231
|
+
...responseFields$,
|
|
1232
|
+
...val$,
|
|
1233
|
+
});
|
|
943
1234
|
}, "Response validation failed");
|
|
944
|
-
|
|
1235
|
+
throw result;
|
|
945
1236
|
}
|
|
946
1237
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
947
1238
|
const responseBody = await response.json();
|
|
948
1239
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
949
|
-
return
|
|
1240
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1241
|
+
...responseFields$,
|
|
1242
|
+
...val$,
|
|
1243
|
+
});
|
|
950
1244
|
}, "Response validation failed");
|
|
951
|
-
|
|
1245
|
+
throw result;
|
|
952
1246
|
}
|
|
953
1247
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
954
1248
|
const responseBody = await response.json();
|
|
955
1249
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
956
|
-
return
|
|
1250
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1251
|
+
...responseFields$,
|
|
1252
|
+
...val$,
|
|
1253
|
+
});
|
|
957
1254
|
}, "Response validation failed");
|
|
958
|
-
|
|
1255
|
+
throw result;
|
|
959
1256
|
}
|
|
960
1257
|
else {
|
|
961
1258
|
const responseBody = await response.text();
|
|
@@ -1028,7 +1325,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1028
1325
|
securitySource: this.options$.token,
|
|
1029
1326
|
};
|
|
1030
1327
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1031
|
-
const doOptions = {
|
|
1328
|
+
const doOptions = {
|
|
1329
|
+
context,
|
|
1330
|
+
errorCodes: [
|
|
1331
|
+
"400",
|
|
1332
|
+
"401",
|
|
1333
|
+
"403",
|
|
1334
|
+
"404",
|
|
1335
|
+
"409",
|
|
1336
|
+
"410",
|
|
1337
|
+
"422",
|
|
1338
|
+
"429",
|
|
1339
|
+
"4XX",
|
|
1340
|
+
"500",
|
|
1341
|
+
"5XX",
|
|
1342
|
+
],
|
|
1343
|
+
};
|
|
1032
1344
|
const request = this.createRequest$({
|
|
1033
1345
|
security: securitySettings$,
|
|
1034
1346
|
method: "GET",
|
|
@@ -1038,75 +1350,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1038
1350
|
body: body$,
|
|
1039
1351
|
}, options);
|
|
1040
1352
|
const response = await this.do$(request, doOptions);
|
|
1353
|
+
const responseFields$ = {
|
|
1354
|
+
HttpMeta: {
|
|
1355
|
+
Response: response,
|
|
1356
|
+
Request: request,
|
|
1357
|
+
},
|
|
1358
|
+
};
|
|
1041
1359
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1042
1360
|
const responseBody = await response.json();
|
|
1043
1361
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1044
|
-
return
|
|
1362
|
+
return z
|
|
1363
|
+
.array(operations.GetOSAnalyticsResponseBody$.inboundSchema)
|
|
1364
|
+
.parse(val$);
|
|
1045
1365
|
}, "Response validation failed");
|
|
1046
1366
|
return result;
|
|
1047
1367
|
}
|
|
1048
1368
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
1049
1369
|
const responseBody = await response.json();
|
|
1050
1370
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1051
|
-
return
|
|
1371
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1372
|
+
...responseFields$,
|
|
1373
|
+
...val$,
|
|
1374
|
+
});
|
|
1052
1375
|
}, "Response validation failed");
|
|
1053
|
-
|
|
1376
|
+
throw result;
|
|
1054
1377
|
}
|
|
1055
1378
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
1056
1379
|
const responseBody = await response.json();
|
|
1057
1380
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1058
|
-
return
|
|
1381
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1382
|
+
...responseFields$,
|
|
1383
|
+
...val$,
|
|
1384
|
+
});
|
|
1059
1385
|
}, "Response validation failed");
|
|
1060
|
-
|
|
1386
|
+
throw result;
|
|
1061
1387
|
}
|
|
1062
1388
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
1063
1389
|
const responseBody = await response.json();
|
|
1064
1390
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1065
|
-
return
|
|
1391
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1392
|
+
...responseFields$,
|
|
1393
|
+
...val$,
|
|
1394
|
+
});
|
|
1066
1395
|
}, "Response validation failed");
|
|
1067
|
-
|
|
1396
|
+
throw result;
|
|
1068
1397
|
}
|
|
1069
1398
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
1070
1399
|
const responseBody = await response.json();
|
|
1071
1400
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1072
|
-
return
|
|
1401
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1402
|
+
...responseFields$,
|
|
1403
|
+
...val$,
|
|
1404
|
+
});
|
|
1073
1405
|
}, "Response validation failed");
|
|
1074
|
-
|
|
1406
|
+
throw result;
|
|
1075
1407
|
}
|
|
1076
1408
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
1077
1409
|
const responseBody = await response.json();
|
|
1078
1410
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1079
|
-
return
|
|
1411
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1412
|
+
...responseFields$,
|
|
1413
|
+
...val$,
|
|
1414
|
+
});
|
|
1080
1415
|
}, "Response validation failed");
|
|
1081
|
-
|
|
1416
|
+
throw result;
|
|
1082
1417
|
}
|
|
1083
1418
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
1084
1419
|
const responseBody = await response.json();
|
|
1085
1420
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1086
|
-
return
|
|
1421
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1422
|
+
...responseFields$,
|
|
1423
|
+
...val$,
|
|
1424
|
+
});
|
|
1087
1425
|
}, "Response validation failed");
|
|
1088
|
-
|
|
1426
|
+
throw result;
|
|
1089
1427
|
}
|
|
1090
1428
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
1091
1429
|
const responseBody = await response.json();
|
|
1092
1430
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1093
|
-
return
|
|
1431
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1432
|
+
...responseFields$,
|
|
1433
|
+
...val$,
|
|
1434
|
+
});
|
|
1094
1435
|
}, "Response validation failed");
|
|
1095
|
-
|
|
1436
|
+
throw result;
|
|
1096
1437
|
}
|
|
1097
1438
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
1098
1439
|
const responseBody = await response.json();
|
|
1099
1440
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1100
|
-
return
|
|
1441
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1442
|
+
...responseFields$,
|
|
1443
|
+
...val$,
|
|
1444
|
+
});
|
|
1101
1445
|
}, "Response validation failed");
|
|
1102
|
-
|
|
1446
|
+
throw result;
|
|
1103
1447
|
}
|
|
1104
1448
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
1105
1449
|
const responseBody = await response.json();
|
|
1106
1450
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1107
|
-
return
|
|
1451
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1452
|
+
...responseFields$,
|
|
1453
|
+
...val$,
|
|
1454
|
+
});
|
|
1108
1455
|
}, "Response validation failed");
|
|
1109
|
-
|
|
1456
|
+
throw result;
|
|
1110
1457
|
}
|
|
1111
1458
|
else {
|
|
1112
1459
|
const responseBody = await response.text();
|
|
@@ -1179,7 +1526,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1179
1526
|
securitySource: this.options$.token,
|
|
1180
1527
|
};
|
|
1181
1528
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1182
|
-
const doOptions = {
|
|
1529
|
+
const doOptions = {
|
|
1530
|
+
context,
|
|
1531
|
+
errorCodes: [
|
|
1532
|
+
"400",
|
|
1533
|
+
"401",
|
|
1534
|
+
"403",
|
|
1535
|
+
"404",
|
|
1536
|
+
"409",
|
|
1537
|
+
"410",
|
|
1538
|
+
"422",
|
|
1539
|
+
"429",
|
|
1540
|
+
"4XX",
|
|
1541
|
+
"500",
|
|
1542
|
+
"5XX",
|
|
1543
|
+
],
|
|
1544
|
+
};
|
|
1183
1545
|
const request = this.createRequest$({
|
|
1184
1546
|
security: securitySettings$,
|
|
1185
1547
|
method: "GET",
|
|
@@ -1189,75 +1551,110 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1189
1551
|
body: body$,
|
|
1190
1552
|
}, options);
|
|
1191
1553
|
const response = await this.do$(request, doOptions);
|
|
1554
|
+
const responseFields$ = {
|
|
1555
|
+
HttpMeta: {
|
|
1556
|
+
Response: response,
|
|
1557
|
+
Request: request,
|
|
1558
|
+
},
|
|
1559
|
+
};
|
|
1192
1560
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1193
1561
|
const responseBody = await response.json();
|
|
1194
1562
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1195
|
-
return
|
|
1563
|
+
return z
|
|
1564
|
+
.array(operations.GetRefererAnalyticsResponseBody$.inboundSchema)
|
|
1565
|
+
.parse(val$);
|
|
1196
1566
|
}, "Response validation failed");
|
|
1197
1567
|
return result;
|
|
1198
1568
|
}
|
|
1199
1569
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
1200
1570
|
const responseBody = await response.json();
|
|
1201
1571
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1202
|
-
return
|
|
1572
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1573
|
+
...responseFields$,
|
|
1574
|
+
...val$,
|
|
1575
|
+
});
|
|
1203
1576
|
}, "Response validation failed");
|
|
1204
|
-
|
|
1577
|
+
throw result;
|
|
1205
1578
|
}
|
|
1206
1579
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
1207
1580
|
const responseBody = await response.json();
|
|
1208
1581
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1209
|
-
return
|
|
1582
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1583
|
+
...responseFields$,
|
|
1584
|
+
...val$,
|
|
1585
|
+
});
|
|
1210
1586
|
}, "Response validation failed");
|
|
1211
|
-
|
|
1587
|
+
throw result;
|
|
1212
1588
|
}
|
|
1213
1589
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
1214
1590
|
const responseBody = await response.json();
|
|
1215
1591
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1216
|
-
return
|
|
1592
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1593
|
+
...responseFields$,
|
|
1594
|
+
...val$,
|
|
1595
|
+
});
|
|
1217
1596
|
}, "Response validation failed");
|
|
1218
|
-
|
|
1597
|
+
throw result;
|
|
1219
1598
|
}
|
|
1220
1599
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
1221
1600
|
const responseBody = await response.json();
|
|
1222
1601
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1223
|
-
return
|
|
1602
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1603
|
+
...responseFields$,
|
|
1604
|
+
...val$,
|
|
1605
|
+
});
|
|
1224
1606
|
}, "Response validation failed");
|
|
1225
|
-
|
|
1607
|
+
throw result;
|
|
1226
1608
|
}
|
|
1227
1609
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
1228
1610
|
const responseBody = await response.json();
|
|
1229
1611
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1230
|
-
return
|
|
1612
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1613
|
+
...responseFields$,
|
|
1614
|
+
...val$,
|
|
1615
|
+
});
|
|
1231
1616
|
}, "Response validation failed");
|
|
1232
|
-
|
|
1617
|
+
throw result;
|
|
1233
1618
|
}
|
|
1234
1619
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
1235
1620
|
const responseBody = await response.json();
|
|
1236
1621
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1237
|
-
return
|
|
1622
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1623
|
+
...responseFields$,
|
|
1624
|
+
...val$,
|
|
1625
|
+
});
|
|
1238
1626
|
}, "Response validation failed");
|
|
1239
|
-
|
|
1627
|
+
throw result;
|
|
1240
1628
|
}
|
|
1241
1629
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
1242
1630
|
const responseBody = await response.json();
|
|
1243
1631
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1244
|
-
return
|
|
1632
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1633
|
+
...responseFields$,
|
|
1634
|
+
...val$,
|
|
1635
|
+
});
|
|
1245
1636
|
}, "Response validation failed");
|
|
1246
|
-
|
|
1637
|
+
throw result;
|
|
1247
1638
|
}
|
|
1248
1639
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
1249
1640
|
const responseBody = await response.json();
|
|
1250
1641
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1251
|
-
return
|
|
1642
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1643
|
+
...responseFields$,
|
|
1644
|
+
...val$,
|
|
1645
|
+
});
|
|
1252
1646
|
}, "Response validation failed");
|
|
1253
|
-
|
|
1647
|
+
throw result;
|
|
1254
1648
|
}
|
|
1255
1649
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
1256
1650
|
const responseBody = await response.json();
|
|
1257
1651
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1258
|
-
return
|
|
1652
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1653
|
+
...responseFields$,
|
|
1654
|
+
...val$,
|
|
1655
|
+
});
|
|
1259
1656
|
}, "Response validation failed");
|
|
1260
|
-
|
|
1657
|
+
throw result;
|
|
1261
1658
|
}
|
|
1262
1659
|
else {
|
|
1263
1660
|
const responseBody = await response.text();
|
|
@@ -1330,7 +1727,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1330
1727
|
securitySource: this.options$.token,
|
|
1331
1728
|
};
|
|
1332
1729
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1333
|
-
const doOptions = {
|
|
1730
|
+
const doOptions = {
|
|
1731
|
+
context,
|
|
1732
|
+
errorCodes: [
|
|
1733
|
+
"400",
|
|
1734
|
+
"401",
|
|
1735
|
+
"403",
|
|
1736
|
+
"404",
|
|
1737
|
+
"409",
|
|
1738
|
+
"410",
|
|
1739
|
+
"422",
|
|
1740
|
+
"429",
|
|
1741
|
+
"4XX",
|
|
1742
|
+
"500",
|
|
1743
|
+
"5XX",
|
|
1744
|
+
],
|
|
1745
|
+
};
|
|
1334
1746
|
const request = this.createRequest$({
|
|
1335
1747
|
security: securitySettings$,
|
|
1336
1748
|
method: "GET",
|
|
@@ -1340,75 +1752,108 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1340
1752
|
body: body$,
|
|
1341
1753
|
}, options);
|
|
1342
1754
|
const response = await this.do$(request, doOptions);
|
|
1755
|
+
const responseFields$ = {
|
|
1756
|
+
HttpMeta: {
|
|
1757
|
+
Response: response,
|
|
1758
|
+
Request: request,
|
|
1759
|
+
},
|
|
1760
|
+
};
|
|
1343
1761
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1344
1762
|
const responseBody = await response.json();
|
|
1345
1763
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1346
|
-
return operations.
|
|
1764
|
+
return z.array(operations.GetTopLinksResponseBody$.inboundSchema).parse(val$);
|
|
1347
1765
|
}, "Response validation failed");
|
|
1348
1766
|
return result;
|
|
1349
1767
|
}
|
|
1350
1768
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
1351
1769
|
const responseBody = await response.json();
|
|
1352
1770
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1353
|
-
return
|
|
1771
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1772
|
+
...responseFields$,
|
|
1773
|
+
...val$,
|
|
1774
|
+
});
|
|
1354
1775
|
}, "Response validation failed");
|
|
1355
|
-
|
|
1776
|
+
throw result;
|
|
1356
1777
|
}
|
|
1357
1778
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
1358
1779
|
const responseBody = await response.json();
|
|
1359
1780
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1360
|
-
return
|
|
1781
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1782
|
+
...responseFields$,
|
|
1783
|
+
...val$,
|
|
1784
|
+
});
|
|
1361
1785
|
}, "Response validation failed");
|
|
1362
|
-
|
|
1786
|
+
throw result;
|
|
1363
1787
|
}
|
|
1364
1788
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
1365
1789
|
const responseBody = await response.json();
|
|
1366
1790
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1367
|
-
return
|
|
1791
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1792
|
+
...responseFields$,
|
|
1793
|
+
...val$,
|
|
1794
|
+
});
|
|
1368
1795
|
}, "Response validation failed");
|
|
1369
|
-
|
|
1796
|
+
throw result;
|
|
1370
1797
|
}
|
|
1371
1798
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
1372
1799
|
const responseBody = await response.json();
|
|
1373
1800
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1374
|
-
return
|
|
1801
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1802
|
+
...responseFields$,
|
|
1803
|
+
...val$,
|
|
1804
|
+
});
|
|
1375
1805
|
}, "Response validation failed");
|
|
1376
|
-
|
|
1806
|
+
throw result;
|
|
1377
1807
|
}
|
|
1378
1808
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
1379
1809
|
const responseBody = await response.json();
|
|
1380
1810
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1381
|
-
return
|
|
1811
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1812
|
+
...responseFields$,
|
|
1813
|
+
...val$,
|
|
1814
|
+
});
|
|
1382
1815
|
}, "Response validation failed");
|
|
1383
|
-
|
|
1816
|
+
throw result;
|
|
1384
1817
|
}
|
|
1385
1818
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
1386
1819
|
const responseBody = await response.json();
|
|
1387
1820
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1388
|
-
return
|
|
1821
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1822
|
+
...responseFields$,
|
|
1823
|
+
...val$,
|
|
1824
|
+
});
|
|
1389
1825
|
}, "Response validation failed");
|
|
1390
|
-
|
|
1826
|
+
throw result;
|
|
1391
1827
|
}
|
|
1392
1828
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
1393
1829
|
const responseBody = await response.json();
|
|
1394
1830
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1395
|
-
return
|
|
1831
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1832
|
+
...responseFields$,
|
|
1833
|
+
...val$,
|
|
1834
|
+
});
|
|
1396
1835
|
}, "Response validation failed");
|
|
1397
|
-
|
|
1836
|
+
throw result;
|
|
1398
1837
|
}
|
|
1399
1838
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
1400
1839
|
const responseBody = await response.json();
|
|
1401
1840
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1402
|
-
return
|
|
1841
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1842
|
+
...responseFields$,
|
|
1843
|
+
...val$,
|
|
1844
|
+
});
|
|
1403
1845
|
}, "Response validation failed");
|
|
1404
|
-
|
|
1846
|
+
throw result;
|
|
1405
1847
|
}
|
|
1406
1848
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
1407
1849
|
const responseBody = await response.json();
|
|
1408
1850
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1409
|
-
return
|
|
1851
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1852
|
+
...responseFields$,
|
|
1853
|
+
...val$,
|
|
1854
|
+
});
|
|
1410
1855
|
}, "Response validation failed");
|
|
1411
|
-
|
|
1856
|
+
throw result;
|
|
1412
1857
|
}
|
|
1413
1858
|
else {
|
|
1414
1859
|
const responseBody = await response.text();
|
|
@@ -1481,7 +1926,22 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1481
1926
|
securitySource: this.options$.token,
|
|
1482
1927
|
};
|
|
1483
1928
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
1484
|
-
const doOptions = {
|
|
1929
|
+
const doOptions = {
|
|
1930
|
+
context,
|
|
1931
|
+
errorCodes: [
|
|
1932
|
+
"400",
|
|
1933
|
+
"401",
|
|
1934
|
+
"403",
|
|
1935
|
+
"404",
|
|
1936
|
+
"409",
|
|
1937
|
+
"410",
|
|
1938
|
+
"422",
|
|
1939
|
+
"429",
|
|
1940
|
+
"4XX",
|
|
1941
|
+
"500",
|
|
1942
|
+
"5XX",
|
|
1943
|
+
],
|
|
1944
|
+
};
|
|
1485
1945
|
const request = this.createRequest$({
|
|
1486
1946
|
security: securitySettings$,
|
|
1487
1947
|
method: "GET",
|
|
@@ -1491,75 +1951,108 @@ class Analytics extends sdks_1.ClientSDK {
|
|
|
1491
1951
|
body: body$,
|
|
1492
1952
|
}, options);
|
|
1493
1953
|
const response = await this.do$(request, doOptions);
|
|
1954
|
+
const responseFields$ = {
|
|
1955
|
+
HttpMeta: {
|
|
1956
|
+
Response: response,
|
|
1957
|
+
Request: request,
|
|
1958
|
+
},
|
|
1959
|
+
};
|
|
1494
1960
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
1495
1961
|
const responseBody = await response.json();
|
|
1496
1962
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1497
|
-
return operations.
|
|
1963
|
+
return z.array(operations.GetTopURLsResponseBody$.inboundSchema).parse(val$);
|
|
1498
1964
|
}, "Response validation failed");
|
|
1499
1965
|
return result;
|
|
1500
1966
|
}
|
|
1501
1967
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
1502
1968
|
const responseBody = await response.json();
|
|
1503
1969
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1504
|
-
return
|
|
1970
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1971
|
+
...responseFields$,
|
|
1972
|
+
...val$,
|
|
1973
|
+
});
|
|
1505
1974
|
}, "Response validation failed");
|
|
1506
|
-
|
|
1975
|
+
throw result;
|
|
1507
1976
|
}
|
|
1508
1977
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
1509
1978
|
const responseBody = await response.json();
|
|
1510
1979
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1511
|
-
return
|
|
1980
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1981
|
+
...responseFields$,
|
|
1982
|
+
...val$,
|
|
1983
|
+
});
|
|
1512
1984
|
}, "Response validation failed");
|
|
1513
|
-
|
|
1985
|
+
throw result;
|
|
1514
1986
|
}
|
|
1515
1987
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
1516
1988
|
const responseBody = await response.json();
|
|
1517
1989
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1518
|
-
return
|
|
1990
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1991
|
+
...responseFields$,
|
|
1992
|
+
...val$,
|
|
1993
|
+
});
|
|
1519
1994
|
}, "Response validation failed");
|
|
1520
|
-
|
|
1995
|
+
throw result;
|
|
1521
1996
|
}
|
|
1522
1997
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
1523
1998
|
const responseBody = await response.json();
|
|
1524
1999
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1525
|
-
return
|
|
2000
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
2001
|
+
...responseFields$,
|
|
2002
|
+
...val$,
|
|
2003
|
+
});
|
|
1526
2004
|
}, "Response validation failed");
|
|
1527
|
-
|
|
2005
|
+
throw result;
|
|
1528
2006
|
}
|
|
1529
2007
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
1530
2008
|
const responseBody = await response.json();
|
|
1531
2009
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1532
|
-
return
|
|
2010
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
2011
|
+
...responseFields$,
|
|
2012
|
+
...val$,
|
|
2013
|
+
});
|
|
1533
2014
|
}, "Response validation failed");
|
|
1534
|
-
|
|
2015
|
+
throw result;
|
|
1535
2016
|
}
|
|
1536
2017
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
1537
2018
|
const responseBody = await response.json();
|
|
1538
2019
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1539
|
-
return
|
|
2020
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
2021
|
+
...responseFields$,
|
|
2022
|
+
...val$,
|
|
2023
|
+
});
|
|
1540
2024
|
}, "Response validation failed");
|
|
1541
|
-
|
|
2025
|
+
throw result;
|
|
1542
2026
|
}
|
|
1543
2027
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
1544
2028
|
const responseBody = await response.json();
|
|
1545
2029
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1546
|
-
return
|
|
2030
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
2031
|
+
...responseFields$,
|
|
2032
|
+
...val$,
|
|
2033
|
+
});
|
|
1547
2034
|
}, "Response validation failed");
|
|
1548
|
-
|
|
2035
|
+
throw result;
|
|
1549
2036
|
}
|
|
1550
2037
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
1551
2038
|
const responseBody = await response.json();
|
|
1552
2039
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1553
|
-
return
|
|
2040
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
2041
|
+
...responseFields$,
|
|
2042
|
+
...val$,
|
|
2043
|
+
});
|
|
1554
2044
|
}, "Response validation failed");
|
|
1555
|
-
|
|
2045
|
+
throw result;
|
|
1556
2046
|
}
|
|
1557
2047
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
1558
2048
|
const responseBody = await response.json();
|
|
1559
2049
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
1560
|
-
return
|
|
2050
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
2051
|
+
...responseFields$,
|
|
2052
|
+
...val$,
|
|
2053
|
+
});
|
|
1561
2054
|
}, "Response validation failed");
|
|
1562
|
-
|
|
2055
|
+
throw result;
|
|
1563
2056
|
}
|
|
1564
2057
|
else {
|
|
1565
2058
|
const responseBody = await response.text();
|