@researchdatabox/raido-openapi-generated-node 0.0.1

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.
Files changed (62) hide show
  1. package/README.md +3 -0
  2. package/dist/api/adminExperimentalApi.js +1092 -0
  3. package/dist/api/apis.js +39 -0
  4. package/dist/api/basicRaidExperimentalApi.js +423 -0
  5. package/dist/api/publicExperimentalApi.js +264 -0
  6. package/dist/api/unauthzExperimentalApi.js +147 -0
  7. package/dist/api.js +19 -0
  8. package/dist/model/accessBlock.js +35 -0
  9. package/dist/model/accessType.js +19 -0
  10. package/dist/model/alternateUrlBlock.js +29 -0
  11. package/dist/model/apiKey.js +74 -0
  12. package/dist/model/appUser.js +83 -0
  13. package/dist/model/appUserExtraV1.js +44 -0
  14. package/dist/model/authzRequestExtraV1.js +104 -0
  15. package/dist/model/authzRequestStatus.js +20 -0
  16. package/dist/model/contributorBlock.js +47 -0
  17. package/dist/model/contributorIdentifierSchemeType.js +18 -0
  18. package/dist/model/contributorPosition.js +47 -0
  19. package/dist/model/contributorPositionRaidMetadataSchemaType.js +22 -0
  20. package/dist/model/contributorPositionSchemeType.js +18 -0
  21. package/dist/model/contributorRole.js +35 -0
  22. package/dist/model/contributorRoleCreditNisoOrgType.js +31 -0
  23. package/dist/model/contributorRoleSchemeType.js +18 -0
  24. package/dist/model/datesBlock.js +35 -0
  25. package/dist/model/descriptionBlock.js +35 -0
  26. package/dist/model/descriptionType.js +19 -0
  27. package/dist/model/generateApiTokenRequest.js +29 -0
  28. package/dist/model/generateApiTokenResponse.js +35 -0
  29. package/dist/model/idBlock.js +65 -0
  30. package/dist/model/legacyMetadataSchemaV1.js +68 -0
  31. package/dist/model/migrateLegacyRaidRequest.js +35 -0
  32. package/dist/model/migrateLegacyRaidRequestMintRequest.js +41 -0
  33. package/dist/model/mintRaidoSchemaV1Request.js +38 -0
  34. package/dist/model/mintRaidoSchemaV1RequestMintRequest.js +32 -0
  35. package/dist/model/mintResponse.js +41 -0
  36. package/dist/model/models.js +374 -0
  37. package/dist/model/organisationBlock.js +41 -0
  38. package/dist/model/organisationIdentifierSchemeType.js +18 -0
  39. package/dist/model/organisationRole.js +47 -0
  40. package/dist/model/organisationRoleSchemeType.js +18 -0
  41. package/dist/model/organisationRoleType.js +22 -0
  42. package/dist/model/publicClosedMetadataSchemaV1.js +41 -0
  43. package/dist/model/publicRaidMetadataSchemaV1.js +80 -0
  44. package/dist/model/publicReadRaidMetadataResponseV1.js +80 -0
  45. package/dist/model/publicReadRaidResponseV3.js +56 -0
  46. package/dist/model/publicServicePoint.js +38 -0
  47. package/dist/model/raidListItemV2.js +53 -0
  48. package/dist/model/raidListRequestV2.js +35 -0
  49. package/dist/model/raidoMetadataSchemaV1.js +80 -0
  50. package/dist/model/raidoMetaschema.js +22 -0
  51. package/dist/model/readRaidResponseV2.js +71 -0
  52. package/dist/model/readRaidV2Request.js +29 -0
  53. package/dist/model/servicePoint.js +62 -0
  54. package/dist/model/titleBlock.js +47 -0
  55. package/dist/model/titleType.js +19 -0
  56. package/dist/model/updateAuthzRequest.js +38 -0
  57. package/dist/model/updateAuthzRequestStatus.js +44 -0
  58. package/dist/model/updateAuthzResponse.js +29 -0
  59. package/dist/model/updateRaidoSchemaV1Request.js +29 -0
  60. package/dist/model/validationFailure.js +41 -0
  61. package/dist/model/versionResult.js +47 -0
  62. package/package.json +24 -0
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.APIS = exports.HttpError = void 0;
18
+ __exportStar(require("./adminExperimentalApi"), exports);
19
+ const adminExperimentalApi_1 = require("./adminExperimentalApi");
20
+ __exportStar(require("./basicRaidExperimentalApi"), exports);
21
+ const basicRaidExperimentalApi_1 = require("./basicRaidExperimentalApi");
22
+ __exportStar(require("./publicExperimentalApi"), exports);
23
+ const publicExperimentalApi_1 = require("./publicExperimentalApi");
24
+ __exportStar(require("./unauthzExperimentalApi"), exports);
25
+ const unauthzExperimentalApi_1 = require("./unauthzExperimentalApi");
26
+ class HttpError extends Error {
27
+ response;
28
+ body;
29
+ statusCode;
30
+ constructor(response, body, statusCode) {
31
+ super('HTTP request failed');
32
+ this.response = response;
33
+ this.body = body;
34
+ this.statusCode = statusCode;
35
+ this.name = 'HttpError';
36
+ }
37
+ }
38
+ exports.HttpError = HttpError;
39
+ exports.APIS = [adminExperimentalApi_1.AdminExperimentalApi, basicRaidExperimentalApi_1.BasicRaidExperimentalApi, publicExperimentalApi_1.PublicExperimentalApi, unauthzExperimentalApi_1.UnauthzExperimentalApi];
@@ -0,0 +1,423 @@
1
+ "use strict";
2
+ /**
3
+ * RAID v2 API
4
+ * This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application (not this project).
5
+ *
6
+ * The version of the OpenAPI document: 2.0.0
7
+ * Contact: contact@raid.org
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.BasicRaidExperimentalApi = exports.BasicRaidExperimentalApiApiKeys = void 0;
18
+ const request_1 = __importDefault(require("request"));
19
+ const models_1 = require("../model/models");
20
+ const models_2 = require("../model/models");
21
+ const apis_1 = require("./apis");
22
+ let defaultBasePath = 'https://demo.raido-infra.com';
23
+ // ===============================================
24
+ // This file is autogenerated - Please do not edit
25
+ // ===============================================
26
+ var BasicRaidExperimentalApiApiKeys;
27
+ (function (BasicRaidExperimentalApiApiKeys) {
28
+ })(BasicRaidExperimentalApiApiKeys = exports.BasicRaidExperimentalApiApiKeys || (exports.BasicRaidExperimentalApiApiKeys = {}));
29
+ class BasicRaidExperimentalApi {
30
+ _basePath = defaultBasePath;
31
+ _defaultHeaders = {};
32
+ _useQuerystring = false;
33
+ authentications = {
34
+ 'default': new models_1.VoidAuth(),
35
+ 'BearerAuth': new models_2.HttpBearerAuth(),
36
+ };
37
+ interceptors = [];
38
+ constructor(basePathOrUsername, password, basePath) {
39
+ if (password) {
40
+ if (basePath) {
41
+ this.basePath = basePath;
42
+ }
43
+ }
44
+ else {
45
+ if (basePathOrUsername) {
46
+ this.basePath = basePathOrUsername;
47
+ }
48
+ }
49
+ }
50
+ set useQuerystring(value) {
51
+ this._useQuerystring = value;
52
+ }
53
+ set basePath(basePath) {
54
+ this._basePath = basePath;
55
+ }
56
+ set defaultHeaders(defaultHeaders) {
57
+ this._defaultHeaders = defaultHeaders;
58
+ }
59
+ get defaultHeaders() {
60
+ return this._defaultHeaders;
61
+ }
62
+ get basePath() {
63
+ return this._basePath;
64
+ }
65
+ setDefaultAuthentication(auth) {
66
+ this.authentications.default = auth;
67
+ }
68
+ setApiKey(key, value) {
69
+ this.authentications[BasicRaidExperimentalApiApiKeys[key]].apiKey = value;
70
+ }
71
+ set accessToken(accessToken) {
72
+ this.authentications.BearerAuth.accessToken = accessToken;
73
+ }
74
+ addInterceptor(interceptor) {
75
+ this.interceptors.push(interceptor);
76
+ }
77
+ /**
78
+ *
79
+ * @summary list raids
80
+ * @param raidListRequestV2
81
+ */
82
+ async listRaidV2(raidListRequestV2, options = { headers: {} }) {
83
+ const localVarPath = this.basePath + '/v2/experimental/list-raid/v2';
84
+ let localVarQueryParameters = {};
85
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
86
+ const produces = ['application/json'];
87
+ // give precedence to 'application/json'
88
+ if (produces.indexOf('application/json') >= 0) {
89
+ localVarHeaderParams.Accept = 'application/json';
90
+ }
91
+ else {
92
+ localVarHeaderParams.Accept = produces.join(',');
93
+ }
94
+ let localVarFormParams = {};
95
+ // verify required parameter 'raidListRequestV2' is not null or undefined
96
+ if (raidListRequestV2 === null || raidListRequestV2 === undefined) {
97
+ throw new Error('Required parameter raidListRequestV2 was null or undefined when calling listRaidV2.');
98
+ }
99
+ Object.assign(localVarHeaderParams, options.headers);
100
+ let localVarUseFormData = false;
101
+ let localVarRequestOptions = {
102
+ method: 'POST',
103
+ qs: localVarQueryParameters,
104
+ headers: localVarHeaderParams,
105
+ uri: localVarPath,
106
+ useQuerystring: this._useQuerystring,
107
+ json: true,
108
+ body: models_1.ObjectSerializer.serialize(raidListRequestV2, "RaidListRequestV2")
109
+ };
110
+ let authenticationPromise = Promise.resolve();
111
+ if (this.authentications.BearerAuth.accessToken) {
112
+ authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
113
+ }
114
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
115
+ let interceptorPromise = authenticationPromise;
116
+ for (const interceptor of this.interceptors) {
117
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
118
+ }
119
+ return interceptorPromise.then(() => {
120
+ if (Object.keys(localVarFormParams).length) {
121
+ if (localVarUseFormData) {
122
+ localVarRequestOptions.formData = localVarFormParams;
123
+ }
124
+ else {
125
+ localVarRequestOptions.form = localVarFormParams;
126
+ }
127
+ }
128
+ return new Promise((resolve, reject) => {
129
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
130
+ if (error) {
131
+ reject(error);
132
+ }
133
+ else {
134
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
135
+ body = models_1.ObjectSerializer.deserialize(body, "Array<RaidListItemV2>");
136
+ resolve({ response: response, body: body });
137
+ }
138
+ else {
139
+ reject(new apis_1.HttpError(response, body, response.statusCode));
140
+ }
141
+ }
142
+ });
143
+ });
144
+ });
145
+ }
146
+ /**
147
+ *
148
+ * @summary mint a raido-metadata-schema-v1 raid
149
+ * @param mintRaidoSchemaV1Request
150
+ */
151
+ async mintRaidoSchemaV1(mintRaidoSchemaV1Request, options = { headers: {} }) {
152
+ const localVarPath = this.basePath + '/v2/experimental/mint-raido-schema/v1';
153
+ let localVarQueryParameters = {};
154
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
155
+ const produces = ['application/json'];
156
+ // give precedence to 'application/json'
157
+ if (produces.indexOf('application/json') >= 0) {
158
+ localVarHeaderParams.Accept = 'application/json';
159
+ }
160
+ else {
161
+ localVarHeaderParams.Accept = produces.join(',');
162
+ }
163
+ let localVarFormParams = {};
164
+ // verify required parameter 'mintRaidoSchemaV1Request' is not null or undefined
165
+ if (mintRaidoSchemaV1Request === null || mintRaidoSchemaV1Request === undefined) {
166
+ throw new Error('Required parameter mintRaidoSchemaV1Request was null or undefined when calling mintRaidoSchemaV1.');
167
+ }
168
+ Object.assign(localVarHeaderParams, options.headers);
169
+ let localVarUseFormData = false;
170
+ let localVarRequestOptions = {
171
+ method: 'POST',
172
+ qs: localVarQueryParameters,
173
+ headers: localVarHeaderParams,
174
+ uri: localVarPath,
175
+ useQuerystring: this._useQuerystring,
176
+ json: true,
177
+ body: models_1.ObjectSerializer.serialize(mintRaidoSchemaV1Request, "MintRaidoSchemaV1Request")
178
+ };
179
+ let authenticationPromise = Promise.resolve();
180
+ if (this.authentications.BearerAuth.accessToken) {
181
+ authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
182
+ }
183
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
184
+ let interceptorPromise = authenticationPromise;
185
+ for (const interceptor of this.interceptors) {
186
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
187
+ }
188
+ return interceptorPromise.then(() => {
189
+ if (Object.keys(localVarFormParams).length) {
190
+ if (localVarUseFormData) {
191
+ localVarRequestOptions.formData = localVarFormParams;
192
+ }
193
+ else {
194
+ localVarRequestOptions.form = localVarFormParams;
195
+ }
196
+ }
197
+ return new Promise((resolve, reject) => {
198
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
199
+ if (error) {
200
+ reject(error);
201
+ }
202
+ else {
203
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
204
+ body = models_1.ObjectSerializer.deserialize(body, "MintResponse");
205
+ resolve({ response: response, body: body });
206
+ }
207
+ else {
208
+ reject(new apis_1.HttpError(response, body, response.statusCode));
209
+ }
210
+ }
211
+ });
212
+ });
213
+ });
214
+ }
215
+ /**
216
+ *
217
+ * @summary read a raid, caller must be authorized
218
+ * @param readRaidV2Request
219
+ */
220
+ async readRaidV2(readRaidV2Request, options = { headers: {} }) {
221
+ const localVarPath = this.basePath + '/v2/experimental/read-raid/v2';
222
+ let localVarQueryParameters = {};
223
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
224
+ const produces = ['application/json'];
225
+ // give precedence to 'application/json'
226
+ if (produces.indexOf('application/json') >= 0) {
227
+ localVarHeaderParams.Accept = 'application/json';
228
+ }
229
+ else {
230
+ localVarHeaderParams.Accept = produces.join(',');
231
+ }
232
+ let localVarFormParams = {};
233
+ // verify required parameter 'readRaidV2Request' is not null or undefined
234
+ if (readRaidV2Request === null || readRaidV2Request === undefined) {
235
+ throw new Error('Required parameter readRaidV2Request was null or undefined when calling readRaidV2.');
236
+ }
237
+ Object.assign(localVarHeaderParams, options.headers);
238
+ let localVarUseFormData = false;
239
+ let localVarRequestOptions = {
240
+ method: 'POST',
241
+ qs: localVarQueryParameters,
242
+ headers: localVarHeaderParams,
243
+ uri: localVarPath,
244
+ useQuerystring: this._useQuerystring,
245
+ json: true,
246
+ body: models_1.ObjectSerializer.serialize(readRaidV2Request, "ReadRaidV2Request")
247
+ };
248
+ let authenticationPromise = Promise.resolve();
249
+ if (this.authentications.BearerAuth.accessToken) {
250
+ authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
251
+ }
252
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
253
+ let interceptorPromise = authenticationPromise;
254
+ for (const interceptor of this.interceptors) {
255
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
256
+ }
257
+ return interceptorPromise.then(() => {
258
+ if (Object.keys(localVarFormParams).length) {
259
+ if (localVarUseFormData) {
260
+ localVarRequestOptions.formData = localVarFormParams;
261
+ }
262
+ else {
263
+ localVarRequestOptions.form = localVarFormParams;
264
+ }
265
+ }
266
+ return new Promise((resolve, reject) => {
267
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
268
+ if (error) {
269
+ reject(error);
270
+ }
271
+ else {
272
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
273
+ body = models_1.ObjectSerializer.deserialize(body, "ReadRaidResponseV2");
274
+ resolve({ response: response, body: body });
275
+ }
276
+ else {
277
+ reject(new apis_1.HttpError(response, body, response.statusCode));
278
+ }
279
+ }
280
+ });
281
+ });
282
+ });
283
+ }
284
+ /**
285
+ *
286
+ * @summary update a raido-metadata-schema-v1 raid
287
+ * @param updateRaidoSchemaV1Request
288
+ */
289
+ async updateRaidoSchemaV1(updateRaidoSchemaV1Request, options = { headers: {} }) {
290
+ const localVarPath = this.basePath + '/v2/experimental/update-raido-schema/v1';
291
+ let localVarQueryParameters = {};
292
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
293
+ const produces = ['application/json'];
294
+ // give precedence to 'application/json'
295
+ if (produces.indexOf('application/json') >= 0) {
296
+ localVarHeaderParams.Accept = 'application/json';
297
+ }
298
+ else {
299
+ localVarHeaderParams.Accept = produces.join(',');
300
+ }
301
+ let localVarFormParams = {};
302
+ // verify required parameter 'updateRaidoSchemaV1Request' is not null or undefined
303
+ if (updateRaidoSchemaV1Request === null || updateRaidoSchemaV1Request === undefined) {
304
+ throw new Error('Required parameter updateRaidoSchemaV1Request was null or undefined when calling updateRaidoSchemaV1.');
305
+ }
306
+ Object.assign(localVarHeaderParams, options.headers);
307
+ let localVarUseFormData = false;
308
+ let localVarRequestOptions = {
309
+ method: 'POST',
310
+ qs: localVarQueryParameters,
311
+ headers: localVarHeaderParams,
312
+ uri: localVarPath,
313
+ useQuerystring: this._useQuerystring,
314
+ json: true,
315
+ body: models_1.ObjectSerializer.serialize(updateRaidoSchemaV1Request, "UpdateRaidoSchemaV1Request")
316
+ };
317
+ let authenticationPromise = Promise.resolve();
318
+ if (this.authentications.BearerAuth.accessToken) {
319
+ authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
320
+ }
321
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
322
+ let interceptorPromise = authenticationPromise;
323
+ for (const interceptor of this.interceptors) {
324
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
325
+ }
326
+ return interceptorPromise.then(() => {
327
+ if (Object.keys(localVarFormParams).length) {
328
+ if (localVarUseFormData) {
329
+ localVarRequestOptions.formData = localVarFormParams;
330
+ }
331
+ else {
332
+ localVarRequestOptions.form = localVarFormParams;
333
+ }
334
+ }
335
+ return new Promise((resolve, reject) => {
336
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
337
+ if (error) {
338
+ reject(error);
339
+ }
340
+ else {
341
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
342
+ body = models_1.ObjectSerializer.deserialize(body, "MintResponse");
343
+ resolve({ response: response, body: body });
344
+ }
345
+ else {
346
+ reject(new apis_1.HttpError(response, body, response.statusCode));
347
+ }
348
+ }
349
+ });
350
+ });
351
+ });
352
+ }
353
+ /**
354
+ *
355
+ * @summary upgrade (i.e. change the schema) of a legacy raid to be a raido-metadata-schema-v1 raid, but supplying the missing data
356
+ * @param updateRaidoSchemaV1Request
357
+ */
358
+ async upgradeLegacyToRaidoSchema(updateRaidoSchemaV1Request, options = { headers: {} }) {
359
+ const localVarPath = this.basePath + '/v2/experimental/upgrade-legacy-to-raido-schema/v1';
360
+ let localVarQueryParameters = {};
361
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
362
+ const produces = ['application/json'];
363
+ // give precedence to 'application/json'
364
+ if (produces.indexOf('application/json') >= 0) {
365
+ localVarHeaderParams.Accept = 'application/json';
366
+ }
367
+ else {
368
+ localVarHeaderParams.Accept = produces.join(',');
369
+ }
370
+ let localVarFormParams = {};
371
+ // verify required parameter 'updateRaidoSchemaV1Request' is not null or undefined
372
+ if (updateRaidoSchemaV1Request === null || updateRaidoSchemaV1Request === undefined) {
373
+ throw new Error('Required parameter updateRaidoSchemaV1Request was null or undefined when calling upgradeLegacyToRaidoSchema.');
374
+ }
375
+ Object.assign(localVarHeaderParams, options.headers);
376
+ let localVarUseFormData = false;
377
+ let localVarRequestOptions = {
378
+ method: 'POST',
379
+ qs: localVarQueryParameters,
380
+ headers: localVarHeaderParams,
381
+ uri: localVarPath,
382
+ useQuerystring: this._useQuerystring,
383
+ json: true,
384
+ body: models_1.ObjectSerializer.serialize(updateRaidoSchemaV1Request, "UpdateRaidoSchemaV1Request")
385
+ };
386
+ let authenticationPromise = Promise.resolve();
387
+ if (this.authentications.BearerAuth.accessToken) {
388
+ authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
389
+ }
390
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
391
+ let interceptorPromise = authenticationPromise;
392
+ for (const interceptor of this.interceptors) {
393
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
394
+ }
395
+ return interceptorPromise.then(() => {
396
+ if (Object.keys(localVarFormParams).length) {
397
+ if (localVarUseFormData) {
398
+ localVarRequestOptions.formData = localVarFormParams;
399
+ }
400
+ else {
401
+ localVarRequestOptions.form = localVarFormParams;
402
+ }
403
+ }
404
+ return new Promise((resolve, reject) => {
405
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
406
+ if (error) {
407
+ reject(error);
408
+ }
409
+ else {
410
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
411
+ body = models_1.ObjectSerializer.deserialize(body, "MintResponse");
412
+ resolve({ response: response, body: body });
413
+ }
414
+ else {
415
+ reject(new apis_1.HttpError(response, body, response.statusCode));
416
+ }
417
+ }
418
+ });
419
+ });
420
+ });
421
+ }
422
+ }
423
+ exports.BasicRaidExperimentalApi = BasicRaidExperimentalApi;