@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.cjs CHANGED
@@ -17781,36 +17781,33 @@ var packageDefaultComponents = {
17781
17781
  init_client();
17782
17782
  var PUSH_TOKEN_STORAGE_KEY = "realtimex-push-token";
17783
17783
  var SERVICE_WORKER_PATH = "/firebase-messaging-sw.js";
17784
- var v2Url = (path) => {
17785
- const base = (exports.getChatBaseUrl() || String(apiClient.defaults.baseURL || "")).replace(/\/$/, "").replace(/\/v1$/, "/v2");
17786
- return `${base}${path}`;
17787
- };
17784
+ var v2Url = "https://realtimex.softwareco.com/api/v2";
17788
17785
  var apiGetPushConfig = async () => {
17789
- const { data } = await apiClient.get(v2Url("/notifications/push/config"));
17786
+ const { data } = await apiClient.get(`${v2Url}/notifications/push/config`);
17790
17787
  return data?.data;
17791
17788
  };
17792
17789
  var apiRegisterPushToken = async (token, deviceLabel) => {
17793
- const { data } = await apiClient.post(v2Url("/notifications/push/token"), {
17790
+ const { data } = await apiClient.post(`${v2Url}/notifications/push/token`, {
17794
17791
  token,
17795
17792
  deviceLabel
17796
17793
  });
17797
17794
  return data?.data;
17798
17795
  };
17799
17796
  var apiRemovePushToken = async (token) => {
17800
- const { data } = await apiClient.delete(v2Url("/notifications/push/token"), {
17797
+ const { data } = await apiClient.delete(`${v2Url}/notifications/push/token`, {
17801
17798
  data: { token }
17802
17799
  });
17803
17800
  return data;
17804
17801
  };
17805
17802
  var apiGetPushPreference = async () => {
17806
17803
  const { data } = await apiClient.get(
17807
- v2Url("/notifications/push/preference")
17804
+ `${v2Url}/notifications/push/preference`
17808
17805
  );
17809
17806
  return data?.data;
17810
17807
  };
17811
17808
  var apiUpdatePushPreference = async (enabled) => {
17812
17809
  const { data } = await apiClient.patch(
17813
- v2Url("/notifications/push/preference"),
17810
+ `${v2Url}/notifications/push/preference`,
17814
17811
  { enabled }
17815
17812
  );
17816
17813
  return data?.data;