@hipnation-truth/sdk 0.26.17 → 0.26.18

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/react.js CHANGED
@@ -2935,17 +2935,10 @@ var allergiesByPatientRef = (0, import_server5.makeFunctionReference)("medicalRe
2935
2935
  var appointmentsByPatientRef = (0, import_server5.makeFunctionReference)("medicalRecords:getAppointmentsByElationPatient");
2936
2936
  function postPatientRefresh(url, apiKey, getAuthToken, body, signal) {
2937
2937
  return __async(this, null, function* () {
2938
- const headers = {
2939
- "Content-Type": "application/json",
2940
- "X-API-Key": apiKey
2941
- };
2942
- try {
2943
- const token = yield getAuthToken == null ? void 0 : getAuthToken();
2944
- if (token) {
2945
- headers.Authorization = `Bearer ${token}`;
2946
- }
2947
- } catch (e) {
2948
- }
2938
+ const headers = yield buildAuthHeaders(
2939
+ { apiKey, getAuthToken },
2940
+ { json: true, requireUserToken: true }
2941
+ );
2949
2942
  yield fetch(url, {
2950
2943
  method: "POST",
2951
2944
  headers,