@nsshunt/stsfhirclient 1.0.21 → 1.0.22

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.
@@ -3691,13 +3691,6 @@ _requestCount = /* @__PURE__ */ new WeakMap();
3691
3691
  _SetupResetInterval = /* @__PURE__ */ new WeakMap();
3692
3692
  _GetAgentOptions = /* @__PURE__ */ new WeakMap();
3693
3693
  class STSAxiosConfig {
3694
- /*
3695
- headers = {
3696
- 'Content-Type': 'application/json',
3697
- 'Authorization': 'Bearer ' + accesss_token,
3698
- 'x-sts_user_id': DUMMY_USER
3699
- }
3700
- */
3701
3694
  constructor(url, method, headers, timeout) {
3702
3695
  __privateAdd2(this, _url);
3703
3696
  __privateAdd2(this, _method);
@@ -3715,6 +3708,13 @@ class STSAxiosConfig {
3715
3708
  __privateSet2(this, _timeout, timeout);
3716
3709
  }
3717
3710
  }
3711
+ withCookies(cookies) {
3712
+ if (!__privateGet2(this, _headers)) {
3713
+ __privateSet2(this, _headers, {});
3714
+ }
3715
+ __privateGet2(this, _headers)["Cookie"] = cookies.join("; ");
3716
+ return this;
3717
+ }
3718
3718
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3719
3719
  withData(data) {
3720
3720
  __privateSet2(this, _data, data);
@@ -3722,10 +3722,11 @@ class STSAxiosConfig {
3722
3722
  }
3723
3723
  // 'Content-Type': 'application/json'
3724
3724
  withAuthHeaders(accesssToken, stsUserId) {
3725
- __privateSet2(this, _headers, {
3726
- "Content-Type": "application/json",
3727
- "Authorization": "Bearer " + accesssToken
3728
- });
3725
+ if (!__privateGet2(this, _headers)) {
3726
+ __privateSet2(this, _headers, {});
3727
+ }
3728
+ __privateGet2(this, _headers)["Content-Type"] = "application/json";
3729
+ __privateGet2(this, _headers)["Authorization"] = "Bearer " + accesssToken;
3729
3730
  if (stsUserId) {
3730
3731
  __privateGet2(this, _headers)["x-sts_user_id"] = stsUserId;
3731
3732
  }
@@ -3736,9 +3737,10 @@ class STSAxiosConfig {
3736
3737
  return this;
3737
3738
  }
3738
3739
  withDefaultHeaders() {
3739
- __privateSet2(this, _headers, {
3740
- "Content-Type": "application/json"
3741
- });
3740
+ if (!__privateGet2(this, _headers)) {
3741
+ __privateSet2(this, _headers, {});
3742
+ }
3743
+ __privateGet2(this, _headers)["Content-Type"] = "application/json";
3742
3744
  return this;
3743
3745
  }
3744
3746
  withCredentials() {