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/links.js
CHANGED
|
@@ -33,6 +33,7 @@ const enc$ = __importStar(require("../lib/encodings"));
|
|
|
33
33
|
const http_1 = require("../lib/http");
|
|
34
34
|
const schemas$ = __importStar(require("../lib/schemas"));
|
|
35
35
|
const sdks_1 = require("../lib/sdks");
|
|
36
|
+
const components = __importStar(require("../models/components"));
|
|
36
37
|
const errors = __importStar(require("../models/errors"));
|
|
37
38
|
const operations = __importStar(require("../models/operations"));
|
|
38
39
|
const z = __importStar(require("zod"));
|
|
@@ -85,6 +86,10 @@ class Links extends sdks_1.ClientSDK {
|
|
|
85
86
|
enc$.encodeForm("sort", payload$.sort, { explode: true, charEncoding: "percent" }),
|
|
86
87
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
87
88
|
enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
|
|
89
|
+
enc$.encodeForm("tagNames", payload$.tagNames, {
|
|
90
|
+
explode: true,
|
|
91
|
+
charEncoding: "percent",
|
|
92
|
+
}),
|
|
88
93
|
enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
|
|
89
94
|
enc$.encodeForm("withTags", payload$.withTags, {
|
|
90
95
|
explode: true,
|
|
@@ -113,7 +118,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
113
118
|
securitySource: this.options$.token,
|
|
114
119
|
};
|
|
115
120
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
116
|
-
const doOptions = {
|
|
121
|
+
const doOptions = {
|
|
122
|
+
context,
|
|
123
|
+
errorCodes: [
|
|
124
|
+
"400",
|
|
125
|
+
"401",
|
|
126
|
+
"403",
|
|
127
|
+
"404",
|
|
128
|
+
"409",
|
|
129
|
+
"410",
|
|
130
|
+
"422",
|
|
131
|
+
"429",
|
|
132
|
+
"4XX",
|
|
133
|
+
"500",
|
|
134
|
+
"5XX",
|
|
135
|
+
],
|
|
136
|
+
};
|
|
117
137
|
const request = this.createRequest$({
|
|
118
138
|
security: securitySettings$,
|
|
119
139
|
method: "GET",
|
|
@@ -123,75 +143,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
123
143
|
body: body$,
|
|
124
144
|
}, options);
|
|
125
145
|
const response = await this.do$(request, doOptions);
|
|
146
|
+
const responseFields$ = {
|
|
147
|
+
HttpMeta: {
|
|
148
|
+
Response: response,
|
|
149
|
+
Request: request,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
126
152
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
127
153
|
const responseBody = await response.json();
|
|
128
154
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
129
|
-
return
|
|
155
|
+
return z.array(components.LinkSchema$.inboundSchema).parse(val$);
|
|
130
156
|
}, "Response validation failed");
|
|
131
157
|
return result;
|
|
132
158
|
}
|
|
133
159
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
134
160
|
const responseBody = await response.json();
|
|
135
161
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
136
|
-
return
|
|
162
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
163
|
+
...responseFields$,
|
|
164
|
+
...val$,
|
|
165
|
+
});
|
|
137
166
|
}, "Response validation failed");
|
|
138
|
-
|
|
167
|
+
throw result;
|
|
139
168
|
}
|
|
140
169
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
141
170
|
const responseBody = await response.json();
|
|
142
171
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
143
|
-
return
|
|
172
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
173
|
+
...responseFields$,
|
|
174
|
+
...val$,
|
|
175
|
+
});
|
|
144
176
|
}, "Response validation failed");
|
|
145
|
-
|
|
177
|
+
throw result;
|
|
146
178
|
}
|
|
147
179
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
148
180
|
const responseBody = await response.json();
|
|
149
181
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
150
|
-
return
|
|
182
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
183
|
+
...responseFields$,
|
|
184
|
+
...val$,
|
|
185
|
+
});
|
|
151
186
|
}, "Response validation failed");
|
|
152
|
-
|
|
187
|
+
throw result;
|
|
153
188
|
}
|
|
154
189
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
155
190
|
const responseBody = await response.json();
|
|
156
191
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
157
|
-
return
|
|
192
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
193
|
+
...responseFields$,
|
|
194
|
+
...val$,
|
|
195
|
+
});
|
|
158
196
|
}, "Response validation failed");
|
|
159
|
-
|
|
197
|
+
throw result;
|
|
160
198
|
}
|
|
161
199
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
162
200
|
const responseBody = await response.json();
|
|
163
201
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
164
|
-
return
|
|
202
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
203
|
+
...responseFields$,
|
|
204
|
+
...val$,
|
|
205
|
+
});
|
|
165
206
|
}, "Response validation failed");
|
|
166
|
-
|
|
207
|
+
throw result;
|
|
167
208
|
}
|
|
168
209
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
169
210
|
const responseBody = await response.json();
|
|
170
211
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
171
|
-
return
|
|
212
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
213
|
+
...responseFields$,
|
|
214
|
+
...val$,
|
|
215
|
+
});
|
|
172
216
|
}, "Response validation failed");
|
|
173
|
-
|
|
217
|
+
throw result;
|
|
174
218
|
}
|
|
175
219
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
176
220
|
const responseBody = await response.json();
|
|
177
221
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
178
|
-
return
|
|
222
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
223
|
+
...responseFields$,
|
|
224
|
+
...val$,
|
|
225
|
+
});
|
|
179
226
|
}, "Response validation failed");
|
|
180
|
-
|
|
227
|
+
throw result;
|
|
181
228
|
}
|
|
182
229
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
183
230
|
const responseBody = await response.json();
|
|
184
231
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
185
|
-
return
|
|
232
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
233
|
+
...responseFields$,
|
|
234
|
+
...val$,
|
|
235
|
+
});
|
|
186
236
|
}, "Response validation failed");
|
|
187
|
-
|
|
237
|
+
throw result;
|
|
188
238
|
}
|
|
189
239
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
190
240
|
const responseBody = await response.json();
|
|
191
241
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
192
|
-
return
|
|
242
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
243
|
+
...responseFields$,
|
|
244
|
+
...val$,
|
|
245
|
+
});
|
|
193
246
|
}, "Response validation failed");
|
|
194
|
-
|
|
247
|
+
throw result;
|
|
195
248
|
}
|
|
196
249
|
else {
|
|
197
250
|
const responseBody = await response.text();
|
|
@@ -240,7 +293,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
240
293
|
securitySource: this.options$.token,
|
|
241
294
|
};
|
|
242
295
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
243
|
-
const doOptions = {
|
|
296
|
+
const doOptions = {
|
|
297
|
+
context,
|
|
298
|
+
errorCodes: [
|
|
299
|
+
"400",
|
|
300
|
+
"401",
|
|
301
|
+
"403",
|
|
302
|
+
"404",
|
|
303
|
+
"409",
|
|
304
|
+
"410",
|
|
305
|
+
"422",
|
|
306
|
+
"429",
|
|
307
|
+
"4XX",
|
|
308
|
+
"500",
|
|
309
|
+
"5XX",
|
|
310
|
+
],
|
|
311
|
+
};
|
|
244
312
|
const request = this.createRequest$({
|
|
245
313
|
security: securitySettings$,
|
|
246
314
|
method: "POST",
|
|
@@ -250,75 +318,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
250
318
|
body: body$,
|
|
251
319
|
}, options);
|
|
252
320
|
const response = await this.do$(request, doOptions);
|
|
321
|
+
const responseFields$ = {
|
|
322
|
+
HttpMeta: {
|
|
323
|
+
Response: response,
|
|
324
|
+
Request: request,
|
|
325
|
+
},
|
|
326
|
+
};
|
|
253
327
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
254
328
|
const responseBody = await response.json();
|
|
255
329
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
256
|
-
return
|
|
330
|
+
return components.LinkSchema$.inboundSchema.parse(val$);
|
|
257
331
|
}, "Response validation failed");
|
|
258
332
|
return result;
|
|
259
333
|
}
|
|
260
334
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
261
335
|
const responseBody = await response.json();
|
|
262
336
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
263
|
-
return
|
|
337
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
338
|
+
...responseFields$,
|
|
339
|
+
...val$,
|
|
340
|
+
});
|
|
264
341
|
}, "Response validation failed");
|
|
265
|
-
|
|
342
|
+
throw result;
|
|
266
343
|
}
|
|
267
344
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
268
345
|
const responseBody = await response.json();
|
|
269
346
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
270
|
-
return
|
|
347
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
348
|
+
...responseFields$,
|
|
349
|
+
...val$,
|
|
350
|
+
});
|
|
271
351
|
}, "Response validation failed");
|
|
272
|
-
|
|
352
|
+
throw result;
|
|
273
353
|
}
|
|
274
354
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
275
355
|
const responseBody = await response.json();
|
|
276
356
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
277
|
-
return
|
|
357
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
358
|
+
...responseFields$,
|
|
359
|
+
...val$,
|
|
360
|
+
});
|
|
278
361
|
}, "Response validation failed");
|
|
279
|
-
|
|
362
|
+
throw result;
|
|
280
363
|
}
|
|
281
364
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
282
365
|
const responseBody = await response.json();
|
|
283
366
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
284
|
-
return
|
|
367
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
368
|
+
...responseFields$,
|
|
369
|
+
...val$,
|
|
370
|
+
});
|
|
285
371
|
}, "Response validation failed");
|
|
286
|
-
|
|
372
|
+
throw result;
|
|
287
373
|
}
|
|
288
374
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
289
375
|
const responseBody = await response.json();
|
|
290
376
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
291
|
-
return
|
|
377
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
378
|
+
...responseFields$,
|
|
379
|
+
...val$,
|
|
380
|
+
});
|
|
292
381
|
}, "Response validation failed");
|
|
293
|
-
|
|
382
|
+
throw result;
|
|
294
383
|
}
|
|
295
384
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
296
385
|
const responseBody = await response.json();
|
|
297
386
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
298
|
-
return
|
|
387
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
388
|
+
...responseFields$,
|
|
389
|
+
...val$,
|
|
390
|
+
});
|
|
299
391
|
}, "Response validation failed");
|
|
300
|
-
|
|
392
|
+
throw result;
|
|
301
393
|
}
|
|
302
394
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
303
395
|
const responseBody = await response.json();
|
|
304
396
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
305
|
-
return
|
|
397
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
398
|
+
...responseFields$,
|
|
399
|
+
...val$,
|
|
400
|
+
});
|
|
306
401
|
}, "Response validation failed");
|
|
307
|
-
|
|
402
|
+
throw result;
|
|
308
403
|
}
|
|
309
404
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
310
405
|
const responseBody = await response.json();
|
|
311
406
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
312
|
-
return
|
|
407
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
408
|
+
...responseFields$,
|
|
409
|
+
...val$,
|
|
410
|
+
});
|
|
313
411
|
}, "Response validation failed");
|
|
314
|
-
|
|
412
|
+
throw result;
|
|
315
413
|
}
|
|
316
414
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
317
415
|
const responseBody = await response.json();
|
|
318
416
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
319
|
-
return
|
|
417
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
418
|
+
...responseFields$,
|
|
419
|
+
...val$,
|
|
420
|
+
});
|
|
320
421
|
}, "Response validation failed");
|
|
321
|
-
|
|
422
|
+
throw result;
|
|
322
423
|
}
|
|
323
424
|
else {
|
|
324
425
|
const responseBody = await response.text();
|
|
@@ -355,6 +456,10 @@ class Links extends sdks_1.ClientSDK {
|
|
|
355
456
|
}),
|
|
356
457
|
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
|
357
458
|
enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
|
|
459
|
+
enc$.encodeForm("tagNames", payload$.tagNames, {
|
|
460
|
+
explode: true,
|
|
461
|
+
charEncoding: "percent",
|
|
462
|
+
}),
|
|
358
463
|
enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
|
|
359
464
|
enc$.encodeForm("withTags", payload$.withTags, {
|
|
360
465
|
explode: true,
|
|
@@ -383,7 +488,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
383
488
|
securitySource: this.options$.token,
|
|
384
489
|
};
|
|
385
490
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
386
|
-
const doOptions = {
|
|
491
|
+
const doOptions = {
|
|
492
|
+
context,
|
|
493
|
+
errorCodes: [
|
|
494
|
+
"400",
|
|
495
|
+
"401",
|
|
496
|
+
"403",
|
|
497
|
+
"404",
|
|
498
|
+
"409",
|
|
499
|
+
"410",
|
|
500
|
+
"422",
|
|
501
|
+
"429",
|
|
502
|
+
"4XX",
|
|
503
|
+
"500",
|
|
504
|
+
"5XX",
|
|
505
|
+
],
|
|
506
|
+
};
|
|
387
507
|
const request = this.createRequest$({
|
|
388
508
|
security: securitySettings$,
|
|
389
509
|
method: "GET",
|
|
@@ -393,75 +513,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
393
513
|
body: body$,
|
|
394
514
|
}, options);
|
|
395
515
|
const response = await this.do$(request, doOptions);
|
|
516
|
+
const responseFields$ = {
|
|
517
|
+
HttpMeta: {
|
|
518
|
+
Response: response,
|
|
519
|
+
Request: request,
|
|
520
|
+
},
|
|
521
|
+
};
|
|
396
522
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
397
523
|
const responseBody = await response.json();
|
|
398
524
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
399
|
-
return
|
|
525
|
+
return z.number().parse(val$);
|
|
400
526
|
}, "Response validation failed");
|
|
401
527
|
return result;
|
|
402
528
|
}
|
|
403
529
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
404
530
|
const responseBody = await response.json();
|
|
405
531
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
406
|
-
return
|
|
532
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
533
|
+
...responseFields$,
|
|
534
|
+
...val$,
|
|
535
|
+
});
|
|
407
536
|
}, "Response validation failed");
|
|
408
|
-
|
|
537
|
+
throw result;
|
|
409
538
|
}
|
|
410
539
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
411
540
|
const responseBody = await response.json();
|
|
412
541
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
413
|
-
return
|
|
542
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
543
|
+
...responseFields$,
|
|
544
|
+
...val$,
|
|
545
|
+
});
|
|
414
546
|
}, "Response validation failed");
|
|
415
|
-
|
|
547
|
+
throw result;
|
|
416
548
|
}
|
|
417
549
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
418
550
|
const responseBody = await response.json();
|
|
419
551
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
420
|
-
return
|
|
552
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
553
|
+
...responseFields$,
|
|
554
|
+
...val$,
|
|
555
|
+
});
|
|
421
556
|
}, "Response validation failed");
|
|
422
|
-
|
|
557
|
+
throw result;
|
|
423
558
|
}
|
|
424
559
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
425
560
|
const responseBody = await response.json();
|
|
426
561
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
427
|
-
return
|
|
562
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
563
|
+
...responseFields$,
|
|
564
|
+
...val$,
|
|
565
|
+
});
|
|
428
566
|
}, "Response validation failed");
|
|
429
|
-
|
|
567
|
+
throw result;
|
|
430
568
|
}
|
|
431
569
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
432
570
|
const responseBody = await response.json();
|
|
433
571
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
434
|
-
return
|
|
572
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
573
|
+
...responseFields$,
|
|
574
|
+
...val$,
|
|
575
|
+
});
|
|
435
576
|
}, "Response validation failed");
|
|
436
|
-
|
|
577
|
+
throw result;
|
|
437
578
|
}
|
|
438
579
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
439
580
|
const responseBody = await response.json();
|
|
440
581
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
441
|
-
return
|
|
582
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
583
|
+
...responseFields$,
|
|
584
|
+
...val$,
|
|
585
|
+
});
|
|
442
586
|
}, "Response validation failed");
|
|
443
|
-
|
|
587
|
+
throw result;
|
|
444
588
|
}
|
|
445
589
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
446
590
|
const responseBody = await response.json();
|
|
447
591
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
448
|
-
return
|
|
592
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
593
|
+
...responseFields$,
|
|
594
|
+
...val$,
|
|
595
|
+
});
|
|
449
596
|
}, "Response validation failed");
|
|
450
|
-
|
|
597
|
+
throw result;
|
|
451
598
|
}
|
|
452
599
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
453
600
|
const responseBody = await response.json();
|
|
454
601
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
455
|
-
return
|
|
602
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
603
|
+
...responseFields$,
|
|
604
|
+
...val$,
|
|
605
|
+
});
|
|
456
606
|
}, "Response validation failed");
|
|
457
|
-
|
|
607
|
+
throw result;
|
|
458
608
|
}
|
|
459
609
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
460
610
|
const responseBody = await response.json();
|
|
461
611
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
462
|
-
return
|
|
612
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
613
|
+
...responseFields$,
|
|
614
|
+
...val$,
|
|
615
|
+
});
|
|
463
616
|
}, "Response validation failed");
|
|
464
|
-
|
|
617
|
+
throw result;
|
|
465
618
|
}
|
|
466
619
|
else {
|
|
467
620
|
const responseBody = await response.text();
|
|
@@ -511,7 +664,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
511
664
|
securitySource: this.options$.token,
|
|
512
665
|
};
|
|
513
666
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
514
|
-
const doOptions = {
|
|
667
|
+
const doOptions = {
|
|
668
|
+
context,
|
|
669
|
+
errorCodes: [
|
|
670
|
+
"400",
|
|
671
|
+
"401",
|
|
672
|
+
"403",
|
|
673
|
+
"404",
|
|
674
|
+
"409",
|
|
675
|
+
"410",
|
|
676
|
+
"422",
|
|
677
|
+
"429",
|
|
678
|
+
"4XX",
|
|
679
|
+
"500",
|
|
680
|
+
"5XX",
|
|
681
|
+
],
|
|
682
|
+
};
|
|
515
683
|
const request = this.createRequest$({
|
|
516
684
|
security: securitySettings$,
|
|
517
685
|
method: "GET",
|
|
@@ -521,75 +689,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
521
689
|
body: body$,
|
|
522
690
|
}, options);
|
|
523
691
|
const response = await this.do$(request, doOptions);
|
|
692
|
+
const responseFields$ = {
|
|
693
|
+
HttpMeta: {
|
|
694
|
+
Response: response,
|
|
695
|
+
Request: request,
|
|
696
|
+
},
|
|
697
|
+
};
|
|
524
698
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
525
699
|
const responseBody = await response.json();
|
|
526
700
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
527
|
-
return
|
|
701
|
+
return components.LinkSchema$.inboundSchema.parse(val$);
|
|
528
702
|
}, "Response validation failed");
|
|
529
703
|
return result;
|
|
530
704
|
}
|
|
531
705
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
532
706
|
const responseBody = await response.json();
|
|
533
707
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
534
|
-
return
|
|
708
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
709
|
+
...responseFields$,
|
|
710
|
+
...val$,
|
|
711
|
+
});
|
|
535
712
|
}, "Response validation failed");
|
|
536
|
-
|
|
713
|
+
throw result;
|
|
537
714
|
}
|
|
538
715
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
539
716
|
const responseBody = await response.json();
|
|
540
717
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
541
|
-
return
|
|
718
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
719
|
+
...responseFields$,
|
|
720
|
+
...val$,
|
|
721
|
+
});
|
|
542
722
|
}, "Response validation failed");
|
|
543
|
-
|
|
723
|
+
throw result;
|
|
544
724
|
}
|
|
545
725
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
546
726
|
const responseBody = await response.json();
|
|
547
727
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
548
|
-
return
|
|
728
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
729
|
+
...responseFields$,
|
|
730
|
+
...val$,
|
|
731
|
+
});
|
|
549
732
|
}, "Response validation failed");
|
|
550
|
-
|
|
733
|
+
throw result;
|
|
551
734
|
}
|
|
552
735
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
553
736
|
const responseBody = await response.json();
|
|
554
737
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
555
|
-
return
|
|
738
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
739
|
+
...responseFields$,
|
|
740
|
+
...val$,
|
|
741
|
+
});
|
|
556
742
|
}, "Response validation failed");
|
|
557
|
-
|
|
743
|
+
throw result;
|
|
558
744
|
}
|
|
559
745
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
560
746
|
const responseBody = await response.json();
|
|
561
747
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
562
|
-
return
|
|
748
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
749
|
+
...responseFields$,
|
|
750
|
+
...val$,
|
|
751
|
+
});
|
|
563
752
|
}, "Response validation failed");
|
|
564
|
-
|
|
753
|
+
throw result;
|
|
565
754
|
}
|
|
566
755
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
567
756
|
const responseBody = await response.json();
|
|
568
757
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
569
|
-
return
|
|
758
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
759
|
+
...responseFields$,
|
|
760
|
+
...val$,
|
|
761
|
+
});
|
|
570
762
|
}, "Response validation failed");
|
|
571
|
-
|
|
763
|
+
throw result;
|
|
572
764
|
}
|
|
573
765
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
574
766
|
const responseBody = await response.json();
|
|
575
767
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
576
|
-
return
|
|
768
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
769
|
+
...responseFields$,
|
|
770
|
+
...val$,
|
|
771
|
+
});
|
|
577
772
|
}, "Response validation failed");
|
|
578
|
-
|
|
773
|
+
throw result;
|
|
579
774
|
}
|
|
580
775
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
581
776
|
const responseBody = await response.json();
|
|
582
777
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
583
|
-
return
|
|
778
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
779
|
+
...responseFields$,
|
|
780
|
+
...val$,
|
|
781
|
+
});
|
|
584
782
|
}, "Response validation failed");
|
|
585
|
-
|
|
783
|
+
throw result;
|
|
586
784
|
}
|
|
587
785
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
588
786
|
const responseBody = await response.json();
|
|
589
787
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
590
|
-
return
|
|
788
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
789
|
+
...responseFields$,
|
|
790
|
+
...val$,
|
|
791
|
+
});
|
|
591
792
|
}, "Response validation failed");
|
|
592
|
-
|
|
793
|
+
throw result;
|
|
593
794
|
}
|
|
594
795
|
else {
|
|
595
796
|
const responseBody = await response.text();
|
|
@@ -648,7 +849,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
648
849
|
securitySource: this.options$.token,
|
|
649
850
|
};
|
|
650
851
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
651
|
-
const doOptions = {
|
|
852
|
+
const doOptions = {
|
|
853
|
+
context,
|
|
854
|
+
errorCodes: [
|
|
855
|
+
"400",
|
|
856
|
+
"401",
|
|
857
|
+
"403",
|
|
858
|
+
"404",
|
|
859
|
+
"409",
|
|
860
|
+
"410",
|
|
861
|
+
"422",
|
|
862
|
+
"429",
|
|
863
|
+
"4XX",
|
|
864
|
+
"500",
|
|
865
|
+
"5XX",
|
|
866
|
+
],
|
|
867
|
+
};
|
|
652
868
|
const request = this.createRequest$({
|
|
653
869
|
security: securitySettings$,
|
|
654
870
|
method: "PUT",
|
|
@@ -658,75 +874,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
658
874
|
body: body$,
|
|
659
875
|
}, options);
|
|
660
876
|
const response = await this.do$(request, doOptions);
|
|
877
|
+
const responseFields$ = {
|
|
878
|
+
HttpMeta: {
|
|
879
|
+
Response: response,
|
|
880
|
+
Request: request,
|
|
881
|
+
},
|
|
882
|
+
};
|
|
661
883
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
662
884
|
const responseBody = await response.json();
|
|
663
885
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
664
|
-
return
|
|
886
|
+
return components.LinkSchema$.inboundSchema.parse(val$);
|
|
665
887
|
}, "Response validation failed");
|
|
666
888
|
return result;
|
|
667
889
|
}
|
|
668
890
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
669
891
|
const responseBody = await response.json();
|
|
670
892
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
671
|
-
return
|
|
893
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
894
|
+
...responseFields$,
|
|
895
|
+
...val$,
|
|
896
|
+
});
|
|
672
897
|
}, "Response validation failed");
|
|
673
|
-
|
|
898
|
+
throw result;
|
|
674
899
|
}
|
|
675
900
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
676
901
|
const responseBody = await response.json();
|
|
677
902
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
678
|
-
return
|
|
903
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
904
|
+
...responseFields$,
|
|
905
|
+
...val$,
|
|
906
|
+
});
|
|
679
907
|
}, "Response validation failed");
|
|
680
|
-
|
|
908
|
+
throw result;
|
|
681
909
|
}
|
|
682
910
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
683
911
|
const responseBody = await response.json();
|
|
684
912
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
685
|
-
return
|
|
913
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
914
|
+
...responseFields$,
|
|
915
|
+
...val$,
|
|
916
|
+
});
|
|
686
917
|
}, "Response validation failed");
|
|
687
|
-
|
|
918
|
+
throw result;
|
|
688
919
|
}
|
|
689
920
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
690
921
|
const responseBody = await response.json();
|
|
691
922
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
692
|
-
return
|
|
923
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
924
|
+
...responseFields$,
|
|
925
|
+
...val$,
|
|
926
|
+
});
|
|
693
927
|
}, "Response validation failed");
|
|
694
|
-
|
|
928
|
+
throw result;
|
|
695
929
|
}
|
|
696
930
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
697
931
|
const responseBody = await response.json();
|
|
698
932
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
699
|
-
return
|
|
933
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
934
|
+
...responseFields$,
|
|
935
|
+
...val$,
|
|
936
|
+
});
|
|
700
937
|
}, "Response validation failed");
|
|
701
|
-
|
|
938
|
+
throw result;
|
|
702
939
|
}
|
|
703
940
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
704
941
|
const responseBody = await response.json();
|
|
705
942
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
706
|
-
return
|
|
943
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
944
|
+
...responseFields$,
|
|
945
|
+
...val$,
|
|
946
|
+
});
|
|
707
947
|
}, "Response validation failed");
|
|
708
|
-
|
|
948
|
+
throw result;
|
|
709
949
|
}
|
|
710
950
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
711
951
|
const responseBody = await response.json();
|
|
712
952
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
713
|
-
return
|
|
953
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
954
|
+
...responseFields$,
|
|
955
|
+
...val$,
|
|
956
|
+
});
|
|
714
957
|
}, "Response validation failed");
|
|
715
|
-
|
|
958
|
+
throw result;
|
|
716
959
|
}
|
|
717
960
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
718
961
|
const responseBody = await response.json();
|
|
719
962
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
720
|
-
return
|
|
963
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
964
|
+
...responseFields$,
|
|
965
|
+
...val$,
|
|
966
|
+
});
|
|
721
967
|
}, "Response validation failed");
|
|
722
|
-
|
|
968
|
+
throw result;
|
|
723
969
|
}
|
|
724
970
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
725
971
|
const responseBody = await response.json();
|
|
726
972
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
727
|
-
return
|
|
973
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
974
|
+
...responseFields$,
|
|
975
|
+
...val$,
|
|
976
|
+
});
|
|
728
977
|
}, "Response validation failed");
|
|
729
|
-
|
|
978
|
+
throw result;
|
|
730
979
|
}
|
|
731
980
|
else {
|
|
732
981
|
const responseBody = await response.text();
|
|
@@ -783,7 +1032,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
783
1032
|
securitySource: this.options$.token,
|
|
784
1033
|
};
|
|
785
1034
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
786
|
-
const doOptions = {
|
|
1035
|
+
const doOptions = {
|
|
1036
|
+
context,
|
|
1037
|
+
errorCodes: [
|
|
1038
|
+
"400",
|
|
1039
|
+
"401",
|
|
1040
|
+
"403",
|
|
1041
|
+
"404",
|
|
1042
|
+
"409",
|
|
1043
|
+
"410",
|
|
1044
|
+
"422",
|
|
1045
|
+
"429",
|
|
1046
|
+
"4XX",
|
|
1047
|
+
"500",
|
|
1048
|
+
"5XX",
|
|
1049
|
+
],
|
|
1050
|
+
};
|
|
787
1051
|
const request = this.createRequest$({
|
|
788
1052
|
security: securitySettings$,
|
|
789
1053
|
method: "DELETE",
|
|
@@ -793,75 +1057,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
793
1057
|
body: body$,
|
|
794
1058
|
}, options);
|
|
795
1059
|
const response = await this.do$(request, doOptions);
|
|
1060
|
+
const responseFields$ = {
|
|
1061
|
+
HttpMeta: {
|
|
1062
|
+
Response: response,
|
|
1063
|
+
Request: request,
|
|
1064
|
+
},
|
|
1065
|
+
};
|
|
796
1066
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
797
1067
|
const responseBody = await response.json();
|
|
798
1068
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
799
|
-
return operations.
|
|
1069
|
+
return operations.DeleteLinkResponseBody$.inboundSchema.parse(val$);
|
|
800
1070
|
}, "Response validation failed");
|
|
801
1071
|
return result;
|
|
802
1072
|
}
|
|
803
1073
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
804
1074
|
const responseBody = await response.json();
|
|
805
1075
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
806
|
-
return
|
|
1076
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1077
|
+
...responseFields$,
|
|
1078
|
+
...val$,
|
|
1079
|
+
});
|
|
807
1080
|
}, "Response validation failed");
|
|
808
|
-
|
|
1081
|
+
throw result;
|
|
809
1082
|
}
|
|
810
1083
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
811
1084
|
const responseBody = await response.json();
|
|
812
1085
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
813
|
-
return
|
|
1086
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1087
|
+
...responseFields$,
|
|
1088
|
+
...val$,
|
|
1089
|
+
});
|
|
814
1090
|
}, "Response validation failed");
|
|
815
|
-
|
|
1091
|
+
throw result;
|
|
816
1092
|
}
|
|
817
1093
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
818
1094
|
const responseBody = await response.json();
|
|
819
1095
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
820
|
-
return
|
|
1096
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1097
|
+
...responseFields$,
|
|
1098
|
+
...val$,
|
|
1099
|
+
});
|
|
821
1100
|
}, "Response validation failed");
|
|
822
|
-
|
|
1101
|
+
throw result;
|
|
823
1102
|
}
|
|
824
1103
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
825
1104
|
const responseBody = await response.json();
|
|
826
1105
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
827
|
-
return
|
|
1106
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1107
|
+
...responseFields$,
|
|
1108
|
+
...val$,
|
|
1109
|
+
});
|
|
828
1110
|
}, "Response validation failed");
|
|
829
|
-
|
|
1111
|
+
throw result;
|
|
830
1112
|
}
|
|
831
1113
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
832
1114
|
const responseBody = await response.json();
|
|
833
1115
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
834
|
-
return
|
|
1116
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1117
|
+
...responseFields$,
|
|
1118
|
+
...val$,
|
|
1119
|
+
});
|
|
835
1120
|
}, "Response validation failed");
|
|
836
|
-
|
|
1121
|
+
throw result;
|
|
837
1122
|
}
|
|
838
1123
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
839
1124
|
const responseBody = await response.json();
|
|
840
1125
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
841
|
-
return
|
|
1126
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1127
|
+
...responseFields$,
|
|
1128
|
+
...val$,
|
|
1129
|
+
});
|
|
842
1130
|
}, "Response validation failed");
|
|
843
|
-
|
|
1131
|
+
throw result;
|
|
844
1132
|
}
|
|
845
1133
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
846
1134
|
const responseBody = await response.json();
|
|
847
1135
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
848
|
-
return
|
|
1136
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1137
|
+
...responseFields$,
|
|
1138
|
+
...val$,
|
|
1139
|
+
});
|
|
849
1140
|
}, "Response validation failed");
|
|
850
|
-
|
|
1141
|
+
throw result;
|
|
851
1142
|
}
|
|
852
1143
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
853
1144
|
const responseBody = await response.json();
|
|
854
1145
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
855
|
-
return
|
|
1146
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1147
|
+
...responseFields$,
|
|
1148
|
+
...val$,
|
|
1149
|
+
});
|
|
856
1150
|
}, "Response validation failed");
|
|
857
|
-
|
|
1151
|
+
throw result;
|
|
858
1152
|
}
|
|
859
1153
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
860
1154
|
const responseBody = await response.json();
|
|
861
1155
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
862
|
-
return
|
|
1156
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1157
|
+
...responseFields$,
|
|
1158
|
+
...val$,
|
|
1159
|
+
});
|
|
863
1160
|
}, "Response validation failed");
|
|
864
|
-
|
|
1161
|
+
throw result;
|
|
865
1162
|
}
|
|
866
1163
|
else {
|
|
867
1164
|
const responseBody = await response.text();
|
|
@@ -910,7 +1207,22 @@ class Links extends sdks_1.ClientSDK {
|
|
|
910
1207
|
securitySource: this.options$.token,
|
|
911
1208
|
};
|
|
912
1209
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
913
|
-
const doOptions = {
|
|
1210
|
+
const doOptions = {
|
|
1211
|
+
context,
|
|
1212
|
+
errorCodes: [
|
|
1213
|
+
"400",
|
|
1214
|
+
"401",
|
|
1215
|
+
"403",
|
|
1216
|
+
"404",
|
|
1217
|
+
"409",
|
|
1218
|
+
"410",
|
|
1219
|
+
"422",
|
|
1220
|
+
"429",
|
|
1221
|
+
"4XX",
|
|
1222
|
+
"500",
|
|
1223
|
+
"5XX",
|
|
1224
|
+
],
|
|
1225
|
+
};
|
|
914
1226
|
const request = this.createRequest$({
|
|
915
1227
|
security: securitySettings$,
|
|
916
1228
|
method: "POST",
|
|
@@ -920,75 +1232,108 @@ class Links extends sdks_1.ClientSDK {
|
|
|
920
1232
|
body: body$,
|
|
921
1233
|
}, options);
|
|
922
1234
|
const response = await this.do$(request, doOptions);
|
|
1235
|
+
const responseFields$ = {
|
|
1236
|
+
HttpMeta: {
|
|
1237
|
+
Response: response,
|
|
1238
|
+
Request: request,
|
|
1239
|
+
},
|
|
1240
|
+
};
|
|
923
1241
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
924
1242
|
const responseBody = await response.json();
|
|
925
1243
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
926
|
-
return
|
|
1244
|
+
return z.array(components.LinkSchema$.inboundSchema).parse(val$);
|
|
927
1245
|
}, "Response validation failed");
|
|
928
1246
|
return result;
|
|
929
1247
|
}
|
|
930
1248
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
931
1249
|
const responseBody = await response.json();
|
|
932
1250
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
933
|
-
return
|
|
1251
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1252
|
+
...responseFields$,
|
|
1253
|
+
...val$,
|
|
1254
|
+
});
|
|
934
1255
|
}, "Response validation failed");
|
|
935
|
-
|
|
1256
|
+
throw result;
|
|
936
1257
|
}
|
|
937
1258
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
938
1259
|
const responseBody = await response.json();
|
|
939
1260
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
940
|
-
return
|
|
1261
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1262
|
+
...responseFields$,
|
|
1263
|
+
...val$,
|
|
1264
|
+
});
|
|
941
1265
|
}, "Response validation failed");
|
|
942
|
-
|
|
1266
|
+
throw result;
|
|
943
1267
|
}
|
|
944
1268
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
945
1269
|
const responseBody = await response.json();
|
|
946
1270
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
947
|
-
return
|
|
1271
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1272
|
+
...responseFields$,
|
|
1273
|
+
...val$,
|
|
1274
|
+
});
|
|
948
1275
|
}, "Response validation failed");
|
|
949
|
-
|
|
1276
|
+
throw result;
|
|
950
1277
|
}
|
|
951
1278
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
952
1279
|
const responseBody = await response.json();
|
|
953
1280
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
954
|
-
return
|
|
1281
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1282
|
+
...responseFields$,
|
|
1283
|
+
...val$,
|
|
1284
|
+
});
|
|
955
1285
|
}, "Response validation failed");
|
|
956
|
-
|
|
1286
|
+
throw result;
|
|
957
1287
|
}
|
|
958
1288
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
959
1289
|
const responseBody = await response.json();
|
|
960
1290
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
961
|
-
return
|
|
1291
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1292
|
+
...responseFields$,
|
|
1293
|
+
...val$,
|
|
1294
|
+
});
|
|
962
1295
|
}, "Response validation failed");
|
|
963
|
-
|
|
1296
|
+
throw result;
|
|
964
1297
|
}
|
|
965
1298
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
966
1299
|
const responseBody = await response.json();
|
|
967
1300
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
968
|
-
return
|
|
1301
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1302
|
+
...responseFields$,
|
|
1303
|
+
...val$,
|
|
1304
|
+
});
|
|
969
1305
|
}, "Response validation failed");
|
|
970
|
-
|
|
1306
|
+
throw result;
|
|
971
1307
|
}
|
|
972
1308
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
973
1309
|
const responseBody = await response.json();
|
|
974
1310
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
975
|
-
return
|
|
1311
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1312
|
+
...responseFields$,
|
|
1313
|
+
...val$,
|
|
1314
|
+
});
|
|
976
1315
|
}, "Response validation failed");
|
|
977
|
-
|
|
1316
|
+
throw result;
|
|
978
1317
|
}
|
|
979
1318
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
980
1319
|
const responseBody = await response.json();
|
|
981
1320
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
982
|
-
return
|
|
1321
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1322
|
+
...responseFields$,
|
|
1323
|
+
...val$,
|
|
1324
|
+
});
|
|
983
1325
|
}, "Response validation failed");
|
|
984
|
-
|
|
1326
|
+
throw result;
|
|
985
1327
|
}
|
|
986
1328
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
987
1329
|
const responseBody = await response.json();
|
|
988
1330
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
989
|
-
return
|
|
1331
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1332
|
+
...responseFields$,
|
|
1333
|
+
...val$,
|
|
1334
|
+
});
|
|
990
1335
|
}, "Response validation failed");
|
|
991
|
-
|
|
1336
|
+
throw result;
|
|
992
1337
|
}
|
|
993
1338
|
else {
|
|
994
1339
|
const responseBody = await response.text();
|