@researchdatabox/raido-openapi-generated-node 0.0.2 → 5.0.0-RC1
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.d.ts +1679 -0
- package/dist/api.js +701 -16
- package/dist/base.d.ts +55 -0
- package/dist/base.js +69 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +144 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +92 -0
- package/dist/{model/accessType.js → index.d.ts} +3 -9
- package/dist/index.js +32 -0
- package/package.json +12 -7
- package/dist/api/adminExperimentalApi.js +0 -1092
- package/dist/api/apis.js +0 -41
- package/dist/api/basicRaidExperimentalApi.js +0 -561
- package/dist/api/publicExperimentalApi.js +0 -264
- package/dist/api/raidoStableV1Api.js +0 -369
- package/dist/api/unapprovedExperimentalApi.js +0 -147
- package/dist/model/access.js +0 -44
- package/dist/model/accessBlock.js +0 -35
- package/dist/model/accessStatement.js +0 -35
- package/dist/model/accessTypeWithSchemaUri.js +0 -35
- package/dist/model/alternateIdentifier.js +0 -35
- package/dist/model/alternateIdentifierBlock.js +0 -35
- package/dist/model/alternateUrl.js +0 -29
- 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/closedRaid.js +0 -35
- package/dist/model/contributor.js +0 -59
- package/dist/model/contributorBlock.js +0 -47
- package/dist/model/contributorIdentifierSchemeType.js +0 -18
- package/dist/model/contributorPosition.js +0 -47
- package/dist/model/contributorPositionRaidMetadataSchemaType.js +0 -22
- package/dist/model/contributorPositionSchemeType.js +0 -18
- package/dist/model/contributorPositionWithSchemaUri.js +0 -47
- package/dist/model/contributorRole.js +0 -35
- 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/description.js +0 -41
- package/dist/model/descriptionBlock.js +0 -35
- package/dist/model/descriptionType.js +0 -19
- package/dist/model/descriptionTypeWithSchemaUri.js +0 -35
- package/dist/model/failureResponse.js +0 -53
- package/dist/model/generateApiTokenRequest.js +0 -29
- package/dist/model/generateApiTokenResponse.js +0 -35
- package/dist/model/id.js +0 -89
- package/dist/model/idBlock.js +0 -95
- package/dist/model/language.js +0 -35
- 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/modelDate.js +0 -38
- package/dist/model/models.js +0 -506
- package/dist/model/organisation.js +0 -41
- package/dist/model/organisationBlock.js +0 -41
- package/dist/model/organisationIdentifierSchemeType.js +0 -18
- package/dist/model/organisationRole.js +0 -47
- package/dist/model/organisationRoleSchemeType.js +0 -18
- package/dist/model/organisationRoleType.js +0 -22
- package/dist/model/organisationRoleWithSchemaUri.js +0 -47
- package/dist/model/owner.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/raidCreateRequest.js +0 -107
- package/dist/model/raidDto.js +0 -107
- package/dist/model/raidListItemV2.js +0 -53
- package/dist/model/raidListItemV3.js +0 -53
- package/dist/model/raidListRequestV2.js +0 -35
- package/dist/model/raidUpdateRequest.js +0 -107
- 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/registrationAgency.js +0 -38
- package/dist/model/relatedObject.js +0 -47
- package/dist/model/relatedObjectBlock.js +0 -53
- package/dist/model/relatedObjectCategory.js +0 -35
- package/dist/model/relatedObjectType.js +0 -35
- package/dist/model/relatedRaid.js +0 -35
- package/dist/model/relatedRaidBlock.js +0 -41
- package/dist/model/relatedRaidType.js +0 -35
- package/dist/model/servicePoint.js +0 -74
- package/dist/model/spatialCoverage.js +0 -47
- package/dist/model/spatialCoverageBlock.js +0 -41
- package/dist/model/subject.js +0 -41
- package/dist/model/subjectBlock.js +0 -41
- package/dist/model/subjectKeyword.js +0 -35
- package/dist/model/title.js +0 -53
- package/dist/model/titleBlock.js +0 -47
- package/dist/model/titleType.js +0 -19
- package/dist/model/titleTypeWithSchemaUri.js +0 -35
- package/dist/model/traditionalKnowledgeLabel.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/updateRaidoSchemaV2Request.js +0 -29
- package/dist/model/validationFailure.js +0 -41
- package/dist/model/validationFailureResponse.js +0 -59
- package/dist/model/versionResult.js +0 -47
|
@@ -1,1092 +0,0 @@
|
|
|
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 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.
|
|
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.AdminExperimentalApi = exports.AdminExperimentalApiApiKeys = 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://api.prod.raid.org.au';
|
|
23
|
-
// ===============================================
|
|
24
|
-
// This file is autogenerated - Please do not edit
|
|
25
|
-
// ===============================================
|
|
26
|
-
var AdminExperimentalApiApiKeys;
|
|
27
|
-
(function (AdminExperimentalApiApiKeys) {
|
|
28
|
-
})(AdminExperimentalApiApiKeys = exports.AdminExperimentalApiApiKeys || (exports.AdminExperimentalApiApiKeys = {}));
|
|
29
|
-
class AdminExperimentalApi {
|
|
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[AdminExperimentalApiApiKeys[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 generate api token
|
|
80
|
-
* @param generateApiTokenRequest
|
|
81
|
-
*/
|
|
82
|
-
async generateApiToken(generateApiTokenRequest, options = { headers: {} }) {
|
|
83
|
-
const localVarPath = this.basePath + '/v2/experimental/generate-api-token/v1';
|
|
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 'generateApiTokenRequest' is not null or undefined
|
|
96
|
-
if (generateApiTokenRequest === null || generateApiTokenRequest === undefined) {
|
|
97
|
-
throw new Error('Required parameter generateApiTokenRequest was null or undefined when calling generateApiToken.');
|
|
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(generateApiTokenRequest, "GenerateApiTokenRequest")
|
|
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, "GenerateApiTokenResponse");
|
|
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 list app user data that are for keys
|
|
149
|
-
* @param servicePointId Numeric ID of the ServicePoint to list keys for
|
|
150
|
-
*/
|
|
151
|
-
async listApiKey(servicePointId, options = { headers: {} }) {
|
|
152
|
-
const localVarPath = this.basePath + '/v2/experimental/service-point/v1/{servicePointId}/list-api-key'
|
|
153
|
-
.replace('{' + 'servicePointId' + '}', encodeURIComponent(String(servicePointId)));
|
|
154
|
-
let localVarQueryParameters = {};
|
|
155
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
156
|
-
const produces = ['application/json'];
|
|
157
|
-
// give precedence to 'application/json'
|
|
158
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
159
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
163
|
-
}
|
|
164
|
-
let localVarFormParams = {};
|
|
165
|
-
// verify required parameter 'servicePointId' is not null or undefined
|
|
166
|
-
if (servicePointId === null || servicePointId === undefined) {
|
|
167
|
-
throw new Error('Required parameter servicePointId was null or undefined when calling listApiKey.');
|
|
168
|
-
}
|
|
169
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
170
|
-
let localVarUseFormData = false;
|
|
171
|
-
let localVarRequestOptions = {
|
|
172
|
-
method: 'GET',
|
|
173
|
-
qs: localVarQueryParameters,
|
|
174
|
-
headers: localVarHeaderParams,
|
|
175
|
-
uri: localVarPath,
|
|
176
|
-
useQuerystring: this._useQuerystring,
|
|
177
|
-
json: true,
|
|
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, "Array<ApiKey>");
|
|
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 list app user data for service point that authz users can see
|
|
218
|
-
* @param servicePointId Numeric ID of the ServicePoint to list users for
|
|
219
|
-
*/
|
|
220
|
-
async listAppUser(servicePointId, options = { headers: {} }) {
|
|
221
|
-
const localVarPath = this.basePath + '/v2/experimental/service-point/v1/{servicePointId}/list-app-user'
|
|
222
|
-
.replace('{' + 'servicePointId' + '}', encodeURIComponent(String(servicePointId)));
|
|
223
|
-
let localVarQueryParameters = {};
|
|
224
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
225
|
-
const produces = ['application/json'];
|
|
226
|
-
// give precedence to 'application/json'
|
|
227
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
228
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
232
|
-
}
|
|
233
|
-
let localVarFormParams = {};
|
|
234
|
-
// verify required parameter 'servicePointId' is not null or undefined
|
|
235
|
-
if (servicePointId === null || servicePointId === undefined) {
|
|
236
|
-
throw new Error('Required parameter servicePointId was null or undefined when calling listAppUser.');
|
|
237
|
-
}
|
|
238
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
239
|
-
let localVarUseFormData = false;
|
|
240
|
-
let localVarRequestOptions = {
|
|
241
|
-
method: 'GET',
|
|
242
|
-
qs: localVarQueryParameters,
|
|
243
|
-
headers: localVarHeaderParams,
|
|
244
|
-
uri: localVarPath,
|
|
245
|
-
useQuerystring: this._useQuerystring,
|
|
246
|
-
json: true,
|
|
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, "Array<AppUser>");
|
|
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 list authz requests for all SP
|
|
287
|
-
*/
|
|
288
|
-
async listAuthzRequest(options = { headers: {} }) {
|
|
289
|
-
const localVarPath = this.basePath + '/v2/experimental/admin-authz-request/v1';
|
|
290
|
-
let localVarQueryParameters = {};
|
|
291
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
292
|
-
const produces = ['application/json'];
|
|
293
|
-
// give precedence to 'application/json'
|
|
294
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
295
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
298
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
299
|
-
}
|
|
300
|
-
let localVarFormParams = {};
|
|
301
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
302
|
-
let localVarUseFormData = false;
|
|
303
|
-
let localVarRequestOptions = {
|
|
304
|
-
method: 'GET',
|
|
305
|
-
qs: localVarQueryParameters,
|
|
306
|
-
headers: localVarHeaderParams,
|
|
307
|
-
uri: localVarPath,
|
|
308
|
-
useQuerystring: this._useQuerystring,
|
|
309
|
-
json: true,
|
|
310
|
-
};
|
|
311
|
-
let authenticationPromise = Promise.resolve();
|
|
312
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
313
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
314
|
-
}
|
|
315
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
316
|
-
let interceptorPromise = authenticationPromise;
|
|
317
|
-
for (const interceptor of this.interceptors) {
|
|
318
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
319
|
-
}
|
|
320
|
-
return interceptorPromise.then(() => {
|
|
321
|
-
if (Object.keys(localVarFormParams).length) {
|
|
322
|
-
if (localVarUseFormData) {
|
|
323
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
return new Promise((resolve, reject) => {
|
|
330
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
331
|
-
if (error) {
|
|
332
|
-
reject(error);
|
|
333
|
-
}
|
|
334
|
-
else {
|
|
335
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
336
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<AuthzRequestExtraV1>");
|
|
337
|
-
resolve({ response: response, body: body });
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Returns both enabled and disabled service-points. Returns up to MAX_EXPERIMENTAL_RECORDS results.
|
|
349
|
-
* @summary list service point data that authorized users can see
|
|
350
|
-
*/
|
|
351
|
-
async listServicePoint(options = { headers: {} }) {
|
|
352
|
-
const localVarPath = this.basePath + '/v2/experimental/service-point/v1';
|
|
353
|
-
let localVarQueryParameters = {};
|
|
354
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
355
|
-
const produces = ['application/json'];
|
|
356
|
-
// give precedence to 'application/json'
|
|
357
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
358
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
362
|
-
}
|
|
363
|
-
let localVarFormParams = {};
|
|
364
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
365
|
-
let localVarUseFormData = false;
|
|
366
|
-
let localVarRequestOptions = {
|
|
367
|
-
method: 'GET',
|
|
368
|
-
qs: localVarQueryParameters,
|
|
369
|
-
headers: localVarHeaderParams,
|
|
370
|
-
uri: localVarPath,
|
|
371
|
-
useQuerystring: this._useQuerystring,
|
|
372
|
-
json: true,
|
|
373
|
-
};
|
|
374
|
-
let authenticationPromise = Promise.resolve();
|
|
375
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
376
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
377
|
-
}
|
|
378
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
379
|
-
let interceptorPromise = authenticationPromise;
|
|
380
|
-
for (const interceptor of this.interceptors) {
|
|
381
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
382
|
-
}
|
|
383
|
-
return interceptorPromise.then(() => {
|
|
384
|
-
if (Object.keys(localVarFormParams).length) {
|
|
385
|
-
if (localVarUseFormData) {
|
|
386
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return new Promise((resolve, reject) => {
|
|
393
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
394
|
-
if (error) {
|
|
395
|
-
reject(error);
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
399
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<ServicePoint>");
|
|
400
|
-
resolve({ response: response, body: body });
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
*
|
|
412
|
-
* @summary insert a legacy raid with schema raido-metadata-schema-v1, using it\'s originally minted handle
|
|
413
|
-
* @param migrateLegacyRaidRequest
|
|
414
|
-
*/
|
|
415
|
-
async migrateLegacyRaid(migrateLegacyRaidRequest, options = { headers: {} }) {
|
|
416
|
-
const localVarPath = this.basePath + '/v2/experimental/migrate-legacy-raid/v1';
|
|
417
|
-
let localVarQueryParameters = {};
|
|
418
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
419
|
-
const produces = ['application/json'];
|
|
420
|
-
// give precedence to 'application/json'
|
|
421
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
422
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
426
|
-
}
|
|
427
|
-
let localVarFormParams = {};
|
|
428
|
-
// verify required parameter 'migrateLegacyRaidRequest' is not null or undefined
|
|
429
|
-
if (migrateLegacyRaidRequest === null || migrateLegacyRaidRequest === undefined) {
|
|
430
|
-
throw new Error('Required parameter migrateLegacyRaidRequest was null or undefined when calling migrateLegacyRaid.');
|
|
431
|
-
}
|
|
432
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
433
|
-
let localVarUseFormData = false;
|
|
434
|
-
let localVarRequestOptions = {
|
|
435
|
-
method: 'POST',
|
|
436
|
-
qs: localVarQueryParameters,
|
|
437
|
-
headers: localVarHeaderParams,
|
|
438
|
-
uri: localVarPath,
|
|
439
|
-
useQuerystring: this._useQuerystring,
|
|
440
|
-
json: true,
|
|
441
|
-
body: models_1.ObjectSerializer.serialize(migrateLegacyRaidRequest, "MigrateLegacyRaidRequest")
|
|
442
|
-
};
|
|
443
|
-
let authenticationPromise = Promise.resolve();
|
|
444
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
445
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
446
|
-
}
|
|
447
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
448
|
-
let interceptorPromise = authenticationPromise;
|
|
449
|
-
for (const interceptor of this.interceptors) {
|
|
450
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
451
|
-
}
|
|
452
|
-
return interceptorPromise.then(() => {
|
|
453
|
-
if (Object.keys(localVarFormParams).length) {
|
|
454
|
-
if (localVarUseFormData) {
|
|
455
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
456
|
-
}
|
|
457
|
-
else {
|
|
458
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return new Promise((resolve, reject) => {
|
|
462
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
463
|
-
if (error) {
|
|
464
|
-
reject(error);
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
468
|
-
body = models_1.ObjectSerializer.deserialize(body, "MintResponse");
|
|
469
|
-
resolve({ response: response, body: body });
|
|
470
|
-
}
|
|
471
|
-
else {
|
|
472
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
*
|
|
481
|
-
* @summary read app user \"api key\" data that authorized users can see
|
|
482
|
-
* @param apiKeyId Numeric ID of the AppUser to get
|
|
483
|
-
*/
|
|
484
|
-
async readApiKey(apiKeyId, options = { headers: {} }) {
|
|
485
|
-
const localVarPath = this.basePath + '/v2/experimental/api-key/v1/{apiKeyId}'
|
|
486
|
-
.replace('{' + 'apiKeyId' + '}', encodeURIComponent(String(apiKeyId)));
|
|
487
|
-
let localVarQueryParameters = {};
|
|
488
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
489
|
-
const produces = ['application/json'];
|
|
490
|
-
// give precedence to 'application/json'
|
|
491
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
492
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
496
|
-
}
|
|
497
|
-
let localVarFormParams = {};
|
|
498
|
-
// verify required parameter 'apiKeyId' is not null or undefined
|
|
499
|
-
if (apiKeyId === null || apiKeyId === undefined) {
|
|
500
|
-
throw new Error('Required parameter apiKeyId was null or undefined when calling readApiKey.');
|
|
501
|
-
}
|
|
502
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
503
|
-
let localVarUseFormData = false;
|
|
504
|
-
let localVarRequestOptions = {
|
|
505
|
-
method: 'GET',
|
|
506
|
-
qs: localVarQueryParameters,
|
|
507
|
-
headers: localVarHeaderParams,
|
|
508
|
-
uri: localVarPath,
|
|
509
|
-
useQuerystring: this._useQuerystring,
|
|
510
|
-
json: true,
|
|
511
|
-
};
|
|
512
|
-
let authenticationPromise = Promise.resolve();
|
|
513
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
514
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
515
|
-
}
|
|
516
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
517
|
-
let interceptorPromise = authenticationPromise;
|
|
518
|
-
for (const interceptor of this.interceptors) {
|
|
519
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
520
|
-
}
|
|
521
|
-
return interceptorPromise.then(() => {
|
|
522
|
-
if (Object.keys(localVarFormParams).length) {
|
|
523
|
-
if (localVarUseFormData) {
|
|
524
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
525
|
-
}
|
|
526
|
-
else {
|
|
527
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
return new Promise((resolve, reject) => {
|
|
531
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
532
|
-
if (error) {
|
|
533
|
-
reject(error);
|
|
534
|
-
}
|
|
535
|
-
else {
|
|
536
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
537
|
-
body = models_1.ObjectSerializer.deserialize(body, "ApiKey");
|
|
538
|
-
resolve({ response: response, body: body });
|
|
539
|
-
}
|
|
540
|
-
else {
|
|
541
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
});
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
*
|
|
550
|
-
* @summary read app user data that authorized users can see
|
|
551
|
-
* @param appUserId Numeric ID of the AppUser to get
|
|
552
|
-
*/
|
|
553
|
-
async readAppUser(appUserId, options = { headers: {} }) {
|
|
554
|
-
const localVarPath = this.basePath + '/v2/experimental/app-user/v1/{appUserId}'
|
|
555
|
-
.replace('{' + 'appUserId' + '}', encodeURIComponent(String(appUserId)));
|
|
556
|
-
let localVarQueryParameters = {};
|
|
557
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
558
|
-
const produces = ['application/json'];
|
|
559
|
-
// give precedence to 'application/json'
|
|
560
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
561
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
562
|
-
}
|
|
563
|
-
else {
|
|
564
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
565
|
-
}
|
|
566
|
-
let localVarFormParams = {};
|
|
567
|
-
// verify required parameter 'appUserId' is not null or undefined
|
|
568
|
-
if (appUserId === null || appUserId === undefined) {
|
|
569
|
-
throw new Error('Required parameter appUserId was null or undefined when calling readAppUser.');
|
|
570
|
-
}
|
|
571
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
572
|
-
let localVarUseFormData = false;
|
|
573
|
-
let localVarRequestOptions = {
|
|
574
|
-
method: 'GET',
|
|
575
|
-
qs: localVarQueryParameters,
|
|
576
|
-
headers: localVarHeaderParams,
|
|
577
|
-
uri: localVarPath,
|
|
578
|
-
useQuerystring: this._useQuerystring,
|
|
579
|
-
json: true,
|
|
580
|
-
};
|
|
581
|
-
let authenticationPromise = Promise.resolve();
|
|
582
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
583
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
584
|
-
}
|
|
585
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
586
|
-
let interceptorPromise = authenticationPromise;
|
|
587
|
-
for (const interceptor of this.interceptors) {
|
|
588
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
589
|
-
}
|
|
590
|
-
return interceptorPromise.then(() => {
|
|
591
|
-
if (Object.keys(localVarFormParams).length) {
|
|
592
|
-
if (localVarUseFormData) {
|
|
593
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return new Promise((resolve, reject) => {
|
|
600
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
601
|
-
if (error) {
|
|
602
|
-
reject(error);
|
|
603
|
-
}
|
|
604
|
-
else {
|
|
605
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
606
|
-
body = models_1.ObjectSerializer.deserialize(body, "AppUser");
|
|
607
|
-
resolve({ response: response, body: body });
|
|
608
|
-
}
|
|
609
|
-
else {
|
|
610
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
});
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
*
|
|
619
|
-
* @summary read app user data and extra stuff
|
|
620
|
-
* @param appUserId Numeric ID of the AppUser to get
|
|
621
|
-
*/
|
|
622
|
-
async readAppUserExtra(appUserId, options = { headers: {} }) {
|
|
623
|
-
const localVarPath = this.basePath + '/v2/experimental/app-user-extra/v1/{appUserId}'
|
|
624
|
-
.replace('{' + 'appUserId' + '}', encodeURIComponent(String(appUserId)));
|
|
625
|
-
let localVarQueryParameters = {};
|
|
626
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
627
|
-
const produces = ['application/json'];
|
|
628
|
-
// give precedence to 'application/json'
|
|
629
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
630
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
633
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
634
|
-
}
|
|
635
|
-
let localVarFormParams = {};
|
|
636
|
-
// verify required parameter 'appUserId' is not null or undefined
|
|
637
|
-
if (appUserId === null || appUserId === undefined) {
|
|
638
|
-
throw new Error('Required parameter appUserId was null or undefined when calling readAppUserExtra.');
|
|
639
|
-
}
|
|
640
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
641
|
-
let localVarUseFormData = false;
|
|
642
|
-
let localVarRequestOptions = {
|
|
643
|
-
method: 'GET',
|
|
644
|
-
qs: localVarQueryParameters,
|
|
645
|
-
headers: localVarHeaderParams,
|
|
646
|
-
uri: localVarPath,
|
|
647
|
-
useQuerystring: this._useQuerystring,
|
|
648
|
-
json: true,
|
|
649
|
-
};
|
|
650
|
-
let authenticationPromise = Promise.resolve();
|
|
651
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
652
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
653
|
-
}
|
|
654
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
655
|
-
let interceptorPromise = authenticationPromise;
|
|
656
|
-
for (const interceptor of this.interceptors) {
|
|
657
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
658
|
-
}
|
|
659
|
-
return interceptorPromise.then(() => {
|
|
660
|
-
if (Object.keys(localVarFormParams).length) {
|
|
661
|
-
if (localVarUseFormData) {
|
|
662
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
663
|
-
}
|
|
664
|
-
else {
|
|
665
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
return new Promise((resolve, reject) => {
|
|
669
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
670
|
-
if (error) {
|
|
671
|
-
reject(error);
|
|
672
|
-
}
|
|
673
|
-
else {
|
|
674
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
675
|
-
body = models_1.ObjectSerializer.deserialize(body, "AppUserExtraV1");
|
|
676
|
-
resolve({ response: response, body: body });
|
|
677
|
-
}
|
|
678
|
-
else {
|
|
679
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
});
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
*
|
|
688
|
-
* @summary read authz request
|
|
689
|
-
* @param authzRequestId Numeric ID of the AuthzRequest to get
|
|
690
|
-
*/
|
|
691
|
-
async readRequestAuthz(authzRequestId, options = { headers: {} }) {
|
|
692
|
-
const localVarPath = this.basePath + '/v2/public/request-authz/v1/{authzRequestId}'
|
|
693
|
-
.replace('{' + 'authzRequestId' + '}', encodeURIComponent(String(authzRequestId)));
|
|
694
|
-
let localVarQueryParameters = {};
|
|
695
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
696
|
-
const produces = ['application/json'];
|
|
697
|
-
// give precedence to 'application/json'
|
|
698
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
699
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
703
|
-
}
|
|
704
|
-
let localVarFormParams = {};
|
|
705
|
-
// verify required parameter 'authzRequestId' is not null or undefined
|
|
706
|
-
if (authzRequestId === null || authzRequestId === undefined) {
|
|
707
|
-
throw new Error('Required parameter authzRequestId was null or undefined when calling readRequestAuthz.');
|
|
708
|
-
}
|
|
709
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
710
|
-
let localVarUseFormData = false;
|
|
711
|
-
let localVarRequestOptions = {
|
|
712
|
-
method: 'GET',
|
|
713
|
-
qs: localVarQueryParameters,
|
|
714
|
-
headers: localVarHeaderParams,
|
|
715
|
-
uri: localVarPath,
|
|
716
|
-
useQuerystring: this._useQuerystring,
|
|
717
|
-
json: true,
|
|
718
|
-
};
|
|
719
|
-
let authenticationPromise = Promise.resolve();
|
|
720
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
721
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
722
|
-
}
|
|
723
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
724
|
-
let interceptorPromise = authenticationPromise;
|
|
725
|
-
for (const interceptor of this.interceptors) {
|
|
726
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
727
|
-
}
|
|
728
|
-
return interceptorPromise.then(() => {
|
|
729
|
-
if (Object.keys(localVarFormParams).length) {
|
|
730
|
-
if (localVarUseFormData) {
|
|
731
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
return new Promise((resolve, reject) => {
|
|
738
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
739
|
-
if (error) {
|
|
740
|
-
reject(error);
|
|
741
|
-
}
|
|
742
|
-
else {
|
|
743
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
744
|
-
body = models_1.ObjectSerializer.deserialize(body, "AuthzRequestExtraV1");
|
|
745
|
-
resolve({ response: response, body: body });
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
});
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
*
|
|
757
|
-
* @summary read service point data that authorized users can see
|
|
758
|
-
* @param servicePointId Numeric ID of the ServicePoint to get
|
|
759
|
-
*/
|
|
760
|
-
async readServicePoint(servicePointId, options = { headers: {} }) {
|
|
761
|
-
const localVarPath = this.basePath + '/v2/experimental/service-point/v1/{servicePointId}'
|
|
762
|
-
.replace('{' + 'servicePointId' + '}', encodeURIComponent(String(servicePointId)));
|
|
763
|
-
let localVarQueryParameters = {};
|
|
764
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
765
|
-
const produces = ['application/json'];
|
|
766
|
-
// give precedence to 'application/json'
|
|
767
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
768
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
769
|
-
}
|
|
770
|
-
else {
|
|
771
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
772
|
-
}
|
|
773
|
-
let localVarFormParams = {};
|
|
774
|
-
// verify required parameter 'servicePointId' is not null or undefined
|
|
775
|
-
if (servicePointId === null || servicePointId === undefined) {
|
|
776
|
-
throw new Error('Required parameter servicePointId was null or undefined when calling readServicePoint.');
|
|
777
|
-
}
|
|
778
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
779
|
-
let localVarUseFormData = false;
|
|
780
|
-
let localVarRequestOptions = {
|
|
781
|
-
method: 'GET',
|
|
782
|
-
qs: localVarQueryParameters,
|
|
783
|
-
headers: localVarHeaderParams,
|
|
784
|
-
uri: localVarPath,
|
|
785
|
-
useQuerystring: this._useQuerystring,
|
|
786
|
-
json: true,
|
|
787
|
-
};
|
|
788
|
-
let authenticationPromise = Promise.resolve();
|
|
789
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
790
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
791
|
-
}
|
|
792
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
793
|
-
let interceptorPromise = authenticationPromise;
|
|
794
|
-
for (const interceptor of this.interceptors) {
|
|
795
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
796
|
-
}
|
|
797
|
-
return interceptorPromise.then(() => {
|
|
798
|
-
if (Object.keys(localVarFormParams).length) {
|
|
799
|
-
if (localVarUseFormData) {
|
|
800
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
801
|
-
}
|
|
802
|
-
else {
|
|
803
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
return new Promise((resolve, reject) => {
|
|
807
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
808
|
-
if (error) {
|
|
809
|
-
reject(error);
|
|
810
|
-
}
|
|
811
|
-
else {
|
|
812
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
813
|
-
body = models_1.ObjectSerializer.deserialize(body, "ServicePoint");
|
|
814
|
-
resolve({ response: response, body: body });
|
|
815
|
-
}
|
|
816
|
-
else {
|
|
817
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
});
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
*
|
|
826
|
-
* @summary update an \"api-key\" type app-user (i.e. not a \"person type\" user), create a new one if id not set
|
|
827
|
-
* @param apiKey
|
|
828
|
-
*/
|
|
829
|
-
async updateApiKey(apiKey, options = { headers: {} }) {
|
|
830
|
-
const localVarPath = this.basePath + '/v2/experimental/api-key/v1';
|
|
831
|
-
let localVarQueryParameters = {};
|
|
832
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
833
|
-
const produces = ['application/json'];
|
|
834
|
-
// give precedence to 'application/json'
|
|
835
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
836
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
837
|
-
}
|
|
838
|
-
else {
|
|
839
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
840
|
-
}
|
|
841
|
-
let localVarFormParams = {};
|
|
842
|
-
// verify required parameter 'apiKey' is not null or undefined
|
|
843
|
-
if (apiKey === null || apiKey === undefined) {
|
|
844
|
-
throw new Error('Required parameter apiKey was null or undefined when calling updateApiKey.');
|
|
845
|
-
}
|
|
846
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
847
|
-
let localVarUseFormData = false;
|
|
848
|
-
let localVarRequestOptions = {
|
|
849
|
-
method: 'POST',
|
|
850
|
-
qs: localVarQueryParameters,
|
|
851
|
-
headers: localVarHeaderParams,
|
|
852
|
-
uri: localVarPath,
|
|
853
|
-
useQuerystring: this._useQuerystring,
|
|
854
|
-
json: true,
|
|
855
|
-
body: models_1.ObjectSerializer.serialize(apiKey, "ApiKey")
|
|
856
|
-
};
|
|
857
|
-
let authenticationPromise = Promise.resolve();
|
|
858
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
859
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
860
|
-
}
|
|
861
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
862
|
-
let interceptorPromise = authenticationPromise;
|
|
863
|
-
for (const interceptor of this.interceptors) {
|
|
864
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
865
|
-
}
|
|
866
|
-
return interceptorPromise.then(() => {
|
|
867
|
-
if (Object.keys(localVarFormParams).length) {
|
|
868
|
-
if (localVarUseFormData) {
|
|
869
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
870
|
-
}
|
|
871
|
-
else {
|
|
872
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
return new Promise((resolve, reject) => {
|
|
876
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
877
|
-
if (error) {
|
|
878
|
-
reject(error);
|
|
879
|
-
}
|
|
880
|
-
else {
|
|
881
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
882
|
-
body = models_1.ObjectSerializer.deserialize(body, "ApiKey");
|
|
883
|
-
resolve({ response: response, body: body });
|
|
884
|
-
}
|
|
885
|
-
else {
|
|
886
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
});
|
|
890
|
-
});
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
*
|
|
895
|
-
* @summary update an \"user\" type app-user (i.e. not an api-key)
|
|
896
|
-
* @param appUser
|
|
897
|
-
*/
|
|
898
|
-
async updateAppUser(appUser, options = { headers: {} }) {
|
|
899
|
-
const localVarPath = this.basePath + '/v2/experimental/app-user/v1';
|
|
900
|
-
let localVarQueryParameters = {};
|
|
901
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
902
|
-
const produces = ['application/json'];
|
|
903
|
-
// give precedence to 'application/json'
|
|
904
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
905
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
906
|
-
}
|
|
907
|
-
else {
|
|
908
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
909
|
-
}
|
|
910
|
-
let localVarFormParams = {};
|
|
911
|
-
// verify required parameter 'appUser' is not null or undefined
|
|
912
|
-
if (appUser === null || appUser === undefined) {
|
|
913
|
-
throw new Error('Required parameter appUser was null or undefined when calling updateAppUser.');
|
|
914
|
-
}
|
|
915
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
916
|
-
let localVarUseFormData = false;
|
|
917
|
-
let localVarRequestOptions = {
|
|
918
|
-
method: 'POST',
|
|
919
|
-
qs: localVarQueryParameters,
|
|
920
|
-
headers: localVarHeaderParams,
|
|
921
|
-
uri: localVarPath,
|
|
922
|
-
useQuerystring: this._useQuerystring,
|
|
923
|
-
json: true,
|
|
924
|
-
body: models_1.ObjectSerializer.serialize(appUser, "AppUser")
|
|
925
|
-
};
|
|
926
|
-
let authenticationPromise = Promise.resolve();
|
|
927
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
928
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
929
|
-
}
|
|
930
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
931
|
-
let interceptorPromise = authenticationPromise;
|
|
932
|
-
for (const interceptor of this.interceptors) {
|
|
933
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
934
|
-
}
|
|
935
|
-
return interceptorPromise.then(() => {
|
|
936
|
-
if (Object.keys(localVarFormParams).length) {
|
|
937
|
-
if (localVarUseFormData) {
|
|
938
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
939
|
-
}
|
|
940
|
-
else {
|
|
941
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
return new Promise((resolve, reject) => {
|
|
945
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
946
|
-
if (error) {
|
|
947
|
-
reject(error);
|
|
948
|
-
}
|
|
949
|
-
else {
|
|
950
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
951
|
-
body = models_1.ObjectSerializer.deserialize(body, "AppUser");
|
|
952
|
-
resolve({ response: response, body: body });
|
|
953
|
-
}
|
|
954
|
-
else {
|
|
955
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
});
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
*
|
|
964
|
-
* @summary update a request to change its status
|
|
965
|
-
* @param updateAuthzRequestStatus
|
|
966
|
-
*/
|
|
967
|
-
async updateAuthzRequestStatus(updateAuthzRequestStatus, options = { headers: {} }) {
|
|
968
|
-
const localVarPath = this.basePath + '/v2/experimental/update-authz-request-status/v1';
|
|
969
|
-
let localVarQueryParameters = {};
|
|
970
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
971
|
-
let localVarFormParams = {};
|
|
972
|
-
// verify required parameter 'updateAuthzRequestStatus' is not null or undefined
|
|
973
|
-
if (updateAuthzRequestStatus === null || updateAuthzRequestStatus === undefined) {
|
|
974
|
-
throw new Error('Required parameter updateAuthzRequestStatus was null or undefined when calling updateAuthzRequestStatus.');
|
|
975
|
-
}
|
|
976
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
977
|
-
let localVarUseFormData = false;
|
|
978
|
-
let localVarRequestOptions = {
|
|
979
|
-
method: 'POST',
|
|
980
|
-
qs: localVarQueryParameters,
|
|
981
|
-
headers: localVarHeaderParams,
|
|
982
|
-
uri: localVarPath,
|
|
983
|
-
useQuerystring: this._useQuerystring,
|
|
984
|
-
json: true,
|
|
985
|
-
body: models_1.ObjectSerializer.serialize(updateAuthzRequestStatus, "UpdateAuthzRequestStatus")
|
|
986
|
-
};
|
|
987
|
-
let authenticationPromise = Promise.resolve();
|
|
988
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
989
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
990
|
-
}
|
|
991
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
992
|
-
let interceptorPromise = authenticationPromise;
|
|
993
|
-
for (const interceptor of this.interceptors) {
|
|
994
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
995
|
-
}
|
|
996
|
-
return interceptorPromise.then(() => {
|
|
997
|
-
if (Object.keys(localVarFormParams).length) {
|
|
998
|
-
if (localVarUseFormData) {
|
|
999
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1000
|
-
}
|
|
1001
|
-
else {
|
|
1002
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
return new Promise((resolve, reject) => {
|
|
1006
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1007
|
-
if (error) {
|
|
1008
|
-
reject(error);
|
|
1009
|
-
}
|
|
1010
|
-
else {
|
|
1011
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1012
|
-
resolve({ response: response, body: body });
|
|
1013
|
-
}
|
|
1014
|
-
else {
|
|
1015
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
});
|
|
1019
|
-
});
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
*
|
|
1024
|
-
* @summary update a service point, create a new one if id not set
|
|
1025
|
-
* @param servicePoint
|
|
1026
|
-
*/
|
|
1027
|
-
async updateServicePoint(servicePoint, options = { headers: {} }) {
|
|
1028
|
-
const localVarPath = this.basePath + '/v2/experimental/service-point/v1';
|
|
1029
|
-
let localVarQueryParameters = {};
|
|
1030
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1031
|
-
const produces = ['application/json'];
|
|
1032
|
-
// give precedence to 'application/json'
|
|
1033
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1034
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1035
|
-
}
|
|
1036
|
-
else {
|
|
1037
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
1038
|
-
}
|
|
1039
|
-
let localVarFormParams = {};
|
|
1040
|
-
// verify required parameter 'servicePoint' is not null or undefined
|
|
1041
|
-
if (servicePoint === null || servicePoint === undefined) {
|
|
1042
|
-
throw new Error('Required parameter servicePoint was null or undefined when calling updateServicePoint.');
|
|
1043
|
-
}
|
|
1044
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1045
|
-
let localVarUseFormData = false;
|
|
1046
|
-
let localVarRequestOptions = {
|
|
1047
|
-
method: 'POST',
|
|
1048
|
-
qs: localVarQueryParameters,
|
|
1049
|
-
headers: localVarHeaderParams,
|
|
1050
|
-
uri: localVarPath,
|
|
1051
|
-
useQuerystring: this._useQuerystring,
|
|
1052
|
-
json: true,
|
|
1053
|
-
body: models_1.ObjectSerializer.serialize(servicePoint, "ServicePoint")
|
|
1054
|
-
};
|
|
1055
|
-
let authenticationPromise = Promise.resolve();
|
|
1056
|
-
if (this.authentications.bearerAuth.accessToken) {
|
|
1057
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
1058
|
-
}
|
|
1059
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1060
|
-
let interceptorPromise = authenticationPromise;
|
|
1061
|
-
for (const interceptor of this.interceptors) {
|
|
1062
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1063
|
-
}
|
|
1064
|
-
return interceptorPromise.then(() => {
|
|
1065
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1066
|
-
if (localVarUseFormData) {
|
|
1067
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1068
|
-
}
|
|
1069
|
-
else {
|
|
1070
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
return new Promise((resolve, reject) => {
|
|
1074
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1075
|
-
if (error) {
|
|
1076
|
-
reject(error);
|
|
1077
|
-
}
|
|
1078
|
-
else {
|
|
1079
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1080
|
-
body = models_1.ObjectSerializer.deserialize(body, "ServicePoint");
|
|
1081
|
-
resolve({ response: response, body: body });
|
|
1082
|
-
}
|
|
1083
|
-
else {
|
|
1084
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
});
|
|
1088
|
-
});
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
exports.AdminExperimentalApi = AdminExperimentalApi;
|