@magda/typescript-common 3.0.0-alpha.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AsyncPage.js.map +1 -1
- package/dist/BaseApiClient.d.ts +1 -1
- package/dist/BaseApiClient.js.map +1 -1
- package/dist/ConnectionResult.js.map +1 -1
- package/dist/ConnectorRecordId.js.map +1 -1
- package/dist/JsonConnector.js.map +1 -1
- package/dist/JsonTransformer.js.map +1 -1
- package/dist/OpaCompileResponseParser.js +1 -1
- package/dist/OpaCompileResponseParser.js.map +1 -1
- package/dist/SQLUtils.js.map +1 -1
- package/dist/Try.js.map +1 -1
- package/dist/addTrailingSlash.js.map +1 -1
- package/dist/authorization-api/ApiClient.js.map +1 -1
- package/dist/authorization-api/authMiddleware.js.map +1 -1
- package/dist/coerceJson.js.map +1 -1
- package/dist/createNoCacheFetchOptions.js.map +1 -1
- package/dist/createServiceError.js +3 -2
- package/dist/createServiceError.js.map +1 -1
- package/dist/express/status.js +12 -24
- package/dist/express/status.js.map +1 -1
- package/dist/fetchRequest.js.map +1 -1
- package/dist/formatServiceError.js +3 -2
- package/dist/formatServiceError.js.map +1 -1
- package/dist/generated/registry/api.d.ts +66 -54
- package/dist/generated/registry/api.js +366 -669
- package/dist/generated/registry/api.js.map +1 -1
- package/dist/getAbsoluteUrl.js.map +1 -1
- package/dist/getBasePathFromUrl.js.map +1 -1
- package/dist/getRequest.js.map +1 -1
- package/dist/getStorageUrl.js.map +1 -1
- package/dist/getUserAgent.d.ts +2 -0
- package/dist/getUserAgent.js +10 -0
- package/dist/getUserAgent.js.map +1 -0
- package/dist/handleServerError.js.map +1 -1
- package/dist/markdownToHtml.js.map +1 -1
- package/dist/opa/AspectQuery.js.map +1 -1
- package/dist/opa/AuthDecision.js.map +1 -1
- package/dist/opa/AuthDecisionQueryClient.js.map +1 -1
- package/dist/pgTypes.js.map +1 -1
- package/dist/registry/AuthorizedRegistryClient.js +4 -4
- package/dist/registry/AuthorizedRegistryClient.js.map +1 -1
- package/dist/registry/RegistryClient.d.ts +0 -1
- package/dist/registry/RegistryClient.js +8 -9
- package/dist/registry/RegistryClient.js.map +1 -1
- package/dist/retry.js.map +1 -1
- package/dist/retryBackoff.js.map +1 -1
- package/dist/runLater.js.map +1 -1
- package/dist/session/GetUserId.js.map +1 -1
- package/dist/session/GetUserSession.js.map +1 -1
- package/dist/session/addJwtSecretFromEnvVar.js.map +1 -1
- package/dist/session/destroySession.js.map +1 -1
- package/dist/session/getSessionId.js.map +1 -1
- package/dist/tenant-api/AuthorizedTenantClient.js.map +1 -1
- package/dist/test/JsonConnector.spec.js.map +1 -1
- package/dist/test/JsonTransformer.spec.js.map +1 -1
- package/dist/test/arbitraries.js.map +1 -1
- package/dist/test/buildApiClient.spec.js.map +1 -1
- package/dist/test/connectors/MockRegistry.js.map +1 -1
- package/dist/test/connectors/runConnectorTest.js.map +1 -1
- package/dist/test/createMockAuthDecisionQueryClient.js.map +1 -1
- package/dist/test/db/runMigrationSql.js.map +1 -1
- package/dist/test/express/status.spec.js.map +1 -1
- package/dist/test/getStorageUrl.spec.js.map +1 -1
- package/dist/test/mockAuthApiHost.js.map +1 -1
- package/dist/test/session/buildJwtForRegistryEsriOpaGroupsAndOwnerTest.spec.js.map +1 -1
- package/dist/test/session/buildJwtForRegistryEsriOpaGroupsTest.spec.js.map +1 -1
- package/dist/test/session/buildJwtForRegistryEsriOpaOwnerTest.spec.js.map +1 -1
- package/dist/test/testAsyncPage.spec.js.map +1 -1
- package/dist/util/cleanOrgTitle.js.map +1 -1
- package/dist/util/unionToThrowable.js.map +1 -1
- package/package.json +5 -7
- package/dist/request.d.ts +0 -3
- package/dist/request.js +0 -14
- package/dist/request.js.map +0 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
12
|
+
import fetch, { Headers } from 'cross-fetch';
|
|
13
13
|
let defaultBasePath = 'http://localhost/api/v0/registry/';
|
|
14
14
|
// ===============================================
|
|
15
15
|
// This file is autogenerated - Please do not edit
|
|
@@ -192,13 +192,117 @@ export class WebHookConfig {
|
|
|
192
192
|
'includeAspectDefinitions';
|
|
193
193
|
'dereference';
|
|
194
194
|
}
|
|
195
|
+
export function setRequestOptionsHeader(requestOptions, headerName, headerValue) {
|
|
196
|
+
if (headerValue === null || typeof headerValue === 'undefined') {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (!requestOptions?.headers) {
|
|
200
|
+
requestOptions.headers = new Headers();
|
|
201
|
+
}
|
|
202
|
+
if (requestOptions.headers instanceof Headers) {
|
|
203
|
+
requestOptions.headers.set(headerName, headerValue);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
requestOptions.headers[headerName] = headerValue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export const isPlainObj = (value) => !!value && Object.getPrototypeOf(value) === Object.prototype;
|
|
210
|
+
export const isTextMimeType = (contentType) => /text\/.*/i.test(contentType) || /[\/|\+]xml.*/i.test(contentType);
|
|
211
|
+
export const isNotEmpty = (val) => val !== null && val !== undefined;
|
|
212
|
+
export async function fetchWithRequestOptions(requestOptions) {
|
|
213
|
+
const { uri, qs, json, encoding, form, formData, ...fetchOptions } = requestOptions;
|
|
214
|
+
const url = new URL(uri);
|
|
215
|
+
if (qs && Object.keys(qs).length > 0) {
|
|
216
|
+
for (const key in qs) {
|
|
217
|
+
const value = qs[key];
|
|
218
|
+
url.searchParams.delete(key);
|
|
219
|
+
if (!isNotEmpty(value)) {
|
|
220
|
+
url.searchParams.append(key, '');
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (Array.isArray(value)) {
|
|
224
|
+
value.forEach((v) => url.searchParams.append(key, v));
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
url.searchParams.append(key, value);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (fetchOptions?.body) {
|
|
232
|
+
const body = fetchOptions.body;
|
|
233
|
+
const requireJsonStringify = isPlainObj(body) || Array.isArray(body);
|
|
234
|
+
if (json || requireJsonStringify) {
|
|
235
|
+
setRequestOptionsHeader(fetchOptions, 'Content-Type', 'application/json');
|
|
236
|
+
}
|
|
237
|
+
if (requireJsonStringify) {
|
|
238
|
+
fetchOptions.body = JSON.stringify(body);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
fetchOptions.body = body;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (form && formData) {
|
|
245
|
+
throw new Error('Only one of form or formData can be set for request options');
|
|
246
|
+
}
|
|
247
|
+
if (fetchOptions?.body && (form || formData)) {
|
|
248
|
+
throw new Error('Only one of body or form or formData can be set for request options');
|
|
249
|
+
}
|
|
250
|
+
if (form) {
|
|
251
|
+
setRequestOptionsHeader(fetchOptions, 'Content-Type', 'application/x-www-form-urlencoded');
|
|
252
|
+
if (typeof form === 'string') {
|
|
253
|
+
fetchOptions.body = form;
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
const params = new URLSearchParams();
|
|
257
|
+
for (const key in form) {
|
|
258
|
+
params.append(key, form[key]);
|
|
259
|
+
}
|
|
260
|
+
fetchOptions.body = params;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (formData) {
|
|
264
|
+
const form = new FormData();
|
|
265
|
+
for (const key in formData) {
|
|
266
|
+
form.append(key, formData[key]);
|
|
267
|
+
}
|
|
268
|
+
fetchOptions.body = form;
|
|
269
|
+
}
|
|
270
|
+
const res = await fetch(url, fetchOptions);
|
|
271
|
+
let contentType = res.headers.get('Content-Type');
|
|
272
|
+
contentType = contentType ? contentType : '';
|
|
273
|
+
let body;
|
|
274
|
+
if (encoding === null) {
|
|
275
|
+
body = await res.blob();
|
|
276
|
+
}
|
|
277
|
+
else if (contentType === 'application/json') {
|
|
278
|
+
body = await res.json();
|
|
279
|
+
}
|
|
280
|
+
else if (isTextMimeType(contentType)) {
|
|
281
|
+
body = await res.text();
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
if (typeof encoding === 'string' && encoding) {
|
|
285
|
+
const buffer = await res.arrayBuffer();
|
|
286
|
+
const decoder = new TextDecoder(encoding);
|
|
287
|
+
body = decoder.decode(buffer);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
body = await res.text();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (res.ok) {
|
|
294
|
+
return { response: res, body };
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
throw { response: res, body };
|
|
298
|
+
}
|
|
299
|
+
}
|
|
195
300
|
export class HttpBasicAuth {
|
|
196
301
|
username;
|
|
197
302
|
password;
|
|
198
303
|
applyToRequest(requestOptions) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
304
|
+
const basicAuthValue = Buffer.from(this.username + ':' + this.password, 'utf-8').toString('base64');
|
|
305
|
+
setRequestOptionsHeader(requestOptions, 'Authorization', 'Basic ' + basicAuthValue);
|
|
202
306
|
}
|
|
203
307
|
}
|
|
204
308
|
export class ApiKeyAuth {
|
|
@@ -210,20 +314,21 @@ export class ApiKeyAuth {
|
|
|
210
314
|
this.paramName = paramName;
|
|
211
315
|
}
|
|
212
316
|
applyToRequest(requestOptions) {
|
|
213
|
-
if (this.location ==
|
|
317
|
+
if (this.location == 'query') {
|
|
318
|
+
if (!requestOptions.qs) {
|
|
319
|
+
requestOptions.qs = {};
|
|
320
|
+
}
|
|
214
321
|
requestOptions.qs[this.paramName] = this.apiKey;
|
|
215
322
|
}
|
|
216
|
-
else if (this.location ==
|
|
217
|
-
requestOptions
|
|
323
|
+
else if (this.location == 'header') {
|
|
324
|
+
setRequestOptionsHeader(requestOptions, this.paramName, this.apiKey);
|
|
218
325
|
}
|
|
219
326
|
}
|
|
220
327
|
}
|
|
221
328
|
export class OAuth {
|
|
222
329
|
accessToken;
|
|
223
330
|
applyToRequest(requestOptions) {
|
|
224
|
-
|
|
225
|
-
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
|
|
226
|
-
}
|
|
331
|
+
setRequestOptionsHeader(requestOptions, 'Authorization', 'Bearer ' + this.accessToken);
|
|
227
332
|
}
|
|
228
333
|
}
|
|
229
334
|
export class VoidAuth {
|
|
@@ -239,7 +344,6 @@ export var AspectDefinitionsApiApiKeys;
|
|
|
239
344
|
export class AspectDefinitionsApi {
|
|
240
345
|
basePath = defaultBasePath;
|
|
241
346
|
defaultHeaders = {};
|
|
242
|
-
_useQuerystring = false;
|
|
243
347
|
authentications = {
|
|
244
348
|
'default': new VoidAuth(),
|
|
245
349
|
};
|
|
@@ -255,9 +359,6 @@ export class AspectDefinitionsApi {
|
|
|
255
359
|
}
|
|
256
360
|
}
|
|
257
361
|
}
|
|
258
|
-
set useQuerystring(value) {
|
|
259
|
-
this._useQuerystring = value;
|
|
260
|
-
}
|
|
261
362
|
setApiKey(key, value) {
|
|
262
363
|
this.authentications[AspectDefinitionsApiApiKeys[key]].apiKey = value;
|
|
263
364
|
}
|
|
@@ -285,15 +386,18 @@ export class AspectDefinitionsApi {
|
|
|
285
386
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
286
387
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling create.');
|
|
287
388
|
}
|
|
288
|
-
|
|
289
|
-
|
|
389
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
390
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
391
|
+
}
|
|
392
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
393
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
394
|
+
}
|
|
290
395
|
let useFormData = false;
|
|
291
|
-
|
|
396
|
+
const requestOptions = {
|
|
292
397
|
method: 'POST',
|
|
293
398
|
qs: queryParameters,
|
|
294
399
|
headers: headerParams,
|
|
295
400
|
uri: localVarPath,
|
|
296
|
-
useQuerystring: this._useQuerystring,
|
|
297
401
|
json: true,
|
|
298
402
|
body: aspect,
|
|
299
403
|
};
|
|
@@ -306,21 +410,7 @@ export class AspectDefinitionsApi {
|
|
|
306
410
|
requestOptions.form = formParams;
|
|
307
411
|
}
|
|
308
412
|
}
|
|
309
|
-
return
|
|
310
|
-
request(requestOptions, (error, response, body) => {
|
|
311
|
-
if (error) {
|
|
312
|
-
reject(error);
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
316
|
-
resolve({ response: response, body: body });
|
|
317
|
-
}
|
|
318
|
-
else {
|
|
319
|
-
reject({ response: response, body: body });
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
});
|
|
413
|
+
return fetchWithRequestOptions(requestOptions);
|
|
324
414
|
}
|
|
325
415
|
/**
|
|
326
416
|
* Get a list of all aspects
|
|
@@ -337,15 +427,18 @@ export class AspectDefinitionsApi {
|
|
|
337
427
|
if (xMagdaTenantId === null || xMagdaTenantId === undefined) {
|
|
338
428
|
throw new Error('Required parameter xMagdaTenantId was null or undefined when calling getAll.');
|
|
339
429
|
}
|
|
340
|
-
|
|
341
|
-
|
|
430
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
431
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
432
|
+
}
|
|
433
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
434
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
435
|
+
}
|
|
342
436
|
let useFormData = false;
|
|
343
|
-
|
|
437
|
+
const requestOptions = {
|
|
344
438
|
method: 'GET',
|
|
345
439
|
qs: queryParameters,
|
|
346
440
|
headers: headerParams,
|
|
347
441
|
uri: localVarPath,
|
|
348
|
-
useQuerystring: this._useQuerystring,
|
|
349
442
|
json: true,
|
|
350
443
|
};
|
|
351
444
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -357,21 +450,7 @@ export class AspectDefinitionsApi {
|
|
|
357
450
|
requestOptions.form = formParams;
|
|
358
451
|
}
|
|
359
452
|
}
|
|
360
|
-
return
|
|
361
|
-
request(requestOptions, (error, response, body) => {
|
|
362
|
-
if (error) {
|
|
363
|
-
reject(error);
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
367
|
-
resolve({ response: response, body: body });
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
reject({ response: response, body: body });
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
});
|
|
453
|
+
return fetchWithRequestOptions(requestOptions);
|
|
375
454
|
}
|
|
376
455
|
/**
|
|
377
456
|
* Get an aspect by ID
|
|
@@ -394,15 +473,18 @@ export class AspectDefinitionsApi {
|
|
|
394
473
|
if (id === null || id === undefined) {
|
|
395
474
|
throw new Error('Required parameter id was null or undefined when calling getById.');
|
|
396
475
|
}
|
|
397
|
-
|
|
398
|
-
|
|
476
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
477
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
478
|
+
}
|
|
479
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
480
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
481
|
+
}
|
|
399
482
|
let useFormData = false;
|
|
400
|
-
|
|
483
|
+
const requestOptions = {
|
|
401
484
|
method: 'GET',
|
|
402
485
|
qs: queryParameters,
|
|
403
486
|
headers: headerParams,
|
|
404
487
|
uri: localVarPath,
|
|
405
|
-
useQuerystring: this._useQuerystring,
|
|
406
488
|
json: true,
|
|
407
489
|
};
|
|
408
490
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -414,21 +496,7 @@ export class AspectDefinitionsApi {
|
|
|
414
496
|
requestOptions.form = formParams;
|
|
415
497
|
}
|
|
416
498
|
}
|
|
417
|
-
return
|
|
418
|
-
request(requestOptions, (error, response, body) => {
|
|
419
|
-
if (error) {
|
|
420
|
-
reject(error);
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
424
|
-
resolve({ response: response, body: body });
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
reject({ response: response, body: body });
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
});
|
|
499
|
+
return fetchWithRequestOptions(requestOptions);
|
|
432
500
|
}
|
|
433
501
|
/**
|
|
434
502
|
* Modify an aspect by applying a JSON Patch
|
|
@@ -460,15 +528,18 @@ export class AspectDefinitionsApi {
|
|
|
460
528
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
461
529
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling patchById.');
|
|
462
530
|
}
|
|
463
|
-
|
|
464
|
-
|
|
531
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
532
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
533
|
+
}
|
|
534
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
535
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
536
|
+
}
|
|
465
537
|
let useFormData = false;
|
|
466
|
-
|
|
538
|
+
const requestOptions = {
|
|
467
539
|
method: 'PATCH',
|
|
468
540
|
qs: queryParameters,
|
|
469
541
|
headers: headerParams,
|
|
470
542
|
uri: localVarPath,
|
|
471
|
-
useQuerystring: this._useQuerystring,
|
|
472
543
|
json: true,
|
|
473
544
|
body: aspectPatch,
|
|
474
545
|
};
|
|
@@ -481,21 +552,7 @@ export class AspectDefinitionsApi {
|
|
|
481
552
|
requestOptions.form = formParams;
|
|
482
553
|
}
|
|
483
554
|
}
|
|
484
|
-
return
|
|
485
|
-
request(requestOptions, (error, response, body) => {
|
|
486
|
-
if (error) {
|
|
487
|
-
reject(error);
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
491
|
-
resolve({ response: response, body: body });
|
|
492
|
-
}
|
|
493
|
-
else {
|
|
494
|
-
reject({ response: response, body: body });
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
});
|
|
555
|
+
return fetchWithRequestOptions(requestOptions);
|
|
499
556
|
}
|
|
500
557
|
/**
|
|
501
558
|
* Modify an aspect by ID
|
|
@@ -527,15 +584,18 @@ export class AspectDefinitionsApi {
|
|
|
527
584
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
528
585
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling putById.');
|
|
529
586
|
}
|
|
530
|
-
|
|
531
|
-
|
|
587
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
588
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
589
|
+
}
|
|
590
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
591
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
592
|
+
}
|
|
532
593
|
let useFormData = false;
|
|
533
|
-
|
|
594
|
+
const requestOptions = {
|
|
534
595
|
method: 'PUT',
|
|
535
596
|
qs: queryParameters,
|
|
536
597
|
headers: headerParams,
|
|
537
598
|
uri: localVarPath,
|
|
538
|
-
useQuerystring: this._useQuerystring,
|
|
539
599
|
json: true,
|
|
540
600
|
body: aspect,
|
|
541
601
|
};
|
|
@@ -548,21 +608,7 @@ export class AspectDefinitionsApi {
|
|
|
548
608
|
requestOptions.form = formParams;
|
|
549
609
|
}
|
|
550
610
|
}
|
|
551
|
-
return
|
|
552
|
-
request(requestOptions, (error, response, body) => {
|
|
553
|
-
if (error) {
|
|
554
|
-
reject(error);
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
557
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
558
|
-
resolve({ response: response, body: body });
|
|
559
|
-
}
|
|
560
|
-
else {
|
|
561
|
-
reject({ response: response, body: body });
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
});
|
|
611
|
+
return fetchWithRequestOptions(requestOptions);
|
|
566
612
|
}
|
|
567
613
|
}
|
|
568
614
|
export var RecordAspectsApiApiKeys;
|
|
@@ -571,7 +617,6 @@ export var RecordAspectsApiApiKeys;
|
|
|
571
617
|
export class RecordAspectsApi {
|
|
572
618
|
basePath = defaultBasePath;
|
|
573
619
|
defaultHeaders = {};
|
|
574
|
-
_useQuerystring = false;
|
|
575
620
|
authentications = {
|
|
576
621
|
'default': new VoidAuth(),
|
|
577
622
|
};
|
|
@@ -587,9 +632,6 @@ export class RecordAspectsApi {
|
|
|
587
632
|
}
|
|
588
633
|
}
|
|
589
634
|
}
|
|
590
|
-
set useQuerystring(value) {
|
|
591
|
-
this._useQuerystring = value;
|
|
592
|
-
}
|
|
593
635
|
setApiKey(key, value) {
|
|
594
636
|
this.authentications[RecordAspectsApiApiKeys[key]].apiKey = value;
|
|
595
637
|
}
|
|
@@ -624,15 +666,18 @@ export class RecordAspectsApi {
|
|
|
624
666
|
if (xMagdaTenantId === null || xMagdaTenantId === undefined) {
|
|
625
667
|
throw new Error('Required parameter xMagdaTenantId was null or undefined when calling deleteById.');
|
|
626
668
|
}
|
|
627
|
-
|
|
628
|
-
|
|
669
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
670
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
671
|
+
}
|
|
672
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
673
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
674
|
+
}
|
|
629
675
|
let useFormData = false;
|
|
630
|
-
|
|
676
|
+
const requestOptions = {
|
|
631
677
|
method: 'DELETE',
|
|
632
678
|
qs: queryParameters,
|
|
633
679
|
headers: headerParams,
|
|
634
680
|
uri: localVarPath,
|
|
635
|
-
useQuerystring: this._useQuerystring,
|
|
636
681
|
json: true,
|
|
637
682
|
};
|
|
638
683
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -644,21 +689,7 @@ export class RecordAspectsApi {
|
|
|
644
689
|
requestOptions.form = formParams;
|
|
645
690
|
}
|
|
646
691
|
}
|
|
647
|
-
return
|
|
648
|
-
request(requestOptions, (error, response, body) => {
|
|
649
|
-
if (error) {
|
|
650
|
-
reject(error);
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
654
|
-
resolve({ response: response, body: body });
|
|
655
|
-
}
|
|
656
|
-
else {
|
|
657
|
-
reject({ response: response, body: body });
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
});
|
|
661
|
-
});
|
|
692
|
+
return fetchWithRequestOptions(requestOptions);
|
|
662
693
|
}
|
|
663
694
|
/**
|
|
664
695
|
* Get a list of a record's aspects
|
|
@@ -697,15 +728,18 @@ export class RecordAspectsApi {
|
|
|
697
728
|
if (limit !== undefined) {
|
|
698
729
|
queryParameters['limit'] = limit;
|
|
699
730
|
}
|
|
700
|
-
|
|
701
|
-
|
|
731
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
732
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
733
|
+
}
|
|
734
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
735
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
736
|
+
}
|
|
702
737
|
let useFormData = false;
|
|
703
|
-
|
|
738
|
+
const requestOptions = {
|
|
704
739
|
method: 'GET',
|
|
705
740
|
qs: queryParameters,
|
|
706
741
|
headers: headerParams,
|
|
707
742
|
uri: localVarPath,
|
|
708
|
-
useQuerystring: this._useQuerystring,
|
|
709
743
|
json: true,
|
|
710
744
|
};
|
|
711
745
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -717,21 +751,7 @@ export class RecordAspectsApi {
|
|
|
717
751
|
requestOptions.form = formParams;
|
|
718
752
|
}
|
|
719
753
|
}
|
|
720
|
-
return
|
|
721
|
-
request(requestOptions, (error, response, body) => {
|
|
722
|
-
if (error) {
|
|
723
|
-
reject(error);
|
|
724
|
-
}
|
|
725
|
-
else {
|
|
726
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
727
|
-
resolve({ response: response, body: body });
|
|
728
|
-
}
|
|
729
|
-
else {
|
|
730
|
-
reject({ response: response, body: body });
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
});
|
|
734
|
-
});
|
|
754
|
+
return fetchWithRequestOptions(requestOptions);
|
|
735
755
|
}
|
|
736
756
|
/**
|
|
737
757
|
* Get the number of aspects that a record has
|
|
@@ -758,15 +778,18 @@ export class RecordAspectsApi {
|
|
|
758
778
|
if (keyword !== undefined) {
|
|
759
779
|
queryParameters['keyword'] = keyword;
|
|
760
780
|
}
|
|
761
|
-
|
|
762
|
-
|
|
781
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
782
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
783
|
+
}
|
|
784
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
785
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
786
|
+
}
|
|
763
787
|
let useFormData = false;
|
|
764
|
-
|
|
788
|
+
const requestOptions = {
|
|
765
789
|
method: 'GET',
|
|
766
790
|
qs: queryParameters,
|
|
767
791
|
headers: headerParams,
|
|
768
792
|
uri: localVarPath,
|
|
769
|
-
useQuerystring: this._useQuerystring,
|
|
770
793
|
json: true,
|
|
771
794
|
};
|
|
772
795
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -778,21 +801,7 @@ export class RecordAspectsApi {
|
|
|
778
801
|
requestOptions.form = formParams;
|
|
779
802
|
}
|
|
780
803
|
}
|
|
781
|
-
return
|
|
782
|
-
request(requestOptions, (error, response, body) => {
|
|
783
|
-
if (error) {
|
|
784
|
-
reject(error);
|
|
785
|
-
}
|
|
786
|
-
else {
|
|
787
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
788
|
-
resolve({ response: response, body: body });
|
|
789
|
-
}
|
|
790
|
-
else {
|
|
791
|
-
reject({ response: response, body: body });
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
});
|
|
795
|
-
});
|
|
804
|
+
return fetchWithRequestOptions(requestOptions);
|
|
796
805
|
}
|
|
797
806
|
/**
|
|
798
807
|
* Get a record aspect by ID
|
|
@@ -821,15 +830,18 @@ export class RecordAspectsApi {
|
|
|
821
830
|
if (aspectId === null || aspectId === undefined) {
|
|
822
831
|
throw new Error('Required parameter aspectId was null or undefined when calling getById.');
|
|
823
832
|
}
|
|
824
|
-
|
|
825
|
-
|
|
833
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
834
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
835
|
+
}
|
|
836
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
837
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
838
|
+
}
|
|
826
839
|
let useFormData = false;
|
|
827
|
-
|
|
840
|
+
const requestOptions = {
|
|
828
841
|
method: 'GET',
|
|
829
842
|
qs: queryParameters,
|
|
830
843
|
headers: headerParams,
|
|
831
844
|
uri: localVarPath,
|
|
832
|
-
useQuerystring: this._useQuerystring,
|
|
833
845
|
json: true,
|
|
834
846
|
};
|
|
835
847
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -841,21 +853,7 @@ export class RecordAspectsApi {
|
|
|
841
853
|
requestOptions.form = formParams;
|
|
842
854
|
}
|
|
843
855
|
}
|
|
844
|
-
return
|
|
845
|
-
request(requestOptions, (error, response, body) => {
|
|
846
|
-
if (error) {
|
|
847
|
-
reject(error);
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
850
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
851
|
-
resolve({ response: response, body: body });
|
|
852
|
-
}
|
|
853
|
-
else {
|
|
854
|
-
reject({ response: response, body: body });
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
});
|
|
858
|
-
});
|
|
856
|
+
return fetchWithRequestOptions(requestOptions);
|
|
859
857
|
}
|
|
860
858
|
/**
|
|
861
859
|
* Modify a record aspect by applying a JSON Patch
|
|
@@ -893,15 +891,18 @@ export class RecordAspectsApi {
|
|
|
893
891
|
if (xMagdaTenantId === null || xMagdaTenantId === undefined) {
|
|
894
892
|
throw new Error('Required parameter xMagdaTenantId was null or undefined when calling patchById.');
|
|
895
893
|
}
|
|
896
|
-
|
|
897
|
-
|
|
894
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
895
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
896
|
+
}
|
|
897
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
898
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
899
|
+
}
|
|
898
900
|
let useFormData = false;
|
|
899
|
-
|
|
901
|
+
const requestOptions = {
|
|
900
902
|
method: 'PATCH',
|
|
901
903
|
qs: queryParameters,
|
|
902
904
|
headers: headerParams,
|
|
903
905
|
uri: localVarPath,
|
|
904
|
-
useQuerystring: this._useQuerystring,
|
|
905
906
|
json: true,
|
|
906
907
|
body: aspectPatch,
|
|
907
908
|
};
|
|
@@ -914,21 +915,7 @@ export class RecordAspectsApi {
|
|
|
914
915
|
requestOptions.form = formParams;
|
|
915
916
|
}
|
|
916
917
|
}
|
|
917
|
-
return
|
|
918
|
-
request(requestOptions, (error, response, body) => {
|
|
919
|
-
if (error) {
|
|
920
|
-
reject(error);
|
|
921
|
-
}
|
|
922
|
-
else {
|
|
923
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
924
|
-
resolve({ response: response, body: body });
|
|
925
|
-
}
|
|
926
|
-
else {
|
|
927
|
-
reject({ response: response, body: body });
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
});
|
|
918
|
+
return fetchWithRequestOptions(requestOptions);
|
|
932
919
|
}
|
|
933
920
|
/**
|
|
934
921
|
* Modify a record aspect by ID
|
|
@@ -970,15 +957,18 @@ export class RecordAspectsApi {
|
|
|
970
957
|
if (merge !== undefined) {
|
|
971
958
|
queryParameters['merge'] = merge;
|
|
972
959
|
}
|
|
973
|
-
|
|
974
|
-
|
|
960
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
961
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
962
|
+
}
|
|
963
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
964
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
965
|
+
}
|
|
975
966
|
let useFormData = false;
|
|
976
|
-
|
|
967
|
+
const requestOptions = {
|
|
977
968
|
method: 'PUT',
|
|
978
969
|
qs: queryParameters,
|
|
979
970
|
headers: headerParams,
|
|
980
971
|
uri: localVarPath,
|
|
981
|
-
useQuerystring: this._useQuerystring,
|
|
982
972
|
json: true,
|
|
983
973
|
body: aspect,
|
|
984
974
|
};
|
|
@@ -991,21 +981,7 @@ export class RecordAspectsApi {
|
|
|
991
981
|
requestOptions.form = formParams;
|
|
992
982
|
}
|
|
993
983
|
}
|
|
994
|
-
return
|
|
995
|
-
request(requestOptions, (error, response, body) => {
|
|
996
|
-
if (error) {
|
|
997
|
-
reject(error);
|
|
998
|
-
}
|
|
999
|
-
else {
|
|
1000
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1001
|
-
resolve({ response: response, body: body });
|
|
1002
|
-
}
|
|
1003
|
-
else {
|
|
1004
|
-
reject({ response: response, body: body });
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
});
|
|
1008
|
-
});
|
|
984
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1009
985
|
}
|
|
1010
986
|
}
|
|
1011
987
|
export var RecordHistoryApiApiKeys;
|
|
@@ -1014,7 +990,6 @@ export var RecordHistoryApiApiKeys;
|
|
|
1014
990
|
export class RecordHistoryApi {
|
|
1015
991
|
basePath = defaultBasePath;
|
|
1016
992
|
defaultHeaders = {};
|
|
1017
|
-
_useQuerystring = false;
|
|
1018
993
|
authentications = {
|
|
1019
994
|
'default': new VoidAuth(),
|
|
1020
995
|
};
|
|
@@ -1030,9 +1005,6 @@ export class RecordHistoryApi {
|
|
|
1030
1005
|
}
|
|
1031
1006
|
}
|
|
1032
1007
|
}
|
|
1033
|
-
set useQuerystring(value) {
|
|
1034
|
-
this._useQuerystring = value;
|
|
1035
|
-
}
|
|
1036
1008
|
setApiKey(key, value) {
|
|
1037
1009
|
this.authentications[RecordHistoryApiApiKeys[key]].apiKey = value;
|
|
1038
1010
|
}
|
|
@@ -1085,15 +1057,18 @@ export class RecordHistoryApi {
|
|
|
1085
1057
|
if (reversePageTokenOrder !== undefined) {
|
|
1086
1058
|
queryParameters['reversePageTokenOrder'] = reversePageTokenOrder;
|
|
1087
1059
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1060
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1061
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1062
|
+
}
|
|
1063
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1064
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1065
|
+
}
|
|
1090
1066
|
let useFormData = false;
|
|
1091
|
-
|
|
1067
|
+
const requestOptions = {
|
|
1092
1068
|
method: 'GET',
|
|
1093
1069
|
qs: queryParameters,
|
|
1094
1070
|
headers: headerParams,
|
|
1095
1071
|
uri: localVarPath,
|
|
1096
|
-
useQuerystring: this._useQuerystring,
|
|
1097
1072
|
json: true,
|
|
1098
1073
|
};
|
|
1099
1074
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1105,21 +1080,7 @@ export class RecordHistoryApi {
|
|
|
1105
1080
|
requestOptions.form = formParams;
|
|
1106
1081
|
}
|
|
1107
1082
|
}
|
|
1108
|
-
return
|
|
1109
|
-
request(requestOptions, (error, response, body) => {
|
|
1110
|
-
if (error) {
|
|
1111
|
-
reject(error);
|
|
1112
|
-
}
|
|
1113
|
-
else {
|
|
1114
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1115
|
-
resolve({ response: response, body: body });
|
|
1116
|
-
}
|
|
1117
|
-
else {
|
|
1118
|
-
reject({ response: response, body: body });
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1083
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1123
1084
|
}
|
|
1124
1085
|
/**
|
|
1125
1086
|
* Get the version of a record that existed after a given event was applied
|
|
@@ -1147,14 +1108,15 @@ export class RecordHistoryApi {
|
|
|
1147
1108
|
if (eventId === null || eventId === undefined) {
|
|
1148
1109
|
throw new Error('Required parameter eventId was null or undefined when calling version.');
|
|
1149
1110
|
}
|
|
1150
|
-
|
|
1111
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1112
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1113
|
+
}
|
|
1151
1114
|
let useFormData = false;
|
|
1152
|
-
|
|
1115
|
+
const requestOptions = {
|
|
1153
1116
|
method: 'GET',
|
|
1154
1117
|
qs: queryParameters,
|
|
1155
1118
|
headers: headerParams,
|
|
1156
1119
|
uri: localVarPath,
|
|
1157
|
-
useQuerystring: this._useQuerystring,
|
|
1158
1120
|
json: true,
|
|
1159
1121
|
};
|
|
1160
1122
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1166,21 +1128,7 @@ export class RecordHistoryApi {
|
|
|
1166
1128
|
requestOptions.form = formParams;
|
|
1167
1129
|
}
|
|
1168
1130
|
}
|
|
1169
|
-
return
|
|
1170
|
-
request(requestOptions, (error, response, body) => {
|
|
1171
|
-
if (error) {
|
|
1172
|
-
reject(error);
|
|
1173
|
-
}
|
|
1174
|
-
else {
|
|
1175
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1176
|
-
resolve({ response: response, body: body });
|
|
1177
|
-
}
|
|
1178
|
-
else {
|
|
1179
|
-
reject({ response: response, body: body });
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
});
|
|
1183
|
-
});
|
|
1131
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1184
1132
|
}
|
|
1185
1133
|
}
|
|
1186
1134
|
export var RecordsApiApiKeys;
|
|
@@ -1189,7 +1137,6 @@ export var RecordsApiApiKeys;
|
|
|
1189
1137
|
export class RecordsApi {
|
|
1190
1138
|
basePath = defaultBasePath;
|
|
1191
1139
|
defaultHeaders = {};
|
|
1192
|
-
_useQuerystring = false;
|
|
1193
1140
|
authentications = {
|
|
1194
1141
|
'default': new VoidAuth(),
|
|
1195
1142
|
};
|
|
@@ -1205,9 +1152,6 @@ export class RecordsApi {
|
|
|
1205
1152
|
}
|
|
1206
1153
|
}
|
|
1207
1154
|
}
|
|
1208
|
-
set useQuerystring(value) {
|
|
1209
|
-
this._useQuerystring = value;
|
|
1210
|
-
}
|
|
1211
1155
|
setApiKey(key, value) {
|
|
1212
1156
|
this.authentications[RecordsApiApiKeys[key]].apiKey = value;
|
|
1213
1157
|
}
|
|
@@ -1235,15 +1179,18 @@ export class RecordsApi {
|
|
|
1235
1179
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
1236
1180
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling create.');
|
|
1237
1181
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1182
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1183
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1184
|
+
}
|
|
1185
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1186
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1187
|
+
}
|
|
1240
1188
|
let useFormData = false;
|
|
1241
|
-
|
|
1189
|
+
const requestOptions = {
|
|
1242
1190
|
method: 'POST',
|
|
1243
1191
|
qs: queryParameters,
|
|
1244
1192
|
headers: headerParams,
|
|
1245
1193
|
uri: localVarPath,
|
|
1246
|
-
useQuerystring: this._useQuerystring,
|
|
1247
1194
|
json: true,
|
|
1248
1195
|
body: record,
|
|
1249
1196
|
};
|
|
@@ -1256,21 +1203,7 @@ export class RecordsApi {
|
|
|
1256
1203
|
requestOptions.form = formParams;
|
|
1257
1204
|
}
|
|
1258
1205
|
}
|
|
1259
|
-
return
|
|
1260
|
-
request(requestOptions, (error, response, body) => {
|
|
1261
|
-
if (error) {
|
|
1262
|
-
reject(error);
|
|
1263
|
-
}
|
|
1264
|
-
else {
|
|
1265
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1266
|
-
resolve({ response: response, body: body });
|
|
1267
|
-
}
|
|
1268
|
-
else {
|
|
1269
|
-
reject({ response: response, body: body });
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
});
|
|
1273
|
-
});
|
|
1206
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1274
1207
|
}
|
|
1275
1208
|
/**
|
|
1276
1209
|
* Delete a record
|
|
@@ -1297,15 +1230,18 @@ export class RecordsApi {
|
|
|
1297
1230
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
1298
1231
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling deleteById.');
|
|
1299
1232
|
}
|
|
1300
|
-
|
|
1301
|
-
|
|
1233
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1234
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1235
|
+
}
|
|
1236
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1237
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1238
|
+
}
|
|
1302
1239
|
let useFormData = false;
|
|
1303
|
-
|
|
1240
|
+
const requestOptions = {
|
|
1304
1241
|
method: 'DELETE',
|
|
1305
1242
|
qs: queryParameters,
|
|
1306
1243
|
headers: headerParams,
|
|
1307
1244
|
uri: localVarPath,
|
|
1308
|
-
useQuerystring: this._useQuerystring,
|
|
1309
1245
|
json: true,
|
|
1310
1246
|
};
|
|
1311
1247
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1317,21 +1253,7 @@ export class RecordsApi {
|
|
|
1317
1253
|
requestOptions.form = formParams;
|
|
1318
1254
|
}
|
|
1319
1255
|
}
|
|
1320
|
-
return
|
|
1321
|
-
request(requestOptions, (error, response, body) => {
|
|
1322
|
-
if (error) {
|
|
1323
|
-
reject(error);
|
|
1324
|
-
}
|
|
1325
|
-
else {
|
|
1326
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1327
|
-
resolve({ response: response, body: body });
|
|
1328
|
-
}
|
|
1329
|
-
else {
|
|
1330
|
-
reject({ response: response, body: body });
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
});
|
|
1334
|
-
});
|
|
1256
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1335
1257
|
}
|
|
1336
1258
|
/**
|
|
1337
1259
|
* Remove items from records' aspect data
|
|
@@ -1363,15 +1285,18 @@ export class RecordsApi {
|
|
|
1363
1285
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
1364
1286
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling deleteRecordsAspectArrayItems.');
|
|
1365
1287
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1288
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1289
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1290
|
+
}
|
|
1291
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1292
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1293
|
+
}
|
|
1368
1294
|
let useFormData = false;
|
|
1369
|
-
|
|
1295
|
+
const requestOptions = {
|
|
1370
1296
|
method: 'DELETE',
|
|
1371
1297
|
qs: queryParameters,
|
|
1372
1298
|
headers: headerParams,
|
|
1373
1299
|
uri: localVarPath,
|
|
1374
|
-
useQuerystring: this._useQuerystring,
|
|
1375
1300
|
json: true,
|
|
1376
1301
|
body: requestData,
|
|
1377
1302
|
};
|
|
@@ -1384,21 +1309,7 @@ export class RecordsApi {
|
|
|
1384
1309
|
requestOptions.form = formParams;
|
|
1385
1310
|
}
|
|
1386
1311
|
}
|
|
1387
|
-
return
|
|
1388
|
-
request(requestOptions, (error, response, body) => {
|
|
1389
|
-
if (error) {
|
|
1390
|
-
reject(error);
|
|
1391
|
-
}
|
|
1392
|
-
else {
|
|
1393
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1394
|
-
resolve({ response: response, body: body });
|
|
1395
|
-
}
|
|
1396
|
-
else {
|
|
1397
|
-
reject({ response: response, body: body });
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
});
|
|
1401
|
-
});
|
|
1312
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1402
1313
|
}
|
|
1403
1314
|
/**
|
|
1404
1315
|
* Get a list of all records
|
|
@@ -1467,15 +1378,18 @@ export class RecordsApi {
|
|
|
1467
1378
|
if (q !== undefined) {
|
|
1468
1379
|
queryParameters['q'] = q;
|
|
1469
1380
|
}
|
|
1470
|
-
|
|
1471
|
-
|
|
1381
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1382
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1383
|
+
}
|
|
1384
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1385
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1386
|
+
}
|
|
1472
1387
|
let useFormData = false;
|
|
1473
|
-
|
|
1388
|
+
const requestOptions = {
|
|
1474
1389
|
method: 'GET',
|
|
1475
1390
|
qs: queryParameters,
|
|
1476
1391
|
headers: headerParams,
|
|
1477
1392
|
uri: localVarPath,
|
|
1478
|
-
useQuerystring: this._useQuerystring,
|
|
1479
1393
|
json: true,
|
|
1480
1394
|
};
|
|
1481
1395
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1487,21 +1401,7 @@ export class RecordsApi {
|
|
|
1487
1401
|
requestOptions.form = formParams;
|
|
1488
1402
|
}
|
|
1489
1403
|
}
|
|
1490
|
-
return
|
|
1491
|
-
request(requestOptions, (error, response, body) => {
|
|
1492
|
-
if (error) {
|
|
1493
|
-
reject(error);
|
|
1494
|
-
}
|
|
1495
|
-
else {
|
|
1496
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1497
|
-
resolve({ response: response, body: body });
|
|
1498
|
-
}
|
|
1499
|
-
else {
|
|
1500
|
-
reject({ response: response, body: body });
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
});
|
|
1504
|
-
});
|
|
1404
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1505
1405
|
}
|
|
1506
1406
|
/**
|
|
1507
1407
|
* Get a list of all records as summaries
|
|
@@ -1538,15 +1438,18 @@ export class RecordsApi {
|
|
|
1538
1438
|
if (q !== undefined) {
|
|
1539
1439
|
queryParameters['q'] = q;
|
|
1540
1440
|
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1441
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1442
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1443
|
+
}
|
|
1444
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1445
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1446
|
+
}
|
|
1543
1447
|
let useFormData = false;
|
|
1544
|
-
|
|
1448
|
+
const requestOptions = {
|
|
1545
1449
|
method: 'GET',
|
|
1546
1450
|
qs: queryParameters,
|
|
1547
1451
|
headers: headerParams,
|
|
1548
1452
|
uri: localVarPath,
|
|
1549
|
-
useQuerystring: this._useQuerystring,
|
|
1550
1453
|
json: true,
|
|
1551
1454
|
};
|
|
1552
1455
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1558,21 +1461,7 @@ export class RecordsApi {
|
|
|
1558
1461
|
requestOptions.form = formParams;
|
|
1559
1462
|
}
|
|
1560
1463
|
}
|
|
1561
|
-
return
|
|
1562
|
-
request(requestOptions, (error, response, body) => {
|
|
1563
|
-
if (error) {
|
|
1564
|
-
reject(error);
|
|
1565
|
-
}
|
|
1566
|
-
else {
|
|
1567
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1568
|
-
resolve({ response: response, body: body });
|
|
1569
|
-
}
|
|
1570
|
-
else {
|
|
1571
|
-
reject({ response: response, body: body });
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
});
|
|
1575
|
-
});
|
|
1464
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1576
1465
|
}
|
|
1577
1466
|
/**
|
|
1578
1467
|
* Get a record by ID
|
|
@@ -1607,15 +1496,18 @@ export class RecordsApi {
|
|
|
1607
1496
|
if (dereference !== undefined) {
|
|
1608
1497
|
queryParameters['dereference'] = dereference;
|
|
1609
1498
|
}
|
|
1610
|
-
|
|
1611
|
-
|
|
1499
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1500
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1501
|
+
}
|
|
1502
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1503
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1504
|
+
}
|
|
1612
1505
|
let useFormData = false;
|
|
1613
|
-
|
|
1506
|
+
const requestOptions = {
|
|
1614
1507
|
method: 'GET',
|
|
1615
1508
|
qs: queryParameters,
|
|
1616
1509
|
headers: headerParams,
|
|
1617
1510
|
uri: localVarPath,
|
|
1618
|
-
useQuerystring: this._useQuerystring,
|
|
1619
1511
|
json: true,
|
|
1620
1512
|
};
|
|
1621
1513
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1627,21 +1519,7 @@ export class RecordsApi {
|
|
|
1627
1519
|
requestOptions.form = formParams;
|
|
1628
1520
|
}
|
|
1629
1521
|
}
|
|
1630
|
-
return
|
|
1631
|
-
request(requestOptions, (error, response, body) => {
|
|
1632
|
-
if (error) {
|
|
1633
|
-
reject(error);
|
|
1634
|
-
}
|
|
1635
|
-
else {
|
|
1636
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1637
|
-
resolve({ response: response, body: body });
|
|
1638
|
-
}
|
|
1639
|
-
else {
|
|
1640
|
-
reject({ response: response, body: body });
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
});
|
|
1522
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1645
1523
|
}
|
|
1646
1524
|
/**
|
|
1647
1525
|
* Get a record in full by ID
|
|
@@ -1664,15 +1542,18 @@ export class RecordsApi {
|
|
|
1664
1542
|
if (xMagdaTenantId === null || xMagdaTenantId === undefined) {
|
|
1665
1543
|
throw new Error('Required parameter xMagdaTenantId was null or undefined when calling getByIdInFull.');
|
|
1666
1544
|
}
|
|
1667
|
-
|
|
1668
|
-
|
|
1545
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1546
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1547
|
+
}
|
|
1548
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1549
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1550
|
+
}
|
|
1669
1551
|
let useFormData = false;
|
|
1670
|
-
|
|
1552
|
+
const requestOptions = {
|
|
1671
1553
|
method: 'GET',
|
|
1672
1554
|
qs: queryParameters,
|
|
1673
1555
|
headers: headerParams,
|
|
1674
1556
|
uri: localVarPath,
|
|
1675
|
-
useQuerystring: this._useQuerystring,
|
|
1676
1557
|
json: true,
|
|
1677
1558
|
};
|
|
1678
1559
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1684,21 +1565,7 @@ export class RecordsApi {
|
|
|
1684
1565
|
requestOptions.form = formParams;
|
|
1685
1566
|
}
|
|
1686
1567
|
}
|
|
1687
|
-
return
|
|
1688
|
-
request(requestOptions, (error, response, body) => {
|
|
1689
|
-
if (error) {
|
|
1690
|
-
reject(error);
|
|
1691
|
-
}
|
|
1692
|
-
else {
|
|
1693
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1694
|
-
resolve({ response: response, body: body });
|
|
1695
|
-
}
|
|
1696
|
-
else {
|
|
1697
|
-
reject({ response: response, body: body });
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
});
|
|
1701
|
-
});
|
|
1568
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1702
1569
|
}
|
|
1703
1570
|
/**
|
|
1704
1571
|
* Get a summary record by ID
|
|
@@ -1721,15 +1588,18 @@ export class RecordsApi {
|
|
|
1721
1588
|
if (xMagdaTenantId === null || xMagdaTenantId === undefined) {
|
|
1722
1589
|
throw new Error('Required parameter xMagdaTenantId was null or undefined when calling getByIdSummary.');
|
|
1723
1590
|
}
|
|
1724
|
-
|
|
1725
|
-
|
|
1591
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1592
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1593
|
+
}
|
|
1594
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1595
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1596
|
+
}
|
|
1726
1597
|
let useFormData = false;
|
|
1727
|
-
|
|
1598
|
+
const requestOptions = {
|
|
1728
1599
|
method: 'GET',
|
|
1729
1600
|
qs: queryParameters,
|
|
1730
1601
|
headers: headerParams,
|
|
1731
1602
|
uri: localVarPath,
|
|
1732
|
-
useQuerystring: this._useQuerystring,
|
|
1733
1603
|
json: true,
|
|
1734
1604
|
};
|
|
1735
1605
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1741,21 +1611,7 @@ export class RecordsApi {
|
|
|
1741
1611
|
requestOptions.form = formParams;
|
|
1742
1612
|
}
|
|
1743
1613
|
}
|
|
1744
|
-
return
|
|
1745
|
-
request(requestOptions, (error, response, body) => {
|
|
1746
|
-
if (error) {
|
|
1747
|
-
reject(error);
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1750
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1751
|
-
resolve({ response: response, body: body });
|
|
1752
|
-
}
|
|
1753
|
-
else {
|
|
1754
|
-
reject({ response: response, body: body });
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
});
|
|
1758
|
-
});
|
|
1614
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1759
1615
|
}
|
|
1760
1616
|
/**
|
|
1761
1617
|
* Get the count of records matching the parameters. If no parameters are specified, the count will be approximate for performance reasons.
|
|
@@ -1788,15 +1644,18 @@ export class RecordsApi {
|
|
|
1788
1644
|
if (q !== undefined) {
|
|
1789
1645
|
queryParameters['q'] = q;
|
|
1790
1646
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1647
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1648
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1649
|
+
}
|
|
1650
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1651
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1652
|
+
}
|
|
1793
1653
|
let useFormData = false;
|
|
1794
|
-
|
|
1654
|
+
const requestOptions = {
|
|
1795
1655
|
method: 'GET',
|
|
1796
1656
|
qs: queryParameters,
|
|
1797
1657
|
headers: headerParams,
|
|
1798
1658
|
uri: localVarPath,
|
|
1799
|
-
useQuerystring: this._useQuerystring,
|
|
1800
1659
|
json: true,
|
|
1801
1660
|
};
|
|
1802
1661
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1808,21 +1667,7 @@ export class RecordsApi {
|
|
|
1808
1667
|
requestOptions.form = formParams;
|
|
1809
1668
|
}
|
|
1810
1669
|
}
|
|
1811
|
-
return
|
|
1812
|
-
request(requestOptions, (error, response, body) => {
|
|
1813
|
-
if (error) {
|
|
1814
|
-
reject(error);
|
|
1815
|
-
}
|
|
1816
|
-
else {
|
|
1817
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1818
|
-
resolve({ response: response, body: body });
|
|
1819
|
-
}
|
|
1820
|
-
else {
|
|
1821
|
-
reject({ response: response, body: body });
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
});
|
|
1670
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1826
1671
|
}
|
|
1827
1672
|
/**
|
|
1828
1673
|
* Get a list tokens for paging through the records
|
|
@@ -1847,15 +1692,18 @@ export class RecordsApi {
|
|
|
1847
1692
|
if (limit !== undefined) {
|
|
1848
1693
|
queryParameters['limit'] = limit;
|
|
1849
1694
|
}
|
|
1850
|
-
|
|
1851
|
-
|
|
1695
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1696
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1697
|
+
}
|
|
1698
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1699
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1700
|
+
}
|
|
1852
1701
|
let useFormData = false;
|
|
1853
|
-
|
|
1702
|
+
const requestOptions = {
|
|
1854
1703
|
method: 'GET',
|
|
1855
1704
|
qs: queryParameters,
|
|
1856
1705
|
headers: headerParams,
|
|
1857
1706
|
uri: localVarPath,
|
|
1858
|
-
useQuerystring: this._useQuerystring,
|
|
1859
1707
|
json: true,
|
|
1860
1708
|
};
|
|
1861
1709
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -1867,21 +1715,7 @@ export class RecordsApi {
|
|
|
1867
1715
|
requestOptions.form = formParams;
|
|
1868
1716
|
}
|
|
1869
1717
|
}
|
|
1870
|
-
return
|
|
1871
|
-
request(requestOptions, (error, response, body) => {
|
|
1872
|
-
if (error) {
|
|
1873
|
-
reject(error);
|
|
1874
|
-
}
|
|
1875
|
-
else {
|
|
1876
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1877
|
-
resolve({ response: response, body: body });
|
|
1878
|
-
}
|
|
1879
|
-
else {
|
|
1880
|
-
reject({ response: response, body: body });
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
});
|
|
1884
|
-
});
|
|
1718
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1885
1719
|
}
|
|
1886
1720
|
/**
|
|
1887
1721
|
* Modify a record by applying a JSON Patch
|
|
@@ -1913,15 +1747,18 @@ export class RecordsApi {
|
|
|
1913
1747
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
1914
1748
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling patchById.');
|
|
1915
1749
|
}
|
|
1916
|
-
|
|
1917
|
-
|
|
1750
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1751
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1752
|
+
}
|
|
1753
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1754
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1755
|
+
}
|
|
1918
1756
|
let useFormData = false;
|
|
1919
|
-
|
|
1757
|
+
const requestOptions = {
|
|
1920
1758
|
method: 'PATCH',
|
|
1921
1759
|
qs: queryParameters,
|
|
1922
1760
|
headers: headerParams,
|
|
1923
1761
|
uri: localVarPath,
|
|
1924
|
-
useQuerystring: this._useQuerystring,
|
|
1925
1762
|
json: true,
|
|
1926
1763
|
body: recordPatch,
|
|
1927
1764
|
};
|
|
@@ -1934,21 +1771,7 @@ export class RecordsApi {
|
|
|
1934
1771
|
requestOptions.form = formParams;
|
|
1935
1772
|
}
|
|
1936
1773
|
}
|
|
1937
|
-
return
|
|
1938
|
-
request(requestOptions, (error, response, body) => {
|
|
1939
|
-
if (error) {
|
|
1940
|
-
reject(error);
|
|
1941
|
-
}
|
|
1942
|
-
else {
|
|
1943
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1944
|
-
resolve({ response: response, body: body });
|
|
1945
|
-
}
|
|
1946
|
-
else {
|
|
1947
|
-
reject({ response: response, body: body });
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
});
|
|
1951
|
-
});
|
|
1774
|
+
return fetchWithRequestOptions(requestOptions);
|
|
1952
1775
|
}
|
|
1953
1776
|
/**
|
|
1954
1777
|
* Modify a list of records by applying the same JSON Patch
|
|
@@ -1974,15 +1797,18 @@ export class RecordsApi {
|
|
|
1974
1797
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
1975
1798
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling patchRecords.');
|
|
1976
1799
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1800
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1801
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1802
|
+
}
|
|
1803
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1804
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1805
|
+
}
|
|
1979
1806
|
let useFormData = false;
|
|
1980
|
-
|
|
1807
|
+
const requestOptions = {
|
|
1981
1808
|
method: 'PATCH',
|
|
1982
1809
|
qs: queryParameters,
|
|
1983
1810
|
headers: headerParams,
|
|
1984
1811
|
uri: localVarPath,
|
|
1985
|
-
useQuerystring: this._useQuerystring,
|
|
1986
1812
|
json: true,
|
|
1987
1813
|
body: requestData,
|
|
1988
1814
|
};
|
|
@@ -1995,21 +1821,7 @@ export class RecordsApi {
|
|
|
1995
1821
|
requestOptions.form = formParams;
|
|
1996
1822
|
}
|
|
1997
1823
|
}
|
|
1998
|
-
return
|
|
1999
|
-
request(requestOptions, (error, response, body) => {
|
|
2000
|
-
if (error) {
|
|
2001
|
-
reject(error);
|
|
2002
|
-
}
|
|
2003
|
-
else {
|
|
2004
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2005
|
-
resolve({ response: response, body: body });
|
|
2006
|
-
}
|
|
2007
|
-
else {
|
|
2008
|
-
reject({ response: response, body: body });
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
});
|
|
2012
|
-
});
|
|
1824
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2013
1825
|
}
|
|
2014
1826
|
/**
|
|
2015
1827
|
* Modify a record by ID
|
|
@@ -2045,15 +1857,18 @@ export class RecordsApi {
|
|
|
2045
1857
|
if (merge !== undefined) {
|
|
2046
1858
|
queryParameters['merge'] = merge;
|
|
2047
1859
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
1860
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1861
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1862
|
+
}
|
|
1863
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1864
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1865
|
+
}
|
|
2050
1866
|
let useFormData = false;
|
|
2051
|
-
|
|
1867
|
+
const requestOptions = {
|
|
2052
1868
|
method: 'PUT',
|
|
2053
1869
|
qs: queryParameters,
|
|
2054
1870
|
headers: headerParams,
|
|
2055
1871
|
uri: localVarPath,
|
|
2056
|
-
useQuerystring: this._useQuerystring,
|
|
2057
1872
|
json: true,
|
|
2058
1873
|
body: record,
|
|
2059
1874
|
};
|
|
@@ -2066,21 +1881,7 @@ export class RecordsApi {
|
|
|
2066
1881
|
requestOptions.form = formParams;
|
|
2067
1882
|
}
|
|
2068
1883
|
}
|
|
2069
|
-
return
|
|
2070
|
-
request(requestOptions, (error, response, body) => {
|
|
2071
|
-
if (error) {
|
|
2072
|
-
reject(error);
|
|
2073
|
-
}
|
|
2074
|
-
else {
|
|
2075
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2076
|
-
resolve({ response: response, body: body });
|
|
2077
|
-
}
|
|
2078
|
-
else {
|
|
2079
|
-
reject({ response: response, body: body });
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
});
|
|
2083
|
-
});
|
|
1884
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2084
1885
|
}
|
|
2085
1886
|
/**
|
|
2086
1887
|
* Modify a list of records's aspect with same new data
|
|
@@ -2116,15 +1917,18 @@ export class RecordsApi {
|
|
|
2116
1917
|
if (merge !== undefined) {
|
|
2117
1918
|
queryParameters['merge'] = merge;
|
|
2118
1919
|
}
|
|
2119
|
-
|
|
2120
|
-
|
|
1920
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1921
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1922
|
+
}
|
|
1923
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1924
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1925
|
+
}
|
|
2121
1926
|
let useFormData = false;
|
|
2122
|
-
|
|
1927
|
+
const requestOptions = {
|
|
2123
1928
|
method: 'PUT',
|
|
2124
1929
|
qs: queryParameters,
|
|
2125
1930
|
headers: headerParams,
|
|
2126
1931
|
uri: localVarPath,
|
|
2127
|
-
useQuerystring: this._useQuerystring,
|
|
2128
1932
|
json: true,
|
|
2129
1933
|
body: requestData,
|
|
2130
1934
|
};
|
|
@@ -2137,21 +1941,7 @@ export class RecordsApi {
|
|
|
2137
1941
|
requestOptions.form = formParams;
|
|
2138
1942
|
}
|
|
2139
1943
|
}
|
|
2140
|
-
return
|
|
2141
|
-
request(requestOptions, (error, response, body) => {
|
|
2142
|
-
if (error) {
|
|
2143
|
-
reject(error);
|
|
2144
|
-
}
|
|
2145
|
-
else {
|
|
2146
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2147
|
-
resolve({ response: response, body: body });
|
|
2148
|
-
}
|
|
2149
|
-
else {
|
|
2150
|
-
reject({ response: response, body: body });
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
});
|
|
2154
|
-
});
|
|
1944
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2155
1945
|
}
|
|
2156
1946
|
/**
|
|
2157
1947
|
* Trim by source tag
|
|
@@ -2188,15 +1978,18 @@ export class RecordsApi {
|
|
|
2188
1978
|
if (sourceId !== undefined) {
|
|
2189
1979
|
queryParameters['sourceId'] = sourceId;
|
|
2190
1980
|
}
|
|
2191
|
-
|
|
2192
|
-
|
|
1981
|
+
if (isNotEmpty(xMagdaTenantId)) {
|
|
1982
|
+
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
1983
|
+
}
|
|
1984
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
1985
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
1986
|
+
}
|
|
2193
1987
|
let useFormData = false;
|
|
2194
|
-
|
|
1988
|
+
const requestOptions = {
|
|
2195
1989
|
method: 'DELETE',
|
|
2196
1990
|
qs: queryParameters,
|
|
2197
1991
|
headers: headerParams,
|
|
2198
1992
|
uri: localVarPath,
|
|
2199
|
-
useQuerystring: this._useQuerystring,
|
|
2200
1993
|
json: true,
|
|
2201
1994
|
};
|
|
2202
1995
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -2208,21 +2001,7 @@ export class RecordsApi {
|
|
|
2208
2001
|
requestOptions.form = formParams;
|
|
2209
2002
|
}
|
|
2210
2003
|
}
|
|
2211
|
-
return
|
|
2212
|
-
request(requestOptions, (error, response, body) => {
|
|
2213
|
-
if (error) {
|
|
2214
|
-
reject(error);
|
|
2215
|
-
}
|
|
2216
|
-
else {
|
|
2217
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2218
|
-
resolve({ response: response, body: body });
|
|
2219
|
-
}
|
|
2220
|
-
else {
|
|
2221
|
-
reject({ response: response, body: body });
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
});
|
|
2225
|
-
});
|
|
2004
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2226
2005
|
}
|
|
2227
2006
|
}
|
|
2228
2007
|
export var WebHooksApiApiKeys;
|
|
@@ -2231,7 +2010,6 @@ export var WebHooksApiApiKeys;
|
|
|
2231
2010
|
export class WebHooksApi {
|
|
2232
2011
|
basePath = defaultBasePath;
|
|
2233
2012
|
defaultHeaders = {};
|
|
2234
|
-
_useQuerystring = false;
|
|
2235
2013
|
authentications = {
|
|
2236
2014
|
'default': new VoidAuth(),
|
|
2237
2015
|
};
|
|
@@ -2247,9 +2025,6 @@ export class WebHooksApi {
|
|
|
2247
2025
|
}
|
|
2248
2026
|
}
|
|
2249
2027
|
}
|
|
2250
|
-
set useQuerystring(value) {
|
|
2251
|
-
this._useQuerystring = value;
|
|
2252
|
-
}
|
|
2253
2028
|
setApiKey(key, value) {
|
|
2254
2029
|
this.authentications[WebHooksApiApiKeys[key]].apiKey = value;
|
|
2255
2030
|
}
|
|
@@ -2278,14 +2053,15 @@ export class WebHooksApi {
|
|
|
2278
2053
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2279
2054
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling ack.');
|
|
2280
2055
|
}
|
|
2281
|
-
|
|
2056
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2057
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2058
|
+
}
|
|
2282
2059
|
let useFormData = false;
|
|
2283
|
-
|
|
2060
|
+
const requestOptions = {
|
|
2284
2061
|
method: 'POST',
|
|
2285
2062
|
qs: queryParameters,
|
|
2286
2063
|
headers: headerParams,
|
|
2287
2064
|
uri: localVarPath,
|
|
2288
|
-
useQuerystring: this._useQuerystring,
|
|
2289
2065
|
json: true,
|
|
2290
2066
|
body: acknowledgement,
|
|
2291
2067
|
};
|
|
@@ -2298,21 +2074,7 @@ export class WebHooksApi {
|
|
|
2298
2074
|
requestOptions.form = formParams;
|
|
2299
2075
|
}
|
|
2300
2076
|
}
|
|
2301
|
-
return
|
|
2302
|
-
request(requestOptions, (error, response, body) => {
|
|
2303
|
-
if (error) {
|
|
2304
|
-
reject(error);
|
|
2305
|
-
}
|
|
2306
|
-
else {
|
|
2307
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2308
|
-
resolve({ response: response, body: body });
|
|
2309
|
-
}
|
|
2310
|
-
else {
|
|
2311
|
-
reject({ response: response, body: body });
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
});
|
|
2315
|
-
});
|
|
2077
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2316
2078
|
}
|
|
2317
2079
|
/**
|
|
2318
2080
|
* Create a new web hook
|
|
@@ -2333,14 +2095,15 @@ export class WebHooksApi {
|
|
|
2333
2095
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2334
2096
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling create.');
|
|
2335
2097
|
}
|
|
2336
|
-
|
|
2098
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2099
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2100
|
+
}
|
|
2337
2101
|
let useFormData = false;
|
|
2338
|
-
|
|
2102
|
+
const requestOptions = {
|
|
2339
2103
|
method: 'POST',
|
|
2340
2104
|
qs: queryParameters,
|
|
2341
2105
|
headers: headerParams,
|
|
2342
2106
|
uri: localVarPath,
|
|
2343
|
-
useQuerystring: this._useQuerystring,
|
|
2344
2107
|
json: true,
|
|
2345
2108
|
body: hook,
|
|
2346
2109
|
};
|
|
@@ -2353,21 +2116,7 @@ export class WebHooksApi {
|
|
|
2353
2116
|
requestOptions.form = formParams;
|
|
2354
2117
|
}
|
|
2355
2118
|
}
|
|
2356
|
-
return
|
|
2357
|
-
request(requestOptions, (error, response, body) => {
|
|
2358
|
-
if (error) {
|
|
2359
|
-
reject(error);
|
|
2360
|
-
}
|
|
2361
|
-
else {
|
|
2362
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2363
|
-
resolve({ response: response, body: body });
|
|
2364
|
-
}
|
|
2365
|
-
else {
|
|
2366
|
-
reject({ response: response, body: body });
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
});
|
|
2370
|
-
});
|
|
2119
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2371
2120
|
}
|
|
2372
2121
|
/**
|
|
2373
2122
|
* Delete a web hook
|
|
@@ -2389,14 +2138,15 @@ export class WebHooksApi {
|
|
|
2389
2138
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2390
2139
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling deleteById.');
|
|
2391
2140
|
}
|
|
2392
|
-
|
|
2141
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2142
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2143
|
+
}
|
|
2393
2144
|
let useFormData = false;
|
|
2394
|
-
|
|
2145
|
+
const requestOptions = {
|
|
2395
2146
|
method: 'DELETE',
|
|
2396
2147
|
qs: queryParameters,
|
|
2397
2148
|
headers: headerParams,
|
|
2398
2149
|
uri: localVarPath,
|
|
2399
|
-
useQuerystring: this._useQuerystring,
|
|
2400
2150
|
json: true,
|
|
2401
2151
|
};
|
|
2402
2152
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -2408,21 +2158,7 @@ export class WebHooksApi {
|
|
|
2408
2158
|
requestOptions.form = formParams;
|
|
2409
2159
|
}
|
|
2410
2160
|
}
|
|
2411
|
-
return
|
|
2412
|
-
request(requestOptions, (error, response, body) => {
|
|
2413
|
-
if (error) {
|
|
2414
|
-
reject(error);
|
|
2415
|
-
}
|
|
2416
|
-
else {
|
|
2417
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2418
|
-
resolve({ response: response, body: body });
|
|
2419
|
-
}
|
|
2420
|
-
else {
|
|
2421
|
-
reject({ response: response, body: body });
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
});
|
|
2425
|
-
});
|
|
2161
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2426
2162
|
}
|
|
2427
2163
|
/**
|
|
2428
2164
|
* Get a list of all web hooks
|
|
@@ -2438,14 +2174,15 @@ export class WebHooksApi {
|
|
|
2438
2174
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2439
2175
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling getAll.');
|
|
2440
2176
|
}
|
|
2441
|
-
|
|
2177
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2178
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2179
|
+
}
|
|
2442
2180
|
let useFormData = false;
|
|
2443
|
-
|
|
2181
|
+
const requestOptions = {
|
|
2444
2182
|
method: 'GET',
|
|
2445
2183
|
qs: queryParameters,
|
|
2446
2184
|
headers: headerParams,
|
|
2447
2185
|
uri: localVarPath,
|
|
2448
|
-
useQuerystring: this._useQuerystring,
|
|
2449
2186
|
json: true,
|
|
2450
2187
|
};
|
|
2451
2188
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -2457,21 +2194,7 @@ export class WebHooksApi {
|
|
|
2457
2194
|
requestOptions.form = formParams;
|
|
2458
2195
|
}
|
|
2459
2196
|
}
|
|
2460
|
-
return
|
|
2461
|
-
request(requestOptions, (error, response, body) => {
|
|
2462
|
-
if (error) {
|
|
2463
|
-
reject(error);
|
|
2464
|
-
}
|
|
2465
|
-
else {
|
|
2466
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2467
|
-
resolve({ response: response, body: body });
|
|
2468
|
-
}
|
|
2469
|
-
else {
|
|
2470
|
-
reject({ response: response, body: body });
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
});
|
|
2474
|
-
});
|
|
2197
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2475
2198
|
}
|
|
2476
2199
|
/**
|
|
2477
2200
|
* Get a web hook by ID
|
|
@@ -2493,14 +2216,15 @@ export class WebHooksApi {
|
|
|
2493
2216
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2494
2217
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling getById.');
|
|
2495
2218
|
}
|
|
2496
|
-
|
|
2219
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2220
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2221
|
+
}
|
|
2497
2222
|
let useFormData = false;
|
|
2498
|
-
|
|
2223
|
+
const requestOptions = {
|
|
2499
2224
|
method: 'GET',
|
|
2500
2225
|
qs: queryParameters,
|
|
2501
2226
|
headers: headerParams,
|
|
2502
2227
|
uri: localVarPath,
|
|
2503
|
-
useQuerystring: this._useQuerystring,
|
|
2504
2228
|
json: true,
|
|
2505
2229
|
};
|
|
2506
2230
|
this.authentications.default.applyToRequest(requestOptions);
|
|
@@ -2512,21 +2236,7 @@ export class WebHooksApi {
|
|
|
2512
2236
|
requestOptions.form = formParams;
|
|
2513
2237
|
}
|
|
2514
2238
|
}
|
|
2515
|
-
return
|
|
2516
|
-
request(requestOptions, (error, response, body) => {
|
|
2517
|
-
if (error) {
|
|
2518
|
-
reject(error);
|
|
2519
|
-
}
|
|
2520
|
-
else {
|
|
2521
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2522
|
-
resolve({ response: response, body: body });
|
|
2523
|
-
}
|
|
2524
|
-
else {
|
|
2525
|
-
reject({ response: response, body: body });
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
});
|
|
2529
|
-
});
|
|
2239
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2530
2240
|
}
|
|
2531
2241
|
/**
|
|
2532
2242
|
* Modify a web hook by ID
|
|
@@ -2553,14 +2263,15 @@ export class WebHooksApi {
|
|
|
2553
2263
|
if (xMagdaSession === null || xMagdaSession === undefined) {
|
|
2554
2264
|
throw new Error('Required parameter xMagdaSession was null or undefined when calling putById.');
|
|
2555
2265
|
}
|
|
2556
|
-
|
|
2266
|
+
if (isNotEmpty(xMagdaSession)) {
|
|
2267
|
+
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
2268
|
+
}
|
|
2557
2269
|
let useFormData = false;
|
|
2558
|
-
|
|
2270
|
+
const requestOptions = {
|
|
2559
2271
|
method: 'PUT',
|
|
2560
2272
|
qs: queryParameters,
|
|
2561
2273
|
headers: headerParams,
|
|
2562
2274
|
uri: localVarPath,
|
|
2563
|
-
useQuerystring: this._useQuerystring,
|
|
2564
2275
|
json: true,
|
|
2565
2276
|
body: hook,
|
|
2566
2277
|
};
|
|
@@ -2573,21 +2284,7 @@ export class WebHooksApi {
|
|
|
2573
2284
|
requestOptions.form = formParams;
|
|
2574
2285
|
}
|
|
2575
2286
|
}
|
|
2576
|
-
return
|
|
2577
|
-
request(requestOptions, (error, response, body) => {
|
|
2578
|
-
if (error) {
|
|
2579
|
-
reject(error);
|
|
2580
|
-
}
|
|
2581
|
-
else {
|
|
2582
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2583
|
-
resolve({ response: response, body: body });
|
|
2584
|
-
}
|
|
2585
|
-
else {
|
|
2586
|
-
reject({ response: response, body: body });
|
|
2587
|
-
}
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
});
|
|
2287
|
+
return fetchWithRequestOptions(requestOptions);
|
|
2591
2288
|
}
|
|
2592
2289
|
}
|
|
2593
2290
|
//# sourceMappingURL=api.js.map
|