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/domains.js
CHANGED
|
@@ -33,8 +33,10 @@ 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"));
|
|
39
|
+
const z = __importStar(require("zod"));
|
|
38
40
|
class Domains extends sdks_1.ClientSDK {
|
|
39
41
|
constructor(options = {}) {
|
|
40
42
|
const opt = options;
|
|
@@ -95,7 +97,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
95
97
|
securitySource: this.options$.token,
|
|
96
98
|
};
|
|
97
99
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
98
|
-
const doOptions = {
|
|
100
|
+
const doOptions = {
|
|
101
|
+
context,
|
|
102
|
+
errorCodes: [
|
|
103
|
+
"400",
|
|
104
|
+
"401",
|
|
105
|
+
"403",
|
|
106
|
+
"404",
|
|
107
|
+
"409",
|
|
108
|
+
"410",
|
|
109
|
+
"422",
|
|
110
|
+
"429",
|
|
111
|
+
"4XX",
|
|
112
|
+
"500",
|
|
113
|
+
"5XX",
|
|
114
|
+
],
|
|
115
|
+
};
|
|
99
116
|
const request = this.createRequest$({
|
|
100
117
|
security: securitySettings$,
|
|
101
118
|
method: "GET",
|
|
@@ -104,75 +121,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
104
121
|
query: query$,
|
|
105
122
|
}, options);
|
|
106
123
|
const response = await this.do$(request, doOptions);
|
|
124
|
+
const responseFields$ = {
|
|
125
|
+
HttpMeta: {
|
|
126
|
+
Response: response,
|
|
127
|
+
Request: request,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
107
130
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
108
131
|
const responseBody = await response.json();
|
|
109
132
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
110
|
-
return
|
|
133
|
+
return z.array(components.DomainSchema$.inboundSchema).parse(val$);
|
|
111
134
|
}, "Response validation failed");
|
|
112
135
|
return result;
|
|
113
136
|
}
|
|
114
137
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
115
138
|
const responseBody = await response.json();
|
|
116
139
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
117
|
-
return
|
|
140
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
141
|
+
...responseFields$,
|
|
142
|
+
...val$,
|
|
143
|
+
});
|
|
118
144
|
}, "Response validation failed");
|
|
119
|
-
|
|
145
|
+
throw result;
|
|
120
146
|
}
|
|
121
147
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
122
148
|
const responseBody = await response.json();
|
|
123
149
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
124
|
-
return
|
|
150
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
151
|
+
...responseFields$,
|
|
152
|
+
...val$,
|
|
153
|
+
});
|
|
125
154
|
}, "Response validation failed");
|
|
126
|
-
|
|
155
|
+
throw result;
|
|
127
156
|
}
|
|
128
157
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
129
158
|
const responseBody = await response.json();
|
|
130
159
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
131
|
-
return
|
|
160
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
161
|
+
...responseFields$,
|
|
162
|
+
...val$,
|
|
163
|
+
});
|
|
132
164
|
}, "Response validation failed");
|
|
133
|
-
|
|
165
|
+
throw result;
|
|
134
166
|
}
|
|
135
167
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
136
168
|
const responseBody = await response.json();
|
|
137
169
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
138
|
-
return
|
|
170
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
171
|
+
...responseFields$,
|
|
172
|
+
...val$,
|
|
173
|
+
});
|
|
139
174
|
}, "Response validation failed");
|
|
140
|
-
|
|
175
|
+
throw result;
|
|
141
176
|
}
|
|
142
177
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
143
178
|
const responseBody = await response.json();
|
|
144
179
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
145
|
-
return
|
|
180
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
181
|
+
...responseFields$,
|
|
182
|
+
...val$,
|
|
183
|
+
});
|
|
146
184
|
}, "Response validation failed");
|
|
147
|
-
|
|
185
|
+
throw result;
|
|
148
186
|
}
|
|
149
187
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
150
188
|
const responseBody = await response.json();
|
|
151
189
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
152
|
-
return
|
|
190
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
191
|
+
...responseFields$,
|
|
192
|
+
...val$,
|
|
193
|
+
});
|
|
153
194
|
}, "Response validation failed");
|
|
154
|
-
|
|
195
|
+
throw result;
|
|
155
196
|
}
|
|
156
197
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
157
198
|
const responseBody = await response.json();
|
|
158
199
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
159
|
-
return
|
|
200
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
201
|
+
...responseFields$,
|
|
202
|
+
...val$,
|
|
203
|
+
});
|
|
160
204
|
}, "Response validation failed");
|
|
161
|
-
|
|
205
|
+
throw result;
|
|
162
206
|
}
|
|
163
207
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
164
208
|
const responseBody = await response.json();
|
|
165
209
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
166
|
-
return
|
|
210
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
211
|
+
...responseFields$,
|
|
212
|
+
...val$,
|
|
213
|
+
});
|
|
167
214
|
}, "Response validation failed");
|
|
168
|
-
|
|
215
|
+
throw result;
|
|
169
216
|
}
|
|
170
217
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
171
218
|
const responseBody = await response.json();
|
|
172
219
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
173
|
-
return
|
|
220
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
221
|
+
...responseFields$,
|
|
222
|
+
...val$,
|
|
223
|
+
});
|
|
174
224
|
}, "Response validation failed");
|
|
175
|
-
|
|
225
|
+
throw result;
|
|
176
226
|
}
|
|
177
227
|
else {
|
|
178
228
|
const responseBody = await response.text();
|
|
@@ -221,7 +271,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
221
271
|
securitySource: this.options$.token,
|
|
222
272
|
};
|
|
223
273
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
224
|
-
const doOptions = {
|
|
274
|
+
const doOptions = {
|
|
275
|
+
context,
|
|
276
|
+
errorCodes: [
|
|
277
|
+
"400",
|
|
278
|
+
"401",
|
|
279
|
+
"403",
|
|
280
|
+
"404",
|
|
281
|
+
"409",
|
|
282
|
+
"410",
|
|
283
|
+
"422",
|
|
284
|
+
"429",
|
|
285
|
+
"4XX",
|
|
286
|
+
"500",
|
|
287
|
+
"5XX",
|
|
288
|
+
],
|
|
289
|
+
};
|
|
225
290
|
const request = this.createRequest$({
|
|
226
291
|
security: securitySettings$,
|
|
227
292
|
method: "POST",
|
|
@@ -231,75 +296,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
231
296
|
body: body$,
|
|
232
297
|
}, options);
|
|
233
298
|
const response = await this.do$(request, doOptions);
|
|
299
|
+
const responseFields$ = {
|
|
300
|
+
HttpMeta: {
|
|
301
|
+
Response: response,
|
|
302
|
+
Request: request,
|
|
303
|
+
},
|
|
304
|
+
};
|
|
234
305
|
if (this.matchResponse(response, 201, "application/json")) {
|
|
235
306
|
const responseBody = await response.json();
|
|
236
307
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
237
|
-
return
|
|
308
|
+
return components.DomainSchema$.inboundSchema.parse(val$);
|
|
238
309
|
}, "Response validation failed");
|
|
239
310
|
return result;
|
|
240
311
|
}
|
|
241
312
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
242
313
|
const responseBody = await response.json();
|
|
243
314
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
244
|
-
return
|
|
315
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
316
|
+
...responseFields$,
|
|
317
|
+
...val$,
|
|
318
|
+
});
|
|
245
319
|
}, "Response validation failed");
|
|
246
|
-
|
|
320
|
+
throw result;
|
|
247
321
|
}
|
|
248
322
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
249
323
|
const responseBody = await response.json();
|
|
250
324
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
251
|
-
return
|
|
325
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
326
|
+
...responseFields$,
|
|
327
|
+
...val$,
|
|
328
|
+
});
|
|
252
329
|
}, "Response validation failed");
|
|
253
|
-
|
|
330
|
+
throw result;
|
|
254
331
|
}
|
|
255
332
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
256
333
|
const responseBody = await response.json();
|
|
257
334
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
258
|
-
return
|
|
335
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
336
|
+
...responseFields$,
|
|
337
|
+
...val$,
|
|
338
|
+
});
|
|
259
339
|
}, "Response validation failed");
|
|
260
|
-
|
|
340
|
+
throw result;
|
|
261
341
|
}
|
|
262
342
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
263
343
|
const responseBody = await response.json();
|
|
264
344
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
265
|
-
return
|
|
345
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
346
|
+
...responseFields$,
|
|
347
|
+
...val$,
|
|
348
|
+
});
|
|
266
349
|
}, "Response validation failed");
|
|
267
|
-
|
|
350
|
+
throw result;
|
|
268
351
|
}
|
|
269
352
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
270
353
|
const responseBody = await response.json();
|
|
271
354
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
272
|
-
return
|
|
355
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
356
|
+
...responseFields$,
|
|
357
|
+
...val$,
|
|
358
|
+
});
|
|
273
359
|
}, "Response validation failed");
|
|
274
|
-
|
|
360
|
+
throw result;
|
|
275
361
|
}
|
|
276
362
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
277
363
|
const responseBody = await response.json();
|
|
278
364
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
279
|
-
return
|
|
365
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
366
|
+
...responseFields$,
|
|
367
|
+
...val$,
|
|
368
|
+
});
|
|
280
369
|
}, "Response validation failed");
|
|
281
|
-
|
|
370
|
+
throw result;
|
|
282
371
|
}
|
|
283
372
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
284
373
|
const responseBody = await response.json();
|
|
285
374
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
286
|
-
return
|
|
375
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
376
|
+
...responseFields$,
|
|
377
|
+
...val$,
|
|
378
|
+
});
|
|
287
379
|
}, "Response validation failed");
|
|
288
|
-
|
|
380
|
+
throw result;
|
|
289
381
|
}
|
|
290
382
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
291
383
|
const responseBody = await response.json();
|
|
292
384
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
293
|
-
return
|
|
385
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
386
|
+
...responseFields$,
|
|
387
|
+
...val$,
|
|
388
|
+
});
|
|
294
389
|
}, "Response validation failed");
|
|
295
|
-
|
|
390
|
+
throw result;
|
|
296
391
|
}
|
|
297
392
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
298
393
|
const responseBody = await response.json();
|
|
299
394
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
300
|
-
return
|
|
395
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
396
|
+
...responseFields$,
|
|
397
|
+
...val$,
|
|
398
|
+
});
|
|
301
399
|
}, "Response validation failed");
|
|
302
|
-
|
|
400
|
+
throw result;
|
|
303
401
|
}
|
|
304
402
|
else {
|
|
305
403
|
const responseBody = await response.text();
|
|
@@ -353,7 +451,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
353
451
|
securitySource: this.options$.token,
|
|
354
452
|
};
|
|
355
453
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
356
|
-
const doOptions = {
|
|
454
|
+
const doOptions = {
|
|
455
|
+
context,
|
|
456
|
+
errorCodes: [
|
|
457
|
+
"400",
|
|
458
|
+
"401",
|
|
459
|
+
"403",
|
|
460
|
+
"404",
|
|
461
|
+
"409",
|
|
462
|
+
"410",
|
|
463
|
+
"422",
|
|
464
|
+
"429",
|
|
465
|
+
"4XX",
|
|
466
|
+
"500",
|
|
467
|
+
"5XX",
|
|
468
|
+
],
|
|
469
|
+
};
|
|
357
470
|
const request = this.createRequest$({
|
|
358
471
|
security: securitySettings$,
|
|
359
472
|
method: "DELETE",
|
|
@@ -363,75 +476,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
363
476
|
body: body$,
|
|
364
477
|
}, options);
|
|
365
478
|
const response = await this.do$(request, doOptions);
|
|
479
|
+
const responseFields$ = {
|
|
480
|
+
HttpMeta: {
|
|
481
|
+
Response: response,
|
|
482
|
+
Request: request,
|
|
483
|
+
},
|
|
484
|
+
};
|
|
366
485
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
367
486
|
const responseBody = await response.json();
|
|
368
487
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
369
|
-
return operations.
|
|
488
|
+
return operations.DeleteDomainResponseBody$.inboundSchema.parse(val$);
|
|
370
489
|
}, "Response validation failed");
|
|
371
490
|
return result;
|
|
372
491
|
}
|
|
373
492
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
374
493
|
const responseBody = await response.json();
|
|
375
494
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
376
|
-
return
|
|
495
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
496
|
+
...responseFields$,
|
|
497
|
+
...val$,
|
|
498
|
+
});
|
|
377
499
|
}, "Response validation failed");
|
|
378
|
-
|
|
500
|
+
throw result;
|
|
379
501
|
}
|
|
380
502
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
381
503
|
const responseBody = await response.json();
|
|
382
504
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
383
|
-
return
|
|
505
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
506
|
+
...responseFields$,
|
|
507
|
+
...val$,
|
|
508
|
+
});
|
|
384
509
|
}, "Response validation failed");
|
|
385
|
-
|
|
510
|
+
throw result;
|
|
386
511
|
}
|
|
387
512
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
388
513
|
const responseBody = await response.json();
|
|
389
514
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
390
|
-
return
|
|
515
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
516
|
+
...responseFields$,
|
|
517
|
+
...val$,
|
|
518
|
+
});
|
|
391
519
|
}, "Response validation failed");
|
|
392
|
-
|
|
520
|
+
throw result;
|
|
393
521
|
}
|
|
394
522
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
395
523
|
const responseBody = await response.json();
|
|
396
524
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
397
|
-
return
|
|
525
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
526
|
+
...responseFields$,
|
|
527
|
+
...val$,
|
|
528
|
+
});
|
|
398
529
|
}, "Response validation failed");
|
|
399
|
-
|
|
530
|
+
throw result;
|
|
400
531
|
}
|
|
401
532
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
402
533
|
const responseBody = await response.json();
|
|
403
534
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
404
|
-
return
|
|
535
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
536
|
+
...responseFields$,
|
|
537
|
+
...val$,
|
|
538
|
+
});
|
|
405
539
|
}, "Response validation failed");
|
|
406
|
-
|
|
540
|
+
throw result;
|
|
407
541
|
}
|
|
408
542
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
409
543
|
const responseBody = await response.json();
|
|
410
544
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
411
|
-
return
|
|
545
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
546
|
+
...responseFields$,
|
|
547
|
+
...val$,
|
|
548
|
+
});
|
|
412
549
|
}, "Response validation failed");
|
|
413
|
-
|
|
550
|
+
throw result;
|
|
414
551
|
}
|
|
415
552
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
416
553
|
const responseBody = await response.json();
|
|
417
554
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
418
|
-
return
|
|
555
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
556
|
+
...responseFields$,
|
|
557
|
+
...val$,
|
|
558
|
+
});
|
|
419
559
|
}, "Response validation failed");
|
|
420
|
-
|
|
560
|
+
throw result;
|
|
421
561
|
}
|
|
422
562
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
423
563
|
const responseBody = await response.json();
|
|
424
564
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
425
|
-
return
|
|
565
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
566
|
+
...responseFields$,
|
|
567
|
+
...val$,
|
|
568
|
+
});
|
|
426
569
|
}, "Response validation failed");
|
|
427
|
-
|
|
570
|
+
throw result;
|
|
428
571
|
}
|
|
429
572
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
430
573
|
const responseBody = await response.json();
|
|
431
574
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
432
|
-
return
|
|
575
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
576
|
+
...responseFields$,
|
|
577
|
+
...val$,
|
|
578
|
+
});
|
|
433
579
|
}, "Response validation failed");
|
|
434
|
-
|
|
580
|
+
throw result;
|
|
435
581
|
}
|
|
436
582
|
else {
|
|
437
583
|
const responseBody = await response.text();
|
|
@@ -444,12 +590,16 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
444
590
|
* @remarks
|
|
445
591
|
* Edit a domain for the authenticated workspace.
|
|
446
592
|
*/
|
|
447
|
-
async update(
|
|
593
|
+
async update(slug, requestBody, options) {
|
|
594
|
+
const input$ = {
|
|
595
|
+
slug: slug,
|
|
596
|
+
requestBody: requestBody,
|
|
597
|
+
};
|
|
448
598
|
const headers$ = new Headers();
|
|
449
599
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
450
600
|
headers$.set("Content-Type", "application/json");
|
|
451
601
|
headers$.set("Accept", "application/json");
|
|
452
|
-
const payload$ = schemas$.parse(input
|
|
602
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.EditDomainRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
453
603
|
const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
|
|
454
604
|
const pathParams$ = {
|
|
455
605
|
slug: enc$.encodeSimple("slug", payload$.slug, {
|
|
@@ -486,7 +636,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
486
636
|
securitySource: this.options$.token,
|
|
487
637
|
};
|
|
488
638
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
489
|
-
const doOptions = {
|
|
639
|
+
const doOptions = {
|
|
640
|
+
context,
|
|
641
|
+
errorCodes: [
|
|
642
|
+
"400",
|
|
643
|
+
"401",
|
|
644
|
+
"403",
|
|
645
|
+
"404",
|
|
646
|
+
"409",
|
|
647
|
+
"410",
|
|
648
|
+
"422",
|
|
649
|
+
"429",
|
|
650
|
+
"4XX",
|
|
651
|
+
"500",
|
|
652
|
+
"5XX",
|
|
653
|
+
],
|
|
654
|
+
};
|
|
490
655
|
const request = this.createRequest$({
|
|
491
656
|
security: securitySettings$,
|
|
492
657
|
method: "PATCH",
|
|
@@ -496,75 +661,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
496
661
|
body: body$,
|
|
497
662
|
}, options);
|
|
498
663
|
const response = await this.do$(request, doOptions);
|
|
664
|
+
const responseFields$ = {
|
|
665
|
+
HttpMeta: {
|
|
666
|
+
Response: response,
|
|
667
|
+
Request: request,
|
|
668
|
+
},
|
|
669
|
+
};
|
|
499
670
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
500
671
|
const responseBody = await response.json();
|
|
501
672
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
502
|
-
return
|
|
673
|
+
return components.DomainSchema$.inboundSchema.parse(val$);
|
|
503
674
|
}, "Response validation failed");
|
|
504
675
|
return result;
|
|
505
676
|
}
|
|
506
677
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
507
678
|
const responseBody = await response.json();
|
|
508
679
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
509
|
-
return
|
|
680
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
681
|
+
...responseFields$,
|
|
682
|
+
...val$,
|
|
683
|
+
});
|
|
510
684
|
}, "Response validation failed");
|
|
511
|
-
|
|
685
|
+
throw result;
|
|
512
686
|
}
|
|
513
687
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
514
688
|
const responseBody = await response.json();
|
|
515
689
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
516
|
-
return
|
|
690
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
691
|
+
...responseFields$,
|
|
692
|
+
...val$,
|
|
693
|
+
});
|
|
517
694
|
}, "Response validation failed");
|
|
518
|
-
|
|
695
|
+
throw result;
|
|
519
696
|
}
|
|
520
697
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
521
698
|
const responseBody = await response.json();
|
|
522
699
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
523
|
-
return
|
|
700
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
701
|
+
...responseFields$,
|
|
702
|
+
...val$,
|
|
703
|
+
});
|
|
524
704
|
}, "Response validation failed");
|
|
525
|
-
|
|
705
|
+
throw result;
|
|
526
706
|
}
|
|
527
707
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
528
708
|
const responseBody = await response.json();
|
|
529
709
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
530
|
-
return
|
|
710
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
711
|
+
...responseFields$,
|
|
712
|
+
...val$,
|
|
713
|
+
});
|
|
531
714
|
}, "Response validation failed");
|
|
532
|
-
|
|
715
|
+
throw result;
|
|
533
716
|
}
|
|
534
717
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
535
718
|
const responseBody = await response.json();
|
|
536
719
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
537
|
-
return
|
|
720
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
721
|
+
...responseFields$,
|
|
722
|
+
...val$,
|
|
723
|
+
});
|
|
538
724
|
}, "Response validation failed");
|
|
539
|
-
|
|
725
|
+
throw result;
|
|
540
726
|
}
|
|
541
727
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
542
728
|
const responseBody = await response.json();
|
|
543
729
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
544
|
-
return
|
|
730
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
731
|
+
...responseFields$,
|
|
732
|
+
...val$,
|
|
733
|
+
});
|
|
545
734
|
}, "Response validation failed");
|
|
546
|
-
|
|
735
|
+
throw result;
|
|
547
736
|
}
|
|
548
737
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
549
738
|
const responseBody = await response.json();
|
|
550
739
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
551
|
-
return
|
|
740
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
741
|
+
...responseFields$,
|
|
742
|
+
...val$,
|
|
743
|
+
});
|
|
552
744
|
}, "Response validation failed");
|
|
553
|
-
|
|
745
|
+
throw result;
|
|
554
746
|
}
|
|
555
747
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
556
748
|
const responseBody = await response.json();
|
|
557
749
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
558
|
-
return
|
|
750
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
751
|
+
...responseFields$,
|
|
752
|
+
...val$,
|
|
753
|
+
});
|
|
559
754
|
}, "Response validation failed");
|
|
560
|
-
|
|
755
|
+
throw result;
|
|
561
756
|
}
|
|
562
757
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
563
758
|
const responseBody = await response.json();
|
|
564
759
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
565
|
-
return
|
|
760
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
761
|
+
...responseFields$,
|
|
762
|
+
...val$,
|
|
763
|
+
});
|
|
566
764
|
}, "Response validation failed");
|
|
567
|
-
|
|
765
|
+
throw result;
|
|
568
766
|
}
|
|
569
767
|
else {
|
|
570
768
|
const responseBody = await response.text();
|
|
@@ -618,7 +816,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
618
816
|
securitySource: this.options$.token,
|
|
619
817
|
};
|
|
620
818
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
621
|
-
const doOptions = {
|
|
819
|
+
const doOptions = {
|
|
820
|
+
context,
|
|
821
|
+
errorCodes: [
|
|
822
|
+
"400",
|
|
823
|
+
"401",
|
|
824
|
+
"403",
|
|
825
|
+
"404",
|
|
826
|
+
"409",
|
|
827
|
+
"410",
|
|
828
|
+
"422",
|
|
829
|
+
"429",
|
|
830
|
+
"4XX",
|
|
831
|
+
"500",
|
|
832
|
+
"5XX",
|
|
833
|
+
],
|
|
834
|
+
};
|
|
622
835
|
const request = this.createRequest$({
|
|
623
836
|
security: securitySettings$,
|
|
624
837
|
method: "POST",
|
|
@@ -628,75 +841,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
628
841
|
body: body$,
|
|
629
842
|
}, options);
|
|
630
843
|
const response = await this.do$(request, doOptions);
|
|
844
|
+
const responseFields$ = {
|
|
845
|
+
HttpMeta: {
|
|
846
|
+
Response: response,
|
|
847
|
+
Request: request,
|
|
848
|
+
},
|
|
849
|
+
};
|
|
631
850
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
632
851
|
const responseBody = await response.json();
|
|
633
852
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
634
|
-
return
|
|
853
|
+
return components.DomainSchema$.inboundSchema.parse(val$);
|
|
635
854
|
}, "Response validation failed");
|
|
636
855
|
return result;
|
|
637
856
|
}
|
|
638
857
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
639
858
|
const responseBody = await response.json();
|
|
640
859
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
641
|
-
return
|
|
860
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
861
|
+
...responseFields$,
|
|
862
|
+
...val$,
|
|
863
|
+
});
|
|
642
864
|
}, "Response validation failed");
|
|
643
|
-
|
|
865
|
+
throw result;
|
|
644
866
|
}
|
|
645
867
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
646
868
|
const responseBody = await response.json();
|
|
647
869
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
648
|
-
return
|
|
870
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
871
|
+
...responseFields$,
|
|
872
|
+
...val$,
|
|
873
|
+
});
|
|
649
874
|
}, "Response validation failed");
|
|
650
|
-
|
|
875
|
+
throw result;
|
|
651
876
|
}
|
|
652
877
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
653
878
|
const responseBody = await response.json();
|
|
654
879
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
655
|
-
return
|
|
880
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
881
|
+
...responseFields$,
|
|
882
|
+
...val$,
|
|
883
|
+
});
|
|
656
884
|
}, "Response validation failed");
|
|
657
|
-
|
|
885
|
+
throw result;
|
|
658
886
|
}
|
|
659
887
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
660
888
|
const responseBody = await response.json();
|
|
661
889
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
662
|
-
return
|
|
890
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
891
|
+
...responseFields$,
|
|
892
|
+
...val$,
|
|
893
|
+
});
|
|
663
894
|
}, "Response validation failed");
|
|
664
|
-
|
|
895
|
+
throw result;
|
|
665
896
|
}
|
|
666
897
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
667
898
|
const responseBody = await response.json();
|
|
668
899
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
669
|
-
return
|
|
900
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
901
|
+
...responseFields$,
|
|
902
|
+
...val$,
|
|
903
|
+
});
|
|
670
904
|
}, "Response validation failed");
|
|
671
|
-
|
|
905
|
+
throw result;
|
|
672
906
|
}
|
|
673
907
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
674
908
|
const responseBody = await response.json();
|
|
675
909
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
676
|
-
return
|
|
910
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
911
|
+
...responseFields$,
|
|
912
|
+
...val$,
|
|
913
|
+
});
|
|
677
914
|
}, "Response validation failed");
|
|
678
|
-
|
|
915
|
+
throw result;
|
|
679
916
|
}
|
|
680
917
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
681
918
|
const responseBody = await response.json();
|
|
682
919
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
683
|
-
return
|
|
920
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
921
|
+
...responseFields$,
|
|
922
|
+
...val$,
|
|
923
|
+
});
|
|
684
924
|
}, "Response validation failed");
|
|
685
|
-
|
|
925
|
+
throw result;
|
|
686
926
|
}
|
|
687
927
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
688
928
|
const responseBody = await response.json();
|
|
689
929
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
690
|
-
return
|
|
930
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
931
|
+
...responseFields$,
|
|
932
|
+
...val$,
|
|
933
|
+
});
|
|
691
934
|
}, "Response validation failed");
|
|
692
|
-
|
|
935
|
+
throw result;
|
|
693
936
|
}
|
|
694
937
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
695
938
|
const responseBody = await response.json();
|
|
696
939
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
697
|
-
return
|
|
940
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
941
|
+
...responseFields$,
|
|
942
|
+
...val$,
|
|
943
|
+
});
|
|
698
944
|
}, "Response validation failed");
|
|
699
|
-
|
|
945
|
+
throw result;
|
|
700
946
|
}
|
|
701
947
|
else {
|
|
702
948
|
const responseBody = await response.text();
|
|
@@ -709,12 +955,16 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
709
955
|
* @remarks
|
|
710
956
|
* Transfer a domain to another workspace within the authenticated account.
|
|
711
957
|
*/
|
|
712
|
-
async transfer(
|
|
958
|
+
async transfer(slug, requestBody, options) {
|
|
959
|
+
const input$ = {
|
|
960
|
+
slug: slug,
|
|
961
|
+
requestBody: requestBody,
|
|
962
|
+
};
|
|
713
963
|
const headers$ = new Headers();
|
|
714
964
|
headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
|
|
715
965
|
headers$.set("Content-Type", "application/json");
|
|
716
966
|
headers$.set("Accept", "application/json");
|
|
717
|
-
const payload$ = schemas$.parse(input
|
|
967
|
+
const payload$ = schemas$.parse(input$, (value$) => operations.TransferDomainRequest$.outboundSchema.parse(value$), "Input validation failed");
|
|
718
968
|
const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
|
|
719
969
|
const pathParams$ = {
|
|
720
970
|
slug: enc$.encodeSimple("slug", payload$.slug, {
|
|
@@ -751,7 +1001,22 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
751
1001
|
securitySource: this.options$.token,
|
|
752
1002
|
};
|
|
753
1003
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
754
|
-
const doOptions = {
|
|
1004
|
+
const doOptions = {
|
|
1005
|
+
context,
|
|
1006
|
+
errorCodes: [
|
|
1007
|
+
"400",
|
|
1008
|
+
"401",
|
|
1009
|
+
"403",
|
|
1010
|
+
"404",
|
|
1011
|
+
"409",
|
|
1012
|
+
"410",
|
|
1013
|
+
"422",
|
|
1014
|
+
"429",
|
|
1015
|
+
"4XX",
|
|
1016
|
+
"500",
|
|
1017
|
+
"5XX",
|
|
1018
|
+
],
|
|
1019
|
+
};
|
|
755
1020
|
const request = this.createRequest$({
|
|
756
1021
|
security: securitySettings$,
|
|
757
1022
|
method: "POST",
|
|
@@ -761,75 +1026,108 @@ class Domains extends sdks_1.ClientSDK {
|
|
|
761
1026
|
body: body$,
|
|
762
1027
|
}, options);
|
|
763
1028
|
const response = await this.do$(request, doOptions);
|
|
1029
|
+
const responseFields$ = {
|
|
1030
|
+
HttpMeta: {
|
|
1031
|
+
Response: response,
|
|
1032
|
+
Request: request,
|
|
1033
|
+
},
|
|
1034
|
+
};
|
|
764
1035
|
if (this.matchResponse(response, 200, "application/json")) {
|
|
765
1036
|
const responseBody = await response.json();
|
|
766
1037
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
767
|
-
return
|
|
1038
|
+
return components.DomainSchema$.inboundSchema.parse(val$);
|
|
768
1039
|
}, "Response validation failed");
|
|
769
1040
|
return result;
|
|
770
1041
|
}
|
|
771
1042
|
else if (this.matchResponse(response, 400, "application/json")) {
|
|
772
1043
|
const responseBody = await response.json();
|
|
773
1044
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
774
|
-
return
|
|
1045
|
+
return errors.BadRequest$.inboundSchema.parse({
|
|
1046
|
+
...responseFields$,
|
|
1047
|
+
...val$,
|
|
1048
|
+
});
|
|
775
1049
|
}, "Response validation failed");
|
|
776
|
-
|
|
1050
|
+
throw result;
|
|
777
1051
|
}
|
|
778
1052
|
else if (this.matchResponse(response, 401, "application/json")) {
|
|
779
1053
|
const responseBody = await response.json();
|
|
780
1054
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
781
|
-
return
|
|
1055
|
+
return errors.Unauthorized$.inboundSchema.parse({
|
|
1056
|
+
...responseFields$,
|
|
1057
|
+
...val$,
|
|
1058
|
+
});
|
|
782
1059
|
}, "Response validation failed");
|
|
783
|
-
|
|
1060
|
+
throw result;
|
|
784
1061
|
}
|
|
785
1062
|
else if (this.matchResponse(response, 403, "application/json")) {
|
|
786
1063
|
const responseBody = await response.json();
|
|
787
1064
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
788
|
-
return
|
|
1065
|
+
return errors.Forbidden$.inboundSchema.parse({
|
|
1066
|
+
...responseFields$,
|
|
1067
|
+
...val$,
|
|
1068
|
+
});
|
|
789
1069
|
}, "Response validation failed");
|
|
790
|
-
|
|
1070
|
+
throw result;
|
|
791
1071
|
}
|
|
792
1072
|
else if (this.matchResponse(response, 404, "application/json")) {
|
|
793
1073
|
const responseBody = await response.json();
|
|
794
1074
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
795
|
-
return
|
|
1075
|
+
return errors.NotFound$.inboundSchema.parse({
|
|
1076
|
+
...responseFields$,
|
|
1077
|
+
...val$,
|
|
1078
|
+
});
|
|
796
1079
|
}, "Response validation failed");
|
|
797
|
-
|
|
1080
|
+
throw result;
|
|
798
1081
|
}
|
|
799
1082
|
else if (this.matchResponse(response, 409, "application/json")) {
|
|
800
1083
|
const responseBody = await response.json();
|
|
801
1084
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
802
|
-
return
|
|
1085
|
+
return errors.Conflict$.inboundSchema.parse({
|
|
1086
|
+
...responseFields$,
|
|
1087
|
+
...val$,
|
|
1088
|
+
});
|
|
803
1089
|
}, "Response validation failed");
|
|
804
|
-
|
|
1090
|
+
throw result;
|
|
805
1091
|
}
|
|
806
1092
|
else if (this.matchResponse(response, 410, "application/json")) {
|
|
807
1093
|
const responseBody = await response.json();
|
|
808
1094
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
809
|
-
return
|
|
1095
|
+
return errors.InviteExpired$.inboundSchema.parse({
|
|
1096
|
+
...responseFields$,
|
|
1097
|
+
...val$,
|
|
1098
|
+
});
|
|
810
1099
|
}, "Response validation failed");
|
|
811
|
-
|
|
1100
|
+
throw result;
|
|
812
1101
|
}
|
|
813
1102
|
else if (this.matchResponse(response, 422, "application/json")) {
|
|
814
1103
|
const responseBody = await response.json();
|
|
815
1104
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
816
|
-
return
|
|
1105
|
+
return errors.UnprocessableEntity$.inboundSchema.parse({
|
|
1106
|
+
...responseFields$,
|
|
1107
|
+
...val$,
|
|
1108
|
+
});
|
|
817
1109
|
}, "Response validation failed");
|
|
818
|
-
|
|
1110
|
+
throw result;
|
|
819
1111
|
}
|
|
820
1112
|
else if (this.matchResponse(response, 429, "application/json")) {
|
|
821
1113
|
const responseBody = await response.json();
|
|
822
1114
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
823
|
-
return
|
|
1115
|
+
return errors.RateLimitExceeded$.inboundSchema.parse({
|
|
1116
|
+
...responseFields$,
|
|
1117
|
+
...val$,
|
|
1118
|
+
});
|
|
824
1119
|
}, "Response validation failed");
|
|
825
|
-
|
|
1120
|
+
throw result;
|
|
826
1121
|
}
|
|
827
1122
|
else if (this.matchResponse(response, 500, "application/json")) {
|
|
828
1123
|
const responseBody = await response.json();
|
|
829
1124
|
const result = schemas$.parse(responseBody, (val$) => {
|
|
830
|
-
return
|
|
1125
|
+
return errors.InternalServerError$.inboundSchema.parse({
|
|
1126
|
+
...responseFields$,
|
|
1127
|
+
...val$,
|
|
1128
|
+
});
|
|
831
1129
|
}, "Response validation failed");
|
|
832
|
-
|
|
1130
|
+
throw result;
|
|
833
1131
|
}
|
|
834
1132
|
else {
|
|
835
1133
|
const responseBody = await response.text();
|