@rebuy/rebuy 1.4.0 → 1.5.0

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/api.js CHANGED
@@ -8,6 +8,7 @@ const config = {
8
8
  */
9
9
  cdnDomain: 'https://cdn.rebuyengine.com',
10
10
  eventDomain: 'https://rebuyengine.com',
11
+ geoDomain: 'https://geo.rebuyengine.com',
11
12
  shieldDomain: 'https://cached.rebuyengine.com',
12
13
  staticDomain: 'https://cdn.rebuyengine.com',
13
14
  shop: null,
@@ -20,6 +21,7 @@ const staging = {
20
21
  */
21
22
  cdnDomain: 'https://cdn.enigneyuber.com',
22
23
  eventDomain: 'https://enigneyuber.com',
24
+ geoDomain: 'https://geo.enigneyuber.com',
23
25
  shieldDomain: 'https://cached.enigneyuber.com',
24
26
  staticDomain: 'https://cdn.enigneyuber.com',
25
27
  };
@@ -109,6 +111,10 @@ export class Api {
109
111
  return await makeCall(method, path, data, config.staticDomain, options);
110
112
  }
111
113
 
114
+ async callGeo(method, path, data, options = {}) {
115
+ return await makeCall(method, path, data, config.geoDomain, options);
116
+ }
117
+
112
118
  /**
113
119
  * @deprecated
114
120
  */
package/geolocation.js CHANGED
@@ -1,5 +1,5 @@
1
- import Cookie from './cookie.js';
2
1
  import Api from './api.js';
2
+ import Cookie from './cookie.js';
3
3
 
4
4
  const config = {
5
5
  key: null,
@@ -12,7 +12,7 @@ const config = {
12
12
 
13
13
  const getGeolocation = async () => {
14
14
  const api = new Api(config.key);
15
- const response = await api.callApi('GET', '/api/v1/customers/geolocation');
15
+ const response = await api.callGeo('GET', '/');
16
16
 
17
17
  if (response.data) {
18
18
  // Update config with geolocation
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebuy/rebuy",
3
3
  "description": "This is the default library for Rebuy",
4
- "version": "1.4.0",
4
+ "version": "1.5.0",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",