@rebuy/rebuy 1.0.3 → 1.1.0-rc.3
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/.git/logs/refs/heads/REB-2426/add-index.js +2 -0
- package/.git/refs/heads/REB-2426/add-index.js +1 -0
- package/api.js +3 -1
- package/client.js +3 -1
- package/geolocation.js +3 -1
- package/identity.js +3 -1
- package/index.js +7 -0
- package/package.json +1 -1
- package/session.js +3 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 145cb0c967aef90450c887bbaf2a9bf61a00577d Mike Reid <mike.reid@rebuyengine.com> 1658876468 -0600 branch: Created from HEAD
|
|
2
|
+
145cb0c967aef90450c887bbaf2a9bf61a00577d f5fedc7d3aea2600d58bfde5527d49f2b99d5abc Mike Reid <mike.reid@rebuyengine.com> 1658876497 -0600 commit: Fix: Include both named + default exports (for BC)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f5fedc7d3aea2600d58bfde5527d49f2b99d5abc
|
package/api.js
CHANGED
|
@@ -36,7 +36,7 @@ const makeCall = async (method, path, data, origin) => {
|
|
|
36
36
|
return await request.json();
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export
|
|
39
|
+
export class Api {
|
|
40
40
|
constructor(options) {
|
|
41
41
|
if (typeof options == 'string') {
|
|
42
42
|
config.key = options;
|
|
@@ -57,3 +57,5 @@ export default class Api {
|
|
|
57
57
|
return await makeCall(method, path, data, config.domain);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
export default Api;
|
package/client.js
CHANGED
|
@@ -48,7 +48,7 @@ const makeCall = async (endpoint, params, format) => {
|
|
|
48
48
|
return response;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
export
|
|
51
|
+
export class RebuyClient {
|
|
52
52
|
constructor(key, defaultParameters) {
|
|
53
53
|
if (typeof key == 'string') {
|
|
54
54
|
config.key = key;
|
|
@@ -102,3 +102,5 @@ export default class RebuyClient {
|
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
|
|
106
|
+
export default RebuyClient;
|
package/geolocation.js
CHANGED
|
@@ -33,7 +33,7 @@ const getGeolocation = async () => {
|
|
|
33
33
|
return config.geolocation;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export
|
|
36
|
+
export class Geolocation {
|
|
37
37
|
constructor(key) {
|
|
38
38
|
if (typeof document == 'undefined') {
|
|
39
39
|
return;
|
|
@@ -59,3 +59,5 @@ export default class Geolocation {
|
|
|
59
59
|
return config.geolocation;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
export default Geolocation;
|
package/identity.js
CHANGED
|
@@ -13,7 +13,7 @@ const config = {
|
|
|
13
13
|
session: null,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export class Identity {
|
|
17
17
|
constructor(key) {
|
|
18
18
|
if (typeof document == 'undefined') {
|
|
19
19
|
return;
|
|
@@ -68,3 +68,5 @@ export default class Identity {
|
|
|
68
68
|
return await config.geolocation.geolocation();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
export default Identity;
|
package/index.js
ADDED
package/package.json
CHANGED
package/session.js
CHANGED
|
@@ -10,7 +10,7 @@ const config = {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export class Session {
|
|
14
14
|
constructor() {
|
|
15
15
|
if (typeof document == 'undefined') {
|
|
16
16
|
return;
|
|
@@ -48,3 +48,5 @@ export default class Session {
|
|
|
48
48
|
return parseInt((config.now - this.sessionStart()) / 1000 / 60);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
export default Session;
|