@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.
Files changed (107) hide show
  1. package/dist/api/apis.js +5 -11
  2. package/dist/api/{basicRaidExperimentalApi.js → raidApi.js} +81 -190
  3. package/dist/api/{raidoStableV1Api.js → servicePointApi.js} +40 -59
  4. package/dist/model/access.js +5 -5
  5. package/dist/model/accessStatement.js +1 -1
  6. package/dist/model/accessType.js +22 -6
  7. package/dist/model/alternateIdentifier.js +1 -1
  8. package/dist/model/alternateUrl.js +1 -1
  9. package/dist/model/closedRaid.js +1 -1
  10. package/dist/model/contributor.js +3 -3
  11. package/dist/model/contributorPosition.js +9 -9
  12. package/dist/model/contributorRole.js +9 -9
  13. package/dist/model/description.js +2 -2
  14. package/dist/model/descriptionType.js +22 -6
  15. package/dist/model/failureResponse.js +1 -1
  16. package/dist/model/id.js +1 -10
  17. package/dist/model/language.js +1 -1
  18. package/dist/model/modelDate.js +1 -1
  19. package/dist/model/models.js +16 -188
  20. package/dist/model/organisation.js +2 -2
  21. package/dist/model/organisationRole.js +9 -9
  22. package/dist/model/owner.js +1 -1
  23. package/dist/model/{raidListItemV2.js → raidChange.js} +21 -21
  24. package/dist/model/raidCreateRequest.js +1 -1
  25. package/dist/model/raidDto.js +1 -1
  26. package/dist/model/raidUpdateRequest.js +1 -1
  27. package/dist/model/registrationAgency.js +1 -1
  28. package/dist/model/relatedObject.js +2 -2
  29. package/dist/model/relatedObjectCategory.js +1 -1
  30. package/dist/model/relatedObjectType.js +1 -1
  31. package/dist/model/relatedRaid.js +1 -1
  32. package/dist/model/relatedRaidType.js +1 -1
  33. package/dist/model/servicePoint.js +19 -1
  34. package/dist/model/servicePointCreateRequest.js +104 -0
  35. package/dist/model/servicePointUpdateRequest.js +113 -0
  36. package/dist/model/spatialCoverage.js +2 -8
  37. package/dist/model/{updateRaidoSchemaV2Request.js → spatialCoveragePlace.js} +15 -9
  38. package/dist/model/subject.js +1 -1
  39. package/dist/model/subjectKeyword.js +1 -1
  40. package/dist/model/title.js +2 -2
  41. package/dist/model/titleType.js +22 -6
  42. package/dist/model/traditionalKnowledgeLabel.js +1 -1
  43. package/dist/model/validationFailure.js +1 -1
  44. package/dist/model/validationFailureResponse.js +1 -1
  45. package/package.json +3 -3
  46. package/dist/api/adminExperimentalApi.js +0 -1092
  47. package/dist/api/publicExperimentalApi.js +0 -264
  48. package/dist/api/unapprovedExperimentalApi.js +0 -147
  49. package/dist/model/accessBlock.js +0 -35
  50. package/dist/model/accessTypeWithSchemaUri.js +0 -35
  51. package/dist/model/alternateIdentifierBlock.js +0 -35
  52. package/dist/model/alternateUrlBlock.js +0 -29
  53. package/dist/model/apiKey.js +0 -74
  54. package/dist/model/appUser.js +0 -83
  55. package/dist/model/appUserExtraV1.js +0 -44
  56. package/dist/model/authzRequestExtraV1.js +0 -104
  57. package/dist/model/authzRequestStatus.js +0 -20
  58. package/dist/model/contributorBlock.js +0 -47
  59. package/dist/model/contributorIdentifierSchemeType.js +0 -18
  60. package/dist/model/contributorPositionRaidMetadataSchemaType.js +0 -22
  61. package/dist/model/contributorPositionSchemeType.js +0 -18
  62. package/dist/model/contributorPositionWithSchemaUri.js +0 -47
  63. package/dist/model/contributorRoleCreditNisoOrgType.js +0 -31
  64. package/dist/model/contributorRoleSchemeType.js +0 -18
  65. package/dist/model/contributorRoleWithSchemaUri.js +0 -35
  66. package/dist/model/datesBlock.js +0 -35
  67. package/dist/model/descriptionBlock.js +0 -35
  68. package/dist/model/descriptionTypeWithSchemaUri.js +0 -35
  69. package/dist/model/generateApiTokenRequest.js +0 -29
  70. package/dist/model/generateApiTokenResponse.js +0 -35
  71. package/dist/model/idBlock.js +0 -95
  72. package/dist/model/legacyMetadataSchemaV1.js +0 -68
  73. package/dist/model/migrateLegacyRaidRequest.js +0 -35
  74. package/dist/model/migrateLegacyRaidRequestMintRequest.js +0 -41
  75. package/dist/model/mintRaidoSchemaV1Request.js +0 -38
  76. package/dist/model/mintRaidoSchemaV1RequestMintRequest.js +0 -32
  77. package/dist/model/mintResponse.js +0 -41
  78. package/dist/model/organisationBlock.js +0 -41
  79. package/dist/model/organisationIdentifierSchemeType.js +0 -18
  80. package/dist/model/organisationRoleSchemeType.js +0 -18
  81. package/dist/model/organisationRoleType.js +0 -22
  82. package/dist/model/organisationRoleWithSchemaUri.js +0 -47
  83. package/dist/model/publicClosedMetadataSchemaV1.js +0 -41
  84. package/dist/model/publicRaidMetadataSchemaV1.js +0 -116
  85. package/dist/model/publicReadRaidMetadataResponseV1.js +0 -116
  86. package/dist/model/publicReadRaidResponseV3.js +0 -56
  87. package/dist/model/publicServicePoint.js +0 -38
  88. package/dist/model/raidListItemV3.js +0 -53
  89. package/dist/model/raidListRequestV2.js +0 -35
  90. package/dist/model/raidoMetadataSchemaV1.js +0 -116
  91. package/dist/model/raidoMetadataSchemaV2.js +0 -116
  92. package/dist/model/raidoMetaschema.js +0 -22
  93. package/dist/model/raidoMetaschemaV2.js +0 -23
  94. package/dist/model/readRaidResponseV2.js +0 -71
  95. package/dist/model/readRaidV2Request.js +0 -29
  96. package/dist/model/relatedObjectBlock.js +0 -53
  97. package/dist/model/relatedRaidBlock.js +0 -41
  98. package/dist/model/spatialCoverageBlock.js +0 -41
  99. package/dist/model/subjectBlock.js +0 -41
  100. package/dist/model/titleBlock.js +0 -47
  101. package/dist/model/titleTypeWithSchemaUri.js +0 -35
  102. package/dist/model/traditionalKnowledgeLabelBlock.js +0 -29
  103. package/dist/model/updateAuthzRequest.js +0 -35
  104. package/dist/model/updateAuthzRequestStatus.js +0 -47
  105. package/dist/model/updateAuthzResponse.js +0 -35
  106. package/dist/model/updateRaidoSchemaV1Request.js +0 -29
  107. 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("./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("./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 = [adminExperimentalApi_1.AdminExperimentalApi, basicRaidExperimentalApi_1.BasicRaidExperimentalApi, publicExperimentalApi_1.PublicExperimentalApi, raidoStableV1Api_1.RaidoStableV1Api, unapprovedExperimentalApi_1.UnapprovedExperimentalApi];
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 (not used in this project, see ../idl-raid-v1). 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.
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.BasicRaidExperimentalApi = exports.BasicRaidExperimentalApiApiKeys = void 0;
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 BasicRaidExperimentalApiApiKeys;
27
- (function (BasicRaidExperimentalApiApiKeys) {
28
- })(BasicRaidExperimentalApiApiKeys = exports.BasicRaidExperimentalApiApiKeys || (exports.BasicRaidExperimentalApiApiKeys = {}));
29
- class BasicRaidExperimentalApi {
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[BasicRaidExperimentalApiApiKeys[key]].apiKey = value;
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 raidListRequestV2
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 listRaidV2(raidListRequestV2, options = { headers: {} }) {
83
- const localVarPath = this.basePath + '/v2/experimental/list-raid/v2';
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
- // 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.');
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: 'POST',
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<RaidListItemV2>");
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 list raids
149
- * @param raidListRequestV2
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 listRaidV3(raidListRequestV2, options = { headers: {} }) {
152
- const localVarPath = this.basePath + '/v2/experimental/list-raid/v3';
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 'raidListRequestV2' is not null or undefined
165
- if (raidListRequestV2 === null || raidListRequestV2 === undefined) {
166
- throw new Error('Required parameter raidListRequestV2 was null or undefined when calling listRaidV3.');
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
- 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(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
- 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, "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: 'POST',
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, "MintResponse");
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 read a raid, caller must be authorized
287
- * @param readRaidV2Request
229
+ * @summary mint a raid
230
+ * @param raidCreateRequest
288
231
  */
289
- async readRaidV2(readRaidV2Request, options = { headers: {} }) {
290
- const localVarPath = this.basePath + '/v2/experimental/read-raid/v2';
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 'readRaidV2Request' is not null or undefined
303
- if (readRaidV2Request === null || readRaidV2Request === undefined) {
304
- throw new Error('Required parameter readRaidV2Request was null or undefined when calling readRaidV2.');
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(readRaidV2Request, "ReadRaidV2Request")
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, "ReadRaidResponseV2");
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 update a raido-metadata-schema-v1 raid
356
- * @param updateRaidoSchemaV1Request
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 updateRaidoSchemaV1(updateRaidoSchemaV1Request, options = { headers: {} }) {
359
- const localVarPath = this.basePath + '/v2/experimental/update-raido-schema/v1';
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 '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 updateRaidoSchemaV1.');
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: 'POST',
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, "MintResponse");
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
- * @summary update a raido-metadata-schema-v2 raid
425
- * @param updateRaidoSchemaV2Request
373
+ * @param prefix Prefix of the raid handle
374
+ * @param suffix Suffix of the raid handle
375
+ * @param raidUpdateRequest
426
376
  */
427
- async updateRaidoSchemaV2(updateRaidoSchemaV2Request, options = { headers: {} }) {
428
- const localVarPath = this.basePath + '/v2/experimental/update-raido-schema/v2';
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 'updateRaidoSchemaV2Request' is not null or undefined
441
- if (updateRaidoSchemaV2Request === null || updateRaidoSchemaV2Request === undefined) {
442
- throw new Error('Required parameter updateRaidoSchemaV2Request was null or undefined when calling updateRaidoSchemaV2.');
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
- else {
506
- localVarHeaderParams.Accept = produces.join(',');
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
- let localVarFormParams = {};
509
- // verify required parameter 'updateRaidoSchemaV1Request' is not null or undefined
510
- if (updateRaidoSchemaV1Request === null || updateRaidoSchemaV1Request === undefined) {
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: 'POST',
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(updateRaidoSchemaV1Request, "UpdateRaidoSchemaV1Request")
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, "MintResponse");
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.BasicRaidExperimentalApi = BasicRaidExperimentalApi;
452
+ exports.RaidApi = RaidApi;