@nsshunt/stsfhirclient 1.0.66 → 1.0.67
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/stsfhirclient.mjs +73 -98
- package/dist/stsfhirclient.mjs.map +1 -1
- package/dist/stsfhirclient.umd.js +73 -98
- package/dist/stsfhirclient.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/FhirClient.d.ts +9 -9
- package/types/FhirClient.d.ts.map +1 -1
- package/types/srv_dev/stsfhircontrollertestcasesclient.d.ts.map +1 -1
|
@@ -12,7 +12,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
12
12
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
13
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
14
14
|
|
|
15
|
-
var _socketUtils, _id, _options2, _clientName, _debug, _error, _info, _SetupWSSClient, _OnSocketConnected, _options3, _DUMMY_USER, _invokeMethods, _maxRetries, _sleepDuration, _NoRetryStatusCodes, _stsfhirapiroot, _fhirSocketClient, _LogDebugMessage, _LogErrorMessage, _HandleError,
|
|
15
|
+
var _socketUtils, _id, _options2, _clientName, _debug, _error, _info, _SetupWSSClient, _OnSocketConnected, _options3, _DUMMY_USER, _invokeMethods, _maxRetries, _sleepDuration, _NoRetryStatusCodes, _stsfhirapiroot, _fhirSocketClient, _LogDebugMessage, _LogErrorMessage, _HandleError, _InvokeResourceAPI, _TestMode, ___InvokeResourceAPI, _BuildQueryString;
|
|
16
16
|
const byteToHex = [];
|
|
17
17
|
for (let i = 0; i < 256; ++i) {
|
|
18
18
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -5382,33 +5382,10 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5382
5382
|
} else {
|
|
5383
5383
|
__privateGet(this, _LogDebugMessage).call(this, chalk.red(`AXIOS Error = [${axiosError}]`));
|
|
5384
5384
|
}
|
|
5385
|
-
return responseCode;
|
|
5386
|
-
} else if (error.responseCode) {
|
|
5387
|
-
return error.responseCode;
|
|
5388
|
-
} else {
|
|
5389
|
-
return responseCode;
|
|
5390
5385
|
}
|
|
5386
|
+
return responseCode;
|
|
5391
5387
|
});
|
|
5392
|
-
__privateAdd(this,
|
|
5393
|
-
try {
|
|
5394
|
-
const { url: url2, httpVerb, domainResource, filters } = metaData;
|
|
5395
|
-
if (__privateGet(this, _options3).testingMode) {
|
|
5396
|
-
await __privateGet(this, _TestMode).call(this, metaData);
|
|
5397
|
-
}
|
|
5398
|
-
const accessToken = await __privateGet(this, _options3).GetAccessToken();
|
|
5399
|
-
const requestConfig = new stsutils.STSAxiosConfig(url2, httpVerb).withAuthHeaders(accessToken, __privateGet(this, _DUMMY_USER)).withData(filters ? filters : domainResource ? domainResource : void 0);
|
|
5400
|
-
if (isNode$1 && __privateGet(this, _options3).agentManager) {
|
|
5401
|
-
requestConfig.withAgentManager(__privateGet(this, _options3).agentManager);
|
|
5402
|
-
}
|
|
5403
|
-
return await axios(requestConfig.config);
|
|
5404
|
-
} catch (error) {
|
|
5405
|
-
throw {
|
|
5406
|
-
responseCode: __privateGet(this, _HandleError).call(this, error),
|
|
5407
|
-
error
|
|
5408
|
-
};
|
|
5409
|
-
}
|
|
5410
|
-
});
|
|
5411
|
-
__privateAdd(this, _InvokeResourceAPI, async (url2, httpVerb, domainResource, filters, searchParams) => {
|
|
5388
|
+
__privateAdd(this, _InvokeResourceAPI, async (url2, httpVerb, domainResource, filters, searchParams, errorCb) => {
|
|
5412
5389
|
const id = v4();
|
|
5413
5390
|
__privateGet(this, _invokeMethods)[id] = {
|
|
5414
5391
|
id,
|
|
@@ -5418,45 +5395,33 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5418
5395
|
httpVerb,
|
|
5419
5396
|
domainResource,
|
|
5420
5397
|
filters,
|
|
5421
|
-
searchParams
|
|
5398
|
+
searchParams,
|
|
5399
|
+
errorCb
|
|
5422
5400
|
};
|
|
5423
5401
|
const InvokeAPI = async (id2) => {
|
|
5424
5402
|
const metadataRecord = __privateGet(this, _invokeMethods)[id2];
|
|
5425
5403
|
let performRetry = false;
|
|
5426
|
-
|
|
5427
|
-
let responseCode = null;
|
|
5428
|
-
let originalError;
|
|
5429
|
-
try {
|
|
5430
|
-
returnData = await __privateGet(this, ___InvokeResourceAPI).call(this, metadataRecord);
|
|
5431
|
-
} catch (error) {
|
|
5404
|
+
const returnData = await __privateGet(this, ___InvokeResourceAPI).call(this, metadataRecord, (statusCode, error) => {
|
|
5432
5405
|
console.error(chalk.red(`#InvokeResourceAPI(): Error: [${error}], Attempt: [${metadataRecord.retries + 1}]`));
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
if (
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
if (
|
|
5439
|
-
|
|
5440
|
-
console.error(chalk.red(`#InvokeResourceAPI(): Authentication error, resetting access_token (to null).`));
|
|
5441
|
-
__privateGet(this, _options3).ResetAccessToken();
|
|
5442
|
-
if (__privateGet(this, _options3).clientTelemetryEvents) {
|
|
5443
|
-
__privateGet(this, _options3).clientTelemetryEvents.AuthenticationErrorInc();
|
|
5444
|
-
}
|
|
5445
|
-
}
|
|
5446
|
-
if (isNode$1 && __privateGet(this, _options3).agentManager) {
|
|
5447
|
-
console.error(chalk.red(`#InvokeResourceAPI(): Resetting https agent (to null).`));
|
|
5448
|
-
__privateGet(this, _options3).agentManager.ResetAgent();
|
|
5449
|
-
}
|
|
5450
|
-
performRetry = true;
|
|
5406
|
+
const noRetryIndex = __privateGet(this, _NoRetryStatusCodes).indexOf(statusCode);
|
|
5407
|
+
if (noRetryIndex === -1) {
|
|
5408
|
+
if (statusCode === StatusCodes.UNAUTHORIZED) {
|
|
5409
|
+
console.error(chalk.red(`#InvokeResourceAPI(): Authentication error, resetting access_token (to null).`));
|
|
5410
|
+
__privateGet(this, _options3).ResetAccessToken();
|
|
5411
|
+
if (__privateGet(this, _options3).clientTelemetryEvents) {
|
|
5412
|
+
__privateGet(this, _options3).clientTelemetryEvents.AuthenticationErrorInc();
|
|
5451
5413
|
}
|
|
5452
5414
|
}
|
|
5415
|
+
if (isNode$1 && __privateGet(this, _options3).agentManager) {
|
|
5416
|
+
console.error(chalk.red(`#InvokeResourceAPI(): Resetting https agent (to null).`));
|
|
5417
|
+
__privateGet(this, _options3).agentManager.ResetAgent();
|
|
5418
|
+
}
|
|
5419
|
+
performRetry = true;
|
|
5453
5420
|
}
|
|
5454
|
-
}
|
|
5421
|
+
});
|
|
5455
5422
|
return {
|
|
5456
5423
|
response: returnData,
|
|
5457
|
-
retry: performRetry
|
|
5458
|
-
responseCode,
|
|
5459
|
-
originalError
|
|
5424
|
+
retry: performRetry
|
|
5460
5425
|
};
|
|
5461
5426
|
};
|
|
5462
5427
|
let retVal = null;
|
|
@@ -5477,41 +5442,49 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5477
5442
|
}
|
|
5478
5443
|
if (retVal) {
|
|
5479
5444
|
if (retVal.retry === true) {
|
|
5480
|
-
|
|
5445
|
+
errorCb(new Error(`#InvokeResourceAPI(): Max retries exceeded. Max Retries: [${__privateGet(this, _invokeMethods)[id].retries}]`));
|
|
5481
5446
|
delete __privateGet(this, _invokeMethods)[id];
|
|
5482
|
-
|
|
5483
|
-
responseCode: retVal.responseCode,
|
|
5484
|
-
error: new Error(`#InvokeResourceAPI(): Max retries exceeded. Max Retries: [${retries}], Original Error: [${retVal.originalError}]`)
|
|
5485
|
-
};
|
|
5447
|
+
return null;
|
|
5486
5448
|
} else {
|
|
5487
5449
|
return retVal.response;
|
|
5488
5450
|
}
|
|
5489
5451
|
} else {
|
|
5490
|
-
|
|
5491
|
-
responseCode: 500,
|
|
5492
|
-
error: new Error(`#InvokeResourceAPI(): Null returned from API call.`)
|
|
5493
|
-
};
|
|
5452
|
+
return null;
|
|
5494
5453
|
}
|
|
5495
5454
|
});
|
|
5496
|
-
__privateAdd(this, _TestMode,
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5455
|
+
__privateAdd(this, _TestMode, (metaData, errorCb) => {
|
|
5456
|
+
const { id, url: url2, httpVerb, filters, retries } = metaData;
|
|
5457
|
+
if (retries < 1) {
|
|
5458
|
+
errorCb(401, new Error(`Testing Error Only. Error Code: [401], Message ID: [${id}, url: [${url2}], httpVerb: [${httpVerb}], filters: [${filters}], Retries: [${retries}]`));
|
|
5459
|
+
return true;
|
|
5460
|
+
}
|
|
5461
|
+
if (retries < 2) {
|
|
5462
|
+
errorCb(500, new Error(`Testing Error Only. Error Code: [500], Message ID: [${id}, url: [${url2}], httpVerb: [${httpVerb}], filters: [${filters}], Retries: [${retries}]`));
|
|
5463
|
+
return true;
|
|
5464
|
+
}
|
|
5465
|
+
return false;
|
|
5466
|
+
});
|
|
5467
|
+
__privateAdd(this, ___InvokeResourceAPI, async (metaData, errorCb) => {
|
|
5468
|
+
try {
|
|
5469
|
+
const { url: url2, httpVerb, domainResource, filters } = metaData;
|
|
5470
|
+
if (__privateGet(this, _options3).testingMode) {
|
|
5471
|
+
if (__privateGet(this, _TestMode).call(this, metaData, errorCb)) {
|
|
5472
|
+
return null;
|
|
5473
|
+
}
|
|
5504
5474
|
}
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
});
|
|
5475
|
+
const accessToken = await __privateGet(this, _options3).GetAccessToken();
|
|
5476
|
+
const requestConfig = new stsutils.STSAxiosConfig(url2, httpVerb).withAuthHeaders(accessToken, __privateGet(this, _DUMMY_USER)).withData(filters ? filters : domainResource ? domainResource : void 0);
|
|
5477
|
+
if (isNode$1 && __privateGet(this, _options3).agentManager) {
|
|
5478
|
+
requestConfig.withAgentManager(__privateGet(this, _options3).agentManager);
|
|
5510
5479
|
}
|
|
5511
|
-
|
|
5512
|
-
})
|
|
5480
|
+
return await axios(requestConfig.config);
|
|
5481
|
+
} catch (error) {
|
|
5482
|
+
const responseCode = __privateGet(this, _HandleError).call(this, error);
|
|
5483
|
+
errorCb(responseCode, error);
|
|
5484
|
+
return null;
|
|
5485
|
+
}
|
|
5513
5486
|
});
|
|
5514
|
-
__publicField(this, "GetResource", async (resource, id, filters) => {
|
|
5487
|
+
__publicField(this, "GetResource", async (resource, id, filters, errorCb) => {
|
|
5515
5488
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5516
5489
|
const retVal = await __privateGet(this, _fhirSocketClient).GetResource(resource, id);
|
|
5517
5490
|
if (retVal.status === StatusCodes.OK) {
|
|
@@ -5521,7 +5494,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5521
5494
|
}
|
|
5522
5495
|
} else {
|
|
5523
5496
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}/${id}`;
|
|
5524
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "get", null, filters, null);
|
|
5497
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "get", null, filters, null, errorCb);
|
|
5525
5498
|
if (response) {
|
|
5526
5499
|
return response.data;
|
|
5527
5500
|
} else {
|
|
@@ -5535,7 +5508,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5535
5508
|
url2.search = searchParams.toString();
|
|
5536
5509
|
return url2.toString();
|
|
5537
5510
|
});
|
|
5538
|
-
__publicField(this, "GetResources", async (resource, filters, searchParams) => {
|
|
5511
|
+
__publicField(this, "GetResources", async (resource, filters, searchParams, errorCb) => {
|
|
5539
5512
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5540
5513
|
return __privateGet(this, _fhirSocketClient).GetResources(resource, searchParams);
|
|
5541
5514
|
} else {
|
|
@@ -5543,7 +5516,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5543
5516
|
if (searchParams) {
|
|
5544
5517
|
url2 = __privateGet(this, _BuildQueryString).call(this, url2, searchParams);
|
|
5545
5518
|
}
|
|
5546
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "get", null, filters, searchParams);
|
|
5519
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "get", null, filters, searchParams, errorCb);
|
|
5547
5520
|
if (response) {
|
|
5548
5521
|
return response.data;
|
|
5549
5522
|
} else {
|
|
@@ -5551,21 +5524,23 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5551
5524
|
}
|
|
5552
5525
|
}
|
|
5553
5526
|
});
|
|
5554
|
-
__publicField(this, "CreateResource", async (resource, domainResource) => {
|
|
5527
|
+
__publicField(this, "CreateResource", async (resource, domainResource, errorCb) => {
|
|
5555
5528
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5556
5529
|
const retVal = await __privateGet(this, _fhirSocketClient).CreateResource(resource, domainResource);
|
|
5557
5530
|
if (retVal.status === StatusCodes.CREATED) {
|
|
5558
5531
|
return retVal.value;
|
|
5559
5532
|
} else {
|
|
5533
|
+
errorCb(new Error(`CreateResource(): Invalid response status code: [${retVal.status}] expected: [${StatusCodes.CREATED}]`));
|
|
5560
5534
|
return null;
|
|
5561
5535
|
}
|
|
5562
5536
|
} else {
|
|
5563
5537
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}`;
|
|
5564
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "post", domainResource, null, null);
|
|
5538
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "post", domainResource, null, null, errorCb);
|
|
5565
5539
|
if (response) {
|
|
5566
5540
|
if (response.status === StatusCodes.CREATED) {
|
|
5567
5541
|
return response.data;
|
|
5568
5542
|
} else {
|
|
5543
|
+
errorCb(new Error(`CreateResource(): Invalid response status code: [${response.status}] expected: [${StatusCodes.CREATED}]`));
|
|
5569
5544
|
return null;
|
|
5570
5545
|
}
|
|
5571
5546
|
} else {
|
|
@@ -5573,12 +5548,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5573
5548
|
}
|
|
5574
5549
|
}
|
|
5575
5550
|
});
|
|
5576
|
-
__publicField(this, "UpdateResource", async (resource, domainResource) => {
|
|
5551
|
+
__publicField(this, "UpdateResource", async (resource, domainResource, errorCb) => {
|
|
5577
5552
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5578
5553
|
return __privateGet(this, _fhirSocketClient).UpdateResource(resource, domainResource);
|
|
5579
5554
|
} else {
|
|
5580
5555
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}/${domainResource.id}`;
|
|
5581
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "put", domainResource, null, null);
|
|
5556
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "put", domainResource, null, null, errorCb);
|
|
5582
5557
|
if (response) {
|
|
5583
5558
|
return response.data;
|
|
5584
5559
|
} else {
|
|
@@ -5586,12 +5561,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5586
5561
|
}
|
|
5587
5562
|
}
|
|
5588
5563
|
});
|
|
5589
|
-
__publicField(this, "UpdateResources", async (resource, domainResources) => {
|
|
5564
|
+
__publicField(this, "UpdateResources", async (resource, domainResources, errorCb) => {
|
|
5590
5565
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5591
5566
|
return __privateGet(this, _fhirSocketClient).UpdateResources(resource, domainResources);
|
|
5592
5567
|
} else {
|
|
5593
5568
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}`;
|
|
5594
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "put", domainResources, null, null);
|
|
5569
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "put", domainResources, null, null, errorCb);
|
|
5595
5570
|
if (response) {
|
|
5596
5571
|
return response.data;
|
|
5597
5572
|
} else {
|
|
@@ -5599,12 +5574,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5599
5574
|
}
|
|
5600
5575
|
}
|
|
5601
5576
|
});
|
|
5602
|
-
__publicField(this, "PatchResource", async (resource, domainResource) => {
|
|
5577
|
+
__publicField(this, "PatchResource", async (resource, domainResource, errorCb) => {
|
|
5603
5578
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5604
5579
|
return __privateGet(this, _fhirSocketClient).PatchResource(resource, domainResource);
|
|
5605
5580
|
} else {
|
|
5606
5581
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}/${domainResource.id}`;
|
|
5607
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "patch", domainResource, null, null);
|
|
5582
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "patch", domainResource, null, null, errorCb);
|
|
5608
5583
|
if (response) {
|
|
5609
5584
|
return response.data;
|
|
5610
5585
|
} else {
|
|
@@ -5612,12 +5587,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5612
5587
|
}
|
|
5613
5588
|
}
|
|
5614
5589
|
});
|
|
5615
|
-
__publicField(this, "PatchResources", async (resource, domainResources) => {
|
|
5590
|
+
__publicField(this, "PatchResources", async (resource, domainResources, errorCb) => {
|
|
5616
5591
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5617
5592
|
return __privateGet(this, _fhirSocketClient).PatchResources(resource, domainResources);
|
|
5618
5593
|
} else {
|
|
5619
5594
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}`;
|
|
5620
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "patch", domainResources, null, null);
|
|
5595
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "patch", domainResources, null, null, errorCb);
|
|
5621
5596
|
if (response) {
|
|
5622
5597
|
return response.data;
|
|
5623
5598
|
} else {
|
|
@@ -5625,12 +5600,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5625
5600
|
}
|
|
5626
5601
|
}
|
|
5627
5602
|
});
|
|
5628
|
-
__publicField(this, "DeleteResource", async (resource, id) => {
|
|
5603
|
+
__publicField(this, "DeleteResource", async (resource, id, errorCb) => {
|
|
5629
5604
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5630
5605
|
return __privateGet(this, _fhirSocketClient).DeleteResource(resource, id);
|
|
5631
5606
|
} else {
|
|
5632
5607
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}/${id}`;
|
|
5633
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "delete", null, null, null);
|
|
5608
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "delete", null, null, null, errorCb);
|
|
5634
5609
|
if (response) {
|
|
5635
5610
|
return response.data;
|
|
5636
5611
|
} else {
|
|
@@ -5638,12 +5613,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5638
5613
|
}
|
|
5639
5614
|
}
|
|
5640
5615
|
});
|
|
5641
|
-
__publicField(this, "DeleteResources", async (resource, domainResources) => {
|
|
5616
|
+
__publicField(this, "DeleteResources", async (resource, domainResources, errorCb) => {
|
|
5642
5617
|
if (__privateGet(this, _options3).useSocketClient === true && __privateGet(this, _fhirSocketClient)) {
|
|
5643
5618
|
return __privateGet(this, _fhirSocketClient).DeleteResources(resource, domainResources);
|
|
5644
5619
|
} else {
|
|
5645
5620
|
const url2 = `${__privateGet(this, _options3).fhirEndpoint}${__privateGet(this, _stsfhirapiroot)}/${resource}`;
|
|
5646
|
-
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "delete", domainResources, null, null);
|
|
5621
|
+
const response = await __privateGet(this, _InvokeResourceAPI).call(this, url2, "delete", domainResources, null, null, errorCb);
|
|
5647
5622
|
if (response) {
|
|
5648
5623
|
return response.data;
|
|
5649
5624
|
} else {
|
|
@@ -5691,9 +5666,9 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
5691
5666
|
_LogDebugMessage = new WeakMap();
|
|
5692
5667
|
_LogErrorMessage = new WeakMap();
|
|
5693
5668
|
_HandleError = new WeakMap();
|
|
5694
|
-
___InvokeResourceAPI = new WeakMap();
|
|
5695
5669
|
_InvokeResourceAPI = new WeakMap();
|
|
5696
5670
|
_TestMode = new WeakMap();
|
|
5671
|
+
___InvokeResourceAPI = new WeakMap();
|
|
5697
5672
|
_BuildQueryString = new WeakMap();
|
|
5698
5673
|
exports2.FhirClient = FhirClient;
|
|
5699
5674
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|