@realtimexsco/live-chat 1.4.1 → 1.4.2

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/index.mjs CHANGED
@@ -17754,36 +17754,33 @@ var packageDefaultComponents = {
17754
17754
  init_client();
17755
17755
  var PUSH_TOKEN_STORAGE_KEY = "realtimex-push-token";
17756
17756
  var SERVICE_WORKER_PATH = "/firebase-messaging-sw.js";
17757
- var v2Url = (path) => {
17758
- const base = (getChatBaseUrl() || String(apiClient.defaults.baseURL || "")).replace(/\/$/, "").replace(/\/v1$/, "/v2");
17759
- return `${base}${path}`;
17760
- };
17757
+ var v2Url = "https://realtimex.softwareco.com/api/v2";
17761
17758
  var apiGetPushConfig = async () => {
17762
- const { data } = await apiClient.get(v2Url("/notifications/push/config"));
17759
+ const { data } = await apiClient.get(`${v2Url}/notifications/push/config`);
17763
17760
  return data?.data;
17764
17761
  };
17765
17762
  var apiRegisterPushToken = async (token, deviceLabel) => {
17766
- const { data } = await apiClient.post(v2Url("/notifications/push/token"), {
17763
+ const { data } = await apiClient.post(`${v2Url}/notifications/push/token`, {
17767
17764
  token,
17768
17765
  deviceLabel
17769
17766
  });
17770
17767
  return data?.data;
17771
17768
  };
17772
17769
  var apiRemovePushToken = async (token) => {
17773
- const { data } = await apiClient.delete(v2Url("/notifications/push/token"), {
17770
+ const { data } = await apiClient.delete(`${v2Url}/notifications/push/token`, {
17774
17771
  data: { token }
17775
17772
  });
17776
17773
  return data;
17777
17774
  };
17778
17775
  var apiGetPushPreference = async () => {
17779
17776
  const { data } = await apiClient.get(
17780
- v2Url("/notifications/push/preference")
17777
+ `${v2Url}/notifications/push/preference`
17781
17778
  );
17782
17779
  return data?.data;
17783
17780
  };
17784
17781
  var apiUpdatePushPreference = async (enabled) => {
17785
17782
  const { data } = await apiClient.patch(
17786
- v2Url("/notifications/push/preference"),
17783
+ `${v2Url}/notifications/push/preference`,
17787
17784
  { enabled }
17788
17785
  );
17789
17786
  return data?.data;