spitfirepm 23.9700.2 → 23.9700.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/SwaggerClients.d.ts +291 -0
- package/dist/SwaggerClients.js +735 -0
- package/dist/SwaggerClients.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/SwaggerClients.js
CHANGED
|
@@ -11343,6 +11343,741 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
11343
11343
|
}
|
|
11344
11344
|
return null;
|
|
11345
11345
|
}
|
|
11346
|
+
/**
|
|
11347
|
+
* Returns the Lookup Results (DVs)
|
|
11348
|
+
*/
|
|
11349
|
+
getLookupResults() {
|
|
11350
|
+
return new Promise((resolve, reject) => {
|
|
11351
|
+
this.getLookupResultsWithCallbacks((result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11352
|
+
});
|
|
11353
|
+
}
|
|
11354
|
+
getLookupResultsWithCallbacks(onSuccess, onFail) {
|
|
11355
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results";
|
|
11356
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11357
|
+
jQuery.ajax({
|
|
11358
|
+
url: url_,
|
|
11359
|
+
beforeSend: this.beforeSend,
|
|
11360
|
+
type: "get",
|
|
11361
|
+
dataType: "text",
|
|
11362
|
+
headers: {
|
|
11363
|
+
"Accept": "application/json"
|
|
11364
|
+
}
|
|
11365
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11366
|
+
this.processGetLookupResultsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11367
|
+
}).fail((xhr) => {
|
|
11368
|
+
this.processGetLookupResultsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11369
|
+
});
|
|
11370
|
+
}
|
|
11371
|
+
processGetLookupResultsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11372
|
+
try {
|
|
11373
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetLookupResults(xhr));
|
|
11374
|
+
if (onSuccess !== undefined)
|
|
11375
|
+
onSuccess(result);
|
|
11376
|
+
}
|
|
11377
|
+
catch (e) {
|
|
11378
|
+
if (onFail !== undefined)
|
|
11379
|
+
onFail(e, "http_service_exception");
|
|
11380
|
+
}
|
|
11381
|
+
}
|
|
11382
|
+
processGetLookupResults(xhr) {
|
|
11383
|
+
const status = xhr.status;
|
|
11384
|
+
let _headers = {};
|
|
11385
|
+
if (status === 200) {
|
|
11386
|
+
const _responseText = xhr.responseText;
|
|
11387
|
+
let result200 = null;
|
|
11388
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11389
|
+
return result200;
|
|
11390
|
+
}
|
|
11391
|
+
else if (status === 401) {
|
|
11392
|
+
const _responseText = xhr.responseText;
|
|
11393
|
+
let result401 = null;
|
|
11394
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11395
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11396
|
+
}
|
|
11397
|
+
else if (status === 403) {
|
|
11398
|
+
const _responseText = xhr.responseText;
|
|
11399
|
+
let result403 = null;
|
|
11400
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11401
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11402
|
+
}
|
|
11403
|
+
else if (status === 500) {
|
|
11404
|
+
const _responseText = xhr.responseText;
|
|
11405
|
+
let result500 = null;
|
|
11406
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11407
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11408
|
+
}
|
|
11409
|
+
else if (status !== 200 && status !== 204) {
|
|
11410
|
+
const _responseText = xhr.responseText;
|
|
11411
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11412
|
+
}
|
|
11413
|
+
return null;
|
|
11414
|
+
}
|
|
11415
|
+
/**
|
|
11416
|
+
* Updates one Lookup Result
|
|
11417
|
+
* @param data Lookup Result row to update
|
|
11418
|
+
*/
|
|
11419
|
+
patchLookupResult(data) {
|
|
11420
|
+
return new Promise((resolve, reject) => {
|
|
11421
|
+
this.patchLookupResultWithCallbacks(data, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11422
|
+
});
|
|
11423
|
+
}
|
|
11424
|
+
patchLookupResultWithCallbacks(data, onSuccess, onFail) {
|
|
11425
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results";
|
|
11426
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11427
|
+
const content_ = JSON.stringify(data);
|
|
11428
|
+
jQuery.ajax({
|
|
11429
|
+
url: url_,
|
|
11430
|
+
beforeSend: this.beforeSend,
|
|
11431
|
+
type: "patch",
|
|
11432
|
+
data: content_,
|
|
11433
|
+
dataType: "text",
|
|
11434
|
+
headers: {
|
|
11435
|
+
"Content-Type": "application/json",
|
|
11436
|
+
"Accept": "application/json"
|
|
11437
|
+
}
|
|
11438
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11439
|
+
this.processPatchLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11440
|
+
}).fail((xhr) => {
|
|
11441
|
+
this.processPatchLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11442
|
+
});
|
|
11443
|
+
}
|
|
11444
|
+
processPatchLookupResultWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11445
|
+
try {
|
|
11446
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processPatchLookupResult(xhr));
|
|
11447
|
+
if (onSuccess !== undefined)
|
|
11448
|
+
onSuccess(result);
|
|
11449
|
+
}
|
|
11450
|
+
catch (e) {
|
|
11451
|
+
if (onFail !== undefined)
|
|
11452
|
+
onFail(e, "http_service_exception");
|
|
11453
|
+
}
|
|
11454
|
+
}
|
|
11455
|
+
processPatchLookupResult(xhr) {
|
|
11456
|
+
const status = xhr.status;
|
|
11457
|
+
let _headers = {};
|
|
11458
|
+
if (status === 200) {
|
|
11459
|
+
const _responseText = xhr.responseText;
|
|
11460
|
+
let result200 = null;
|
|
11461
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11462
|
+
return result200;
|
|
11463
|
+
}
|
|
11464
|
+
else if (status === 400) {
|
|
11465
|
+
const _responseText = xhr.responseText;
|
|
11466
|
+
let result400 = null;
|
|
11467
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11468
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
11469
|
+
}
|
|
11470
|
+
else if (status === 401) {
|
|
11471
|
+
const _responseText = xhr.responseText;
|
|
11472
|
+
let result401 = null;
|
|
11473
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11474
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11475
|
+
}
|
|
11476
|
+
else if (status === 403) {
|
|
11477
|
+
const _responseText = xhr.responseText;
|
|
11478
|
+
let result403 = null;
|
|
11479
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11480
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11481
|
+
}
|
|
11482
|
+
else if (status === 404) {
|
|
11483
|
+
const _responseText = xhr.responseText;
|
|
11484
|
+
let result404 = null;
|
|
11485
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11486
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11487
|
+
}
|
|
11488
|
+
else if (status === 409) {
|
|
11489
|
+
const _responseText = xhr.responseText;
|
|
11490
|
+
let result409 = null;
|
|
11491
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11492
|
+
return throwException("Could not persist the patch", status, _responseText, _headers, result409);
|
|
11493
|
+
}
|
|
11494
|
+
else if (status === 500) {
|
|
11495
|
+
const _responseText = xhr.responseText;
|
|
11496
|
+
let result500 = null;
|
|
11497
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11498
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11499
|
+
}
|
|
11500
|
+
else if (status !== 200 && status !== 204) {
|
|
11501
|
+
const _responseText = xhr.responseText;
|
|
11502
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11503
|
+
}
|
|
11504
|
+
return null;
|
|
11505
|
+
}
|
|
11506
|
+
/**
|
|
11507
|
+
* Returns the parameter slots of one Lookup Result
|
|
11508
|
+
* @param lookupResultKey Lookup Result key
|
|
11509
|
+
*/
|
|
11510
|
+
getLookupResultParameters(lookupResultKey) {
|
|
11511
|
+
return new Promise((resolve, reject) => {
|
|
11512
|
+
this.getLookupResultParametersWithCallbacks(lookupResultKey, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11513
|
+
});
|
|
11514
|
+
}
|
|
11515
|
+
getLookupResultParametersWithCallbacks(lookupResultKey, onSuccess, onFail) {
|
|
11516
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results/{lookupResultKey}/parameters";
|
|
11517
|
+
if (lookupResultKey === undefined || lookupResultKey === null)
|
|
11518
|
+
throw new globalThis.Error("The parameter 'lookupResultKey' must be defined.");
|
|
11519
|
+
url_ = url_.replace("{lookupResultKey}", encodeURIComponent("" + lookupResultKey));
|
|
11520
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11521
|
+
jQuery.ajax({
|
|
11522
|
+
url: url_,
|
|
11523
|
+
beforeSend: this.beforeSend,
|
|
11524
|
+
type: "get",
|
|
11525
|
+
dataType: "text",
|
|
11526
|
+
headers: {
|
|
11527
|
+
"Accept": "application/json"
|
|
11528
|
+
}
|
|
11529
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11530
|
+
this.processGetLookupResultParametersWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11531
|
+
}).fail((xhr) => {
|
|
11532
|
+
this.processGetLookupResultParametersWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11533
|
+
});
|
|
11534
|
+
}
|
|
11535
|
+
processGetLookupResultParametersWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11536
|
+
try {
|
|
11537
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetLookupResultParameters(xhr));
|
|
11538
|
+
if (onSuccess !== undefined)
|
|
11539
|
+
onSuccess(result);
|
|
11540
|
+
}
|
|
11541
|
+
catch (e) {
|
|
11542
|
+
if (onFail !== undefined)
|
|
11543
|
+
onFail(e, "http_service_exception");
|
|
11544
|
+
}
|
|
11545
|
+
}
|
|
11546
|
+
processGetLookupResultParameters(xhr) {
|
|
11547
|
+
const status = xhr.status;
|
|
11548
|
+
let _headers = {};
|
|
11549
|
+
if (status === 200) {
|
|
11550
|
+
const _responseText = xhr.responseText;
|
|
11551
|
+
let result200 = null;
|
|
11552
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11553
|
+
return result200;
|
|
11554
|
+
}
|
|
11555
|
+
else if (status === 401) {
|
|
11556
|
+
const _responseText = xhr.responseText;
|
|
11557
|
+
let result401 = null;
|
|
11558
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11559
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11560
|
+
}
|
|
11561
|
+
else if (status === 403) {
|
|
11562
|
+
const _responseText = xhr.responseText;
|
|
11563
|
+
let result403 = null;
|
|
11564
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11565
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11566
|
+
}
|
|
11567
|
+
else if (status === 404) {
|
|
11568
|
+
const _responseText = xhr.responseText;
|
|
11569
|
+
let result404 = null;
|
|
11570
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11571
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11572
|
+
}
|
|
11573
|
+
else if (status === 500) {
|
|
11574
|
+
const _responseText = xhr.responseText;
|
|
11575
|
+
let result500 = null;
|
|
11576
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11577
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11578
|
+
}
|
|
11579
|
+
else if (status !== 200 && status !== 204) {
|
|
11580
|
+
const _responseText = xhr.responseText;
|
|
11581
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11582
|
+
}
|
|
11583
|
+
return null;
|
|
11584
|
+
}
|
|
11585
|
+
/**
|
|
11586
|
+
* Replaces the parameter slots of one Lookup Result
|
|
11587
|
+
* @param lookupResultKey Lookup Result key
|
|
11588
|
+
* @param data Parameter slots, in call order
|
|
11589
|
+
*/
|
|
11590
|
+
putLookupResultParameters(lookupResultKey, data) {
|
|
11591
|
+
return new Promise((resolve, reject) => {
|
|
11592
|
+
this.putLookupResultParametersWithCallbacks(lookupResultKey, data, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11593
|
+
});
|
|
11594
|
+
}
|
|
11595
|
+
putLookupResultParametersWithCallbacks(lookupResultKey, data, onSuccess, onFail) {
|
|
11596
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results/{lookupResultKey}/parameters";
|
|
11597
|
+
if (lookupResultKey === undefined || lookupResultKey === null)
|
|
11598
|
+
throw new globalThis.Error("The parameter 'lookupResultKey' must be defined.");
|
|
11599
|
+
url_ = url_.replace("{lookupResultKey}", encodeURIComponent("" + lookupResultKey));
|
|
11600
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11601
|
+
const content_ = JSON.stringify(data);
|
|
11602
|
+
jQuery.ajax({
|
|
11603
|
+
url: url_,
|
|
11604
|
+
beforeSend: this.beforeSend,
|
|
11605
|
+
type: "post",
|
|
11606
|
+
data: content_,
|
|
11607
|
+
dataType: "text",
|
|
11608
|
+
headers: {
|
|
11609
|
+
"Content-Type": "application/json",
|
|
11610
|
+
"Accept": "application/json"
|
|
11611
|
+
}
|
|
11612
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11613
|
+
this.processPutLookupResultParametersWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11614
|
+
}).fail((xhr) => {
|
|
11615
|
+
this.processPutLookupResultParametersWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11616
|
+
});
|
|
11617
|
+
}
|
|
11618
|
+
processPutLookupResultParametersWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11619
|
+
try {
|
|
11620
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processPutLookupResultParameters(xhr));
|
|
11621
|
+
if (onSuccess !== undefined)
|
|
11622
|
+
onSuccess(result);
|
|
11623
|
+
}
|
|
11624
|
+
catch (e) {
|
|
11625
|
+
if (onFail !== undefined)
|
|
11626
|
+
onFail(e, "http_service_exception");
|
|
11627
|
+
}
|
|
11628
|
+
}
|
|
11629
|
+
processPutLookupResultParameters(xhr) {
|
|
11630
|
+
const status = xhr.status;
|
|
11631
|
+
let _headers = {};
|
|
11632
|
+
if (status === 200) {
|
|
11633
|
+
const _responseText = xhr.responseText;
|
|
11634
|
+
let result200 = null;
|
|
11635
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11636
|
+
return result200;
|
|
11637
|
+
}
|
|
11638
|
+
else if (status === 400) {
|
|
11639
|
+
const _responseText = xhr.responseText;
|
|
11640
|
+
let result400 = null;
|
|
11641
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11642
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
11643
|
+
}
|
|
11644
|
+
else if (status === 401) {
|
|
11645
|
+
const _responseText = xhr.responseText;
|
|
11646
|
+
let result401 = null;
|
|
11647
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11648
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11649
|
+
}
|
|
11650
|
+
else if (status === 403) {
|
|
11651
|
+
const _responseText = xhr.responseText;
|
|
11652
|
+
let result403 = null;
|
|
11653
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11654
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11655
|
+
}
|
|
11656
|
+
else if (status === 409) {
|
|
11657
|
+
const _responseText = xhr.responseText;
|
|
11658
|
+
let result409 = null;
|
|
11659
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11660
|
+
return throwException("Could not persist the change", status, _responseText, _headers, result409);
|
|
11661
|
+
}
|
|
11662
|
+
else if (status === 500) {
|
|
11663
|
+
const _responseText = xhr.responseText;
|
|
11664
|
+
let result500 = null;
|
|
11665
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11666
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11667
|
+
}
|
|
11668
|
+
else if (status !== 200 && status !== 204) {
|
|
11669
|
+
const _responseText = xhr.responseText;
|
|
11670
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11671
|
+
}
|
|
11672
|
+
return null;
|
|
11673
|
+
}
|
|
11674
|
+
/**
|
|
11675
|
+
* Resolves a Lookup Result against supplied values, returning the answer AND the SQL
|
|
11676
|
+
* @param valueFor Value to describe, plus its depends-on values
|
|
11677
|
+
*/
|
|
11678
|
+
testLookupResult(valueFor) {
|
|
11679
|
+
return new Promise((resolve, reject) => {
|
|
11680
|
+
this.testLookupResultWithCallbacks(valueFor, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11681
|
+
});
|
|
11682
|
+
}
|
|
11683
|
+
testLookupResultWithCallbacks(valueFor, onSuccess, onFail) {
|
|
11684
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results/test";
|
|
11685
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11686
|
+
const content_ = JSON.stringify(valueFor);
|
|
11687
|
+
jQuery.ajax({
|
|
11688
|
+
url: url_,
|
|
11689
|
+
beforeSend: this.beforeSend,
|
|
11690
|
+
type: "post",
|
|
11691
|
+
data: content_,
|
|
11692
|
+
dataType: "text",
|
|
11693
|
+
headers: {
|
|
11694
|
+
"Content-Type": "application/json",
|
|
11695
|
+
"Accept": "application/json"
|
|
11696
|
+
}
|
|
11697
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11698
|
+
this.processTestLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11699
|
+
}).fail((xhr) => {
|
|
11700
|
+
this.processTestLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11701
|
+
});
|
|
11702
|
+
}
|
|
11703
|
+
processTestLookupResultWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11704
|
+
try {
|
|
11705
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processTestLookupResult(xhr));
|
|
11706
|
+
if (onSuccess !== undefined)
|
|
11707
|
+
onSuccess(result);
|
|
11708
|
+
}
|
|
11709
|
+
catch (e) {
|
|
11710
|
+
if (onFail !== undefined)
|
|
11711
|
+
onFail(e, "http_service_exception");
|
|
11712
|
+
}
|
|
11713
|
+
}
|
|
11714
|
+
processTestLookupResult(xhr) {
|
|
11715
|
+
const status = xhr.status;
|
|
11716
|
+
let _headers = {};
|
|
11717
|
+
if (status === 200) {
|
|
11718
|
+
const _responseText = xhr.responseText;
|
|
11719
|
+
let result200 = null;
|
|
11720
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11721
|
+
return result200;
|
|
11722
|
+
}
|
|
11723
|
+
else if (status === 400) {
|
|
11724
|
+
const _responseText = xhr.responseText;
|
|
11725
|
+
let result400 = null;
|
|
11726
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11727
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
11728
|
+
}
|
|
11729
|
+
else if (status === 401) {
|
|
11730
|
+
const _responseText = xhr.responseText;
|
|
11731
|
+
let result401 = null;
|
|
11732
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11733
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11734
|
+
}
|
|
11735
|
+
else if (status === 403) {
|
|
11736
|
+
const _responseText = xhr.responseText;
|
|
11737
|
+
let result403 = null;
|
|
11738
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11739
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11740
|
+
}
|
|
11741
|
+
else if (status === 500) {
|
|
11742
|
+
const _responseText = xhr.responseText;
|
|
11743
|
+
let result500 = null;
|
|
11744
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11745
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11746
|
+
}
|
|
11747
|
+
else if (status !== 200 && status !== 204) {
|
|
11748
|
+
const _responseText = xhr.responseText;
|
|
11749
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11750
|
+
}
|
|
11751
|
+
return null;
|
|
11752
|
+
}
|
|
11753
|
+
/**
|
|
11754
|
+
* Returns the Lookups (pickers)
|
|
11755
|
+
*/
|
|
11756
|
+
getLookups() {
|
|
11757
|
+
return new Promise((resolve, reject) => {
|
|
11758
|
+
this.getLookupsWithCallbacks((result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11759
|
+
});
|
|
11760
|
+
}
|
|
11761
|
+
getLookupsWithCallbacks(onSuccess, onFail) {
|
|
11762
|
+
let url_ = this.baseUrl + "/api/configuration/lookups";
|
|
11763
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11764
|
+
jQuery.ajax({
|
|
11765
|
+
url: url_,
|
|
11766
|
+
beforeSend: this.beforeSend,
|
|
11767
|
+
type: "get",
|
|
11768
|
+
dataType: "text",
|
|
11769
|
+
headers: {
|
|
11770
|
+
"Accept": "application/json"
|
|
11771
|
+
}
|
|
11772
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11773
|
+
this.processGetLookupsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11774
|
+
}).fail((xhr) => {
|
|
11775
|
+
this.processGetLookupsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11776
|
+
});
|
|
11777
|
+
}
|
|
11778
|
+
processGetLookupsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11779
|
+
try {
|
|
11780
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetLookups(xhr));
|
|
11781
|
+
if (onSuccess !== undefined)
|
|
11782
|
+
onSuccess(result);
|
|
11783
|
+
}
|
|
11784
|
+
catch (e) {
|
|
11785
|
+
if (onFail !== undefined)
|
|
11786
|
+
onFail(e, "http_service_exception");
|
|
11787
|
+
}
|
|
11788
|
+
}
|
|
11789
|
+
processGetLookups(xhr) {
|
|
11790
|
+
const status = xhr.status;
|
|
11791
|
+
let _headers = {};
|
|
11792
|
+
if (status === 200) {
|
|
11793
|
+
const _responseText = xhr.responseText;
|
|
11794
|
+
let result200 = null;
|
|
11795
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11796
|
+
return result200;
|
|
11797
|
+
}
|
|
11798
|
+
else if (status === 401) {
|
|
11799
|
+
const _responseText = xhr.responseText;
|
|
11800
|
+
let result401 = null;
|
|
11801
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11802
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11803
|
+
}
|
|
11804
|
+
else if (status === 403) {
|
|
11805
|
+
const _responseText = xhr.responseText;
|
|
11806
|
+
let result403 = null;
|
|
11807
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11808
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11809
|
+
}
|
|
11810
|
+
else if (status === 500) {
|
|
11811
|
+
const _responseText = xhr.responseText;
|
|
11812
|
+
let result500 = null;
|
|
11813
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11814
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11815
|
+
}
|
|
11816
|
+
else if (status !== 200 && status !== 204) {
|
|
11817
|
+
const _responseText = xhr.responseText;
|
|
11818
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11819
|
+
}
|
|
11820
|
+
return null;
|
|
11821
|
+
}
|
|
11822
|
+
/**
|
|
11823
|
+
* Updates one Lookup
|
|
11824
|
+
* @param data Lookup row to update
|
|
11825
|
+
*/
|
|
11826
|
+
patchLookup(data) {
|
|
11827
|
+
return new Promise((resolve, reject) => {
|
|
11828
|
+
this.patchLookupWithCallbacks(data, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11829
|
+
});
|
|
11830
|
+
}
|
|
11831
|
+
patchLookupWithCallbacks(data, onSuccess, onFail) {
|
|
11832
|
+
let url_ = this.baseUrl + "/api/configuration/lookups";
|
|
11833
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11834
|
+
const content_ = JSON.stringify(data);
|
|
11835
|
+
jQuery.ajax({
|
|
11836
|
+
url: url_,
|
|
11837
|
+
beforeSend: this.beforeSend,
|
|
11838
|
+
type: "patch",
|
|
11839
|
+
data: content_,
|
|
11840
|
+
dataType: "text",
|
|
11841
|
+
headers: {
|
|
11842
|
+
"Content-Type": "application/json",
|
|
11843
|
+
"Accept": "application/json"
|
|
11844
|
+
}
|
|
11845
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11846
|
+
this.processPatchLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11847
|
+
}).fail((xhr) => {
|
|
11848
|
+
this.processPatchLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11849
|
+
});
|
|
11850
|
+
}
|
|
11851
|
+
processPatchLookupWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11852
|
+
try {
|
|
11853
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processPatchLookup(xhr));
|
|
11854
|
+
if (onSuccess !== undefined)
|
|
11855
|
+
onSuccess(result);
|
|
11856
|
+
}
|
|
11857
|
+
catch (e) {
|
|
11858
|
+
if (onFail !== undefined)
|
|
11859
|
+
onFail(e, "http_service_exception");
|
|
11860
|
+
}
|
|
11861
|
+
}
|
|
11862
|
+
processPatchLookup(xhr) {
|
|
11863
|
+
const status = xhr.status;
|
|
11864
|
+
let _headers = {};
|
|
11865
|
+
if (status === 200) {
|
|
11866
|
+
const _responseText = xhr.responseText;
|
|
11867
|
+
let result200 = null;
|
|
11868
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11869
|
+
return result200;
|
|
11870
|
+
}
|
|
11871
|
+
else if (status === 400) {
|
|
11872
|
+
const _responseText = xhr.responseText;
|
|
11873
|
+
let result400 = null;
|
|
11874
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11875
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
11876
|
+
}
|
|
11877
|
+
else if (status === 401) {
|
|
11878
|
+
const _responseText = xhr.responseText;
|
|
11879
|
+
let result401 = null;
|
|
11880
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11881
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11882
|
+
}
|
|
11883
|
+
else if (status === 403) {
|
|
11884
|
+
const _responseText = xhr.responseText;
|
|
11885
|
+
let result403 = null;
|
|
11886
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11887
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11888
|
+
}
|
|
11889
|
+
else if (status === 404) {
|
|
11890
|
+
const _responseText = xhr.responseText;
|
|
11891
|
+
let result404 = null;
|
|
11892
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11893
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11894
|
+
}
|
|
11895
|
+
else if (status === 409) {
|
|
11896
|
+
const _responseText = xhr.responseText;
|
|
11897
|
+
let result409 = null;
|
|
11898
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11899
|
+
return throwException("Could not persist the patch", status, _responseText, _headers, result409);
|
|
11900
|
+
}
|
|
11901
|
+
else if (status === 500) {
|
|
11902
|
+
const _responseText = xhr.responseText;
|
|
11903
|
+
let result500 = null;
|
|
11904
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11905
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11906
|
+
}
|
|
11907
|
+
else if (status !== 200 && status !== 204) {
|
|
11908
|
+
const _responseText = xhr.responseText;
|
|
11909
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11910
|
+
}
|
|
11911
|
+
return null;
|
|
11912
|
+
}
|
|
11913
|
+
/**
|
|
11914
|
+
* Returns the fields of one Lookup
|
|
11915
|
+
* @param lookupKey Lookup key
|
|
11916
|
+
*/
|
|
11917
|
+
getLookupFields(lookupKey) {
|
|
11918
|
+
return new Promise((resolve, reject) => {
|
|
11919
|
+
this.getLookupFieldsWithCallbacks(lookupKey, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11920
|
+
});
|
|
11921
|
+
}
|
|
11922
|
+
getLookupFieldsWithCallbacks(lookupKey, onSuccess, onFail) {
|
|
11923
|
+
let url_ = this.baseUrl + "/api/configuration/lookups/{lookupKey}/fields";
|
|
11924
|
+
if (lookupKey === undefined || lookupKey === null)
|
|
11925
|
+
throw new globalThis.Error("The parameter 'lookupKey' must be defined.");
|
|
11926
|
+
url_ = url_.replace("{lookupKey}", encodeURIComponent("" + lookupKey));
|
|
11927
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11928
|
+
jQuery.ajax({
|
|
11929
|
+
url: url_,
|
|
11930
|
+
beforeSend: this.beforeSend,
|
|
11931
|
+
type: "get",
|
|
11932
|
+
dataType: "text",
|
|
11933
|
+
headers: {
|
|
11934
|
+
"Accept": "application/json"
|
|
11935
|
+
}
|
|
11936
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11937
|
+
this.processGetLookupFieldsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11938
|
+
}).fail((xhr) => {
|
|
11939
|
+
this.processGetLookupFieldsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11940
|
+
});
|
|
11941
|
+
}
|
|
11942
|
+
processGetLookupFieldsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11943
|
+
try {
|
|
11944
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetLookupFields(xhr));
|
|
11945
|
+
if (onSuccess !== undefined)
|
|
11946
|
+
onSuccess(result);
|
|
11947
|
+
}
|
|
11948
|
+
catch (e) {
|
|
11949
|
+
if (onFail !== undefined)
|
|
11950
|
+
onFail(e, "http_service_exception");
|
|
11951
|
+
}
|
|
11952
|
+
}
|
|
11953
|
+
processGetLookupFields(xhr) {
|
|
11954
|
+
const status = xhr.status;
|
|
11955
|
+
let _headers = {};
|
|
11956
|
+
if (status === 200) {
|
|
11957
|
+
const _responseText = xhr.responseText;
|
|
11958
|
+
let result200 = null;
|
|
11959
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11960
|
+
return result200;
|
|
11961
|
+
}
|
|
11962
|
+
else if (status === 401) {
|
|
11963
|
+
const _responseText = xhr.responseText;
|
|
11964
|
+
let result401 = null;
|
|
11965
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11966
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11967
|
+
}
|
|
11968
|
+
else if (status === 403) {
|
|
11969
|
+
const _responseText = xhr.responseText;
|
|
11970
|
+
let result403 = null;
|
|
11971
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11972
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11973
|
+
}
|
|
11974
|
+
else if (status === 404) {
|
|
11975
|
+
const _responseText = xhr.responseText;
|
|
11976
|
+
let result404 = null;
|
|
11977
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11978
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11979
|
+
}
|
|
11980
|
+
else if (status === 500) {
|
|
11981
|
+
const _responseText = xhr.responseText;
|
|
11982
|
+
let result500 = null;
|
|
11983
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11984
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11985
|
+
}
|
|
11986
|
+
else if (status !== 200 && status !== 204) {
|
|
11987
|
+
const _responseText = xhr.responseText;
|
|
11988
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11989
|
+
}
|
|
11990
|
+
return null;
|
|
11991
|
+
}
|
|
11992
|
+
/**
|
|
11993
|
+
* Replaces the fields of one Lookup
|
|
11994
|
+
* @param lookupKey Lookup key
|
|
11995
|
+
* @param data Field rows, in FieldSequence order
|
|
11996
|
+
*/
|
|
11997
|
+
putLookupFields(lookupKey, data) {
|
|
11998
|
+
return new Promise((resolve, reject) => {
|
|
11999
|
+
this.putLookupFieldsWithCallbacks(lookupKey, data, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
12000
|
+
});
|
|
12001
|
+
}
|
|
12002
|
+
putLookupFieldsWithCallbacks(lookupKey, data, onSuccess, onFail) {
|
|
12003
|
+
let url_ = this.baseUrl + "/api/configuration/lookups/{lookupKey}/fields";
|
|
12004
|
+
if (lookupKey === undefined || lookupKey === null)
|
|
12005
|
+
throw new globalThis.Error("The parameter 'lookupKey' must be defined.");
|
|
12006
|
+
url_ = url_.replace("{lookupKey}", encodeURIComponent("" + lookupKey));
|
|
12007
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12008
|
+
const content_ = JSON.stringify(data);
|
|
12009
|
+
jQuery.ajax({
|
|
12010
|
+
url: url_,
|
|
12011
|
+
beforeSend: this.beforeSend,
|
|
12012
|
+
type: "post",
|
|
12013
|
+
data: content_,
|
|
12014
|
+
dataType: "text",
|
|
12015
|
+
headers: {
|
|
12016
|
+
"Content-Type": "application/json",
|
|
12017
|
+
"Accept": "application/json"
|
|
12018
|
+
}
|
|
12019
|
+
}).done((_data, _textStatus, xhr) => {
|
|
12020
|
+
this.processPutLookupFieldsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12021
|
+
}).fail((xhr) => {
|
|
12022
|
+
this.processPutLookupFieldsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12023
|
+
});
|
|
12024
|
+
}
|
|
12025
|
+
processPutLookupFieldsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
12026
|
+
try {
|
|
12027
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processPutLookupFields(xhr));
|
|
12028
|
+
if (onSuccess !== undefined)
|
|
12029
|
+
onSuccess(result);
|
|
12030
|
+
}
|
|
12031
|
+
catch (e) {
|
|
12032
|
+
if (onFail !== undefined)
|
|
12033
|
+
onFail(e, "http_service_exception");
|
|
12034
|
+
}
|
|
12035
|
+
}
|
|
12036
|
+
processPutLookupFields(xhr) {
|
|
12037
|
+
const status = xhr.status;
|
|
12038
|
+
let _headers = {};
|
|
12039
|
+
if (status === 200) {
|
|
12040
|
+
const _responseText = xhr.responseText;
|
|
12041
|
+
let result200 = null;
|
|
12042
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12043
|
+
return result200;
|
|
12044
|
+
}
|
|
12045
|
+
else if (status === 400) {
|
|
12046
|
+
const _responseText = xhr.responseText;
|
|
12047
|
+
let result400 = null;
|
|
12048
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12049
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
12050
|
+
}
|
|
12051
|
+
else if (status === 401) {
|
|
12052
|
+
const _responseText = xhr.responseText;
|
|
12053
|
+
let result401 = null;
|
|
12054
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12055
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
12056
|
+
}
|
|
12057
|
+
else if (status === 403) {
|
|
12058
|
+
const _responseText = xhr.responseText;
|
|
12059
|
+
let result403 = null;
|
|
12060
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12061
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
12062
|
+
}
|
|
12063
|
+
else if (status === 409) {
|
|
12064
|
+
const _responseText = xhr.responseText;
|
|
12065
|
+
let result409 = null;
|
|
12066
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12067
|
+
return throwException("Could not persist the change", status, _responseText, _headers, result409);
|
|
12068
|
+
}
|
|
12069
|
+
else if (status === 500) {
|
|
12070
|
+
const _responseText = xhr.responseText;
|
|
12071
|
+
let result500 = null;
|
|
12072
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12073
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
12074
|
+
}
|
|
12075
|
+
else if (status !== 200 && status !== 204) {
|
|
12076
|
+
const _responseText = xhr.responseText;
|
|
12077
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12078
|
+
}
|
|
12079
|
+
return null;
|
|
12080
|
+
}
|
|
11346
12081
|
/**
|
|
11347
12082
|
* Returns the Manage dashboard tool menu
|
|
11348
12083
|
*/
|