@researchdatabox/raido-openapi-generated-node 0.0.2 → 0.0.3
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/dist/api/apis.js +5 -11
- package/dist/api/{basicRaidExperimentalApi.js → raidApi.js} +81 -190
- package/dist/api/{raidoStableV1Api.js → servicePointApi.js} +40 -59
- package/dist/model/access.js +5 -5
- package/dist/model/accessStatement.js +1 -1
- package/dist/model/accessType.js +22 -6
- package/dist/model/alternateIdentifier.js +1 -1
- package/dist/model/alternateUrl.js +1 -1
- package/dist/model/closedRaid.js +1 -1
- package/dist/model/contributor.js +3 -3
- package/dist/model/contributorPosition.js +9 -9
- package/dist/model/contributorRole.js +9 -9
- package/dist/model/description.js +2 -2
- package/dist/model/descriptionType.js +22 -6
- package/dist/model/failureResponse.js +1 -1
- package/dist/model/id.js +1 -10
- package/dist/model/language.js +1 -1
- package/dist/model/modelDate.js +1 -1
- package/dist/model/models.js +16 -188
- package/dist/model/organisation.js +2 -2
- package/dist/model/organisationRole.js +9 -9
- package/dist/model/owner.js +1 -1
- package/dist/model/{raidListItemV2.js → raidChange.js} +21 -21
- package/dist/model/raidCreateRequest.js +1 -1
- package/dist/model/raidDto.js +1 -1
- package/dist/model/raidUpdateRequest.js +1 -1
- package/dist/model/registrationAgency.js +1 -1
- package/dist/model/relatedObject.js +2 -2
- package/dist/model/relatedObjectCategory.js +1 -1
- package/dist/model/relatedObjectType.js +1 -1
- package/dist/model/relatedRaid.js +1 -1
- package/dist/model/relatedRaidType.js +1 -1
- package/dist/model/servicePoint.js +19 -1
- package/dist/model/servicePointCreateRequest.js +104 -0
- package/dist/model/servicePointUpdateRequest.js +113 -0
- package/dist/model/spatialCoverage.js +2 -8
- package/dist/model/{updateRaidoSchemaV2Request.js → spatialCoveragePlace.js} +15 -9
- package/dist/model/subject.js +1 -1
- package/dist/model/subjectKeyword.js +1 -1
- package/dist/model/title.js +2 -2
- package/dist/model/titleType.js +22 -6
- package/dist/model/traditionalKnowledgeLabel.js +1 -1
- package/dist/model/validationFailure.js +1 -1
- package/dist/model/validationFailureResponse.js +1 -1
- package/package.json +3 -3
- package/dist/api/adminExperimentalApi.js +0 -1092
- package/dist/api/publicExperimentalApi.js +0 -264
- package/dist/api/unapprovedExperimentalApi.js +0 -147
- package/dist/model/accessBlock.js +0 -35
- package/dist/model/accessTypeWithSchemaUri.js +0 -35
- package/dist/model/alternateIdentifierBlock.js +0 -35
- package/dist/model/alternateUrlBlock.js +0 -29
- package/dist/model/apiKey.js +0 -74
- package/dist/model/appUser.js +0 -83
- package/dist/model/appUserExtraV1.js +0 -44
- package/dist/model/authzRequestExtraV1.js +0 -104
- package/dist/model/authzRequestStatus.js +0 -20
- package/dist/model/contributorBlock.js +0 -47
- package/dist/model/contributorIdentifierSchemeType.js +0 -18
- package/dist/model/contributorPositionRaidMetadataSchemaType.js +0 -22
- package/dist/model/contributorPositionSchemeType.js +0 -18
- package/dist/model/contributorPositionWithSchemaUri.js +0 -47
- package/dist/model/contributorRoleCreditNisoOrgType.js +0 -31
- package/dist/model/contributorRoleSchemeType.js +0 -18
- package/dist/model/contributorRoleWithSchemaUri.js +0 -35
- package/dist/model/datesBlock.js +0 -35
- package/dist/model/descriptionBlock.js +0 -35
- package/dist/model/descriptionTypeWithSchemaUri.js +0 -35
- package/dist/model/generateApiTokenRequest.js +0 -29
- package/dist/model/generateApiTokenResponse.js +0 -35
- package/dist/model/idBlock.js +0 -95
- package/dist/model/legacyMetadataSchemaV1.js +0 -68
- package/dist/model/migrateLegacyRaidRequest.js +0 -35
- package/dist/model/migrateLegacyRaidRequestMintRequest.js +0 -41
- package/dist/model/mintRaidoSchemaV1Request.js +0 -38
- package/dist/model/mintRaidoSchemaV1RequestMintRequest.js +0 -32
- package/dist/model/mintResponse.js +0 -41
- package/dist/model/organisationBlock.js +0 -41
- package/dist/model/organisationIdentifierSchemeType.js +0 -18
- package/dist/model/organisationRoleSchemeType.js +0 -18
- package/dist/model/organisationRoleType.js +0 -22
- package/dist/model/organisationRoleWithSchemaUri.js +0 -47
- package/dist/model/publicClosedMetadataSchemaV1.js +0 -41
- package/dist/model/publicRaidMetadataSchemaV1.js +0 -116
- package/dist/model/publicReadRaidMetadataResponseV1.js +0 -116
- package/dist/model/publicReadRaidResponseV3.js +0 -56
- package/dist/model/publicServicePoint.js +0 -38
- package/dist/model/raidListItemV3.js +0 -53
- package/dist/model/raidListRequestV2.js +0 -35
- package/dist/model/raidoMetadataSchemaV1.js +0 -116
- package/dist/model/raidoMetadataSchemaV2.js +0 -116
- package/dist/model/raidoMetaschema.js +0 -22
- package/dist/model/raidoMetaschemaV2.js +0 -23
- package/dist/model/readRaidResponseV2.js +0 -71
- package/dist/model/readRaidV2Request.js +0 -29
- package/dist/model/relatedObjectBlock.js +0 -53
- package/dist/model/relatedRaidBlock.js +0 -41
- package/dist/model/spatialCoverageBlock.js +0 -41
- package/dist/model/subjectBlock.js +0 -41
- package/dist/model/titleBlock.js +0 -47
- package/dist/model/titleTypeWithSchemaUri.js +0 -35
- package/dist/model/traditionalKnowledgeLabelBlock.js +0 -29
- package/dist/model/updateAuthzRequest.js +0 -35
- package/dist/model/updateAuthzRequestStatus.js +0 -47
- package/dist/model/updateAuthzResponse.js +0 -35
- package/dist/model/updateRaidoSchemaV1Request.js +0 -29
- package/dist/model/versionResult.js +0 -47
package/dist/api/apis.js
CHANGED
|
@@ -15,16 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.APIS = exports.HttpError = void 0;
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
const
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
const
|
|
22
|
-
__exportStar(require("./publicExperimentalApi"), exports);
|
|
23
|
-
const publicExperimentalApi_1 = require("./publicExperimentalApi");
|
|
24
|
-
__exportStar(require("./raidoStableV1Api"), exports);
|
|
25
|
-
const raidoStableV1Api_1 = require("./raidoStableV1Api");
|
|
26
|
-
__exportStar(require("./unapprovedExperimentalApi"), exports);
|
|
27
|
-
const unapprovedExperimentalApi_1 = require("./unapprovedExperimentalApi");
|
|
18
|
+
__exportStar(require("./raidApi"), exports);
|
|
19
|
+
const raidApi_1 = require("./raidApi");
|
|
20
|
+
__exportStar(require("./servicePointApi"), exports);
|
|
21
|
+
const servicePointApi_1 = require("./servicePointApi");
|
|
28
22
|
class HttpError extends Error {
|
|
29
23
|
response;
|
|
30
24
|
body;
|
|
@@ -38,4 +32,4 @@ class HttpError extends Error {
|
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
exports.HttpError = HttpError;
|
|
41
|
-
exports.APIS = [
|
|
35
|
+
exports.APIS = [raidApi_1.RaidApi, servicePointApi_1.ServicePointApi];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
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
|
|
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. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
5
|
*
|
|
6
6
|
* The version of the OpenAPI document: 2.0.0
|
|
7
7
|
* Contact: contact@raid.org
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.RaidApi = exports.RaidApiApiKeys = void 0;
|
|
18
18
|
const request_1 = __importDefault(require("request"));
|
|
19
19
|
const models_1 = require("../model/models");
|
|
20
20
|
const models_2 = require("../model/models");
|
|
@@ -23,10 +23,10 @@ let defaultBasePath = 'https://api.prod.raid.org.au';
|
|
|
23
23
|
// ===============================================
|
|
24
24
|
// This file is autogenerated - Please do not edit
|
|
25
25
|
// ===============================================
|
|
26
|
-
var
|
|
27
|
-
(function (
|
|
28
|
-
})(
|
|
29
|
-
class
|
|
26
|
+
var RaidApiApiKeys;
|
|
27
|
+
(function (RaidApiApiKeys) {
|
|
28
|
+
})(RaidApiApiKeys = exports.RaidApiApiKeys || (exports.RaidApiApiKeys = {}));
|
|
29
|
+
class RaidApi {
|
|
30
30
|
_basePath = defaultBasePath;
|
|
31
31
|
_defaultHeaders = {};
|
|
32
32
|
_useQuerystring = false;
|
|
@@ -66,7 +66,7 @@ class BasicRaidExperimentalApi {
|
|
|
66
66
|
this.authentications.default = auth;
|
|
67
67
|
}
|
|
68
68
|
setApiKey(key, value) {
|
|
69
|
-
this.authentications[
|
|
69
|
+
this.authentications[RaidApiApiKeys[key]].apiKey = value;
|
|
70
70
|
}
|
|
71
71
|
set accessToken(accessToken) {
|
|
72
72
|
this.authentications.bearerAuth.accessToken = accessToken;
|
|
@@ -77,10 +77,11 @@ class BasicRaidExperimentalApi {
|
|
|
77
77
|
/**
|
|
78
78
|
*
|
|
79
79
|
* @summary list raids
|
|
80
|
-
* @param
|
|
80
|
+
* @param servicePointId
|
|
81
|
+
* @param includeFields The top level fields to include in each RAiD in the response body. Excludes all other fields.
|
|
81
82
|
*/
|
|
82
|
-
async
|
|
83
|
-
const localVarPath = this.basePath + '/
|
|
83
|
+
async findAllRaids(servicePointId, includeFields, options = { headers: {} }) {
|
|
84
|
+
const localVarPath = this.basePath + '/raid/';
|
|
84
85
|
let localVarQueryParameters = {};
|
|
85
86
|
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
86
87
|
const produces = ['application/json'];
|
|
@@ -92,20 +93,21 @@ class BasicRaidExperimentalApi {
|
|
|
92
93
|
localVarHeaderParams.Accept = produces.join(',');
|
|
93
94
|
}
|
|
94
95
|
let localVarFormParams = {};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
if (servicePointId !== undefined) {
|
|
97
|
+
localVarQueryParameters['servicePointId'] = models_1.ObjectSerializer.serialize(servicePointId, "number");
|
|
98
|
+
}
|
|
99
|
+
if (includeFields !== undefined) {
|
|
100
|
+
localVarQueryParameters['includeFields'] = models_1.ObjectSerializer.serialize(includeFields, "Array<string>");
|
|
98
101
|
}
|
|
99
102
|
Object.assign(localVarHeaderParams, options.headers);
|
|
100
103
|
let localVarUseFormData = false;
|
|
101
104
|
let localVarRequestOptions = {
|
|
102
|
-
method: '
|
|
105
|
+
method: 'GET',
|
|
103
106
|
qs: localVarQueryParameters,
|
|
104
107
|
headers: localVarHeaderParams,
|
|
105
108
|
uri: localVarPath,
|
|
106
109
|
useQuerystring: this._useQuerystring,
|
|
107
110
|
json: true,
|
|
108
|
-
body: models_1.ObjectSerializer.serialize(raidListRequestV2, "RaidListRequestV2")
|
|
109
111
|
};
|
|
110
112
|
let authenticationPromise = Promise.resolve();
|
|
111
113
|
if (this.authentications.bearerAuth.accessToken) {
|
|
@@ -132,7 +134,7 @@ class BasicRaidExperimentalApi {
|
|
|
132
134
|
}
|
|
133
135
|
else {
|
|
134
136
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
135
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<
|
|
137
|
+
body = models_1.ObjectSerializer.deserialize(body, "Array<RaidDto>");
|
|
136
138
|
resolve({ response: response, body: body });
|
|
137
139
|
}
|
|
138
140
|
else {
|
|
@@ -145,11 +147,15 @@ class BasicRaidExperimentalApi {
|
|
|
145
147
|
}
|
|
146
148
|
/**
|
|
147
149
|
*
|
|
148
|
-
* @summary
|
|
149
|
-
* @param
|
|
150
|
+
* @summary read a raid, caller must be authorized
|
|
151
|
+
* @param prefix Prefix of the raid handle
|
|
152
|
+
* @param suffix Suffix of the raid handle
|
|
153
|
+
* @param version The version of the raid
|
|
150
154
|
*/
|
|
151
|
-
async
|
|
152
|
-
const localVarPath = this.basePath + '/
|
|
155
|
+
async findRaidByName(prefix, suffix, version, options = { headers: {} }) {
|
|
156
|
+
const localVarPath = this.basePath + '/raid/{prefix}/{suffix}'
|
|
157
|
+
.replace('{' + 'prefix' + '}', encodeURIComponent(String(prefix)))
|
|
158
|
+
.replace('{' + 'suffix' + '}', encodeURIComponent(String(suffix)));
|
|
153
159
|
let localVarQueryParameters = {};
|
|
154
160
|
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
155
161
|
const produces = ['application/json'];
|
|
@@ -161,89 +167,26 @@ class BasicRaidExperimentalApi {
|
|
|
161
167
|
localVarHeaderParams.Accept = produces.join(',');
|
|
162
168
|
}
|
|
163
169
|
let localVarFormParams = {};
|
|
164
|
-
// verify required parameter '
|
|
165
|
-
if (
|
|
166
|
-
throw new Error('Required parameter
|
|
170
|
+
// verify required parameter 'prefix' is not null or undefined
|
|
171
|
+
if (prefix === null || prefix === undefined) {
|
|
172
|
+
throw new Error('Required parameter prefix was null or undefined when calling findRaidByName.');
|
|
167
173
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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(raidListRequestV2, "RaidListRequestV2")
|
|
178
|
-
};
|
|
179
|
-
let authenticationPromise = Promise.resolve();
|
|
180
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
181
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
174
|
+
// verify required parameter 'suffix' is not null or undefined
|
|
175
|
+
if (suffix === null || suffix === undefined) {
|
|
176
|
+
throw new Error('Required parameter suffix was null or undefined when calling findRaidByName.');
|
|
182
177
|
}
|
|
183
|
-
|
|
184
|
-
|
|
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, "Array<RaidListItemV3>");
|
|
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 mint a raido-metadata-schema-v1 raid
|
|
218
|
-
* @param mintRaidoSchemaV1Request
|
|
219
|
-
*/
|
|
220
|
-
async mintRaidoSchemaV1(mintRaidoSchemaV1Request, options = { headers: {} }) {
|
|
221
|
-
const localVarPath = this.basePath + '/v2/experimental/mint-raido-schema/v1';
|
|
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 'mintRaidoSchemaV1Request' is not null or undefined
|
|
234
|
-
if (mintRaidoSchemaV1Request === null || mintRaidoSchemaV1Request === undefined) {
|
|
235
|
-
throw new Error('Required parameter mintRaidoSchemaV1Request was null or undefined when calling mintRaidoSchemaV1.');
|
|
178
|
+
if (version !== undefined) {
|
|
179
|
+
localVarQueryParameters['version'] = models_1.ObjectSerializer.serialize(version, "number");
|
|
236
180
|
}
|
|
237
181
|
Object.assign(localVarHeaderParams, options.headers);
|
|
238
182
|
let localVarUseFormData = false;
|
|
239
183
|
let localVarRequestOptions = {
|
|
240
|
-
method: '
|
|
184
|
+
method: 'GET',
|
|
241
185
|
qs: localVarQueryParameters,
|
|
242
186
|
headers: localVarHeaderParams,
|
|
243
187
|
uri: localVarPath,
|
|
244
188
|
useQuerystring: this._useQuerystring,
|
|
245
189
|
json: true,
|
|
246
|
-
body: models_1.ObjectSerializer.serialize(mintRaidoSchemaV1Request, "MintRaidoSchemaV1Request")
|
|
247
190
|
};
|
|
248
191
|
let authenticationPromise = Promise.resolve();
|
|
249
192
|
if (this.authentications.bearerAuth.accessToken) {
|
|
@@ -270,7 +213,7 @@ class BasicRaidExperimentalApi {
|
|
|
270
213
|
}
|
|
271
214
|
else {
|
|
272
215
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
273
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
216
|
+
body = models_1.ObjectSerializer.deserialize(body, "RaidDto");
|
|
274
217
|
resolve({ response: response, body: body });
|
|
275
218
|
}
|
|
276
219
|
else {
|
|
@@ -283,11 +226,11 @@ class BasicRaidExperimentalApi {
|
|
|
283
226
|
}
|
|
284
227
|
/**
|
|
285
228
|
*
|
|
286
|
-
* @summary
|
|
287
|
-
* @param
|
|
229
|
+
* @summary mint a raid
|
|
230
|
+
* @param raidCreateRequest
|
|
288
231
|
*/
|
|
289
|
-
async
|
|
290
|
-
const localVarPath = this.basePath + '/
|
|
232
|
+
async mintRaid(raidCreateRequest, options = { headers: {} }) {
|
|
233
|
+
const localVarPath = this.basePath + '/raid/';
|
|
291
234
|
let localVarQueryParameters = {};
|
|
292
235
|
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
293
236
|
const produces = ['application/json'];
|
|
@@ -299,9 +242,9 @@ class BasicRaidExperimentalApi {
|
|
|
299
242
|
localVarHeaderParams.Accept = produces.join(',');
|
|
300
243
|
}
|
|
301
244
|
let localVarFormParams = {};
|
|
302
|
-
// verify required parameter '
|
|
303
|
-
if (
|
|
304
|
-
throw new Error('Required parameter
|
|
245
|
+
// verify required parameter 'raidCreateRequest' is not null or undefined
|
|
246
|
+
if (raidCreateRequest === null || raidCreateRequest === undefined) {
|
|
247
|
+
throw new Error('Required parameter raidCreateRequest was null or undefined when calling mintRaid.');
|
|
305
248
|
}
|
|
306
249
|
Object.assign(localVarHeaderParams, options.headers);
|
|
307
250
|
let localVarUseFormData = false;
|
|
@@ -312,7 +255,7 @@ class BasicRaidExperimentalApi {
|
|
|
312
255
|
uri: localVarPath,
|
|
313
256
|
useQuerystring: this._useQuerystring,
|
|
314
257
|
json: true,
|
|
315
|
-
body: models_1.ObjectSerializer.serialize(
|
|
258
|
+
body: models_1.ObjectSerializer.serialize(raidCreateRequest, "RaidCreateRequest")
|
|
316
259
|
};
|
|
317
260
|
let authenticationPromise = Promise.resolve();
|
|
318
261
|
if (this.authentications.bearerAuth.accessToken) {
|
|
@@ -339,7 +282,7 @@ class BasicRaidExperimentalApi {
|
|
|
339
282
|
}
|
|
340
283
|
else {
|
|
341
284
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
342
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
285
|
+
body = models_1.ObjectSerializer.deserialize(body, "RaidDto");
|
|
343
286
|
resolve({ response: response, body: body });
|
|
344
287
|
}
|
|
345
288
|
else {
|
|
@@ -352,11 +295,14 @@ class BasicRaidExperimentalApi {
|
|
|
352
295
|
}
|
|
353
296
|
/**
|
|
354
297
|
*
|
|
355
|
-
* @summary
|
|
356
|
-
* @param
|
|
298
|
+
* @summary A list of the changes to the raid
|
|
299
|
+
* @param prefix Prefix of the raid handle
|
|
300
|
+
* @param suffix Suffix of the raid handle
|
|
357
301
|
*/
|
|
358
|
-
async
|
|
359
|
-
const localVarPath = this.basePath + '/
|
|
302
|
+
async raidHistory(prefix, suffix, options = { headers: {} }) {
|
|
303
|
+
const localVarPath = this.basePath + '/raid/{prefix}/{suffix}/history'
|
|
304
|
+
.replace('{' + 'prefix' + '}', encodeURIComponent(String(prefix)))
|
|
305
|
+
.replace('{' + 'suffix' + '}', encodeURIComponent(String(suffix)));
|
|
360
306
|
let localVarQueryParameters = {};
|
|
361
307
|
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
362
308
|
const produces = ['application/json'];
|
|
@@ -368,20 +314,23 @@ class BasicRaidExperimentalApi {
|
|
|
368
314
|
localVarHeaderParams.Accept = produces.join(',');
|
|
369
315
|
}
|
|
370
316
|
let localVarFormParams = {};
|
|
371
|
-
// verify required parameter '
|
|
372
|
-
if (
|
|
373
|
-
throw new Error('Required parameter
|
|
317
|
+
// verify required parameter 'prefix' is not null or undefined
|
|
318
|
+
if (prefix === null || prefix === undefined) {
|
|
319
|
+
throw new Error('Required parameter prefix was null or undefined when calling raidHistory.');
|
|
320
|
+
}
|
|
321
|
+
// verify required parameter 'suffix' is not null or undefined
|
|
322
|
+
if (suffix === null || suffix === undefined) {
|
|
323
|
+
throw new Error('Required parameter suffix was null or undefined when calling raidHistory.');
|
|
374
324
|
}
|
|
375
325
|
Object.assign(localVarHeaderParams, options.headers);
|
|
376
326
|
let localVarUseFormData = false;
|
|
377
327
|
let localVarRequestOptions = {
|
|
378
|
-
method: '
|
|
328
|
+
method: 'GET',
|
|
379
329
|
qs: localVarQueryParameters,
|
|
380
330
|
headers: localVarHeaderParams,
|
|
381
331
|
uri: localVarPath,
|
|
382
332
|
useQuerystring: this._useQuerystring,
|
|
383
333
|
json: true,
|
|
384
|
-
body: models_1.ObjectSerializer.serialize(updateRaidoSchemaV1Request, "UpdateRaidoSchemaV1Request")
|
|
385
334
|
};
|
|
386
335
|
let authenticationPromise = Promise.resolve();
|
|
387
336
|
if (this.authentications.bearerAuth.accessToken) {
|
|
@@ -408,7 +357,7 @@ class BasicRaidExperimentalApi {
|
|
|
408
357
|
}
|
|
409
358
|
else {
|
|
410
359
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
411
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
360
|
+
body = models_1.ObjectSerializer.deserialize(body, "Array<RaidChange>");
|
|
412
361
|
resolve({ response: response, body: body });
|
|
413
362
|
}
|
|
414
363
|
else {
|
|
@@ -421,11 +370,14 @@ class BasicRaidExperimentalApi {
|
|
|
421
370
|
}
|
|
422
371
|
/**
|
|
423
372
|
*
|
|
424
|
-
* @
|
|
425
|
-
* @param
|
|
373
|
+
* @param prefix Prefix of the raid handle
|
|
374
|
+
* @param suffix Suffix of the raid handle
|
|
375
|
+
* @param raidUpdateRequest
|
|
426
376
|
*/
|
|
427
|
-
async
|
|
428
|
-
const localVarPath = this.basePath + '/
|
|
377
|
+
async updateRaid(prefix, suffix, raidUpdateRequest, options = { headers: {} }) {
|
|
378
|
+
const localVarPath = this.basePath + '/raid/{prefix}/{suffix}'
|
|
379
|
+
.replace('{' + 'prefix' + '}', encodeURIComponent(String(prefix)))
|
|
380
|
+
.replace('{' + 'suffix' + '}', encodeURIComponent(String(suffix)));
|
|
429
381
|
let localVarQueryParameters = {};
|
|
430
382
|
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
431
383
|
const produces = ['application/json'];
|
|
@@ -437,89 +389,28 @@ class BasicRaidExperimentalApi {
|
|
|
437
389
|
localVarHeaderParams.Accept = produces.join(',');
|
|
438
390
|
}
|
|
439
391
|
let localVarFormParams = {};
|
|
440
|
-
// verify required parameter '
|
|
441
|
-
if (
|
|
442
|
-
throw new Error('Required parameter
|
|
443
|
-
}
|
|
444
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
445
|
-
let localVarUseFormData = false;
|
|
446
|
-
let localVarRequestOptions = {
|
|
447
|
-
method: 'POST',
|
|
448
|
-
qs: localVarQueryParameters,
|
|
449
|
-
headers: localVarHeaderParams,
|
|
450
|
-
uri: localVarPath,
|
|
451
|
-
useQuerystring: this._useQuerystring,
|
|
452
|
-
json: true,
|
|
453
|
-
body: models_1.ObjectSerializer.serialize(updateRaidoSchemaV2Request, "UpdateRaidoSchemaV2Request")
|
|
454
|
-
};
|
|
455
|
-
let authenticationPromise = Promise.resolve();
|
|
456
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
457
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
458
|
-
}
|
|
459
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
460
|
-
let interceptorPromise = authenticationPromise;
|
|
461
|
-
for (const interceptor of this.interceptors) {
|
|
462
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
463
|
-
}
|
|
464
|
-
return interceptorPromise.then(() => {
|
|
465
|
-
if (Object.keys(localVarFormParams).length) {
|
|
466
|
-
if (localVarUseFormData) {
|
|
467
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
468
|
-
}
|
|
469
|
-
else {
|
|
470
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
return new Promise((resolve, reject) => {
|
|
474
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
475
|
-
if (error) {
|
|
476
|
-
reject(error);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
480
|
-
body = models_1.ObjectSerializer.deserialize(body, "MintResponse");
|
|
481
|
-
resolve({ response: response, body: body });
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
*
|
|
493
|
-
* @summary upgrade (i.e. change the schema) of a legacy raid to be a raido-metadata-schema-v1 raid, but supplying the missing data
|
|
494
|
-
* @param updateRaidoSchemaV1Request
|
|
495
|
-
*/
|
|
496
|
-
async upgradeLegacyToRaidoSchema(updateRaidoSchemaV1Request, options = { headers: {} }) {
|
|
497
|
-
const localVarPath = this.basePath + '/v2/experimental/upgrade-legacy-to-raido-schema/v1';
|
|
498
|
-
let localVarQueryParameters = {};
|
|
499
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
500
|
-
const produces = ['application/json'];
|
|
501
|
-
// give precedence to 'application/json'
|
|
502
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
503
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
392
|
+
// verify required parameter 'prefix' is not null or undefined
|
|
393
|
+
if (prefix === null || prefix === undefined) {
|
|
394
|
+
throw new Error('Required parameter prefix was null or undefined when calling updateRaid.');
|
|
504
395
|
}
|
|
505
|
-
|
|
506
|
-
|
|
396
|
+
// verify required parameter 'suffix' is not null or undefined
|
|
397
|
+
if (suffix === null || suffix === undefined) {
|
|
398
|
+
throw new Error('Required parameter suffix was null or undefined when calling updateRaid.');
|
|
507
399
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
throw new Error('Required parameter updateRaidoSchemaV1Request was null or undefined when calling upgradeLegacyToRaidoSchema.');
|
|
400
|
+
// verify required parameter 'raidUpdateRequest' is not null or undefined
|
|
401
|
+
if (raidUpdateRequest === null || raidUpdateRequest === undefined) {
|
|
402
|
+
throw new Error('Required parameter raidUpdateRequest was null or undefined when calling updateRaid.');
|
|
512
403
|
}
|
|
513
404
|
Object.assign(localVarHeaderParams, options.headers);
|
|
514
405
|
let localVarUseFormData = false;
|
|
515
406
|
let localVarRequestOptions = {
|
|
516
|
-
method: '
|
|
407
|
+
method: 'PUT',
|
|
517
408
|
qs: localVarQueryParameters,
|
|
518
409
|
headers: localVarHeaderParams,
|
|
519
410
|
uri: localVarPath,
|
|
520
411
|
useQuerystring: this._useQuerystring,
|
|
521
412
|
json: true,
|
|
522
|
-
body: models_1.ObjectSerializer.serialize(
|
|
413
|
+
body: models_1.ObjectSerializer.serialize(raidUpdateRequest, "RaidUpdateRequest")
|
|
523
414
|
};
|
|
524
415
|
let authenticationPromise = Promise.resolve();
|
|
525
416
|
if (this.authentications.bearerAuth.accessToken) {
|
|
@@ -546,7 +437,7 @@ class BasicRaidExperimentalApi {
|
|
|
546
437
|
}
|
|
547
438
|
else {
|
|
548
439
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
549
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
440
|
+
body = models_1.ObjectSerializer.deserialize(body, "RaidDto");
|
|
550
441
|
resolve({ response: response, body: body });
|
|
551
442
|
}
|
|
552
443
|
else {
|
|
@@ -558,4 +449,4 @@ class BasicRaidExperimentalApi {
|
|
|
558
449
|
});
|
|
559
450
|
}
|
|
560
451
|
}
|
|
561
|
-
exports.
|
|
452
|
+
exports.RaidApi = RaidApi;
|